Data verification methods, apparatus, electronic devices and computer-readable storage media

By obtaining the access probability of data in the database and performing weighted calculations, consistency checks are only performed on high-probability data, thus solving the stability problem caused by the large workload of database consistency checks and improving the stability of database access.

CN116701376BActive Publication Date: 2026-05-26PEOPLE'S INSURANCE COMPANY OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PEOPLE'S INSURANCE COMPANY OF CHINA
Filing Date
2023-06-19
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Performing consistency checks on all data in the database results in a huge workload, affecting normal database access and leading to poor operational stability.

Method used

By obtaining historical access information from the database corresponding to the data identifier, the access probability of the data in the current time period is determined, and a second probability is calculated based on the target weight. When the second probability is greater than a preset threshold, a consistency check is performed. Data that fails the check is sent a prompt message to update the data in the database.

Benefits of technology

This reduces the workload of data validation, improves the stability of database operation, and avoids impacting database access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116701376B_ABST
    Figure CN116701376B_ABST
Patent Text Reader

Abstract

This application provides a data verification method, apparatus, electronic device, and computer-readable storage medium, belonging to the field of data processing technology. The method includes: acquiring historical access information of each first piece of data in a corresponding database, and determining a first probability that the first piece of data in the database is accessed in the current time period based on the historical access information; acquiring a target weight corresponding to each database, and determining a second probability based on each first probability and the target weight corresponding to the first probability; performing a consistency verification on each piece of first data when the second probability is greater than a preset threshold; and sending a first prompt message to the database corresponding to the second data when each piece of first data fails the consistency verification. This application improves the operational stability of the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data verification technology, and in particular to a data verification method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] To prevent data loss, data is stored in different databases. If data in one database changes, the data in other databases also needs to be updated accordingly, so that the query device can retrieve the latest version of the data from the databases.

[0003] To ensure that the query device can retrieve the latest version of data from the database, data consistency checks are performed on each database. However, performing consistency checks on all data in the database results in an extremely large workload, affecting normal database access and leading to poor database stability. Summary of the Invention

[0004] This application provides a data verification method, apparatus, electronic device, and computer-readable storage medium to solve the problem of poor operational stability of databases.

[0005] On the one hand, this application provides a data verification method, including:

[0006] Obtain historical access information of each first data in the corresponding database, and determine the first probability that the first data in the database is accessed in the current time period based on the historical access information, wherein the data identifiers of each first data are the same;

[0007] Obtain the target weight corresponding to each database, and determine the second probability based on each first probability and the target weight corresponding to the first probability. The second probability is used to indicate the probability that the data corresponding to the data identifier is accessed.

[0008] When the second probability is greater than a preset threshold, a consistency check is performed on each of the first data. The consistency check is used to verify whether each of the first data is the latest version data corresponding to the data identifier.

[0009] If any of the first data fails the consistency check, a first prompt message is sent to the database corresponding to the second data, indicating that the second data is not the latest version data corresponding to the data identifier. The first prompt message is used to instruct the database where the second data is located to update the second data.

[0010] In one embodiment, the step of obtaining the target weight corresponding to each of the databases includes:

[0011] The access interval duration of the first data is determined based on the historical access information;

[0012] Determine the target interval between the last time the first data was accessed in the database and the current time point;

[0013] The difference between the access interval duration and the target interval duration is determined, and the target weight corresponding to the database is determined based on the difference. The difference and the target weight are negatively correlated.

[0014] In one embodiment, the step of determining the target weight corresponding to the database based on the difference includes:

[0015] Obtain the number of query devices currently connected to the database, and determine the undetermined weight of the database based on the difference;

[0016] The target weight corresponding to the database is obtained by adjusting the weight to be determined based on the quantity.

[0017] In one embodiment, the step of determining the first probability that the first data in the database will be accessed in the current time period based on the historical access information includes:

[0018] Based on the historical access information, the number of times the first data in the database was accessed in each time period is determined, wherein each time period constitutes a time cycle.

[0019] Determine the ratio between the number of accesses corresponding to the divided time period and the total number of times the first data was accessed in the database;

[0020] Based on the ratio corresponding to the segmented time period matched with the current time period, a first probability is determined that the first data in the database is accessed during the current time period.

[0021] In one embodiment, the step of obtaining historical access information of each first data in its corresponding database includes:

[0022] Obtain verification information and determine the data identifier of the data to be verified based on the verification information;

[0023] Based on the data identifier, an access information retrieval request is sent to each of the databases, and the retrieval request is used to instruct the database to provide historical access information of the first data corresponding to the data identifier.

[0024] Receive the historical access information returned by each of the databases.

[0025] In one embodiment, after the step of performing consistency verification on each of the first data, the method further includes:

[0026] When each of the first data passes the consistency check, a compliance check is performed on each of the first data.

[0027] If the first data fails the compliance check, a second prompt message is sent to each of the databases. The second prompt message is used to instruct the databases to modify the first data so that the modified first data is compliant.

[0028] In one embodiment, the step of determining the second probability based on each of the first probabilities and the target weights corresponding to the first probabilities includes:

[0029] When the second probability is less than or equal to a preset threshold, a label is set for the data identifier. The label is used to indicate that each first data corresponding to the data identifier is subjected to consistency verification during the idle time period.

[0030] On the other hand, this application also provides a data verification device, including:

[0031] The first acquisition module is used to acquire historical access information of each first data in the corresponding database, and determine the first probability that the first data in the database is accessed in the current time period based on the historical access information, wherein the data identifiers of each first data are the same.

[0032] The second acquisition module is used to acquire the target weight corresponding to each database, and determine the second probability based on each first probability and the target weight corresponding to the first probability. The second probability is used to indicate the probability that the data corresponding to the data identifier is accessed.

[0033] The verification module is used to perform consistency verification on each of the first data when the second probability is greater than a preset threshold. The consistency verification is used to verify whether each of the first data is the latest version data corresponding to the data identifier.

[0034] The sending module is used to send a first prompt message to the database corresponding to the second data when each of the first data fails the consistency check. The second data is not the latest version data corresponding to the data identifier. The first prompt message is used to instruct the database where the second data is located to update the second data.

[0035] On the other hand, this application also provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0036] The memory stores computer-executed instructions;

[0037] The processor executes computer execution instructions stored in the memory to implement the method described above.

[0038] On the other hand, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described above.

[0039] On the other hand, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.

[0040] The data verification method, apparatus, electronic device, and computer-readable storage medium provided in this application acquire historical access information of each first data with the same data identifier in its corresponding database. Based on the historical access information, a first probability is determined that the first data in the database is accessed in the current time period. Then, a target weight is acquired for each database. A second probability is determined using each first probability and its corresponding target weight. When the second probability is greater than a preset threshold, consistency verification is performed on each first data. If any first data fails the consistency verification, a prompt message is sent to the database containing the second data, which is not the latest version of the data identifier, causing the database to update the second data. In this application, the probability of accessing the data corresponding to the data identifier is first determined. If this probability is greater than a preset threshold, it can be determined that the data is likely to be accessed. Then, each first data corresponding to the data identifier is verified, that is, the data with a high access probability is verified. This eliminates the need to verify all data in the database, reducing the workload of data verification and ensuring that database access is not affected, thus improving the operational stability of the database. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0042] Figure 1 This is a schematic diagram illustrating a scenario involving the data verification method described in this application.

[0043] Figure 2 A flowchart illustrating the first embodiment of the data verification method provided in this application;

[0044] Figure 3 A flowchart illustrating a second embodiment of the data verification method provided in this application;

[0045] Figure 4 A flowchart illustrating the third embodiment of the data verification method provided in this application;

[0046] Figure 5 A flowchart illustrating the fourth embodiment of the data verification method provided in this application;

[0047] Figure 6 This is a schematic diagram of the data verification device of this application;

[0048] Figure 7 This is a schematic diagram of the data verification device used in this application.

[0049] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0050] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0051] To prevent data loss, data is stored in different databases. If data in one database changes, the data in other databases also needs to be updated accordingly, so that the query device can retrieve the latest version of the data from the databases.

[0052] The inventors of this application have discovered that, in order to ensure that the query device can obtain the latest version of data from the database, data consistency checks are performed on each database. However, performing consistency checks on all data in the database results in an extremely large workload, affecting normal database access and leading to poor database operational stability.

[0053] Therefore, the inventors of this application conceived of first determining the probability of the data corresponding to the data identifier being accessed. If the probability is greater than a preset threshold, it can be determined that the data is likely to be accessed. Then, each first data corresponding to the data identifier is verified, that is, the data with a high access probability is verified. There is no need to verify all the data in the database, which reduces the workload of data verification, so that the access to the database will not be affected and the stability of the database operation is improved.

[0054] Reference Figure 1 , Figure 1This is a schematic diagram illustrating the scenario involved in the data verification method of this application. The data verification device 100 is communicatively connected to multiple databases 200. Each database 200 stores data with the same data identifier, and these data are synchronized with each other. The data verification device 100 obtains historical access information of the data with the same data identifier from each database 200. The data verification device 100 determines the first probability that the data is accessed in the current time period based on the historical access information, and obtains the target weight of each database 200. Then, it performs a weighted calculation on each first probability based on the target weight to obtain a second probability. If the second probability is greater than a preset threshold, the data verification device 100 performs consistency verification on each data. If any data fails the verification, a prompt message is sent to the database 200 where the data that failed the verification is located, causing the database 200 to update the data.

[0055] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0056] In addition, the data involved in this application can be data authorized by the user or fully authorized by all parties. The collection, dissemination and use of the data comply with the requirements of relevant national laws and regulations. The implementation methods / executives disclosed herein can be combined with each other.

[0057] It should be noted that the data verification method, apparatus, electronic device, and computer-readable storage medium of this application can be used in the field of data verification technology, or in any field other than data verification. The application fields of the data verification method, apparatus, electronic device, and computer-readable storage medium of this application are not limited.

[0058] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the data verification method of this application. The data verification method includes the following steps:

[0059] Step S201: Obtain historical access information of each first data in the corresponding database, and determine the first probability of the first data in the database being accessed in the current time period based on the historical access information, with each first data having the same data identifier.

[0060] In this embodiment, the execution entity is a data verification device. For ease of description, the term "device" will be used to refer to the data verification device below. The device can be any terminal device with data processing capabilities.

[0061] In one example, a downstream business system needs to collect data from multiple upstream business systems. This data is stored in multiple databases within the same system, and the data in each database needs to be validated to determine if the upstream business systems are correctly synchronizing with the downstream business systems. The device could be a component within the downstream business system used to validate the data synchronization across databases.

[0062] In another example, the relationship between the databases can be that of a primary database and a backup database. The device communicates with each database, and data from the primary database is synchronized to the backup database for backup. Each database contains data with the same data identifier, and the data in each database can be accessed by the query device. When data in the primary database changes, the changed data is synchronized to the backup database. However, due to network issues, some backup databases may not receive the changed data. Therefore, the device needs to be configured to perform consistency checks on data with the same data identifier across the databases.

[0063] In one example, when the device receives a verification command sent by the downstream business system, the device can obtain a data table from any database. The data table contains multiple data, each with a corresponding data identifier. The device can obtain the data identifier from the data table and then extract the data corresponding to that data identifier from each database. These data are defined as the first data.

[0064] In another example, the device is equipped with a content configuration module. The inspector configures the fields of the data table to be inspected in the content configuration module. The device extracts the data table and fields from the content configuration module, finds the data table from any database, and then extracts the identifiers of the fields in the data table as data identifiers.

[0065] When data in the database is accessed, the database will record it. After obtaining the first data, the device can retrieve the historical access information of the first data from the database.

[0066] After obtaining the historical access information of the first data, the device determines the probability that the first data in the database will be accessed in the current time period based on the historical access information, and this probability is defined as the first probability.

[0067] For example, historical access information includes the time points when the first data was accessed. A day can be divided into multiple time periods, which are defined as segmented time periods. The device determines the number of time points within each segmented time period, sorts the segmented time periods in descending order of quantity, and then sets the probability of each segmented time period using its sorting sequence number. The sorting sequence number represents the sorting position of the segmented time period; the earlier the sorting position, the higher the probability configured for the segmented time period. The device uses the probability that the current time point is associated with a segmented time period as the first probability. In this way, the first probability corresponding to the first data in each database can be determined.

[0068] Step S202: Obtain the target weight corresponding to each database, and determine the second probability based on each first probability and the target weight corresponding to the first probability. The second probability is used to indicate the probability that the data corresponding to the data identifier is accessed.

[0069] After determining the initial probabilities, the device obtains the weight corresponding to each database, which is defined as the target weight. The target weight can be set according to the type of database.

[0070] For example, if the database type is a primary database, the probability of accessing the first data will be higher. If the database type is a backup database, the probability of accessing the first data will be lower. Therefore, the target weight for the primary database is set slightly higher, and the target weight for the backup database is set slightly lower. That is, the target weight for the primary database is greater than the target weight for the backup database.

[0071] After obtaining the target weight of each database, the device performs a weighted calculation on each first probability based on the target weight to obtain the second probability. The second probability is used to indicate the probability that the data corresponding to the data identifier is accessed. In other words, the second probability is the total probability that the first data and the corresponding synchronous data are accessed.

[0072] Step S203: When the second probability is greater than the preset threshold, perform a consistency check on each first data. The consistency check is used to verify whether each first data is the latest version data corresponding to the data identifier.

[0073] The device determines whether the second probability is greater than a preset threshold. The preset threshold can be any composite number, for example, a preset threshold of 50%. When the second probability is greater than the preset threshold, it can be determined that the data corresponding to the data identifier has a high probability of being accessed. Therefore, it is necessary to perform a consistency check on each piece of first data, that is, to check whether each piece of first data is the latest version of the data corresponding to the data identifier.

[0074] When the second probability is less than or equal to a preset threshold, it can be determined that the probability of the data corresponding to the data identifier being accessed is low. The device then sets a tag for the data identifier, which is used to indicate that consistency verification is performed on each piece of first data corresponding to the data identifier during the idle time period. For example, for each time period segment, the device finds the time segment segment corresponding to the second probability that is greater than the preset threshold, and this time segment segment can be used as the idle time period.

[0075] In step S204, when each piece of first data fails the consistency check, a first prompt message is sent to the database corresponding to the second data. The second data is not the latest version of the data corresponding to the data identifier. The first prompt message is used to instruct the database where the second data is located to update the second data.

[0076] If any of the first data fails the consistency check, meaning at least one of the first data is not the latest version of the data corresponding to the data identifier, then that first data is identified as the second data, and the second data is not the latest version of the data corresponding to the data identifier. The device then sends a first prompt message to the database where the second data resides. The first prompt message is used to instruct the database where the second data resides to update the second data, that is, to inform the database to update the second data to the latest version of the data corresponding to the data identifier.

[0077] When each piece of first data passes the consistency check (i.e., when each piece of first data is the latest version), the device performs a compliance check on each piece of first data. The compliance check includes, for example, verifying whether the value of the first data is within the enumerated range and whether the first data is within 5 minutes of the current time. If the value is outside the enumerated range and / or the interval between the time the first data was acquired and the current time is greater than 5 minutes, the first data fails the check. If the value is within the enumerated range and the interval between the time the first data was acquired and the current time is less than or equal to 5 minutes, the first data passes the check. If the first data fails the compliance check, a second prompt message is sent to each database, instructing the database to modify the first data to make the modified first data compliant.

[0078] In this embodiment, historical access information of each first data with the same data identifier in its corresponding database is obtained. Based on the historical access information, a first probability is determined that the first data in the database is accessed in the current time period. Then, a target weight corresponding to each database is obtained. A second probability is determined by each first probability and its corresponding target weight. When the second probability is greater than a preset threshold, consistency verification is performed on each first data. If each first data fails the consistency verification, a prompt message is sent to the database containing the second data that is not the latest version of the data identifier, causing the database to update the second data. In this application, the probability of the data corresponding to the data identifier being accessed is first determined. If this probability is greater than a preset threshold, it can be determined that the data is likely to be accessed. Then, each first data corresponding to the data identifier is verified, that is, the data with a high access probability is verified. It is not necessary to check all data in the database, which reduces the workload of data verification and ensures that database access is not affected, thereby improving the operational stability of the database.

[0079] Reference Figure 3 , Figure 3 This is a second embodiment of the data verification method of this application. Based on the first embodiment, step S202 includes:

[0080] Step S301: Determine the access interval duration of the first data based on historical access information.

[0081] In this embodiment, the device parses historical access information to obtain various time points when the first data was accessed, and the pattern of the first data access can be found through these time points. For example, the access interval of the first data is between 10 and 12 hours. Based on this pattern, the device can determine the access interval of the first data. For example, if the access interval of the first data is between 10 and 12 hours, then the access interval can be any length within the range of 10 to 12 hours.

[0082] Step S302: Determine the target interval between the last time the first data was accessed in the database and the current time.

[0083] The device can determine the last time point when the first data was accessed in the database from the historical access information. The device calculates the interval between that time point and the current time point, and the interval is defined as the target interval.

[0084] Step S303: Determine the difference between the access interval duration and the target interval duration, and determine the target weight corresponding to the database based on the difference. The difference and the target weight are negatively correlated.

[0085] The device determines the difference between the access interval duration and the target interval duration. Generally, the target interval duration is shorter than the access interval duration; the difference is obtained by subtracting the target interval duration from the access interval duration. Based on this difference, the device determines the target weight corresponding to the database. The target weight and the difference are negatively correlated; that is, the larger the difference, the lower the probability that the first data will be accessed, and therefore the smaller the target weight should be.

[0086] Furthermore, the database's weight is related to the number of query devices it is connected to. The more query devices connected to the database, the higher the probability of the data being accessed. To address this, the device obtains the number of query devices currently communicating with the database and determines the database's undetermined weight based on the difference. The device then adjusts the undetermined weight using the number of devices connected to the database to obtain the target weight. For example, if the number is greater than a preset number, the undetermined weight is increased to obtain the target weight, and the larger the difference between the current number and the preset number, the greater the increase in the undetermined weight. If the number is less than or equal to the preset number, the undetermined weight is decreased to obtain the target weight, and the larger the difference between the preset number and the current number, the greater the decrease in the undetermined weight.

[0087] In this embodiment, the device determines the access interval duration of the first data based on historical access information, and determines the target interval duration between the last time the first data was accessed in the database and the current time. The target weight of the database is determined by searching between the access interval duration and the target interval duration.

[0088] Reference Figure 4 , Figure 4 This is a third embodiment of the data verification method of this application. Based on the first or second embodiment, step S201 includes:

[0089] Step S401: Based on historical access information, determine the number of times the first data in the database is accessed in each time period, wherein each time period constitutes a time cycle.

[0090] In this embodiment, the device divides the various time periods into a time cycle. For example, a day is divided into 24 hours, and each hour is a time period. The device determines the number of times the first data in the database is accessed in each time period based on historical access information. For example, the historical access information includes the access time of the first data, the access count associated with the time period containing the access time, and 1, thereby determining the number of accesses in each time period.

[0091] Step S402: Determine the ratio between the number of accesses corresponding to the time period and the total number of times the first data is accessed in the database.

[0092] Step S403: Based on the ratio corresponding to the segmented time period matched with the current time period, determine the first probability that the first data in the database will be accessed in the current time period.

[0093] The device uses historical access information to count the total number of times the first data was accessed, and then calculates the ratio between the number of accesses in each time period and the total number of accesses. In other words, each time period is associated with a ratio.

[0094] The device determines the time segment that matches the current time period. For example, if the current time period is from 9:00 AM to 10:00 AM, then the time segment that matches the current time period is also from 9:00 AM to 10:00 AM. Based on the ratio of the time segments that match the current time period, the device determines the first probability of the first data. In one example, the ratio can be used as the first probability.

[0095] In another example, the first probability can be determined based on the ratio of the number of time segments to the number of time segments that match the current time segment; that is, the first probability is obtained by dividing the ratio by the number.

[0096] In this embodiment, the device determines the number of times the first data in the database is accessed in each divided time period based on historical access information, and then accurately determines the first probability that the first data is accessed in the current time period based on the ratio between the number of accesses and the total number of accesses of the first data.

[0097] Reference Figure 5 , Figure 5 This is the fourth embodiment of the data verification method of this application. Based on any one of the first to third embodiments, step S201 includes:

[0098] Step S501: Obtain verification information and determine the data identifier of the data to be verified based on the verification information.

[0099] In this embodiment, the device acquires verification information, which includes a data identifier for the data to be verified. The verification information can be sent by an external device or input into the device by a verification personnel. The device extracts the data identifier from the verification information.

[0100] Step S502: Send an access information retrieval request to each database according to the data identifier. The retrieval request is used to instruct the database to provide historical access information of the first data corresponding to the data identifier.

[0101] After obtaining the data identifier, the device sends an access information retrieval request to each database. This retrieval request is used to instruct the database to provide historical access information for the first data corresponding to the data identifier.

[0102] Step S503: Receive historical access information from each database.

[0103] The device receives historical access information from each database, that is, the device obtains the historical access information of the first data with the same data identifier in the corresponding database.

[0104] In this embodiment, the device can determine the first data corresponding to the data identifier that needs to be verified based on the verification information. In other words, the device can accurately verify the data based on the verification requirements of the verification personnel.

[0105] This application also provides a data verification device, referring to... Figure 6 The data verification device 600 includes:

[0106] The first acquisition module 610 is used to acquire historical access information of each first data in the corresponding database, and determine the first probability of the first data in the database being accessed in the current time period based on the historical access information, wherein the data identifiers of each first data are the same.

[0107] The second acquisition module 620 is used to acquire the target weight corresponding to each database, and determine the second probability based on each first probability and the target weight corresponding to the first probability. The second probability is used to indicate the probability that the data corresponding to the data identifier is accessed.

[0108] The verification module 630 is used to perform consistency verification on each first data when the second probability is greater than a preset threshold. The consistency verification is used to verify whether each first data is the latest version data corresponding to the data identifier.

[0109] The sending module 640 is used to send a first prompt message to the database corresponding to the second data when each of the first data fails the consistency check. The second data is not the latest version data corresponding to the data identifier. The first prompt message is used to instruct the database where the second data is located to update the second data.

[0110] In one embodiment, the second acquisition module 620 includes:

[0111] The first determining unit is used to determine the access interval duration of the first data based on historical access information.

[0112] The second determining unit is used to determine the target interval between the last time the first data was accessed in the database and the current time point.

[0113] The third determining unit is used to determine the difference between the access interval duration and the target interval duration, and to determine the target weight of the database based on the difference. The difference and the target weight are negatively correlated.

[0114] In one embodiment, the third determining unit includes:

[0115] The first acquisition unit is used to acquire the number of query devices currently connected to the database and determine the undetermined weight of the database based on the difference.

[0116] The correction unit is used to correct the weights to be determined based on the quantity to obtain the target weights corresponding to the database.

[0117] In one embodiment, the first acquisition module 610 includes:

[0118] The fourth determining unit is used to determine the number of times the first data in the database is accessed in each divided time period based on historical access information, wherein each divided time period constitutes a time period.

[0119] The fifth determining unit is used to determine the ratio between the number of accesses corresponding to the time period and the total number of times the first data is accessed in the database;

[0120] The sixth determining unit is used to determine the first probability that the first data in the database will be accessed in the current time period based on the ratio corresponding to the time period segment matched with the current time period.

[0121] In one embodiment, the first acquisition module 610 includes:

[0122] The second acquisition unit is used to acquire verification information and determine the data identifier of the data to be inspected based on the verification information.

[0123] The sending unit is used to send access information retrieval requests to each database according to the data identifier. The retrieval request is used to instruct the database to return the historical access information of the first data corresponding to the data identifier.

[0124] The receiving unit is used to receive historical access information from each database.

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

[0126] The verification module 630 is also used to perform compliance verification on each piece of first data when each piece of first data passes the consistency verification.

[0127] The sending module 640 is also used to send a second prompt message to each database when the first data fails the compliance check. The second prompt message is used to instruct the database to modify the first data so that the modified first data is compliant.

[0128] In one embodiment, the second acquisition module 620 includes:

[0129] The setting unit is used to set a label for the data identifier when the second probability is less than or equal to a preset threshold. The label is used to indicate that each first data corresponding to the data identifier is subjected to consistency verification during the idle time period.

[0130] Figure 7 This is a hardware structure diagram of a data verification device according to an exemplary embodiment.

[0131] The data verification device 700 may include: a processor 71, such as a CPU, a memory 72, and a transceiver 73. Those skilled in the art will understand that... Figure 7 The structure shown does not constitute a limitation on the data verification device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Memory 72 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0132] The processor 71 can call the computer program stored in the memory 72 or execute the computer execution instructions to complete all or part of the steps of the above data verification method.

[0133] Transceiver 73 is used to receive information sent by external devices and to send information to external devices.

[0134] An electronic device includes: a processor, and a memory communicatively connected to the processor;

[0135] The memory stores the instructions that the computer executes;

[0136] The processor executes computer execution instructions stored in memory to implement the data verification method as described in any of the above embodiments.

[0137] A non-transitory computer-readable storage medium, wherein when instructions (computer-executable instructions) in the storage medium are executed by the processor of a data verification device, the data verification device is able to perform the aforementioned data verification method.

[0138] A computer program product includes a computer program that, when executed by a processor of a data verification device, enables the data verification device to perform the aforementioned data verification method.

[0139] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0140] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A data verification method, characterized in that, include: Obtain historical access information of each first data in the corresponding database, and determine the first probability that the first data in the database is accessed in the current time period based on the historical access information, wherein the data identifiers of each first data are the same; Obtain the target weight corresponding to each database, and determine the second probability based on each first probability and the target weight corresponding to the first probability. The second probability is used to indicate the probability that the data corresponding to the data identifier is accessed. When the second probability is greater than a preset threshold, a consistency check is performed on each of the first data. The consistency check is used to verify whether each of the first data is the latest version data corresponding to the data identifier. When each of the first data fails the consistency check, a first prompt message is sent to the database corresponding to the second data, indicating that the second data is not the latest version data corresponding to the data identifier. The first prompt message is used to instruct the database corresponding to the second data to update the second data. The step of obtaining the target weight corresponding to each database includes: The access interval duration of the first data is determined based on the historical access information; Determine the target interval between the last time the first data was accessed in the database and the current time point; Determine the difference between the access interval duration and the target interval duration; The number of query devices currently connected to the database is obtained, and the undetermined weight of the database is determined based on the difference; the undetermined weight is corrected based on the number to obtain the target weight corresponding to the database; wherein the difference and the target weight are negatively correlated.

2. The data verification method according to claim 1, characterized in that, The step of determining the first probability that the first data in the database will be accessed in the current time period based on the historical access information includes: Based on the historical access information, the number of times the first data in the database was accessed in each time period is determined, wherein each time period constitutes a time cycle. Determine the ratio between the number of accesses corresponding to the divided time period and the total number of times the first data was accessed in the database; Based on the ratio corresponding to the segmented time period matched with the current time period, a first probability is determined that the first data in the database is accessed during the current time period.

3. The data verification method according to claim 1, characterized in that, The step of obtaining the historical access information of each first data in the corresponding database includes: Obtain verification information and determine the data identifier of the data to be verified based on the verification information; Based on the data identifier, an access information retrieval request is sent to each of the databases, and the retrieval request is used to instruct the database to provide historical access information of the first data corresponding to the data identifier. Receive the historical access information returned by each of the databases.

4. The data verification method according to claim 1, characterized in that, After the step of performing consistency verification on each of the first data, the method further includes: When each of the first data passes the consistency check, a compliance check is performed on each of the first data. If the first data fails the compliance check, a second prompt message is sent to each of the databases. The second prompt message is used to instruct the databases to modify the first data so that the modified first data is compliant.

5. The data verification method according to any one of claims 1-4, characterized in that, The step of determining the second probability based on each of the first probabilities and the target weights corresponding to the first probabilities includes: When the second probability is less than or equal to a preset threshold, a label is set for the data identifier. The label is used to indicate that each first data corresponding to the data identifier is subjected to consistency verification during the idle time period.

6. A data verification device, characterized in that, include: The first acquisition module is used to acquire historical access information of each first data in the corresponding database, and determine the first probability that the first data in the database is accessed in the current time period based on the historical access information, wherein the data identifiers of each first data are the same. The second acquisition module is used to acquire the target weight corresponding to each database, and determine the second probability based on each first probability and the target weight corresponding to the first probability. The second probability is used to indicate the probability that the data corresponding to the data identifier is accessed. The verification module is used to perform consistency verification on each of the first data when the second probability is greater than a preset threshold. The consistency verification is used to verify whether each of the first data is the latest version data corresponding to the data identifier. The sending module is used to send a first prompt message to the database corresponding to the second data when each of the first data fails the consistency check. The second data is not the latest version data corresponding to the data identifier. The first prompt message is used to instruct the database where the second data is located to update the second data. The second acquisition module includes: The first determining unit is configured to determine the access interval duration of the first data based on the historical access information. The second determining unit is used to determine the target interval between the last time the first data was accessed in the database and the current time point; The third determining unit is used to determine the difference between the access interval duration and the target interval duration, and to determine the target weight corresponding to the database based on the difference, wherein the difference and the target weight are negatively correlated. The third determining unit includes: The first acquisition unit is used to acquire the number of query devices currently connected to the database and determine the undetermined weight of the database based on the difference. The correction unit is used to correct the weight to be determined according to the quantity to obtain the target weight corresponding to the database.

7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-5.