CN108769230B - Transaction data storage method, device, server and storage medium - Google Patents

Transaction data storage method, device, server and storage medium Download PDF

Info

Publication number
CN108769230B
CN108769230B CN201810574411.XA CN201810574411A CN108769230B CN 108769230 B CN108769230 B CN 108769230B CN 201810574411 A CN201810574411 A CN 201810574411A CN 108769230 B CN108769230 B CN 108769230B
Authority
CN
China
Prior art keywords
target
transaction data
node devices
block
target node
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
CN201810574411.XA
Other languages
Chinese (zh)
Other versions
CN108769230A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810574411.XA priority Critical patent/CN108769230B/en
Publication of CN108769230A publication Critical patent/CN108769230A/en
Application granted granted Critical
Publication of CN108769230B publication Critical patent/CN108769230B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Abstract

The invention provides a transaction data storage method, a transaction data storage device, a server and a storage medium, and relates to the technical field of networks. According to the invention, when transaction data storage requirements exist, only the transaction data are stored on the plurality of trust nodes, the characteristic value of the transaction data is stored on the block chain, and the transaction data are not stored on the block chain.

Description

Transaction data storage method, device, server and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a transaction data storage method, an apparatus, a server, and a storage medium.
Background
With the development of network technology, services available from the internet are increasing, and accordingly, in order to realize data security and prevent data from being tampered by people, how to safely store transaction data is involved in the service processing process.
The existing data storage method can be carried out based on a blockchain system, the blockchain system can store transaction data in a blockchain, and one block in the blockchain not only stores the transaction data and the block characteristic value of the block, but also stores the block characteristic value of the previous block, so that the data cannot be tampered by people based on the association of the data, and even if any data is tampered, the data can be traced back.
In the existing data storage method, the whole amount of transaction data is stored in a blockchain, so that any node device in the blockchain system has a viewing authority, and the privacy of the transaction data cannot be guaranteed.
Disclosure of Invention
The embodiment of the invention provides a transaction data storage method, a transaction data storage device, a server and a storage medium, which can guarantee the privacy of transaction data on the premise of guaranteeing the data security. The technical scheme is as follows:
in one aspect, a transaction data storage method is provided, which is applied to a first node device in a blockchain system, and the method includes:
acquiring transaction data to be stored and device identifications of a plurality of target node devices;
storing the transaction data and acquiring a characteristic value of the transaction data;
sending the characteristic values and the device identifications of the target node devices to a plurality of node devices in the blockchain system;
when a data acquisition request of any target node equipment is received, the transaction data is sent to the target node equipment;
generating a target block, wherein the target block stores the characteristic value;
when the target blocks are commonly identified by the target node devices, the target blocks are added into a block chain of the block chain system.
In one aspect, a transaction data storage method is provided, which is applied to a second node device in a blockchain system, and the method includes:
receiving a characteristic value sent by a first node device and device identifications of a plurality of target node devices, wherein the characteristic value is a characteristic value of transaction data to be stored;
when the plurality of target node devices are determined to comprise the second node device according to the device identifiers of the plurality of target node devices, sending a data acquisition request to the first node device;
receiving and storing the transaction data sent by the first node device;
generating a target block, wherein the target block stores the characteristic value;
when the target blocks are commonly identified by the target node devices, the target blocks are added into a block chain of the block chain system.
In one aspect, a transaction data storage apparatus is provided, which is applied to a first node device in a blockchain system, and includes:
the receiving module is used for receiving the transaction data to be stored and the device identifications of the target node devices;
the storage module is used for storing the transaction data;
the acquisition module is used for acquiring the characteristic value of the transaction data;
a sending module, configured to send the feature value and device identifiers of the multiple target node devices to multiple node devices in the blockchain system;
the sending module is further configured to send the transaction data to any target node device when receiving a data acquisition request of the target node device;
the block generation module is used for generating a target block, and the target block stores the characteristic value;
the sending module is further configured to send the target block to a plurality of node devices in the blockchain system;
and the adding module is used for adding the characteristic value into a block chain of the block chain system when the target blocks are commonly identified by the target node devices.
In one aspect, a transaction data storage apparatus is provided, which is applied to a second node device in a blockchain system, and includes:
the receiving module is used for receiving the characteristic value sent by the first node device and the device identifications of the target node devices, wherein the characteristic value is the characteristic value of the transaction data to be stored;
a sending module, configured to send a data acquisition request to a first node device when it is determined that the plurality of target node devices include the second node device according to the device identifiers of the plurality of target node devices;
the receiving module is further configured to receive the transaction data sent by the first node device;
the storage module is used for storing the transaction data;
the generating module is used for generating a target block, and the target block stores the characteristic value;
and the adding module is used for adding the target block into a block chain of the block chain system when the target blocks are identified by the target node devices.
In one aspect, a server is provided, and the server includes a processor and a memory, where at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the operation performed by the transaction data storage method of any one of the above aspects.
In one aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the operation performed by the transaction data storage method according to any one of the above aspects.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
when transaction data storage requirements exist, only the transaction data are stored on the plurality of trust nodes, the characteristic values of the transaction data are stored in the block chain, the transaction data are not stored in the block chain, and when the trust nodes pass through the common identification, the characteristic values of the transaction data are stored as blocks of the block chain, so that the transaction data can be stored only on limited node equipment and cannot be diffused to each node equipment in the whole block chain system.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a data storage system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a transaction data storage method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of interaction during a transaction data storage process according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an interaction in a transaction data storage process according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of interaction during a transaction data storage process according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an interaction in a transaction data storage process according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a transaction data storage device according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a transaction data storage device according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
In the following, some terms appearing in the following detailed description are introduced:
intelligent contract: the contract program automatically executed according to specific conditions is an important way for a user to interact with the block chain and realize business logic by utilizing the block chain. For example, each organization may access the data storage system through an intelligent contract on a blockchain deployed in a server to use functions such as data storage provided by the data storage system.
The target strategy is as follows: the target policy may be one of consensus policies that may be used to indicate a requirement to be met by a consensus process in the data storage system. For example, the consensus policy may indicate a plurality of trust nodes that need to be consensus, forming a set of trust nodes, for which the consensus process requires a federated signature.
Fig. 1 is a schematic structural diagram of a data storage system according to an embodiment of the present invention. The system comprises a plurality of node devices 101, a plurality of terminals 102;
the node devices 101 may be configured with the same blockchain, that is, the node devices 101 may form a blockchain system, and each node device 101 is a node in the blockchain system. The plurality of node apparatuses 101 may be a plurality of node apparatuses of the same organization, or may be a plurality of node apparatuses belonging to different organizations, for example, a bank, an agency issuing organization, and the like may be included in the blockchain system. The users of the respective organizations may access the node devices of the organizations through the terminals 102, and the plurality of terminals 102 may be electronic devices capable of accessing the plurality of node devices 101, which may be computers, smart phones, tablet computers, or other electronic devices.
Based on the implementation environment provided in fig. 1, fig. 2 is a flowchart of a transaction data storage method provided in an embodiment of the present invention, where an interaction subject of the method may be a plurality of node devices in a blockchain system, and referring to fig. 2, the method may include:
200. the terminal acquires the transaction data and the public keys of the target node devices through interaction with the first node device.
In the embodiment of the present invention, the terminal may use the service function provided by the first node device to generate the transaction data, and in order to store the transaction data, the terminal may obtain public keys of a plurality of target node devices from the first node device.
The public keys of the target node devices may be obtained based on an intelligent contract stored on the first node device, and the intelligent contract may determine a consensus policy when the transaction data is stored, for example, which trusted nodes are, two thirds of the trusted nodes are required to be in consensus, that is, the consensus is passed, and the like. In short, the first node device provides the public keys of which node devices, which indicates which node devices need to be identified when the transaction data is stored.
The first node device may be configured with a plurality of target node devices corresponding to the first node device, where the plurality of target node devices may be set based on the service type or based on a requirement of the first node device itself, which is not limited in this embodiment of the present invention. That is, the target node devices correspond to the service types corresponding to the transaction data; or, the plurality of target node devices correspond to the first node device. Correspondingly, when the first node device obtains the transaction data, public keys of a plurality of target node devices may be obtained from the first node device, and the specific process may include: the terminal acquires public keys of a plurality of target node devices corresponding to the first node device from the first node device, or acquires the public keys of a plurality of target node devices corresponding to the service type from the first node device.
The transaction data may include, among other things, a transaction initiator account, a transaction recipient account, a transaction amount, and a transaction type. For example, for a transfer transaction, the transaction data for the transfer transaction may include an account transfer out, an account transfer in, the transfer amount, and the transfer type being a cross-bank transfer.
201. The terminal sends the transaction data and the public keys of the plurality of target node devices to the first node device.
202. And when the first node device receives the transaction data and the public keys of the target node devices, acquiring the characteristic value of the transaction data.
The process of obtaining the feature value of the transaction data may include calculating, by the first node device, the transaction data based on a feature value algorithm to obtain the feature value of the transaction data. It should be noted that the feature value algorithm may be any hash algorithm, which is not limited in the embodiment of the present invention.
The above steps 200 to 202 are procedures in which the terminal initiates storage to the first node device, and in some embodiments, the procedures may be further replaced with the following steps: the terminal may acquire the transaction data through interaction with the first node device and trigger the first node device to perform step 203.
Based on the above example of the transfer transaction, the characteristic value of the transaction data may be M ═ hash (F), where F is the transaction data, hash () is used to refer to a hash algorithm, and M is the characteristic value of the transaction data.
203. The first node device sends the characteristic value and the public keys of the target node devices to the node devices in the blockchain system.
After the first node device obtains the feature value of the transaction data, the transaction data may not be sent in the blockchain system, but only the feature value of the transaction data and the public keys of the plurality of target node devices may be sent, and of course, other related data may also be sent. The above-mentioned data transmission to the plurality of node devices in the blockchain system may be performed in a broadcast manner, so that each node device can receive the characteristic value and the public keys of the plurality of target node devices.
Referring to fig. 3, node device a shown in fig. 3 is the first node device, node devices B, C and D are the destination node devices, and the remaining nodes are other node devices in the blockchain system.
204. When the second node device receives the eigenvalue and the public keys of the target node devices, it determines whether the target node devices include the second node device according to the public keys of the target node devices, and if so, executes step 205.
When the second node device receives the eigenvalue and the public keys of the target node devices, the eigenvalue and the public keys of the target node devices may be compared, and when the public keys of the target node devices include a public key that is the same as the public key of the second node device, the target node devices include the second node device, that is, a description, and the second node device is a trusted node of the transaction data storage, and may participate in consensus on the transaction data storage. And when the public key of the target node devices does not include the public key that is the same as the public key of the second node device, the target node devices do not include the second node device, that is, the second node device is not a trusted node for storing the transaction data of this time, and does not need to participate in the consensus on the transaction data storage, and the second node device may not perform the subsequent data acquisition step.
205. The second node equipment sends a data acquisition request to the first node equipment, wherein the data acquisition request carries the signature of the second node equipment.
In the embodiment of the present invention, only the second node device is taken as a trusted node for explanation, and in order to implement consensus, the second node device needs to acquire the transaction data, so that the second node device signs the data acquisition request by using the private key of the second node device, and sends the data acquisition request carrying the signature of the second node device to the first node device.
Referring to fig. 4, when determining that the node devices B, C and D shown in fig. 4 are target node devices, the node devices will send data acquisition requests to the first node device to acquire transaction data to be identified.
206. When the first node device receives a data acquisition request of any node device, the signature in the data acquisition request is acquired.
207. When the first node device passes the signature verification according to any one of the public keys of the target node devices, the first node device sends the transaction data to the second node device.
In this embodiment of the present invention, the first node device may verify the signed second data storage request according to public keys of a plurality of target node devices, and when any one of the second data storage requests passes the verification, it indicates that the node device that sent the data acquisition request is one of the target node devices, and should participate in the consensus process, so that the first node device may send the transaction data to the second node device.
208. The second node device receives and stores the transaction data sent by the first node device.
After receiving the transaction data, the second node device may store the transaction data, generate a storage index according to the transaction data and a storage address of the transaction data, and update the storage information table of the second node device based on the storage index and the storage address, so that when a user of the second node device queries, the storage information table may be queried according to the storage index to obtain the storage address of the transaction data, and the transaction data is obtained based on the storage address.
209. Each node device in the blockchain system generates a target block based on the characteristic value of the transaction data, and the target block stores the characteristic value of the transaction data.
Taking the first node device as an example, after the first node device has sent the transaction data to all of the plurality of target node devices, a target block may be generated. The specific generation process may include: obtaining a block eigenvalue of a last block in the block chain; storing the characteristic value of the transaction data to a block main body of the target block; acquiring the block characteristic value of the target block based on the block main body and the block characteristic value of the last block; and storing the block header characteristic value of the last block and the block characteristic value into the block header of the target block. The generation process is only an example of generating the target block, and for the blockchain system, the target block may be generated in other ways, which is not limited in the embodiment of the present invention.
Of course, a plurality of pieces of data may be stored in the tile body of the target tile, and besides the characteristic value of the transaction data, the tile body may also store transaction data of other transactions occurring in the same time period or information such as the characteristic value of other transaction data, which is not limited in this embodiment of the present invention. In addition, when the block feature value of the target block is obtained based on the block body and the block feature value of the previous block, the feature value of the target block may be specifically generated according to the feature value of the data to be stored, the feature value of the previous block, and block header information (e.g., time, height, mercker tree root of transaction, etc.).
210. Each node device in the blockchain system verifies the target block, and when any node device passes the verification, a consensus confirmation response is broadcast in the blockchain system.
For the second node device that already stores the transaction data, the second node device may therefore verify the target block according to the stored transaction data and data related to the transaction data on the blockchain, and when the verification is passed, the second node device may broadcast a consensus confirmation response in the blockchain system, so that the node devices in the blockchain system can all receive the consensus confirmation response. Of course, the verification may include verifying a service logic corresponding to the transaction data, verifying an initiator of the transaction data, and the like, which is not specifically limited in the embodiment of the present invention.
In some embodiments, when the first node device generates the target block, the verification may be performed according to data stored in the first node device, when the second node device stores the transaction data, the verification may pass and broadcast the consensus confirmation response, and when the second node device does not store the transaction data or the storage of the transaction data is in error, the verification may not pass, and the consensus failure response may be broadcast or no response may be broadcast.
For such an implementation, if the second node device is one of a plurality of target node devices, three situations may occur: one is that the second node device votes through in the consensus voting process, so that the consensus process conforms to the target policy, and the target block consensus passes; in another mode, the second node device does not vote in the consensus voting process, but the consensus process of a plurality of target node devices conforms to the target strategy, and the target blocks agree; alternatively, the second node device does not vote in the consensus voting process, the consensus process of the target node devices does not meet the target policy, and the consensus process needs to be reinitiated if the target block does not agree.
If the second node device is not one of the plurality of target node devices, the second node device may also: the first node device does not vote, and the second node device does not vote in the consensus voting process, and the first node device does not refer to the vote which is not the second node device during consensus, so that the passing or not passing of the consensus is not influenced.
It should be noted that, when performing consensus, a bft-raft consensus algorithm, a pbft consensus algorithm, or another consensus algorithm may be used, which is not specifically limited in this embodiment of the present invention.
Referring to fig. 5, node devices A, B, C and D of fig. 5, when determining that they are target node devices, authenticate the target tiles and when authentication is passed, broadcast a consensus confirmation response in the blockchain system.
211. When any node device in the blockchain system receives the common identification confirmation response which meets the preset number of target node devices in the target node devices, the target block is added to the blockchain of the blockchain system.
For any node device, the consensus confirmation response broadcast by other node devices may be received, and the public keys of the target node devices are stored in the generated target block, so that for any node device, whether the target policy is met or not may be determined according to the received consensus confirmation response and the stored public keys of the target node devices, and when the target policy is met, the consensus is passed, and the target block is uplinked.
It should be noted that, in the embodiment of the present invention, the target policy is only exemplified as a consensus that a preset number of target node devices in a plurality of target node devices agree with each other, and the target policy may also be considered as a consensus that some node devices in the plurality of target node devices agree with each other, or a consensus that a target proportion of node devices in the plurality of target node devices agree with each other, or a consensus that a target policy may also be in other forms, which is not limited in the embodiment of the present invention.
When any node device determines that a plurality of target node devices are commonly identified, the target block can be added to the node device after the last block in the configured blockchain.
Of course, the public key of the node device is only an example of the device identifier of the node device, and in some embodiments, the device identifier of the node device may also be provided as network addresses of the multiple target node devices, or device hardware identifiers, and the like, which is not limited in this embodiment of the present invention. If the device identifier of the node device is in the form of a network address or a hardware identifier, the public key in steps 200 to 204 may be replaced by the network address or the hardware identifier, and based on the replacement, in step 207, it is necessary to first obtain a corresponding public key based on the network address or the hardware identifier, and then perform a decryption process, for example: when a data acquisition request of any node equipment is received, acquiring a signature in the data acquisition request; acquiring public keys of the target node devices according to the network addresses or the device hardware identifiers of the target node devices; and when the signature passes verification according to any one of the public keys of the target node devices, determining that the data acquisition request is sent by the target node device.
Further, through the data storage process, once any user acquires the transaction data, whether the transaction data is real and accurate can be verified according to the characteristic value stored in the target block on the block chain, and the transaction data cannot be reversely deduced according to the characteristic value, so that the data security is ensured, and meanwhile, the privacy of the transaction data is guaranteed.
Referring to fig. 6, again taking the transfer transaction as an example, for which transaction data F is stored only on A, B, C and D as trusted nodes in the final blockchain system, and a characteristic value M is stored on all node devices in the blockchain system.
It should be noted that, a security center may be configured in the blockchain system, and the public key of each node device in the blockchain system may be stored in the node device, and may also be stored in the security center, so that the node device may query when necessary, which is not limited in the embodiment of the present invention.
According to the method provided by the embodiment of the invention, when transaction data storage requirements exist, only the transaction data are stored on the plurality of trust nodes, the characteristic values of the transaction data are stored on the block chain, and the transaction data are not stored on the block chain. Further, the node devices in the blockchain system can be divided based on the service types or the requirements of the node devices, so that different services or different node devices can be stored and identified by the corresponding multiple node devices, the flexibility of transaction data storage is improved, and the pertinence of data identification can also be improved.
Fig. 7 is a schematic structural diagram of a transaction data storage device according to an embodiment of the present invention. The transaction data storage apparatus may be applied to a first node device in a blockchain system, referring to fig. 7, and the apparatus includes:
a receiving module 701, configured to receive transaction data to be stored and device identifiers of multiple target node devices;
a storage module 702 for storing the transaction data;
an obtaining module 703, configured to obtain a feature value of the transaction data;
a sending module 704, configured to send the feature value and the device identifiers of the multiple target node devices to multiple node devices in the blockchain system;
the sending module 704 is further configured to send the transaction data to any target node device when receiving a data acquisition request of the target node device;
a block generating module 705, configured to generate a target block, where the target block stores the feature value;
the sending module 704 is further configured to send the target block to a plurality of node devices in the blockchain system;
an adding module 706, configured to add the feature value to a blockchain of the blockchain system when the plurality of target node devices pass the target block consensus.
In some embodiments, the device identifications of the plurality of target node devices are network addresses of the plurality of target node devices; or, the device identifications of the target node devices are public keys of the target node devices; or, the device identifiers of the target node devices are device hardware identifiers of the target node devices.
In some embodiments, the apparatus further comprises:
the first signature acquisition module is used for acquiring a signature in a data acquisition request when the data acquisition request of any node equipment is received;
and the first determining module is used for determining that the data acquisition request is sent by the target node equipment when the signature verification is passed according to any one of the public keys of the target node equipment.
In some embodiments, when the device identifications of the plurality of target node devices are network addresses or device hardware identifications of the plurality of target node devices, the apparatus further comprises:
the second signature acquisition module is used for acquiring a signature in a data acquisition request when the data acquisition request of any node equipment is received;
a public key obtaining module, configured to obtain public keys of the multiple target node devices according to network addresses or device hardware identifiers of the multiple target node devices;
and the second determining module is used for determining that the data acquisition request is sent by the target node equipment when the signature verification is passed according to any one of the public keys of the target node equipment.
In some embodiments, the apparatus further comprises:
and the consensus module is used for enabling the target blocks to be subjected to consensus by the target node devices when a consensus confirmation response meeting the preset number of the target node devices is received.
In some embodiments, the tile generation module 705 comprises:
acquiring a block characteristic value of a last block in the block chain;
storing the characteristic value of the transaction data to a block body of the target block;
acquiring the block characteristic value of the target block based on the block main body and the block characteristic value of the last block;
and storing the block characteristic value of the last block and the block characteristic value of the target block into a block header of the target block.
In some embodiments, the plurality of target node devices correspond to traffic types corresponding to the transaction data; or, the plurality of target node devices correspond to the first node device.
Fig. 8 is a schematic structural diagram of a transaction data storage device according to an embodiment of the present invention. The transaction data storage apparatus may be applied to a second node device in a blockchain system, referring to fig. 8, and the apparatus includes:
a receiving module 801, configured to receive a feature value sent by a first node device and device identifiers of multiple target node devices, where the feature value is a feature value of transaction data to be stored;
a sending module 802, configured to send a data obtaining request to a first node device when it is determined that the multiple target node devices include the second node device according to the device identifiers of the multiple target node devices;
the receiving module 801 is further configured to receive the transaction data sent by the first node device;
a storage module 803, configured to store the transaction data;
a generating module 804, configured to generate a target block, where the target block stores the feature value;
an adding module 805, configured to add the target block to a block chain of the block chain system when the target block is commonly identified by the multiple target node devices.
In some embodiments, the sending module 802 is further configured to not execute the step of sending the data obtaining request to the first node device when it is determined that the plurality of target node devices do not include the second node device according to the device identifiers of the plurality of target node devices.
In some embodiments, the plurality of target node devices correspond to traffic types corresponding to the transaction data; or, the plurality of target node devices correspond to the first node device.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
The node apparatus may be provided as a server. Fig. 9 is a schematic diagram of a server according to an embodiment of the present invention, where the server 900 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 901 and one or more memories 902, where the memory 902 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 901 to implement the transaction data storage method provided by the foregoing method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a computer readable storage medium, such as a memory, comprising instructions executable by a processor in a terminal to perform the transaction data storage method of the above embodiments. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (14)

1. A transactional data storage method applied to a first node device in a blockchain system, the method comprising:
receiving transaction data to be stored and device identifications of a plurality of target node devices, wherein the transaction data are generated by the terminal through the service function provided by the first node device, and the transaction data comprise a transaction initiator account, a transaction receiver account, a transaction amount and a transaction type;
storing the transaction data and acquiring a characteristic value of the transaction data;
sending the characteristic values and the device identifications of the target node devices to each node device in the block chain system;
when a data acquisition request of second node equipment is received, acquiring a signature of the second node equipment carried in the data acquisition request;
when the signature verification passes according to any one of the public keys of the target node devices, the transaction data are sent to the second node device;
generating a target block, wherein the target block stores the characteristic value;
when a consensus confirmation response meeting a preset number of target node devices in the target node devices is received, the target node devices pass the consensus of the target blocks, the target blocks are added into a block chain of the block chain system, the target node devices correspond to the service types corresponding to the transaction data, the consensus confirmation response is verified by the target node devices according to the stored transaction data and data related to the transaction data on the block chain, the target blocks are broadcast in the block chain system when the verification is passed, and the verification comprises verification of service logic corresponding to the transaction data and verification of an initiator of the transaction data.
2. The method of claim 1, wherein the device identifications of the plurality of target node devices are network addresses of the plurality of target node devices; or, the device identifications of the target node devices are public keys of the target node devices; or, the device identifiers of the target node devices are device hardware identifiers of the target node devices.
3. The method of claim 2, wherein when the device identifications of the plurality of target node devices are network addresses or device hardware identifications of the plurality of target node devices, the method further comprises:
and acquiring the public keys of the target node devices according to the network addresses or the device hardware identifiers of the target node devices.
4. The method of claim 1, wherein generating the target block comprises:
acquiring a block characteristic value of a last block in the block chain;
storing the characteristic value of the transaction data to a block body of the target block;
acquiring the block characteristic value of the target block based on the block main body and the block characteristic value of the last block;
and storing the block characteristic value of the last block and the block characteristic value into a block header of the target block.
5. A transactional data storage method applied to a second node device in a blockchain system, the method comprising:
receiving a characteristic value sent by a first node device and device identifications of a plurality of target node devices, wherein the characteristic value is a characteristic value of transaction data to be stored, the transaction data is received by the first node device from a terminal, the transaction data is generated by the terminal by using a service function provided by the first node device, and the transaction data comprises a transaction initiator account, a transaction receiver account, a transaction amount and a transaction type;
when the plurality of target node devices are determined to comprise the second node device according to the device identifiers of the plurality of target node devices, signing a data acquisition request by using a private key of the second node device, and sending the data acquisition request carrying the signature of the second node device to the first node device, wherein the plurality of target node devices correspond to the service types corresponding to the transaction data;
receiving and storing the transaction data sent by the first node device;
generating a target block, wherein the target block stores the characteristic value;
when a consensus confirmation response meeting a preset number of target node devices in the target node devices is received, the target blocks are identified by the target node devices, the target blocks are added into a block chain of the block chain system, the consensus confirmation response is verified by the target node devices according to stored transaction data and data related to the transaction data on the block chain, and when the consensus confirmation response passes the verification, the consensus confirmation response is broadcasted in the block chain system, and the verification comprises verification of business logic corresponding to the transaction data and verification of an initiator of the transaction data.
6. The method of claim 5, further comprising:
and when the plurality of target node devices are determined not to include the second node device according to the device identifications of the plurality of target node devices, the step of sending a data acquisition request to the first node device is not executed.
7. A transaction data storage device, the device comprising:
the receiving module is used for receiving transaction data to be stored and device identifications of a plurality of target node devices, wherein the transaction data are generated by the terminal through the service function provided by the first node device, and the transaction data comprise a transaction initiator account, a transaction receiver account, a transaction amount and a transaction type;
the storage module is used for storing the transaction data;
the acquisition module is used for acquiring the characteristic value of the transaction data;
a sending module, configured to send the feature value and the device identifiers of the multiple target node devices to each node device in a blockchain system;
the first signature acquisition module is used for acquiring a signature of a second node device carried in a data acquisition request when the data acquisition request of the second node device is received;
the sending module is further configured to send the transaction data to the second node device when the signature verification passes according to any one of the public keys of the plurality of target node devices;
the block generation module is used for generating a target block, and the target block stores the characteristic value;
the sending module is further configured to send the target block to a plurality of node devices in the blockchain system;
and the adding module is used for enabling the target blocks to be identified commonly by the target node devices when a common identification confirmation response meeting a preset number of target node devices in the target node devices is received, adding the characteristic value to a block chain of the block chain system, wherein the target node devices correspond to the service types corresponding to the transaction data, the common identification confirmation response is verified by the target node devices according to the stored transaction data and data related to the transaction data in the block chain, the target blocks are broadcast in the block chain system when the verification is passed, and the verification comprises verifying the service logic corresponding to the transaction data and verifying the initiator of the transaction data.
8. The apparatus of claim 7, wherein the device identifications of the plurality of target node devices are network addresses of the plurality of target node devices; or, the device identifications of the target node devices are public keys of the target node devices; or, the device identifiers of the target node devices are device hardware identifiers of the target node devices.
9. The apparatus of claim 8, wherein when the device identifications of the plurality of target node devices are network addresses or device hardware identifications of the plurality of target node devices, the apparatus further comprises:
and the public key acquisition module is used for acquiring the public keys of the target node devices according to the network addresses or the device hardware identifiers of the target node devices.
10. The apparatus of claim 7, wherein the block generation module is configured to:
acquiring a block characteristic value of a last block in the block chain;
storing the characteristic value of the transaction data to a block body of the target block;
acquiring the block characteristic value of the target block based on the block main body and the block characteristic value of the last block;
and storing the block characteristic value of the last block and the block characteristic value of the target block into a block header of the target block.
11. A transaction data storage device, the device comprising:
the receiving module is used for receiving a characteristic value sent by a first node device and device identifications of a plurality of target node devices, wherein the characteristic value is a characteristic value of transaction data to be stored, the transaction data is received by the first node device from a terminal, the transaction data is generated by the terminal by using a service function provided by the first node device, and the transaction data comprises a transaction initiator account, a transaction receiver account, a transaction amount and a transaction type;
a sending module, configured to sign a data acquisition request by using a private key of a second node device when it is determined that the target node devices include the second node device according to the device identifiers of the target node devices, and send the data acquisition request carrying the signature of the second node device to a first node device, where the target node devices correspond to service types corresponding to the transaction data;
the receiving module is further configured to receive the transaction data sent by the first node device;
the storage module is used for storing the transaction data;
the generating module is used for generating a target block, and the target block stores the characteristic value;
and the adding module is used for carrying out consensus on the target blocks by the target node devices when a consensus confirmation response meeting a preset number of target node devices in the target node devices is received, adding the target blocks into a block chain of the block chain system, verifying the target blocks by the consensus confirmation response according to the stored transaction data and data related to the transaction data on the block chain by the target node devices, broadcasting the consensus confirmation response in the block chain system when the verification is passed, and verifying the service logic corresponding to the transaction data and verifying an initiator of the transaction data.
12. The apparatus of claim 11, wherein the sending module is further configured to:
and when the plurality of target node devices are determined not to include the second node device according to the device identifications of the plurality of target node devices, the step of sending a data acquisition request to the first node device is not executed.
13. A server, comprising a processor and a memory, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement the transactional data storage method of any one of claims 1 to 4 or 5 to 6.
14. A computer readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the transactional data storage method of any one of claims 1 to 4 or 5 to 6.
CN201810574411.XA 2018-06-06 2018-06-06 Transaction data storage method, device, server and storage medium Active CN108769230B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810574411.XA CN108769230B (en) 2018-06-06 2018-06-06 Transaction data storage method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810574411.XA CN108769230B (en) 2018-06-06 2018-06-06 Transaction data storage method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN108769230A CN108769230A (en) 2018-11-06
CN108769230B true CN108769230B (en) 2021-06-18

Family

ID=63999143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810574411.XA Active CN108769230B (en) 2018-06-06 2018-06-06 Transaction data storage method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN108769230B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111223227B (en) * 2018-11-26 2022-03-22 腾讯科技(深圳)有限公司 Target user screening method and device
CN109857805B (en) * 2018-12-27 2020-10-02 重庆小雨点小额贷款有限公司 Block chain based data storage method, related equipment and storage medium
CN110032876B (en) * 2019-02-19 2020-03-06 阿里巴巴集团控股有限公司 Method, node and storage medium for implementing privacy protection in block chain
CN111694502B (en) * 2019-03-14 2023-05-30 北京沃东天骏信息技术有限公司 Block chain data storage method, device, equipment and storage medium
CN109995536A (en) * 2019-03-15 2019-07-09 广州杰赛科技股份有限公司 A kind of block chain common recognition method, apparatus and readable storage medium storing program for executing
CN109993250A (en) * 2019-04-03 2019-07-09 大陆投资(中国)有限公司 Elevator maintenance management system
CN110555769A (en) * 2019-07-25 2019-12-10 深圳壹账通智能科技有限公司 Block chain transaction data processing method and device, computer equipment and storage medium
CN111339089B (en) * 2020-02-21 2023-09-22 联动优势科技有限公司 Data storage and acquisition method and device applied to blockchain
CN113343310A (en) * 2021-08-05 2021-09-03 北京百度网讯科技有限公司 Data processing method and device based on block chain and electronic equipment
CN113610642A (en) * 2021-08-05 2021-11-05 北京百度网讯科技有限公司 Data processing method and device based on block chain and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107464118A (en) * 2017-08-16 2017-12-12 济南浪潮高新科技投资发展有限公司 A kind of data trade method based on block chain intelligence contract
CN107766540A (en) * 2017-10-31 2018-03-06 上海分布信息科技有限公司 A kind of block chain network of subregion and its method for realizing partitioned storage
US9990504B1 (en) * 2017-12-18 2018-06-05 Northern Trust Corporation Systems and methods for generating and maintaining immutable digital meeting records within distributed network nodes

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8024566B2 (en) * 2005-04-29 2011-09-20 Sap Ag Persistent storage implementations for session data within a multi-tiered enterprise network
US20170116693A1 (en) * 2015-10-27 2017-04-27 Verimatrix, Inc. Systems and Methods for Decentralizing Commerce and Rights Management for Digital Assets Using a Blockchain Rights Ledger
CN106452785B (en) * 2016-09-29 2019-05-17 财付通支付科技有限公司 Block chain network, branch node and block chain network application method
CN106656974B (en) * 2016-10-17 2019-07-16 江苏通付盾科技有限公司 The grouping common recognition method and system of block chain
CN106503995A (en) * 2016-11-17 2017-03-15 中国银行股份有限公司 A kind of data sharing method, source node, destination node and system
CN106650494B (en) * 2016-12-16 2019-07-16 杭州嘉楠耘智信息科技有限公司 Data processing method and device
CN107079059B (en) * 2016-12-21 2019-12-10 深圳前海达闼云端智能科技有限公司 Block chain storage method and device and node equipment
CN106888087B (en) * 2017-03-15 2018-09-04 腾讯科技(深圳)有限公司 A kind of method and apparatus of management certificate
CN107196989B (en) * 2017-03-21 2019-08-09 阿里巴巴集团控股有限公司 A kind of processing method and processing device of service request
CN111724150B (en) * 2017-03-28 2023-11-24 创新先进技术有限公司 Service request processing method and device
CN107171810B (en) * 2017-06-27 2020-03-13 中国联合网络通信集团有限公司 Verification method and device of block chain
CN107566423A (en) * 2017-10-30 2018-01-09 天津中德应用技术大学 A kind of mobile banking management system based on cloud service
CN107766542B (en) * 2017-10-30 2020-09-11 上海分布信息科技有限公司 Partitioned block chain network and method for realizing partitioned query thereof
CN107807984A (en) * 2017-10-31 2018-03-16 上海分布信息科技有限公司 A kind of block chain network of subregion and its method for realizing subregion common recognition
CN107994991B (en) * 2017-10-31 2021-06-11 深圳市轱辘车联数据技术有限公司 Data processing method, data processing server and storage medium
CN107888384B (en) * 2017-11-30 2020-11-27 中链科技有限公司 Identity data management method, system and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107464118A (en) * 2017-08-16 2017-12-12 济南浪潮高新科技投资发展有限公司 A kind of data trade method based on block chain intelligence contract
CN107766540A (en) * 2017-10-31 2018-03-06 上海分布信息科技有限公司 A kind of block chain network of subregion and its method for realizing partitioned storage
US9990504B1 (en) * 2017-12-18 2018-06-05 Northern Trust Corporation Systems and methods for generating and maintaining immutable digital meeting records within distributed network nodes

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Concurrency and Privacy with Payment-Channel Networks";Giulio Malavolta;《CCS "17: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security》;20171031;全文 *
"分布式账簿在支付行业的应用";向迪雅;《金融会计》;20160915;全文 *

Also Published As

Publication number Publication date
CN108769230A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108769230B (en) Transaction data storage method, device, server and storage medium
US11651109B2 (en) Permission management method, permission verification method, and related apparatus
EP4120114A1 (en) Data processing method and apparatus, smart device and storage medium
US20200396089A1 (en) Digital certificate management method and apparatus, computer device, and storage medium
CN110958118B (en) Certificate authentication management method, device, equipment and computer readable storage medium
CN110912707B (en) Block chain-based digital certificate processing method, device, equipment and storage medium
CN112104665B (en) Block chain-based identity authentication method and device, computer and storage medium
JP2019160312A (en) Blockchain node, method of blockchain node, and computer program for blockchain node
US20140089062A1 (en) Voting systems and voting methods based on smart mobile communication devices
US20230037932A1 (en) Data processing method and apparatus based on blockchain network, and computer device
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
US20230370265A1 (en) Method, Apparatus and Device for Constructing Token for Cloud Platform Resource Access Control
CN108876669B (en) Course notarization system and method applied to multi-platform education resource sharing
CN112131316A (en) Data processing method and device applied to block chain system
EP3598333B1 (en) Electronic device update management
CN112910660B (en) Certificate issuing method, adding method and transaction processing method of blockchain system
CN112311779B (en) Data access control method and device applied to block chain system
CN110990790B (en) Data processing method and equipment
CN110910110A (en) Data processing method and device and computer storage medium
CN114239072A (en) Block chain node management method and block chain network
US20230403154A1 (en) Verifier credential determination by a registrant
CN113901424A (en) Method and device for selectively disclosing digital identity attribute
US11902451B2 (en) Cross-blockchain identity and key management
CN115967508A (en) Data access control method and device, equipment, storage medium and program product
CN110276693B (en) Insurance claim settlement method and system

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