Data verification method, device, terminal equipment and storage medium

By identifying key information in the message and determining the target transaction model, the problem of not being able to quickly locate data when verification failures in different types of business data is solved, and the rapid positioning and manual inspection assistance of the verification failed data is achieved, which improves the efficiency and accuracy of data verification.

CN113971165BActive Publication Date: 2025-04-18PING AN BANK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111231727.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-22
Publication Date
2025-04-18
Estimated Expiration
2041-10-22

AI Technical Summary

Technical Problem

In big data technology, different types of business data require different verification rules, which leads to the inability to quickly locate and check detailed information when the business data verification fails.

Method used

By identifying the key information in the message, determining the matching target transaction model, verifying the key information based on the life cycle of the model, and using the transaction log file to locate it when the verification fails.

Benefits of technology

It realizes rapid positioning of business data that fails to verify, assists staff in manual inspection, and improves the efficiency and accuracy of data verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971165B_ABST
    Figure CN113971165B_ABST
Patent Text Reader

Abstract

The embodiment of the present application is applicable to the field of big data technology, and provides a data verification method, device, terminal equipment and storage medium, the method comprising: identifying key information in a message; determining a target transaction model that matches the key information from a plurality of preset transaction models; verifying the key information based on the life cycle of the target transaction model to obtain a verification result; if the verification result is a verification failure result, locating the key information according to the transaction log file, the transaction log file is a log file generated when the target transaction model is executed according to the life cycle. The above method can quickly locate the key information that fails to be verified, which helps to improve the efficiency of data verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data technology, and in particular relates to a data verification method, device, terminal equipment and storage medium. Background Art

[0002] With the rise of big data technology, business systems usually require massive amounts of business data when running different types of business. In order to ensure the normal operation of any type of business, it is usually necessary to perform data verification on each type of business data.

[0003] However, since different types of businesses correspond to different business data, the validation rules for business data are usually different. When business data validation fails, it is impossible to locate and check it directly at the code level. In other words, it is impossible to quickly locate the business data that failed validation based on the corresponding prompt information to find out the detailed information of the business data validation failure. Summary of the invention

[0004] The embodiments of the present application provide a data verification method, apparatus, terminal device and storage medium, which can achieve the purpose of quickly locating business data that fails verification.

[0005] In a first aspect, an embodiment of the present application provides a data verification method, the method comprising:

[0006] Identify key information in the message;

[0007] Determine the target transaction model that matches the key information from multiple preset transaction models;

[0008] Based on the life cycle of the target transaction model, key information is verified and processed to obtain verification results;

[0009] If the verification result is a verification failure result, the key information is located according to the transaction log file, and the transaction log file is a log file generated when the target transaction model is executed according to the life cycle.

[0010] In a second aspect, an embodiment of the present application provides a data verification device, the device comprising:

[0011] An identification module, used to identify key information in the message;

[0012] A target transaction model determination module is used to determine a target transaction model that matches the key information from a plurality of preset transaction models;

[0013] The processing module is used to verify the key information based on the life cycle of the target transaction model and obtain the verification result;

[0014] The positioning module is used to locate key information according to the transaction log file if the verification result is a verification failure result. The transaction log file is a log file generated when the target transaction model is executed according to the life cycle.

[0015] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspects above is implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements any method as described in the first aspect above.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any one of the methods in the first aspect.

[0018] Compared with the prior art, the embodiment of the present application has the following beneficial effects: the terminal device can first identify one or more key information contained in the message, and then match according to all the identified key information to determine the target transaction model from multiple preset transaction models. Furthermore, when the terminal device uses the rule engine in the target transaction model to verify the key information according to the life cycle of the target transaction model, a transaction log file containing the verification results can be generated. In this way, the terminal device can directly identify the code corresponding to the transaction log file, so as to accurately and quickly locate the key information that failed the verification from the transaction log file, so as to assist the staff in manual inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 This is a flow chart of an implementation of a data verification method provided by an embodiment of the present application;

[0021] Figure 2 is a flow chart of an implementation of a data verification method provided by another embodiment of the present application;

[0022] Figure 3 is a flow chart of an implementation of a data verification method provided by another embodiment of the present application;

[0023] Figure 4 This is a schematic diagram of an implementation method of S104 of a data verification method provided in an embodiment of the present application;

[0024] Figure 5 is a flow chart of an implementation of a data verification method provided in yet another embodiment of the present application;

[0025] Figure 6 It is a structural schematic diagram of a data verification device provided by an embodiment of the present application;

[0026] Figure 7 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0028] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0029] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0030] The data verification method provided in the embodiment of the present application can be applied to terminal devices such as tablet computers, laptop computers, ultra-mobile personal computers (UMPCs), and netbooks. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.

[0031] See also Figure 1 , Figure 1 The following is a flowchart of a data verification method according to an embodiment of the present invention. The method comprises the following steps:

[0032] S101. The terminal device identifies key information in the message.

[0033] In one embodiment, the above-mentioned message is a data unit used for exchange and transmission in network transmission. Usually, the message contains complete data information to be sent, and the length of the message is inconsistent, and the length is unlimited and variable. In addition, the message usually has a certain structural format for loading and transporting data. Exemplarily, for a data request type message, the message can be composed of four parts. For example, the message includes a request line structure, a request header structure, a carriage return and line feed structure, and a message body structure. For a data response type message, it can also be composed of four parts. For example, the message includes a status line structure, a response header structure, a carriage return and line feed structure, and a message body structure.

[0034] Among them, for any type of message, the area of ​​its message body structure usually contains the information that needs to be sent to the server for this data request, or contains the specific message returned by the server to the client. In this embodiment, the above message can be specifically a data response type message, and the above key information is specifically the information carried in the area of ​​the message body structure of the message.

[0035] Based on this, in this embodiment, the terminal device may consider the content contained in the message body of the data response type message as having substantial key information. Therefore, when identifying the message, the terminal device may first identify the message structure of the data response type message to determine the area in the message that belongs to the message body structure. Then, the data contained in the area is identified to obtain key information.

[0036] It is understandable that there are usually multiple types of messages that need to be sent, and the key information required for each type is usually different. For example, for financial messages, the message information contained therein usually includes multiple information such as transaction type, transaction direction, transaction scenario, data loader, and verification items. The terminal device can determine one or more of the above information as key information for subsequent processing.

[0037] Based on this, in another embodiment, the data identified by the terminal device from the area of ​​the message body structure may have multiple substantive information. However, among the multiple substantive information, only one or two pieces of information may be key information. Therefore, after the terminal device identifies any substantive information from the area of ​​the message body structure, the substantive information can be matched with multiple pre-set key information. Then, the key information in the message is determined from the multiple substantive information.

[0038] S102: The terminal device determines a target transaction model that matches the key information from a plurality of preset transaction models.

[0039] In one embodiment, after determining the key information, the terminal device may also determine a transaction model that matches the key information from a plurality of preset transaction models as a target transaction model. The target transaction model is used to define the life cycle of the entire transaction in the terminal device. It is understandable that for any transaction type of message, its life cycle includes multiple processes such as the start, intermediate processing and end of the transaction. In this life cycle, around a certain transaction, as time goes by, a series of actions are performed, and finally a certain transaction result is obtained.

[0040] In one embodiment, the target transaction model includes a rule engine for verifying each key information in the message, and the rule engine can be used to verify the key information when executed. Specifically, the rule engine has one or more logical rule expressions for verifying each key information, and any logical rule expression can be generated by at least one verification rule expression.

[0041] Exemplarily, the verification rule expression may be a rule expression for verifying a single key information. For example, a single consumption cannot exceed a certain amount, the number of consumptions in a month is limited, the installment consumption amount cannot be less than a certain amount, and so on. The logical rule expression may be an expression for verifying multiple key information at the same time. For example, the logical rule expression for verifying the key information of the limit and the number of times may be: including two verification rule expressions such as the customer-level limit check and the account-level limit check. The logical rule expression for verifying the key information of the control code may be: including two verification rule expressions such as the card-level control code check and the account control code check, and there is no limitation on this.

[0042] In one embodiment, after obtaining the logic rule expression or the verification rule expression, the terminal device can register the logic rule expression or the verification rule expression in the rule engine respectively. Then, the rule engine is loaded in the transaction model to obtain a transaction model for verifying at least one key information. Based on this, it can be understood that when the terminal device determines the target transaction model, the terminal device can execute the logic rule expression or the verification rule expression inside it according to the rule engine loaded in the target transaction model, and verify the key information in the message in turn.

[0043] In a specific application, the staff can develop multiple verification rule expressions on the terminal device in advance, and then the terminal device automatically combines the multiple verification rule expressions to form multiple logical rule expressions. Then, the multiple logical rule expressions are registered in the rule engine to form multiple transaction models. Finally, the multiple transaction models are automatically cached in the database. After receiving and identifying the key information of the message, the key information corresponding to the verification of the multiple transaction models in the database is matched based on the identified key information to obtain a matching target transaction model.

[0044] Among them, refer to Figure 2 The terminal device can generate multiple transaction models through the following steps S121-S124, as detailed below:

[0045] S121. The terminal device obtains a verification rule expression for verifying key information from a database.

[0046] S122. The terminal device defines a rule name of a verification rule expression, and establishes a mapping relationship between the rule name and the corresponding verification rule expression.

[0047] In one embodiment, the above database is a database for storing verification rule expressions, wherein the verification rule expressions are verification rule codes pre-developed by staff, and each verification rule expression is used to verify a key information.

[0048] It is understandable that the staff can pre-define multiple key information in the terminal device and develop a verification rule expression for each key information. Moreover, after developing a verification rule expression corresponding to any key information, the terminal device can name it to define the rule name of the verification rule expression. It should be noted that after defining the rule name, the terminal device can also establish a mapping relationship between the rule name and the corresponding verification rule expression.

[0049] It should be noted that different validation rule expressions usually have different corresponding rule names, wherein the rule name includes but is not limited to characters, letters, numbers or their combination, which are not limited thereto.

[0050] It should be added that the above logic rule expression is composed of one or more verification rule expressions. Therefore, when each verification rule expression has a corresponding rule name, the logic rule expression may also have a corresponding rule name, and this is not limited.

[0051] For example, ACCT_STATUS_CHECKER = (ACCT_BLKCD_1||ACCT_BLKCD_MEMO_1) && (ACCT_BLKCD_2||ACCT_BLKCD_MEMO_2)||. ACCT_STATUS_CHECKER can be considered as the rule name of the logic rule expression, ACCT_BLKCD_1||ACCT_BLKCD_MEMO_1 can be considered as the rule name of one of the check rule expressions, and ACCT_BLKCD_2||ACCT_BLKCD_MEMO_2 can be considered as the rule name of another check rule expression, and there is no limitation on this.

[0052] S123. For any transaction model to be configured, the terminal device obtains a data table containing rule names.

[0053] S124. The terminal device registers the rule name contained in the data table into the rule engine of the transaction model to be configured to configure the transaction model; wherein the rule engine of the configured transaction model is used to map the verification rule expression corresponding to the rule name according to the mapping relationship to verify the key information.

[0054] In one embodiment, the above data table is a data table containing rule names, wherein the rule names contained in the data table may be one or more. It is understandable that for a transaction model to be configured, it can be configured according to the rule names contained in a data table.

[0055] It should be noted that, unlike the prior art method of assembling the verification rule expression into the rule engine to generate the configured transaction model, in this embodiment, when configuring the transaction model, the rule name is registered into the rule engine. When the rule engine verifies the key information, the rule engine can map the verification rule expression corresponding to the rule name from the database based on the mapping relationship in S122 to verify the key information.

[0056] It is understandable that, because the rule name is registered in the rule engine of the transaction model to be configured to configure the transaction model, the code of the generated transaction model will be relatively concise.

[0057] In a specific embodiment, the rule engine can be considered as a processing center for mapping, parsing, and executing verification rule expressions. Specifically, when the terminal device executes according to the life cycle of the transaction model, it can read the database at the same time. Afterwards, the rule engine in the transaction model can obtain the corresponding verification rule expression from the database based on the mapping relationship. That is, locate the implementation code corresponding to the verification rule expression from the database. Finally, parse the located verification rule expressions in turn, and verify the key information based on the parsed content.

[0058] Based on this, when configuring any transaction model to be configured, developers need to determine in advance based on the actual transaction scenario, one or more key information that should be included in the transaction process. After that, develop a verification rule expression to verify each key information. Then, define the rule name corresponding to each verification rule expression, and establish a mapping relationship between each rule name and the corresponding verification rule expression. Finally, register the rule name contained in the data table to the rule engine, and load the rule engine into the transaction model to obtain the configured transaction model. Among them, the transaction model to be configured is a pre-developed code model that can be used to load the rule engine.

[0059] It is understandable that, for any configured transaction model, in order to determine the target transaction model that matches the key information from multiple configured transaction models, the terminal device may also pre-associate each configured transaction model with the corresponding key information. Figure 3 The terminal device can establish the association relationship between the transaction model and the corresponding key information through the following steps S131-S132, as detailed below:

[0060] S131. The terminal device determines key information that can be verified by the transaction model according to the rule name included in the transaction model; the number of key information includes at least one.

[0061] S132. The terminal device establishes an association relationship between the transaction model and the key information.

[0062] In one embodiment, each configured transaction model includes at least one rule name corresponding to a verification rule expression, so each configured transaction model can verify at least one key information. Based on this, the terminal device can determine multiple key information that can be verified by each configured transaction model according to the rule name included in the transaction model. Then, each key information is associated with the corresponding transaction model to establish an association relationship.

[0063] Specifically, for transaction model A, it can be associated with the consumption amount and the number of consumptions. At this time, if the key information identified in the message is the key information of the consumption amount and the number of consumptions, then when matching transaction models, transaction model A can be determined as the target transaction model.

[0064] S103. The terminal device verifies the key information based on the life cycle of the target transaction model to obtain a verification result.

[0065] In one embodiment, the life cycle is explained in S102 above, and no further explanation is given. The verification result is the result of verification failure or verification success when the key information is verified by the rule engine.

[0066] It should be noted that, for a rule engine included in a transaction model, if the rule engine includes multiple verification rule expressions, the terminal device can also define the verification sequence between each verification rule expression. The verification sequence includes but is not limited to the verification sequence of parallel verification of multiple key information, and the verification sequence of serial verification of each key information in the message based on the identification order of each key information in the message, which is not limited.

[0067] In one embodiment, the verification result of each key information can be displayed in the following form. Specifically:

[0068] if(gets.sum>1000){return false;}return true;}

[0069] Among them, 1000 can be a pre-defined specific amount that cannot be exceeded for one consumption; it can be understood that if it is greater than, return false is displayed, that is, the verification failed result; if it is not greater than, return true is displayed, that is, the verification succeeded result, and there is no limitation on this.

[0070] S104. If the verification result is a verification failure, the terminal device locates the key information according to the transaction log file, where the transaction log file is a log file generated when the target transaction model is executed according to the life cycle.

[0071] In one embodiment, when the rule engine performs verification of key information, a transaction log file containing the verification results will be generated. The log file includes, but is not limited to, transaction log files generated from server-side logs, terminal device logs, Web-side logs, and target transaction model when it is executed according to the life cycle. Among them, the log file is a data file generated by the terminal device when performing a certain action (verification processing action). That is, the terminal device can record its own operations at any time, especially operations that generate errors or exceptions can be recorded. Exemplary, transaction log files generated for online transfer transaction operations, etc. Based on this, when the terminal device executes the target transaction model according to the life cycle, a transaction log file can be generated when the target transaction model is executed, so as to locate the key information corresponding to the verification failure result.

[0072] Specifically, refer to Figure 4 The terminal device can locate the key information of the verification failure through the following sub-steps S1041-S1042, which are detailed as follows:

[0073] S1041. The terminal device determines the key information corresponding to the verification failure result as a hit item.

[0074] S1042. The terminal device locates the code corresponding to the hit item from the transaction log file.

[0075] In one embodiment, when the terminal device uses the rule engine to verify the key information, the generated transaction log file also needs to record the key information to be verified and the corresponding verification result (failed verification result or successful verification result), which has been explained in the above S103. Based on this, the terminal device can display the key information corresponding to the failed verification result in the form of "hit", that is, determine the key information corresponding to the failed verification result as a hit item. For example,

[0076] {

[0077] log.info("Hit {}, installment type: {}, whether it is local currency: {}

[0078] }

[0079] Among them, the above-mentioned "installment type" and "whether it is local currency" can be considered as the rule names of the verification rule expressions for respectively verifying a key information in the message. Based on this, in the generated transaction log file, the code generated when the key information verification fails can be displayed in the form of "hit". For the specific form, refer to the above code. Furthermore, the terminal device can identify the code corresponding to the transaction log file based on the acquired transaction log file to quickly locate the key information corresponding to the verification failure result.

[0080] It is understandable that, referring to the above example code, when locating the key information corresponding to the verification failure result, the rule name for verifying the key information can also be located at the same time. Because the rule name is associated with the corresponding verification rule expression. Therefore, when manually checking the key information corresponding to the verification failure result, the terminal device can also map a specific verification rule expression from the database based on the rule name to further assist the staff in manual inspection.

[0081] In this embodiment, the terminal device can first identify one or more key information contained in the message, and then match according to all the identified key information to determine the target transaction model from the preset multiple transaction models. Furthermore, when the terminal device uses the rule engine in the target transaction model to verify the key information according to the life cycle of the target transaction model, a transaction log file containing the verification result can be generated. In this way, the terminal device can directly identify according to the code corresponding to the transaction log file, so as to accurately locate the key information that failed the verification from the transaction log file, so as to assist the staff in manual inspection.

[0082] In one embodiment, the validation rule expression is generated in Java code; Figure 5 After determining the target transaction model matching the key information from the preset multiple transaction models in S102, the following steps S125-S126 are also included, which are described in detail as follows:

[0083] S125. The terminal device writes the key information into the verification rule expression in the target transaction model using a preset Java variable.

[0084] S126. The terminal device compiles the target transaction model. When compiling, the target transaction model is used to check key information in the verification rule expression according to the compilation principle of the Java code.

[0085] In one embodiment, before the terminal device verifies the key information according to the target transaction model, there may be an error code in the target transaction model, so that the target transaction model cannot accurately verify the key information.

[0086] Usually, in the prior art, after the code of the verification rule expression is generated, the code is directly written into a file ending with *.drl. Then, the file ending with *.drl is compiled. Finally, the terminal device calls the compiled code file to execute the corresponding verification rule expression. However, in the actual process, because the file ending with *.drl is a text type file. If there is a writing error in the variable of the key information that needs to be verified in the verification rule expression, the terminal device will not report an error when compiling the erroneous code to generate a text type compiled file. An error will only occur when the terminal device calls and executes the code in the text type compiled file. Therefore, there will be a certain delay when it is found that there is a problem with the code of the verification rule expression.

[0087] Exemplarily, when writing the variables of the key information to be verified into the verification rule expression for checking, the key information is the card number of the bank card for explanation. The terminal device can pre-define the card number as the variable cardNo. In the past, when writing variables into the code of the verification rule expression, when the code is directly written into the file ending with *.drl, even if the developer writes cardNo as cardNum by mistake, when the terminal device compiles the wrong code, it will not recognize whether the variable in the file ending with *.drl is a wrongly written variable. Afterwards, an error will only be reported when the terminal device calls and executes the compiled file of the wrong code.

[0088] However, in this embodiment, the compilation principle of the above Java code can be specifically divided into three processes, namely, parsing the source code and filling the symbol table, annotation processing of the plug-in annotation processor, and analysis and bytecode generation. Among them, the process of parsing and filling the symbol table includes two stages: lexical analysis and syntax analysis. Specifically, the lexical analysis stage is to convert the character stream of the source code (code for verifying the regular expression) into a set of tags. Among them, the tag is the smallest unit of the Java code in the compilation process, which includes but is not limited to characters in the form of variable names and operators. In the above example, the above card number is compiled as cardNo, which can be considered as a variable name in the compilation process.

[0089] Based on this, in this embodiment, Java code is used to generate the code of the verification rule expression for verifying the key information, and the key information exists in the code in the form of variables. Afterwards, for the generated verification rule expression code, the terminal device can directly check the variables of the key information contained in the verification rule expression code based on the preset variables corresponding to each key information.

[0090] It is understandable that the target transaction model is the source code developed by the developer. If the source code needs to be made into a program (executable code) that can be run on the terminal device, the target transaction model needs to go through the processes of compilation and linking. Among them, the compilation process is the process in S125-S126 above. In this embodiment, because the above-mentioned S125 step is specifically adopted to write the key information into the verification rule expression in the target transaction model with preset Java variables, the terminal device can directly identify whether the Java variables written into the target transaction model belong to the wrongly written variables according to the preset variables corresponding to each key information during the process of compiling the target transaction model. That is, there is no need to wait for the terminal device to perform the linking process on the compiled target transaction model. After generating a program that can be run, the situation that the variables of the key information in the verification rule expression are wrongly written can only be discovered when the program is run.

[0091] In one embodiment, if the verification result in S104 is a verification failure result, locating key information from a transaction log file generated when the target transaction model is executed according to the life cycle also includes:

[0092] The verification results are uploaded to the blockchain for storage.

[0093] In all embodiments of the present application, the corresponding verification result is obtained based on the terminal device. Specifically, the verification result is obtained by processing the terminal device. Uploading the verification result to the blockchain can ensure its security and fairness and transparency to the user. The user device can download the verification result from the blockchain to verify whether the verification result has been tampered with. The blockchain referred to in this example is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database. It is a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, and an application service layer.

[0094] See also Figure 6 , Figure 6 1 is a structural block diagram of a data verification device provided in an embodiment of the present application. The data verification device in this embodiment includes modules for executing Figures 1 to 5 For details, please refer to the steps in the corresponding embodiment. Figures 1 to 5 as well as Figures 1 to 5 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 6The data verification device 600 may include: an identification module 610, a target transaction model determination module 620, a processing module 630 and a positioning module 640, wherein:

[0095] The identification module 610 is used to identify key information in the message.

[0096] The target transaction model determination module 620 is used to determine a target transaction model that matches the key information from a plurality of preset transaction models.

[0097] The processing module 630 is used to verify the key information based on the life cycle of the target transaction model to obtain a verification result.

[0098] The positioning module 640 is used to locate the key information according to the transaction log file if the verification result is a verification failure result. The transaction log file is a log file generated when the target transaction model is executed according to the life cycle.

[0099] In one embodiment, the message includes a request line structure, a request header structure, a carriage return line feed structure, and a message body structure; the identification module 610 is further used to:

[0100] An area in the message that belongs to the message body structure is determined, and data in the area is determined as key information.

[0101] In one embodiment, the transaction model includes a rule engine for verifying key information; the data verification device 600 also includes:

[0102] The verification rule expression acquisition module is used to obtain the verification rule expression used to verify the key information from the database.

[0103] The mapping relationship establishment module is used to define the rule name of the verification rule expression and establish a mapping relationship between the rule name and the corresponding verification rule expression.

[0104] The data table acquisition module is used to obtain a data table containing rule names for any transaction model to be configured.

[0105] A configuration module is used to register the rule names contained in the data table into the rule engine of the transaction model to be configured so as to configure the transaction model; wherein the rule engine of the configured transaction model is used to map the verification rule expressions corresponding to the rule names according to the mapping relationship so as to verify the key information.

[0106] In one embodiment, the data verification device 600 further includes:

[0107] The key information determination module is used to determine the key information that can be verified by the transaction model according to the rule name contained in the transaction model; the number of key information includes at least one.

[0108] The association relationship establishment module is used to establish the association relationship between the transaction model and key information.

[0109] In one embodiment, the verification rule expression is generated in Java code; the data verification device 600 also includes:

[0110] The writing module is used to write key information into the verification rule expression in the target transaction model in the form of preset Java variables.

[0111] The compilation module is used to compile the target transaction model. When compiling, the target transaction model is used to check the key information in the verification rule expression according to the compilation principle of Java code.

[0112] In one embodiment, the positioning module 640 is further configured to:

[0113] The key information corresponding to the verification failure result is determined as a hit item; and the code corresponding to the hit item is located from the code corresponding to the transaction log file.

[0114] In one embodiment, the data verification device 600 further includes:

[0115] The upload module is used to upload the verification results to the blockchain for storage.

[0116] When it is understood that Figure 6 In the structural block diagram of the data verification device shown in FIG. Figures 1 to 5 The steps in the corresponding embodiments, and for Figures 1 to 5 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figures 1 to 5 as well as Figures 1 to 5 The relevant descriptions in the corresponding embodiments are not repeated here.

[0117] Figure 7 1 is a block diagram of a terminal device provided by an embodiment of the present application. Figure 7 As shown, the terminal device 700 of this embodiment includes: a processor 710, a memory 720, and a computer program 730 stored in the memory 720 and executable on the processor 710, such as a program of the data verification method. When the processor 710 executes the computer program 730, the steps in each embodiment of the above-mentioned data verification method are implemented, such as Figure 1 Alternatively, the processor 710 implements the above when executing the computer program 730 Figure 6 The functions of each module in the corresponding embodiment are, for example, Figure 6 For details on the functions of modules 610 to 640, please refer to Figure 6 Related description in the corresponding embodiment.

[0118] Exemplarily, the computer program 730 may be divided into one or more modules, one or more modules are stored in the memory 720, and are executed by the processor 710 to implement the data verification method provided in the embodiment of the present application. One or more modules may be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 730 in the terminal device 700. For example, the computer program 730 may implement the data verification method provided in the embodiment of the present application.

[0119] The terminal device 700 may include, but is not limited to, a processor 710 and a memory 720. Those skilled in the art will appreciate that Figure 6 It is only an example of the terminal device 700 and does not constitute a limitation of the terminal device 700. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0120] The processor 710 may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0121] The memory 720 may be an internal storage unit of the terminal device 700, such as a hard disk or memory of the terminal device 700. The memory 720 may also be an external storage device of the terminal device 700, such as a plug-in hard disk, a smart memory card, a flash memory card, etc. equipped on the terminal device 700. Furthermore, the memory 720 may also include both an internal storage unit of the terminal device 700 and an external storage device.

[0122] An embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the data verification method described in the above embodiments is implemented.

[0123] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the data verification method as in the above-mentioned embodiments is implemented.

[0124] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device executes the data verification method in the above-mentioned embodiments.

[0125] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A data verification method, characterized in that: include: Identify key information in the message, where the key information is information carried in an area of ​​a message body structure of the message; Determining a target transaction model matching the key information from a plurality of preset transaction models; Based on the life cycle of the target transaction model, verify the key information to obtain a verification result; If the verification result is a verification failure result, locating the key information according to a transaction log file, wherein the transaction log file is a log file generated when the target transaction model is executed according to the life cycle; Wherein, if the verification result is a verification failure result, locating the key information according to the transaction log file includes: Determine the key information corresponding to the verification failure result as a hit item; Locate the code corresponding to the hit item and the name of the verification rule corresponding to the key information from the code corresponding to the transaction log file; The transaction model includes a rule engine for verifying the key information; before determining a target transaction model matching the key information from the preset multiple transaction models, the process further includes: Acquire a verification rule expression for verifying the key information from a database; Defining a rule name for the verification rule expression, and establishing a mapping relationship between the rule name and the corresponding verification rule expression; For any transaction model to be configured, obtain a data table containing the rule name; The rule names contained in the data table are registered in the rule engine of the transaction model to be configured, so as to configure the transaction model.

2. The data verification method according to claim 1, characterized in that: The message includes a request line structure, a request header structure, a carriage return line feed structure and a message body structure; the key information in the identification message includes: An area in the message belonging to the message body structure is determined, and data in the area is determined as the key information.

3. The data verification method according to claim 1, characterized in that: The configured rule engine of the transaction model is used to map out a verification rule expression corresponding to the rule name according to the mapping relationship to verify the key information.

4. The data verification method according to claim 3, characterized in that: After registering the rule name contained in the data table into the rule engine of the transaction model to be configured to configure the transaction model, the method further includes: Determine, according to the rule name included in the transaction model, key information that can be verified by the transaction model; the number of the key information includes at least one; An association relationship between the transaction model and the key information is established.

5. The data verification method according to claim 3, characterized in that: The verification rule expression is generated in Java code; After determining the target transaction model matching the key information from the preset multiple transaction models, the method further includes: Writing the key information into the verification rule expression in the target transaction model as a preset Java variable; The target transaction model is compiled. When the target transaction model is compiled, it is used to check the key information in the verification rule expression according to the compilation principle of the Java code.

6. The data verification method according to any one of claims 1 to 5, characterized in that: If the verification result is a verification failure result, after locating the key information according to the transaction log file, the method further includes: The verification result is uploaded to the blockchain for storage.

7. A data verification device, characterized in that: include: An identification module, used to identify key information in a message, wherein the key information is information carried in an area of ​​a message body structure of the message; A target transaction model determination module, used to determine a target transaction model matching the key information from a plurality of preset transaction models; A processing module, used for verifying the key information based on the life cycle of the target transaction model to obtain a verification result; a positioning module, configured to locate the key information according to a transaction log file if the verification result is a verification failure result, wherein the transaction log file is a log file generated when the target transaction model is executed according to the life cycle; The positioning module is also used to: determine the key information corresponding to the verification failure result as a hit item; locate the code corresponding to the hit item and the name of the verification rule corresponding to the key information from the code corresponding to the transaction log file; The transaction model includes a rule engine for verifying the key information; The data verification device further includes: A verification rule expression acquisition module is used to obtain a verification rule expression for verifying key information from a database; A mapping relationship establishment module is used to define the rule name of the verification rule expression and establish a mapping relationship between the rule name and the corresponding verification rule expression; A data table acquisition module is used to acquire a data table containing rule names for any transaction model to be configured; The configuration module is used to register the rule names contained in the data table into the rule engine of the transaction model to be configured, so as to configure the transaction model.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and device for verifying interface packet

    CN109510824A

  • Page data verification method and device based on decision tree

    CN111562965A

  • Credit investigation data processing method, system and equipment and computer readable storage medium

    CN112785411A