CN115632835A - Chain uplink and downlink data transmission method based on multi-element Hash lock - Google Patents

Chain uplink and downlink data transmission method based on multi-element Hash lock Download PDF

Info

Publication number
CN115632835A
CN115632835A CN202211225667.2A CN202211225667A CN115632835A CN 115632835 A CN115632835 A CN 115632835A CN 202211225667 A CN202211225667 A CN 202211225667A CN 115632835 A CN115632835 A CN 115632835A
Authority
CN
China
Prior art keywords
lock
hash
data
user
stage
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.)
Granted
Application number
CN202211225667.2A
Other languages
Chinese (zh)
Other versions
CN115632835B (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.)
Yunnan University YNU
Original Assignee
Yunnan University YNU
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 Yunnan University YNU filed Critical Yunnan University YNU
Priority to CN202211225667.2A priority Critical patent/CN115632835B/en
Publication of CN115632835A publication Critical patent/CN115632835A/en
Application granted granted Critical
Publication of CN115632835B publication Critical patent/CN115632835B/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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • 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/104Peer-to-peer [P2P] networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a chain uplink and downlink data transmission method based on a multi-element hash lock, which comprises the following steps: the first stage is as follows: a pretreatment stage; and a second stage: a commit and lock phase; and a third stage: a release stage; the invention provides a method for establishing a down-link transmission channel network as a transmission medium, which is composed of a group of transmission channels between a pair of users and is used for performing down-link transmission between two parties without directly establishing the transmission channels, and provides a down-link data uplink mechanism based on multi-element hash locking such as hash lock, time lock, position lock, organization lock and the like.

Description

Chain uplink and downlink data transmission method based on multi-element Hash lock
Technical Field
The invention relates to the field of data transmission, in particular to a chain uplink and downlink data transmission method based on a multi-element Hash lock.
Background
In recent years, the technology of the blockchain has been developed rapidly, and particularly after the intellectual contract of the blockchain is released, the technology of the blockchain is rapidly becoming an important part of the blockchain solution. However, some intelligent contracts for realizing complex functions need external data support, and the execution environment of the block chain is relatively independent from the outside, so that a safe and efficient downlink data uplink technology is very important.
At present, a more popular technology for the safe transmission of uplink and downlink data on a block chain is a prediction machine technology, and the prediction machine has a function of writing external information into the block chain to complete data intercommunication between the block chain and the real world. However, the prediction machine also has many security problems, such as data quality problem, and since the nodes on the chain may access different data sources under the chain, how to guarantee the data quality is a problem; the scalability problem, that is, every time a new data source is added to the network or an existing data aggregation mode needs to be adjusted, a large amount of network administration and coordination work is required to make all nodes in the network achieve consensus, which increases the time required for consensus, and may cause the whole block chain to fail to operate in a serious case. In addition to the predictive machine technology, another technology is a hash locking technology, after data is hashed and locked, the hash value is uplinked, and the safety of the data in the transmission process is ensured through the irreversibility of a hash algorithm. However, this method can only know whether the data is tampered, does not guarantee atomicity of data transmission, and usually operates on the whole data. However, in practical application scenarios, there are various customization requirements for data, for example, as long as data link of a specific location or organization is available, and it is necessary to specifically consider various elements behind the requirements, such as location, organization and so on. Therefore, a main objective of the present invention is to construct a secure and customizable uplink mechanism for downlink data, so as to implement integrity verification of downlink data, ensure atomicity and consistency of data, and meet data security and processing performance requirements in a specific scenario.
Prior art 1
Chinese invention patent, name: a resource transaction method based on-chain-under-chain cooperation of a state channel is provided in application numbers CN202110688709.5 and publication numbers CN113411338B, and two parties of the resource transaction can perform resource transaction activities for multiple times under the chain after opening the state channel on the chain, and only when the channel is opened or closed or a dispute event occurs, the two parties of the resource transaction can communicate with a block chain system. In addition, a dispute processing method is introduced in the method, when the resource transaction parties do not follow the flow specified by the system, the resource transaction parties can force the opposite party to abide by the resource transaction protocol by establishing disputes, so that the safety and the fairness of the resource transaction are ensured.
Disadvantages of the first prior art
According to the method, the state channel is opened under the chain to conduct resource transaction, multiple resource transaction activities can be conducted under the chain, communication with the block chain system is only needed when the channel is opened and closed or a dispute event occurs, but the resource transaction requirements of multiple participants cannot be met due to the fact that only two participants of the resource transaction are needed, certain resources are consumed due to the opening requirement of the state channel, and a new state channel needs to be opened for every two resource transaction parties, so that the resource consumption is high, and the utilization rate is low.
Technical scheme of prior art II
Chinese patent invention, name: an information security protection implementation method and system in a multi-person under-chain state channel are provided in application numbers CN202210288131.9 and publication numbers CN114826603A, after an executor establishes the multi-person under-chain state channel and generates system common parameters, an initiator and a receiver join the multi-person under-chain state channel and perform under-chain state updating, the state of the multi-person under-chain state channel is updated after verification of the executor, and protection of users in the channel is achieved.
The second prior art has the defects
The method adopts cryptography with zero knowledge proof to ensure the data security in the status channel under the chain, and needs a plurality of participants to carry out verification and confirmation. Generally, the performance requirement of data transmission is relatively high, and the time overhead and the calculation overhead of zero knowledge proof are both large, which greatly affects the data transmission. And waiting for multiple participants to verify that the acknowledgement is time consuming, the performance of the data transfer is greatly reduced if one party delays giving acknowledgement information.
Technical problem to be solved by the invention
The execution environment of a block chain is relatively independent from the outside, so that the block chain is difficult to acquire safe and credible data under the block chain, and although a prediction machine technology provides relatively safe and credible data for the block chain, when massive under-chain transaction data is processed, the problems of inconsistent data under the block chain, low concurrency performance and the like exist, so that the invention provides a method for constructing a under-chain transmission channel network as a transmission medium, which is formed by a group of transmission channels between a pair of users and is used for performing under-chain transmission between two parties without directly establishing the transmission channels. And a chain data uplink mechanism based on multi-element hash locking such as a hash lock, a time lock, a position lock, an organization lock and the like is provided, different types of locks are set and selected according to application scenes, the integrity, the atomicity and the consistency of data are ensured through the hash locking, the integrity verification of chain transaction data or chain assets is realized, and the requirements of data safety and processing performance under specific scenes are met.
Disclosure of Invention
In order to solve the technical problem, the invention provides a chain uplink and downlink data transmission method based on a multi-element hash lock.
The technical scheme of the invention is as follows:
the method for transmitting uplink and downlink data on a chain based on the multi-element Hash lock comprises the following steps:
the first stage is as follows: a pretreatment stage;
and a second stage: a commit and lock phase;
and a third stage: and (4) a release stage.
Preferably, the first stage comprises the steps of:
s11: a multi-element hash lock selection and generation mechanism;
s12: and constructing a downlink data transmission channel network.
Preferably, S11 comprises the following sub-steps:
s111: selecting an element lock;
s112: forming element identification;
s113: a multi-factor hash lock is generated.
Preferably, S12 comprises the following sub-steps:
s121: opening a channel;
s122: data transmission;
s123: and closing the channel.
Preferably, the second stage comprises 3 aspects:
aspect 1 sender: sender u 0 Creating a MeHTLC multi-element hash time-lock contract, namely MeHTLC (u) 0 ,u 1 ,v 1 ,s,t 1 D) to its next neighbor u 1
Aspect 2 intermediate user: in the commit and lock phases, each intermediate user { u } i } i∈[1,n] From its previous neighbor u i-1 Accept MeHTLC. Each intermediate user u i Verifying the correctness of the MeHTLC contract: a. checking the lock-in time t i-1 (t i+1 >t i ) The effectiveness of (a);
b. checking user u i-1 Whether there is sufficient commission γ <i,i+1><i,i+1> ≥v i+1 ) Wherein v is i+1 Is from v i Reduced commission fee
Figure BDA0003879718570000041
Then follow the right neighbor u i+1 Creating a new MeHTLC contract;
the recipient of the 3 rd aspect: receiver u n+1 From his left neighbor u n Receiving MeHTLC (u) n ,u n+1 ,v n+1 ,s,t n+1 D) and then checking whether the contract satisfies t n+1 >t now + Δ, if satisfied, sending the primitive R of hash S of the element identity to the left neighbor, if not t n+1 >t now + Δ or hash calculated for the given original image R does not match the hash S of the element identifier, then the transfer will be aborted and the data and commission are returned;
where Δ is a small positive value, u 0 Is a sender, u n+1 As a recipient, { u i } i∈[1,n] For intermediate users, fe (u) i ) For user u i Of the commission, gamma <i,j> For user u i And u j The deposit is put into the channel.
Preferably, stage 3 comprises 2 aspects:
aspect 1 sender: if user u 1 At time t 1 A pre-image R, then u, of a hash S is provided 0 V to be locked 1 The commission and data d are released to its next neighbor u 1
Aspect 2 intermediate user: each user u i At time t i Provided with a hash S of the pre-image R, the locked commission and data d are released to its next neighbor u i-1
Wherein u is 0 Is the sender, u n+1 As a recipient, { u i } i∈[1,n] For intermediate users, fe (u) i ) For user u i The commission fee of (1).
The method for transmitting the uplink and downlink data on the link based on the multi-element Hash lock has the following beneficial effects that:
1. the invention provides the definition of the multi-element Hash lock based on the Hash lock, the time lock, the position lock, the organization lock and the like, sets and selects different types of locks according to application scenes, ensures the integrity, the atomicity and the consistency of data through Hash locking, realizes the integrity verification of the transaction data or the assets under the chain, and meets the requirements of data safety and processing performance under specific scenes.
2. The invention designs the overall process of the data transmission channel network under the chain, the process describes the main steps of constructing the data transmission channel network under the chain, and the operation which can be carried out by each channel in the network comprises the parameter definition of the operation and the method process.
3. The downlink data transmission channel network realizes the downlink transmission between two parties without directly establishing a transmission channel, and improves the repeated utilization rate of the channel.
4. The invention designs a Multi-element Hash time locking Contract MeHTLC (Multi element Hash time Lock Contract), and improves the mobility and the safety of data in a data transmission channel network under a link.
5. The invention designs a general flow of a downlink and uplink data transmission mechanism based on a multi-element Hash lock and a downlink data transmission channel network, and the flow describes the stage flow of downlink and uplink data.
6. The invention improves the safety of data transmission and ensures the integrity, atomicity and consistency of data.
Drawings
FIG. 1 is a schematic diagram of the process of the present invention.
Fig. 2 is a general flow chart of data transmission according to the present invention.
FIG. 3 is a flow chart of the multi-element hash lock generation of the present invention.
Fig. 4 is a network diagram of a downlink data transmission channel according to the present invention.
Fig. 5 is a data transmission uplink diagram of the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
1. Method model
The model of downlink and uplink data transmission based on multi-element hash lock chain is shown in fig. 1, and the role and function of the system are specifically described as follows:
the data sources under the chain: the data source under the chain is a device which needs to upload own data to the block chain at the current moment. The resource demand equipment is generally equipment of the internet of things with limited resources, such as industrial internet of things sensors, intelligent vehicles, virtual reality equipment and the like.
Downlink data transmission network: the downlink data transmission channel network is a network formed by data transmission channels between different devices and is used for downlink transmission between two parties without directly establishing the transmission channels.
The multi-element Hash lock: the multi-element Hash lock locks data from multiple dimensions, and ensures the safety, atomicity and consistency of the data in the transmission process. The multiple elements are corresponding elements to be considered extracted according to the requirements of specific application scenarios, for example, only data uplink at a specific position is needed, and position elements are needed to be considered; only the specific organization or enterprise data link that is needed needs to consider organization elements, etc. Mapping the data into a multi-element identifier, and locking the identifier by using a hash lock.
Block chain node: and the blockchain node is responsible for processing and recording data from the transmission channel network and generating random numbers required by the multi-element hash lock.
2. General procedure
The overall flow of data transmission is shown in fig. 2, and can be generally divided into 3 stages, 6 main steps, which are:
(1) And (3) generating a multi-element hash lock: and determining multiple elements by the data source under the chain according to the requirement of the data source, generating element identifiers, and finally forming the multiple-element hash lock.
(2) Constructing a downlink transmission channel network: the data transmission channel network is composed of a group of transmission channels between every two data source users, and is used for performing downlink transmission between two parties without directly establishing the transmission channels. A transmission channel has three operations: are OffChanOpenChannel, offChantransmission and OffChanCloseChannel, respectively.
(3) Data transmission: on the basis of a Multi-element hash lock and a downlink transmission channel network, an intelligent Contract interface of a Multi-element hash time locking Contract (Multi element Hashed time lock control) is used for realizing a downlink data uplink mechanism, and data flow through the downlink data transmission channel network and finally uplink.
(4) Data transmission condition verification is successful: the comparison verifies whether the conditions in MeHTLC are met.
(5) Data transfer condition verification whether timeout occurred: the comparison verifies whether the condition of the MeHTLC times out.
(6) Whether to close the channel: after the data transmission of the data source under the chain is completed, offchainCloseChannel closing channel can be executed, and the latest balance is broadcasted to the chain. 1,2 is the preprocessing stage, 3,4,5 is the commit and lock stage, and step 6 is the release stage.
The detailed flow of each stage is described in detail in the following section.
3. Generation of a multi-element hash lock
As shown in fig. 3, the multi-element hash lock generation process mainly includes three stages, which are as follows:
(1) Selection of element lock: extracting corresponding elements needing to be considered according to the requirements of specific application scenes, for example, only data uplink of a specific position needs to be considered, and the position elements need to be considered; only the specific organization or enterprise data link that is needed needs to consider organization elements, etc. The Multi-element (Multi element) extracts corresponding element values according to the requirements of specific application scenarios, and the formula is as follows:
Figure BDA0003879718570000081
wherein e1, e2, e3, e4 are the position element, organization element, time element and other elements input by the user, α (x), β (x), η (x), ξ (x) are the element mapping functions of the elements, α (x) maps the specific position information input by the user to the longitude and latitude coordinates of the position, β (x) maps a specific organization input by the user to a unique organization number, η (x) maps the time input by the user to the block time, ξ (x) is the user-defined mapping function. The whole formula shows that after a user inputs a corresponding element, the user enters a corresponding element mapping function, performs mapping on the input element, and finally outputs a specific element value.
(2) Element identification formation: the multi-element identifier R is a character string consisting of a plurality of elements and a Random number R, wherein the Random number R = Random (i) i∈[0,n+1] The Multi-element identifier R = (Multi element) + R, where the Multi element is a Multi element value mapped by a Multi element mapping function, such as longitude and latitude of a location, a unique identifier of a certain enterprise organization, and the like, and R is a corresponding random number generated by a block chain.
(3) Generating a multi-element hash lock: hashing the generated multi-element identifier is that the multi-element Hash lock S = Hash (R)
4. Constructing a downlink data transmission channel network:
the data transmission channel network is composed of a group of transmission channels between every two data source users, and is used for performing downlink transmission between two parties without directly establishing the transmission channels. A transmission channel has three operations: are OffChanOpenChannel, offChantransmission and OffChanCloseChannel, respectively. Any two users can open the transmission channel by agreeing and storing a guarantee that OffchainOpenChannel operation is performed on the chain. Thereafter, both users can complete the data transmission by performing an OffchainTransmission operation without broadcasting it over the blockchain. Finally, either party can close the channel by performing the OffchainCloseChannel operation and broadcast the latest mutual acceptance status on the blockchain.
These three operations are described in detail below:
(1) Opening a channel: offchain Openchannel (u) i ,u jijji ,fee,t)→{1,0},u i ,u j Is a user pair, the channel capacity is gamma = gamma ijji ;γ ij (≤β[u i ]) And gamma ji (≤β[u j ]) Is the on-chain balance of the corresponding subscriber; fe and t represent the commission and the passage time, respectively. This isThe operation being to open a channel identifier
Figure BDA0003879718570000093
The new channel of (2). If this operation is successful, the blockchain β updates the balance (β [ u ]) i ]=β[u i ]–γ ij And beta [ u ] j ]=β[u j ]-γ ji ) And returns 1, otherwise returns 0.
(2) Data transmission:
Figure BDA0003879718570000091
given a set of channels
Figure BDA0003879718570000092
Transmitting data d from sender u 0 To recipient u n+1 And will in turn deduct the commission from ν. This operation retrieves channel information
Figure BDA0003879718570000101
From a chain of blocks. It checks the condition of each intermediate user (γ' ij ≥ν i ). If so, the channel balance is updated to
Figure BDA0003879718570000102
And returning to 1. Otherwise, the channel is not updated and returns 0.
(3) Closing a channel:
Figure BDA0003879718570000103
given a channel identifier
Figure BDA0003879718570000104
This operation retrieves channel information
Figure BDA0003879718570000105
Wherein gamma is ij And gamma ji Is the deposit that both parties have last agreed, and γ' ij And γ' ji Is the current deposit. If time out or user initiates application, block chain B updates balance (beta u) i ]=β-γ ij And beta [ u ] j ]=β–γ ji Or β [ u ] i ]=β-γ' ij And beta [ u ] j ]=β–γ' ji ) Then eliminate the channel from the network
Figure BDA0003879718570000106
And returns 1 (0) for a success (failure) operation, respectively.
u i Represents the down-link data source user, beta represents the blockchain,
Figure BDA0003879718570000107
representing a data source u i And u j Of the channel identifier fe (u) i ) Representing user u i When many parties have opened up a plurality of downlink transmission channels and integrate the channels into a downlink data transmission channel network, the procedure to be paid is as follows:
as shown in FIG. 4,u 0 、u 1 、u 2 、u 3 Are all different data sources under the chain, assuming data source u 0 To transfer data to a blockchain, it is desirable to follow a path P = u 0 →u 1 →u 2 → blockackchain transfers data d. In step 1, a random number R is randomly generated by a block chain, and a hash value S of R is sent to u in a secure and private mode 0 Where S = H (R), H being a hash function. Step 2 to step 9 are the transmission process of the data d. In step 2, the sender u 0 To which a transmission request offchainTransmission (u) is sent 0 ,u 1 ,v 1 ,s,t 1 D) to the next right neighbor u 1 V is a commission (not including the cost of the sender and receiver) in the transmission of data, which increases with each hop, where
Figure BDA0003879718570000108
It then locks the funds and the data to be sent and asks the user u 1 At time t 1 R is given in. Otherwise, the transfer will abort and return to u 0 . After receiving the transmission request OffchainTransmission, it is transmitted from v in step 3 1 Subtract its commission and give the next neighbor u 2 Sending a transmission request OffchainTransmission (u) 1 ,u 2 ,v 2 ,s,t 2 And d), the same procedure is performed at each intermediate node. Finally, when the block link receives the transmission request OffchainTransmission (u) 3 ,Blockchain,v 4 ,s,t 4 D), it verifies the OffchainTransmission condition and sends the random number R to the previous data source u 2 . Subsequently, after receiving R, each intermediate data source u will have locked v i The commission and data d are sent to the next neighbor data source and R is sent in the opposite direction along the way to the previous neighbor data source. Finally, a data source u for sending data 0 Receiving R, and sending the locked data and the commission charge to the user u 1 The transmission is completed and the channel is closed by performing an OffchainCloseChannel operation.
5. Data transmission uplink
On the basis of a Multi-element hash lock and a downlink transmission channel network, an intelligent Contract interface of a Multi-element hash time locking Contract MeHTLC (Multi element Hashed time Lock Contract) is used for realizing a downlink data uplink mechanism, data flows through the downlink data transmission channel network, and finally uplink is carried out, wherein the specific flow is as follows:
as shown in FIG. 5, u 0 、u 1 、u 2 、u 3 Are all different data sources under the chain, assuming data source u 0 To transmit data d at a given location to a block chain, it is desirable to follow a path P = u 0 →u 1 →u 2 → Blockchain transfer data d. In step 1, a user inputs information of the position and maps the information into longitude and latitude of the position through a multi-element mapping function, the longitude and latitude are sent to a block chain through an anonymous onion network, the block chain combines the longitude and latitude and a generated random number to generate a multi-element identifier R, and a hash value S of the R is sent to u in a secure and private mode 0 Where S = H (R), H being a hash function. From step 2 to step 9, the data d is transmitted, and in step 2, the sender u 0 To the next right neighbor u 1 Creating MeHTLC (u) 0 ,u 1 ,v 1 ,s,t 1 D), v is a commission in transmitting data (excluding the cost of the sender and receiver), which is increased with each hop, wherein
Figure BDA0003879718570000111
It then locks the funds and the data to be sent and asks the user u 1 At time t 1 R is given in. Otherwise, the transmission will abort the commission and the data will be returned to u 0 . After receiving the MeHTLC contract, it is driven from v in step 3 1 Subtract its commission and give the next neighbor u 2 Creating MeHTLC (u) 1 ,u 2 ,v 2 ,s,t 2 And d), the same procedure is performed at each intermediate node. Finally, when the block link receives MeHTLC (u) 3 ,Blockchain,v 4 ,s,t 4 D) it verifies the MeHTLC condition and sends the multi-element identity R to the previous data source u 3 . Subsequently, after receiving R, each intermediate data source u will have locked v i The commission and data d are sent to the next neighbor data source and R is sent in the opposite direction along the way to the previous neighbor data source. Finally, the data source u that sends the data 0 Receiving R, and sending the locked data and the handling fee to the user u 1 The transmission is completed and then the OffchainCloseChannel is executed.
6. Intelligent contract data transmission condition verification whether success or not
The MeHTLC comprises a multi-element hash lock and a time lock, and needs to verify whether an original image R of the multi-element hash lock transmitted by a neighbor in a transmission network is the same as an existing multi-element hash lock S or not and also needs to verify whether the original image R is overtime or not when the original image R passes the verification.
7. Intelligent contract data transmission condition verification whether overtime exists
The MeHTLC comprises a multi-element Hash lock and a time lock, and after verifying whether an original image R of the multi-element Hash lock transmitted by a neighbor in a transmission network is the same as an existing multi-element Hash lock S, the time lock is required to be verified, namely the verification of the multi-element Hash lock can not be completed within a specified time, the next hop transmission can be carried out by verifying data, otherwise, the data and the commission charge are returned.
8. Closing off the passage
And when the data transmission is finished, the channel opening time is overtime or the verification is overtime in the transmission process, executing OffchaincoseChannel to close the channel, and updating and broadcasting the balance to the chain. The specific flow of the channel closing is as follows:
Figure BDA0003879718570000121
given a channel identifier
Figure BDA0003879718570000122
This operation retrieves channel information
Figure BDA0003879718570000123
Wherein gamma is ij And gamma ji Is the last gold deposit agreed upon by both parties, and γ' ij And gamma' ji Is the current deposit. If time out or user initiates application, block chain B updates balance (beta u) i ]=β-γ ij And beta [ u ] j ]=β–γ ji Or β [ u ] i ]=β-γ' ij And beta [ u ] j ]=β–γ' ji ) Then eliminate the channel from the network
Figure BDA0003879718570000131
And returns 1 (0) for a success (failure) operation, respectively.

Claims (6)

1. The method for transmitting uplink and downlink data on the link based on the multi-element Hash lock is characterized by comprising the following steps:
the first stage is as follows: a pretreatment stage;
and a second stage: a commit and lock phase;
and a third stage: and (4) a release stage.
2. The method for uplink and downlink data transmission on a chain based on multi-element hash lock according to claim 1, wherein the first stage comprises the steps of:
s11: a multi-element hash lock selection and generation mechanism;
s12: and constructing a downlink data transmission channel network.
3. The method for uplink and downlink data transmission on a multi-element hash lock-based chain according to claim 1, wherein the S11 comprises the following substeps:
s111: selecting an element lock;
s112: forming element identification;
s113: a multi-element hash lock is generated.
4. The method for uplink and downlink data transmission on a chain based on multi-element hash lock according to claim 1, wherein the S12 comprises the following sub-steps:
s121: opening a channel;
s122: data transmission;
s123: and closing the channel.
5. The method of claim 1, wherein the second stage comprises 3 aspects:
aspect 1 sender: sender u 0 Creating a MeHTLC multi-element hash time-lock contract, namely MeHTLC (u) 0 ,u 1 ,v 1 ,s,t 1 D) to its next neighbor u 1
Aspect 2 intermediate user: in the commit and lock phase, each intermediate user { u } i } i∈[1,n] From its previous neighbor u i-1 Accept MeHTLC. Each intermediate user u i Verifying the correctness of the MeHTLC contract: a. checking the lock-on time t i-1 (t i+1 >t i ) The effectiveness of (a);
b. checking user u i-1 Whether there is sufficient commission γ <i,i+1><i,i+1> ≥v i+1 ) Wherein v is i+1 Is from v i Reduced handling fee
Figure FDA0003879718560000021
Then follow the right neighbor u i+1 Creating a new MeHTLC contract;
the recipient of the 3 rd aspect: recipient u n+1 From his left neighbor u n Receiving MeHTLC (u) n ,u n+1 ,v n+1 ,s,t n+1 D), then checking whether the contract satisfies t n+1 >t now + Δ, if satisfied, send the primitive R of the hash S of the element identification to the left neighbor, if not t n+1 >t now + Δ or hash calculated for the given original image R does not match the hash S of the element identifier, then the transfer will be aborted and the data and commission are returned;
where Δ is a small positive value, u 0 Is the sender, u n+1 As a recipient, { u i } i∈[1,n] For intermediate users, fe (u) i ) For user u i Of the commission, gamma <i,j> For user u i And u j The deposit is put into the channel.
6. The method for multi-element hash lock-based downlink and uplink data transmission in a chain according to claim 1, wherein the 3 rd stage comprises 2 aspects:
aspect 1 sender: if user u 1 At time t 1 A pre-image R, then u, of a hash S is provided 0 V to be locked 1 The commission and data d are released to its next neighbor u 1
Aspect 2 intermediate user: each user u i At time t i Provided with a hash S of the pre-image R, the locked commission and data d are released to its next neighbor u i-1
Wherein u is 0 Is a sender, u n+1 As a recipient, { u i } i∈[1,n] For intermediate users, fe (u) i ) For user u i The commission fee of (1).
CN202211225667.2A 2022-10-09 2022-10-09 Multi-element Ha Xisuo-based data transmission method under chain Active CN115632835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211225667.2A CN115632835B (en) 2022-10-09 2022-10-09 Multi-element Ha Xisuo-based data transmission method under chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211225667.2A CN115632835B (en) 2022-10-09 2022-10-09 Multi-element Ha Xisuo-based data transmission method under chain

Publications (2)

Publication Number Publication Date
CN115632835A true CN115632835A (en) 2023-01-20
CN115632835B CN115632835B (en) 2023-09-26

Family

ID=84904744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211225667.2A Active CN115632835B (en) 2022-10-09 2022-10-09 Multi-element Ha Xisuo-based data transmission method under chain

Country Status (1)

Country Link
CN (1) CN115632835B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8954409B1 (en) * 2011-09-22 2015-02-10 Juniper Networks, Inc. Acquisition of multiple synchronization objects within a computing device
CN113411338A (en) * 2021-06-17 2021-09-17 北京工业大学 Resource transaction method based on-chain-down cooperation of state channel
CN113987526A (en) * 2021-09-26 2022-01-28 海南火链科技有限公司 Resource exchange method, device and equipment based on block chain and readable storage medium
CN114465817A (en) * 2022-03-22 2022-05-10 暨南大学 Digital certificate system and method based on TEE (text exchange engine) prediction machine cluster and block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8954409B1 (en) * 2011-09-22 2015-02-10 Juniper Networks, Inc. Acquisition of multiple synchronization objects within a computing device
CN113411338A (en) * 2021-06-17 2021-09-17 北京工业大学 Resource transaction method based on-chain-down cooperation of state channel
CN113987526A (en) * 2021-09-26 2022-01-28 海南火链科技有限公司 Resource exchange method, device and equipment based on block chain and readable storage medium
CN114465817A (en) * 2022-03-22 2022-05-10 暨南大学 Digital certificate system and method based on TEE (text exchange engine) prediction machine cluster and block chain

Also Published As

Publication number Publication date
CN115632835B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
JP7221355B2 (en) Method and Apparatus for Distributed Database Containing Anonymous Entries
Kiktenko et al. Quantum-secured blockchain
US20230171098A1 (en) Computer-implemented system and method for time release encryption over a blockchain network
CN106899698B (en) Cross-chain interoperation method between block chains
Ou et al. An overview on cross-chain: Mechanism, platforms, challenges and advances
CN112418860A (en) Block chain efficient management framework based on cross-chain technology and working method
CN110892396A (en) Method and apparatus for efficiently implementing distributed databases within a network
CN114595835B (en) Model training method and device based on federal learning, equipment and storage medium
CN113407977B (en) Cross-chain extension method and system based on aggregated signature
CN112488682B (en) Three-party transfer method and device for block chain
Mohanty et al. n-htlc: Neo hashed time-lock commitment to defend against wormhole attack in payment channel networks
CN115271718A (en) Hub-based state channel transaction method in block chain
Ananth et al. On the concurrent composition of quantum zero-knowledge
CN113411338B (en) Resource transaction method based on-chain-down cooperation of state channel
RU2686818C1 (en) Method for scaling distributed information system
Ge et al. Accio: Variable-Amount, Optimized-Unlinkable and NIZK-Free Off-Chain Payments via Hubs
CN112950180A (en) Community certificate method and system based on alliance chain, electronic device and storage medium
US11811866B2 (en) Computer-implemented system and method for controlling processing steps of a distributed system
Guo et al. Multi-party Fair Exchange Protocol with Smart Contract on Bitcoin.
CN115632835A (en) Chain uplink and downlink data transmission method based on multi-element Hash lock
CN113806764B (en) Distributed support vector machine based on blockchain and privacy protection and optimization method thereof
CN112020727A (en) Computer-implemented method and system for controlling tasks performed by a set of circularly ordered nodes participating in a blockchain network
CN116305186A (en) Security aggregation method with low communication overhead and decentralization
Pei et al. A Framework of Secure Computation as a Service in Decentralized Environment
CN115052047B (en) Front-end verification method of Gossip network protocol

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