Data query method, device, electronic device and storage medium

By dividing the data into a data storage domain and a permission control domain, and using data identification for verification, the problem of low data consistency verification efficiency in massive data is solved, and efficient consistency verification is achieved Resource savings.

CN113918987BActive Publication Date: 2025-02-25BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111141572.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2025-02-25
Estimated Expiration
2041-09-28

AI Technical Summary

Technical Problem

Databases and search engines have low data consistency verification efficiency and high resource consumption in massive data.

Method used

By dividing data into a data storage domain and a permission control domain, using data identification for verification, the efficiency of consistency verification is improved and resource consumption is reduced.

Benefits of technology

It improves the efficiency of data consistency verification, reduces the consumption of system resources, and ensures efficient consistency of database and search engine data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918987B_ABST
    Figure CN113918987B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data query method, device, electronic device and storage medium, the method comprising: receiving a query request including a target object sent by a first database; determining a first data identifier of a target domain in the first database and a second data identifier of a verification domain corresponding to the target domain in the database; the first data identifier and the second data identifier are used to identify data corresponding to the target query information in the target domain and the verification domain, respectively; the target domain comprises a first data storage domain and a first authority control domain, the verification domain comprises a second data storage domain corresponding to the first data storage domain and a second authority control domain corresponding to the first authority control domain; verifying the first data identifier based on the second data identifier to obtain a verification result; and sending a verification success result to the first database when the verification result indicates that the verification is successful. The present disclosure can improve the efficiency of data consistency verification and reduce the consumption of system resources by the verification process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data query method, device, electronic device and storage medium. Background Art

[0002] Databases (such as MySQL) can provide good data storage and transaction functions, but cannot meet the needs of accurate search in massive data. Search engines (such as ElasticSearch) mainly provide search functions and can solve the problem of difficulty in searching in massive data. As the main data source, any changes to the database data need to be synchronized to the search engine. How to maintain data consistency between the search engine and the database has become an urgent problem to be solved.

[0003] In the related art, when performing consistency check on data in a database and a search engine, it is necessary to compare each field of the data in the database with each field of the data in the search engine one by one. The efficiency of data consistency check is low, and comparing fields one by one consumes more system resources. Summary of the invention

[0004] The present disclosure provides a data query method, device, electronic device and storage medium to at least solve the problem of low efficiency and high resource consumption of data consistency verification in related technologies. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a data query method is provided, including:

[0006] Receiving a query request sent by the first database, wherein the query request includes target query information of a target object;

[0007] Determine a first data identifier of a target domain in the first database and a second data identifier of a verification domain corresponding to the target domain in the second database; the first data identifier is used to identify data corresponding to the target query information in the target domain, and the second data identifier is used to identify data corresponding to the target query information in the verification domain; the target domain includes a first data storage domain and a first authority control domain, the verification domain includes a second data storage domain corresponding to the first data storage domain and a second authority control domain corresponding to the first authority control domain, the first data storage domain and the second data storage domain are used to store attribute information of data, and the first authority control domain and the second authority control domain are used to store access permission information of data;

[0008] Verify the first data identifier based on the second data identifier to obtain a verification result;

[0009] When the verification result indicates that the verification is successful, the verification success result is sent to the first database; the verification success result is used to instruct the first database to send the data in the target domain corresponding to the target query information to the target object.

[0010] In an exemplary implementation, the verifying the first data identifier based on the second data identifier to obtain a verification result includes:

[0011] Verifying the first data identifier of the first data storage domain based on the second data identifier of the second data storage domain, and obtaining a data storage domain verification result;

[0012] Verifying the first data identifier of the first authority control domain based on the second data identifier of the second authority control domain to obtain an authority control domain verification result;

[0013] Determine the data storage domain verification result and the authority control domain verification result as the verification result.

[0014] In an exemplary embodiment, the method further comprises:

[0015] When the verification result indicates that the verification has failed, obtaining data in the verification field corresponding to the target query information;

[0016] Based on the data in the verification domain corresponding to the target query information, updating the data in the target domain corresponding to the target query information;

[0017] An update instruction is sent to the first database, where the update instruction is used to instruct the first database to forward updated data to the target object.

[0018] In an exemplary embodiment, when the verification result indicates a verification failure, the method further includes:

[0019] Verify the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain;

[0020] Acquire a first update field corresponding to the first target field from the second data storage field;

[0021] The first target field is updated based on the first update field.

[0022] In an exemplary embodiment, when the verification result indicates a verification failure, the method further includes:

[0023] Verify the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain;

[0024] Acquire a second update field corresponding to the second target field from the second authority control domain;

[0025] The second target field is updated based on the second update field.

[0026] In an exemplary embodiment, when the verification result indicates a verification failure, the method further includes:

[0027] Verify the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain; and verify the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain;

[0028] Acquire a first update field corresponding to the first target field from the second data storage domain, and acquire a second update field corresponding to the second target field from the second authority control domain;

[0029] The first target field is updated based on the first update field, and the second target field is updated based on the second update field.

[0030] In an exemplary embodiment, the method further comprises:

[0031] Verification control information is set for a data field verified within a first preset time period before a current time, and the verification control information is used to control not to perform verification processing on the verified data field within a second preset time period after the current time.

[0032] In an exemplary embodiment, when the verification result indicates that the verification is successful, sending the verification success result to the first database includes:

[0033] When the verification result of the data storage domain indicates that the verification is successful and the verification result of the authority control domain indicates that the verification is successful, the verification success result is sent to the first database.

[0034] In an exemplary embodiment, determining a first data identifier of a target domain in the first database and a second data identifier of a verification domain corresponding to the target domain in the second database includes:

[0035] splicing the fields in the target domain to obtain a first spliced ​​field, and splicing the fields in the check domain to obtain a second spliced ​​field;

[0036] The first concatenated field is encoded based on a preset encryption algorithm to obtain the first data identifier, and the second concatenated field is encoded based on the preset encryption algorithm to obtain the second data identifier.

[0037] In an exemplary embodiment, before receiving the query request sent by the first database, the method includes:

[0038] In response to the data synchronization instruction, acquiring the change data of the second database within a third preset time period before the current time;

[0039] When the attribute information of the data represented by the change data changes, updating the data in the first data storage domain based on the change data;

[0040] When the change data represents that the access permission information of the data has changed, the data in the first permission control domain is updated based on the change data.

[0041] According to a second aspect of an embodiment of the present disclosure, there is provided a data query device, including:

[0042] A receiving module is configured to execute and receive a query request sent by the first database, wherein the query request includes target query information of a target object;

[0043] A data identification determination module is configured to determine a first data identification of a target domain in the first database and a second data identification of a verification domain corresponding to the target domain in the second database; the first data identification is used to identify data corresponding to the target query information in the target domain, and the second data identification is used to identify data corresponding to the target query information in the verification domain; the target domain includes a first data storage domain and a first permission control domain, the verification domain includes a second data storage domain corresponding to the first data storage domain and a second permission control domain corresponding to the first permission control domain, the first data storage domain and the second data storage domain are used to store attribute information of data, and the first permission control domain and the second permission control domain are used to store access permission information of data;

[0044] A verification module, configured to verify the first data identifier based on the second data identifier to obtain a verification result;

[0045] The sending module is configured to send a successful verification result to the first database when the verification result indicates that the verification is successful; the successful verification result is used to instruct the first database to send the data in the target domain corresponding to the target query information to the target object.

[0046] In an exemplary embodiment, the verification module includes:

[0047] A data storage domain verification unit is configured to verify the first data identifier of the first data storage domain based on the second data identifier of the second data storage domain to obtain a data storage domain verification result;

[0048] an authority control domain verification unit, configured to verify the first data identifier of the first authority control domain based on the second data identifier of the second authority control domain, and obtain an authority control domain verification result;

[0049] The verification result determining unit is configured to determine the data storage domain verification result and the authority control domain verification result as the verification result.

[0050] In an exemplary embodiment, the device further comprises:

[0051] A first data acquisition module is configured to acquire data corresponding to the target query information in the verification domain when the verification result indicates that the verification fails;

[0052] A second data acquisition module is configured to update the data corresponding to the target query information in the target domain based on the data corresponding to the target query information in the verification domain;

[0053] The update instruction sending module is configured to execute and send an update instruction to the first database, wherein the update instruction is used to instruct the first database to forward updated data to the target object.

[0054] In an exemplary embodiment, when the verification result indicates a verification failure, the device further includes:

[0055] A first target field determination module is configured to perform a check on the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain;

[0056] A first update field determination module is configured to execute acquisition of a first update field corresponding to the first target field from the second data storage domain;

[0057] The first updating module is configured to update the first target field based on the first updating field.

[0058] In an exemplary embodiment, when the verification result indicates that the verification has failed, the apparatus further includes:

[0059] A second target field determination module is configured to perform a check on the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain;

[0060] A second update field determination module is configured to obtain a second update field corresponding to the second target field from the second authority control domain;

[0061] The second updating module is configured to update the second target field based on the second update field.

[0062] In an exemplary embodiment, when the verification result indicates a verification failure, the case where the verification result of the data storage domain indicates a verification failure and the case where the verification result of the authority control domain indicates a verification failure, the device further includes:

[0063] A third target field determination module is configured to perform a check on the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain, and to check the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain;

[0064] A third update field determination module is configured to execute acquiring a first update field corresponding to the first target field from the second data storage domain, and acquiring a second update field corresponding to the second target field from the second authority control domain;

[0065] The third updating module is configured to update the first target field based on the first update field, and update the second target field based on the second update field.

[0066] In an exemplary embodiment, the device further comprises:

[0067] The setting module is configured to set verification control information for a data field that has been verified within a first preset time period before the current time, and the verification control information is used to control not to verify the verified data field within a second preset time period after the current time.

[0068] In an exemplary embodiment, the sending module is configured to send a verification success result to the first database when the data storage domain verification result indicates that the verification is successful and the authority control domain verification result indicates that the verification is successful.

[0069] In an exemplary embodiment, the data identification determination module includes:

[0070] A splicing unit is configured to perform splicing of the fields in the target domain to obtain a first spliced ​​field, and to splice the fields in the check domain;

[0071] The encoding unit is configured to encode the first splicing field based on a preset encryption algorithm to obtain the first data identifier, and to encode the second splicing field based on the preset encryption algorithm to obtain the second data identifier.

[0072] In an exemplary embodiment, the device further comprises:

[0073] a change data acquisition module, configured to execute, in response to a data synchronization instruction, acquisition of change data of the second database within a third preset time period before the current time;

[0074] A fourth updating module is configured to execute, when the attribute information of the data represented by the change data is changed, updating the data in the first data storage domain based on the change data;

[0075] The fifth updating module is configured to execute, when the access permission information of the data represented by the change data is changed, updating the data in the first permission control domain based on the change data.

[0076] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0077] processor;

[0078] a memory for storing instructions executable by the processor;

[0079] The processor is configured to execute the instructions to implement the data query method as described in any of the above embodiments.

[0080] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device executes the data query method as described in any of the above embodiments.

[0081] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a processor, the data query method described in any of the above embodiments is implemented.

[0082] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0083] The disclosed embodiment divides the data into two parts (a data storage domain for storing attribute information and a permission control domain for storing access permission information) according to data storage and data permissions. When verifying the data consistency between the second database and the first database, the first data identifier of the target domain in the first database corresponding to the target query information included in the query request is determined, and the second data identifier of the verification domain corresponding to the target domain in the second database is determined. Then, the first data identifier is verified based on the second data identifier to obtain a verification result. When the verification result indicates that the verification is successful, it indicates that the data in the second database is consistent with the data in the first database. It can be seen that when verifying data consistency, the disclosed embodiment not only verifies by domain, but also verifies the data identifiers corresponding to different domains, thereby improving the efficiency of data consistency verification and reducing the consumption of system resources by the data consistency verification process.

[0084] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0086] Figure 1 The present invention is an application environment of a data query method according to an exemplary embodiment.

[0087] Figure 2 The figure is a flow chart of a data query method according to an exemplary embodiment.

[0088] Figure 3 The present invention is a flowchart of determining a data identifier according to an exemplary embodiment.

[0089] Figure 4 The present invention is a flowchart showing a method of verifying the first data identifier based on the second data identifier to obtain a verification result according to an exemplary embodiment.

[0090] Figure 5 The present invention is a flowchart showing a method of updating data corresponding to the target query information in a target domain when verification fails according to an exemplary embodiment.

[0091] Figure 6 The present invention is a flowchart of data verification and data quality reporting according to an exemplary embodiment.

[0092] Figure 7 The figure is a flow chart showing a data synchronization according to an exemplary embodiment.

[0093] Figure 8 The figure is a block diagram of a data query device according to an exemplary embodiment.

[0094] Fig. 9 It is a block diagram of an electronic device for data query according to an exemplary embodiment. DETAILED DESCRIPTION

[0095] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0096] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0097] See also Figure 1 , Figure 1 It is an application environment of a data query method according to an exemplary embodiment. The application environment may include a first database 01, a second database 02 and a data synchronization verification system 03. The data synchronization verification system 03 may communicate with the second database 02 and the first database 01 respectively in a wired or wireless manner, and the present disclosure does not limit this.

[0098] The data synchronization verification system 03 can receive the query request sent by the first database 01, and perform consistency verification on the data in the second database 02 and the first database 01. Optionally, the data synchronization verification system 03 can include an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0099] The second database 02, as a main data source, can provide good data storage and transaction functions. Optionally, the second database 02 can be MySQL.

[0100] The first database 01 mainly provides a search function, which can solve the problem of difficulty in searching in massive data. Optionally, the first database 01 can be ElasticSearch.

[0101] It should be noted that Figure 1 This is only one application environment of the data query method provided by the present disclosure. In actual application, other application environments may also be included.

[0102] Figure 2 is a flow chart of a data query method according to an exemplary embodiment. Figure 2 As shown, the above data query method is used for Figure 1 The data synchronization verification system 03 includes the following steps.

[0103] In step S11, a query request sent by a first database is received, wherein the query request includes target query information of a target object.

[0104] Specifically, the query request can be sent by the target object (for example, the user terminal that logs into the user account) to the first database when a search is needed. After receiving the query request, the first database can forward the query request to the data synchronization verification system.

[0105] Specifically, the target query information may be information associated with the data that the target object wants to search for, such as data name, data type, etc.

[0106] In step S13, determine the first data identifier of the target domain in the first database and the second data identifier of the verification domain corresponding to the target domain in the second database; the first data identifier is used to identify the data corresponding to the target query information in the target domain, and the second data identifier is used to identify the data corresponding to the target query information in the verification domain; the target domain includes a first data storage domain and a first permission control domain, the verification domain includes a second data storage domain corresponding to the first data storage domain and a second permission control domain corresponding to the first permission control domain, the first data storage domain and the second data storage domain are used to store attribute information of data, and the first permission control domain and the second permission control domain are used to store access permission information of data.

[0107] Optionally, since the query request received by the data synchronization verification system includes the target query information of the target object, generally, the target query information includes the query condition, and the data synchronization verification system can obtain the data corresponding to the target query information from the target domain according to the target query information, and determine the first data identifier for identifying the data based on the data corresponding to the target query information obtained from the target domain (for example, the fields of the data corresponding to the target query information obtained from the target domain are concatenated to obtain the first data identifier). Similarly, the data synchronization verification system can obtain the data corresponding to the target query information from the verification domain according to the target query information, and determine the second data identifier for identifying the data based on the data corresponding to the target query information obtained from the verification domain (for example, the fields of the data corresponding to the target query information obtained from the verification domain are concatenated to obtain the second data identifier).

[0108] Optionally, the data synchronization system can also pre-store locally the first data identifier of the target domain in the first database and the first mapping relationship between the first data identifier and the first data in the target domain, and store the second data identifier of the verification domain in the second database and the second mapping relationship between the second data identifier and the second data in the verification domain. After the data synchronization system receives the target query information, the first target data corresponding to the target query information (e.g., data name, data type, etc.) can be determined from the first data, and based on the first target data and the above-mentioned first mapping relationship, the first data identifier used to identify the data corresponding to the target query information in the target domain of the first database is determined from the local storage. Similarly, the second target data corresponding to the target query information (e.g., data name, data type, etc.) can be determined from the second data, and based on the second target data and the above-mentioned second mapping relationship, the second data identifier used to identify the data corresponding to the target query information in the verification domain is determined from the local storage.

[0109] Exemplarily, the above data may be data corresponding to a task, and the above attribute information may be some information related to the task, including but not limited to: task name, task description, task field, task operation log, task status, etc. Among them, a task refers to a basic work unit completed by a computer, which is one or more instruction sequences processed by a control program. A task can be considered as a data entity. A data entity can also be understood as a data object (Data Object, DO) that corresponds one-to-one to a MySQL table structure, and permissions are the associated attributes of this DO.

[0110] Exemplarily, the access permission information may be permissions corresponding to the task, such as which user accounts can access the task and which user accounts cannot access the task.

[0111] Specifically, the data in the second database and the first database can be divided into different domains (data storage domain and authority control domain) in advance. The specific method of dividing different domains can be as follows: for the task data entity, it stores the above-mentioned attribute information, which is used as the data storage domain, and each task has corresponding access rights (for example, which accounts can access and which accounts cannot access), and the access rights of the task are used as the authority control domain.

[0112] Optionally, in order to avoid the problem of large system resource consumption caused by verifying all fields of an entity during data consistency verification, the data storage domain can be further divided into different domains according to the relationship between data fields, and corresponding data identifiers can be established for each domain. The specific method can be as follows: For the task data entity, which stores the attribute information of the task (task name, task description, task field, task operation log, task status, etc.), it can be divided into different domains based on the relevance between the business meaning and the fields in the object, such as a basic information domain for storing task descriptions and task names, a task field domain for storing task fields, and a task additional information domain for storing operation logs.

[0113] It should be noted that before data query, the data in the second database and the first database need to be divided into different domains in the above manner (for example, data storage domain, authority control domain, basic information domain, task field domain, task additional information domain, etc.), and each domain will correspond to a data identifier.

[0114] In a specific embodiment, Figure 3 FIG. 1 is a flow chart showing a method of determining a data identifier according to an exemplary embodiment. Figure 3 As shown, in the above step S13, the above determination of the first data identifier of the target domain in the above first database and the second data identifier of the verification domain corresponding to the above target domain in the second database may include:

[0115] In step S1301, the fields in the target domain are concatenated to obtain a first concatenated field, and the fields in the check domain are concatenated to obtain a second concatenated field.

[0116] In step S1303, the first concatenated field is encoded based on a preset encryption algorithm to obtain the first data identifier, and the second concatenated field is encoded based on the preset encryption algorithm to obtain the second data identifier.

[0117] Specifically, the above-mentioned preset encryption algorithms include but are not limited to: Cyclic Redundancy Check 32 (CRC32) algorithm, Maximum Marginal Relevance (MMR) algorithm, Message Digest Algorithm MD5 (MD5) algorithm, etc.

[0118] The following describes the process of determining the first data identifier and the second data identifier by taking the preset encryption algorithm as CRC32 as an example:

[0119] For each domain, the data fields in each domain can be concatenated according to the field name, and the concatenated string is encoded using the CRC32 algorithm to obtain a long type number, thereby establishing the data identifier of each domain. Among them, long represents a long integer data, which is a basic data type in programming languages.

[0120] The principle of CRC32 algorithm can be as follows: CRC32 verification principle is actually to add an r-bit binary check code (sequence) after a p-bit binary data sequence, so as to form a binary sequence with a total length of n=p+r bits; there is a certain specific relationship between the check code added after the data sequence and the content of the data sequence. If one or some bits in the data sequence are wrong due to interference or other reasons, this specific relationship will be destroyed. Therefore, by checking this relationship, the correctness of the data can be verified.

[0121] Since the preset encryption algorithm (for example, CRC32 algorithm) has high computational efficiency and low collision probability, the accuracy and efficiency of data identification calculation can be ensured by using the preset encryption algorithm to calculate the data identification of the domain, thereby improving the accuracy and efficiency of data consistency verification. In addition, in the process of determining the data identification, the domain is used as the smallest unit for determination, rather than the entire data, so that when verifying the data, the domain can be used as the smallest unit for verification, further improving the efficiency and accuracy of data consistency verification.

[0122] In step S15, the first data identifier is verified based on the second data identifier to obtain a verification result.

[0123] In the disclosed embodiment, the domain may be used as the smallest unit for verification, thereby obtaining a verification result.

[0124] In an alternative embodiment, Figure 4 FIG. 1 is a flow chart showing a method of verifying the first data identifier based on the second data identifier to obtain a verification result according to an exemplary embodiment. Figure 4 As shown, the verification of the first data identifier based on the second data identifier to obtain a verification result may include:

[0125] In step S1501, the first data identifier of the first data storage area is verified based on the second data identifier of the second data storage area to obtain a data storage area verification result.

[0126] Exemplarily, when the second data identifier of the second data storage domain does not match the first data identifier of the first data storage domain, the data storage domain verification result indicates that the data storage domain verification failed. When the second data identifier of the second data storage domain matches the first data identifier of the first data storage domain, the data storage domain verification result indicates that the data storage domain verification succeeded.

[0127] In step S1503, the first data identifier of the first authority control domain is verified based on the second data identifier of the second authority control domain to obtain an authority control domain verification result.

[0128] Exemplarily, when the second data identifier of the second authority control domain does not match the first data identifier of the first authority control domain, the authority control domain check indicates that the authority control domain check failed. When the second data identifier of the second authority control domain matches the first data identifier of the first authority control domain, the authority control domain check indicates that the authority control domain check succeeded.

[0129] In step S1505, the data storage domain verification result and the authority control domain verification result are determined to be the verification results.

[0130] Exemplarily, the situation where the above-mentioned verification result indicates a verification failure includes the situation where the above-mentioned data storage domain verification result indicates a verification failure of the data storage domain and / or the situation where the above-mentioned permission control domain verification result indicates a verification failure of the permission control domain, that is, if any one of the data storage domain verification and the permission control domain verification fails, then the final verification result is deemed to indicate a verification failure.

[0131] Specifically, when the second data identifier of the second data storage domain does not match the first data identifier of the first data storage domain, and / or the second data identifier of the second authority control domain does not match the first data identifier of the first authority control domain, the above verification result indicates that the verification failed.

[0132] Exemplarily, the case where the verification result indicates that the verification is successful includes the case where the data storage domain verification result indicates that the data storage domain verification is successful and the case where the permission control domain verification result indicates that the permission control domain verification is successful.

[0133] Specifically, when the second data identifier of the second data storage domain matches the first data identifier of the first data storage domain, and the second data identifier of the second authority control domain matches the first data identifier of the first authority control domain, the above verification result indicates that the verification is successful.

[0134] It should be noted that the above steps S1501 to S1503 can be performed simultaneously, and are not performed sequentially.

[0135] Since the target domain includes the first data storage domain and the first authority control domain, the above-mentioned verification domain includes the second data storage domain corresponding to the above-mentioned first data storage domain, and the second authority control domain corresponding to the above-mentioned first authority control domain, during the verification, the data identifiers of the two corresponding domains can be verified, thereby realizing data consistency verification with the domain as the smallest unit, avoiding the defects of low verification efficiency and large system resource consumption caused by comparing the data fields in the second database with the data fields in the first database one by one, thereby improving the efficiency and accuracy of data consistency verification, and effectively reducing the consumption of system resources in the data consistency verification process.

[0136] In step S17, when the verification result indicates that the verification is successful, the verification success result is sent to the first database; the verification success result is used to instruct the first database to send the data in the target domain corresponding to the target query information to the target object.

[0137] Specifically, when the verification is successful, it means that the data in the second database is consistent with the data in the first database, and the data corresponding to the target query information in the first database can be directly sent to the target object.

[0138] In a specific embodiment, when the verification result indicates that the verification is successful, sending the verification success result to the first database may include:

[0139] When the data storage domain verification result indicates that the verification is successful and the authority control domain verification result indicates that the verification is successful, the verification success result is sent to the first database.

[0140] Specifically, the consistency check between the second database and the first database is considered successful only when both the data storage domain and the authority control domain are successfully verified. The accuracy and credibility of the verification result can be improved through the combined effect of the data storage domain verification and the authority control domain verification.

[0141] In an alternative embodiment, Figure 5 FIG. 1 is a flowchart showing a method of updating data corresponding to the target query information in the target domain when verification fails according to an exemplary embodiment. Figure 5 As shown, the above method may also include:

[0142] In step S31, when the verification result indicates that the verification has failed, data corresponding to the target query information in the verification field is obtained.

[0143] In step S33, based on the data in the verification domain corresponding to the target query information, the data in the target domain corresponding to the target query information is updated.

[0144] In step S35, an update instruction is sent to the first database, where the update instruction is used to instruct the first database to forward the updated data to the target object.

[0145] Specifically, when the verification fails, it indicates that there is an abnormality in the data in the first database, and the data in the first database can be updated using the corresponding data in the second database, and the updated data can be sent to the above-mentioned target object.

[0146] Specifically, when the verification result indicates that the verification has failed, the data corresponding to the target query information in the verification domain can be used to update the data corresponding to the target query information in the target domain, so as to achieve data repair with the domain as the smallest unit in the case of data abnormalities in the first database, reduce unnecessary data assembly, and improve data repair efficiency, thereby ensuring efficient consistency between the data in the second database and the data in the first database.

[0147] Optionally, each data query can be verified in the message queue (MQ), that is, the data synchronization verification system obtains the data to be verified from the MQ for verification. In the case where the verification result indicates that the verification has failed, the relevant information (such as quantity, data entity, etc.) of the data corresponding to the above target query information in the above verification domain can also be sent to the instant messaging (IM) system for notification, thereby achieving the number monitoring and data monitoring of verification failures.

[0148] It should be noted that, in the case of a verification failure, the data fields in the domain where the verification failed may be further compared to locate the inconsistent data fields so as to repair the inconsistent data fields.

[0149] In a specific embodiment, when the above verification result indicates that the verification has failed, the above method may further include:

[0150] The data field of the first data storage domain is verified based on the data field of the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain.

[0151] A first update field corresponding to the first target field is obtained from the second data storage area.

[0152] The first target field is updated based on the first update field.

[0153] Specifically, when the verification result of the data storage domain indicates that the verification has failed, it can be considered that the verification result indicates that the verification has failed, and the data field in the second data storage domain and the data field in the first data storage domain can be further verified to obtain the unmatched first target field, and the corresponding first update field is obtained from the second data storage domain, and the first target field is updated through the first update field to achieve the positioning and repair of the first target field. In the case that the data identifiers of the above two data storage domains are not successfully matched, the present disclosure further matches the data fields in the above two data storage domains to achieve accurate positioning of the fields of the data storage domain that have not been successfully matched in units of domains, reduce unnecessary data assembly, improve the efficiency of data repair, and can accurately repair the fields that have not been successfully matched, and the accuracy of data repair is high, thereby ensuring the efficient consistency of the second data in the database and the data in the first database.

[0154] In another optional embodiment, when the verification result indicates that the verification has failed, including when the authority control domain verification result indicates that the verification has failed, the method may further include:

[0155] The data field in the first authority control domain is verified based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain.

[0156] A second update field corresponding to the second target field is obtained from the second authority control domain.

[0157] The second target field is updated based on the second update field.

[0158] Specifically, when the verification result of the permission control domain indicates that the verification has failed, it can also be considered that the verification result indicates that the verification has failed, and the data field in the second permission control domain and the data field in the first permission control domain can be further verified to obtain the unmatched second target field, and the corresponding second update field is obtained from the second permission control domain, and the second target field is updated through the second update field to achieve the positioning and repair of the second target field. In the case that the data identifiers of the above two permission control domains are not successfully matched, the present disclosure further matches the data fields in the above two permission control domains to achieve accurate positioning of the unmatched fields in the permission control domain in units of domains, reduce unnecessary data assembly, improve the efficiency of data repair, and can accurately repair the unmatched fields, with a high accuracy rate of data repair, thereby ensuring efficient consistency between the data in the second database and the data in the first database.

[0159] In another optional embodiment, when the verification result indicates that the verification has failed, the method may further include:

[0160] The data fields in the first data storage domain are checked based on the data fields in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data fields in the second data storage domain; and the data fields in the first permission control domain are checked based on the data fields in the second permission control domain to obtain a second target field in the first permission control domain that does not match the data fields in the second permission control domain.

[0161] A first update field corresponding to the first target field is obtained from the second data storage domain, and a second update field corresponding to the second target field is obtained from the second authority control domain.

[0162] The first target field is updated based on the first update field, and the second target field is updated based on the second update field.

[0163] Specifically, when the data storage domain verification result and the permission control domain verification result both indicate verification failure, it can be considered that the verification result indicates verification failure, and then the data field in the second data storage domain and the data field in the first data storage domain can be further verified to obtain the unmatched first target field, and the data field in the second permission control domain and the data field in the first permission control domain can be verified to obtain the unmatched second target field, and the corresponding first update field is obtained from the second data storage domain, and the first target field is updated by the first update field, and the corresponding second update field is obtained from the second permission control domain, and the second target field is updated by the second update field, so as to realize the positioning and repair of the second target field. In the present disclosure, when the data identifiers of the above two permission control domains and the data identifiers of the above two permission control domains are not matched successfully, the data fields in the above two permission control domains and the data fields in the above two permission control domains are further matched, so as to realize the accurate positioning of the unmatched fields in the permission control domain and the unmatched fields in the data storage domain in units of domains, reduce unnecessary data assembly, improve the efficiency of data repair, and accurately repair the unmatched fields, and the accuracy of data repair is high, thereby ensuring the efficient data consistency of the data in the second database and the data in the first database.

[0164] In an optional embodiment, the above method may also include: setting verification control information for the data field that has been verified within a first preset time period before the current time, and the above verification control information is used to control not to verify the above verified data field within a second preset time period after the above current time.

[0165] Since each data query will send the data to MQ and then compare the data, there are many redundant and unnecessary comparisons. At the same time, if the comparison frequency is too frequent, it will consume more system resources, such as memory, input / output (IO), etc. Based on this, the present disclosure sets verification control information for the data field that has been verified within a first preset time period before the current time. The verification control information is used to control not to verify the above-mentioned verified data field within a second preset time period after the current time, thereby reducing redundant comparisons and reducing the consumption of system resources.

[0166] Optionally, the length of the first preset time period and the length of the second preset time period may be the same or different. The disclosed embodiment does not limit the length of the first preset time period and the length of the second preset time period. For example, the length of the first preset time period may be 5 minutes, and the length of the second preset time period may also be 5 minutes. For another example, the length of the first preset time period may be 5 minutes, and the length of the second preset time period may be 10 minutes.

[0167] Assuming that the length of the first preset time period is 5 minutes, the length of the second preset time period is also 5 minutes, the current time is 8:00, and a data field 1 has been verified at 7:57, then a 5-minute verification control information can be set for the data field 1. The verification control information ensures that the data field 1 will not be verified during the second preset time period of 8:00-8:05, and that the data field 1 can be verified after 8:05.

[0168] Optionally, the verification control information may be a data lock. Specifically, a data lock may be set on a data field through a remote dictionary server (Remote Dictionary Server, Redis).

[0169] In a specific embodiment, Figure 6 FIG. 1 is a flow chart showing a data verification and data quality reporting according to an exemplary embodiment. Figure 6As shown, the data verification process first verifies the data identifier (corresponding to the above step S15, steps S1501-S1503). In the case where the data identifier verification fails, the data fields in the domain where the verification fails can be further compared (corresponding to the above field matching process when the verification result indicates verification failure, including the field matching process when the verification result indicates verification failure, including the field matching process when the verification result indicates verification failure, and including the field matching process when the verification result indicates verification failure, including the field matching process when the verification result indicates verification failure, and including the field matching process when the verification result indicates verification failure, including the field matching process when the verification result indicates verification failure, including the field matching process when the verification result indicates verification failure, and including the field matching process when the verification result indicates verification failure, including the field matching process when the data storage domain verification result indicates verification failure and the field matching process when the verification result indicates verification failure). When verifying the data field, it is necessary to determine whether the data field has been verified within the first preset time period before the current time. If not, verify directly. If so, set verification control information for the data field so that the data field is not verified within the second preset time period after the current time, and the data field is verified again after the second preset time period. After the data field verification is completed, the target field with inconsistent verification can also be recorded, and the total amount of verified data, the number of verified passed, and the number of verified failed are sent to the IM system for notification. In addition, the data with consistency verification can be consumed and the inconsistent data can be repaired (corresponding to the above steps S31-S35 and the above field update step). In addition, the key fields with inconsistent verification can be reported to the monitoring platform and displayed in a visual form, so as to more intuitively find the attributes of the inconsistent fields for tracing and troubleshooting the causes of the inconsistency.

[0170] In an alternative embodiment, Figure 7 The figure is a flow chart showing a data synchronization according to an exemplary embodiment.

[0171] like Figure 7 As shown, before receiving the query request sent by the first database, the above method may further include:

[0172] In step S41, in response to the data synchronization instruction, the change data of the second database within a third preset time period before the current time is obtained.

[0173] In step S43, when the attribute information of the data represented by the change data is changed, the data in the first data storage area is updated based on the change data.

[0174] Exemplarily, if the attribute information of data stored in the second data storage domain in the second database within the third preset time period before the current time is different from the attribute information of data stored in the second data storage domain before the third preset time period, the attribute information representing the data changes.

[0175] For example, the current time is 9:00 and the third preset time period is 30 minutes, then the attribute information of the data stored in the second data storage domain in the time period of 8:30-9:00 and the attribute information of the data stored in the second data storage domain before 8:30 are obtained. If the attribute information of the data stored in the third preset time period of 8:30-9:00 is different from the attribute information of the data stored before 8:30, it is considered that the attribute information of the data has changed; otherwise, it is considered that the attribute information of the data has not changed.

[0176] In step S45, when the access permission information of the data represented by the change data is changed, the data in the first permission control domain is updated based on the change data.

[0177] Exemplarily, if the access permission information of data stored in the second permission control domain in the second database within the third preset time period before the current time is different from the access permission information of data stored in the second permission control domain before the third preset time period, the access permission information representing the data has changed.

[0178] For example, the current time is 9:00 and the third preset time period is 30 minutes, then the access permission information of the data stored in the second permission control domain in the time period of 8:30-9:00 and the access permission information of the data stored in the second permission control domain before 8:30 are obtained. If the access permission information of the data stored in the third preset time period of 8:30-9:00 is different from the access permission information of the data stored before 8:30, it is considered that the access permission information of the data has changed; otherwise, it is considered that the access permission information of the data has not changed.

[0179] It should be noted that the above step S43 and the above step S45 can be performed simultaneously, and are not performed sequentially.

[0180] Specifically, before performing data query, the data synchronization verification system can synchronize data on the second database and the first database on a domain basis, avoiding the problems of low synchronization efficiency and large system resource consumption caused by synchronizing the entire data entity, thereby improving the efficiency of data synchronization and reducing the consumption of system resources during the data synchronization process.

[0181] Optionally, the data synchronization instruction can be manually triggered by a user, and a manual scheduling interface can be provided to facilitate the user to trigger the data synchronization instruction. The data synchronization instruction can also be automatically triggered by a data synchronization verification system.

[0182] Optionally, when data synchronization is performed, timed scheduling can be performed through a scheduling platform in the data synchronization verification system.

[0183] In a specific embodiment, during the timing scheduling process, the change data is change data within a preset frequency, and the method may further include:

[0184] In response to the data synchronization instruction, the changed data in the second database is acquired based on the preset frequency.

[0185] Exemplarily, the preset frequency is 30 minutes, and the changed data in the second database can be obtained at 8:30, the changed data in the second database can be obtained again at 9:00, the changed data in the second database can be obtained again at 9:30, and so on.

[0186] The change data of the second database at 8:30 can be obtained by comparing the data stored in the second database at 8:30 (data attribute information and data access permission information) with the data stored in the second database before 8:30. The change data of the second database at 9:00 can be obtained by comparing the data stored in the second database at 9:00 with the data stored in the second database at 8:30.

[0187] Specifically, the scheduling platform in the data synchronization verification system can obtain the changed data in the second database within a preset frequency (for example, every thirty minutes), thereby improving the coverage of data updates and maintaining efficient data synchronization between the second database and the first database.

[0188] In another specific embodiment, during the timed scheduling process, the full data in the second database may also be synchronized, that is, the full data in the second database is obtained and used as the changed data. In order to reduce the consumption of system resources by the full data, the frequency of updating the full data may be adjusted according to the specific business (for example, once a week, etc.).

[0189] In another specific embodiment, in order to optimize the full amount of data, further reduce the consumption of system resources by the data synchronization process, and maintain efficient data synchronization between the second database and the first database, it is also possible to synchronize only the access data with access volume within a preset time period, thereby excluding the synchronization of some test data or invalid data, reducing the consumption of system resources by the synchronization of test data or invalid data, and improving the efficiency of data synchronization. Accordingly, in response to the data synchronization instruction, obtaining the change data of the second database within a third preset time period before the current time may include:

[0190] In response to the data synchronization instruction, access data of the second database within a third preset time period before the current time is obtained based on a preset frequency.

[0191] In an optional embodiment, different synchronization means can be provided for data synchronization of different quantities and scales. For example, for synchronization of large batches of data (it can be determined whether it is a large batch of data or a small batch of data based on the carrying capacity of the data synchronization verification system for synchronization requests), multithreading can be used to increase the speed of assembling data in the data assembly stage, and the pressure on the data synchronization system can be reduced by sending data to MQ instead of directly calling the data synchronization verification system through the Hyper Text Transfer Protocol (HTTP). Small batch data synchronization can achieve the purpose of synchronization by calling the synchronization system interface through HTTP.

[0192] In the disclosed embodiments, on the business side, decoupling can be performed through the listener of an open source framework (e.g., Spring framework). The business code does not need to care about the specific synchronization process and is unaware of the synchronization process. The entire synchronization process and business process are asynchronous and will not block the business process, and the coupling degree with the business system is low. At the same time, data synchronization can also be placed in a synchronization class for easy maintenance. In addition, different synchronization strategies are provided for different synchronization scenarios (such as the above-mentioned scheduled scheduling, full synchronization, etc.) to ensure the reliability of real-time scenarios and delayed scenarios, high-frequency scenarios and low-frequency scenarios, and to optimize batch updates and local updates.

[0193] Figure 8 is a block diagram of a data query device according to an exemplary embodiment. Figure 8 The device includes a receiving module 51, a data identification determination module 53, a verification module 55 and a sending module 57.

[0194] The receiving module 51 is configured to receive a query request sent by the first database, wherein the query request includes target query information of a target object.

[0195] The data identification determination module 53 is configured to determine the first data identification of the target domain in the first database and the second data identification of the verification domain corresponding to the target domain in the second database; the first data identification is used to identify the data corresponding to the target query information in the target domain, and the second data identification is used to identify the data corresponding to the target query information in the verification domain; the target domain includes a first data storage domain and a first permission control domain, the verification domain includes a second data storage domain corresponding to the first data storage domain and a second permission control domain corresponding to the first permission control domain, the first data storage domain and the second data storage domain are used to store attribute information of data, and the first permission control domain and the second permission control domain are used to store access permission information of data.

[0196] The verification module 55 is configured to verify the first data identifier based on the second data identifier to obtain a verification result.

[0197] The sending module 57 is configured to send a successful verification result to the first database when the verification result indicates successful verification; the successful verification result is used to instruct the first database to send the data corresponding to the target query information in the target domain to the target object.

[0198] In an exemplary embodiment, the verification module 55 includes:

[0199] The data storage domain verification unit is configured to verify the first data identifier of the first data storage domain based on the second data identifier of the second data storage domain to obtain a data storage domain verification result.

[0200] The authority control domain verification unit is configured to verify the first data identifier of the first authority control domain based on the second data identifier of the second authority control domain to obtain an authority control domain verification result.

[0201] The verification result determination unit is configured to determine the data storage domain verification result and the authority control domain verification result as the verification result.

[0202] In an exemplary embodiment, the apparatus further comprises:

[0203] The first data acquisition module is configured to acquire data corresponding to the target query information in the verification domain when the verification result indicates that the verification fails.

[0204] The second data acquisition module is configured to update the data corresponding to the target query information in the target domain based on the data corresponding to the target query information in the verification domain.

[0205] The update instruction sending module is configured to execute and send an update instruction to the above-mentioned first database, and the above-mentioned update instruction is used to instruct the above-mentioned first database to forward the updated data to the above-mentioned target object.

[0206] In an exemplary embodiment, when the verification result indicates that the verification has failed, the device further includes:

[0207] The first target field determination module is configured to perform a check on the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain.

[0208] The first update field determination module is configured to execute the acquisition of the first update field corresponding to the first target field from the second data storage domain.

[0209] The first updating module is configured to update the first target field based on the first updating field.

[0210] In an exemplary embodiment, when the verification result indicates that the verification has failed, the apparatus further includes:

[0211] The second target field determination module is configured to perform a check on the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain.

[0212] The second update field determination module is configured to obtain a second update field corresponding to the second target field from the second authority control domain.

[0213] The second updating module is configured to update the second target field based on the second updating field.

[0214] In an exemplary embodiment, when the verification result indicates a verification failure, including the case where the data storage domain verification result indicates a verification failure and the case where the permission control domain verification result indicates a verification failure, the apparatus further includes.

[0215] The third target field determination module is configured to perform a check on the data fields in the first data storage domain based on the data fields in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain, and to check the data fields in the first permission control domain based on the data fields in the second permission control domain to obtain a second target field in the first permission control domain that does not match the data field in the second permission control domain.

[0216] The third update field determination module is configured to execute acquiring the first update field corresponding to the first target field from the second data storage domain, and acquiring the second update field corresponding to the second target field from the second authority control domain.

[0217] The third updating module is configured to update the first target field based on the first updating field, and to update the second target field based on the second updating field.

[0218] In an exemplary embodiment, the apparatus further comprises:

[0219] The setting module is configured to set verification control information for the data field that has been verified within a first preset time period before the current time, and the above-mentioned verification control information is used to control not to verify the above-mentioned verified data field within a second preset time period after the above-mentioned current time.

[0220] In an exemplary embodiment, the sending module 57 is configured to send a verification success result to the first database when the data storage domain verification result indicates that the verification is successful and the authority control domain verification result indicates that the verification is successful.

[0221] In an exemplary embodiment, the data identification determination module 53 includes:

[0222] The splicing unit is configured to execute splicing of the fields in the target domain to obtain a first spliced ​​field, and to splice the fields in the check domain.

[0223] The encoding unit is configured to encode the first concatenated field based on a preset encryption algorithm to obtain the first data identifier, and to encode the second concatenated field based on the preset encryption algorithm to obtain the second data identifier.

[0224] In an exemplary embodiment, the apparatus further comprises:

[0225] The changed data acquisition module is configured to execute in response to the data synchronization instruction and acquire the changed data of the second database within a third preset time period before the current time.

[0226] The fourth updating module is configured to update the data in the first data storage area based on the change data when the attribute information of the data represented by the change data changes.

[0227] The fifth updating module is configured to execute, when the access permission information of the data represented by the change data is changed, updating the data in the first permission control domain based on the change data.

[0228] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0229] In an exemplary embodiment, an electronic device is also provided, including a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the steps of any data query method in the above embodiments when executing the instructions stored in the memory.

[0230] The electronic device may be a terminal, a server or a similar computing device. For example, the electronic device is a server. Fig. 9 It is a block diagram of an electronic device for data query according to an exemplary embodiment. The electronic device 60 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 61 (the central processing unit 61 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 63 for storing data, and one or more storage media 62 (such as one or more mass storage devices) for storing application programs 623 or data 622. Among them, the memory 63 and the storage medium 62 can be short-term storage or permanent storage. The program stored in the storage medium 62 may include one or more modules, each of which may include a series of instruction operations in the electronic device. Furthermore, the central processing unit 61 can be configured to communicate with the storage medium 62 to execute a series of instruction operations in the storage medium 62 on the electronic device 60. The electronic device 60 may also include one or more power supplies 66, one or more wired or wireless network interfaces 65, one or more input and output interfaces 64, and / or one or more operating systems 621, such as Windows ServerTM, Mac OSXTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0231] The input / output interface 64 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the electronic device 60. In one example, the input / output interface 64 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In an exemplary embodiment, the input / output interface 64 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0232] It can be understood by those skilled in the art that Fig. 9 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig. 9 More or fewer components as shown, or with Fig. 9 Different configurations shown.

[0233] In an exemplary embodiment, a computer-readable storage medium is further provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the steps of any data query method in the above embodiments.

[0234] In an exemplary embodiment, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the data query method provided in any of the above-mentioned embodiments is implemented.

[0235] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present disclosure can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0236] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0237] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data query method, characterized in that: The method comprises: Receiving a query request sent by the first database, wherein the query request includes target query information of a target object; splicing the fields in the target domain of the first database to obtain a first splicing field, and splicing the fields in the verification domain corresponding to the target domain in the second database to obtain a second splicing field; encoding the first splicing field based on a preset encryption algorithm to obtain a first data identifier of the target domain in the first database, and encoding the second splicing field based on the preset encryption algorithm to obtain a second data identifier of the verification domain corresponding to the target domain in the second database; the first data identifier is used to identify the data corresponding to the target query information in the target domain, and the second data identifier is used to identify the data corresponding to the target query information in the verification domain; the target domain includes a first data storage domain and a first permission control domain, the verification domain includes a second data storage domain corresponding to the first data storage domain and a second permission control domain corresponding to the first permission control domain, the first data storage domain and the second data storage domain are used to store attribute information of data, and the first permission control domain and the second permission control domain are used to store access permission information of data; Verify the first data identifier of the first data storage domain based on the second data identifier of the second data storage domain, and obtain a data storage domain verification result; verify the first data identifier of the first authority control domain based on the second data identifier of the second authority control domain, and obtain an authority control domain verification result; determine the data storage domain verification result and the authority control domain verification result as the verification result; When the verification result indicates that the verification is successful, the verification success result is sent to the first database; the verification success result is used to instruct the first database to send the data in the target domain corresponding to the target query information to the target object.

2. The data query method according to claim 1, characterized in that: The method further comprises: When the verification result indicates that the verification has failed, obtaining data in the verification field corresponding to the target query information; Based on the data in the verification domain corresponding to the target query information, updating the data in the target domain corresponding to the target query information; An update instruction is sent to the first database, where the update instruction is used to instruct the first database to forward updated data to the target object.

3. The data query method according to claim 2, characterized in that: In the case where the verification result indicates a verification failure, including the case where the data storage domain verification result indicates a verification failure, the method further includes: Verify the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain; Acquire a first update field corresponding to the first target field from the second data storage field; The first target field is updated based on the first update field.

4. The data query method according to claim 2, characterized in that: In the case where the verification result indicates a verification failure, including the case where the authority control domain verification result indicates a verification failure, the method further includes: Verify the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain; Acquire a second update field corresponding to the second target field from the second authority control domain; The second target field is updated based on the second update field.

5. The data query method according to claim 2, characterized in that: In the case where the verification result indicates a verification failure, including the case where the data storage domain verification result indicates a verification failure and the case where the authority control domain verification result indicates a verification failure, the method further includes: Verify the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain; and verify the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain. Acquire a first update field corresponding to the first target field from the second data storage domain, and acquire a second update field corresponding to the second target field from the second authority control domain; The first target field is updated based on the first update field, and the second target field is updated based on the second update field.

6. The data query method according to any one of claims 3 to 5, characterized in that: The method further comprises: Verification control information is set for a data field verified within a first preset time period before a current time, and the verification control information is used to control not to perform verification processing on the verified data field within a second preset time period after the current time.

7. The data query method according to claim 1, characterized in that: When the verification result indicates that the verification is successful, sending the verification success result to the first database includes: When the verification result of the data storage domain indicates that the verification is successful and the verification result of the authority control domain indicates that the verification is successful, the verification success result is sent to the first database.

8. The data query method according to claim 1 or 2, characterized in that: Before receiving the query request sent by the first database, the method includes: In response to the data synchronization instruction, acquiring the change data of the second database within a third preset time period before the current time; When the attribute information of the data represented by the change data changes, updating the data in the first data storage domain based on the change data; When the change data represents that the access permission information of the data has changed, the data in the first permission control domain is updated based on the change data.

9. A data query device, characterized in that: The device comprises: A receiving module is configured to execute and receive a query request sent by the first database, wherein the query request includes target query information of a target object; A data identification determination module is configured to determine a first data identification of a target domain in the first database and a second data identification of a verification domain corresponding to the target domain in the second database; the data identification determination module includes: a splicing unit configured to splice fields in the target domain to obtain a first splicing field, and splice fields in the verification domain to obtain a second splicing field; an encoding unit configured to encode the first splicing field based on a preset encryption algorithm to obtain a first data identification of the target domain in the first database, and encode the second splicing field based on the preset encryption algorithm to obtain a second data identification of the verification domain corresponding to the target domain in the second database; the first data identification is used to identify data corresponding to the target query information in the target domain, and the second data identification is used to identify data corresponding to the target query information in the verification domain; the target domain includes a first data storage domain and a first permission control domain, the verification domain includes a second data storage domain corresponding to the first data storage domain and a second permission control domain corresponding to the first permission control domain, the first data storage domain and the second data storage domain are used to store attribute information of data, and the first permission control domain and the second permission control domain are used to store access permission information of data; A verification module is configured to verify the first data identifier based on the second data identifier to obtain a verification result; the verification module includes: a data storage domain verification unit, configured to verify the first data identifier of the first data storage domain based on the second data identifier of the second data storage domain to obtain a data storage domain verification result; an authority control domain verification unit, configured to verify the first data identifier of the first authority control domain based on the second data identifier of the second authority control domain to obtain an authority control domain verification result; a verification result determination unit, configured to determine that the data storage domain verification result and the authority control domain verification result are the verification result; The sending module is configured to send a successful verification result to the first database when the verification result indicates that the verification is successful; the successful verification result is used to instruct the first database to send the data in the target domain corresponding to the target query information to the target object.

10. The data query device according to claim 9, characterized in that: The device also includes: A first data acquisition module is configured to acquire data corresponding to the target query information in the verification domain when the verification result indicates that the verification fails; A second data acquisition module is configured to update the data corresponding to the target query information in the target domain based on the data corresponding to the target query information in the verification domain; The update instruction sending module is configured to execute and send an update instruction to the first database, wherein the update instruction is used to instruct the first database to forward updated data to the target object.

11. The data query device according to claim 10, characterized in that: When the verification result indicates that the verification has failed, including when the verification result of the data storage domain indicates that the verification has failed, the device further includes: A first target field determination module is configured to perform a check on the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain; A first update field determination module is configured to execute acquisition of a first update field corresponding to the first target field from the second data storage domain; The first updating module is configured to update the first target field based on the first updating field.

12. The data query device according to claim 10, characterized in that: When the verification result indicates that the verification has failed, the device further includes: A second target field determination module is configured to perform a check on the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain; A second update field determination module is configured to obtain a second update field corresponding to the second target field from the second authority control domain; The second updating module is configured to update the second target field based on the second update field.

13. The data query device according to claim 10, characterized in that: When the verification result indicates a verification failure, including when the data storage domain verification result indicates a verification failure and when the authority control domain verification result indicates a verification failure, the device further includes: A third target field determination module is configured to perform a check on the data field of the first data storage domain based on the data field in the second data storage domain to obtain a first target field in the first data storage domain that does not match the data field in the second data storage domain, and to check the data field in the first authority control domain based on the data field in the second authority control domain to obtain a second target field in the first authority control domain that does not match the data field in the second authority control domain; A third update field determination module is configured to execute acquiring a first update field corresponding to the first target field from the second data storage domain, and acquiring a second update field corresponding to the second target field from the second authority control domain; The third updating module is configured to update the first target field based on the first update field, and update the second target field based on the second update field.

14. The data query device according to any one of claims 11 to 13, characterized in that: The device also includes: The setting module is configured to set verification control information for a data field that has been verified within a first preset time period before the current time, and the verification control information is used to control not to verify the verified data field within a second preset time period after the current time.

15. The data query device according to claim 9, characterized in that: The sending module is configured to send a verification success result to the first database when the data storage domain verification result indicates that the verification is successful and the authority control domain verification result indicates that the verification is successful.

16. The data query device according to any one of claims 9 to 11, characterized in that: The device also includes: a change data acquisition module, configured to execute, in response to a data synchronization instruction, acquisition of change data of the second database within a third preset time period before the current time; A fourth updating module is configured to execute, when the attribute information of the data represented by the change data is changed, updating the data in the first data storage domain based on the change data; The fifth updating module is configured to execute, when the access permission information of the data represented by the change data is changed, updating the data in the first permission control domain based on the change data.

17. An electronic device, characterized in that: include: processor; A memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the data query method according to any one of claims 1 to 8. 18 . A computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device executes the data query method according to claim 1 .

19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the data query method according to any one of claims 1 to 8 is implemented.