Data checking method and device, electronic equipment and storage medium

By generating standardized verification data based on the checklist, using database verification templates to check data, the data verification difficulty and security issues in distributed architecture are solved, and efficient and secure data verification results are achieved.

CN120218042APending Publication Date: 2025-06-27CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510378429.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In distributed architecture, it is difficult for the prior art to perform data verification efficiently and securely, especially in terms of distributed transaction data consistency, which poses data security risks and complex script development difficulties.

Method used

By determining the standardized verification data based on the entry information of the checklist, the database verification template is used to generate target verification information, and then checking the verification data source. This method does not require complex code or script development, reduces the difficulty of checking, and limits configurable checking logic by designing checklist options, thereby improving data security.

Benefits of technology

It realizes efficient and secure data verification, reduces the difficulty of verification and data security risks, and improves verification efficiency and data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218042A_ABST
    Figure CN120218042A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data checking method and device, electronic equipment and a storage medium, and the method comprises the steps: determining standardized checking data based on the input information of a checking table; wherein the check table comprises a plurality of selection boxes, and options in the selection boxes are generated after structured processing is carried out on a data source to be checked; the input information comprises a target data identifier and a target checking condition; based on the standardized check data, filling a database check template to obtain target check information; and based on the target checking information, checking the to-be-checked data source corresponding to the target data identifier. According to the embodiment, complicated code or script development is not needed, the checking difficulty is reduced, and the checking efficiency is improved; besides, by designing options of the check table and limiting configurable check logic, risks caused by uncontrollable check logic and uncontrollable access data are eliminated or reduced, and data check is performed efficiently and safely.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of Internet technologies, and in particular, to a data verification method, apparatus, electronic device, and storage medium. Background Art

[0002] With the development of the Internet, the software architecture has been upgraded from a monolithic architecture to a distributed architecture. For example, a shopping software splits its back-end services into independent services such as payment, order, product, store, marketing, and supply chain, and deploys them in clusters; an operator splits its services into a management console service and network element services in a nationwide pool, and the management console and the services in the pool are distributed and clustered.

[0003] In a distributed architecture, each service evolves independently; the platform as a whole can carry a larger amount of traffic; and the team boundaries are clearer in terms of management. However, it also brings data consistency issues in distributed transactions, and data verification needs to be performed in a timely manner.

[0004] In related technologies, by writing the verification logic into a verification script, a timed task or a change log file (binlog) is used to construct a message to trigger the execution of the verification script.

[0005] However, script development is difficult, and the implementation logic cannot be controlled, resulting in data security risks. Summary of the Invention

[0006] Embodiments of the present application provide a data verification method, apparatus, electronic device, and storage medium for performing data verification efficiently and securely.

[0007] In a first aspect, embodiments of the present application provide a first data verification method, which includes: Determining standardized verification data based on the input information in a verification form; wherein, the verification form includes a plurality of selection boxes, and the options in the selection boxes are generated after structuring the data sources to be verified; the input information includes a target data identifier and a target verification condition; Filling a database verification template based on the standardized verification data to obtain target verification information; Verifying the data source to be verified corresponding to the target data identifier based on the target verification information.

[0008] In some optional embodiments, before determining the standardized verification data based on the input information in the verification form, it further includes: Structuring each data source to be verified to generate an identifier corresponding to each data source to be verified and an access table; wherein, the access table includes a plurality of fields and parameters corresponding to each field; Display a verification form including a first quantity of identification selection boxes and a second quantity of verification condition selection boxes; wherein, the options of any identification selection box include the identifications corresponding to some or all of the data sources to be verified; any verification condition selection box includes a first field selection box, an operator selection box, and a target selection box; the target selection box is a second field selection box or an input box; the options of the first field selection box and the second field selection box include the fields in the access table; the options of the operator selection box include multiple preset operators; Determine the target data identification in response to a selection instruction for the identification selection box; and determine the target verification condition in response to a selection instruction for the verification condition selection box.

[0009] In some optional embodiments, some or all of the verification condition selection boxes further include an aggregation function selection box; the options of the aggregation function selection box include multiple preset aggregation functions.

[0010] In some optional embodiments, determining the standardized verification data based on the input information in the verification form includes: Generate a table block in the standardized verification data based on the target data identification; and generate a query block in the standardized verification data based on the target data identification and the target verification condition.

[0011] In some optional embodiments, filling the database verification template based on the standardized verification data to obtain the target verification information includes: Determine the target filling parameters of the database verification template based on the standardized verification data and the access table corresponding to the target data identification; Fill the database verification template based on the target filling parameters to obtain the target verification information.

[0012] In some optional embodiments, if there are parameters input through the input box in the standardized verification data, before determining the target filling parameters of the database verification template, it further includes: Perform anti-injection processing on the parameters input through the input box.

[0013] In some optional embodiments, after verifying the data source to be verified corresponding to the target data identification based on the target verification information, it further includes: If the verification of the fields in the data source to be verified fails, notify through a preset notification method.

[0014] In a second aspect, an embodiment of the present application provides a first data verification device, and the device includes: A conversion module for determining standardized verification data based on the input information in the checklist; wherein, the checklist includes a plurality of selection boxes, and the options in the selection boxes are generated after structuring the data source to be verified; the input information includes a target data identifier and a target verification condition; The conversion module is further configured to fill a database verification template based on the standardized verification data to obtain target verification information; A verification module for verifying the data source to be verified corresponding to the target data identifier based on the target verification information.

[0015] In some alternative embodiments, a structuring module is further included for: Structuring each data source to be verified to generate an identifier corresponding to each data source to be verified and an access table; wherein, the access table includes a plurality of fields and parameters corresponding to each field; A table setting module for: Displaying a checklist including a first number of identifier selection boxes and a second number of verification condition selection boxes; wherein, the options of any one identifier selection box include some or all of the identifiers corresponding to the data sources to be verified; any one verification condition selection box includes a first field selection box, an operator selection box, and a target selection box; the target selection box is a second field selection box or an input box; the options of the first field selection box and the second field selection box include the fields in the access table; the options of the operator selection box include a plurality of preset operators; Determining the target data identifier in response to a selection instruction for the identifier selection box; and determining the target verification condition in response to a selection instruction for the verification condition selection box.

[0016] In some alternative embodiments, some or all of the verification condition selection boxes further include an aggregation function selection box; the options of the aggregation function selection box include a plurality of preset aggregation functions.

[0017] In some alternative embodiments, the conversion module is specifically configured to: Generating a table block in the standardized verification data based on the target data identifier; and generating a query block in the standardized verification data based on the target data identifier and the target verification condition.

[0018] In some alternative embodiments, the conversion module is specifically configured to: Determining target filling parameters of the database verification template based on the standardized verification data and the access table corresponding to the target data identifier; Filling the database verification template based on the target filling parameters to obtain the target verification information.

[0019] In some alternative embodiments, if there are parameters entered through an input box in the standardized verification data, before determining the target filling parameters of the database verification template, the conversion module is further configured to: Perform anti-injection processing on the parameters entered through the input box.

[0020] In some alternative embodiments, after verifying the data source to be verified corresponding to the target data identifier based on the target verification information, the verification module is further configured to: If the verification of the fields in the data source to be verified fails, notify through a preset notification method.

[0021] In a third aspect, an embodiment of the present application provides an electronic device, including at least one processor and at least one memory. Among them, the memory stores a computer program, and when the program is executed by the processor, the processor is caused to execute the data verification method according to any one of the first aspects above.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, the processor is caused to execute the data verification method according to any one of the first aspects above.

[0023] In this embodiment, by performing structured processing on the data source to be verified to generate a verification table, only table information entry is required. Based on the entry information of the verification table, standardized verification data (logical language) that can be recognized by a machine is generated; furthermore, based on the standardized verification data, the target verification information required for the final verification is generated to verify the data source to be verified. There is no need for complex code or script development, reducing the verification difficulty and improving the verification efficiency; in addition, by designing the options of the verification table, the configurable verification logic is restricted, thereby eliminating or reducing the risks brought by uncontrollable verification logic and uncontrollable access data, so as to perform data verification efficiently and safely. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0025] Figure 1 It is the first system architecture diagram provided by the embodiment of the present application; Figure 2 It is the second system architecture diagram provided by the embodiment of the present application; Figure 3This is the third system architecture diagram provided by the embodiments of the present application; Figure 4 This is a schematic flowchart of the first data verification method provided by the embodiments of the present application; Figure 5 This is a schematic flowchart of the second data verification method provided by the embodiments of the present application; Figure 6 This is the first verification schematic diagram provided by the embodiments of the present application; Figure 7 This is the second verification schematic diagram provided by the embodiments of the present application; Figure 8 This is a schematic structural diagram of the data verification device provided by the embodiments of the present application; Figure 9 This is a schematic structural diagram of the electronic device provided by the embodiments of the present application. Detailed implementation manners

[0026] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0027] The terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, unless otherwise stated, the meaning of "a plurality" is two or more.

[0028] In the description of the present application, it should be noted that unless otherwise clearly defined and limited, the term "connection" should be understood in a broad sense. For example, it may be directly connected, or indirectly connected through an intermediate medium, and it may be the internal connection of two devices. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to specific circumstances.

[0029] With the development of the Internet, the software architecture has been upgraded from a monolithic architecture to a distributed architecture. For example, a shopping software splits its backend services into independent services such as payment, order, product, store, marketing, and supply chain and deploys them in clusters; an operator splits its services into a management console service and network element services in a nationwide pool, and the management console and the services in the pool are deployed in a distributed cluster.

[0030] Independent technological evolution of each business in a distributed architecture; the platform as a whole can carry a larger amount of traffic; the team boundaries are clearer in terms of management. However, it also brings about data consistency in distributed transactions, and data verification needs to be carried out in a timely manner.

[0031] In related technologies, the verification logic is written as a verification script, and verification is carried out by executing the verification script.

[0032] Refer to Figure 1 As shown, in some embodiments, the execution of the verification script is triggered by changing the binlog to construct a message; refer to Figure 2 As shown, in some embodiments, the execution of the verification script is triggered by using a scheduled task.

[0033] However, the script development is difficult, and the verification efficiency is low; moreover, the implementation logic cannot be controlled, and there are data security risks. For example, the script can access any business data, there are data security risks, and the script can use any business interface, affecting business stability.

[0034] In view of this, the embodiments of the present application propose a data verification method, device, electronic device, and storage medium to perform data verification efficiently and securely.

[0035] Refer to Figure 3 As shown, a data verification system is provided with an electronic device, a data collector, and a bypass of a data storage engine; The electronic device obtains the data source to be verified (such as the data with changes) through the data collector. Exemplarily, the collector uses data change capture (FlinkCDC) to disguise as a slave of the mysql (relational database management system) to synchronize its binlog changes. At the same time, the data is stored in the bypass data storage engine; a data change message is constructed, that is, the table name, table record fields, and field values are parsed from the binlog as the message body to send the change message for triggering the execution of the structured query language (SQL).

[0036] The electronic device determines the standardized verification data based on the input information in the verification table; wherein, the verification table includes a plurality of selection boxes, and the options in the selection boxes are generated after structuring the data source to be verified; the input information includes the target data identifier and the target verification condition; based on the standardized verification data, the database verification template is filled to obtain the target verification information; based on the target verification information, the data source to be verified corresponding to the target data identifier is verified.

[0037] By setting up a bypass of the data storage engine for storing verification data, the business system mysql data is not directly used for verification.

[0038] The above Figure 3This is only an exemplary description of the data verification system, and this embodiment is not limited thereto.

[0039] The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below in conjunction with the accompanying drawings and specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0040] Figure 4 It is a schematic flowchart of the first data verification method provided by the embodiment of the present application, as Figure 4 shown, including the following steps: Step S401: Determine the standardized verification data based on the input information in the verification form.

[0041] Among them, the verification form includes a plurality of selection boxes, and the options in the selection boxes are generated after structuring the data source to be verified; the input information includes the target data identifier and the target verification condition.

[0042] By structuring the data source to be verified to generate a verification form, only the form information needs to be entered, and based on the input information in the verification form, machine-recognizable standardized verification data (logical language), such as JSON data, is generated.

[0043] There is no need for complex code or script development, which reduces the verification difficulty and improves the verification efficiency; in addition, by designing the options in the verification form, the configurable verification logic is restricted, thereby eliminating or reducing the risks brought by uncontrollable verification logic and uncontrollable access data, so as to perform data verification efficiently and safely.

[0044] Step S402: Fill the database verification template based on the standardized verification data to obtain the target verification information.

[0045] In implementation, after generating the standardized verification data, it is necessary to convert it into the target verification information (verification SQL) required for the final verification.

[0046] Step S403: Verify the data source to be verified corresponding to the target data identifier based on the target verification information.

[0047] In this embodiment, based on the target verification information, it is determined whether the data source to be verified corresponding to the target data identifier is hit, so as to realize the verification of the data source to be verified.

[0048] In implementation, when the relevant fields in the data source to be verified change, the verification will be triggered and executed.

[0049] In the above solution, a verification form is generated after structuring the data source to be verified. Only table information entry is required. Based on the entered information in the verification form, machine-readable standardized verification data (logical language) is generated. Furthermore, based on the standardized verification data, the target verification information required for the final verification is generated to verify the data source to be verified. There is no need for complex code or script development, which reduces the verification difficulty and improves the verification efficiency. In addition, by designing the options of the verification form, the configurable verification logic is restricted, thereby eliminating or reducing the risks brought by uncontrollable verification logic and uncontrollable access data, so as to perform data verification efficiently and securely.

[0050] Figure 5 FIG. is a schematic flowchart of a second data verification method provided by an embodiment of the present application. As Figure 5 shown, it includes the following steps: Step S501: Structurally process each data source to be verified to generate an identifier corresponding to each data source to be verified and an access table.

[0051] Among them, the access table contains multiple fields and parameters corresponding to each field.

[0052] In implementation, data sources are generated by transaction participants in a distributed architecture; by collecting the data sources, multiple data sources to be verified are obtained.

[0053] Taking the data source CREATE TABLE xxx_order_table (

[0054] order_id bigint NOT NULL COMMENT 'Primary key ID', user_id varchar(256) NOT NULL COMMENT 'User ID', money_amount decimal(10,2) NOT NULL COMMENT 'Amount', main_order_id bigint NOT NULL COMMENT 'Main order ID', status varchar(64) NOT NULL COMMENT 'Order' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci as an example, the structural processing process will be described below.

[0055] By replacing the line break characters with delimiters, multiple consecutive delimiters are uniformly retained as 1 delimiter; the delimiters at the beginning and end are deleted; Locate the position of the keyword "create table", move one space backward to obtain the starting position ps0 of the table name, then find the position of the next space, and move one position forward to get the ending position ps1 of the table name; the range between ps0 and ps1 (including ps0 and ps1) is the table name "xxx_order_table". Move backward from the first "(" keyword to obtain the starting position ps2 of the first field name, then find the position of the next space, and move one position forward to get the ending position ps3 of this field name; the range between ps2 and ps3 (including ps2 and ps3) is the field name "order_id"; similarly, obtain the type "bigint" of this field. Use the same method to obtain other field names and types.

[0056] Use the database name order_db and the table name order_db.xxx_order_table as the identifier representing the data source to be verified. Obtain the fields and their types included in the access table. The result is in JSON format, and the structured format is designed as follows: { "dbName": "order_db", "tableName": "xxx_order_table", "columns": [{ "name": "order_id", "type": "bigint", "comment": "Primary key ID" }, { "name": "user_id", "type": "varchar(256)", "comment": "User ID" }, { "name": "money_amount", "type": "decimal(10,2)", "comment": "Amount" }, { "name": "main_order_id", "type": "bigint", "comment": "Main order ID" }, { "name": "status", "type": "varchar(64)", "comment": "Order status" }] }。

[0057] The above data sources to be verified, their identifiers, and the corresponding access tables are only exemplary illustrations. For example, other information can be used as the identifier (when only one database is involved, the table name can be directly used as the identifier).

[0058] Step S502: Display a verification table that includes an identifier selection box with a first quantity and a verification condition selection box with a second quantity.

[0059] Among them, the options of any identifier selection box include some or all of the identifiers corresponding to the data sources to be verified; any verification condition selection box includes a first field selection box, an operator selection box, and a target selection box; the target selection box is a second field selection box or an input box; the options of the first field selection box and the second field selection box include the fields in the access table; the options of the operator selection box include multiple preset operators.

[0060] In implementation, after structuring the data sources to be verified, display the corresponding verification table.

[0061] Refer to Figure 6 and Figure 7 As shown, the verification table includes an identifier selection area and a condition selection area; The identifier selection area contains an identifier selection box with a first quantity, that is, it is possible to select the identifiers of one or more data sources to be verified; the options of each identifier selection box include some or all of the identifiers corresponding to the data sources to be verified. As described above, in some embodiments, the database name and the table name are used as identifiers, and each identifier selection box can be set with two levels of options. The first-level option is the database name, and the second-level option is the table name under each database name.

[0062] Figure 6 Taking 1 identifier selection box as an example, the selected identifier is the order table "xxx_order_table" in the "order_db" database; Figure 7 Taking 2 identifier selection boxes as an example, the selected identifiers are the order table "xxx_order_table" in the "order_db" database and the order table "xxx_express_table" in the "express_db" database.

[0063] During implementation, even if multiple identification selection boxes are set, the user can still only select options for some of the identification selection boxes, triggering a selection instruction for some of the identification selection boxes.

[0064] The conditional selection area contains a second number of verification condition selection boxes. Each verification condition selection box includes at least a first field selection box, an operator selection box, and a target selection box. The first field selection box is the left value (left), and the target selection box is the right value (right). The target selection box can be a second field selection box or an input box. The options of the first field selection box and the second field selection box include fields in the access table; the options of the operator selection box include multiple preset operators. The preset operators in this embodiment are not specifically limited. For example, they include some or all of the comparison operators (=,!=, >, <, >=, <=), assignment operators (=), arithmetic operators (+, -, , / ), and logical operators (AND, or).

[0065] Refer to Figure 6 As shown, two verification condition selection boxes are set. The first verification condition selection box includes a first field selection box ( Figure 6 in which order.money_amount is selected), an operator selection box ( Figure 6 in which < is selected), and an input box ( Figure 6 in which the input is 0), and also includes an aggregation function selection box ( Figure 6 taking sum as an example); The second verification condition selection box includes a first field selection box ( Figure 6 in which order.orderId is selected), an operator selection box ( Figure 6 in which = is selected), and a second field selection box ( Figure 6 in which $order.orderId is selected).

[0066] Refer to Figure 7 As shown, three verification condition selection boxes are set. The first verification condition selection box includes a first field selection box ( Figure 7 in which order.userId is selected), an operator selection box ( Figure 7 in which = is selected), and a second field selection box ( Figure 7 in which express.userId is selected); The second verification condition selection box includes a first field selection box ( Figure 7 in which order.status is selected), an operator selection box ( Figure 7 in which!= is selected), and a second field selection box ( Figure 7 in which express.status is selected); Article 3 The verification condition selection box includes a first field selection box ( Figure 7 in which order.orderId is selected), an operator selection box ( Figure 7 in which = is selected), and a second field selection box ( Figure 7 in which $order.orderId is selected).

[0067] The above Figure 6 and Figure 7 are only exemplary descriptions of the verification form, and other formats of verification forms can be set during implementation.

[0068] Step S503: Determine the target data identifier in response to a selection instruction for the identifier selection box; and, determine the target verification condition in response to a selection instruction for the verification condition selection box.

[0069] During implementation, after the verification form is displayed, the user makes option selections in the selection box, triggering a selection instruction, thereby generating input information.

[0070] Exemplarily, the user makes selections for options in some or all of the identifier selection boxes, triggering a selection instruction to generate a target data identifier; the user makes selections for options in some or all of the verification condition selection boxes. Some verification condition selection boxes include input boxes where the user needs to input relevant information (such as numbers, letters, or a combination of both), thereby triggering a selection instruction to generate a target verification condition.

[0071] Step S504: Determine the standardized verification data based on the input information in the verification form.

[0072] Step S505: Fill the database verification template based on the standardized verification data to obtain the target verification information; Step S506: Verify the data source to be verified corresponding to the target data identifier based on the target verification information.

[0073] The specific implementation manners of steps S504 to S506 can refer to other embodiments and will not be elaborated here.

[0074] In the above solution, by performing structured processing on each data source to be verified, the identifier corresponding to each data source to be verified and the access table are generated; then, the identifier is used as an option in the identifier selection box, and the relevant information of the access table is used as an option in the verification condition selection box; through option settings, the verification logic and data access are controlled, reducing technical risks such as data security and service stability brought by verification. The user can generate input information by making option selections, making the verification more convenient.

[0075] In some alternative embodiments, some or all of the check condition selection boxes further include an aggregation function selection box; the options of the aggregation function selection box include a plurality of preset aggregation functions.

[0076] Refer to the above Figure 6 As shown, some condition selections require the use of aggregation functions, such as restricting the result after summing (sum), maximum value (max), minimum value (min), or average value (avg) of a certain field; Based on this, in this embodiment, an aggregation function selection box is set for some or all of the check condition selection boxes, and the options of the aggregation function selection box include a plurality of preset aggregation functions, such as sum, max, min, avg, and total count (count), etc.

[0077] In some alternative embodiments, the above step S401 can be implemented by, but not limited to, the following methods: Generate a table block in the standardized verification data based on the target data identifier; and generate a query block in the standardized verification data based on the target data identifier and the target verification condition.

[0078] Exemplarily, the input information includes two parts, the target data identifier and the target verification condition, corresponding to the table block (tablesBlock) and the query block queryBlock in the standardized JSON data format respectively.

[0079] tablesBlock is an array and can correspond to multiple library (database) tables (access tables); it indicates that the verification is a multi-table association query; it includes the libraries and tables selected by the user.

[0080] queryBlock is an array and can have multiple query conditions.

[0081] Taking the above Figure 6 as an example, if the user selects a single table, according to the above conversion method, the corresponding standardized JSON data format is: { "tablesBlock": [{ "dbName": "order_db", "tableName": "xxx_order_table" }], "queryBlock": [{ "left": { "dbName": "order_db", "tableName": "xxx_order_table", "fieldName": "main_order_id", "aggre": "", }, "right": { "value": "$main_order_id" }, "operate": "=" }, { "left": { "dbName": "order_db", "tableName": "xxx_order_table", "fieldName": "money_amount", "aggre": "SUM" }, "right": { "value": "0" }, "operate": "<" } } Taking the above as an example, Figure 7 when the user selects two tables (the same order_id order table and logistics table), according to the above conversion method, the corresponding standardized JSON data format is as follows: { "tablesBlock": [{ "dbName": "order_db", "tableName": "xxx_order_table" }, { "dbName": "express_db", "tableName": "xxx_express_table" }], "queryBlock": [{ "left": { "dbName": "order_db", "tableName": "xxx_order_table", ​"fieldName": "order_id", "aggre": "", }, "right": { "value": "$order_id" }, "operate": "=" }, { "left": { "dbName": "express_db", "tableName": "xxx_express_table", "fieldName": "order_id", "aggre": "", }, "right": { "value": "$order_id" }, "operate": "=" }, { "left": { "dbName": "order_db", "tableName": "xxx_order_table", "fieldName": "user_id", "aggre": "", }, "right": { "dbName": "express_db", "tableName": "xxx_express_table", "fieldName": "user_id", "aggre": "", }, "operate": "=" }, { "left": { "dbName": "order_db", "tableName": "xxx_order_table", "fieldName": "status", "aggre": "", }, "right": { "dbName": "express_db", "tableName": "xxx_express_table", "fieldName": "status", "aggre": "", }, "operate": "!=", } } The above two pieces of standardized verification data are only for illustrative purposes. In implementation, different standardized verification data will be generated according to different identifiers and target verification conditions.

[0082] In some alternative implementation manners, the above step S402 can be implemented by, but not limited to, the following methods: Determine the target filling parameters of the database verification template based on the standardized verification data and the access table corresponding to the target data identifier; Fill the database verification template based on the target filling parameters to obtain the target verification information.

[0083] In implementation, by constructing a general SQL template, parameter filling can be performed. Exemplarily, the SQL template includes parts such as select

field

database.table

query condition

field

database.table

query condition

[0084] This embodiment determines the target filling parameters of the database verification template based on the standardized verification data and the access table corresponding to the target data identifier.

[0085] Taking the above SQL template as an example, the

database.table

field

query condition

[0086] Taking the parameters input through the input box as an example: { ​"left": { "dbName": "order_db", "tableName": "xxx_order_table", "fieldName": "main_order_id", "aggre": "", }, "right": { "value": "$main_order_id" }, "operate": "=", } Convert to left dbName.tableName.filedName operate rightdbName.tableName.filedName; Now take left and convert it to order_db.xxx_order_table.main_order_id; Take right and convert it to '$main_order_id'; Finally, take operate and concatenate it as left operate right; order_db.xxx_order_table.main_order_id = '$main_order_id'.

[0087] Take the parameter selected by the aggregation function selection box as an example: { "left": { "dbName": "order_db", "tableName": "xxx_order_table", "fieldName": "money_amount", "aggre": "SUM", }, "right": { "value": "0" }, "operate": "<", } Convert to HAVING aggre(dbName.tableName) operate right; Now take left and convert it to having aggre(order_db.xxx_order_table.amount); Take right and convert it to 0; Finally, take operate and convert it to aggre(order_db.xxx_order_table.amount) < 0.

[0088] During implementation, after determining the target filling parameters, check the template through the filling database to obtain the target verification information required for the final verification.

[0089] Taking the above Figure 6 as an example, the corresponding target verification information is: select order_id,user_id,main_order_id, money_amount,status from order_db.xxx_order_table where order_db.xxx_order_table.main_order_id = ’$main_order_id’ having aggre(order_db.xxx_order_table.amount); Taking the above Figure 7 as an example, the corresponding target verification information is: select a.order_id,a.user_id,a.main_order_id, a.money_amount,status, b.status,b.address,b.user_id,b.order_id form order_db.xxx_order_table a, express_db.xxx_express_table b where a.order_id=b.order.order_id and a.user_id=b.user_id and a.order_id=$order_id and a.user_id = $user_id and a.status != b.status。

[0090] In some optional embodiments, if there are parameters entered through the input box in the standardized verification data, before determining the target filling parameters of the database verification template, the following steps are further performed: Perform anti-injection processing on the parameters entered through the input box.

[0091] As described above, in some embodiments, the verification condition selection box has an input box. At this time, the user will enter some information, and the entered information may not meet the standards. It is necessary to perform anti-injection processing on the parameters entered through the input box.

[0092] This embodiment does not limit the specific implementation manner of anti-injection processing. For example, perform special character processing to make the processed information letters or numbers; perform special value processing, and it cannot contain common SQL keywords such as SELECT, INSERT, DELETE, UPDATE, DROP, UNION, etc.

[0093] In some optional embodiments, after step S403, the following steps are further performed: If the field verification in the data source to be verified fails, notify through a preset notification method.

[0094] In implementation, when there is data returned in the verification SQL execution, it indicates that the field verification in the data source to be verified fails, that is, the accounts are not balanced, and notify through a preset notification method to inform relevant personnel.

[0095] This embodiment does not specifically limit the preset notification method. For example, notify the identifier of the data source to be verified and the failed verification field through text message or email.

[0096] As Figure 8 shown, an embodiment of the present application provides a data verification device 800, and the device includes: A conversion module 801, configured to determine standardized verification data based on the input information in the verification form; wherein, the verification form includes multiple selection boxes, and the options in the selection boxes are generated after structuring the data source to be verified; the input information includes a target data identifier and a target verification condition; The conversion module 801 is further configured to fill the database verification template based on the standardized verification data to obtain target verification information; The verification module 802 is used to verify the data source to be verified corresponding to the target data identifier based on the target verification information.

[0097] In some optional embodiments, it further includes a structuring module 803 for: Structuring each data source to be verified to generate an identifier corresponding to each data source to be verified and an access table; wherein, the access table includes multiple fields and parameters corresponding to each field; The table setting module 804 is used for: Displaying a verification table including a first number of identifier selection boxes and a second number of verification condition selection boxes; wherein, the options of any identifier selection box include the identifiers corresponding to some or all of the data sources to be verified; any verification condition selection box includes a first field selection box, an operator selection box, and a target selection box; the target selection box is a second field selection box or an input box; the options of the first field selection box and the second field selection box include the fields in the access table; the options of the operator selection box include multiple preset operators; Determining the target data identifier in response to a selection instruction for the identifier selection box; and determining the target verification condition in response to a selection instruction for the verification condition selection box.

[0098] In some optional embodiments, some or all of the verification condition selection boxes further include an aggregation function selection box; the options of the aggregation function selection box include multiple preset aggregation functions.

[0099] In some optional embodiments, the conversion module 801 is specifically used for: Generating a table block in the standardized verification data based on the target data identifier; and generating a query block in the standardized verification data based on the target data identifier and the target verification condition.

[0100] In some optional embodiments, the conversion module 801 is specifically used for: Determining target filling parameters of the database verification template based on the standardized verification data and the access table corresponding to the target data identifier; Filling the database verification template with the target filling parameters to obtain the target verification information.

[0101] In some optional embodiments, if there are parameters input through the input box in the standardized verification data, before determining the target filling parameters of the database verification template, the conversion module 801 is further used for: Performing anti-injection processing on the parameters input through the input box.

[0102] In some alternative embodiments, after checking the data source to be checked corresponding to the target data identifier based on the target verification information, the checking module 802 is further configured to: If the field check in the data source to be checked fails, notify through a preset notification method.

[0103] Since this device is the device in the method of the embodiments of the present application, and the principle of the device to solve the problem is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be elaborated.

[0104] Based on the same technical concept, the embodiments of the present application further provide an electronic device 900, as Figure 9 shown, including at least one processor 901 and a memory 902 connected to the at least one processor. In the embodiments of the present application, the specific connection medium between the processor 901 and the memory 902 is not limited. Figure 9 Taking the example that the processor 901 and the memory 902 are connected through a bus 903. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 9 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0105] Among them, the processor 901 is the control center of the electronic device, and can connect various parts of the electronic device through various interfaces and lines. By running or executing the instructions stored in the memory 902 and calling the data stored in the memory 902, data processing can be realized. Optionally, the processor 901 may include one or more processing units. The processor 901 may integrate an application processor and a modulation and demodulation processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modulation and demodulation processor mainly processes the issued instructions. It can be understood that the above modulation and demodulation processor may not be integrated into the processor 901. In some embodiments, the processor 901 and the memory 902 may be implemented on the same chip, and in some embodiments, they may also be separately implemented on independent chips.

[0106] The processor 901 may be a general-purpose processor, such as a CPU, a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, and may implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the data verification method embodiment may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0107] The memory 902, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 902 may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, and so on. The memory 902 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 902 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0108] In the embodiments of the present application, the memory 902 stores a computer program, and when the program is executed by the processor 901, the processor 901 is caused to execute: Based on the input information in the checklist, determine the standardized verification data; wherein, the checklist includes a plurality of selection boxes, and the options in the selection boxes are generated after structuring the data source to be verified; the input information includes a target data identifier and a target verification condition; Based on the standardized verification data, fill in the database verification template to obtain the target verification information; Based on the target verification information, verify the data source to be verified corresponding to the target data identifier.

[0109] In some optional embodiments, before determining the standardized verification data based on the checklist entry information, the processor 901 further performs: Structurally process each data source to be verified, generate an identifier corresponding to each data source to be verified and an access table; wherein, the access table includes multiple fields and parameters corresponding to each field; Display a verification checklist including a first number of identifier selection boxes and a second number of verification condition selection boxes; wherein, the options of any identifier selection box include the identifiers corresponding to some or all of the data sources to be verified; any verification condition selection box includes a first field selection box, an operator selection box, and a target selection box; the target selection box is a second field selection box or an input box; the options of the first field selection box and the second field selection box include the fields in the access table; the options of the operator selection box include multiple preset operators; Determine the target data identifier in response to a selection instruction for the identifier selection box; and determine the target verification condition in response to a selection instruction for the verification condition selection box.

[0110] In some optional embodiments, some or all of the verification condition selection boxes further include an aggregation function selection box; the options of the aggregation function selection box include multiple preset aggregation functions.

[0111] In some optional embodiments, the processor 901 specifically performs: Generate a table block in the standardized verification data based on the target data identifier; and generate a query block in the standardized verification data based on the target data identifier and the target verification condition.

[0112] In some optional embodiments, the processor 901 specifically performs: Determine the target filling parameters of the database verification template based on the standardized verification data and the access table corresponding to the target data identifier; Fill the database verification template based on the target filling parameters to obtain the target verification information.

[0113] In some optional embodiments, if there are parameters input through the input box in the standardized verification data, before determining the target filling parameters of the database verification template, the processor 901 further performs: Perform anti-injection processing on the parameters input through the input box.

[0114] In some optional embodiments, after verifying the data source to be verified corresponding to the target data identifier based on the target verification information, the processor 901 further performs: If the verification of a field in the data source to be verified fails, a notification is sent through a preset notification method.

[0115] Since this electronic device is the electronic device in the method of the embodiments of the present application, and the principle by which this electronic device solves problems is similar to that of the method, the implementation of this electronic device can refer to the implementation of the method, and repeated parts will not be elaborated.

[0116] Based on the same technical concept, the embodiments of the present application also provide a computer-readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, the processor is caused to execute the steps of the above data verification method.

[0117] In some alternative embodiments, various aspects of the data verification method provided by the present application can also be implemented in the form of a program product, which includes computer-executable instructions. When the program product runs on a computer device, the computer-executable instructions are used to cause the computer device to execute the steps of the data verification method according to various exemplary embodiments of the present application described above in this specification.

[0118] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0119] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0120] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in the flow Figure 1One or more processes and / or boxes Figure 1 The functions specified in one or more boxes.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes.

[0122] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0123] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

Claims

1. A data verification method, characterized in that: The method includes: Determine standardized check data based on input information of a check list; wherein the check list includes a plurality of selection boxes, and the options in the selection boxes are generated after structured processing of the data source to be checked; the input information includes a target data identifier and a target check condition; Based on the standardized verification data, a database verification template is filled to obtain target verification information; Based on the target verification information, the to-be-verified data source corresponding to the target data identifier is verified.

2. The method according to claim 1, characterized in that Based on the information entered in the checklist, before determining the standardized check data, it also includes: Performing structured processing on each data source to be checked, generating an identifier and an access table corresponding to each data source to be checked; wherein the access table includes multiple fields and parameters corresponding to each field; A checklist including a first number of identification selection boxes and a second number of check condition selection boxes is displayed; wherein the options of any identification selection box include some or all identifications corresponding to the data sources to be checked; any check condition selection box includes a first field selection box, an operator selection box, and a target selection box; the target selection box is a second field selection box or an input box; the options of the first field selection box and the second field selection box include fields in the access table; the options of the operator selection box include multiple preset operators; The target data identifier is determined in response to a selection instruction for the identifier selection box; and the target check condition is determined in response to a selection instruction for the check condition selection box.

3. The method according to claim 2, characterized in that Some or all of the checking condition selection boxes also include an aggregation function selection box; the options of the aggregation function selection box include multiple preset aggregation functions.

4. The method according to claim 1, characterized in that Based on the information entered in the checklist, determine the standardized check data, including: A table block in the standardized verification data is generated based on the target data identifier; and a query block in the standardized verification data is generated based on the target data identifier and the target verification condition.

5. The method according to claim 2, characterized in that Based on the standardized verification data, a database verification template is filled to obtain target verification information, including: Determining target filling parameters of a database verification template based on the standardized verification data and the access table corresponding to the target data identifier; The database verification template is filled based on the target filling parameters to obtain the target verification information.

6. The method according to claim 5, characterized in that If the standardized verification data includes parameters input through an input box, before determining the target filling parameters of the database verification template, the method further includes: The parameters input through the input box are processed to prevent injection.

7. The method according to claim 1, characterized in that After verifying the to-be-verified data source corresponding to the target data identifier based on the target verification information, the method further includes: If the verification of the field in the to-be-verified data source fails, a notification is made through a preset notification method.

8. A data checking device, characterized in that: The device includes: A conversion module, for determining standardized check data based on input information of a check list; wherein the check list includes a plurality of selection boxes, and the options in the selection boxes are generated after structured processing of the data source to be checked; and the input information includes a target data identifier and a target check condition; The conversion module is further used to fill in a database verification template based on the standardized verification data to obtain target verification information; A checking module is used to check the to-be-checked data source corresponding to the target data identifier based on the target checking information.

9. An electronic device, characterized in that: The method comprises at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer, and when the program is run on the computer, the computer is enabled to execute the method according to any one of claims 1 to 7.