Synchronization method and device based on smart contract, electronic equipment and medium

Through blockchain smart contract technology, real-time synchronization between online signing of cloud Internet and the reduction and exemption system of the China Received and Received System. Combined with PBFT algorithm and broadcast encryption algorithm, the misrecording and misrecording of the cloud Internet and Received System is solved, and the system security is improved Sex and data privacy protection reduce labor costs.

CN119311767APending Publication Date: 2025-01-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311161547.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The cloud Internet online contract signing and ZhongChuanghuoluo system have problems such as missed, misrecorded, and delayed entry, resulting in customer complaints and increased labor costs.

Method used

Blockchain smart contract technology is used to realize real-time synchronization between online contract signing and the China Receiver Reduction and Exemption System, combine PBFT algorithm to divide node weights to improve the security of the consensus system, and use broadcast encryption algorithm to protect data privacy.

Benefits of technology

It avoids the negative impact of missed recording, misrecording, and delayed entry, reduces the time and labor cost of offline information entry, and improves the security and data privacy protection of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311767A_ABST
    Figure CN119311767A_ABST
Patent Text Reader

Abstract

The invention provides a synchronization method based on a smart contract, which can be used in the financial field or other fields. The method is applied to a block chain system, the block chain system comprises an executable smart contract program, and the method comprises the following steps: in response to an online signing transaction initiated by a client, positioning a block in which the online signing transaction is located; determining a hash value of the block, and performing identity verification on the block according to the hash value; under the condition that the block passes the identity verification, allocating an access address of the intelligent contract program; and executing the intelligent contract program according to the access address of the intelligent contract program and a preset triggering condition of the intelligent contract. The invention further provides a synchronization device and equipment based on the smart contract and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure can be used in the financial field or other fields, and more specifically relates to a synchronization method, device, electronic device and storage medium based on smart contracts. Background Art

[0002] Cloud interconnection refers to the bank-enterprise interconnection transactions conducted by customers through the cloud platform. In cooperation with the third-party SaaS platform, customers initiate transactions from the SaaS platform page and direct them to the bank-enterprise interconnection system for processing. At present, the cloud interconnection contract signing model has expanded the online model. The online model is operated by customers independently and can be divided into two types: enterprise network contract signing and third-party platform contract signing. Intermediate revenue reduction and exemption is a preferential reduction and exemption of handling fees and remittance fees given by our bank to customers. Currently, account managers are required to enter them offline. After the online signing of cloud interconnection, the offline manual misrecording and wrong recording in the intermediate revenue reduction and exemption system may cause customer complaints and losses. The offline manual omission and delayed entry in the intermediate revenue reduction and exemption system may cause customers to be charged full fees and other fees when using cloud interconnection transactions, causing customer complaints or even customers no longer using the cloud interconnection system. Summary of the invention

[0003] In view of the above problems, the present disclosure provides a synchronization method, device, electronic device and storage medium based on smart contracts. By using blockchain smart contract technology, cloud interconnection online signing and the opening of the central tax reduction and exemption system are synchronized in real time. On the one hand, it avoids the negative impact caused by the omission, error and delayed entry of the central tax reduction and exemption, and reduces the time and labor cost of entering information into the central tax reduction and exemption system offline; on the other hand, the PBFT algorithm is implemented to divide the node weights to improve the security of the consensus system; at the same time, the effective algorithm is used to protect the data, and the system security is further improved.

[0004] According to a first aspect of the present disclosure, a synchronization method based on a smart contract is provided, which is applied to a blockchain system, wherein the blockchain system includes an executable smart contract program, and the method includes: in response to an online signing transaction initiated by a customer, locating the block where the online signing transaction is located; determining a hash value of the block, and authenticating the block based on the hash value; when the block passes the authentication, allocating an access address of the smart contract program; and executing the smart contract program based on the access address of the smart contract program and a trigger condition preset in the smart contract.

[0005] According to the embodiments of the present disclosure, after the smart contract program is executed, it also includes: automatically and independently executing in each network node of the blockchain according to the trigger conditions preset in the smart contract; executing the smart contract program to complete the online signing and the real-time synchronization activation of the central government’s revenue reduction and exemption.

[0006] According to the embodiments of the present disclosure, the smart contract program is executed to complete the online signing and the real-time synchronization of the non-local revenue reduction and exemption, including: the non-local revenue reduction and exemption includes special reduction and exemption for small and medium-sized enterprises and reduction and exemption for general enterprises; if the triggering conditions are met, the special reduction and exemption contract for small and medium-sized enterprises is automatically signed; if the triggering conditions are not met, the reduction and exemption contract for general enterprises is automatically signed.

[0007] According to an embodiment of the present disclosure, it is automatically and independently executed in each network node of the blockchain, including: adopting a practical Byzantine fault-tolerant consensus mechanism so that the node writes information into the blockchain and completes the blockchain system on-chain.

[0008] According to the embodiments of the present disclosure, a practical Byzantine fault-tolerant consensus mechanism is adopted to enable nodes to write information into the blockchain and complete the chaining of the blockchain system, including: receiving a transaction request; sending the transaction request to the corresponding consensus node according to the transaction request type, and the consensus node includes a master node, a slave node and a malicious node; the master node initiates the consensus process; respectively determines the voting weight of the master node, the voting weight of the slave node, the voting weight of the malicious node and the sum of the voting weights of the consensus node; when the weighted sum of the legitimate information received by the master node meets the preset conditions, the verification is passed, the transaction is chained, and the consensus node writes the information into the blockchain.

[0009] According to an embodiment of the present disclosure, completing the blockchain system on-chain includes:

[0010]

[0011]

[0012] In the formula, M and F represent the total voting weight of consensus nodes and the voting weight of malicious nodes respectively; in the formula, x i Indicates the master node; y i represents the secondary node; where the primary node voting weight is Q x =2, deputy node voting weight Q y =1; when the weighted sum of the legal information received by the master node is greater than the condition 2F+1, the verification is successful.

[0013] According to an embodiment of the present disclosure, the method also includes: encrypting the written data using a broadcast encryption algorithm: determining a specific user set S; mapping the elements in the user set S to L points in a two-dimensional plane, where L is a positive integer greater than or equal to 1; determining a point in space that is different from the L points; determining a security expression for the user set S through L+1 different points; and determining the ciphertext to be published based on the security expression to complete the encryption.

[0014] The second aspect of the present disclosure provides a synchronization device based on a smart contract, including: a positioning and determination module, which is used to locate the block where the online signing transaction is located in response to the online signing transaction initiated by the customer; an identity authentication module, which is used to determine the hash value of the block and authenticate the block according to the hash value; an address acquisition module, which is used to assign the address of the smart contract when the block passes the identity authentication; and a contract execution module, which executes the smart contract according to the address of the smart contract and the trigger conditions preset by the smart contract.

[0015] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned smart contract-based synchronization method.

[0016] The fourth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned smart contract-based synchronization method. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0018] Figure 1 The application scenario diagram of the synchronization method based on smart contracts according to an embodiment of the present disclosure is schematically shown.

[0019] Figure 2 The flowchart of the synchronization method based on smart contract according to the embodiment of the present disclosure is schematically shown.

[0020] Figure 3 The flowchart of the synchronous activation process according to the embodiment of the present disclosure is schematically shown.

[0021] Figure 4 The flowchart of writing node information into a blockchain according to an embodiment of the present disclosure is schematically shown.

[0022] Figure 5 The flowchart of data encryption according to an embodiment of the present disclosure is schematically shown.

[0023] Figure 6 A block diagram of a synchronization device based on a smart contract according to an embodiment of the present disclosure is schematically shown.

[0024] Figure 7 A block diagram of an electronic device according to a synchronization method based on a smart contract according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0026] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0027] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0028] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0029] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some boxes or combinations thereof in the block diagrams and / or flow charts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that these instructions can create a device for implementing the functions / operations described in these block diagrams and / or flow charts when executed by the processor. The technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer-readable storage medium storing instructions, on which executable instructions are stored, which cause the processor to perform the method of the present disclosure when the instructions are executed by the processor.

[0030] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0031] An embodiment of the present disclosure provides a synchronization method based on a smart contract, including: in response to an online signing transaction initiated by a customer, locating the block where the online signing transaction is located; determining a hash value of the block, and authenticating the block according to the hash value; when the block passes the identity authentication, allocating an access address of the smart contract program; and executing the smart contract program according to the access address of the smart contract program and the trigger conditions preset in the smart contract.

[0032] Through the embodiments of the present disclosure, the blockchain smart contract technology is used to realize the real-time synchronization of cloud interconnection online signing and the opening of the central tax reduction and exemption system. On the one hand, it avoids the negative impact caused by the omission, error and delayed entry of the central tax reduction and exemption, and reduces the time and labor costs of entering information into the central tax reduction and exemption system offline; on the other hand, the PBFT algorithm implements the division of node weights to improve the security of the consensus system. At the same time, the use of an optional broadcast encryption algorithm effectively protects data privacy and further improves the security of the system.

[0033] Figure 1 The following schematically shows an application scenario diagram of the synchronization method based on smart contracts according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown are merely examples of application scenarios to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0034] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0035] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0036] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0037] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0038] It should be noted that the synchronization method based on smart contracts provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the synchronization device based on smart contracts provided in the embodiments of the present disclosure can generally be set in the server 105. The synchronization method based on smart contracts provided in the embodiments of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the synchronization device based on smart contracts provided in the embodiments of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0040] The following will be based on Figure 1 The scene described by Figure 2 to Figure 5 The smart contract-based synchronization method of the disclosed embodiment is described in detail.

[0041] Figure 2 The flowchart of the synchronization method based on smart contract according to the embodiment of the present disclosure is schematically shown.

[0042] In operation S210, in response to an online signing transaction initiated by a customer, a block where the online signing transaction is located is located.

[0043] In operation S220, a hash value of the block is determined, and the block is authenticated based on the hash value.

[0044] In operation S230, when the block passes the identity authentication, an access address of the smart contract program is allocated.

[0045] In operation S240, the smart contract program is executed according to the access address of the smart contract program and the triggering conditions preset in the smart contract.

[0046] Specifically, customers can sign cloud interconnection online on the website of the relevant trading institution or a third-party platform. The blockchain system will conduct real-time monitoring, locate the blocks where the cloud interconnection contract data changes, and use the hash algorithm for identity authentication. At the same time, it will allocate a smart contract access address and execute the smart contract program according to the pre-set smart contract trigger conditions.

[0047] It should be noted that a smart contract is a computer program that is automatically executed when certain conditions are met. Blockchain, with its immutability, decentralization, and traceability, provides a completely suitable environment to support the automatic execution of smart contract programs. Smart contracts are generally developed as scripts stored in the blockchain with a unique access address.

[0048] Through the embodiments of the present disclosure, smart contracts can be effectively combined with blockchain, and smart contracts can naturally inherit the characteristics of blockchain, such as automatic execution, openness and transparency, non-tamperability, and no third party. It can well solve the problem of misalignment between online signing of cloud interconnection and offline activation of central revenue reduction and exemption.

[0049] Figure 3 The flowchart of the synchronous activation process according to the embodiment of the present disclosure is schematically shown.

[0050] like Figure 3 As shown, in the embodiment of the present disclosure, after executing the smart contract program, operations S321 to S322 may be further included.

[0051] In operation S321, according to the triggering conditions preset in the smart contract, it is automatically and independently executed in each network node of the blockchain.

[0052] In operation S322, the smart contract program is executed to complete the online signing and the real-time synchronization of the neutral revenue reduction and exemption.

[0053] Specifically, according to the access address assigned to the smart contract program, the data contained in the trigger transaction is used as a parameter to automatically and independently execute in each network node. Among them, the smart contract program is executed to complete the online signing and the real-time synchronization of the central government tax reduction and exemption, including: the central government tax reduction and exemption includes special tax reduction and exemption for small and medium-sized enterprises and general enterprise tax reduction and exemption; if the trigger conditions are met, the special tax reduction and exemption contract for small and medium-sized enterprises is automatically signed; if the trigger conditions are not met, the general enterprise tax reduction and exemption contract is automatically signed.

[0054] For example, based on the set smart contract conditions, the following can be used: whether the enterprise is a small and medium-sized enterprise. If so, the data contained in the triggered transaction is used as a parameter to automatically sign a special tax relief contract for small and medium-sized enterprises; if not, the data contained in the triggered transaction is used as a parameter to automatically sign a tax relief contract for general enterprises, thereby completing the online signing and the real-time synchronization of central government revenue reduction and exemption.

[0055] Through the embodiments of the present disclosure, the disadvantage of the misalignment between the existing online signing of cloud interconnection and the offline activation of central tax reduction and exemption is overcome. The blockchain smart contract technology is used to monitor the changes in the signing information recorded in the blockchain system in real time. Through the setting of smart contracts, the signing of central tax reduction and exemption is automatically executed, and the real-time synchronization of cloud interconnection online signing and the activation of central tax reduction and exemption is achieved, avoiding the negative impact caused by the omission, error and delayed entry of central tax reduction and exemption. At the same time, it also reduces the time and labor cost of entering information into the central tax reduction and exemption system offline.

[0056] Figure 4 The flowchart of writing node information into a blockchain according to an embodiment of the present disclosure is schematically shown.

[0057] like Figure 4 As shown, in the embodiment of the present disclosure, a practical Byzantine fault-tolerant consensus mechanism is adopted to enable the node to write information into the blockchain and complete the blockchain system on-chain, which can further include operations S431 to S435.

[0058] In operation S431, a transaction request is received.

[0059] In operation S432, according to the transaction request type, the transaction request is sent to the corresponding consensus node, and the consensus node includes a primary node, a secondary node, and a malicious node.

[0060] In operation S433, the master node initiates a consensus process.

[0061] In operation S434, the voting weight of the master node, the voting weight of the secondary node, the voting weight of the malicious node and the sum of the voting weights of the consensus node are determined respectively.

[0062] In operation S435, when the weighted sum of the legal information received by the master node meets the preset conditions, the verification is passed, the transaction is put on the chain, and the consensus node writes the information into the blockchain.

[0063] In this embodiment, completing the blockchain system on-chain includes:

[0064]

[0065]

[0066] In the formula, M and F represent the total voting weight of consensus nodes and the voting weight of malicious nodes respectively; in the formula, x i Indicates the master node; y i represents the secondary node; where the primary node voting weight is Q x =2, deputy node voting weight Q y =1; when the weighted sum of the legal information received by the master node is greater than the condition 2F+1, the verification is successful.

[0067] Specifically, the PBFT consensus mechanism is used to make decisions, propagate, and write the information, so as to ensure the correctness and consistency of data of all nodes on the blockchain. For example, in the PBFT algorithm, all consensus nodes are divided into two groups based on the trust model recommendation value: master node X = {x1, x2, ..., x n}, secondary node Y = {y1, y2, ..., y n}, the trust value of the master node is higher than that of the secondary node (the higher the trust value, the less likely the node is a malicious node and the higher the security). The master node is responsible for initiating the consensus process, and the consensus node is responsible for verifying and broadcasting messages. Different from the traditional PBFT algorithm, where the default node voting weight is 1, the weight Q of the voting of group X nodes in this embodiment is x =2, the weight Q of the Y group nodes when voting y =1, the sum of the voting weights of all nodes is If there is a large malicious node, it can contact other malicious nodes to do evil together. In the traditional PBFT algorithm, at least f+1 nodes need to be controlled ( f is the maximum number of malicious nodes allowed by the system in the traditional method, and N is the total number of nodes). However, due to different node weights, if f+1 nodes are all from group Y, it is obvious that the weights controlled by them cannot destroy the consensus system. That is, the division of node weights eliminates the defect that large malicious nodes in the traditional method select nodes with low security to destroy the system network, improves the security of the consensus system, and grouping can reduce the delay of the consensus algorithm. In this embodiment, the malicious node weight is When the weighted sum of legitimate information received by the master node is greater than 2F+1, the node writes the information into the blockchain.

[0068] Through the embodiments of the present disclosure, the node weight division is implemented in the PBFT algorithm to improve the security of the consensus system.

[0069] Figure 5 The flowchart of data encryption according to an embodiment of the present disclosure is schematically shown.

[0070] like Figure 5 As shown, in the embodiment of the present disclosure, encrypting the written data using a broadcast encryption algorithm may further include operations S521 to S525.

[0071] In operation S521, a specific user set S is determined.

[0072] In operation S522 , the elements in the user set S are mapped to L points in a two-dimensional plane, where L is a positive integer greater than or equal to 1.

[0073] In operation S523, a different point from the L points in the space is determined.

[0074] In operation S524, a security expression of the user set S is determined through L+1 different points.

[0075] In operation S525, the ciphertext is published according to the security expression, and encryption is completed.

[0076] Specifically, in this embodiment, the broadcast encryption algorithm is selected to ensure that the private data of the transaction is only available to a specific set of users S. First, the elements in S are mapped to L points in a two-dimensional plane, and then a point in the space that is different from the above mapping is taken (set as: through L+1 different points, a unique L-order polynomial h is reconstructed by Lagrange interpolation. s (z) as a safe representation of S, then choose to withdraw h s (z) is different from L points in the set S and is published as ciphertext {(z i ,h s (z i ))} i∈[1,L] . Customer e belonging to a specific user set S will use its own private key (z e ,h s (z e )), and the ciphertext {(z i ,h s (z i ))} i∈[1,L] The polynomial h is correctly reconstructed by Lagrange interpolation s (z), but not a specific user can not correctly reconstruct. s (z) The formula is as follows:

[0077]

[0078] Through the embodiments of the present disclosure, since the contract is deployed on an open and transparent blockchain, all data is publicly visible, and the written data is encrypted using a broadcast encryption algorithm, which effectively solves the problem of data privacy leakage and improves the security of the consensus system.

[0079] Based on the above-mentioned synchronization method based on smart contracts, the present disclosure also provides a synchronization device based on smart contracts. Figure 6 The device is described in detail.

[0080] Figure 6 A block diagram of a synchronization device based on a smart contract according to an embodiment of the present disclosure is schematically shown.

[0081] like Figure 6 As shown, the smart contract-based synchronization device 600 of this embodiment includes a positioning determination module 610, an identity authentication module 620, an address acquisition module 630 and a contract execution module 640.

[0082] The positioning determination module 610 is used to locate the block where the online signing transaction is located in response to the online signing transaction initiated by the customer. In one embodiment, the positioning determination module 610 can be used to perform the operation S210 described above, which will not be repeated here.

[0083] The identity verification module 620 is used to determine the hash value of the block and verify the identity of the block according to the hash value. In one embodiment, the identity verification module 620 can be used to perform the operation S220 described above, which will not be described in detail here.

[0084] The address acquisition module 630 is used to allocate the access address of the smart contract program when the block passes the identity authentication. In one embodiment, the address acquisition module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0085] The contract execution module 640 executes the smart contract program according to the access address of the smart contract program and the trigger condition preset by the smart contract. In one embodiment, the contract execution module 640 can be used to execute the operation S240 described above, which will not be repeated here.

[0086] According to an embodiment of the present disclosure, any multiple modules of the positioning determination module 610, the identity authentication module 620, the address acquisition module 630 and the contract execution module 640 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the positioning determination module 610, the identity authentication module 620, the address acquisition module 630 and the contract execution module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the positioning determination module 610, the identity authentication module 620, the address acquisition module 630 and the contract execution module 640 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be executed.

[0087] Figure 7 A block diagram of an electronic device according to a synchronization method based on a smart contract according to an embodiment of the present disclosure is schematically shown.

[0088] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0089] In RAM703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM702 and RAM703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM702 and / or RAM703. It should be noted that the program can also be stored in one or more memories other than ROM702 and RAM703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.

[0090] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0091] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0092] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM702 and / or RAM703 described above and / or one or more memories other than ROM702 and RAM703.

[0093] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0094] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0095] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0096] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0097] The flow chart and block diagram in the accompanying drawings illustrate the system architecture, functions and operations that may be implemented according to the system and method of various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0098] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0099] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A synchronization method based on a smart contract, applied to a blockchain system, wherein the blockchain system includes an executable smart contract program, the method comprising: In response to an online signing transaction initiated by a customer, locating a block where the online signing transaction is located; Determining a hash value of the block, and authenticating the block based on the hash value; When the block passes the identity authentication, assigning the access address of the smart contract program; Execute the smart contract program according to the access address of the smart contract program and the trigger condition preset by the smart contract.

2. The method according to claim 1, wherein: After executing the smart contract program, it also includes: According to the trigger conditions preset by the smart contract, it is automatically and independently executed in each network node of the blockchain; Execute the smart contract program to complete the online signing and the real-time simultaneous activation of the central government revenue reduction and exemption.

3. The method according to claim 2, wherein: Execute the smart contract program to complete the online signing and the real-time simultaneous activation of the mid-level revenue reduction and exemption, including: The above-mentioned tax reductions and exemptions include special tax reductions and exemptions for small and medium-sized enterprises and tax reductions and exemptions for general enterprises; If the triggering conditions are met, a special tax relief and preferential contract for small and medium-sized enterprises will be automatically signed; if the triggering conditions are not met, a tax relief and preferential contract for general enterprises will be automatically signed.

4. The method according to claim 2, wherein: The automatic and independent execution in each network node of the blockchain includes: adopting a practical Byzantine fault-tolerant consensus mechanism so that the node writes information into the blockchain and completes the blockchain system on-chain.

5. The method according to claim 4, wherein: The practical Byzantine fault-tolerant consensus mechanism is adopted to enable the node to write information into the blockchain and complete the blockchain system on-chain, including: Receive transaction requests; According to the transaction request type, the transaction request is sent to a corresponding consensus node, wherein the consensus node includes a primary node, a secondary node, and a malicious node; The master node initiates a consensus process; Determine the voting weight of the master node, the voting weight of the secondary node, the voting weight of the malicious node and the sum of the voting weights of the consensus node respectively; When the weighted sum of the legal information received by the master node meets the preset conditions, the verification is passed, the transaction is put on the chain, and the consensus node writes the information into the blockchain.

6. The method according to claim 5, wherein: Completing the blockchain system on-chain includes: Where M and F represent the sum of the voting weights of the consensus nodes and the voting weight of the malicious nodes respectively; In the formula, x i represents the master node; y i represents the secondary node; Among them, the master node voting weight Q x =2, the secondary node voting weight Q y =1; When the weighted sum of the legal information received by the master node is greater than the condition 2F+1, the verification is successful.

7. The method according to claim 1, wherein: Also includes: using a broadcast encryption algorithm to encrypt the written data: Determine a specific user set S; Mapping the elements in the user set S to L points in a two-dimensional plane, where L is a positive integer greater than or equal to 1; Determine a point in space that is different from the L points; Determine a security expression for the user set S through L+1 different points; According to the security expression, the ciphertext is determined to be published and the encryption is completed.

8. A synchronization device based on a smart contract, comprising: A positioning and determining module, configured to respond to an online signing transaction initiated by a customer and locate the block where the online signing transaction is located; An identity verification module, used to determine a hash value of the block and authenticate the block according to the hash value; An address acquisition module, used to allocate an access address of the smart contract program when the block passes identity authentication; The contract execution module executes the smart contract program according to the access address of the smart contract program and the trigger condition preset by the smart contract.

9. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 7.