CN106815722B - Information processing method and device based on block chain - Google Patents

Information processing method and device based on block chain Download PDF

Info

Publication number
CN106815722B
CN106815722B CN201611205350.7A CN201611205350A CN106815722B CN 106815722 B CN106815722 B CN 106815722B CN 201611205350 A CN201611205350 A CN 201611205350A CN 106815722 B CN106815722 B CN 106815722B
Authority
CN
China
Prior art keywords
information
block height
blocklimit
interaction
packing
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
CN201611205350.7A
Other languages
Chinese (zh)
Other versions
CN106815722A (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.)
Shanghai Bill Exchange Co.,Ltd.
ZHONGCHAO CREDITCARD INDUSTRY DEVELOPMENT CO., LTD. HANGZHOU BLOCKCHAIN TECHNOLOGY Research Institute
Original Assignee
Shanghai Bill Exchange Co ltd
Zhongchao Creditcard Industry Development Co Ltd Hangzhou Blockchain Technology Research Institute
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 Shanghai Bill Exchange Co ltd, Zhongchao Creditcard Industry Development Co Ltd Hangzhou Blockchain Technology Research Institute filed Critical Shanghai Bill Exchange Co ltd
Priority to CN201611205350.7A priority Critical patent/CN106815722B/en
Publication of CN106815722A publication Critical patent/CN106815722A/en
Application granted granted Critical
Publication of CN106815722B publication Critical patent/CN106815722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention discloses an information processing method and device based on a block chain. Wherein, the method comprises the following steps: setting an interaction sequence number nonce which is not repeated within a preset interaction sequence number range for the interaction information to be processed; and sending the interaction information with the interaction sequence number nonce set to a block chain. Therefore, in the embodiment, the interaction sequence number nonce which is not repeated within the preset interaction sequence number range is set for the interaction information to be processed, so that the restriction of nonce value continuity is cancelled, the information processed in series can be decoupled, and the parallel processing of the information is realized.

Description

Information processing method and device based on block chain
Technical Field
The present invention belongs to the field of communication technologies, and in particular, to an information processing method and apparatus based on a block chain.
Background
The concept of blockchains was first identified by anonymous people in the name of "minwis" in their paper "bitcoin: the point-to-point electronic payment system is formally proposed, and is a distributed unified ledger realized by using a consensus algorithm based on elliptic curve signature algorithm (ECDSA) and among participants. The blockchain technology requires accounting nodes participating in the system to record all information data generated by the system in a block in a period of time through a cryptographic algorithm, and generate a hash value of the block for linking the next block as a check; the other nodes verify the data validity of the block to select whether to accept the accounting result; the generation of a new block is then determined by some consensus algorithm between the nodes. The block is a data packing storage structure, and setting the first data element in each block as the hash value of the last block forms a chain-like data structure, namely a block chain, which is connected in front and back.
Conventional blockchain information, represented by bitcoin and ether house, is initiated and confirmed using nonces as information IDs. The specific application method of the Nonce as the information ID is that the value of the Nonce is automatically added by 1 as the Nonce value initiated by the next information every time the information initiator successfully initiates an information. Generally, after receiving information of a user, the blockchain network verifies whether the nonce of the information is equal to the nonce +1 of the latest information of the user already packaged in the blockchain.
Since the information initiated by the conventional method requires the continuity of the nonce, it means that the parallelism and the real-time property of the information processing become problematic.
Disclosure of Invention
In view of one or more of the above problems, embodiments of the present invention provide a method and an apparatus for processing information based on a block chain.
In a first aspect, an information processing method based on a block chain is provided, including:
setting an interaction sequence number nonce which is not repeated within a preset interaction sequence number range for the interaction information to be processed;
and sending the interaction information with the interaction sequence number nonce to the blockchain.
In a second aspect, a data processing method based on a block chain is provided, including:
receiving interactive information;
analyzing an interaction sequence number nonce in the interaction information;
verifying whether the nonce is repeated within a preset interaction sequence number range;
and when the nonce is not repeated in the preset interaction sequence number range, packaging the interaction information in the block chain.
In a third aspect, an information processing apparatus based on a block chain is provided, including:
the first setting unit is used for setting an interaction sequence number nonce which does not repeat within a preset interaction sequence number range for the interaction information to be processed;
and the sending unit is used for sending the interaction information with the interaction sequence number nonce to the block chain.
In a fourth aspect, an information processing apparatus based on a block chain is provided, including:
a receiving unit, configured to receive interaction information;
the first analysis unit is used for analyzing the interaction sequence number nonce in the interaction information;
the first verification unit is used for verifying whether the nonce is repeated within a preset interaction sequence number range;
and the packing unit is used for packing the interactive information in the block chain when the nonce is not repeated in the preset interactive sequence number range.
Therefore, the non-repeated interactive sequence number nonces within the preset interactive sequence number range are set for the interactive information to be processed, the limitation of the continuity of the nonces value is cancelled, the continuity of information processing can be realized by an information initiator outside the block chain, and the block chain is only responsible for receiving the information and is not responsible for the front-back relation of the information. The block chain packs the information received in the block-out interval in batches and verifies whether the nonce is repeated. The embodiment can decouple the serially processed information, thereby realizing the parallel processing of the information and ensuring the timeliness of the information processing.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below 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 diagram of an information processing system based on a block chain according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating an information processing method based on a block chain according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating an information processing method based on a block chain according to another embodiment of the present invention.
Fig. 4 is a flowchart illustrating an information processing method based on a blockchain according to another embodiment of the present invention.
Fig. 5 is a flowchart illustrating an information processing method based on a blockchain according to another embodiment of the present invention.
Fig. 6 is a schematic structural diagram of an information processing apparatus based on a block chain according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an information processing apparatus based on a block chain according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a schematic diagram of an information processing system based on a block chain according to an embodiment of the present invention.
As shown in fig. 1, the system may include an end node 10, an authentication node 20, a packing node 30, and a blockchain 40. The terminal node 10, the verification node 20, and the packaging node 30 may be electronic devices such as a personal computer, a smart phone, a tablet computer, a personal digital assistant, and a server. These electronic devices may be installed with various messaging client applications, such as instant messaging tools, mailbox clients, social platform software, audio video software, and the like. These electronic devices have memories, logical operation processors, control elements, and the like. The electronic devices can send data requests or receive data requests, and can analyze, verify, store and the like the data.
The terminal node 10 may be, among other things, an initiator of the information to be processed or a recipient of the information. The authentication node 20 may authenticate the information sent by the end node 10. Packing node 30 may pack information verified by verification node 20 in a blockchain. The block chain 40 may include a plurality of blocks, such as block n and block n + 1. Wherein Tx represents information independently transmitted by each node, block n is the current block height block number, the block chain packages the received information into blocks in a certain sequence after verifying the received information, and increases the block chain in a form that the cryptography is not tampered with by using a form of random number-hash value.
It should be understood that the number of devices in fig. 1 is merely illustrative, and that the actual number is not limiting. In addition, cables, interactive machines and other devices can be arranged in the device in fig. 1.
Fig. 2 is a flowchart illustrating an information processing method based on a block chain according to an embodiment of the present invention. The present embodiment can be applied to the terminal node 10 side. The implementation subject of this example may be the end node 10.
As shown in fig. 2, the method comprises the steps of: s210, setting a nonrepeating interactive sequence number nonce within a preset interactive sequence number range for the interactive information to be processed; and S220, sending the interactive information with the interactive sequence number nonce to the block chain.
In some embodiments, the interaction sequence number nonce that does not repeat within the preset interaction sequence number range may be a random number or an index related to the interaction information.
Specifically, the setting rule of the interactive sequence number nonce is no longer limited by the nonce +1 strictly following the latest package information of the user in the block chain. The nonce randomization method can solve the problem that information concurrency cannot be realized due to nonce serialization in the past. Existing nonce sequencing mechanisms want to force the coherence of information through the blockchain to be performed, which results in non-serial information also having to be initiated serially. The Nonce setting manner in this example may be implemented by handing the information continuity to the information originator (e.g., the terminal node 10) outside the blockchain, where the blockchain is only responsible for receiving the information and is not responsible for the context of the information. The blockchain may batch package and then verify the information received during the out-of-block interval (this aspect is described in more detail below). The parallel processing of the information can be realized through the mode.
The block chain records the user transaction method, which means that the information sent by the user is approved by the block chain network and recorded in a certain block.
Fig. 3 is a flowchart illustrating an information processing method based on a block chain according to one or more embodiments of the present invention. The present embodiment can be applied to the terminal node 10 side. The implementation subject of this example may be the end node 10.
As shown in fig. 3, the method comprises the steps of: s310, setting an unrepeated interaction sequence number nonce within a preset interaction sequence number range for the interaction information to be processed; s320, calculating a packing block height threshold value blockLimit for the interactive information based on the current block height number in the block chain; s330, setting a packing block height threshold blockLimit for the interactive information; and S340, signing the interaction information with the interaction sequence number nonce and the packing block height threshold blockLimit, and sending the signed interaction information to the block chain.
In some embodiments, the packing block height threshold blockLimit is: the sum of the current block height blockNumber and the block height offset.
In some embodiments, the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain. Wherein the preset information timeout waiting time can be 1-3 minutes. Out-of-block is meant to be packed. The block output interval or block output time is a time interval for generating blocks, and is generally a relatively fixed value, for example, the bit currency block output interval is about 10 minutes, and the ether block output time is about 14 seconds. The block height offset is typically 10 to 50 blocks.
Specifically, the newly introduced blockLimit is a convention for timeliness of information, and is a description of the absolute value of the blockNumber (current block height). The description indicates that the packing node can only pack this information into blocks with a block number ≦ block limit. So set, the information originator specifies a blockLimit equal to the current block height plus an offset (e.g., 50) when sending the information. After a period of time, when the information initiator finds that the height of the latest block on the block chain is greater than the block limit defined by the information, the information initiator can affirm the information without worry and then the information can not be packed, and the information initiator can retransmit or modify the information content to retransmit the related information.
The steps of one embodiment in the embodiment of fig. 3 may be the following steps added to the embodiment of fig. 2:
calculating a packing block height threshold value blockLimit for the interactive information based on the current block height number in the block chain;
and setting a packing block height threshold blockLimit for the interactive information, and sending the interactive information with the interactive sequence number nonce and the packing block height threshold blockLimit to the block chain.
The steps of another embodiment in the embodiment of fig. 3 may be the following steps added to the above embodiment: and signing the interaction information with the interaction sequence number nonce and the packing block height threshold blockLimit, and sending the signature to the block chain.
Wherein the signature may be a digital signature of the information using an asymmetric cryptographic algorithm.
The interaction information initiated by the user in the embodiments may be:
Tx=TData+nonce+Sign(TData+nonce,SK) (1)
wherein, TData may be Content of interactive information, Sk may be an account private Key, and Sign (Content, Secret Key) may be a signature algorithm of information interaction.
The interaction information initiated by the user in the above embodiments may also be:
Tx=TData+nonce+blockLimit+Sign(TData+nonce+blockLimit,SK) (2)
therefore, the present embodiment can determine the parallelism of information by Nonce randomization and the certainty of information interaction by blockLimit.
Fig. 4 is a flowchart illustrating an information processing method based on a blockchain according to another embodiment of the present invention. The present embodiment may be applied to the blockchain network side, which may include the verification node 20 and the packing node 30.
As shown in fig. 4, the method comprises the steps of: s410, receiving interactive information; s420, analyzing an interaction sequence number nonce in the interaction information; s430, verifying whether the nonce is repeated in a preset interactive sequence number range; and S440, when the nonce is not repeated within the preset interaction sequence number range, packaging the interaction information in the block chain. Wherein the implementation subject of S410-S430 may be the authentication node 20. The implementation body of S4440 may be the packing node 30.
As a first modified embodiment of the embodiment shown in fig. 4, the following steps can be added to the embodiment shown in fig. 4: analyzing a packing block height threshold blockLimit in the interactive information; verifying whether the packing block height threshold blockLimit is greater than the current block height blockNumber or not; and when the packing block height threshold value blockLimit is greater than the current block height blockNumber, packing the interactive information in the block chain.
In some embodiments, the packing block height threshold blockLimit is: the sum of the current block height blockNumber and the block height offset.
In some embodiments, the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain.
As a second variant of the embodiment shown in fig. 4, the following steps can be added to the embodiment shown in fig. 4: a packing block height range blockWindow for limiting the packing block height threshold blockLimit is set.
As a third variant of the embodiment shown in fig. 4, the following steps may be added to the second variant of fig. 4:
verifying whether the packing block height threshold blockLimit is smaller than the sum of the current block height blockNumber and the packing block height range blockWindow;
and when the blockLimit is smaller than the sum of the blockNumber and the blockWindow, packaging the interactive information in the block chain.
In particular, considering that the originator may be for subjective or objective reasons (e.g., hope that his information may be present longer on the blockchain network to increase the likelihood of packaging or that the information program is erroneous), the originator may set a very large blockLimit, e.g., the blockLimit equals the block height at the time of origination of the information plus 10000. In this case, information with high real-time requirements may not be given the opportunity to be preferentially packed. For this case, this embodiment introduces a blockWindow (packing range) parameter to be used on the block chain node. Under the parameter definition, one information Tx can only be packed in a block satisfying the following range of block heights:
Tx.blockLimit-blockWindow<blockNumber<Tx.blockLimit (3)
thus, when a message Tx initiated by the message originator sets a very large blockLimit, its message will be saved by the node as pending until the blockchain height reaches near the blockLimit set by the message, and the node will not consider whether or not to pack it.
The introduction of the blockLimit simultaneously solves a problem introduced by nonce randomization, namely a replay attack problem. A replay attack refers to the same information being packed two or more times by the blockchain, resulting in the loss of interest to the information originator. For example, node a sends digital information to node B, the corresponding information being Tx. Under the conventional nonce continuation scheme, the nonce of each piece of information is determined to be incremented, and the blockchain only needs to verify whether the nonce of the packaged information Tx is equal to the current nonce + 1. Since the nonce is smaller than the current nonce, the Tx once packaged cannot be packaged again, and an attacker cannot forge the digital signature of the Tx, and therefore cannot modify the value of the nonce manually. The conventional nonce continuation scheme does not have the replay attack problem. Once the nonce is changed to a random value, the blockchain cannot determine whether the Tx has been packed by a simple nonce increment attribute, and thus it is difficult to prevent replay attack. The introduction of blockLimit solves this problem. Specifically, because of a certain Tx (whether it is packed normally or replayed), it can only be packed inside a block of [ Tx. The blockchain only needs to check whether the information originated by the information originator within the block height is repeated. Beyond the block range, the information is not packetized even if retransmitted.
Therefore, the embodiment overcomes the defects that the traditional block chain information cannot be parallelized and the information result is uncertain through three technical improvements including nonce randomization, block limit block and block window range definition.
As a fourth variant of the embodiment shown in fig. 4, the following steps (before the step of parsing the sequence number nonce in the interworking information) may be added to fig. 4 and its variant: analyzing the signature in the received interactive information; verifying whether the signature is valid.
Fig. 5 is a flowchart illustrating an information processing method based on a blockchain according to another embodiment of the present invention.
Wherein, the left graph is the information assembly and signature issue process of the information initiator (for example, the terminal node 10); the right diagram is the authentication and packaging flow for a blockchain network (comprising authentication node 20 and packaging node 30).
As shown in fig. 5, the method may include the steps of:
s501, start, prepare to process the mutual information.
S502, organizing data of the interactive information to be processed.
S503, setting a non-repeated interactive sequence number value within a preset interactive sequence number range for the interactive information.
S504, calculating a packing block height threshold blockLimit.
blockLimit=blockNumber+N (4)
N=t1/t2 (5)
Where N is the tile height offset, t1 is the preset information timeout waiting time, and t2 is the average tile out interval of the tile chain.
And S505, setting the calculated blockLimit for the interaction information.
S506, digitally signing and sending the interaction information.
And S507, receiving the interactive information.
And S508, verifying whether the signature data is valid. When the signature data is valid, go to step S509, otherwise go to step S513.
S509, verifying whether the packed block height threshold blockLimit is greater than the current block height blockNumber. And when the blockLimit is larger than the blockNumber, the step is switched to the step S510, and the step is switched to the step S513.
And S510, verifying whether the packing block height threshold blockLimit is smaller than the sum of the current block height blockNumber and the packing block height range blockWindow. And (5) when the blockLimit is less than the blockNumber and the blockWindow, turning to the step S511, otherwise, turning to the step S513.
S511, verifying whether the data of the interactive information is legal. When the interactive verification is legal, go to step S512, otherwise go to step S513.
And S512, verifying that the interactive data are packaged in the block chain.
S513, the verification is not passed, and the interaction information is not packaged.
Therefore, the embodiment can correct the overlarge blockLimit problem caused by the blockLimit through the parallelism of information caused by Nonce randomization, the certainty of information interaction caused by the blockLimit block limit, the blockWindow range definition, and the repeated attack problem caused by Nonce randomization through the blockLimit and the blockWindow.
In addition, the embodiment of the invention can be applied to the transaction process, and the payment network which can only be used for experimental property originally is translated into the financial system through simple modification of the block chain protocol, so that the transaction can be reliably submitted to the block chain without worrying about the reliability and instantaneity of the transaction. Without the technology, a trading party is difficult to issue multiple parallel trades simultaneously, which causes performance bottleneck; it is also difficult for the transaction party to determine whether a transaction request can return processing results within a specified time, thereby greatly affecting the immediacy of the transaction. In fact, blockchain networks are difficult to truly use in financial systems without the attributes of parallel processing and instant processing.
It should be noted that the operation contents described in fig. 2 to fig. 5 may be combined and applied to different degrees, and for brevity, implementation manners of various combinations are not described again, and a person skilled in the art may flexibly adjust the sequence of the operation steps described above according to actual needs, or flexibly combine the steps described above, and the like.
Fig. 6 is a schematic structural diagram of an information processing apparatus based on a block chain according to an embodiment of the present invention.
As shown in fig. 6, the block chain-based information processing apparatus 600 may include: a first setting unit 610 and a transmitting unit 620. The first setting unit 610 is configured to set an interaction sequence number nonce that does not repeat within a preset interaction sequence number range for the interaction information to be processed; a sending unit 620, configured to send the interworking information with the interaction sequence number nonce set to the blockchain.
In some embodiments, the interaction sequence number nonce is a random number or an index associated with the interaction information.
It should be noted that the implementation manner of the functional units shown in the present embodiment may be hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
As a modified embodiment of the embodiment shown in fig. 6, a calculation unit and a second setting unit may be added on the basis of the embodiment of fig. 6. The calculating unit may calculate a packed block height threshold blockLimit for the interactive information based on a current block height number in the block chain; the second setting unit may be configured to set a packing block height threshold blockLimit for the interaction information, and send the interaction information with the interaction sequence number nonce and the packing block height threshold blockLimit set to the blockchain.
In some embodiments, the packing block height threshold blockLimit is: the sum of the current block height blockNumber and the block height offset.
In some embodiments, the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain.
As another variation of the embodiment shown in fig. 6, a signature unit may be added on the basis of the embodiment of fig. 6. And the signature unit is used for signing the interaction information with the interaction sequence number nonce and the packing block height threshold blockLimit and sending the signed interaction information to the block chain.
Fig. 7 is a schematic structural diagram of an information processing apparatus based on a block chain according to another embodiment of the present invention.
As shown in fig. 7, the block chain-based information processing apparatus 700 may include: a receiving unit 710, a first parsing unit 720, a first verifying unit 730, and a packing unit 740. The receiving unit 710 may be configured to receive interaction information; the first parsing unit 720 may be configured to parse an interaction sequence number nonce in the interaction information; the first verifying unit 730 may be configured to verify whether the nonce is repeated within a preset interaction sequence number range; the packing unit 740 may be configured to pack the interworking information in the blockchain when the nonce is not repeated within the preset interworking sequence number range.
In some embodiments, the interaction sequence number nonce is a random number or an index associated with the interaction information.
As a first modified embodiment of the embodiment shown in fig. 7, the embodiment of fig. 7 may be added with: a second parsing unit and a second verification unit. The second analysis unit may be configured to analyze a packing block height threshold blockLimit in the interaction information; the second verifying unit may be configured to verify whether the packed block height threshold blockLimit is greater than the current block height blockNumber; and when the packing block height threshold value blockLimit is greater than the current block height blockNumber, packing the interactive information in the block chain.
In some embodiments, the packing block height threshold blockLimit is: the sum of the current block height blockNumber and the block height offset.
In some embodiments, the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain.
As a second modified embodiment of the embodiment shown in fig. 7, the following may be added to fig. 7 and its modified embodiment: a limiting unit. The limiting unit may be configured to set a packing block height range blockWindow for limiting the packing block height threshold blockLimit.
As a third modified embodiment of the embodiment shown in fig. 7, the following may be added to fig. 7 and its modified embodiment: and a third verification unit. The third verifying unit may be configured to verify whether the packing block height threshold blockLimit is smaller than a sum of the current block height blockNumber and the packing block height range blockWindow; and when the blockLimit is smaller than the sum of the blockNumber and the blockWindow, packaging the interactive information in the block chain.
As a fourth modified embodiment of the embodiment shown in fig. 7, the following may be added to fig. 7 and its modified embodiment: a third parsing unit and a fourth verifying unit. The third parsing unit may be configured to parse a signature in the received interaction information; the fourth verification unit may be adapted to verify whether the signature is valid.
It should be noted that the apparatuses in the foregoing embodiments may be used as execution main bodies in the methods in the foregoing embodiments, and corresponding flows in the methods may be implemented, and the contents in the foregoing embodiments may be referred to and used for each other, and for brevity, the contents are not described again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (16)

1. An information processing method based on a block chain comprises the following steps:
setting an interaction sequence number nonce which is not repeated within a preset interaction sequence number range for the interaction information to be processed;
sending the interaction information with the interaction sequence number nonce to a block chain, so as to pack the interaction information in the block chain when the block chain verifies that the nonce is not repeated in the preset interaction sequence number range;
wherein the method further comprises:
calculating a packing block height threshold value blockLimit for the interactive information based on the current block height number in the block chain, wherein the packing block height threshold value blockLimit is as follows: the sum of the current block height blockNumber and the block height offset;
and setting the packing block height threshold blockLimit for the interactive information, and sending the interactive information with the set interactive sequence number nonce and the packing block height threshold blockLimit to the block chain, wherein the interactive information is packed when the packing block height threshold blockLimit is greater than the current block height blockNumber and the blockLimit is less than the sum of the blockNumber and blockWindow, and the blockWindow is a packing block height range and is used for limiting the packing block height threshold blockLimit.
2. The method of claim 1, wherein the interaction sequence number nonce is a random number or an index related to the interaction information.
3. The method of claim 1, wherein the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain.
4. The method of any of claims 1-3, further comprising:
and signing the interaction information with the interaction sequence number nonce and the packing block height threshold blockLimit, and sending the signature to the block chain.
5. An information processing method based on a block chain comprises the following steps:
receiving interactive information;
analyzing an interaction sequence number nonce in the interaction information;
verifying whether the nonce is repeated within a preset interaction sequence number range;
when the nonce is not repeated within the preset interaction sequence number range, packaging the interaction information in a block chain;
wherein the method further comprises:
analyzing a packing block height threshold blockLimit in the interaction information, wherein the packing block height threshold blockLimit is as follows: the sum of the current block height blockNumber and the block height offset;
verifying whether the packing block height threshold blockLimit is greater than the current block height blockNumber or not;
setting a packing block height range blockWindow for limiting the packing block height threshold blockLimit;
verifying whether the packing block height threshold blockLimit is smaller than the sum of the current block height blockNumber and the packing block height range blockWindow;
and when the packing block height threshold value blockLimit is greater than the current block height blockNumber and the blockLimit is less than the sum of the blockNumber and the blockWindow, packing the interactive information in a block chain.
6. The method of claim 5, wherein the interaction sequence number nonce is a random number or an index related to the interaction information.
7. The method of claim 5, wherein the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain.
8. The method according to any one of claims 5 to 7, further comprising, before the step of parsing an interaction sequence number nonce in the interaction information:
analyzing the signature in the received interactive information;
verifying whether the signature is valid.
9. An information processing apparatus based on a block chain, comprising:
the first setting unit is used for setting an interaction sequence number nonce which does not repeat within a preset interaction sequence number range for the interaction information to be processed;
a sending unit, configured to send the interaction information with the interaction sequence number nonce set to a blockchain, so as to package the interaction information in the blockchain when the blockchain verifies that the nonce is not repeated within the preset interaction sequence number range;
the device further comprises:
the calculating unit is used for calculating a packing block height threshold blockLimit used for the interactive information based on the current block height blockNumber in the block chain, wherein the packing block height threshold blockLimit is as follows: the sum of the current block height blockNumber and the block height offset;
and the second setting unit is used for setting the packing block height threshold blockLimit for the interactive information, and sending the interactive information with the interactive sequence number nonce and the packing block height threshold blockLimit to the block chain, wherein the interactive information is packed when the packing block height threshold blockLimit is greater than the current block height blockNumber and the blockLimit is less than the sum of the blockNumber and the blockWindow, and the blockWindow is a packing block height range and is used for limiting the packing block height threshold blockLimit.
10. The apparatus of claim 9, wherein the interaction sequence number nonce is a random number or an index related to the interaction information.
11. The apparatus of claim 9, wherein the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain.
12. The apparatus of any of claims 9-11, further comprising:
and the signature unit is used for signing the interaction information with the interaction sequence number nonce and the packing block height threshold blockLimit and sending the signed interaction information to the block chain.
13. An information processing apparatus based on a block chain, comprising:
a receiving unit, configured to receive interaction information;
the first analysis unit is used for analyzing the interaction sequence number nonce in the interaction information;
the first verification unit is used for verifying whether the nonce is repeated within a preset interaction sequence number range;
a packing unit, configured to pack the interaction information in a block chain when the nonce is not repeated within the preset interaction sequence number range;
the device further comprises:
a second analyzing unit, configured to analyze a packing block height threshold blockLimit in the interaction information, where the packing block height threshold blockLimit is: the sum of the current block height blockNumber and the block height offset;
the second verification unit is used for verifying whether the packed block height threshold blockLimit is greater than the current block height blockNumber or not;
the limiting unit is used for setting a packing block height range blockWindow used for limiting the packing block height threshold blockLimit;
a third verifying unit, configured to verify whether the packed block height threshold blockLimit is smaller than a sum of the current block height blockNumber and the packed block height range blockWindow; and when the packing block height threshold value blockLimit is greater than the current block height blockNumber and the blockLimit is less than the sum of the blockNumber and the blockWindow, packing the interactive information in a block chain.
14. The apparatus of claim 13, wherein the interaction sequence number nonce is a random number or an index related to the interaction information.
15. The apparatus of claim 13, wherein the block height offset is: the ratio of the preset information timeout waiting time to the block out interval of the block chain.
16. The apparatus of any of claims 13-15, further comprising:
the third analysis unit is used for analyzing the signature in the received interactive information;
a fourth verification unit for verifying whether the signature is valid.
CN201611205350.7A 2016-12-22 2016-12-22 Information processing method and device based on block chain Active CN106815722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611205350.7A CN106815722B (en) 2016-12-22 2016-12-22 Information processing method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611205350.7A CN106815722B (en) 2016-12-22 2016-12-22 Information processing method and device based on block chain

Publications (2)

Publication Number Publication Date
CN106815722A CN106815722A (en) 2017-06-09
CN106815722B true CN106815722B (en) 2021-05-07

Family

ID=59109719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611205350.7A Active CN106815722B (en) 2016-12-22 2016-12-22 Information processing method and device based on block chain

Country Status (1)

Country Link
CN (1) CN106815722B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009918B (en) * 2017-11-23 2021-10-26 深圳捷汇科技有限公司 Accounting method of block chain consensus algorithm transaction system and electronic equipment
CN108764870B (en) * 2018-05-29 2020-07-07 阿里巴巴集团控股有限公司 Transaction processing method and device based on block chain and electronic equipment
CN108876378B (en) * 2018-07-11 2022-04-19 北京国泰网信科技有限公司 Public link data encryption backup method
CN109064171A (en) * 2018-07-26 2018-12-21 杭州秘猿科技有限公司 A kind of method, apparatus and electronic system of block chain parallel transaction
CN109063183B (en) * 2018-08-27 2021-01-12 众安信息技术服务有限公司 Method and device for processing information at block chain nodes
CN109255057B (en) * 2018-09-18 2021-05-07 百度在线网络技术(北京)有限公司 Block generation method, device, equipment and storage medium
CN111782275B (en) * 2018-10-25 2024-02-06 创新先进技术有限公司 Transaction processing method and device based on blockchain and electronic equipment
CN112232817A (en) * 2018-10-25 2021-01-15 创新先进技术有限公司 Transaction processing method and device based on block chain and electronic equipment
CN109584063B (en) * 2018-10-25 2020-07-21 阿里巴巴集团控股有限公司 Transaction processing method and device based on block chain and electronic equipment
CN111782724A (en) * 2018-10-25 2020-10-16 阿里巴巴集团控股有限公司 Transaction processing method and device based on block chain and electronic equipment
CN109461079B (en) * 2018-10-29 2022-04-05 众安信息技术服务有限公司 Transaction processing method and device based on block chain
PL3552167T3 (en) * 2018-11-30 2021-10-25 Advanced New Technologies Co., Ltd. Utilizing nonce table to resolve concurrent blockchain transaction failure
CN111327565B (en) * 2018-12-13 2022-09-06 北京果仁宝软件技术有限责任公司 Block chaining and deblocking method and system
CN109918044B (en) * 2019-02-26 2021-03-30 太原理工大学 Block chain technology-based drawing/sorting method
CN109903050A (en) * 2019-03-02 2019-06-18 杭州复杂美科技有限公司 Transaction De-weight method, transaction building method, equipment and storage medium
CN110060161B (en) * 2019-03-28 2021-05-28 众安信息技术服务有限公司 Client service implementation method and service assembly for block chain transaction repetition prevention
CN111431709B (en) * 2020-03-24 2023-03-31 福建福链科技有限公司 Random number generation method and generation end in alliance chain
CN112070500B (en) * 2020-09-20 2022-03-01 中科柏诚科技(北京)股份有限公司 Block chain payment processing method based on digital financial service and cloud computing center

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957192A (en) * 2014-04-04 2014-07-30 驻马店市金格尔电气设备有限公司 System for processing any GPS data based on distributed system structure
CN104185035A (en) * 2014-08-25 2014-12-03 西安交通大学 Method for achieving uniform distribution of all paths of program code streams in construction process of multiple program TS streams
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN106100981A (en) * 2016-08-22 2016-11-09 布比(北京)网络技术有限公司 Social network data exchange method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160098730A1 (en) * 2014-10-01 2016-04-07 The Filing Cabinet, LLC System and Method for Block-Chain Verification of Goods

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957192A (en) * 2014-04-04 2014-07-30 驻马店市金格尔电气设备有限公司 System for processing any GPS data based on distributed system structure
CN104185035A (en) * 2014-08-25 2014-12-03 西安交通大学 Method for achieving uniform distribution of all paths of program code streams in construction process of multiple program TS streams
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN106100981A (en) * 2016-08-22 2016-11-09 布比(北京)网络技术有限公司 Social network data exchange method and device

Also Published As

Publication number Publication date
CN106815722A (en) 2017-06-09

Similar Documents

Publication Publication Date Title
CN106815722B (en) Information processing method and device based on block chain
CN109462483B (en) Block chain based mail evidence storage method, device, equipment and storage medium
CN109495249B (en) Data storage method of block chain system, node and block chain system
CN111143885B (en) Block chain transaction processing method and device and block chain link points
US9712515B2 (en) Verifying an identity of a message sender
TW201709100A (en) Authentication method, apparatus and system used in quantum key distribution process
CN112219371A (en) Bidirectional block chain
JP2022527610A (en) Methods and equipment for propagating blocks in blockchain networks
US20210081406A1 (en) Blockchain network
KR101253683B1 (en) Digital Signing System and Method Using Chained Hash
CN111342955A (en) Communication method and device thereof, and computer storage medium
CN113779606A (en) Information verification method and system for reducing privacy disclosure risk
KR20230093432A (en) Identification of Denial of Service Attacks
CN114244530A (en) Resource access method and device, electronic equipment and computer readable storage medium
CN110690969A (en) Method and system for completing bidirectional SSL/TLS authentication in cooperation of multiple parties
CN109309613B (en) Mail delivery method, device and system
EP3627361A1 (en) Media content control
JP6603799B2 (en) Entity identity validity verification method and apparatus
CN112994891B (en) Transaction request consensus method and system based on threshold signature
CN113269570A (en) Extraction result verification method and related device
CN111769945A (en) Auction processing method based on block chain and block chain link point
CN114092093B (en) Block chain transaction processing method and device, electronic equipment and readable medium
JP6893919B2 (en) Entity identity validity verification method and equipment in which multi-TTP participates
CN113626848A (en) Sample data generation method and device, electronic equipment and computer readable medium
WO2018128581A1 (en) A transaction management method

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
CB03 Change of inventor or designer information

Inventor after: Zhang Yifeng

Inventor after: Xu Zhong

Inventor after: Yao Qian

Inventor before: Zhang Yifeng

CB03 Change of inventor or designer information
TA01 Transfer of patent application right

Effective date of registration: 20171123

Address after: Hangzhou City, Zhejiang province 310013 Xihu District Lingyin ad tower Room 903

Applicant after: Zhongchao Credit Card Industry Development Co., Ltd. Hangzhou blockchain Technology Research Institute

Address before: 100088 floor 7, seat C, De Sheng International Center, No. 79, De Sheng door Avenue, Xicheng District, Beijing

Applicant before: Zhongchao Credit Card Industry Development Co., Ltd. Beijing smart card technology research institute

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200715

Address after: Hangzhou City, Zhejiang province 310013 Xihu District Lingyin ad tower Room 903

Applicant after: ZHONGCHAO CREDITCARD INDUSTRY DEVELOPMENT CO., LTD. HANGZHOU BLOCKCHAIN TECHNOLOGY Research Institute

Applicant after: Shanghai Bill Exchange Co.,Ltd.

Address before: Hangzhou City, Zhejiang province 310013 Xihu District Lingyin ad tower Room 903

Applicant before: ZHONGCHAO CREDITCARD INDUSTRY DEVELOPMENT CO., LTD. HANGZHOU BLOCKCHAIN TECHNOLOGY Research Institute

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant