WO2020207008A1 - Data verification method, apparatus, electronic device and storage medium - Google Patents

Data verification method, apparatus, electronic device and storage medium Download PDF

Info

Publication number
WO2020207008A1
WO2020207008A1 PCT/CN2019/116968 CN2019116968W WO2020207008A1 WO 2020207008 A1 WO2020207008 A1 WO 2020207008A1 CN 2019116968 W CN2019116968 W CN 2019116968W WO 2020207008 A1 WO2020207008 A1 WO 2020207008A1
Authority
WO
WIPO (PCT)
Prior art keywords
data table
target
target data
verification
source
Prior art date
Application number
PCT/CN2019/116968
Other languages
French (fr)
Chinese (zh)
Inventor
袁文涛
Original Assignee
平安普惠企业管理有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安普惠企业管理有限公司 filed Critical 平安普惠企业管理有限公司
Publication of WO2020207008A1 publication Critical patent/WO2020207008A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Definitions

  • This application relates to the field of computer technology, and in particular to a data verification method, device, electronic equipment, and storage medium.
  • the embodiments of the present application provide a data verification method, device, electronic equipment, and storage medium, which can automatically verify the consistency of the target data table and the source data table, save resources, and improve verification efficiency.
  • an embodiment of the present application provides a data verification method, which includes:
  • the attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
  • a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
  • the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
  • an embodiment of the present application provides a data verification device, which includes:
  • the acquisition module is used to acquire the target data table, the source data table, and the attribute information of the target data table.
  • the attribute information of the target data table includes any one or more of the following: the data volume of the target data table, The type of the target data table, the number of times the target data table is queried, and the time when the target data table is established;
  • a determining module configured to determine a target verification strategy for the consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
  • the acquisition module is further configured to acquire the data write status of the source data table, the data write status includes a locked state and an unlocked state, and the locked state is used to indicate that writing to the source data table is suspended Data, the unlocked state may indicate writing data to the source data table;
  • the verification module is configured to verify whether the target data table is consistent with the source data table according to the target verification strategy if the write data state of the source data table is locked.
  • an embodiment of the present application provides an electronic device, the electronic device includes: a processor, adapted to implement one or more instructions; and,
  • a computer non-volatile readable storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by the processor and executed as steps:
  • the attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
  • a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
  • the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
  • embodiments of the present application provide a computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores one or more instructions, and the one or more instructions are suitable for Loaded by the processor and execute the following steps:
  • the attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
  • a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
  • the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
  • the electronic device can select a target verification strategy for verifying the consistency of the target data table according to the attribute information of the target data table, and verify according to the target verification strategy when the write data status of the source data table is locked.
  • the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification. Automatically verify the consistency of the target data table according to the target verification strategy, without manual participation, and improve the efficiency of consistency verification.
  • the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
  • FIG. 1 is a schematic flowchart of a data verification method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of another data verification method provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a data verification device provided by an embodiment of the present application.
  • Fig. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • embodiments of this application provide a data verification method, which can be executed by an electronic device, which can refer to a smart terminal, a server, or a computer, etc.
  • an electronic device which can refer to a smart terminal, a server, or a computer, etc.
  • a device that can be used for storage can refer to a smart terminal, a server, or a computer, etc.
  • the specific implementation process of this method includes: the electronic device can obtain the target data table to be verified, and the attribute information of the target data table, and determine the target for consistency verification of the target data table according to the attribute information of the target table Verification strategy, according to the target verification strategy to verify whether the target data table is consistent with the source data table; the consistency verification strategy can be flexibly selected according to the attribute information of the target data table, and the consistency verification of the target data table is automatically performed according to the selected consistency verification strategy , Improve the efficiency of verification; do not require manual participation, save manpower, to reduce the cost of data verification.
  • FIG. 1 is a schematic flowchart of a data verification method provided by an embodiment of the present application.
  • the method of the embodiment of the present application may be executed by the above-mentioned electronic device.
  • the data verification method includes the following steps.
  • the attribute information of the target data table includes any one or more of the following: the amount of data in the target data table, the type of the target data table, The number of times the target data table was queried and the time when the target data table was created.
  • the management database system usually consists of one management node and multiple processing nodes.
  • the management node includes all data tables in the cluster database system.
  • the electronic device in this embodiment of the application is the processing node.
  • the electronic device can copy the source data table from the management node to obtain the target data table, and store the target data table in the local database.
  • the data table is tampered with, which results in inconsistencies between the target data table and the source data table, which affects the normal processing of data services. Therefore, in this scenario, the source data table and the target data table need to be verified for consistency.
  • the electronic device can obtain the source data table from the main management node, and obtain the target data table and the attribute information of the target data table from the local database.
  • the source data table in the database management needs to be backed up to obtain the backup data (ie The target data table), because in the process of backing up the source data table, the target data table is inconsistent with the source data table due to equipment performance or operational errors. Therefore, in this scenario, it is necessary to verify the consistency of the source data table and the target data table.
  • the electronic device can obtain the source data table from the original database management system, and obtain the target data table and the target data table from the database management system after the replacement or upgrade. The attribute information of the target data table.
  • the historical consistency verification identifier of the data table in the data management system is acquired.
  • the historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency.
  • the data The management system obtains the data table that has not been verified for consistency, and uses the data table that has not been verified for consistency as the target data table.
  • the data management system can include multiple data tables.
  • the electronic device can perform consistency verification on newly added data tables in the database management system to save resources. Specifically, the electronic device can obtain the historical consistency verification flag of the data table in the data management system, and obtain the data table that has not been verified for consistency from the data management system according to the historical consistency verification flag, that is, the data table that has not been verified for consistency
  • the data table can be a newly-added data table, and the electronic device can use the data table that has not been verified for consistency as the target data table, so as to perform consistency verification on the newly-added data table.
  • the historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency
  • the identifier of the data table may be the name, number, or storage address of the data table, etc.
  • S102 Determine a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, where the target verification strategy includes a verification strategy based on data content or a verification strategy based on statistical information.
  • the electronic device can determine the target verification strategy for the consistency verification of the target data table according to the attribute information of the target data table, where the target verification strategy may include a verification strategy based on data content Or the verification strategy based on statistical information, the verification strategy based on data content needs to verify the data content of the data table, that is, the verification strategy based on data content can be a more sophisticated verification strategy; the verification strategy based on statistical information needs to verify the data table The statistical information is verified, that is, the verification strategy based on the statistical information can be a rough verification strategy.
  • the electronic device can obtain the write data status of the target data table.
  • the data state can be an unlocked state and a locked state.
  • the unlocked state can mean that data can be written to the source data table
  • the locked state can mean that data writing to the source data table is suspended.
  • step S103 includes: obtaining log data about the source data table, and determining the number of times that data is written to the source data table in the current time period according to the log data in the source data table; If the number of times is less than the preset number, it is determined that the data write status of the source data table is locked; if the number of times of writing data to the source data table in the current time period is less than or equal to the preset number of times, it is determined that the data write status of the source data table is not Locked state.
  • the current time period is from 2:00 to 3:00 at night.
  • the log data of the source data table the total number of times to write data to the source data table is determined to be 100 times. Only one time is to write data to the source data table in the current time period. Therefore, it is determined that the probability of writing data to the source data table in the current time period is low, and it can be determined that the data writing state of the source data table is the locked state.
  • the database management system can include the data writing function of the source data table.
  • the data writing function of the source data table can be turned on; when the consistency of the target data table needs to be detected When it is not, you can turn off the data writing function of the source data table. Therefore, the electronic device can detect the on or off state of the data writing function of the source data table, and determine the data writing state of the source data table. For example, if it is detected that the data writing function of the source data table is turned on, it is determined that the data writing state of the source data table is unlocked; if it is detected that the data writing function of the source data table is off, it is determined that the source The write data status of the data table is locked.
  • S104 If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the target verification strategy.
  • the write data state of the source data table is locked, it can be verified whether the target data table is consistent with the source data table according to the target verification strategy.
  • step S104 after step S104, it further includes: generating a verification report according to the verification result, and returning the verification report, so that the user can understand the verification result in real time.
  • the verification report may include the verification time, the result of whether the target data table is consistent with the source data table, and the data content of the inconsistent data when the target data table is inconsistent with the source data table, and so on.
  • the number of times each data table in the database management system has been queried is acquired, and the number of queries is less than the preset number of times.
  • the data table and the corresponding source data table are deleted.
  • the electronic device can obtain each data in the database management system.
  • the number of times that the data table is queried If the number of queries of the data table is less than the preset number, it indicates that the importance of the data table is low, and the data table with the number of queries less than the preset number and the corresponding source data table can be deleted; If the number of queries is greater than or equal to the preset number, it indicates that the importance of the data table is high, and the data table can be retained.
  • the electronic device can select a target verification strategy for verifying the consistency of the target data table according to the attribute information of the target data table, and verify according to the target verification strategy when the write data status of the source data table is locked.
  • the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification. Automatically verify the consistency of the target data table according to the target verification strategy, without manual participation, and improve the efficiency of consistency verification.
  • the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
  • FIG. 2 is a schematic flowchart of another data verification method provided by an embodiment of the present application.
  • the method of the embodiment of the present application may be executed by the above-mentioned electronic device.
  • the data verification method includes the following steps.
  • S201 Obtain a target data table, a source data table, and attribute information of the target data table, where the attribute information of the target data table includes any one or more of the following: the amount of data in the target data table, the type of the target data table, The number of times the target data table was queried and the time when the target data table was created.
  • S202 Determine a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, where the target verification strategy includes a verification strategy based on data content or a verification strategy based on statistical information.
  • the attribute information of the target data table includes the type of the target data table
  • step S202 includes: obtaining the importance level of the target data table according to the type of the target data table, if the importance level of the target data table is less than Preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table, and if the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content The verification strategy is determined as the target verification strategy for the consistency verification of the target data table.
  • the electronic device can determine the type of the target data table according to the data content in the target data table or the name of the target data table, and obtain the importance level of the target data table according to the type of the target data table.
  • the statistical information-based verification strategy can be determined as the target verification strategy for the consistency verification of the target data table, that is, a rough verification strategy is selected; If the importance level of the target data table is greater than or equal to the preset level, it indicates that the importance of the target data table is relatively high, and the verification strategy based on the data content can be determined as the target verification for the consistency verification of the target data table Strategy, that is, choose a sophisticated verification strategy.
  • the target data table type is an audit data table
  • the audit data table is usually related to the user’s finances and is of higher importance. Therefore, you can set a higher importance level for the target data table and select a data content-based
  • the verification strategy verifies the consistency of the target data table; if the type of the target data table is an employee data table, the importance of the target data table is relatively low, and a lower importance level can be set for the target data table and can be selected
  • the verification strategy based on statistical information verifies the consistency of the target data table.
  • the content verification strategy verifies the consistency of the target data table; if the type of the target data table is a data table including a list of hospitals in a certain area, the importance of the target data table is relatively low, and a lower value can be set for the target data table , And you can choose a verification strategy based on statistical information to verify the consistency of the target data table.
  • the attribute information of the target data table includes the number of times the target data table is queried
  • step S202 includes: obtaining the importance level of the target data table according to the number of times the target data table is queried. If the importance level of the table is less than the preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table. If the importance level of the target data table is greater than or equal to the preset level, then The verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
  • the target data is queried more times, it indicates that the importance of the target data table is higher, and a more refined verification strategy can be used to verify the data table to improve the accuracy of the verification; on the contrary, if the target data table is queried If the number of times is less, it indicates that the importance of the target data table is low.
  • a rough verification strategy can be used to verify the data table to improve the efficiency of verification; therefore, the verification strategy can be selected according to the number of times the target data table is queried.
  • the electronic device may determine the number of times the target data table is queried according to the log data of the target data table, and obtain the importance level of the target data table according to the number of times the target data table is queried; if the importance level of the target data table is If it is less than the preset level, it indicates that the importance of the target data table is relatively low, and the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table, that is, a relatively rough verification strategy is selected; If the importance level of the target data table is greater than or equal to the preset level, the importance of the target data table is relatively high, and the verification strategy based on the data content can be determined as the target verification strategy for the consistency verification of the target data table, namely Choose a sophisticated verification strategy.
  • the attribute information of the target data table includes the number of times the target data table is queried and the type of the target data table
  • step S202 includes: the electronic device may query the target data table according to the number of times the target data table is queried and the target data table.
  • the type of the data table sets the first weight and the second weight for the target data table, and obtains the corresponding value of the target data table type, the number of times the target data table is queried, the corresponding value of the target data table type, Perform a weighted summation of the first weight and the second weight to obtain the weight of the target data table, and set the importance level of the target data table according to the weight of the target data table.
  • the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table, and if the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content Determine the target verification strategy for the consistency verification of the target data table.
  • the type of the target data table is an audit data table
  • the corresponding value of the target data table type is 3
  • the number of times the target data table is queried is 10
  • the target data is set according to the number of times the target data table is queried
  • the first weight value of the target data table is 5, and the second weight value of the target data table is set to 4 according to the type of the target data table.
  • the number of times the target data table is queried, the corresponding value of the target data table type, and the first weight value Perform a weighted summation with the second weight, that is, 5*10+3*4 22, then the weight of the target data table is 22, and the importance level of the target data table can be set according to the weight of the target data table, namely The greater the weight, the greater the importance level. If the importance level of the target data table is less than the preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table. If the importance level of the table is greater than or equal to the preset level, the verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
  • the attribute information of the target data table includes the data amount of the target data table
  • step S202 includes: if the data amount of the target data table is greater than a preset value, determining the verification strategy based on statistical information It is the target verification strategy for the consistency verification of the target data table; if the data volume of the target data table is less than or equal to the preset value, the verification strategy based on the data content is determined as the consistency verification of the target data table Target verification strategy.
  • the verification efficiency of the strategy is higher than that of the verification strategy based on the data content. Therefore, in order to improve the efficiency of data sheet verification, a verification strategy can be selected according to the number of data sheets included.
  • the electronic device can obtain the data volume of the target data table, and if the data volume of the target data table is greater than the preset value, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table , That is, select a verification strategy with higher verification efficiency to improve verification efficiency; if the data amount of the target data table is less than or equal to the preset value, it indicates that the amount of data in the target data table itself is small, so it can be based on the data content
  • the verification strategy is determined as the target verification strategy for the consistency verification of the target data table, and the accuracy of the verification of the target data table is improved.
  • the attribute information of the target data table includes the time when the target data table is established
  • step S202 includes: if the time interval between the system time and the time when the target data table is established is greater than the preset time interval, then Determine the statistical information-based verification strategy as the target verification strategy for the consistency verification of the target data table; if the time interval between the system time and the time when the target data table is established is less than or equal to the preset time interval, then The verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
  • the electronic device can select a verification strategy according to the establishment time of the target data table. Specifically, if the time interval between the system time and the establishment time of the target data table is greater than the preset time interval, it indicates the probability that the target data table has been verified Therefore, the statistical information-based verification strategy can be determined as the target verification strategy for the consistency verification of the target data table to improve the verification efficiency; if the time interval between the system time and the time when the target data table is established Less than or equal to the preset time interval, it indicates that the probability that the target data table has been verified is low. Therefore, the verification strategy based on the data content can be determined as the target verification strategy for the consistency verification of the target data table. Improve the accuracy of verification.
  • step S204 includes: comparing the data content of the target data table with the data content of the source data table, and if the data content of the target data table is the same as the data content of the source data table, determining There is consistency between the target data table and the source data table; if the data content of the target data table is different from the data content of the source data table, it is determined that the target data table is inconsistent with the source data table.
  • the electronic device can compare the data content of the target data table with the data content of the source data table, that is, the correspondence between each row of the target data table and the source data table Compare the row data. If the data content of the target data table is the same as the data content of the source data table, that is, each row of data in the target data table is the same as the corresponding row data of the source data table, indicating that the target data table and the source data The tables are the same, that is, it is determined that there is consistency between the target data table and the source data table; if the data content of the target data table is different from the data content of the source data table, that is, at least one row of data in the target data table is The corresponding row data of the source data table is different, indicating that the data content of the target data table has been tampered with, and it is determined that the target data table is inconsistent with the source data table.
  • step S204 includes: the electronic device may encrypt the data content of the target data table to obtain the first hash value, and obtain the second hash value obtained by encrypting the data content of the source data table , Compare the first hash value with the second hash value, if the two are the same, determine the consistency between the target data table and the source data table; if the two are not the same, determine the target data The table is inconsistent with the source data table.
  • the electronic device can compare the hash value of the data content of the target data table with the hash value of the data content of the source data table, if the two are the same , It is determined that there is consistency between the target data table and the source data table; if the two are not the same, it is determined that the target data table is inconsistent with the source data table.
  • step S205 includes: obtaining statistical information of the target data table and the source data table, and the statistical information includes any one or more of the following: data amount, field number, row number, and column number. If the statistical information of the target data table is the same as the attribute information of the source data table, it is determined that there is consistency between the target data table and the source data table; if the statistical information of the target data table is different from the attribute information of the source data table If they are the same, it is determined that the target data table is inconsistent with the source data table.
  • the electronic device can obtain the statistical information of the target data table and the source data table. If the statistical information of the target data table is the same as the attribute information of the source data table, then Determine the consistency between the target data table and the source data table, that is, determine that the data content of the target data table is the same as the data content of the source data table; if the statistical information of the target data table is the same as the attribute of the source data table If the information is not the same, it indicates that the data content of the target data table is inconsistent with the data content of the source data table, and it is determined that the target data table is inconsistent with the source data table.
  • the electronic device may select a target verification strategy for performing consistency verification on the target data table according to the attribute information of the target data table. If the target verification strategy is a verification strategy based on data content, and the source data table is written If the data state is locked, a verification strategy based on data content can be used to verify whether the target data table is consistent with the source data table; if the target verification strategy is a verification strategy based on statistical information, and the write data state of the source data table is If the state is locked, a statistical information-based verification strategy can be used to verify whether the target data table is consistent with the source data table; the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification.
  • the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
  • FIG. 3 is a schematic structural diagram of a data verification apparatus provided by an embodiment of the present application.
  • the apparatus of the embodiment of the present application may be set in the aforementioned electronic device.
  • the device includes:
  • the obtaining module 301 is configured to obtain a target data table, a source data table, and attribute information of the target data table.
  • the attribute information of the target data table includes any one or more of the following: the data volume of the target data table, The type of the target data table, the number of times the target data table is queried, and the time when the target data table is established;
  • the determining module 302 is configured to determine a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
  • the acquiring module 301 is also used to acquire the write data state of the source data table, the write data state includes a locked state and an unlocked state, and the locked state is used to indicate a pause to the source data table.
  • Writing data, the unlocked state may indicate writing data to the source data table;
  • the verification module 303 is configured to verify whether the target data table is consistent with the source data table according to the target verification strategy if the write data state of the source data table is the locked state.
  • the attribute information of the target data table includes the type of the target data table and/or the number of times the target data table is queried.
  • the determining module 302 is specifically configured to obtain the attribute information of the target data table.
  • the importance level of the target data table if the importance level of the target data table is less than a preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table; if If the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
  • the attribute information of the target data table includes the data volume of the target data table or the time when the target data table is established
  • the determining module 302 is specifically configured to: if the data volume of the target data table is greater than a preset Value, or the time interval between the system time and the time when the target data table is established is greater than the preset time interval, then the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table ; If the data volume of the target data table is less than or equal to the preset value, or the time interval between the system time and the time when the target data table is established is less than or equal to the preset time interval, then the The verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
  • the verification module 303 is specifically configured to compare the data content of the target data table with the data content of the source data table; if the data content of the target data table is compared with the data content of the source data table If the content is the same, it is determined that there is consistency between the target data table and the source data table; if the data content of the target data table is different from the data content of the source data table, the target data table is determined Inconsistent with the source data table.
  • the verification module 303 is specifically configured to obtain statistical information of the target data table and the source data table, where the statistical information includes any one or more of the following: data amount, field number, row number, and column If the statistical information of the target data table is the same as the statistical information of the source data table, it is determined that there is consistency between the target data table and the source data table; if the statistical information of the target data table If the statistical information is different from the source data table, it is determined that the target data table is inconsistent with the source data table.
  • the acquiring module 301 is specifically configured to acquire the historical consistency verification identifier of the data table in the data management system.
  • the historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency; according to the history
  • the consistency verification identifier obtains a data table that has not been verified for consistency from the data management system; and uses the data table that has not been verified for consistency as a target data table.
  • the deleting module 304 is configured to, if the amount of data in the database management system storing the target data table is greater than the preset data amount, obtain the number of times each data table in the database management system has been queried; The data tables whose times are less than the preset times and the corresponding source data tables are deleted.
  • the electronic device can select a target verification strategy for verifying the consistency of the target data table according to the attribute information of the target data table, and verify according to the target verification strategy when the write data status of the source data table is locked.
  • the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification. Automatically verify the consistency of the target data table according to the target verification strategy, without manual participation, and improve the efficiency of consistency verification.
  • the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device in this embodiment may include: one or more processors 401; one or more input devices 402 , One or more output devices 403 and memory 404.
  • the aforementioned processor 401, input device 402, output device 403, and memory 404 are connected via a bus 405.
  • the processor 401 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (ASICs). ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the input device 402 may include a touch panel, a fingerprint sensor (used to collect user fingerprint information and fingerprint orientation information), a microphone, etc.
  • the output device 403 may include a display (LCD, etc.), a speaker, and the like.
  • the memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A part of the memory 404 may also include a non-volatile random access memory.
  • the memory 404 is used to store a computer program.
  • the computer program includes program instructions.
  • the processor 401 is used to execute the program instructions stored in the memory 404 to execute a A data verification method that is used to perform the following operations:
  • the attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
  • a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
  • the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
  • the processor is used to call the program instructions stored in the memory to perform the following operations:
  • the verification strategy based on statistical information as the target verification strategy for the consistency verification of the target data table
  • the verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
  • the processor is used to call the program instructions stored in the memory to perform the following operations:
  • the statistical information-based verification strategy is determined to be correct
  • the The verification strategy of the data content is determined as the target verification strategy for the consistency verification of the target data table.
  • the processor is used to call the program instructions stored in the memory to perform the following operations:
  • the data content of the target data table is the same as the data content of the source data table, it is determined that there is consistency between the target data table and the source data table;
  • the target data table is inconsistent with the source data table.
  • the processor is used to call the program instructions stored in the memory to perform the following operations:
  • Acquire statistical information of the target data table and the source data table where the statistical information includes any one or more of the following: data amount, field number, row number, and column number;
  • the statistical information of the target data table is the same as the statistical information of the source data table, it is determined that there is consistency between the target data table and the source data table;
  • the target data table is inconsistent with the source data table.
  • the processor is used to call the program instructions stored in the memory to perform the following operations:
  • the data table that has not been verified for consistency is used as the target data table.
  • the processor is used to call the program instructions stored in the memory to perform the following operations:
  • the processor 401, input device 402, and output device 403 described in the embodiments of this application can execute the implementations described in the first and second embodiments of the data verification method provided in the embodiments of this application, and can also execute The implementation of the electronic device described in the embodiment of the application will not be repeated here.
  • the embodiment of the present application also provides a computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions are processed
  • the data verification method shown in the embodiment of FIG. 1 and FIG. 2 of the present application is implemented when the device is executed.
  • the computer non-volatile readable storage medium may be the internal storage unit of the medical management device described in any of the foregoing embodiments, such as a hard disk or memory of the control device.
  • the computer non-volatile readable storage medium may also be an external storage device of the control device, such as a plug-in hard disk equipped on the control device, a Smart Media Card (SMC), a secure digital ( Secure Digital, SD card, Flash Card, etc.
  • SMC Smart Media Card
  • secure digital Secure Digital, SD card, Flash Card
  • the computer non-volatile readable storage medium may also include both an internal storage unit of the control device and an external storage device.
  • the computer non-volatile readable storage medium is used to store the computer program and other programs and data required by the control device.
  • the computer non-volatile readable storage medium can also be used to temporarily store data that has been output or will be output.
  • the disclosed control device and method can be implemented in other ways.
  • the device embodiments described above are illustrative.
  • the division of the units may be a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented.
  • the above are only specific implementations of this application, but the protection scope of this application is not limited to this.
  • anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

A data verification method, an apparatus, an electronic device and a storage medium, wherein the method comprises: obtaining a destination data table, a source data table and attribute information of the destination data table (S101), determining a destination verification strategy for consistency verification on the destination data table according to the attribute information of the destination data table (S102), obtaining a write data status of the source data table (S103), if the write data status of the source data table is a locked state, verifying whether the destination data table is consistent with the source data table according to the destination verification strategy (S104). Consistency verification on the destination data table and the source data table can be automatically performed, the resources can be saved, and the verification efficiency can be improved.

Description

一种数据验证方法、装置、电子设备及存储介质Data verification method, device, electronic equipment and storage medium
本申请要求于2019年04月12日提交中国专利局、申请号为2019102974538、申请名称为“一种数据验证方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 2019102974538, and the application name is "a data verification method, device, electronic equipment, and storage medium" on April 12, 2019. The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种数据验证方法、装置、电子设备及存储介质。This application relates to the field of computer technology, and in particular to a data verification method, device, electronic equipment, and storage medium.
背景技术Background technique
随着大数据时代的到来,大数据的应用和处理越来越频繁,大数据一致性对比成为大数据中的一个关键应用。比如,在数据管理系统更换时需要确定更换前后的大数据是否一致;算法优化前后计算结果是否一致;数据迁移前后是否一致等等。当前主要是通过人工对比的方式来验证目标数据与源数据是否一致,需要投入大量的时间和人力,效率较低。With the advent of the big data era, the application and processing of big data become more frequent, and the comparison of big data consistency has become a key application in big data. For example, when the data management system is replaced, it is necessary to determine whether the big data before and after the replacement is consistent; whether the calculation results before and after the algorithm optimization are consistent; whether the data is consistent before and after the data migration, and so on. Currently, manual comparison is mainly used to verify whether the target data is consistent with the source data, which requires a lot of time and manpower, and the efficiency is low.
发明内容Summary of the invention
本申请实施例提供一种数据验证方法、装置、电子设备及存储介质,可自动对目标数据表与源数据表进行一致性验证,节省资源,提高验证效率。The embodiments of the present application provide a data verification method, device, electronic equipment, and storage medium, which can automatically verify the consistency of the target data table and the source data table, save resources, and improve verification efficiency.
第一方面,本申请实施例提供了一种数据验证方法,该方法包括:In the first aspect, an embodiment of the present application provides a data verification method, which includes:
获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;Obtain the target data table, the source data table, and the attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;Determining a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据,所述未锁住状态可以指示向所述源数据表写数据;Acquire the write data state of the source data table, the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the target verification strategy.
第二方面,本申请实施例提供了一种数据验证装置,该数据验证装置包括:In a second aspect, an embodiment of the present application provides a data verification device, which includes:
获取模块,用于获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;The acquisition module is used to acquire the target data table, the source data table, and the attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, The type of the target data table, the number of times the target data table is queried, and the time when the target data table is established;
确定模块,用于根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;A determining module, configured to determine a target verification strategy for the consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
所述获取模块,还用于获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据, 所述未锁住状态可以指示向所述源数据表写数据;The acquisition module is further configured to acquire the data write status of the source data table, the data write status includes a locked state and an unlocked state, and the locked state is used to indicate that writing to the source data table is suspended Data, the unlocked state may indicate writing data to the source data table;
验证模块,用于若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。The verification module is configured to verify whether the target data table is consistent with the source data table according to the target verification strategy if the write data state of the source data table is locked.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括:处理器,适于实现一条或一条以上指令;以及,In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes: a processor, adapted to implement one or more instructions; and,
计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有一条或一条以上指令,所述一条或一条以上指令适于由所述处理器加载并执行如步骤:A computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by the processor and executed as steps:
获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;Obtain the target data table, the source data table, and the attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;Determining a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据,所述未锁住状态可以指示向所述源数据表写数据;Acquire the write data state of the source data table, the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the target verification strategy.
第四方面,本申请实施例提供了一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有一条或一条以上指令,所述一条或一条以上指令适于由处理器加载并执行如下步骤:In a fourth aspect, embodiments of the present application provide a computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores one or more instructions, and the one or more instructions are suitable for Loaded by the processor and execute the following steps:
获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;Obtain the target data table, the source data table, and the attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;Determining a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据,所述未锁住状态可以指示向所述源数据表写数据;Acquire the write data state of the source data table, the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the target verification strategy.
本申请实施例中,电子设备可以根据目标数据表的属性信息选择对目标数据表进行一致性验证的目标验证策略,并在源数据表的写数据状态为锁住状态时,根据目标验证策略验证目标数据表与源数据表是否一致;可以根据目标数据表的属性信息动态选择一致性验证的策略,提高一致性验证的灵活性。根据目标验证策略自动对目标数据表进行一致性验证,不需要人工参与,提高一致性验证的效率。另外,在源数据表写数据状态为锁住状态时,对目标数据表进行一致性验证,可避免向源数据表中写数据带来干扰,提高对目标数据表进行一致性验证的效率。In the embodiment of the present application, the electronic device can select a target verification strategy for verifying the consistency of the target data table according to the attribute information of the target data table, and verify according to the target verification strategy when the write data status of the source data table is locked. Whether the target data table is consistent with the source data table; the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification. Automatically verify the consistency of the target data table according to the target verification strategy, without manual participation, and improve the efficiency of consistency verification. In addition, when the write data status of the source data table is locked, the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例, 对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1是本申请实施例提供的一种数据验证方法的流程示意图;FIG. 1 is a schematic flowchart of a data verification method provided by an embodiment of the present application;
图2是本申请实施例提供的另一种数据验证方法的流程示意图;2 is a schematic flowchart of another data verification method provided by an embodiment of the present application;
图3是本申请实施例提供的一种数据验证装置的结构示意图;FIG. 3 is a schematic structural diagram of a data verification device provided by an embodiment of the present application;
图4是本申请实施例提供的一种电子设备的结构示意图。Fig. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
基于现有技术中,数据一致性验证方法效率较低的问题,本申请实施例提供一种数据验证方法,该方法可以由电子设备来执行,该电子设备可以是指智能终端、服务器或电脑等可用于存储的设备,该方法的具体实现过程包括:电子设备可以获取待验证的目标数据表,及目标数据表的属性信息,根据目标表的属性信息确定对目标数据表进行一致性验证的目标验证策略,根据目标验证策略验证目标数据表与源数据表是否一致;可根据目标数据表的属性信息灵活选择一致性验证策略,并根据选择的一致性验证策略自动对目标数据表进行一致性验证,提高验证效率;不需要人工参与,节省人力,以降低数据验证的成本。Based on the problem of low efficiency of data consistency verification methods in the prior art, embodiments of this application provide a data verification method, which can be executed by an electronic device, which can refer to a smart terminal, a server, or a computer, etc. A device that can be used for storage. The specific implementation process of this method includes: the electronic device can obtain the target data table to be verified, and the attribute information of the target data table, and determine the target for consistency verification of the target data table according to the attribute information of the target table Verification strategy, according to the target verification strategy to verify whether the target data table is consistent with the source data table; the consistency verification strategy can be flexibly selected according to the attribute information of the target data table, and the consistency verification of the target data table is automatically performed according to the selected consistency verification strategy , Improve the efficiency of verification; do not require manual participation, save manpower, to reduce the cost of data verification.
请参见图1,是本申请实施例提供的一种数据验证方法的流程示意图,本申请实施例的所述方法可以由上述提及的电子设备来执行。本实施例中,该数据验证方法包括以下步骤。Please refer to FIG. 1, which is a schematic flowchart of a data verification method provided by an embodiment of the present application. The method of the embodiment of the present application may be executed by the above-mentioned electronic device. In this embodiment, the data verification method includes the following steps.
S101、获取目标数据表、源数据表及该目标数据表的属性信息,该目标数据表的属性信息包括以下任一项或多项:该目标数据表的数据量、该目标数据表的类型、该目标数据表被查询的次数以及该目标数据表建立的时间。S101. Obtain a target data table, a source data table, and attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the amount of data in the target data table, the type of the target data table, The number of times the target data table was queried and the time when the target data table was created.
在一个实施例中,在管理数据库系统中,通常由一个管理节点和多个处理节点构成,管理节点中包括集群数据库系统中的所有数据表,本申请实施例中的电子设备就为处理节点,为了处理数据业务,该电子设备可以从管理节点对源数据表进行复制,得到目标数据表,并将目标数据表存储于本地数据库中。由于在对源数据表复制的过程中,存在数据表被篡改的情况,导致目标数据表与源数据表不一致,进而影响数据业务的正常处理。因此,此场景下需要对源数据表和目标数据表进行一致性验证,电子设备可以从主管理节点中获取源数据表,并从本地数据库中获取目标数据表,及目标数据表的属性信息。In one embodiment, the management database system usually consists of one management node and multiple processing nodes. The management node includes all data tables in the cluster database system. The electronic device in this embodiment of the application is the processing node. In order to process data services, the electronic device can copy the source data table from the management node to obtain the target data table, and store the target data table in the local database. In the process of copying the source data table, the data table is tampered with, which results in inconsistencies between the target data table and the source data table, which affects the normal processing of data services. Therefore, in this scenario, the source data table and the target data table need to be verified for consistency. The electronic device can obtain the source data table from the main management node, and obtain the target data table and the attribute information of the target data table from the local database.
在另一个实施例中,该数据库管理系统需要更换或升级的场景下,或者,该数据库管理系统的存储空间不足的情况下,需要对数据库管理中的源数据表进行备份,得到备份数据(即目标数据表),由于在对源数据表进行备份的过程中,存在由于设备的性能或操作失误等情况,导致目标数据表与源数据表不一致。因此,此场景下需要对源数据表和目标数据表进行一致性验证,电子设备可以从原始该数据库管理系统获取源数据表,并从更换后或升级后的数据库管理系统中获取目标数据表及目标数据表的属性信息。In another embodiment, in a scenario where the database management system needs to be replaced or upgraded, or when the storage space of the database management system is insufficient, the source data table in the database management needs to be backed up to obtain the backup data (ie The target data table), because in the process of backing up the source data table, the target data table is inconsistent with the source data table due to equipment performance or operational errors. Therefore, in this scenario, it is necessary to verify the consistency of the source data table and the target data table. The electronic device can obtain the source data table from the original database management system, and obtain the target data table and the target data table from the database management system after the replacement or upgrade. The attribute information of the target data table.
在一个实施例中,获取数据管理系统中的数据表的历史一致性验证标识,该历史一致性验证标识是指已被一致性验证的数据表的标识,根据该历史一致性验证标识从该数据管理系统中获取未被一致性验证的数据表,将该未被一致性验证 的数据表作为目标数据表。In one embodiment, the historical consistency verification identifier of the data table in the data management system is acquired. The historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency. According to the historical consistency verification identifier, the data The management system obtains the data table that has not been verified for consistency, and uses the data table that has not been verified for consistency as the target data table.
数据管理系统中可以包括多个数据表,为了避免对所有的数据表进行一致性验证,电子设备可以对数据库管理系统中新增的数据表进行一致性验证,以节省资源。具体的,电子设备可以获取数据管理系统中的数据表的历史一致性验证标识,根据该历史一致性验证标识从该数据管理系统中获取未被一致性验证的数据表,即未被一致性验证的数据表可以为新增的数据表,电子设备可以将该未被一致性验证的数据表作为目标数据表,以便对新增的数据表进行一致性验证。其中,该历史一致性验证标识是指已被一致性验证的数据表的标识,数据表的标识可以为数据表的名称、编号或存储地址等等。The data management system can include multiple data tables. In order to avoid consistency verification of all data tables, the electronic device can perform consistency verification on newly added data tables in the database management system to save resources. Specifically, the electronic device can obtain the historical consistency verification flag of the data table in the data management system, and obtain the data table that has not been verified for consistency from the data management system according to the historical consistency verification flag, that is, the data table that has not been verified for consistency The data table can be a newly-added data table, and the electronic device can use the data table that has not been verified for consistency as the target data table, so as to perform consistency verification on the newly-added data table. Wherein, the historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency, and the identifier of the data table may be the name, number, or storage address of the data table, etc.
S102、根据该目标数据表的属性信息确定对该目标数据表一致性验证的目标验证策略,该目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略。S102: Determine a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, where the target verification strategy includes a verification strategy based on data content or a verification strategy based on statistical information.
为了对目标数据表进行验证的灵活性,电子设备可以根据该目标数据表的属性信息确定对该目标数据表一致性验证的目标验证策略,其中,该目标验证策略可以包括基于数据内容的验证策略或基于统计信息的验证策略,基于数据内容的验证策略需要对数据表的数据内容进行验证,即基于数据内容的验证策略可以为比较精细的验证策略;基于统计信息的验证策略需要对数据表的统计信息进行验证,即基于统计信息的验证策略可以为粗略的验证策略。In order to verify the flexibility of the target data table, the electronic device can determine the target verification strategy for the consistency verification of the target data table according to the attribute information of the target data table, where the target verification strategy may include a verification strategy based on data content Or the verification strategy based on statistical information, the verification strategy based on data content needs to verify the data content of the data table, that is, the verification strategy based on data content can be a more sophisticated verification strategy; the verification strategy based on statistical information needs to verify the data table The statistical information is verified, that is, the verification strategy based on the statistical information can be a rough verification strategy.
S103、获取该源数据表的写数据状态。S103. Obtain the data write status of the source data table.
为了避免在对目标数据表进行一致性验证的过程中,由于向源数据表中写入数据,导致目标数据表与源数据表不一致,电子设备可以获取该目标数据表的写数据状态,该写数据状态可以为未锁定状态和锁定状态,未锁定状态可以是指可以向源数据表中写入数据,锁定状态可以是指暂停向源数据表中写入数据。In order to avoid the inconsistency between the target data table and the source data table due to writing data to the source data table in the process of verifying the consistency of the target data table, the electronic device can obtain the write data status of the target data table. The data state can be an unlocked state and a locked state. The unlocked state can mean that data can be written to the source data table, and the locked state can mean that data writing to the source data table is suspended.
在一个实施例中,步骤S103包括:获取关于源数据表的日志数据,根据该源数据表的日志数据确定当前时间段向该源数据表写数据的次数,若当前时间段向源数据表写数据的次数小于预设次数,则确定该源数据表的写数据状态为锁住状态;若当前时间段向源数据表写数据的次数小于或等于预设次数,则确定该源数据表的写数据状态为未锁住状态。例如,当前时间段为夜间2:00~3:00,根据源数据表的日志数据确定向源数据表中写数据的总次数为100次,只有一次是在当前时间段向源数据表中写数据,因此,确定在当前时间段向源数据表中写数据的概率较小,可以确定该源数据表的写数据状态为锁住状态。In one embodiment, step S103 includes: obtaining log data about the source data table, and determining the number of times that data is written to the source data table in the current time period according to the log data in the source data table; If the number of times is less than the preset number, it is determined that the data write status of the source data table is locked; if the number of times of writing data to the source data table in the current time period is less than or equal to the preset number of times, it is determined that the data write status of the source data table is not Locked state. For example, the current time period is from 2:00 to 3:00 at night. According to the log data of the source data table, the total number of times to write data to the source data table is determined to be 100 times. Only one time is to write data to the source data table in the current time period. Therefore, it is determined that the probability of writing data to the source data table in the current time period is low, and it can be determined that the data writing state of the source data table is the locked state.
在一个实施例中,数据库管理系统中可以包括源数据表的写数据功能,当电子设备向源数据表中写数据时,可以开启源数据表的写数据功能;当需要检测目标数据表的一致性时,可以关闭源数据表的写数据功能。因此,电子设备可以检测源数据表的写数据功能开启或关闭状态,确定该源数据表的写数据状态。例如,若检测到源数据表的写数据功能处于开启状态,则确定该源数据表的写数据状态为未锁住状态;若检测到源数据表的写数据功能处于关闭状态,则确定该源数据表的写数据状态为锁住状态。In one embodiment, the database management system can include the data writing function of the source data table. When the electronic device writes data to the source data table, the data writing function of the source data table can be turned on; when the consistency of the target data table needs to be detected When it is not, you can turn off the data writing function of the source data table. Therefore, the electronic device can detect the on or off state of the data writing function of the source data table, and determine the data writing state of the source data table. For example, if it is detected that the data writing function of the source data table is turned on, it is determined that the data writing state of the source data table is unlocked; if it is detected that the data writing function of the source data table is off, it is determined that the source The write data status of the data table is locked.
S104、若该源数据表的写数据状态为锁住状态,则根据该目标验证策略验证该目标数据表与该源数据表是否一致。S104: If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the target verification strategy.
本申请实施例中,若该源数据表的写数据状态为锁住状态,可以根据该目标验证策略验证该目标数据表与该源数据表是否一致。In the embodiment of the present application, if the write data state of the source data table is locked, it can be verified whether the target data table is consistent with the source data table according to the target verification strategy.
在一个实施例中,在步骤S104之后还包括:根据验证结果生成验证报告,并返回验证报告,以便用户可以实时了解验证结果。验证报告可以包括验证时间、 目标数据表与源数据表是否一致的结果、以及当目标数据表与源数据表不一致时,不一致数据的数据内容等等。In one embodiment, after step S104, it further includes: generating a verification report according to the verification result, and returning the verification report, so that the user can understand the verification result in real time. The verification report may include the verification time, the result of whether the target data table is consistent with the source data table, and the data content of the inconsistent data when the target data table is inconsistent with the source data table, and so on.
在一个实施例中,若存储该目标数据表的数据库管理系统中的数据量大于预设数据量,则获取该数据库管理系统中每个数据表被查询的次数,将查询次数小于预设次数的数据表及对应的源数据表删除。In one embodiment, if the amount of data in the database management system storing the target data table is greater than the preset data amount, the number of times each data table in the database management system has been queried is acquired, and the number of queries is less than the preset number of times. The data table and the corresponding source data table are deleted.
为了缓解数据库管理系统存储数据的压力,若存储该目标数据表的数据库管理系统中的数据量大于预设数据量,表明数据库管理系统的存储空间不足,电子设备可以获取该数据库管理系统中每个数据表被查询的次数,若数据表的查询次数小于预设次数,表明该数据表的重要性较低,则可以将查询次数小于预设次数的数据表及对应的源数据表删除;若该查询次数大于或等于预设次数,则表明该数据表的重要性较高,可以将该数据表保留。In order to alleviate the pressure of the database management system to store data, if the amount of data in the database management system storing the target data table is greater than the preset amount of data, it indicates that the storage space of the database management system is insufficient, and the electronic device can obtain each data in the database management system. The number of times that the data table is queried. If the number of queries of the data table is less than the preset number, it indicates that the importance of the data table is low, and the data table with the number of queries less than the preset number and the corresponding source data table can be deleted; If the number of queries is greater than or equal to the preset number, it indicates that the importance of the data table is high, and the data table can be retained.
本申请实施例中,电子设备可以根据目标数据表的属性信息选择对目标数据表进行一致性验证的目标验证策略,并在源数据表的写数据状态为锁住状态时,根据目标验证策略验证目标数据表与源数据表是否一致;可以根据目标数据表的属性信息动态选择一致性验证的策略,提高一致性验证的灵活性。根据目标验证策略自动对目标数据表进行一致性验证,不需要人工参与,提高一致性验证的效率。另外,在源数据表写数据状态为锁住状态时,对目标数据表进行一致性验证,可避免向源数据表中写数据带来干扰,提高对目标数据表进行一致性验证的效率。In the embodiment of the present application, the electronic device can select a target verification strategy for verifying the consistency of the target data table according to the attribute information of the target data table, and verify according to the target verification strategy when the write data status of the source data table is locked. Whether the target data table is consistent with the source data table; the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification. Automatically verify the consistency of the target data table according to the target verification strategy, without manual participation, and improve the efficiency of consistency verification. In addition, when the write data status of the source data table is locked, the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
请参见图2,是本申请实施例提供的另一种数据验证方法的流程示意图,本申请实施例的所述方法可以由上述提及的电子设备来执行。该数据验证方法包括以下步骤。Please refer to FIG. 2, which is a schematic flowchart of another data verification method provided by an embodiment of the present application. The method of the embodiment of the present application may be executed by the above-mentioned electronic device. The data verification method includes the following steps.
S201、获取目标数据表、源数据表及该目标数据表的属性信息,该目标数据表的属性信息包括以下任一项或多项:该目标数据表的数据量、该目标数据表的类型、该目标数据表被查询的次数以及该目标数据表建立的时间。S201. Obtain a target data table, a source data table, and attribute information of the target data table, where the attribute information of the target data table includes any one or more of the following: the amount of data in the target data table, the type of the target data table, The number of times the target data table was queried and the time when the target data table was created.
S202、根据该目标数据表的属性信息确定对该目标数据表一致性验证的目标验证策略,该目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略。S202: Determine a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, where the target verification strategy includes a verification strategy based on data content or a verification strategy based on statistical information.
在一个实施例中,该目标数据表的属性信息包括该目标数据表的类型,步骤S202包括:根据该目标数据表的类型获取该目标数据表的重要等级,若该目标数据表的重要等级小于预设等级,则将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,若该目标数据表的重要等级大于或等于该预设等级,则将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略。In one embodiment, the attribute information of the target data table includes the type of the target data table, and step S202 includes: obtaining the importance level of the target data table according to the type of the target data table, if the importance level of the target data table is less than Preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table, and if the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content The verification strategy is determined as the target verification strategy for the consistency verification of the target data table.
由于不同类型的数据表,用户对其的重要不一致,对重要性越高的数据表,可以采用更加精细验证策略对数据表进行验证,以提高验证的准确度;对重要性越低的数据表,可以采用粗略的验证策略对数据表进行验证,以提高验证的效率;因此,可以根据目标数据表的类型选择验证策略。具体的,电子设备可以根据目标数据表中的数据内容或目标数据表的名称确定该目标数据表的类型,根据该目标数据表的类型获取该目标数据表的重要等级,若该目标数据表的重要等级小于预设等级,则表明该目标数据表的重要性比较低,可以将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,即选择粗略的验证策略;若该目标数据表的重要等级大于或等于该预设等级,则表明该目标数据表的重要性比较高,可以将该基于数据内容的验证策略确定为对该目标数据表一致性验证 的目标验证策略,即选择精细的验证策略。Due to different types of data tables, users have inconsistencies in their importance. For data tables with higher importance, a more refined verification strategy can be used to verify the data tables to improve the accuracy of the verification; for data tables with lower importance , A rough verification strategy can be used to verify the data table to improve the efficiency of the verification; therefore, the verification strategy can be selected according to the type of the target data table. Specifically, the electronic device can determine the type of the target data table according to the data content in the target data table or the name of the target data table, and obtain the importance level of the target data table according to the type of the target data table. If the importance level is less than the preset level, it indicates that the importance of the target data table is relatively low, and the statistical information-based verification strategy can be determined as the target verification strategy for the consistency verification of the target data table, that is, a rough verification strategy is selected; If the importance level of the target data table is greater than or equal to the preset level, it indicates that the importance of the target data table is relatively high, and the verification strategy based on the data content can be determined as the target verification for the consistency verification of the target data table Strategy, that is, choose a sophisticated verification strategy.
例如,若该目标数据表类型为审计数据表,审计数据表通常与用户的财务有关,重要性比较高,因此,可以为该目标数据表设置一个较高的重要等级,并选择基于数据内容的验证策略对该目标数据表进行一致性验证;若该目标数据表的类型为员工数据表,该目标数据表的重要比较低,可以为该目标数据表设置一个较低的重要等级,并可以选择基于统计信息的验证策略对目标数据表进行一致性验证。For example, if the target data table type is an audit data table, the audit data table is usually related to the user’s finances and is of higher importance. Therefore, you can set a higher importance level for the target data table and select a data content-based The verification strategy verifies the consistency of the target data table; if the type of the target data table is an employee data table, the importance of the target data table is relatively low, and a lower importance level can be set for the target data table and can be selected The verification strategy based on statistical information verifies the consistency of the target data table.
再例如,若该目标数据表的类型为包括账号和密码等敏感类数据表,则该目标数据表的重要性比较高,可以为该目标数据表设置一个较高的重要等级,并选择基于数据内容的验证策略对该目标数据表进行一致性验证;若该目标数据表的类型为包括某地区医院名单的数据表,该目标数据表的重要比较低,可以为该目标数据表设置一个较低的重要等级,并可以选择基于统计信息的验证策略对目标数据表进行一致性验证。For another example, if the type of the target data table is a sensitive data table including account numbers and passwords, the importance of the target data table is relatively high, and a higher importance level can be set for the target data table, and data-based The content verification strategy verifies the consistency of the target data table; if the type of the target data table is a data table including a list of hospitals in a certain area, the importance of the target data table is relatively low, and a lower value can be set for the target data table , And you can choose a verification strategy based on statistical information to verify the consistency of the target data table.
在另一个实施例中,该目标数据表的属性信息包括该目标数据表被查询的次数,步骤S202包括:根据该目标数据表被查询的次数获取该目标数据表的重要等级,若该目标数据表的重要等级小于预设等级,则将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,若该目标数据表的重要等级大于或等于该预设等级,则将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略。In another embodiment, the attribute information of the target data table includes the number of times the target data table is queried, and step S202 includes: obtaining the importance level of the target data table according to the number of times the target data table is queried. If the importance level of the table is less than the preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table. If the importance level of the target data table is greater than or equal to the preset level, then The verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
若目标数据被查询的次数较多,则表明该目标数据表的重要性越高,可以采用更加精细验证策略对数据表进行验证,以提高验证的准确度;反之,若该目标数据表被查询的次数较少,则表明该目标数据表的重要性较低,可以采用粗略的验证策略对数据表进行验证,以提高验证的效率;因此,可以根据目标数据表的被查询次数选择验证策略。具体的,电子设备可以根据该目标数据表的日志数据确定该目标数据表被查询的次数,根据该目标数据表被查询的次数获取该目标数据表的重要等级;若该目标数据表的重要等级小于预设等级,则表明该目标数据表的重要性比较低,将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,即选择比较粗略的验证策略;若该目标数据表的重要等级大于或等于该预设等级,则该目标数据表的重要性比较高,可以将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略,即选择精细的验证策略。If the target data is queried more times, it indicates that the importance of the target data table is higher, and a more refined verification strategy can be used to verify the data table to improve the accuracy of the verification; on the contrary, if the target data table is queried If the number of times is less, it indicates that the importance of the target data table is low. A rough verification strategy can be used to verify the data table to improve the efficiency of verification; therefore, the verification strategy can be selected according to the number of times the target data table is queried. Specifically, the electronic device may determine the number of times the target data table is queried according to the log data of the target data table, and obtain the importance level of the target data table according to the number of times the target data table is queried; if the importance level of the target data table is If it is less than the preset level, it indicates that the importance of the target data table is relatively low, and the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table, that is, a relatively rough verification strategy is selected; If the importance level of the target data table is greater than or equal to the preset level, the importance of the target data table is relatively high, and the verification strategy based on the data content can be determined as the target verification strategy for the consistency verification of the target data table, namely Choose a sophisticated verification strategy.
在又一个实施例中,该目标数据表的属性信息包括该目标数据表被查询的次数和该目标数据表的类型,步骤S202包括:电子设备可以根据该目标数据表被查询的次数、该目标数据表的类型分别为该目标数据表设置第一权值和第二权值,并获取该目标数据表的类型对应值,对目标数据表被查询的次数、该目标数据表的类型对应值、第一权值和第二权值进行加权求和,得到该目标数据表的权重,根据该目标数据表的权重设置该目标数据表的重要等级,若该目标数据表的重要等级小于预设等级,则将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,若该目标数据表的重要等级大于或等于该预设等级,则将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略。In another embodiment, the attribute information of the target data table includes the number of times the target data table is queried and the type of the target data table, and step S202 includes: the electronic device may query the target data table according to the number of times the target data table is queried and the target data table. The type of the data table sets the first weight and the second weight for the target data table, and obtains the corresponding value of the target data table type, the number of times the target data table is queried, the corresponding value of the target data table type, Perform a weighted summation of the first weight and the second weight to obtain the weight of the target data table, and set the importance level of the target data table according to the weight of the target data table. If the importance level of the target data table is less than the preset level , The statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table, and if the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content Determine the target verification strategy for the consistency verification of the target data table.
例如,该目标数据表的类型为审计数据表,该目标数据表的类型对应值为3,该目标数据数据表被查询的次数为10次,根据该目标数据表被查询的次数设置该目标数据的第一权值为5,根据该目数据表的类型设置该目标数据表的第二权 值为4,对目标数据表被查询的次数、该目标数据表的类型对应值、第一权值和第二权值进行加权求和,即5*10+3*4=22,则该目标数据表的权重为22,可以根据该目标数据表的权中设置该目标数据表的重要等级,即权重越大,重要等级越大,若该目标数据表的重要等级小于预设等级,则将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,若该目标数据表的重要等级大于或等于该预设等级,则将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略。For example, the type of the target data table is an audit data table, the corresponding value of the target data table type is 3, the number of times the target data table is queried is 10, and the target data is set according to the number of times the target data table is queried The first weight value of the target data table is 5, and the second weight value of the target data table is set to 4 according to the type of the target data table. The number of times the target data table is queried, the corresponding value of the target data table type, and the first weight value Perform a weighted summation with the second weight, that is, 5*10+3*4=22, then the weight of the target data table is 22, and the importance level of the target data table can be set according to the weight of the target data table, namely The greater the weight, the greater the importance level. If the importance level of the target data table is less than the preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table. If the importance level of the table is greater than or equal to the preset level, the verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
在又一个实施例中,该目标数据表的属性信息包括该目标数据表的数据量,步骤S202包括:若该目标数据表的数据量大于预设数值,则将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略;若该目标数据表的数据量小于或等于该预设数值,则将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略。In another embodiment, the attribute information of the target data table includes the data amount of the target data table, and step S202 includes: if the data amount of the target data table is greater than a preset value, determining the verification strategy based on statistical information It is the target verification strategy for the consistency verification of the target data table; if the data volume of the target data table is less than or equal to the preset value, the verification strategy based on the data content is determined as the consistency verification of the target data table Target verification strategy.
由于数据表包括的数据量越多,则对数据表验证所需要的时间越长,数据表包括的数据量越少,则对数据表验证所需要的时间越短;同时,基于统计信息的验证策略比基于数据内容的验证策略的验证效率高。因此,为了提高数据表验证的效率,可以根据数据表包括的数量选择验证策略。具体的,电子设备可以获取目标数据表的数据量,若该目标数据表的数据量大于预设数值,则将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,即选择验证效率较高的验证策略,以提高验证效率;若该目标数据表的数据量小于或等于该预设数值,表明目标数据表中数据量本身较少,因此可以将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略,提高对目标数据表验证的准确度。The more data included in the data table, the longer the time required to verify the data table, and the less data included in the data table, the shorter the time required to verify the data table; at the same time, verification based on statistical information The verification efficiency of the strategy is higher than that of the verification strategy based on the data content. Therefore, in order to improve the efficiency of data sheet verification, a verification strategy can be selected according to the number of data sheets included. Specifically, the electronic device can obtain the data volume of the target data table, and if the data volume of the target data table is greater than the preset value, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table , That is, select a verification strategy with higher verification efficiency to improve verification efficiency; if the data amount of the target data table is less than or equal to the preset value, it indicates that the amount of data in the target data table itself is small, so it can be based on the data content The verification strategy is determined as the target verification strategy for the consistency verification of the target data table, and the accuracy of the verification of the target data table is improved.
在又一个实施例中,该目标数据表的属性信息包括该目标数据表建立的时间,步骤S202包括:若系统时间与该目标数据表建立的时间之间的时间间隔大于预设时间间隔,则将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略;若系统时间与该目标数据表建立的时间之间的时间间隔小于或等于该预设时间间隔,则将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略。In another embodiment, the attribute information of the target data table includes the time when the target data table is established, and step S202 includes: if the time interval between the system time and the time when the target data table is established is greater than the preset time interval, then Determine the statistical information-based verification strategy as the target verification strategy for the consistency verification of the target data table; if the time interval between the system time and the time when the target data table is established is less than or equal to the preset time interval, then The verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
电子设备可以根据目标数据表的建立时间选择验证策略,具体的,若系统时间与该目标数据表建立的时间之间的时间间隔大于预设时间间隔,则表明该目标数据表已经被验证的概率较高,因此,可以将该基于统计信息的验证策略确定为对该目标数据表一致性验证的目标验证策略,以提高验证效率;若系统时间与该目标数据表建立的时间之间的时间间隔小于或等于该预设时间间隔,则表明该目标数据表已经被验证的概率较低,因此,可以将该基于数据内容的验证策略确定为对该目标数据表一致性验证的目标验证策略,以提高验证的准确度。The electronic device can select a verification strategy according to the establishment time of the target data table. Specifically, if the time interval between the system time and the establishment time of the target data table is greater than the preset time interval, it indicates the probability that the target data table has been verified Therefore, the statistical information-based verification strategy can be determined as the target verification strategy for the consistency verification of the target data table to improve the verification efficiency; if the time interval between the system time and the time when the target data table is established Less than or equal to the preset time interval, it indicates that the probability that the target data table has been verified is low. Therefore, the verification strategy based on the data content can be determined as the target verification strategy for the consistency verification of the target data table. Improve the accuracy of verification.
S203、获取该源数据表的写数据状态。S203: Acquire the data writing status of the source data table.
S204、若该源数据表的写数据状态为锁住状态,则根据基于数据内容的验证策略验证该目标数据表与该源数据表是否一致。S204: If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the verification strategy based on the data content.
在一个实施例中,步骤S204包括:将该目标数据表的数据内容与该源数据表的数据内容进行比对,若该目标数据表的数据内容与该源数据表的数据内容相同,则确定该目标数据表与该源数据表之间具有一致性;若该目标数据表的数据内容与该源数据表的数据内容不相同,则确定该目标数据表与该源数据表不一致。In one embodiment, step S204 includes: comparing the data content of the target data table with the data content of the source data table, and if the data content of the target data table is the same as the data content of the source data table, determining There is consistency between the target data table and the source data table; if the data content of the target data table is different from the data content of the source data table, it is determined that the target data table is inconsistent with the source data table.
当该目标验证策略为基于数据内容的验证策略时,电子设备可以将该目标数据表的数据内容与源数据表的数据内容进行比对,即将目标数据表的每一行数据 与源数据表的对应行数据进行对比,若该目标数据表的数据内容与该源数据表的数据内容相同,即目标数据表的每一行数据与源数据表对应行数据均相同,表明该目标数据表与该源数据表是相同的,即确定该目标数据表与该源数据表之间具有一致性;若该目标数据表的数据内容与该源数据表的数据内容不相同,即目标数据表的至少一行数据与源数据表的对应行数据不相同,表明该目标数据表的数据内容被篡改,则确定该目标数据表与该源数据表不一致。When the target verification strategy is a verification strategy based on data content, the electronic device can compare the data content of the target data table with the data content of the source data table, that is, the correspondence between each row of the target data table and the source data table Compare the row data. If the data content of the target data table is the same as the data content of the source data table, that is, each row of data in the target data table is the same as the corresponding row data of the source data table, indicating that the target data table and the source data The tables are the same, that is, it is determined that there is consistency between the target data table and the source data table; if the data content of the target data table is different from the data content of the source data table, that is, at least one row of data in the target data table is The corresponding row data of the source data table is different, indicating that the data content of the target data table has been tampered with, and it is determined that the target data table is inconsistent with the source data table.
在另一个实施例中,步骤S204包括:电子设备可以对目标数据表的数据内容进行加密,得到第一哈希值,并获取对该源数据表的数据内容的加密得到的第二哈希值,将第一哈希值与第二哈希值进行比对,若两者相同,则确定该目标数据表与该源数据表之间具有一致性;若两者不相同,则确定该目标数据表与该源数据表不一致。In another embodiment, step S204 includes: the electronic device may encrypt the data content of the target data table to obtain the first hash value, and obtain the second hash value obtained by encrypting the data content of the source data table , Compare the first hash value with the second hash value, if the two are the same, determine the consistency between the target data table and the source data table; if the two are not the same, determine the target data The table is inconsistent with the source data table.
为了提高验证的效率,并防止用户篡改源数据表的数据内容,电子设备可以将目标数据表的数据内容的哈希值与源数据表的数据内容的哈希值进行比对,若两者相同,则确定该目标数据表与该源数据表之间具有一致性;若两者不相同,则确定该目标数据表与该源数据表不一致。In order to improve the efficiency of verification and prevent users from tampering with the data content of the source data table, the electronic device can compare the hash value of the data content of the target data table with the hash value of the data content of the source data table, if the two are the same , It is determined that there is consistency between the target data table and the source data table; if the two are not the same, it is determined that the target data table is inconsistent with the source data table.
S205、若该源数据表的写数据状态为锁住状态,则根据基于统计信息的验证策略验证该目标数据表与该源数据表是否一致。S205: If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to a verification strategy based on statistical information.
在一个实施例中,步骤S205包括:获取该目标数据表及该源数据表的统计信息,该统计信息包括以下任一项或多项:数据量、字段数量、行数以及列数,若该目标数据表的统计信息与该源数据表的属性信息相同,则确定该目标数据表与该源数据表之间具有一致性;若该目标数据表的统计信息与该源数据表的属性信息不相同,则确定该目标数据表与该源数据表不一致。In one embodiment, step S205 includes: obtaining statistical information of the target data table and the source data table, and the statistical information includes any one or more of the following: data amount, field number, row number, and column number. If the statistical information of the target data table is the same as the attribute information of the source data table, it is determined that there is consistency between the target data table and the source data table; if the statistical information of the target data table is different from the attribute information of the source data table If they are the same, it is determined that the target data table is inconsistent with the source data table.
当该目标验证策略为基于统计信息的验证策略时,电子设备可以获取该目标数据表及该源数据表的统计信息,若该目标数据表的统计信息与该源数据表的属性信息相同,则确定该目标数据表与该源数据表之间具有一致性,即确定该目标数据表的数据内容与该源数据表的数据内容相同;若该目标数据表的统计信息与该源数据表的属性信息不相同,表明该目标数据表的数据内容与源数据表的数据内容不一致,则确定该目标数据表与该源数据表不一致。When the target verification strategy is a verification strategy based on statistical information, the electronic device can obtain the statistical information of the target data table and the source data table. If the statistical information of the target data table is the same as the attribute information of the source data table, then Determine the consistency between the target data table and the source data table, that is, determine that the data content of the target data table is the same as the data content of the source data table; if the statistical information of the target data table is the same as the attribute of the source data table If the information is not the same, it indicates that the data content of the target data table is inconsistent with the data content of the source data table, and it is determined that the target data table is inconsistent with the source data table.
本申请实施例中,电子设备可以根据目标数据表的属性信息选择对目标数据表进行一致性验证的目标验证策略,若该目标验证策略为基于数据内容的验证策略,且该源数据表的写数据状态处于锁住状态,则可以采用基于数据内容的验证策略验证目标数据表与源数据表是否一致;若该目标验证策略为基于统计信息的验证策略,且该源数据表的写数据状态处于锁住状态,则可以采用基于统计信息的验证策略验证目标数据表与源数据表是否一致;可以根据目标数据表的属性信息动态选择一致性验证的策略,提高一致性验证的灵活性。根据目标验证策略自动对目标数据表进行一致性验证,不需要人工参与,提高一致性验证的效率。另外,在源数据表写数据状态为锁住状态时,对目标数据表进行一致性验证,可避免向源数据表中写数据带来干扰,提高对目标数据表进行一致性验证的效率。In the embodiment of the present application, the electronic device may select a target verification strategy for performing consistency verification on the target data table according to the attribute information of the target data table. If the target verification strategy is a verification strategy based on data content, and the source data table is written If the data state is locked, a verification strategy based on data content can be used to verify whether the target data table is consistent with the source data table; if the target verification strategy is a verification strategy based on statistical information, and the write data state of the source data table is If the state is locked, a statistical information-based verification strategy can be used to verify whether the target data table is consistent with the source data table; the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification. Automatically verify the consistency of the target data table according to the target verification strategy, without manual participation, and improve the efficiency of consistency verification. In addition, when the write data status of the source data table is locked, the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
请参见图3,是本申请实施例提供的一种数据验证装置的结构示意图,本申请实施例的所述装置可以设置在上述提及的电子设备中。本实施例中,该装置包括:Refer to FIG. 3, which is a schematic structural diagram of a data verification apparatus provided by an embodiment of the present application. The apparatus of the embodiment of the present application may be set in the aforementioned electronic device. In this embodiment, the device includes:
获取模块301,用于获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数 据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;The obtaining module 301 is configured to obtain a target data table, a source data table, and attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, The type of the target data table, the number of times the target data table is queried, and the time when the target data table is established;
确定模块302,用于根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;The determining module 302 is configured to determine a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
所述获取模块301,还用于获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据,所述未锁住状态可以指示向所述源数据表写数据;The acquiring module 301 is also used to acquire the write data state of the source data table, the write data state includes a locked state and an unlocked state, and the locked state is used to indicate a pause to the source data table. Writing data, the unlocked state may indicate writing data to the source data table;
验证模块303,用于若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。The verification module 303 is configured to verify whether the target data table is consistent with the source data table according to the target verification strategy if the write data state of the source data table is the locked state.
可选的,所述目标数据表的属性信息包括所述目标数据表的类型和/或所述目标数据表被查询的次数,确定模块302,具体用于根据所述目标数据表的属性信息获取所述目标数据表的重要等级;若所述目标数据表的重要等级小于预设等级,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;若所述目标数据表的重要等级大于或等于所述预设等级,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。Optionally, the attribute information of the target data table includes the type of the target data table and/or the number of times the target data table is queried. The determining module 302 is specifically configured to obtain the attribute information of the target data table. The importance level of the target data table; if the importance level of the target data table is less than a preset level, the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table; if If the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
可选的,所述目标数据表的属性信息包括所述目标数据表的数据量或所述目标数据表建立的时间,确定模块302,具体用于若所述目标数据表的数据量大于预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔大于预设时间间隔,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;若所述目标数据表的数据量小于或等于所述预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔小于或等于所述预设时间间隔,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。Optionally, the attribute information of the target data table includes the data volume of the target data table or the time when the target data table is established, and the determining module 302 is specifically configured to: if the data volume of the target data table is greater than a preset Value, or the time interval between the system time and the time when the target data table is established is greater than the preset time interval, then the statistical information-based verification strategy is determined as the target verification strategy for the consistency verification of the target data table ; If the data volume of the target data table is less than or equal to the preset value, or the time interval between the system time and the time when the target data table is established is less than or equal to the preset time interval, then the The verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
可选的,验证模块303,具体用于将所述目标数据表的数据内容与所述源数据表的数据内容进行比对;若所述目标数据表的数据内容与所述源数据表的数据内容相同,则确定所述目标数据表与所述源数据表之间具有一致性;若所述目标数据表的数据内容与所述源数据表的数据内容不相同,则确定所述目标数据表与所述源数据表不一致。Optionally, the verification module 303 is specifically configured to compare the data content of the target data table with the data content of the source data table; if the data content of the target data table is compared with the data content of the source data table If the content is the same, it is determined that there is consistency between the target data table and the source data table; if the data content of the target data table is different from the data content of the source data table, the target data table is determined Inconsistent with the source data table.
可选的,验证模块303,具体用于获取所述目标数据表及所述源数据表的统计信息,所述统计信息包括以下任一项或多项:数据量、字段数量、行数以及列数;若所述目标数据表的统计信息与所述源数据表的统计信息相同,则确定所述目标数据表与所述源数据表之间具有一致性;若所述目标数据表的统计信息与所述源数据表的统计信息不相同,则确定所述目标数据表与所述源数据表不一致。Optionally, the verification module 303 is specifically configured to obtain statistical information of the target data table and the source data table, where the statistical information includes any one or more of the following: data amount, field number, row number, and column If the statistical information of the target data table is the same as the statistical information of the source data table, it is determined that there is consistency between the target data table and the source data table; if the statistical information of the target data table If the statistical information is different from the source data table, it is determined that the target data table is inconsistent with the source data table.
可选的,获取模块301,具体用于获取数据管理系统中的数据表的历史一致性验证标识,所述历史一致性验证标识是指已被一致性验证的数据表的标识;根据所述历史一致性验证标识从所述数据管理系统中获取未被一致性验证的数据表;将所述未被一致性验证的数据表作为目标数据表。Optionally, the acquiring module 301 is specifically configured to acquire the historical consistency verification identifier of the data table in the data management system. The historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency; according to the history The consistency verification identifier obtains a data table that has not been verified for consistency from the data management system; and uses the data table that has not been verified for consistency as a target data table.
可选的,删除模块304,用于若存储所述目标数据表的数据库管理系统中的数据量大于预设数据量,则获取所述数据库管理系统中每个数据表被查询的次数;将查询次数小于预设次数的数据表及对应的源数据表删除。Optionally, the deleting module 304 is configured to, if the amount of data in the database management system storing the target data table is greater than the preset data amount, obtain the number of times each data table in the database management system has been queried; The data tables whose times are less than the preset times and the corresponding source data tables are deleted.
本申请实施例中,电子设备可以根据目标数据表的属性信息选择对目标数据表进行一致性验证的目标验证策略,并在源数据表的写数据状态为锁住状态时,根据目标验证策略验证目标数据表与源数据表是否一致;可以根据目标数据表的 属性信息动态选择一致性验证的策略,提高一致性验证的灵活性。根据目标验证策略自动对目标数据表进行一致性验证,不需要人工参与,提高一致性验证的效率。另外,在源数据表写数据状态为锁住状态时,对目标数据表进行一致性验证,可避免向源数据表中写数据带来干扰,提高对目标数据表进行一致性验证的效率。In the embodiment of the present application, the electronic device can select a target verification strategy for verifying the consistency of the target data table according to the attribute information of the target data table, and verify according to the target verification strategy when the write data status of the source data table is locked. Whether the target data table is consistent with the source data table; the consistency verification strategy can be dynamically selected according to the attribute information of the target data table to improve the flexibility of consistency verification. Automatically verify the consistency of the target data table according to the target verification strategy, without manual participation, and improve the efficiency of consistency verification. In addition, when the write data status of the source data table is locked, the consistency verification of the target data table can avoid the interference caused by writing data to the source data table and improve the efficiency of consistency verification on the target data table.
请参见图4,是本申请实施例提供的一种电子设备的结构示意图,如图所示的本实施例中的电子设备可以包括:一个或多个处理器401;一个或多个输入装置402,一个或多个输出装置403和存储器404。上述处理器401、输入装置402、输出装置403和存储器404通过总线405连接。Refer to FIG. 4, which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As shown in the figure, the electronic device in this embodiment may include: one or more processors 401; one or more input devices 402 , One or more output devices 403 and memory 404. The aforementioned processor 401, input device 402, output device 403, and memory 404 are connected via a bus 405.
所处理器401可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 401 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (ASICs). ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
输入装置402可以包括触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风等,输出装置403可以包括显示器(LCD等)、扬声器等。The input device 402 may include a touch panel, a fingerprint sensor (used to collect user fingerprint information and fingerprint orientation information), a microphone, etc., and the output device 403 may include a display (LCD, etc.), a speaker, and the like.
该存储器404可以包括只读存储器和随机存取存储器,并向处理器401提供指令和数据。存储器404的一部分还可以包括非易失性随机存取存储器,存储器404用于存储计算机程序,所述计算机程序包括程序指令,处理器401用于执行存储器404存储的程序指令,以用于执行一种数据验证方法,即用于执行以下操作:The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A part of the memory 404 may also include a non-volatile random access memory. The memory 404 is used to store a computer program. The computer program includes program instructions. The processor 401 is used to execute the program instructions stored in the memory 404 to execute a A data verification method that is used to perform the following operations:
获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;Obtain the target data table, the source data table, and the attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;Determining a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据,所述未锁住状态可以指示向所述源数据表写数据;Acquire the write data state of the source data table, the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the target verification strategy.
可选的,处理器用于调用存储器存储的程序指令执行以下操作:Optionally, the processor is used to call the program instructions stored in the memory to perform the following operations:
根据所述目标数据表的属性信息获取所述目标数据表的重要等级;Acquiring the importance level of the target data table according to the attribute information of the target data table;
若所述目标数据表的重要等级小于预设等级,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;If the importance level of the target data table is less than the preset level, determining the verification strategy based on statistical information as the target verification strategy for the consistency verification of the target data table;
若所述目标数据表的重要等级大于或等于所述预设等级,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。If the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
可选的,处理器用于调用存储器存储的程序指令执行以下操作:Optionally, the processor is used to call the program instructions stored in the memory to perform the following operations:
若所述目标数据表的数据量大于预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔大于预设时间间隔,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;If the data volume of the target data table is greater than the preset value, or the time interval between the system time and the time when the target data table is established is greater than the preset time interval, the statistical information-based verification strategy is determined to be correct The target verification strategy for the consistency verification of the target data table;
若所述目标数据表的数据量小于或等于所述预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔小于或等于所述预设时间间隔,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。If the data amount of the target data table is less than or equal to the preset value, or the time interval between the system time and the time when the target data table is established is less than or equal to the preset time interval, then the The verification strategy of the data content is determined as the target verification strategy for the consistency verification of the target data table.
可选的,处理器用于调用存储器存储的程序指令执行以下操作:Optionally, the processor is used to call the program instructions stored in the memory to perform the following operations:
将所述目标数据表的数据内容与所述源数据表的数据内容进行比对;Comparing the data content of the target data table with the data content of the source data table;
若所述目标数据表的数据内容与所述源数据表的数据内容相同,则确定所述目标数据表与所述源数据表之间具有一致性;If the data content of the target data table is the same as the data content of the source data table, it is determined that there is consistency between the target data table and the source data table;
若所述目标数据表的数据内容与所述源数据表的数据内容不相同,则确定所述目标数据表与所述源数据表不一致。If the data content of the target data table is different from the data content of the source data table, it is determined that the target data table is inconsistent with the source data table.
可选的,处理器用于调用存储器存储的程序指令执行以下操作:Optionally, the processor is used to call the program instructions stored in the memory to perform the following operations:
获取所述目标数据表及所述源数据表的统计信息,所述统计信息包括以下任一项或多项:数据量、字段数量、行数以及列数;Acquire statistical information of the target data table and the source data table, where the statistical information includes any one or more of the following: data amount, field number, row number, and column number;
若所述目标数据表的统计信息与所述源数据表的统计信息相同,则确定所述目标数据表与所述源数据表之间具有一致性;If the statistical information of the target data table is the same as the statistical information of the source data table, it is determined that there is consistency between the target data table and the source data table;
若所述目标数据表的统计信息与所述源数据表的统计信息不相同,则确定所述目标数据表与所述源数据表不一致。If the statistical information of the target data table is different from the statistical information of the source data table, it is determined that the target data table is inconsistent with the source data table.
可选的,处理器用于调用存储器存储的程序指令执行以下操作:Optionally, the processor is used to call the program instructions stored in the memory to perform the following operations:
获取数据管理系统中的数据表的历史一致性验证标识,所述历史一致性验证标识是指已被一致性验证的数据表的标识;Acquiring the historical consistency verification identifier of the data table in the data management system, where the historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency;
根据所述历史一致性验证标识从所述数据管理系统中获取未被一致性验证的数据表;Obtaining a data table that has not been verified for consistency from the data management system according to the historical consistency verification identifier;
将所述未被一致性验证的数据表作为目标数据表。The data table that has not been verified for consistency is used as the target data table.
可选的,处理器用于调用存储器存储的程序指令执行以下操作:Optionally, the processor is used to call the program instructions stored in the memory to perform the following operations:
若存储所述目标数据表的数据库管理系统中的数据量大于预设数据量,则获取所述数据库管理系统中每个数据表被查询的次数;If the amount of data in the database management system storing the target data table is greater than the preset data amount, acquiring the number of times each data table in the database management system is queried;
将查询次数小于预设次数的数据表及对应的源数据表删除。Delete the data table and the corresponding source data table whose query times are less than the preset times.
本申请实施例中所描述的处理器401、输入装置402、输出装置403可执行本申请实施例提供的数据验证方法的第一实施例和第二实施例中所描述的实现方式,也可执行本申请实施例所描述的电子设备的实现方式,在此不再赘述。The processor 401, input device 402, and output device 403 described in the embodiments of this application can execute the implementations described in the first and second embodiments of the data verification method provided in the embodiments of this application, and can also execute The implementation of the electronic device described in the embodiment of the application will not be repeated here.
本申请实施例中提供还了一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时实现本申请的图1及图2实施例中所示的数据验证方法。The embodiment of the present application also provides a computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions are processed The data verification method shown in the embodiment of FIG. 1 and FIG. 2 of the present application is implemented when the device is executed.
所述计算机非易失性可读存储介质可以是前述任一实施例所述的医疗管理设备的内部存储单元,例如控制设备的硬盘或内存。所述计算机非易失性可读存储介质也可以是所述控制设备的外部存储设备,例如所述控制设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机非易失性可读存储介质还可以既包括所述控制设备的内部存储单元也包括外部存储设备。所述计算机非易失性可读存储介质用于存储所述计算机程序以及所述控制设备所需的其他程序和数据。所述计算机非易失性可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。The computer non-volatile readable storage medium may be the internal storage unit of the medical management device described in any of the foregoing embodiments, such as a hard disk or memory of the control device. The computer non-volatile readable storage medium may also be an external storage device of the control device, such as a plug-in hard disk equipped on the control device, a Smart Media Card (SMC), a secure digital ( Secure Digital, SD card, Flash Card, etc. Further, the computer non-volatile readable storage medium may also include both an internal storage unit of the control device and an external storage device. The computer non-volatile readable storage medium is used to store the computer program and other programs and data required by the control device. The computer non-volatile readable storage medium can also be used to temporarily store data that has been output or will be output.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了 各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的控制设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the hardware and software Interchangeability. In the above description, the composition and steps of each example have been generally described in terms of function. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application. Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the control device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的控制设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例是示意性的,例如,所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。In the several embodiments provided in this application, it should be understood that the disclosed control device and method can be implemented in other ways. For example, the device embodiments described above are illustrative. For example, the division of the units may be a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented. The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种数据验证方法,其特征在于,包括:A data verification method, characterized in that it comprises:
    获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;Obtain the target data table, the source data table, and the attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, Type, the number of times the target data table is queried, and the time when the target data table is established;
    根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;Determining a target verification strategy for consistency verification of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
    获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据,所述未锁住状态可以指示向所述源数据表写数据;Acquire the write data state of the source data table, the write data state includes a locked state and an unlocked state, the locked state is used to indicate that writing data to the source data table is suspended, and the unlocked state Can instruct to write data to the source data table;
    若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。If the write data state of the source data table is the locked state, verify whether the target data table is consistent with the source data table according to the target verification strategy.
  2. 根据权利要求1所述的方法,其特征在于,所述目标数据表的属性信息包括所述目标数据表的类型和/或所述目标数据表被查询的次数,所述根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,包括:The method according to claim 1, wherein the attribute information of the target data table includes the type of the target data table and/or the number of times the target data table is queried, and the target data table The attribute information of determines the target verification strategy for the consistency verification of the target data table, including:
    根据所述目标数据表的属性信息获取所述目标数据表的重要等级;Acquiring the importance level of the target data table according to the attribute information of the target data table;
    若所述目标数据表的重要等级小于预设等级,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;If the importance level of the target data table is less than the preset level, determining the verification strategy based on statistical information as the target verification strategy for the consistency verification of the target data table;
    若所述目标数据表的重要等级大于或等于所述预设等级,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。If the importance level of the target data table is greater than or equal to the preset level, the verification strategy based on the data content is determined as the target verification strategy for the consistency verification of the target data table.
  3. 根据权利要求1所述的方法,其特征在于,所述目标数据表的属性信息包括所述目标数据表的数据量或所述目标数据表建立的时间,所述根据所述目标数据表的属性信息确定对所述目标数据表一致性验证的目标验证策略,包括:The method according to claim 1, wherein the attribute information of the target data table includes the amount of data of the target data table or the time when the target data table is established, and the attribute information of the target data table is The information determines the target verification strategy for the consistency verification of the target data table, including:
    若所述目标数据表的数据量大于预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔大于预设时间间隔,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;If the data volume of the target data table is greater than the preset value, or the time interval between the system time and the time when the target data table is established is greater than the preset time interval, the statistical information-based verification strategy is determined to be correct The target verification strategy for the consistency verification of the target data table;
    若所述目标数据表的数据量小于或等于所述预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔小于或等于所述预设时间间隔,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。If the data amount of the target data table is less than or equal to the preset value, or the time interval between the system time and the time when the target data table is established is less than or equal to the preset time interval, then the The verification strategy of the data content is determined as the target verification strategy for the consistency verification of the target data table.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述目标验证策略包括基于数据内容的验证策略,所述根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致,包括:The method according to any one of claims 1-3, wherein the target verification strategy includes a verification strategy based on data content, and the target data table and the source data are verified according to the target verification strategy. Whether the tables are consistent, including:
    将所述目标数据表的数据内容与所述源数据表的数据内容进行比对;Comparing the data content of the target data table with the data content of the source data table;
    若所述目标数据表的数据内容与所述源数据表的数据内容相同,则确定所述目标数据表与所述源数据表之间具有一致性;If the data content of the target data table is the same as the data content of the source data table, it is determined that there is consistency between the target data table and the source data table;
    若所述目标数据表的数据内容与所述源数据表的数据内容不相同,则确定所述目标数据表与所述源数据表不一致。If the data content of the target data table is different from the data content of the source data table, it is determined that the target data table is inconsistent with the source data table.
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述目标验证策略包括基于统计信息的验证策略,所述根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致,包括:The method according to any one of claims 1-3, wherein the target verification strategy comprises a verification strategy based on statistical information, and the target data table and the source data are verified according to the target verification strategy Whether the tables are consistent, including:
    获取所述目标数据表及所述源数据表的统计信息,所述统计信息包括以下任一项或多项:数据量、字段数量、行数以及列数;Acquire statistical information of the target data table and the source data table, where the statistical information includes any one or more of the following: data amount, field number, row number, and column number;
    若所述目标数据表的统计信息与所述源数据表的统计信息相同,则确定所述 目标数据表与所述源数据表之间具有一致性;If the statistical information of the target data table is the same as the statistical information of the source data table, it is determined that there is consistency between the target data table and the source data table;
    若所述目标数据表的统计信息与所述源数据表的统计信息不相同,则确定所述目标数据表与所述源数据表不一致。If the statistical information of the target data table is different from the statistical information of the source data table, it is determined that the target data table is inconsistent with the source data table.
  6. 根据权利要求1所述的方法,其特征在于,所述获取目标数据表,包括:The method according to claim 1, wherein said acquiring a target data table comprises:
    获取数据管理系统中的数据表的历史一致性验证标识,所述历史一致性验证标识是指已被一致性验证的数据表的标识;Acquiring the historical consistency verification identifier of the data table in the data management system, where the historical consistency verification identifier refers to the identifier of the data table that has been verified for consistency;
    根据所述历史一致性验证标识从所述数据管理系统中获取未被一致性验证的数据表;Obtaining a data table that has not been verified for consistency from the data management system according to the historical consistency verification identifier;
    将所述未被一致性验证的数据表作为目标数据表。The data table that has not been verified for consistency is used as the target data table.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    若存储所述目标数据表的数据库管理系统中的数据量大于预设数据量,则获取所述数据库管理系统中每个数据表被查询的次数;If the amount of data in the database management system storing the target data table is greater than the preset data amount, acquiring the number of times each data table in the database management system is queried;
    将查询次数小于预设次数的数据表及对应的源数据表删除。Delete the data table and the corresponding source data table whose query times are less than the preset times.
  8. 根据权利要求1所述的方法,其特征在于,所述获取所述源数据表的写数据状态,包括:The method according to claim 1, wherein said obtaining the write data status of the source data table comprises:
    获取关于所述源数据表的日志数据;Acquiring log data about the source data table;
    根据所述源数据表的日志数据确定当前时间段向所述源数据表写数据的次数;Determining the number of times of writing data to the source data table in the current time period according to the log data of the source data table;
    若当前时间段向所述源数据表写数据的次数小于预设次数,则确定所述源数据表的写数据状态为锁住状态;If the number of times of writing data to the source data table in the current time period is less than the preset number of times, determining that the data writing state of the source data table is a locked state;
    若当前时间段向所述源数据表写数据的次数大于或等于所述预设次数,则确定所述源数据表的写数据状态为未锁住状态。If the number of times of writing data to the source data table in the current time period is greater than or equal to the preset number of times, it is determined that the data writing state of the source data table is an unlocked state.
  9. 根据权利要求1所述的方法,其特征在于,所述获取所述源数据表的写数据状态,包括:The method according to claim 1, wherein said obtaining the write data status of the source data table comprises:
    若检测到所述源数据表的写数据功能处于开启状态,则确定所述源数据表的写数据状态为未锁住状态;If it is detected that the data writing function of the source data table is in an on state, it is determined that the data writing state of the source data table is an unlocked state;
    若检测到所述源数据表的写数据功能处于关闭状态,则确定所述源数据表的写数据状态为锁住状态。If it is detected that the data writing function of the source data table is in a closed state, it is determined that the data writing state of the source data table is a locked state.
  10. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    对所述目标数据表的数据内容进行加密,得到第一哈希值;Encrypting the data content of the target data table to obtain a first hash value;
    对所述源数据表的数据内容的加密,得到的第二哈希值;The second hash value obtained by encrypting the data content of the source data table;
    将所述第一哈希值与所述第二哈希值进行比对;Comparing the first hash value with the second hash value;
    若所述第一哈希值与所述第二哈希值相同,则确定所述目标数据表与所述源数据表之间具有一致性。If the first hash value is the same as the second hash value, it is determined that there is consistency between the target data table and the source data table.
  11. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    根据验证结果生成验证报告,所述验证报告包括验证时间、所述目标数据表与所述源数据表是否一致的结果信息;Generating a verification report according to the verification result, the verification report including verification time and result information on whether the target data table is consistent with the source data table;
    返回所述验证报告。Return the verification report.
  12. 一种数据验证装置,其特征在于,包括:A data verification device is characterized in that it comprises:
    获取模块,用于获取目标数据表、源数据表以及所述目标数据表的属性信息,所述目标数据表的属性信息包括以下任一项或多项:所述目标数据表的数据量、所述目标数据表的类型、所述目标数据表被查询的次数以及所述目标数据表建立的时间;The acquisition module is used to acquire the target data table, the source data table, and the attribute information of the target data table. The attribute information of the target data table includes any one or more of the following: the data volume of the target data table, The type of the target data table, the number of times the target data table is queried, and the time when the target data table is established;
    确定模块,用于根据所述目标数据表的属性信息确定对所述目标数据表一致 性验证的目标验证策略,所述目标验证策略包括基于数据内容的验证策略或基于统计信息的验证策略;A determining module, configured to determine a target verification strategy for verifying the consistency of the target data table according to the attribute information of the target data table, the target verification strategy including a verification strategy based on data content or a verification strategy based on statistical information;
    所述获取模块,还用于获取所述源数据表的写数据状态,所述写数据状态包括锁住状态和未锁住状态,所述锁住状态用于指示暂停向所述源数据表写数据,所述未锁住状态用于指示向所述源数据表写数据;The acquisition module is further configured to acquire the data write status of the source data table, the data write status includes a locked state and an unlocked state, and the locked state is used to indicate that writing to the source data table is suspended Data, the unlocked state is used to indicate to write data to the source data table;
    验证模块,用于若所述源数据表的写数据状态为锁住状态,则根据所述目标验证策略验证所述目标数据表与所述源数据表是否一致。The verification module is configured to verify whether the target data table is consistent with the source data table according to the target verification strategy if the write data state of the source data table is locked.
  13. 根据权利要求12所述的装置,其特征在于,所述目标数据表的属性信息包括所述目标数据表的类型和/或所述目标数据表被查询的次数,所述确定模块,具体用于根据所述目标数据表的属性信息获取所述目标数据表的重要等级;若所述目标数据表的重要等级小于预设等级,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;若所述目标数据表的重要等级大于或等于所述预设等级,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。The device according to claim 12, wherein the attribute information of the target data table includes the type of the target data table and/or the number of times the target data table is queried, and the determining module is specifically configured to The importance level of the target data table is obtained according to the attribute information of the target data table; if the importance level of the target data table is less than a preset level, the statistical information-based verification strategy is determined to be the target data The target verification strategy for table consistency verification; if the importance level of the target data table is greater than or equal to the preset level, the data content-based verification strategy is determined as the target of the target data table consistency verification Verification strategy.
  14. 根据权利要求12所述的装置,其特征在于,所述目标数据表的属性信息包括所述目标数据表的数据量或所述目标数据表建立的时间,所述确定模块,具体用于若所述目标数据表的数据量大于预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔大于预设时间间隔,则将所述基于统计信息的验证策略确定为对所述目标数据表一致性验证的目标验证策略;The device according to claim 12, wherein the attribute information of the target data table includes the amount of data of the target data table or the time when the target data table is established, and the determining module is specifically configured to: If the amount of data in the target data table is greater than a preset value, or the time interval between the system time and the time when the target data table is established is greater than the preset time interval, the statistical information-based verification strategy is determined to be Target verification strategy for consistency verification of target data tables;
    若所述目标数据表的数据量小于或等于所述预设数值,或系统时间与所述目标数据表建立的时间之间的时间间隔小于或等于所述预设时间间隔,则将所述基于数据内容的验证策略确定为对所述目标数据表一致性验证的目标验证策略。If the data amount of the target data table is less than or equal to the preset value, or the time interval between the system time and the time when the target data table is established is less than or equal to the preset time interval, then the The verification strategy of the data content is determined as the target verification strategy for the consistency verification of the target data table.
  15. 根据权利要求12-14任一项所述的装置,其特征在于,所述验证模块,具体用于将所述目标数据表的数据内容与所述源数据表的数据内容进行比对;若所述目标数据表的数据内容与所述源数据表的数据内容相同,则确定所述目标数据表与所述源数据表之间具有一致性;The device according to any one of claims 12-14, wherein the verification module is specifically configured to compare the data content of the target data table with the data content of the source data table; If the data content of the target data table is the same as the data content of the source data table, it is determined that there is consistency between the target data table and the source data table;
    若所述目标数据表的数据内容与所述源数据表的数据内容不相同,则确定所述目标数据表与所述源数据表不一致。If the data content of the target data table is different from the data content of the source data table, it is determined that the target data table is inconsistent with the source data table.
  16. 根据权利要求12-14任一项所述的装置,其特征在于,所述验证模块,具体用于获取所述目标数据表及所述源数据表的统计信息,所述统计信息包括以下任一项或多项:数据量、字段数量、行数以及列数;若所述目标数据表的统计信息与所述源数据表的统计信息相同,则确定所述目标数据表与所述源数据表之间具有一致性;若所述目标数据表的统计信息与所述源数据表的统计信息不相同,则确定所述目标数据表与所述源数据表不一致。The device according to any one of claims 12-14, wherein the verification module is specifically configured to obtain statistical information of the target data table and the source data table, and the statistical information includes any of the following Item or multiple items: the amount of data, the number of fields, the number of rows, and the number of columns; if the statistical information of the target data table is the same as the statistical information of the source data table, the target data table and the source data table are determined If the statistical information of the target data table is different from the statistical information of the source data table, it is determined that the target data table is inconsistent with the source data table.
  17. 根据权利要求12所述的装置,其特征在于,所述获取模块,具体用于获取数据管理系统中的数据表的历史一致性验证标识,所述历史一致性验证标识是指已被一致性验证的数据表的标识;根据所述历史一致性验证标识从所述数据管理系统中获取未被一致性验证的数据表;将所述未被一致性验证的数据表作为目标数据表。The device according to claim 12, wherein the acquiring module is specifically configured to acquire a historical consistency verification identifier of a data table in a data management system, and the historical consistency verification identifier refers to the consistency verification. The identifier of the data table; the data table that has not been verified for consistency is obtained from the data management system according to the historical consistency verification identifier; the data table that has not been verified for consistency is used as the target data table.
  18. 根据权利要求12所述的装置,其特征在于,所述装置还包括:The device according to claim 12, wherein the device further comprises:
    删除模块,用于若存储所述目标数据表的数据库管理系统中的数据量大于预设数据量,则获取所述数据库管理系统中每个数据表被查询的次数;将查询次数小于预设次数的数据表及对应的源数据表删除。The deleting module is used to obtain the number of times each data table in the database management system has been queried if the data volume in the database management system storing the target data table is greater than the preset data volume; and reduce the number of queries to be less than the preset number The data table and the corresponding source data table are deleted.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器,适于实现一条或一条以上指令;以及,Processor, suitable for implementing one or more instructions; and,
    计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有一条或一条以上指令,所述一条或一条以上指令适于由所述处理器加载并执行如权利要求1-11任一项所述的数据验证方法。A computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by the processor and executed as in claim 1 -11 Any of the data verification methods.
  20. 一种计算机非易失性可读存储介质,其特征在于,所述计算机非易失性可读存储介质存储有一条或一条以上指令,所述一条或一条以上指令适于由处理器加载并执行如权利要求1-11任一项所述的数据验证方法。A computer nonvolatile readable storage medium, wherein the computer nonvolatile readable storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded and executed by a processor The data verification method according to any one of claims 1-11.
PCT/CN2019/116968 2019-04-12 2019-11-11 Data verification method, apparatus, electronic device and storage medium WO2020207008A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910297453.8A CN110083615A (en) 2019-04-12 2019-04-12 A kind of data verification method, device, electronic equipment and storage medium
CN201910297453.8 2019-04-12

Publications (1)

Publication Number Publication Date
WO2020207008A1 true WO2020207008A1 (en) 2020-10-15

Family

ID=67415108

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116968 WO2020207008A1 (en) 2019-04-12 2019-11-11 Data verification method, apparatus, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN110083615A (en)
WO (1) WO2020207008A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083615A (en) * 2019-04-12 2019-08-02 平安普惠企业管理有限公司 A kind of data verification method, device, electronic equipment and storage medium
CN111782456B (en) * 2020-06-30 2022-09-30 深圳赛安特技术服务有限公司 Anomaly detection method, device, computer equipment and storage medium
CN112463850A (en) * 2020-11-20 2021-03-09 中国建设银行股份有限公司 Data processing method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070276970A1 (en) * 2004-03-17 2007-11-29 Abb Research Ltd. Data Consistency Validation
CN103761162A (en) * 2014-01-11 2014-04-30 深圳清华大学研究院 Data backup method of distributed file system
CN104504122A (en) * 2014-12-29 2015-04-08 浪潮(北京)电子信息产业有限公司 Database migration data verification method and system
CN106055692A (en) * 2016-06-12 2016-10-26 上海爱数信息技术股份有限公司 Automatic testing method and system for comparison files or folders
CN110083615A (en) * 2019-04-12 2019-08-02 平安普惠企业管理有限公司 A kind of data verification method, device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9582371B1 (en) * 2015-12-09 2017-02-28 International Business Machines Corporation Balancing latency and consistency requirements during data replication
CN106326398A (en) * 2016-08-19 2017-01-11 东软集团股份有限公司 Data consistency comparison method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070276970A1 (en) * 2004-03-17 2007-11-29 Abb Research Ltd. Data Consistency Validation
CN103761162A (en) * 2014-01-11 2014-04-30 深圳清华大学研究院 Data backup method of distributed file system
CN104504122A (en) * 2014-12-29 2015-04-08 浪潮(北京)电子信息产业有限公司 Database migration data verification method and system
CN106055692A (en) * 2016-06-12 2016-10-26 上海爱数信息技术股份有限公司 Automatic testing method and system for comparison files or folders
CN110083615A (en) * 2019-04-12 2019-08-02 平安普惠企业管理有限公司 A kind of data verification method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110083615A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
US10831707B2 (en) Virtual partitions in virtual databases
WO2020207008A1 (en) Data verification method, apparatus, electronic device and storage medium
US8832028B2 (en) Database cloning
US9721116B2 (en) Test sandbox in production systems during productive use
US10222987B2 (en) Data deduplication with augmented cuckoo filters
WO2019085471A1 (en) Database synchronization method, application server, and computer readable storage medium
JP2021518705A (en) Runtime self-modification for blockchain ledger
US10331625B2 (en) Managing sequential data store
CN111352902A (en) Log processing method and device, terminal equipment and storage medium
US7774320B1 (en) Verifying integrity of file system data structures
US20160042024A1 (en) Continuous data health check
CN108717516B (en) File labeling method, terminal and medium
WO2021129151A1 (en) File backup method and apparatus, and terminal device
CN111159160B (en) Version rollback method and device, electronic equipment and storage medium
CN111897837B (en) Data query method, device, equipment and medium
US10440033B2 (en) Data storage system file integrity check
US20130132443A1 (en) Structure-specific record count database operations
US20220253546A1 (en) System and method for representing and verifying a data set using a tree-based data structure
US20230370273A1 (en) Bootstrapping a code transparency system
US20230351037A1 (en) Access control system for access revocation in a database
CN114328755B (en) Data writing method, data reading device and electronic equipment
US11921859B2 (en) System and method for managing device security during startup
TWI717909B (en) Data verification method
US10915576B2 (en) High performance bloom filter
US20230368193A1 (en) Code transparency system operation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19924554

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02/02/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19924554

Country of ref document: EP

Kind code of ref document: A1