WO2020253122A1 - 数据核对方法、装置、计算机设备和存储介质 - Google Patents
数据核对方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2020253122A1 WO2020253122A1 PCT/CN2019/121962 CN2019121962W WO2020253122A1 WO 2020253122 A1 WO2020253122 A1 WO 2020253122A1 CN 2019121962 W CN2019121962 W CN 2019121962W WO 2020253122 A1 WO2020253122 A1 WO 2020253122A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- business
- data
- ledger
- update data
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2457—Query processing with adaptation to user needs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/275—Synchronous replication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Definitions
- This application relates to a data verification method, device, computer equipment and storage medium.
- the business system will generate a large amount of updated business data every day.
- a large amount of business data may need to be distributed in multiple data centers, and business data distributed in various places need to be synchronized.
- a data verification method, device, computer equipment, and storage medium are provided.
- a data verification method including:
- the service update data uploaded within the preset time interval in the node ledger of the current blockchain node is updated with the corresponding business update data in the ledger of other nodes in the blockchain network Perform data verification on the data to determine whether the business update data in the ledger of each node matches with each other;
- a data checking device comprising:
- the update data receiving module is used to receive the service update data sent by the service terminal;
- the update data upload module is used to upload business update data to the database and node ledger corresponding to the current blockchain node;
- the data synchronization module is used to synchronize the business update data to the database of other blockchain nodes in the blockchain network, so as to upload the business update data to the node ledger of other blockchain nodes through the database;
- the data matching module is used to compare the service update data uploaded within the preset time interval in the node ledger of the current blockchain node with the ledger of other nodes in the blockchain when the detection reaches the preset check time. Perform data verification on the corresponding business update data, and determine whether the business update data in the ledger of each node matches with each other;
- the checking and judging module is used to check the data when it is determined that the service update data matches each other in all the node accounts.
- a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
- the service update data uploaded within the preset time interval in the node ledger of the current blockchain node is updated with the corresponding business update data in the ledger of other nodes in the blockchain network Perform data verification on the data to determine whether the business update data in the ledger of each node matches with each other;
- One or more non-volatile computer-readable storage media storing computer-readable instructions.
- the one or more processors execute the following steps:
- the service update data uploaded within the preset time interval in the node ledger of the current blockchain node is updated with the corresponding business update data in the ledger of other nodes in the blockchain network Perform data verification on the data to determine whether the business update data in the ledger of each node matches with each other;
- Fig. 1 is an application scenario diagram of a data verification method according to one or more embodiments.
- Fig. 2 is a schematic flowchart of a data verification method according to one or more embodiments.
- Fig. 3 is a schematic flow chart of a verification report uploading step according to one or more embodiments.
- Fig. 4 is a block diagram of a data verification device according to one or more embodiments.
- Figure 5 is a block diagram of a computer device according to one or more embodiments.
- the data verification method provided in this application can be applied to the application environment as shown in FIG. 1.
- the node servers 102 of each blockchain node communicate with each other through the network to construct a blockchain network.
- each node server 102 can communicate with the service terminal 104 through a network.
- the service terminal 104 can send updated service data to the node server 102, and the node server 102 uploads the received updated service data to the database and the node ledger of the blockchain node.
- the node server 102 of a certain node When the node server 102 of a certain node receives the service terminal's sending When updating business data, upload the business update data to the database and node ledger corresponding to the current blockchain node, and synchronize the business update data to the databases of other blockchain nodes in the blockchain network, so that the The business update data is uploaded to the node ledger of other blockchain nodes; when the node server 102 detects that the current time reaches the preset verification time, it will upload the business update data in the node ledger of the current blockchain node within the preset time interval, Perform data verification with the corresponding business update data in the ledger of other nodes in the blockchain network to determine whether the business update data in each node's ledger matches with each other; when it is determined that the business update data in all node ledger matches, Then the data verification is passed.
- the service terminal 104 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
- the node server 102 may be implemented by an independent server or a server cluster composed of multiple servers.
- a data verification method is provided. Taking the method applied to the node server in FIG. 1 as an example, the method includes the following steps:
- Step 210 Receive service update data sent by the service terminal.
- the business system is set up with multiple data centers, and each data center is a blockchain node on the blockchain network.
- Each data center is equipped with a node server and a node database.
- Multiple node servers communicate through the network to form a blockchain network.
- the node database can be the database in the node server or an independent database.
- Node databases can also communicate through the network to synchronize data between databases.
- the business terminal collects or generates a large amount of new business update data every day, and the business update data may include but is not limited to user registration information, business change information, etc.
- Business update data can be composed of multiple business records, each business record is a piece of updated business information, and each business record can include multiple fields, such as user ID, user name, name, age, occupation and other fields.
- the service terminal regularly uploads the service update data to the data center that matches itself, that is, the node server.
- the matching rule between the business terminal and the data center can be the device distance priority principle, that is, the business terminal sends the service update data to the node server closest to its own geographic location; it can also use the business scope matching principle, that is, different data centers store different business scopes
- the service terminal sends the data to the corresponding node server according to the service scope of the service update data; in addition, a matching rule combining distance priority and service scope matching or other matching rules can also be used.
- Step 220 Upload the service update data to the database and the node ledger corresponding to the current blockchain node.
- the node server After the node server receives the service update data uploaded by the service terminal, it stores the service update data in the database of the current blockchain node, thereby performing data backup locally.
- the database sorts the stored data according to the time of the received service update data.
- the database can be an internal database of the node server or an independent database.
- the node server uploads the received business update data to the node ledger of the current blockchain node for data accounting.
- Step 230 Synchronize the service update data to the database of other blockchain nodes in the blockchain network, so as to upload the service update data to the node ledger of other blockchain nodes through the database.
- the database After the database stores the business update data locally, it synchronizes the business update data to the databases of other blockchain nodes in the blockchain network. Specifically, the databases between the blockchain networks communicate through the network. Each database is a distributed database. The data synchronization method of the distributed database is adopted to synchronize the business update data to the databases of all blockchain nodes. Transfer to the respective node server. This can ensure that business update data is synchronized to each data center in the blockchain network as quickly as possible, and each blockchain node performs synchronized data accounting.
- the node server of a certain blockchain node detects that the database of the local node has synchronized the updated business update data, it extracts the business update data from the database.
- the node server obtains service update data from the database, the node server can actively grab the service update data from the database according to the storage time of the data in the database, and the node server can also send an update data upload instruction to the database, so that the first database The update data upload instruction uploads updated business update data to the node server.
- the node server uploads the business update data to the node ledger of the current blockchain node, and the node ledger performs accounting processing on the business update data.
- the node ledger records the upload time of the business update data, it records the upload time of the business update data, and can perform processing such as encryption on the business update data before accounting.
- Step 240 When it is detected that the current time reaches the preset verification time, the service update data uploaded within the preset time interval in the node ledger of the current blockchain node is combined with the corresponding business update data in the ledger of other nodes in the blockchain network Perform data verification to determine whether the business update data in each node's ledger matches each other.
- Each blockchain node in the blockchain network performs data verification on the newly added data in the node ledger according to a preset verification time period.
- the preset check period is to perform statistical analysis on the historical data update period, calculate the statistical index of the data update period, and set it according to the statistical index. For example, it can be the mean value, median value, etc. of the statistical update period.
- the preset verification period can be set to 5 minutes, 10 minutes, half an hour, etc.
- the node server only checks the incremental data in the current time period and does not perform a second reconciliation, thereby avoiding repeated reconciliation and improving the reconciliation efficiency.
- the initial verification time is set in the blockchain network, and the preset verification time is calculated according to the initial verification time and the preset verification period.
- the preset verification time of each node server in the blockchain network remains consistent.
- each node server automatically starts the data matching work of the updated data in the node ledger.
- each node server detects that the current time reaches the preset verification time, each node server reads the newly added service update data within the preset time interval from the corresponding node ledger, and the length of the preset time interval is equal to the preset verification period , To match the read business update data with the newly added business update data read in the ledger of other nodes.
- any node server in the blockchain network can be set as a central server, the central server communicates with other node servers, and the other node servers send the read new business update data to the central server.
- the central server performs data matching between the received service update data and the locally read service update data.
- the central server may not be set, and each node server sends service update data to other node servers, and data matching is performed with each other.
- the data matching rule can be set to match when the data is completely consistent, or it can be set to match when the data meets the preset value range, and it can also be set In order to determine a match when two mutually verified data meet a certain data relationship, other matching rules can also be set, or different matching rules can be set for different fields in the business update data.
- Step 250 When it is determined that the service update data in all the node ledgers match each other, the data verification is passed.
- the node server determines that the service update data meets the matching rules when comparing pairwise in all the node ledgers, and when they match each other, it is determined that the newly added service update data within the preset time interval has passed the verification. As long as the service update data in one node's ledger does not match the service update data of other node's ledger, it is determined that the verification of the business update data has failed.
- the node server uploads updated business data to the node account book of the blockchain network in time, and automatically verifies the updated business data within the preset time interval when the preset verification time is reached. Due to the unique characteristics of high transmission efficiency of the blockchain itself, data verification between blockchain ledgers can increase the frequency and efficiency of reconciliation, reduce the cost of abnormal data investigation, and ensure the security and stability of data stored on the ledgers .
- judging whether the business update data in the ledger of each node matches each other includes: reading the serial number of each business record in the business update data in the node ledger of the current blockchain node one by one; judging other nodes Whether there is a business record consistent with the serial number in the ledger; when there are business records consistent with the serial number in all node books, determine whether the field values in the business records of all serial numbers conform to the preset matching logic; When the values of the fields conform to the preset matching logic, it is determined that the business record of the serial number matches successfully.
- the business update data is composed of multiple business records, and each business record can contain multiple business information fields.
- the node server uploads new business update data to the node ledger, it assigns a unique serial number to each business record.
- the serial number can be randomly generated or sequentially generated according to the recording time of each business record in the service terminal.
- the node server reads the serial number of each business record in the business update data one by one, and queries whether there is a business record consistent with the read serial number in the node ledger of other blockchain nodes. For example, if the node server of the current node is the central server, the node servers of the remaining nodes will send their respective business update data to the central server, and the central server will look for the existence and read data from the received business update data of each node one by one. Business records with consistent serial numbers.
- the node server When the node server finds a business record consistent with the read serial number in all the node ledgers, the node server performs the step of matching the fields in each business record with each other. Specifically, the data format of each business record is standardized by the business terminal. Therefore, the fields contained in each business record are also fixed, and the verification and matching rules for the fields are also determined.
- the node server stores the preset matching logic for each field in advance, and the node server obtains the preset matching logic corresponding to each field, and performs pairwise verification on the field values of the corresponding fields in the multiple node ledgers according to the preset matching logic.
- the node server determines that all field values of the business record match each other in all the node ledgers based on the matching result of the pairwise verification, it determines that the business record corresponding to the serial number matches successfully. As long as there are field values that do not match each other in the ledgers, it is determined that the business record corresponding to the serial number fails to match.
- the preset matching logic of each field in the record can be different.
- the preset matching logic can be set to match when the data is completely consistent, or it can be set to match when the data meets the preset value range, and it can also be set It is determined that when two mutually verified data meet a certain data relationship, it can be judged as a match, and other matching rules can also be set.
- the node server may generate a data abnormality report based on the field of the failed matching business record and the serial number of the business record.
- the data abnormality report can be saved locally or recorded in the node ledger, so as to facilitate the corresponding business terminal to troubleshoot data synchronization abnormalities.
- judging whether the business update data in the ledger of each node matches each other includes: reading the serial number of each business record in the business update data in the node ledger of the current blockchain node one by one; judging other nodes Whether there are business records consistent with the serial number in the ledger; when there is a node ledger with business records with inconsistent serial numbers, obtain the earliest record time of the business record of the serial number in the blockchain network; obtain the current time, based on the current time and The earliest recording time obtains the recording interval duration, and compares the recording interval duration with a preset interval threshold; when the recording interval duration exceeds the preset interval threshold, it is determined that the business record corresponding to the serial number fails to match.
- the node server When the node server performs business record query in each node ledger based on the serial number, when the node server finds a node ledger that does not have a business record consistent with the read serial number, the node server obtains the remaining business records with the serial number In the node ledger, the recording time of the business record, and the recording time is the time when the node ledger records the record. The node server finds the earliest record time of the business record in the blockchain network from each record time.
- the node server obtains the current time and calculates the time difference between the current time and the earliest recording time to obtain the recording interval time.
- the node server obtains the preset interval threshold.
- the preset interval threshold is used to measure whether the recording exceeds the maximum synchronization delay time.
- the node server compares the recording interval with the preset interval threshold. When it is determined according to the comparison result that the recording interval exceeds the preset interval When the threshold is set, the node server determines that the business record corresponding to the read serial number fails to match, and the business record may fail to synchronize due to network failures and other issues.
- the node server can obtain the node code corresponding to the node ledger missing the business record corresponding to the serial number, generate a data abnormality report based on the node code and serial number, and save the data abnormal report locally or record it in the node ledger, thereby It is convenient for the corresponding business terminal to troubleshoot abnormal data synchronization problems.
- the above method may further include the following step: when the recording interval duration does not exceed the preset interval threshold, modifying the recording time of the service update records corresponding to the serial numbers in all node ledgers to the current time.
- the node server determines that the recording interval duration does not exceed the preset interval threshold, it records the remaining services with the serial number in the node ledger, and modifies the recording time of the business record to the current time. Therefore, the data verification of the field value of this business record will no longer be carried out, that is, no data verification will be carried out during this verification period.
- This record may not be synchronized due to network delays and other reasons, so it cannot be due to the temporary lack of business records. It is determined that the record synchronization has failed. Modify the recording time of this business record in the remaining node ledger to the current time, so that it can automatically enter the data verification of the next verification cycle.
- the above method may further include the following steps of verifying report upload:
- Step 260 Generate a data verification report according to the data verification result of the business update data.
- the node server obtains business records with data matching failures, including business records with missing data in some node ledgers, and business records with field values that fail to verify each other between the ledgers, and the node server matches business records with failed data matching Generate data verification report.
- the data verification report can directly list the business records that failed to match; the node server can also obtain the serial number of the business record and the reason for the verification failure, and generate a data verification report based on the serial number and the reason for the verification failure; it can also be generated in other ways Data check report.
- Step 270 Record the current time in the data verification report, upload the data verification report to the node ledger of the current blockchain network, and synchronize the data verification report to the ledger of other nodes in the blockchain network.
- the node server records the verification time in the data verification report, and the verification time is set to the current time.
- the node server uploads the generated data check report to the node ledger of the current node and synchronizes it to the database of the current node.
- the database synchronizes the data check report to the databases of other nodes, and then uploads the data check reports from other nodes to other nodes.
- the node server is uploaded to the corresponding node account book by the node server of other nodes, so as to record the data check report in the blockchain network.
- the above method may further include the following steps: receiving an abnormal bill query request sent by the service terminal, the abnormal bill query request carrying the query time range; searching the node account book of the current blockchain node within the query time range Data check report; extract data abnormal records from the data check report, generate data abnormal reports based on the data abnormal records; return the data abnormal reports to the business terminal.
- the business terminal needs to check whether the uploaded business data is successfully accounted for.
- the business terminal can periodically send an abnormal bill query request to the matching node server, or the auditor can actively send an abnormal bill query request to the matching node server by operating the business terminal.
- the abnormal bill query requests the user to request the node server to query the business data with abnormal accounting, and the abnormal bill query request carries the query time range of the business data uploaded by the terminal.
- the node server receives the abnormal bill query request sent by the service terminal, and extracts the query time range from the abnormal bill query request.
- the node server searches the node ledger of the current blockchain node for a data verification report whose recording time is within the query time range.
- the node server extracts the data exception record from the data check report.
- the data exception record is a business record with data matching failure.
- the server extracts identification information such as the record number from the data exception record and extracts the reason for the verification failure.
- the server records the abnormality Generate a data exception report based on the identification information and the reason for the verification failure, and return the generated data exception report to the service terminal.
- the business terminal when the business terminal sends an abnormal bill query request to the node server, it can directly obtain the abnormal data record within the query time range from the node ledger of the blockchain node, which can effectively shorten the data verification time and reduce Data verification cost.
- a data verification device including: an update data receiving module 410, an update data uploading module 420, a data synchronization module 430, a data matching module 440, and a verification determination module 450, among them:
- the update data receiving module 410 is configured to receive service update data sent by the service terminal.
- the update data uploading module 420 is used to upload the business update data to the database and the node ledger corresponding to the current blockchain node.
- the data synchronization module 430 is used for synchronizing the service update data to the database of other blockchain nodes in the blockchain network, so as to upload the service update data to the node ledger of other blockchain nodes through the database.
- the data matching module 440 is used to update the business data uploaded within the preset time interval in the node ledger of the current blockchain node with the corresponding business in the ledger of other nodes in the blockchain network when the detection reaches the preset verification time Update the data for data verification, and judge whether the business update data in the ledger of each node matches with each other.
- the verification and determination module 450 is used for data verification when it is determined that the service update data matches each other in all the node ledgers.
- the data matching module 440 may include:
- the serial number reading unit is used to read the serial number of each business record in the business update data in the node ledger of the current blockchain node one by one.
- the serial number judging unit is used to judge whether there is a business record consistent with the serial number in the ledger of other nodes.
- the field matching unit is used to determine whether the field values in all the business records of the serial number conform to the preset matching logic when there are business records consistent with the serial number in all the node books.
- the matching determination unit is configured to determine that the business record of the serial number matches successfully when each of the field values conform to the preset matching logic.
- the data matching module 440 may include:
- the serial number reading unit is used to read the serial number of each business record in the business update data in the node ledger of the current blockchain node one by one.
- the serial number judging unit is used to judge whether there is a business record consistent with the serial number in the ledger of other nodes.
- the recording time acquiring unit is configured to acquire the earliest recording time of the business record of the serial number in the blockchain network when there is a node ledger of the business record with the serial number inconsistent.
- the duration comparison unit is used to obtain the current time, obtain the recording interval duration according to the current time and the earliest recording time, and compare the recording interval duration with a preset interval threshold.
- the matching determination unit is configured to determine that the matching of the business record corresponding to the serial number fails when the recording interval duration exceeds the preset interval threshold.
- the data verification device may further include:
- the time modification module is used to modify the recording time of the business record corresponding to the serial number in all the node accounts to the current time when the recording interval duration does not exceed the preset interval threshold.
- the data verification device may further include:
- the report generation module is used to generate a data verification report based on the data verification result of the business update data.
- the report recording module is used to record the current time in the data verification report, upload the data verification report to the node ledger of the current blockchain network, and synchronize the data verification report to other node books in the blockchain network.
- the data verification device may further include:
- the request receiving module is used to receive the abnormal bill query request sent by the service terminal, and the abnormal bill query request carries the query time range.
- the report search module is used to search the data check report within the query time range in the node ledger of the current blockchain node.
- the abnormal extraction module is used to extract data abnormal records from the data check report, and generate data abnormal reports based on the data abnormal records.
- the report return module is used to return the data abnormal report to the service terminal.
- Each module in the above-mentioned data checking device can be implemented in whole or in part by software, hardware and a combination thereof.
- the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
- a computer device is provided.
- the computer device may be a server, and its block diagram may be as shown in FIG. 5.
- the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus.
- the processor of the computer device is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
- the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
- the database of the computer equipment is used to store data verification data.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the computer readable instructions are executed by the processor to realize a data verification method.
- FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
- a computer device including a memory and one or more processors.
- the memory stores computer-readable instructions.
- the one or more processors perform the following steps: Business update data; upload business update data to the database and node ledger corresponding to the current blockchain node; synchronize business update data to the databases of other blockchain nodes in the blockchain network to update the business data through the database Upload to the node ledger of other blockchain nodes; when it is detected that the current time reaches the preset check time, the business update data uploaded within the preset time interval in the node ledger of the current blockchain node will be updated with the blockchain network
- the corresponding service update data in other node ledgers are checked for data to determine whether the service update data in each node’s ledgers match each other; and when it is determined that the service update data in all node ledgers match each other, the data check passes.
- the step of judging whether the service update data in the ledger of each node matches each other is also used to: read the business in the node ledger of the current blockchain node one by one Update the serial number of each business record in the data; determine whether there is a business record consistent with the serial number in the ledger of other nodes; when there are business records consistent with the serial number in all the node books, determine whether the business record of all serial numbers Whether each field value conforms to the preset matching logic; and when the field values conform to the preset matching logic, it is determined that the business record of the serial number matches successfully.
- the step of judging whether the service update data in the ledger of each node matches each other is also used to: read the business in the node ledger of the current blockchain node one by one Update the serial number of each business record in the data; determine whether there is a business record consistent with the serial number in the ledger of other nodes; when there is a node ledger with a business record with inconsistent serial numbers, obtain the business record of the serial number in the blockchain network Obtain the current time, obtain the recording interval length according to the current time and the earliest recording time, and compare the recording interval length with the preset interval threshold; and when the recording interval exceeds the preset interval threshold, it is determined that the serial number corresponds Failed to match business records for.
- the processor further implements the following steps when executing the computer-readable instructions: when the recording interval does not exceed the preset interval threshold, the recording time of the business record corresponding to the serial number in all the node books is modified to the current time .
- the processor further implements the following steps when executing the computer-readable instructions: generating a data verification report according to the data verification result of the business update data; and recording the current time in the data verification report, and uploading the data verification report to In the current node ledger of the blockchain network, the data verification report is synchronized to the other node ledger in the blockchain network.
- the processor further implements the following steps when executing the computer-readable instructions: receiving the abnormal bill query request sent by the service terminal, the abnormal bill query request carrying the query time range; searching the node ledger of the current blockchain node Query the data check report within the time range; and extract the data abnormal record from the data check report, and generate the data abnormal report based on the data abnormal record; return the data abnormal report to the business terminal.
- One or more non-volatile computer-readable storage media storing computer-readable instructions.
- the one or more processors perform the following steps: Business update data; upload business update data to the database and node ledger corresponding to the current blockchain node; synchronize business update data to the database of other blockchain nodes in the blockchain network to update the business through the database
- the data is uploaded to the node ledger of other blockchain nodes; when the detection current time reaches the preset check time, the business update data uploaded within the preset time interval in the node ledger of the current blockchain node will be updated with the blockchain network
- Perform data verification on the corresponding business update data in other node ledgers to determine whether the business update data in each node’s ledgers match with each other; and when it is determined that the business update data in all node ledgers match each other, the data verification is passed .
- the computer-readable instruction when executed by the processor to realize the step of judging whether the service update data in each node's ledger matches with each other, it is also used to: read the node ledger of the current blockchain node one by one The serial number of each business record in the business update data; judge whether there is a business record consistent with the serial number in the ledger of other nodes; when there are business records consistent with the serial number in all the node books, judge the business records of all serial numbers Whether the field values of each match the preset matching logic; and when the field values match the preset matching logic, it is determined that the business record of the serial number matches successfully.
- the computer-readable instruction when executed by the processor to realize the step of judging whether the service update data in each node's ledger matches with each other, it is also used to: read the node ledger of the current blockchain node one by one The serial number of each business record in the business update data; determine whether there is a business record consistent with the serial number in the ledger of other nodes; when there is a node ledger with a business record with inconsistent serial numbers, obtain the business record of the serial number in the blockchain network Obtain the current time, obtain the recording interval length according to the current time and the earliest recording time, and compare the recording interval with the preset interval threshold; and when the recording interval exceeds the preset interval threshold, determine the serial number The corresponding business record failed to match.
- the following steps are also implemented: when the recording interval does not exceed the preset interval threshold, the recording time of the business record corresponding to the serial number in all the node books is modified to the current time.
- the following steps are also implemented: generating a data verification report based on the data verification results of the business update data; and recording the current time in the data verification report, and uploading the data verification report To the node ledger of the current blockchain network, and synchronize the data check report to the ledger of other nodes in the blockchain network.
- the following steps are also implemented: receiving an abnormal bill query request sent by the service terminal, the abnormal bill query request carrying the query time range; searching the node ledger of the current blockchain node The data check report within the query time range; and extract the data abnormal record from the data check report, generate the data abnormal report based on the data abnormal record; return the data abnormal report to the business terminal.
- Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous chain Channel
- memory bus Radbus direct RAM
- RDRAM direct memory bus dynamic RAM
- RDRAM memory bus dynamic RAM
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
Claims (20)
- 一种数据核对方法,包括:接收业务终端发送的业务更新数据;将所述业务更新数据上传至所述当前区块链节点对应的数据库及节点账本中;将所述业务更新数据同步至区块链网络中其他区块链节点的数据库中,以通过数据库将所述业务更新数据上传至其他区块链节点的节点账本中;当检测当前时间到达预设核对时间时,将所述当前区块链节点的节点账本中预设时间间隔内上传的业务更新数据,与所述区块链网络中其他节点账本中对应的业务更新数据进行数据核对,判断各节点账本中的业务更新数据相互之间是否匹配;及当判定出所述业务更新数据在所有节点账本中均相互匹配时,则数据核对通过。
- 根据权利要求1所述的方法,其特征在于,所述判断各节点账本中的业务更新数据相互之间是否匹配,包括:逐条读取所述当前区块链节点的节点账本中所述业务更新数据中各业务记录的流水号;判断其他节点账本中是否存在与所述流水号一致的业务记录;当所有节点账本中均存在与所述流水号一致的业务记录时,判断所有所述流水号的业务记录中的各字段值相互之间是否符合预设匹配逻辑;及当各所述字段值相互之间均符合预设匹配逻辑时,则判定所述流水号的业务记录匹配成功。
- 根据权利要求1所述的方法,其特征在于,所述判断各节点账本中的业务更新数据相互之间是否匹配,包括:逐条读取所述当前区块链节点的节点账本中所述业务更新数据中各业务记录的流水号;判断其他节点账本中是否存在与所述流水号一致的业务记录;当存在所述流水号不一致的业务记录的节点账本时,获取所述流水号的业务记录在所述区块链网络中的最早记录时间;获取当前时间,根据当前时间和所述最早记录时间得到记录间隔时长,并将所述记录间隔时长与预设间隔阈值比较;及当所述记录间隔时长超过所述预设间隔阈值时,则判定所述流水号对应的业务记录匹配失败。
- 根据权利要求3所述的方法,其特征在于,还包括:当所述记录间隔时长未超过所述预设间隔阈值时,将所有节点账本中所述流水号对应的业务记录的记录时间修改为所述当前时间。
- 根据权利要求1所述的方法,其特征在于,还包括:根据所述业务更新数据的数据核对结果生成数据核对报告;及将所述当前时间记录于所述数据核对报告中,将所述数据核对报告上传至所述当前区块链网络的节点账本中,并将所述数据核对报告同步至所述区块链网络中的其他节点账本中。
- 根据权利要求5所述的方法,其特征在于,还包括:接收所述业务终端发送的异常账单查询请求,所述异常账单查询请求中携带查询时间范围;查找所述当前区块链节点的节点账本中所述查询时间范围内的数据核对报告;从所述数据核对报告中提取数据异常记录,根据所述数据异常记录生成数据异常报告;及将所述数据异常报告返回给所述业务终端。
- 一种数据核对装置,包括:更新数据接收模块,用于接收业务终端发送的业务更新数据;更新数据上传模块,用于将业务更新数据上传至当前区块链节点对应的数据库及节点账本中;数据同步模块,用于将所述业务更新数据同步至区块链网络中其他区块链节点的数据库中,以通过数据库将所述业务更新数据上传至其他区块链节点的节点账本中;数据匹配模块,用于当检测当前时间到达预设核对时间时,将所述当前区块链节点的节点账本中预设时间间隔内上传的业务更新数据,与所述区块链网络中其他节点账本中对应的业务更新数据进行数据核对,判断各节点账本中的业务更新数据相互之间是否匹配;及核对判定模块,用于当判定出所述业务更新数据在所有节点账本中均相互匹配时,则数据核对通过。
- 根据权利要求7所述的装置,其特征在于,还包括:报告生成模块,用于根据所述业务更新数据的数据核对结果生成数据核对报告;及报告记录模块,用于将所述当前时间记录于所述数据核对报告中,将所述数据核对报告上传至所述当前区块链网络的节点账本中,并将所述数据核对报告同步至所述区块链网络中的其他节点账本中。
- 根据权利要求7所述的装置,其特征在于,数据匹配模块还用于:流水号读取单元,用于逐条读取所述当前区块链节点的节点账本中所述业务更新数据中各业务记录的流水号;流水号判断单元,用于判断其他节点账本中是否存在与所述流水号一致的业务记录;字段匹配单元,用于当所有节点账本中均存在与所述流水号一致的业务记录时,判断所有所述流水号的业务记录中的各字段值相互之间是否符合预设匹配逻辑;及匹配判定单元,用于当各所述字段值相互之间均符合预设匹配逻辑时,则判定所述流水号的业务记录匹配成功。
- 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:接收业务终端发送的业务更新数据;将所述业务更新数据上传至所述当前区块链节点对应的数据库及节点账本中;将所述业务更新数据同步至区块链网络中其他区块链节点的数据库中,以通过数据库将所述业务更新数据上传至其他区块链节点的节点账本中;当检测当前时间到达预设核对时间时,将所述当前区块链节点的节点账本中预设时间间隔内上传的业务更新数据,与所述区块链网络中其他节点账本中对应的业务更新数据进行数据核对,判断各节点账本中的业务更新数据相互之间是否匹配;及当判定出所述业务更新数据在所有节点账本中均相互匹配时,则数据核对通过。
- 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述判断各节点账本中的业务更新数据相互之间是否匹配,包括:逐条读取所述当前区块链节点的节点账本中所述业务更新数据中各业务记录的流水号;判断其他节点账本中是否存在与所述流水号一致的业务记录;当所有节点账本中均存在与所述流水号一致的业务记录时,判断所有所述流水号的业务记录中的各字段值相互之间是否符合预设匹配逻辑;及当各所述字段值相互之间均符合预设匹配逻辑时,则判定所述流水号的业务记录匹配成功。
- 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述判断各节点账本中的业务更新数据相互之间是否匹配,包括:逐条读取所述当前区块链节点的节点账本中所述业务更新数据中各业务记录的流水号;判断其他节点账本中是否存在与所述流水号一致的业务记录;当存在所述流水号不一致的业务记录的节点账本时,获取所述流水号的业务记录在所述区块链网络中的最早记录时间;获取当前时间,根据当前时间和所述最早记录时间得到记录间隔时长,并将所述记录间隔时长与预设间隔阈值比较;及当所述记录间隔时长超过所述预设间隔阈值时,则判定所述流水号对应的业务记录匹配失败。
- 根据权利要求12所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:当所述记录间隔时长未超过所述预设间隔阈值时,将所有节点账本中所述流水号对应的业务记录的记录时间修改为所述当前时间。
- 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:根据所述业务更新数据的数据核对结果生成数据核对报告;及将所述当前时间记录于所述数据核对报告中,将所述数据核对报告上传至所述当前区块链网络的节点账本中,并将所述数据核对报告同步至所述区块链网络中的其他节点账本中。
- 根据权利要求14所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:接收所述业务终端发送的异常账单查询请求,所述异常账单查询请求中携带查询时间范围;查找所述当前区块链节点的节点账本中所述查询时间范围内的数据核对报告;从所述数据核对报告中提取数据异常记录,根据所述数据异常记录生成数据异常报告;及将所述数据异常报告返回给所述业务终端。
- 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:接收业务终端发送的业务更新数据;将所述业务更新数据上传至所述当前区块链节点对应的数据库及节点账本中;将所述业务更新数据同步至区块链网络中其他区块链节点的数据库中,以通过数据库将所述业务更新数据上传至其他区块链节点的节点账本中;当检测当前时间到达预设核对时间时,将所述当前区块链节点的节点账本中预设时间间隔内上传的业务更新数据,与所述区块链网络中其他节点账本中对应的业务更新数据进行数据核对,判断各节点账本中的业务更新数据相互之间是否匹配;及当判定出所述业务更新数据在所有节点账本中均相互匹配时,则数据核对通过。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的所述判断各节点账本中的业务更新数据相互之间是否匹配,包括:逐条读取所述当前区块链节点的节点账本中所述业务更新数据中各业务记录的流水号;判断其他节点账本中是否存在与所述流水号一致的业务记录;当所有节点账本中均存在与所述流水号一致的业务记录时,判断所有所述流水号的业务记录中的各字段值相互之间是否符合预设匹配逻辑;及当各所述字段值相互之间均符合预设匹配逻辑时,则判定所述流水号的业务记录匹配成功。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的所述判断各节点账本中的业务更新数据相互之间是否匹配,包括:逐条读取所述当前区块链节点的节点账本中所述业务更新数据中各业务记录的流水号;判断其他节点账本中是否存在与所述流水号一致的业务记录;当存在所述流水号不一致的业务记录的节点账本时,获取所述流水号的业务记录在所述区块链网络中的最早记录时间;获取当前时间,根据当前时间和所述最早记录时间得到记录间隔时长,并将所述记录间隔时长与预设间隔阈值比较;及当所述记录间隔时长超过所述预设间隔阈值时,则判定所述流水号对应的业务记录匹配失败。
- 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:当所述记录间隔时长未超过所述预设间隔阈值时,将所有节点账本中所述流水号对应的业务记录的记录时间修改为所述当前时间。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:根据所述业务更新数据的数据核对结果生成数据核对报告;及将所述当前时间记录于所述数据核对报告中,将所述数据核对报告上传至所述当前区块链网络的节点账本中,并将所述数据核对报告同步至所述区块链网络中的其他节点账本中。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910526058.2 | 2019-06-18 | ||
CN201910526058.2A CN110389985A (zh) | 2019-06-18 | 2019-06-18 | 数据核对方法、装置、计算机设备和存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020253122A1 true WO2020253122A1 (zh) | 2020-12-24 |
Family
ID=68285738
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/121962 WO2020253122A1 (zh) | 2019-06-18 | 2019-11-29 | 数据核对方法、装置、计算机设备和存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110389985A (zh) |
WO (1) | WO2020253122A1 (zh) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110389985A (zh) * | 2019-06-18 | 2019-10-29 | 深圳壹账通智能科技有限公司 | 数据核对方法、装置、计算机设备和存储介质 |
CN111221629B (zh) * | 2020-01-09 | 2023-09-05 | 上海沄界信息科技有限公司 | 计算资源使用量量化方法及装置 |
CN111552989A (zh) * | 2020-04-08 | 2020-08-18 | 深圳壹账通智能科技有限公司 | 基于区块链的业务数据处理方法、装置、设备和存储介质 |
CN112910999A (zh) * | 2021-01-29 | 2021-06-04 | 四川虹微技术有限公司 | 一种基于区块链的信息度量方法、装置、系统和度量盒子 |
CN113239056B (zh) * | 2021-05-19 | 2022-10-04 | 浙江网商银行股份有限公司 | 基于区块链的数据核对方法及系统 |
CN113377757B (zh) * | 2021-06-24 | 2023-08-25 | 杭州数梦工场科技有限公司 | 数据对账方法、装置、电子设备及机器可读存储介质 |
CN113761064B (zh) * | 2021-08-27 | 2023-06-30 | 成都质数斯达克科技有限公司 | 基于区块链的日切对账方法、装置、设备及可读存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106650494A (zh) * | 2016-12-16 | 2017-05-10 | 杭州嘉楠耘智信息科技有限公司 | 一种数据处理方法及装置 |
CN108074177A (zh) * | 2017-12-05 | 2018-05-25 | 深圳前海微众银行股份有限公司 | 数据对账方法、系统和计算机可读存储介质 |
CN108765141A (zh) * | 2018-06-20 | 2018-11-06 | 中国银行股份有限公司 | 一种数据跟踪管理方法及装置 |
US20190124061A1 (en) * | 2016-08-03 | 2019-04-25 | Ripple Luxembourg S.A. | Resource transfer setup and verification |
CN110389985A (zh) * | 2019-06-18 | 2019-10-29 | 深圳壹账通智能科技有限公司 | 数据核对方法、装置、计算机设备和存储介质 |
-
2019
- 2019-06-18 CN CN201910526058.2A patent/CN110389985A/zh active Pending
- 2019-11-29 WO PCT/CN2019/121962 patent/WO2020253122A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190124061A1 (en) * | 2016-08-03 | 2019-04-25 | Ripple Luxembourg S.A. | Resource transfer setup and verification |
CN106650494A (zh) * | 2016-12-16 | 2017-05-10 | 杭州嘉楠耘智信息科技有限公司 | 一种数据处理方法及装置 |
CN108074177A (zh) * | 2017-12-05 | 2018-05-25 | 深圳前海微众银行股份有限公司 | 数据对账方法、系统和计算机可读存储介质 |
CN108765141A (zh) * | 2018-06-20 | 2018-11-06 | 中国银行股份有限公司 | 一种数据跟踪管理方法及装置 |
CN110389985A (zh) * | 2019-06-18 | 2019-10-29 | 深圳壹账通智能科技有限公司 | 数据核对方法、装置、计算机设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110389985A (zh) | 2019-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020253122A1 (zh) | 数据核对方法、装置、计算机设备和存储介质 | |
WO2021003968A1 (zh) | 数据核对方法、装置、计算机设备和存储介质 | |
CN108874644B (zh) | 数据监控方法、装置、计算机设备及存储介质 | |
CN110069449B (zh) | 文件处理方法、装置、计算机设备和存储介质 | |
CN110543788B (zh) | 数据存储方法、装置、计算机可读存储介质和计算机设备 | |
CN109474578B (zh) | 报文消息校验方法、装置、计算机设备和存储介质 | |
WO2019200756A1 (zh) | 数据审批方法、装置、计算机设备和存储介质 | |
CN105989059B (zh) | 数据记录核对方法及装置 | |
CN110597837B (zh) | 业务数据处理方法、装置、存储介质和计算机设备 | |
US20210109917A1 (en) | System and Method for Processing a Database Query | |
CN111245548A (zh) | 基于时间戳的数据同步方法、装置和计算机设备 | |
CN111026767B (zh) | 区块链的数据存储方法、装置及硬件设备 | |
US11055277B2 (en) | Integrity verification method, apparatus, and system and device for data in a blockchain-type ledger | |
WO2020199713A1 (zh) | 数据验证方法、系统、装置及设备 | |
US10990705B2 (en) | Index creation for data records | |
WO2021135131A1 (zh) | 区块链的交易方法、装置、计算机设备及存储介质 | |
CN110647531A (zh) | 数据同步方法、装置、设备及计算机可读存储介质 | |
US10102232B2 (en) | Storing structured information | |
WO2019019741A1 (zh) | 医疗服务预约方法、装置、存储介质和计算机设备 | |
CN111339551A (zh) | 数据的验证方法及相关装置、设备 | |
CN109101232B (zh) | 一种产品开发的方法、装置、计算机设备及存储介质 | |
WO2016095716A1 (zh) | 一种故障信息处理方法与相关装置 | |
WO2021012903A1 (zh) | 数据存储方法、装置、计算机设备和存储介质 | |
CN111291063B (zh) | 主备副本选举方法、系统、计算机设备和存储介质 | |
CN112291321A (zh) | 业务处理方法、装置及系统 |
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: 19933827 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19933827 Country of ref document: EP Kind code of ref document: A1 |
|
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 1205 DATED 29/03/2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19933827 Country of ref document: EP Kind code of ref document: A1 |