CN113282664B - Block chain-based data synchronization method, system and storage medium - Google Patents

Block chain-based data synchronization method, system and storage medium Download PDF

Info

Publication number
CN113282664B
CN113282664B CN202110644023.6A CN202110644023A CN113282664B CN 113282664 B CN113282664 B CN 113282664B CN 202110644023 A CN202110644023 A CN 202110644023A CN 113282664 B CN113282664 B CN 113282664B
Authority
CN
China
Prior art keywords
node
result
target
service
processing path
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110644023.6A
Other languages
Chinese (zh)
Other versions
CN113282664A (en
Inventor
杨宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202110644023.6A priority Critical patent/CN113282664B/en
Publication of CN113282664A publication Critical patent/CN113282664A/en
Application granted granted Critical
Publication of CN113282664B publication Critical patent/CN113282664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Abstract

The embodiment of the application provides a data synchronization method, a system and a storage medium based on a block chain, relates to the technical field of computers, and is beneficial to improving the efficiency of business processing. The method comprises the following steps: the first node receives a first request; the first node acquires a service processing path; the first node sends service data and a service processing path to each node in the service processing path; each node respectively verifies the legality of the node to obtain respective verification results; each node respectively sends respective verification results and respective associated nodes to other nodes, each node splices the received associated nodes of each node to obtain a spliced path from the first node to the target node, and the consistency of the spliced path and the service processing path is verified to obtain a verification result; each node respectively sends respective verification results to other nodes; under the condition that verification results of all nodes in the service processing path represent that verification is passed, all the nodes in the service processing path synchronously process the service requested by the first request.

Description

Block chain-based data synchronization method, system and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a data synchronization method, a system and a storage medium based on a block chain.
Background
When the customer transacts the money transfer business of the cross-border RMB in the financial institution of China, the bank of the payer receives the money transfer application of the customer and sends out a money transfer instruction, and the bank of the payer directly transfers the money to the payee, or the bank of the payer transfers the money to the payee through the proxy line, and the payee pays the money to the payee according to the requirement of the money transfer instruction. In a customer money transfer, at least one of the payer and the payee is not a financial institution.
In the current cross-border RMB money transfer business, each bank on the money transfer path sequentially carries out self accounting processing according to the received money transfer instruction, converts the loop information in the received money transfer instruction to obtain new money transfer instruction information, and transmits the new money transfer instruction information to the subsequent mechanism in the form of a message until the money transfer position reaches the final payee account opening or collecting financial mechanism, and then the money transfer position is released into a customer account or a collecting bank's own account. In the whole money transfer process, only after the funds between two banks associated with the previous step are cleared, new money transfer instruction information is converted and reprocessed by the information receiver of the previous step and sequentially pushed to the next financial institution of the information receiver of the previous step on the money transfer path appointed by the money transfer service at the time of initiation. The money transfer method is inefficient.
Disclosure of Invention
The embodiment of the application provides a data synchronization method, a system and a storage medium based on a block chain, relates to the technical field of computers, and is beneficial to improving the efficiency of business processing.
In a first aspect, an embodiment of the present application provides a data synchronization method, applied to a blockchain data synchronization system, where the blockchain data synchronization system includes: a plurality of nodes, the method comprising: the first node receives a first request; the first request comprises service data and an identification of the target node; the target node is a node except the first node in the plurality of nodes; the first node acquires a service processing path; in the service processing path, a first node is a starting node, a target node is an ending node, and the service processing path further comprises at least one intermediate node; the first node sends service data and a service processing path to the target node and at least one intermediate node; the target node and at least one intermediate node respectively verify the legality of the service data and the service processing path to obtain respective first verification results or second verification results; the first verification result is used for the representation verification to pass, and the second verification result is used for the representation verification to fail; the target node and at least one intermediate node respectively send respective first verification results or second verification results and respective associated nodes to each node in the service processing path; the associated node of each node is the previous node or the next node of the node in the service processing path; each node in the service processing path splices the received associated node of each node to obtain a spliced path from the first node to the target node, verifies the consistency of the spliced path and the service processing path, and obtains respective third verification result or fourth verification result; the third verification result is used for the representation verification to pass, and the fourth verification result is used for the representation verification to fail; each node in the service processing path respectively sends a respective third verification result or fourth verification result to other nodes in the service processing path; under the condition that the verification results of all nodes in the service processing path comprise a first verification result and a third verification result, all nodes in the service processing path synchronously process the service requested by the first request.
In the embodiment of the application, after receiving the first request, the first node acquires the service data of the request and the service processing path corresponding to the target node, and sends the service data and the service processing path to each node in the service processing path, so that each node in the service processing path can respectively verify the service data and the service processing path to obtain a verification result, and send the obtained verification result to other nodes in the service processing path, and each node in the service processing path synchronously processes the service requested by the first request under the condition that each node in the service processing path passes the verification, thereby saving the waiting time and improving the processing efficiency of the service requested by the first request.
In a possible implementation manner, the plurality of nodes further comprise a management node; the method further comprises the steps of: the first node sends service data and a service processing path to the management node; the target node and at least one intermediate node respectively verify the validity of the service data and the service processing path to obtain respective first verification results or second verification results, including:
the target node and at least one intermediate node determine whether the associated node of each node and each node have a target corresponding relationship or not, and a first sub-result is obtained; the target corresponding relation comprises the corresponding relation between the identification of the associated node of each node and the identification of each node; the target node and at least one intermediate node determine whether target data of each node meet preset conditions or not, and a second sub-result is obtained; the target data are to-be-deducted data of each node in the process of processing the service requested by the first request; the target node and at least one intermediate node determine whether the associated node of each node is a registered node, and a third sub-result is obtained; the management node determines whether each node in the service processing path is a registered node, and obtains a fourth sub-result.
For each of the target node and the at least one intermediate node: under the condition that the first sub-result, the second sub-result and the third sub-result of each node are all yes, the node determines that the service data and the service processing path are legal, and a first verification result of the node is obtained; or if the first sub-result and the second sub-result of each node are yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is a registered node, the node determines that the service data and the service processing path are legal, and a first verification result of the node is obtained; or if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is not a registered node, the node determines that the service data and the service processing path are illegal, and a second verification result of the node is obtained; or if any one of the first sub-result or the second sub-result of each node is no, the node determines that the service data and the service processing path are illegal, and obtains the second verification result of the node.
In another possible implementation manner, the determining, by the target node and at least one intermediate node, whether the target data of each node meets a preset condition, to obtain a second sub-result includes: under the condition that each node in the target node and at least one intermediate node determines that the target data of the node is greater than or equal to the service quantity, the node determines that the second sub-result is yes; under the condition that each node in the target node and at least one intermediate node determines that the target data of the node is smaller than the service quantity and the category of the target data is a preset target category, the node determines that the second sub-result is yes; and under the condition that each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity and the category of the target data is not the target category, the node determines that the second sub-result is NO.
In another possible implementation, the method further includes: under the condition that the target data of the node is smaller than the service quantity and the class of the target data is the target class, the node sends prompt information to other nodes except the node in the service path; the hint information is used to characterize that the node processes the traffic requested by the first request to cause the target data to be negative.
In another possible implementation, the method further includes: in the case that the authentication result of at least one node in the traffic processing path includes the second authentication result or the fourth authentication result, the at least one node transmits the authentication result of the at least one node to other nodes in the traffic processing path than the node. Therefore, under the condition that the verification of any node summarized by the service processing path is not passed, other nodes can timely receive the verification result of the node, and the synchronism of information among nodes in the service processing path is improved.
In a second aspect, an embodiment of the present application provides a data synchronization system, where the data synchronization system includes a plurality of nodes; the first node is configured to receive a first request; the first request comprises service data and an identification of the target node; the target node is a node except the first node in the plurality of nodes; the first node is used for acquiring a service processing path; in the service processing path, a first node is a starting node, a target node is an ending node, and the service processing path further comprises at least one intermediate node; the first node is used for sending service data and a service processing path to the target node and at least one intermediate node; the target node and at least one intermediate node are respectively used for verifying the legality of the service data and the service processing path to obtain respective first verification results or second verification results; the first verification result is used for the representation verification to pass, and the second verification result is used for the representation verification to fail; the target node and the at least one intermediate node are respectively used for sending respective first verification results or second verification results and respective associated nodes to each node in the service processing path; the associated node of each node is the previous node or the next node of the node in the service processing path; each node in the service processing path is used for splicing the received associated node of each node to obtain a spliced path from the first node to the target node, verifying the consistency of the spliced path and the service processing path, and obtaining respective third verification result or fourth verification result; the third verification result is used for the representation verification to pass, and the fourth verification result is used for the representation verification to fail; each node in the service processing path is used for sending a respective third verification result or fourth verification result to other nodes in the service processing path; in the case that the verification results of the nodes in the service processing path both include the first verification result and the third verification result, the nodes in the service processing path are configured to synchronously process the service requested by the first request.
In one possible implementation, the plurality of nodes further includes a management node; the first node is also used for sending service data and a service processing path to the management node; the target node and the at least one intermediate node are specifically used for determining whether a target corresponding relation exists between the associated node of each node and each node, and a first sub-result is obtained; the target corresponding relation comprises the corresponding relation between the identification of the associated node of each node and the identification of each node; the target node and the at least one intermediate node are specifically configured to determine whether target data of each node meets a preset condition, so as to obtain a second sub-result; the target data are to-be-deducted data of each node in the process of processing the service requested by the first request; the target node and the at least one intermediate node are specifically configured to determine whether an associated node of each node is a registered node, so as to obtain a third sub-result; the management node is used for determining whether each node in the service processing path is a registered node or not, and obtaining a fourth sub-result.
For each of the target node and the at least one intermediate node: under the condition that the first sub-result, the second sub-result and the third sub-result of each node are all yes, the node is specifically used for determining that the service data and the service processing path are legal, and a first verification result of the node is obtained; or, if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is a registered node, the node is specifically configured to determine that the service data and the service processing path are legal, so as to obtain a first verification result of the node; or if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is not a registered node, the node is specifically used for determining that the service data and the service processing path are illegal, and obtaining a second verification result of the node; or if any one of the first sub-result or the second sub-result of each node is no, the node is specifically configured to determine that the service data and the service processing path are illegal, and obtain the second verification result of the node.
In another possible implementation manner, in a case that each node in the target node and the at least one intermediate node determines that the target data of the node is greater than or equal to the traffic number, the node is specifically configured to determine that the second sub-result is yes; under the condition that each node in the target node and at least one intermediate node determines that the target data of the node is smaller than the service quantity and the category of the target data is a preset target category, the node is specifically used for determining that the second sub-result is yes; and under the condition that each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity and the category of the target data is not the target category, the node is specifically used for determining whether the second sub-result is negative.
In another possible implementation manner, each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity, and if the class of the target data is the target class, the node is further configured to send prompt information to other nodes in the service path except for the node; the hint information is used to characterize that the node processes the traffic requested by the first request to cause the target data to be negative.
In another possible implementation, in case the authentication result of at least one node in the traffic processing path includes the second authentication result or the fourth authentication result, the at least one node is further configured to send the authentication result of the at least one node to other nodes in the traffic processing path than the node.
In a third aspect, an embodiment of the present application provides a data synchronization apparatus, including a processor and a memory, where the memory is configured to store code instructions, and the processor is configured to execute the code instructions to perform a method performed by a first node, an intermediate node, a target node, or a management node in the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored therein a computer program or instructions which, when run on a computer, cause the computer to perform the method performed by the first node, the intermediate node, the target node or the management node of the first aspect or any one of the possible implementations of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the method performed by the first node, the intermediate node, the target node or the management node of the first aspect or any one of the possible implementations of the first aspect.
In a sixth aspect, an embodiment of the present application provides a data synchronization system, including: the functionality of the first node, the intermediate node, the target node or the management node in a data synchronization method as described in the first aspect or any one of the possible implementations of the first aspect can be implemented.
In a seventh aspect, the present application provides a chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor being interconnected by wires, the at least one processor being adapted to execute a computer program or instructions to perform a method performed by a first node, an intermediate node, a target node or a management node of the first aspect or any one of the possible implementations of the first aspect; the communication interface in the chip can be an input/output interface, a pin, a circuit or the like.
In one possible implementation, the chip or chip system described above further includes at least one memory, where the at least one memory has instructions stored therein. The memory may be a memory unit within the chip, such as a register, a cache, etc., or may be a memory unit of the chip (e.g., a read-only memory, a random access memory, etc.).
It should be understood that the second to seventh aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the advantages obtained by each aspect and the corresponding possible embodiments are similar, and are not repeated.
Drawings
FIG. 1 is a diagram illustrating a process for providing a money transfer service according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a data synchronization system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a data synchronization method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a data synchronization device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a chip according to an embodiment of the application.
Detailed Description
In order to clearly describe the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first chip and the second chip are merely for distinguishing different chips, and the order of the different chips is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
The following is a brief description of some terms and techniques involved in the embodiments of the present application:
1) Cross-border fund receipt and payment
The cross-border fund is collected as international liability and liability between two or more countries or regions due to international trade, international investment and other aspects, and the cross-border and cross-region fund transfer is realized by means of a certain settlement tool and a payment system.
2) Block chain
A blockchain is a de-centralized database. A block is a block of data. The blockchain is capable of assembling blocks into a chain data structure in a sequential manner by means of distributed nodes in a time-sequential manner.
3) Alliance chain
Federated chains are an important application type for blockchains. The federation chain is directed to only members of a particular community and limited third parties, which internally designate a plurality of preselected nodes as billing agents, the generation of each block being determined jointly by all of the preselected nodes. Illustratively, a pending business (e.g., a cross-border money transfer business) may correspond to a block in the federation chain. The node that handles the traffic in the embodiments of the present application may be a preselected node (also known as a billing agent) in the federation chain.
4) Consensus mechanism
The consensus mechanism is an algorithm for achieving distributed consensus for the blockchain transaction, and solves the problem of consistency of transaction processing of all nodes in the distributed network, namely, the consensus is achieved on a proposal or a state by adopting a mode of all nodes in the network. For example, each node processing the cross-border money transfer service adopts the same verification method to verify and confirm the cross-border money transfer service, and when each node passes the verification, the nodes reach consensus.
The renmins cross-border payment system (Cross border Inter bank Payment System, CIPS) is increasingly being processed as cross-border renmins remittance transactions are handled by the chinese financial institutions. The system is mainly responsible for management and operation and maintenance by people's bank. Currently, in the process of processing a cross-border rmb money transfer service, a payer bank accepts a money transfer application of a customer and issues a money transfer instruction, and the payer bank directly transfers money to a payee, or transfers money to the payee through an agent bank, and the payee pays money to a payee according to the requirement of the money transfer instruction.
For example, as shown in fig. 1, a process of a money transfer service is shown in fig. 1, where a payer bank 101 receives a customer money transfer application and sends a money transfer instruction, the payer bank 101 processes accounts corresponding to the money transfer service in the money transfer application, then, the payer bank 101 sends the money transfer instruction to a first intermediary entity 102, the first intermediary entity 102 processes accounts corresponding to the money transfer service, then sends the money transfer instruction to a second intermediary entity 103, the second intermediary entity 103 processes accounts corresponding to the money transfer service, and then, sends the money transfer instruction to a payee 104, and the payee 104 pays money in the money transfer instruction to a payee. During the entire money transfer process, the new money transfer instruction is transferred and reworked by the receiver (e.g., the first intermediary entity 102) of the previous step to be sequentially pushed to the subsequent node (e.g., the second intermediary entity 103) of the receiver on the money transfer path designated by the money transfer service at the time of initiation only after the accounting process between the two entities (e.g., the payer bank 101 and the first intermediary entity 102) associated with the previous step is completed. Resulting in long processing time and low efficiency of money transfer services.
Based on this, the embodiment of the application provides a data synchronization method based on a blockchain, and the data synchronization method of the embodiment of the application can be applied to a blockchain data synchronization system, and exemplary, fig. 2 is a schematic structural diagram of the blockchain data synchronization system provided by the embodiment of the application. The blockchain data synchronization system 20 shown in fig. 2 includes a first node 201, a first intermediate node 202, a second intermediate node 203, and a target node 204, and optionally, the blockchain data synchronization system 20 further includes a management node 205. Communication may be made between various nodes in the blockchain data synchronization system 20.
The first node 201 is arranged to receive a service request of a user, the service request comprising service data and an identification of a target node 204. The first node 201 is further configured to obtain a traffic processing path from the first node 201 to the target node 204 (e.g., the first node 201-the first intermediate node 202-the second intermediate node 203-the target node 204), send traffic data to each of the traffic processing paths (e.g., the first intermediate node 202 to the target node 204 in fig. 2), and obtain the traffic processing path.
Each node in the service processing path is used for verifying the received service data and the service processing path, and sending a verification result and an associated node of the node to each node in the service processing path. Each node in the service processing path is further used for obtaining a splicing path according to the associated node of each node, verifying whether the splicing path is identical to the service processing path or not, if so, verifying that the splicing path is not passed, and sending verification results which are used for representing that the verification is not passed to other nodes in the service processing path under the condition that any verification result which is obtained by any node in the service processing path and related to the service represents that the verification is not passed. The service is changed to the service requested by the service request. And under the condition that the verification result related to the service, obtained by each node in the service processing path, represents that verification is passed, each node in the service processing path processes the service concurrently. Therefore, the efficiency of business processing is improved on the basis of guaranteeing the safety of business processing.
The functions of the nodes (e.g., including the first node 201, the first intermediate node 202, the second intermediate node 203, the target node 204, and the management node 206) in the blockchain data synchronization system described above may be implemented by the electronic device 30 as shown in fig. 3. The electronic device 30 in fig. 3 includes, but is not limited to: processor 301, memory 302, communication interface 303, and power supply 304, among others.
The processor 301 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 302, and invoking data stored in the memory 302, thereby performing overall monitoring of the electronic device. Processor 301 may include one or more processing units; alternatively, the processor 301 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs as well as various data. The memory 302 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for at least one functional unit, and the like. In addition, memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Alternatively, the memory 302 may be a non-transitory computer readable storage medium, for example, a read-only memory (ROM), a random access memory (random access memory, RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The communication interface 303 is an interface through which an external device is connected to the electronic apparatus 30. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The communication interface 303 may be used to receive input (e.g., data information, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 30 or may be used to transmit data between the electronic apparatus 30 and an external device.
A power supply 304 (e.g., a battery) may be used to power the various components, and optionally, the power supply 304 may be logically connected to the processor 301 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Alternatively, the computer instructions in the embodiments of the present application may be referred to as application program codes or systems, and the embodiments of the present application are not limited thereto in particular.
It should be noted that the electronic device shown in fig. 3 is only an example, and is not limited to the electronic device configuration applicable to the embodiment of the present application. In actual implementation, the electronic device may include more or fewer devices or components than those shown in FIG. 3.
Fig. 4 is a flowchart of a data synchronization method according to an embodiment of the present application, where the data synchronization method shown in fig. 4 is applicable to the blockchain data synchronization system shown in fig. 2. As shown in fig. 4, the following steps may be included:
s100: the first node receives a first request. The first request comprises service data and an identification of the target node; the target node is a node other than the first node in the blockchain data synchronization system.
In one possible implementation, the first node receives a first request sent by the terminal device.
Illustratively, assume that the first node is a node of a payer bank in a blockchain data synchronization system that receives a first request sent by a terminal device. The terminal device may be a device running a client of a target system of the payer bank, wherein the target system and the blockchain data synchronization system have a communication interface, and the communication interface may be used for the first node to receive data from the terminal device.
In another possible implementation, the first node receives a request entry operation of the user in the request entry interface, and obtains the first request.
Illustratively, assume that the first node is a node of a payer bank in a blockchain data synchronization system, the first node receiving a first request entered by a user in a request entry interface. The first request is for requesting processing of a money transfer service, and the first request may include information such as a money transfer amount and a collection account, wherein the service data of the money transfer service includes the money transfer amount, and the destination node of the money transfer service is identified as the collection account.
S101: the first node obtains a traffic processing path. The first node is a start node in the acquired service processing path, the target node is an end node in the service processing path, and the service processing path further comprises at least one intermediate node.
In one possible implementation, the first node obtains a service processing path of a first requested service input by a user.
In another possible implementation, the first node determines a service processing path of the first requested service according to a preset rule.
The target corresponding relation between the nodes and other nodes in the block chain data synchronization system can be pre-stored in the first node, wherein the target corresponding relation comprises the corresponding relation between the identification of the nodes and the identification of the associated nodes. The first node determines a node which can associate the first node with the target node from a plurality of target correspondences. The first node determines respective nodes associated from the first node to the target node, constituting a service processing path for the requested service.
In one example, it is assumed that the target correspondence includes a correspondence between the first node and the first intermediate node, a correspondence between the first intermediate node and the second intermediate node, and a correspondence between the second intermediate node and the target node. Then the first node determines that the traffic processing path of the first requested traffic is the first node, the first intermediate node, the second intermediate node, and the target node.
It may be understood that, in the case where the number of service processing paths requested by the first request determined by the first node is greater than 1, the first node may arbitrarily select one service path from the plurality of service processing paths as the service processing path of the service requested by the first request, and the first node may also select the service processing path with the highest default priority from the plurality of service processing paths.
The traffic processing path determined by the first node includes a first path including the first node, the first intermediate node, the second intermediate node, and the target node, and a second path including the first node, the second intermediate node, and the target node. Under the condition that the first intermediate node is a default association node of the first node, the first node determines that the first path is a service processing path of the service requested by the first request. It will be appreciated that the default association node for each node may be the result of the node receiving user input.
Each node in the block chain data synchronization system can receive target corresponding relations sent by other nodes except the node, and each node can also receive user input operation to acquire the target corresponding relations.
The first node is an account opening row of the first intermediate node after a financial institution (e.g., a bank or an agency) corresponding to the first intermediate node opens an account in the first node, the first intermediate node is an account row of the first node, and the first node obtains a corresponding relationship (also called account opening relationship) between the first node and the first intermediate node in response to an input operation of a user. The first node sends the corresponding relation to each node in the block chain data synchronization system, and each node in the block chain data synchronization system stores the received corresponding relation.
S102: the first node sends traffic data and traffic processing paths to the target node and to at least one intermediate node.
In a possible implementation, the first node sends the traffic data and the traffic processing path to the target node and the at least one intermediate node based on a epidemic protocol (Gossip protocol).
Based on the example of the first path in S101, the first node sends traffic data and traffic processing paths to its associated first intermediate node, which sends traffic data and traffic processing paths to its associated second intermediate node. The second intermediate node sends traffic data and traffic processing paths to its associated target node.
S103: the target node and at least one intermediate node respectively verify the legality of the received service data and the service processing path to obtain respective first verification results or second verification results. The first verification result is used for the representation verification to pass, and the second verification result is used for the representation verification to fail.
In a possible implementation manner, the target node and at least one intermediate node determine whether a target corresponding relationship exists between the associated node of each node and each node, and a first sub-result is obtained. The target corresponding relation comprises the corresponding relation between the identification of the associated node of each node and the identification of each node.
Based on the example of the target corresponding relationship and the first path in S101, the example of determining, by the first intermediate node, whether the target corresponding relationship exists between the associated node of the first intermediate node and the first intermediate node is described, where the associated node of the first intermediate node in the first path is the second intermediate node and the first node, and if the financial institution corresponding to the first intermediate node does not have an account open relationship with the financial institution corresponding to the first node, or the financial institution corresponding to the first intermediate node does not have an account open relationship with the financial institution corresponding to the second intermediate node, the first intermediate node determines that the service requested by the first request is illegal, and the first sub-result characterization verification obtained by the first intermediate node is not passed. Otherwise, the first sub-result characterization verification obtained by the first intermediate node passes.
In the verification process of the account opening relationship, the first sub-result may be determined only by the node where the account opening line is located, and the node where the account line is located obtains the neutral information. Wherein the neutral information does not affect the verification result.
The target node and at least one intermediate node determine whether target data of each node meet preset conditions or not, and a second sub-result is obtained; the target data is to-be-deducted data of each node in the process of processing the service requested by the first request.
In a possible implementation manner, in a case that each node in the target node and the at least one intermediate node determines that the target data of the node is greater than or equal to the number of services in the first request, the node determines that the second sub-result is yes. And under the condition that each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity in the first request and the category of the target data is a preset target category, the node determines that the second sub-result is yes. And under the condition that each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity in the first request and the category of the target data is not the target category, the node determines that the second sub-result is no.
Based on the target correspondence and the first path in S101, the description will be given by taking the first intermediate node as an example: in the event that the balance of the target account in the first intermediate node is greater than or equal to the money transfer amount in the money transfer service requested by the first request, the first intermediate node determines that the second sub-result is yes. The target account is an account opening account of the second intermediate node in the first intermediate node. And under the condition that the balance of the target account in the first intermediate node is smaller than the money transfer amount in the money transfer service requested by the first request and overdraft is allowed by the target account in the first intermediate node, the first intermediate node determines that the second sub-result is yes. And under the condition that the balance of the target account in the first intermediate node is smaller than the money transfer amount in the money transfer service requested by the first request and overdraft is not allowed by the target account in the first intermediate node, the first intermediate node determines that the second sub-result is negative.
Optionally, each node in the target node and at least one intermediate node determines that the target data of the node is smaller than the service quantity, and if the class of the target data is the target class, the node sends prompt information to other nodes except the node in the service path; the hint information is used to characterize that the node processes the traffic requested by the first request to cause the target data to be negative.
In an exemplary embodiment, in a case where the balance of the target account in the first intermediate node is less than the money transfer amount in the money transfer service requested by the first request and the target account in the first intermediate node allows overdraft, the first intermediate node sends a hint to the first node, the second intermediate node, and the target node, the hint being used to characterize that processing of the money transfer service by the first intermediate node will result in overdraft of the account opening account in the first intermediate node by the second intermediate node. In this way, risk prompting can be performed on other nodes in the service processing path.
The target node and at least one intermediate node determine whether the associated node of each node is a registered node, resulting in a third sub-result.
The first intermediate node determines whether the first node and the second intermediate node are registered nodes, and if any node in the first node or the second intermediate node is not a registered node, the first intermediate node determines that the third sub-result is no, otherwise, the first intermediate node determines that the third sub-result is yes. In the case that the first intermediate node finds the identity of the first node and the identity of the second intermediate node in the identities of the registered nodes, the first intermediate node determines that the third sub-result is yes.
It should be noted that, each node in the blockchain data synchronization system stores an identifier of a registered node, and the identifier of the registered node may be sent by the management node. The management node verifies each node added into the blockchain data synchronization system, adds the identification of the verified node into the identification of the registered node, and sends the identification of the registered node to each node in the blockchain data synchronization system.
The management node determines whether each node in the service processing path is a registered node, and obtains a fourth sub-result. Wherein, the management node can determine whether each node in the service processing path is a registered node according to the prestored identification of the registered node.
For each of the target node and the at least one intermediate node: and under the condition that the first sub-result, the second sub-result and the third sub-result of each node are all yes, the node determines that the service data and the service processing path are legal, and a first verification result of the node is obtained.
Or when the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is a registered node, the node determines that the service data and the service processing path are legal, and a first verification result of the node is obtained. In this way, in combination with the fourth sub-result obtained by the management node, the node is registered in the management node, but if the registration information of the node is not transmitted to the node in the service processing path, the node is the registered node and is not misjudged.
Or if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is not the registered node, the node determines that the service data and the service processing path are illegal, and a second verification result of the node is obtained.
Or if any one of the first sub-result or the second sub-result of each node is no, the node determines that the service data and the service processing path are illegal, and the second verification result of the node is obtained.
S104: the target node and at least one intermediate node respectively send respective first verification results or second verification results and respective associated nodes to each node in the service processing path; the associated node of each node is the previous node or the next node of the node in the service processing path.
For example, assume that the verification result obtained by verifying the service data and the service processing path by the first intermediate node is a first verification result, the first intermediate node sends the first verification result to the first node, the second intermediate node and the target node, and the associated node of the first intermediate node is the second intermediate node.
S105: each node in the service processing path splices the received associated node of each node to obtain a spliced path from the first node to the target node, verifies the consistency of the spliced path and the service processing path, and obtains respective third verification result or fourth verification result; the third verification result is used for the passing of the characterization verification, and the fourth verification result is used for the failing of the characterization verification.
Illustratively, the second intermediate node receives the first node as a first intermediate node, the first intermediate node as a second intermediate node, and the second intermediate node as a target node. The splicing path obtained by the second intermediate node is a first node, a first intermediate node, a second intermediate node and a target node. And if the second intermediate node determines that the splicing path is the same as the service processing path, the second intermediate node obtains a third verification result.
S106: each node in the service processing path respectively sends the respective third verification result or fourth verification result to other nodes in the service processing path.
Based on the example in S105, the second intermediate node sends the third verification result to the first node, the first intermediate node, and the target node.
S107: under the condition that the verification results of all nodes in the service processing path comprise a first verification result and a third verification result, all nodes in the service processing path synchronously process the service requested by the first request.
The first node, the first intermediate node, the second intermediate node and the target node verify that the service data and the verification result of the service processing path are the first verification result respectively, and when the verification results of the splicing path obtained by the first node, the first intermediate node, the second intermediate node and the target node are the third verification result, each node in the service processing path synchronously processes the service requested by the first request.
Optionally, S108: in the case that the authentication result of at least one node in the service processing path includes the second authentication result or the fourth authentication result, the node transmits the authentication result of the node to other nodes in the service processing path than the node.
For example, it is assumed that, in a case where the verification result of the service data and the service processing path by the first intermediate node is the second verification result, the first intermediate node sends the obtained second verification result to the first node, the second intermediate node and the target node. In this way, the security of business processing is improved.
In the embodiment of the application, after receiving the first request, the first node acquires the service processing path of the service requested by the first request, and sends the service data and the service processing path to each node in the service processing path, so that when the service request happens, each node in the service processing path acquires the service data, the service processing path and other information, and verifies the acquired information. For example, when the money transfer service occurs, each node in the service processing path for processing the money transfer service acquires information such as the money transfer amount, the target account, and the money transfer path of the money transfer service, and verifies the validity of the information. Under the condition that each node passes verification, the service requested by the first request is synchronously processed, so that the service processing efficiency is improved. For money transfer service, the processing time of money transfer service is shortened, the mobility of funds payment is quickened, and the funds which cannot be utilized in transit are reduced.
The method of the embodiment of the present application is described above, and the description of the blockchain data synchronization system and the data synchronization device for executing the method provided by the embodiment of the present application is below. It will be appreciated by those skilled in the art that the methods and apparatuses may be combined and referred to each other, and that the data synchronization apparatus provided in the embodiments of the present application may perform the steps in the data synchronization method described above.
Fig. 2 is a schematic structural diagram of a blockchain data synchronization system according to an embodiment of the present application, and the blockchain data synchronization system 20 shown in fig. 2 includes: the first node 201, the first intermediate node 202, the second intermediate node 203, and the target node 204, and optionally, the blockchain data synchronization system 20 further includes a management node 205. The first node 201 is configured to: receiving a first request; the first request includes the traffic data and an identification of the target node 204; the target node 204 is a node other than the first node 201 among the plurality of nodes; the first node 201 is configured to obtain a service processing path; in the service processing path, the first node 201 is a starting node, the target node 204 is an ending node, and the service processing path further comprises at least one intermediate node; the first node 201 is configured to send traffic data and a traffic processing path to the target node 204 and at least one intermediate node; the target node 204 and at least one intermediate node are respectively used for verifying the validity of the service data and the service processing path to obtain respective first verification results or second verification results; the first verification result is used for the representation verification to pass, and the second verification result is used for the representation verification to fail; the target node 204 and at least one intermediate node are respectively configured to send a respective first verification result or a respective second verification result and a respective associated node to each node in the service processing path; the associated node of each node is the previous node or the next node of the node in the service processing path; each node in the service processing path is used for splicing the received associated nodes of each node to obtain a spliced path from the first node 201 to the target node 204, verifying the consistency of the spliced path and the service processing path, and obtaining respective third verification result or fourth verification result; the third verification result is used for the representation verification to pass, and the fourth verification result is used for the representation verification to fail; each node in the service processing path is used for sending a respective third verification result or fourth verification result to other nodes in the service processing path; in the case that the verification results of the nodes in the service processing path both include the first verification result and the third verification result, the nodes in the service processing path are configured to synchronously process the service requested by the first request. For example: referring to FIG. 4, a first node 201 may be used to execute S100-S108 and a target node 204 may be used to execute S103-S108.
In one possible implementation, the plurality of nodes further includes a management node 205; the first node 201 is further configured to send service data and a service processing path to the management node 205; the target node 204 and at least one intermediate node are specifically configured to determine whether a target corresponding relationship exists between an associated node of each node and each node, so as to obtain a first sub-result; the target corresponding relation comprises the corresponding relation between the identification of the associated node of each node and the identification of each node; the target node 204 and at least one intermediate node are specifically configured to determine whether target data of each node meets a preset condition, so as to obtain a second sub-result; the target data are to-be-deducted data of each node in the process of processing the service requested by the first request; the target node 204 and at least one intermediate node are specifically configured to determine whether an associated node of each node is a registered node, so as to obtain a third sub-result; the management node 205 is configured to determine whether each node in the service processing path is a registered node, and obtain a fourth sub-result.
For each of the target node 204 and the at least one intermediate node: under the condition that the first sub-result, the second sub-result and the third sub-result of each node are all yes, the node is specifically used for determining that the service data and the service processing path are legal, and a first verification result of the node is obtained; or, if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is a registered node, the node is specifically configured to determine that the service data and the service processing path are legal, so as to obtain a first verification result of the node; or if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is not a registered node, the node is specifically used for determining that the service data and the service processing path are illegal, and obtaining a second verification result of the node; or if any one of the first sub-result or the second sub-result of each node is no, the node is specifically configured to determine that the service data and the service processing path are illegal, and obtain the second verification result of the node.
In another possible implementation manner, in a case that each node in the target node 204 and the at least one intermediate node determines that the target data of the node is greater than or equal to the traffic number, the node is specifically configured to determine that the second sub-result is yes; the target node 204 and each node in the at least one intermediate node determine that the target data of the node is smaller than the service number, and if the class of the target data is a preset target class, the node is specifically configured to determine that the second sub-result is yes; in the case that each node of the target node 204 and the at least one intermediate node determines that the target data of the node is smaller than the traffic number and the class of the target data is not the target class, the node is specifically configured to determine whether the second sub-result is negative.
In another possible implementation manner, each node in the target node 204 and the at least one intermediate node determines that the target data of the node is less than the traffic amount, and if the class of the target data is the target class, the node is further configured to send prompt information to other nodes in the traffic path except for the node; the hint information is used to characterize that the node processes the traffic requested by the first request to cause the target data to be negative.
In another possible implementation, in case the authentication result of at least one node in the traffic processing path includes the second authentication result or the fourth authentication result, the at least one node is further configured to send the authentication result of the at least one node to other nodes in the traffic processing path than the node.
The blockchain data synchronization system of the present embodiment may be correspondingly used to perform the steps performed in the above method embodiments, and its implementation principle and technical effects are similar, and will not be described herein again.
As shown in fig. 5, a data synchronization device 50 according to an embodiment of the present application may include at least one processor 501, a memory 502, and a communication interface 503, for example, the processor 501 in fig. 5. Each of these processors 501 may be a single-core (single-CPU) processor or may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions). Memory 502 is used to store code instructions; the processor 501 is configured to execute the code instructions to perform the data synchronization method provided in any of the embodiments described above. The communication interface 503 may be used to implement the transmitting step or the receiving step in the data synchronization method provided in any of the above embodiments.
Fig. 6 is a schematic structural diagram of a chip according to an embodiment of the present application. Chip 120 includes one or more (including two) processors 1210, a communication bus 1220, and a communication interface 1230, and optionally, chip 120 also includes memory 1240.
In some implementations, memory 1240 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
The methods described above for embodiments of the present application may be applied to the processor 1210 or implemented by the processor 1210. Processor 1210 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the methods described above may be performed by integrated logic circuitry in hardware in processor 1210 or by instructions in software. The processor 1210 may be a general purpose processor (e.g., a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic device, discrete gates, transistor logic, or discrete hardware components, and the processor 1210 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the application.
The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a state-of-the-art storage medium such as random access memory, read-only memory, programmable read-only memory, or charged erasable programmable memory (electrically erasable programmable read only memory, EEPROM). The storage medium is located in the memory 1240, and the processor 1210 reads the information in the memory 1240 through the communication bus 1220, and performs the steps of the above method in combination with its hardware. The communication interface 1230 may be used to implement the transmitting step or the receiving step in the data synchronization method provided in any of the above embodiments.
In the above embodiments, the instructions stored by the memory for execution by the processor may be implemented in the form of a computer program product. The computer program product may be written in the memory in advance, or may be downloaded in the form of software and installed in the memory.
Embodiments of the present application also provide a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL), or wireless (e.g., infrared, wireless, microwave, etc.), or semiconductor medium (e.g., solid state disk, SSD)) or the like.
The embodiment of the application also provides a computer readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer readable media can include computer storage media and communication media and can include any medium that can transfer a computer program from one place to another. The storage media may be any target media that is accessible by a computer.
As one possible design, the computer-readable medium may include compact disk read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disk memory; the computer readable medium may include disk storage or other disk storage devices. Moreover, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital versatile disc (digital versatile disc, DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
Combinations of the above should also be included within the scope of computer-readable media. The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (11)

1. A blockchain-based data synchronization method, applied to a blockchain data synchronization system, the blockchain data synchronization system comprising: a plurality of nodes; the method comprises the following steps:
the first node receives a first request; the first request comprises service data and an identifier of a target node; the target node is a node other than the first node among the plurality of nodes;
the first node acquires a service processing path; in the service processing path, the first node is a starting node, the target node is an ending node, and the service processing path further comprises at least one intermediate node;
the first node sends the service data and the service processing path to the target node and the at least one intermediate node;
The target node and the at least one intermediate node respectively verify the legality of the service data and the service processing path to obtain respective first verification results or second verification results; the first verification result is used for representing that verification passes, and the second verification result is used for representing that verification does not pass;
the target node and the at least one intermediate node respectively send the respective first verification result or the second verification result and the respective associated node to each node in the service processing path; the associated node of each node is the previous node or the next node of the node in the service processing path;
each node in the service processing path splices the received associated node of each node to obtain a spliced path from the first node to the target node, and verifies the consistency of the spliced path and the service processing path to obtain respective third verification result or fourth verification result; the third verification result is used for the passing of the characterization verification, and the fourth verification result is used for the failing of the characterization verification;
each node in the service processing path respectively sends the respective third verification result or fourth verification result to other nodes in the service processing path;
And under the condition that the verification results of all nodes in the service processing path comprise the first verification result and the third verification result, all nodes in the service processing path synchronously process the service requested by the first request.
2. The data synchronization method of claim 1, wherein the plurality of nodes further comprises a management node; the method further comprises the steps of:
the first node sends the service data and the service processing path to the management node;
the target node and the at least one intermediate node respectively verify the validity of the service data and the service processing path to obtain respective first verification results or second verification results, including:
the target node and the at least one intermediate node determine whether a target corresponding relation exists between the associated node of each node and each node, and a first sub-result is obtained; the target corresponding relation comprises the corresponding relation between the identification of the associated node of each node and the identification of each node;
the target node and the at least one intermediate node determine whether target data of each node meet preset conditions or not, and a second sub-result is obtained; the target data are to-be-deducted data of each node in the process of processing the service requested by the first request;
The target node and the at least one intermediate node determine whether the associated node of each node is a registered node, and a third sub-result is obtained;
the management node determines whether each node in the service processing path is a registered node or not, and a fourth sub-result is obtained;
for each of the target node and the at least one intermediate node: under the condition that the first sub-result, the second sub-result and the third sub-result of each node are all yes, the node determines that the service data and the service processing path are legal, and the first verification result of the node is obtained;
or, if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is a registered node, the node determines that the service data and the service processing path are legal, so as to obtain the first verification result of the node;
or, if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is not a registered node, the node determines that the service data and the service processing path are illegal, so as to obtain the second verification result of the node;
Or if any one of the first sub-result or the second sub-result of each node is no, the node determines that the service data and the service processing path are illegal, and obtains the second verification result of the node.
3. The method of claim 2, wherein the determining, by the target node and the at least one intermediate node, whether the target data of each node meets a preset condition, and obtaining a second sub-result includes:
when each node in the target node and the at least one intermediate node determines that the target data of the node is greater than or equal to the service quantity, the node determines that the second sub-result is yes;
each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity, and if the category of the target data is a preset target category, the node determines that the second sub-result is yes;
and under the condition that each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity and the category of the target data is not the target category, the node determines whether the second sub-result is negative.
4. A method of synchronizing data according to claim 3, characterized in that the method further comprises:
each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity, and if the class of the target data is the target class, the node sends prompt information to other nodes except the node in the service path; the prompt message is used for representing that the target data is negative when the node processes the service requested by the first request.
5. The method of data synchronization according to any one of claims 1-4, further comprising:
and in the case that the verification result of at least one node in the service processing path comprises the second verification result or the fourth verification result, the at least one node sends the verification result of the at least one node to other nodes except the node in the service processing path.
6. A blockchain-based data synchronization system, the data synchronization system comprising a plurality of nodes;
the first node is configured to receive a first request; the first request comprises service data and an identifier of a target node; the target node is a node other than the first node among the plurality of nodes;
The first node is used for acquiring a service processing path; in the service processing path, the first node is a starting node, the target node is an ending node, and the service processing path further comprises at least one intermediate node;
the first node is configured to send the service data and the service processing path to the target node and the at least one intermediate node;
the target node and the at least one intermediate node are respectively used for verifying the legality of the service data and the service processing path to obtain respective first verification results or second verification results; the first verification result is used for representing that verification passes, and the second verification result is used for representing that verification does not pass;
the target node and the at least one intermediate node are respectively used for sending the respective first verification result or the second verification result and the respective associated node to each node in the service processing path; the associated node of each node is the previous node or the next node of the node in the service processing path;
each node in the service processing path is used for splicing the received associated node of each node to obtain a spliced path from the first node to the target node, verifying the consistency of the spliced path and the service processing path, and obtaining respective third verification result or fourth verification result; the third verification result is used for the passing of the characterization verification, and the fourth verification result is used for the failing of the characterization verification;
Each node in the service processing path is respectively used for sending the respective third verification result or fourth verification result to other nodes in the service processing path;
and under the condition that the verification results of all the nodes in the service processing path comprise the first verification result and the third verification result, all the nodes in the service processing path are used for synchronously processing the service requested by the first request.
7. The data synchronization system of claim 6, wherein the plurality of nodes further comprises a management node;
the first node is further configured to send the service data and the service processing path to the management node;
the target node and the at least one intermediate node are specifically configured to determine whether a target corresponding relationship exists between an associated node of each node and each node, so as to obtain a first sub-result; the target corresponding relation comprises the corresponding relation between the identification of the associated node of each node and the identification of each node;
the target node and the at least one intermediate node are specifically configured to determine whether target data of each node meets a preset condition, so as to obtain a second sub-result; the target data are to-be-deducted data of each node in the process of processing the service requested by the first request;
The target node and the at least one intermediate node are specifically configured to determine whether an associated node of each node is a registered node, so as to obtain a third sub-result;
the management node is used for determining whether each node in the service processing path is a registered node or not, and a fourth sub-result is obtained;
for each of the target node and the at least one intermediate node: in the case that the first sub-result, the second sub-result and the third sub-result of each node are all yes, the node is specifically configured to determine that the service data and the service processing path are legal, and obtain the first verification result of the node;
or, if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is a registered node, the node is specifically configured to determine that the service data and the service processing path are legal, so as to obtain the first verification result of the node;
or, if the first sub-result and the second sub-result of each node are both yes, the third sub-result is no, and the associated node of the node in the fourth sub-result is not a registered node, the node is specifically configured to determine that the service data and the service processing path are not legal, so as to obtain the second verification result of the node;
Or if any one of the first sub-result or the second sub-result of each node is no, the node is specifically configured to determine that the service data and the service processing path are not legal, and obtain the second verification result of the node.
8. The data synchronization system of claim 7, wherein,
when each node in the target node and the at least one intermediate node determines that the target data of the node is greater than or equal to the traffic number, the node is specifically configured to determine that the second sub-result is yes;
each node in the target node and the at least one intermediate node determines that target data of the node is smaller than the service quantity, and if the category of the target data is a preset target category, the node is specifically configured to determine that the second sub-result is yes;
and under the condition that each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity and the category of the target data is not the target category, the node is specifically used for determining whether the second sub-result is negative.
9. The data synchronization system of claim 8, wherein,
each node in the target node and the at least one intermediate node determines that the target data of the node is smaller than the service quantity, and if the class of the target data is the target class, the node is further configured to send prompt information to other nodes except the node in the service path; the prompt message is used for representing that the target data is negative when the node processes the service requested by the first request.
10. The data synchronization system according to any one of the claims 6-9, characterized in that,
in the case that the authentication result of at least one node in the service processing path includes the second authentication result or the fourth authentication result, the at least one node is further configured to send the authentication result of the at least one node to other nodes in the service processing path than the node.
11. A computer readable storage medium storing instructions that, when executed, cause a computer to perform the data synchronization method of any one of claims 1 to 5.
CN202110644023.6A 2021-06-09 2021-06-09 Block chain-based data synchronization method, system and storage medium Active CN113282664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110644023.6A CN113282664B (en) 2021-06-09 2021-06-09 Block chain-based data synchronization method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110644023.6A CN113282664B (en) 2021-06-09 2021-06-09 Block chain-based data synchronization method, system and storage medium

Publications (2)

Publication Number Publication Date
CN113282664A CN113282664A (en) 2021-08-20
CN113282664B true CN113282664B (en) 2023-11-24

Family

ID=77284001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110644023.6A Active CN113282664B (en) 2021-06-09 2021-06-09 Block chain-based data synchronization method, system and storage medium

Country Status (1)

Country Link
CN (1) CN113282664B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111415163A (en) * 2020-04-30 2020-07-14 中国银行股份有限公司 Service processing and verifying method, system and verifying node based on block chain
CN111444550A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Block chain-based service data verification method and device and readable storage medium
CN112700246A (en) * 2020-12-31 2021-04-23 iCALC控股有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444550A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Block chain-based service data verification method and device and readable storage medium
CN111415163A (en) * 2020-04-30 2020-07-14 中国银行股份有限公司 Service processing and verifying method, system and verifying node based on block chain
CN112700246A (en) * 2020-12-31 2021-04-23 iCALC控股有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Also Published As

Publication number Publication date
CN113282664A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN112330326B (en) Business processing method and device applied to bank transaction blockchain system
CN109214818B (en) Cross-chain transaction method and device
CN108596619B (en) Transaction method, device, central node and system for blockchain system
CN108881187A (en) A kind of across chain data transferring method and equipment suitable for permitting chain scene
CN105678546B (en) Digital asset processing method based on distributed shared general ledger
CN110020543B (en) Data processing method and device based on block chain
CN109166040B (en) Transaction auditing method, device, equipment and storage medium based on block chain
WO2022105600A1 (en) Blockchain cross-chain transaction method and apparatus based on internet-of-things
CN110400217A (en) The regular changing process method and device of intelligent contract
KR20190108666A (en) Apparatus and method for automated deposit and withdrawal of funds for cryptocurrency transactions and computer program for the same
CN113256294B (en) Network payment method, device, equipment and system
CN116167765A (en) Blockchain-based digital currency cross-border transaction method, device and storage medium
CN113282664B (en) Block chain-based data synchronization method, system and storage medium
CN110852744A (en) Method, device, terminal equipment and medium for switching transaction channels
KR102107454B1 (en) System for multiplication of financial payment networks, method for financial services using the same and computer program for the same
US20220067720A1 (en) Electronic currency offline payment method and payment collection method
US20230316398A1 (en) Trading system
CN113781230A (en) Transaction processing method and device based on block chain
CN112446787A (en) Resource transfer method, device, equipment and storage medium
CN114169895A (en) Payment information processing system, method, device, medium, product and equipment
KR20210109767A (en) A method for providing asset backup services based on blockchain monitoring
EP3671618A1 (en) Blockchain based management of electricity delivery
CN111967061B (en) Block chain-based trusted account transfer transaction method and device
KR102398641B1 (en) System for providing card payment agent service and method performing thereof
KR102475662B1 (en) Method and system for managing point using blockchain based on distributed ledger

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant