[go: up one dir, main page]

CN114124350A - A Consensus Algorithm to Improve Performance in a Heterogeneous Network Environment - Google Patents

A Consensus Algorithm to Improve Performance in a Heterogeneous Network Environment Download PDF

Info

Publication number
CN114124350A
CN114124350A CN202111330146.9A CN202111330146A CN114124350A CN 114124350 A CN114124350 A CN 114124350A CN 202111330146 A CN202111330146 A CN 202111330146A CN 114124350 A CN114124350 A CN 114124350A
Authority
CN
China
Prior art keywords
partition
partition unit
data
request
consensus algorithm
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.)
Pending
Application number
CN202111330146.9A
Other languages
Chinese (zh)
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.)
Midas Technology Shenzhen Co ltd
Original Assignee
Midas Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Midas Technology Shenzhen Co ltd filed Critical Midas Technology Shenzhen Co ltd
Priority to CN202111330146.9A priority Critical patent/CN114124350A/en
Publication of CN114124350A publication Critical patent/CN114124350A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the technical field of consensus algorithm, in particular to a consensus algorithm for improving performance in a network heterogeneous environment, which comprises the following steps: s1, a user puts forward a data transmission request, a blockchain sends the request to all connected nodes, the whole node after receiving the request transmits the request to a plurality of adjacent nodes, the whole node and the adjacent nodes send the transaction request of the user to a first partition unit according to the Hash calculation result of the user address, S2, the first partition unit decouples the packaging process of the transaction requests in the partition and generates a partitioned block for processing, then the first partition unit sends the generated partitioned block to other 3n +1(n is more than or equal to 1) partition units, and after the 3n +1(n is more than or equal to 1) partition units receive the partitioned block sent by the first partition unit, the invention can effectively solve the problems that the common identification algorithm performance under the existing network heterogeneous environment is poor and the use requirement cannot be met.

Description

Consensus algorithm for improving performance in network heterogeneous environment
Technical Field
The invention relates to the technical field of consensus algorithm, in particular to a consensus algorithm for improving performance in a network heterogeneous environment.
Background
In a distributed system, a plurality of hosts form a network cluster through an asynchronous communication mode, in such an asynchronous system, state replication needs to be performed among the hosts to ensure that each host reaches a consistent state, however, in the asynchronous system, situations such as a failed host which cannot communicate, performance degradation of the host, network congestion and the like may occur, which may cause error information to propagate in the system, so a fault-tolerant protocol needs to be defined in an asynchronous network which is unreliable by default to ensure that each host reaches safe and reliable state consensus, so in a block chain system, how to make each node keep respective data consistent through a rule is a very core problem, a solution to the problem is to make a set of consensus algorithm to achieve consistency and correctness of the book data on different nodes, which needs to refer to the existing algorithm for realizing state consensus in the distributed system, and determining a mechanism for selecting accounting nodes in the network and how to ensure that the ledger data is kept correct and consistent in the whole network.
The existing consensus algorithm under the network heterogeneous environment has poor performance and cannot meet the use requirement.
In summary, the present invention solves the existing problems by designing a consensus algorithm for improving performance in a network heterogeneous environment.
Disclosure of Invention
The present invention provides a consensus algorithm for improving performance in a network heterogeneous environment, so as to solve the problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme:
a consensus algorithm for improving performance in a network heterogeneous environment comprises the following steps:
s1, the user puts forward the data transmission request, the block chain sends the request to all the connected nodes, the whole node after receiving the request transmits the request to a plurality of adjacent nodes, the whole node and the adjacent nodes send the transaction request of the user to the first partition unit according to the Hash calculation result of the user address;
s2, decoupling the process of packaging the transaction request in the partition and processing the generated partitioned block by the first partition unit, then sending the generated partitioned block to the other 3n +1(n is more than or equal to 1) partition units by the first partition unit, sending a confirmation signature to the first partition unit after the 3n +1(n is more than or equal to 1) partition units receive the partitioned block sent by the first partition unit, and sending a transmission permission instruction to a user after the first partition unit needs to receive the confirmation signatures of K (K is 2n +1, n is more than or equal to 1) partition units;
s3, the first partition unit combines received confirmation signatures of K (K is 2n +1, n is more than or equal to 1) partition units into partition blocks for processing, the partition blocks obtain ID addresses of the K (K is 2n +1, n is more than or equal to 1) partition units, a user inputs data packets into a block chain, the block chain sends the data packets into the first partition unit, the first partition unit divides the data packets uploaded by the user into K-1 groups of data fragments, and the K-1 groups of data fragments are randomly sent to the partition blocks for processing by a random sampling method to obtain the ID addresses of the K (K is 2n +1, n is more than or equal to 1) partition units;
s4, after receiving the data fragments transmitted by the first partition unit, K (K is 2n +1, n is more than or equal to 1) partition units encrypt the data fragments by using a data encryption algorithm to obtain encrypted data fragments, and the K (K is 2n +1, n is more than or equal to 1) partition units retransmit the encrypted data fragments to the first partition unit;
s5, the partition unit I compresses the K-1 group of encrypted data fragments into an encrypted compressed data packet, transmits the encrypted compressed data packet to a receiving node, a receiving user puts forward a downloading request to the receiving node, the receiving node decompresses and decrypts the encrypted compressed data packet, and the receiving user downloads the decrypted data packet from the receiving node.
In a preferred embodiment of the present invention, the specific analysis flow of the data encryption algorithm in S4 includes the following steps:
s11, presetting at least T +1 group key (T is more than or equal to 2) in the partition unit, and selecting one group from preset keys as a main key according to the random number and a preset algorithm;
and S12, generating a dispersion factor Kc according to the master key, the random number and the terminal unique identification code, and encrypting data by using the dispersion factor Kc and a 3DES encryption algorithm.
In a preferred embodiment of the present invention, each group of keys preset in S11 has an index number, and the preset algorithm is: n { (N &0x 07)% 5}, where N is a key index and N is a random number.
In a preferred embodiment of the present invention, the specific operation steps of generating the dispersion factor Kc in S12 include:
s21, obtaining a dispersion factor 1 according to the terminal unique identification code, obtaining a dispersion factor 2 according to the random number, and performing 3des-ecb calculation on the dispersion factor 1 serving as source data and the master key to obtain data k 1;
s22, taking the result obtained after the XOR operation of the dispersion factors 1 as source data, and carrying out 3des-ecb calculation with the master key to obtain data k 2;
s23, replacing the dispersion factor 1 with the dispersion factor 2, replacing the master key with K1+ K2, repeating steps S21 and S22 to obtain K1 and K2, defining a dispersion factor Kc ═ K1+ K2.
In a preferred embodiment of the present invention, what is done when the flow packed in S2 is decoupled is a BFT consensus algorithm inside the partition unit.
In a preferred embodiment of the present invention, the partition unit includes information including: the system comprises a partition unit ID number, a stateRoot, a transactionsROot, a receiptsROot, signature information and timestamps of other partition units, wherein the partition unit sequence number comprises a partition sequence number and sequence numbers of other partition units.
In a preferred embodiment of the present invention, the stateRoot represents a hash value in each state of data transmission, the transactsroot represents a hash value of data transmission, the receiptsRoot represents a hash value of data encryption, and the timestamp is a timestamp for establishing the partition unit.
In a preferred embodiment of the present invention, the step of decompressing in S5 includes:
s31, configured to decompress the encrypted compressed data packet, and monitor and count channel condition information, where the channel condition information includes: the said decompressing end compares the channel factor with the preset threshold value according to the channel quality information dynamically provided by the radio link control RLC/media access control MAC layer: average packet loss rate PktLossRatio, average hybrid retransmission times HARQNum and average retransmission times ARQNum;
s32, determining the relationship between the channel condition and the predetermined threshold value: the threshold values of the channel quality reliability set by the system are respectively K1, K2 and K3, the value of the channel quality CQ is judged, when PktLossRatio is less than K1, HARQNum is less than K2 and ARQNum is less than K3, the CQ is TRUE, otherwise, the CQ is FALSE;
s33, when the channel condition is lower than the predetermined threshold, the decompressor immediately performs state degradation and mode conversion: the decompression end immediately performs state degradation to an NC state without a compression context, and enables a bidirectional optimization O mode to be converted to a bidirectional reliable R mode, correspondingly, the compression end of the equipment for receiving and transmitting ROHC compression data packets reduces the state to a lowest state to initialize and refresh IR, enables the O mode to be converted to the R mode, and starts to send IR compression packets so as to synchronize the context of the decompression end in time;
s34, when the channel condition is found to exceed the predetermined threshold, the decompressor immediately performs state upgrade and mode conversion, and sends ACK to the compressor of the device that receives and transmits ROHC compressed data packets, the decompressor immediately transitions the state to the high state and switches the mode to the bidirectional optimized O mode, and accordingly, the compressor of the device that receives and transmits ROHC compressed data packets transitions the state to the high state and switches the mode to the O mode.
In a preferred aspect of the present invention, the finding that the channel condition is lower than the predetermined threshold includes: and when the CQ value is FALSE, the decompression end judges that the channel condition is lower than a preset threshold value.
In a preferred aspect of the present invention, the finding that the channel condition is higher than the predetermined threshold value includes: the threshold value of the channel quality reliability times set by the system is K4, and when the CQ value K4 times is TURE, the decompression end judges that the channel condition is higher than the predetermined threshold value as the threshold value.
Compared with the prior art, the invention has the beneficial effects that:
1. in the invention, the flow of block packaging is decoupled, a blocking mechanism is added, the transmitted data packet is divided into a plurality of groups of data fragments, each partition unit encrypts one data fragment, the encryption speed of the block chain on the transmitted data can be improved, and the transmission performance of the block chain is improved.
2. In the invention, a plurality of groups of keys are preset, and one group of keys is selected from the plurality of groups of keys as a main key during encryption each time, so that the keys used during encryption each time are different, and are not easy to crack by others, thereby improving the security of data.
3. In the invention, by introducing a new standard for judging the change of the channel condition, the sensitivity and the accuracy of ROHC are improved, the respective working states and operation modes of the compression state machine and the decompression state machine are rapidly adjusted, and the error diffusion and the packet loss propagation of adjacent packet data are effectively prevented in time.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments, and all other embodiments obtained by a person of ordinary skill in the art without any creative work based on the embodiments of the present invention belong to the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, and the terms used herein in the specification of the present invention are for the purpose of describing particular embodiments only and are not intended to limit the present invention, and the term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
The invention provides a technical scheme that:
a consensus algorithm for improving performance in a network heterogeneous environment comprises the following steps:
s1, the user puts forward the data transmission request, the block chain sends the request to all the connected nodes, the whole node after receiving the request transmits the request to a plurality of adjacent nodes, the whole node and the adjacent nodes send the transaction request of the user to the first partition unit according to the Hash calculation result of the user address;
s2, decoupling the process of packaging the transaction request in the partition and processing the generated partitioned block by the first partition unit, then sending the generated partitioned block to the other 3n +1(n is more than or equal to 1) partition units by the first partition unit, sending a confirmation signature to the first partition unit after the 3n +1(n is more than or equal to 1) partition units receive the partitioned block sent by the first partition unit, and sending a transmission permission instruction to a user after the first partition unit needs to receive the confirmation signatures of K (K is 2n +1, n is more than or equal to 1) partition units;
s3, the first partition unit combines received confirmation signatures of K (K is 2n +1, n is more than or equal to 1) partition units into partition blocks for processing, the partition blocks obtain ID addresses of the K (K is 2n +1, n is more than or equal to 1) partition units, a user inputs data packets into a block chain, the block chain sends the data packets into the first partition unit, the first partition unit divides the data packets uploaded by the user into K-1 groups of data fragments, and the K-1 groups of data fragments are randomly sent to the partition blocks for processing by a random sampling method to obtain the ID addresses of the K (K is 2n +1, n is more than or equal to 1) partition units;
s4, after receiving the data fragments transmitted by the first partition unit, K (K is 2n +1, n is more than or equal to 1) partition units encrypt the data fragments by using a data encryption algorithm to obtain encrypted data fragments, and the K (K is 2n +1, n is more than or equal to 1) partition units retransmit the encrypted data fragments to the first partition unit;
s5, the partition unit I compresses the K-1 group of encrypted data fragments into an encrypted compressed data packet, transmits the encrypted compressed data packet to a receiving node, a receiving user puts forward a downloading request to the receiving node, the receiving node decompresses and decrypts the encrypted compressed data packet, and the receiving user downloads the decrypted data packet from the receiving node.
Further, the specific analysis flow of the data encryption algorithm in S4 includes the following steps:
s11, presetting at least T +1 group key (T is more than or equal to 2) in the partition unit, and selecting one group from preset keys as a main key according to the random number and a preset algorithm;
and S12, generating a dispersion factor Kc according to the master key, the random number and the terminal unique identification code, and encrypting data by using the dispersion factor Kc and a 3DES encryption algorithm.
Further, each set of keys preset in S11 has an index number, and the preset algorithm is: n { (N &0x 07)% 5}, where N is a key index and N is a random number.
Further, the specific operation step of generating the dispersion factor Kc in S12 includes:
s21, obtaining a dispersion factor 1 according to the terminal unique identification code, obtaining a dispersion factor 2 according to the random number, and performing 3des-ecb calculation on the dispersion factor 1 serving as source data and the master key to obtain data k 1;
s22, taking the result obtained after the XOR operation of the dispersion factors 1 as source data, and carrying out 3des-ecb calculation with the master key to obtain data k 2;
s23, replacing the dispersion factor 1 with the dispersion factor 2, replacing the master key with K1+ K2, repeating steps S21 and S22 to obtain K1 and K2, defining a dispersion factor Kc ═ K1+ K2.
Further, what is done when the flow packed in S2 is decoupled is a BFT consensus algorithm inside the partition unit.
Further, the partition unit includes information including: the system comprises a partition unit ID number, a stateRoot, a transactionsROot, a receiptsROot, signature information and timestamps of other partition units, wherein the partition unit sequence number comprises a partition sequence number and sequence numbers of other partition units.
Further, the stateRoot represents a hash value of data transmission in each state, the transactionsRoot represents a hash value of data transmission, the receiptsRoot represents a hash value of data encryption, and the timestamp is a timestamp for establishing a partition unit.
Further, the specific analysis step of decompressing in S5 includes:
s31, configured to decompress the encrypted compressed data packet, and monitor and count channel condition information, where the channel condition information includes: the said decompressing end compares the channel factor with the preset threshold value according to the channel quality information dynamically provided by the radio link control RLC/media access control MAC layer: average packet loss rate PktLossRatio, average hybrid retransmission times HARQNum and average retransmission times ARQNum;
s32, determining the relationship between the channel condition and the predetermined threshold value: the threshold values of the channel quality reliability set by the system are respectively K1, K2 and K3, the value of the channel quality CQ is judged, when PktLossRatio is less than K1, HARQNum is less than K2 and ARQNum is less than K3, the CQ is TRUE, otherwise, the CQ is FALSE;
s33, when the channel condition is lower than the predetermined threshold, the decompressor immediately performs state degradation and mode conversion: the decompression end immediately performs state degradation to an NC state without a compression context, and enables a bidirectional optimization O mode to be converted to a bidirectional reliable R mode, correspondingly, the compression end of the equipment for receiving and transmitting ROHC compression data packets reduces the state to a lowest state to initialize and refresh IR, enables the O mode to be converted to the R mode, and starts to send IR compression packets so as to synchronize the context of the decompression end in time;
s34, when the channel condition is found to exceed the predetermined threshold, the decompressor immediately performs state upgrade and mode conversion, and sends ACK to the compressor of the device that receives and transmits ROHC compressed data packets, the decompressor immediately transitions the state to the high state and switches the mode to the bidirectional optimized O mode, and accordingly, the compressor of the device that receives and transmits ROHC compressed data packets transitions the state to the high state and switches the mode to the O mode.
Further, the finding that the channel condition is lower than the predetermined threshold value includes: and when the CQ value is FALSE, the decompression end judges that the channel condition is lower than a preset threshold value.
Further, the finding that the channel condition is higher than the predetermined threshold value includes: the threshold value of the channel quality reliability times set by the system is K4, and when the CQ value K4 times is TURE, the decompression end judges that the channel condition is higher than the predetermined threshold value as the threshold value.
The specific implementation case is as follows:
the user puts forward a data transmission request, the block chain sends the request to all connected nodes, the whole node after receiving the request transmits the request to a plurality of adjacent nodes, the whole node and the adjacent nodes send the transaction request of the user to a first partition unit according to the Hash calculation result of the user address, and the partition unit comprises the following information: the system comprises partition unit ID numbers, stateRoots, transactionsRoots, receiptsRoots, signature information and timestamps of other partition units, wherein the partition unit sequence numbers comprise a first partition sequence number and sequence numbers of other partition units, the stateRoots represent hash values of data transmission in each state, the transactionsRoots represent hash values of the data transmission, the receiptsRoots represent hash values of data encryption, and the timestamps are timestamps established by the partition units;
the first partition unit decouples the flow of packaging the transaction requests in the partition and generates the partitioned blocks for processing, then the first partition unit sends the generated partitioned blocks to other 3n +1(n is more than or equal to 1) partition units, after receiving the partitioned blocks sent by the first partition unit, the 3n +1(n is more than or equal to 1) partition units send confirmation signatures to the first partition unit, and after receiving the confirmation signatures of K (K is 2n +1, n is more than or equal to 1) partition units, the first partition unit sends a transmission permission instruction to a user;
the first partition unit combines received confirmation signatures of K (K is 2n +1, n is more than or equal to 1) partition units into a partition block for processing, the partition block processes the received confirmation signatures to obtain ID addresses of the K (K is 2n +1, n is more than or equal to 1) partition units, a user inputs data packets into a block chain, the block chain sends the data packets into the first partition unit, the first partition unit divides the data packets uploaded by the user into K-1 groups of data fragments, and the K-1 groups of data fragments are randomly sent to the partition block for processing to obtain the ID addresses of the K (K is 2n +1, n is more than or equal to 1) partition units by a random sampling method;
after K (K is 2n +1, n is more than or equal to 1) partition units receive a data fragment transmitted by one partition unit, the data fragment is encrypted by using a data encryption algorithm, at least T +1 groups of keys (T is more than or equal to 2) are preset in the partition units, each preset group of keys has an index number, one group of keys is selected from the preset keys as a main key according to a random number and the preset algorithm, and the preset algorithm is as follows: n { (N &0x 07)% 5}, where N is a key index number and N is a random number, generating a dispersion factor Kc from a master key, the random number, and a terminal unique identification code, obtaining a dispersion factor 1 according to the unique identification code of the terminal, obtaining a dispersion factor 2 according to the random number, taking the dispersion factor 1 as source data, 3des-ecb calculation is carried out with the master key to obtain data k1, the result obtained after the dispersion factor 1 is subjected to exclusive OR operation is taken as source data, performing 3DES-ecb calculation with the master key to obtain data K2, replacing a dispersion factor 1 with a dispersion factor 2, replacing the master key with K1+ K2, repeating the steps S21 and S22 to obtain K1 and K2, defining a dispersion factor Kc ═ K1+ K2, encrypting the data by using the dispersion factor Kc and a 3DES encryption algorithm to obtain encrypted data fragments, and retransmitting the encrypted data fragments to the partition unit one by K (K ═ 2n +1, n ≧ 1);
the first partition unit compresses K-1 groups of encrypted data fragments into encrypted compressed data packets, transmits the encrypted compressed data packets to a receiving node, and a receiving user makes a download request to the receiving node, and the receiving node decompresses the encrypted compressed data packets for decompressing the encrypted compressed data packets and monitoring and counting channel condition information, wherein the channel condition information comprises: the decompressing end calculates one or more channel factors to compare with a preset threshold according to the channel quality information dynamically provided by the radio link control RLC/media access control MAC layer: average packet loss rate PktLossRatio, average number of hybrid retransmissions HARQNum, and average number of retransmissions ARQNum, and determining a relationship between a channel condition and a predetermined threshold: the threshold values of channel quality reliability set by the system are respectively K1, K2 and K3, the value of channel quality CQ is judged, when PktLossRatio is less than K1, HARQNum is less than K2 and ARQNum is less than K3, CQ is TRUE, otherwise CQ is FALSE, when the channel condition is less than the preset threshold value, namely when the CQ value is FALSE, the decompression end immediately performs state degradation and mode conversion: the decompression end immediately performs state degradation to a non-compression context NC state and makes the bidirectional optimized O mode switch to a bidirectional reliable R mode, correspondingly, the compression end of the equipment for receiving and transmitting ROHC compressed data packets reduces the state to the lowest state to initialize and refresh IR, and makes the O mode switch to the R mode, starts to transmit IR compressed packets so as to synchronize the context of the decompression end in time, when the channel condition is found to exceed the preset threshold value, namely the threshold value of the channel quality reliability times set by the system is K4, when the CQ values K4 times are all TURE, the decompression end immediately performs state upgrade and mode switch, and transmits ACK to the compression end of the equipment for receiving and transmitting ROHC compressed data packets, the decompression end immediately transitions the state to a high state and switches the mode to the bidirectional optimized O mode, correspondingly, the compression end of the equipment for receiving and transmitting ROHC compressed data packets transitions the state to the high state and switches the mode to the O mode, the receiving node decrypts the decompressed data;
and the receiving user downloads the decrypted data packet from the receiving node.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

1.一种网络异构环境下提升性能的共识算法,包括以下步骤:1. A consensus algorithm for improving performance in a heterogeneous network environment, comprising the following steps: S1,用户提出数据传输请求,区块链把该请求发送到连接的全部节点中,接收请求后的全节点把该请求传输到若干个相邻节点,全节点和若干个邻居节点根据用户地址的哈希计算结果,把用户的交易请求发送到一号分区单元中;S1, the user puts forward a data transmission request, the blockchain sends the request to all connected nodes, and the full node after receiving the request transmits the request to several adjacent nodes. Hash calculation result, send the user's transaction request to the No. 1 partition unit; S2,一号分区单元把该分区内的交易请求打包的流程解耦和生成分片区块处理,然后一号分区单元把生成的分片区块发送至另外的3n+1(n≥1)个分区单元中,3n+1(n≥1)个分区单元接收到一号分区单元发送的分片区块后,向一号分区单元中发确认签名,一号分区单元需要接收到K(K=2n+1,n≥1)个分区单元的确认签名后向用户发出允许传输指令;S2, the No. 1 partition unit decouples the process of packaging the transaction request in the partition and generates a shard block for processing, and then the No. 1 partition unit sends the generated shard block to another 3n+1 (n≥1) partitions In the unit, after 3n+1 (n≥1) partition units receive the shard block sent by the No. 1 partition unit, they send a confirmation signature to the No. 1 partition unit, and the No. 1 partition unit needs to receive K (K=2n+ 1, n ≥ 1) After confirming the signature of the partition units, issue a permission transmission instruction to the user; S3,一号分区单元将接收到的K(K=2n+1,n≥1)个分区单元的确认签名进行合入分区区块处理,分区区块处理得到K(K=2n+1,n≥1)个分区单元的ID地址,用户向区块链中输入数据包,区块链将数据包送入一号分区单元内,一号分区单元数会将用户上传的数据包分割成K-1组数据片段,并通过随机抽样的方法,将K-1组数据片段随机发送到分区区块处理得到K(K=2n+1,n≥1)个分区单元的ID地址中;S3, the No. 1 partition unit merges the received confirmation signatures of the K (K=2n+1, n≥1) partition units into the partition block processing, and the partition block processing obtains K (K=2n+1, n ≥1) ID addresses of partition units, the user inputs the data packet into the blockchain, the blockchain sends the data packet into the No. 1 partition unit, and the number of the No. 1 partition unit will divide the data packet uploaded by the user into K- 1 group of data fragments, and by random sampling method, K-1 groups of data fragments are randomly sent to the partition block for processing to obtain the ID addresses of K (K=2n+1, n≥1) partition units; S4,K(K=2n+1,n≥1)个分区单元接收到一号分区单元传输来的数据片段后,使用数据加密算法对数据片段进行加密处理,得到加密的数据片段,K(K=2n+1,n≥1)个分区单元将加密的数据片段重新传输到一号分区单元中;S4, after K(K=2n+1, n≥1) partition units receive the data fragment transmitted from the No. 1 partition unit, use the data encryption algorithm to encrypt the data fragment to obtain the encrypted data fragment, K(K =2n+1, n≧1) partition units retransmit the encrypted data fragment into the No. 1 partition unit; S5,一号分区单元将K-1组加密的数据片段压缩成加密压缩数据包,并将加密压缩数据包传输到接收节点,接收用户向接收节点中提出下载请求,接收节点将加密压缩数据包解压缩并解密,接收用户从接收节点中下载解密后的数据包。S5, the No. 1 partition unit compresses the K-1 groups of encrypted data fragments into encrypted compressed data packets, and transmits the encrypted compressed data packets to the receiving node. The receiving user submits a download request to the receiving node, and the receiving node encrypts the compressed data packets. Decompress and decrypt, and the receiving user downloads the decrypted data packet from the receiving node. 2.根据权利要求1所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述S4中数据加密算法的具体分析流程包括以下步骤:2. The consensus algorithm for improving performance under a heterogeneous network environment according to claim 1, wherein: the specific analysis process of the data encryption algorithm in the S4 comprises the following steps: S11,分区单元内预设至少T+1组密钥(T≥2),根据随机数和预设算法从预设的密钥中选取一组作为主密钥;S11, preset at least T+1 groups of keys (T≥2) in the partition unit, and select a group from the preset keys as the master key according to the random number and the preset algorithm; S12,根据所述主密钥、随机数和终端唯一标识码生成分散因子Kc,利用所述分散因子Kc和3DES加密算法对数据进行加密。S12, generating a dispersion factor Kc according to the master key, random number and terminal unique identification code, and encrypting data by using the dispersion factor Kc and a 3DES encryption algorithm. 3.根据权利要求2所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述S11中预设的每组密钥具有一索引号,预设算法为:N={(n&0x07)%5},其中N为密钥索引号,n为随机数。3. The consensus algorithm for improving performance in a heterogeneous network environment according to claim 2, wherein each group of keys preset in the S11 has an index number, and the preset algorithm is: N={ (n&0x07)%5}, where N is the key index number and n is a random number. 4.根据权利要求2所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述S12中生成分散因子Kc的具体操作步骤包括:4. The consensus algorithm for improving performance in a heterogeneous network environment according to claim 2, wherein the specific operation steps of generating the dispersion factor Kc in the S12 include: S21,根据所述终端唯一标识码得到分散因子1,根据所述随机数得到分散因子2,将所述分散因子1作为源数据,与所述主密钥进行3des-ecb计算,得到数据k1;S21, obtaining a dispersion factor 1 according to the unique identification code of the terminal, obtaining a dispersion factor 2 according to the random number, using the dispersion factor 1 as source data, and performing 3des-ecb calculation with the master key to obtain data k1; S22,将所述分散因子1进行异或运算后得到的结果作为源数据,与所述主密钥进行3des-ecb计算,得到数据k2;S22, using the result obtained by performing the XOR operation on the dispersion factor 1 as source data, and performing 3des-ecb calculation with the master key to obtain data k2; S23,利用所述分散因子2代替所述分散因子1,利用k1+k2代替所述主密钥,重复步骤S21和S22,获得K1和K2,定义分散因子Kc=k1+k2。S23, the dispersion factor 1 is replaced by the dispersion factor 2, the master key is replaced by k1+k2, and steps S21 and S22 are repeated to obtain K1 and K2, and the dispersion factor Kc=k1+k2 is defined. 5.根据权利要求1所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述S2中打包的流程解耦时做的是分区单元内部的BFT共识算法。5 . The consensus algorithm for improving performance in a heterogeneous network environment according to claim 1 , wherein: when the process of packaging in the S2 is decoupled, it is a BFT consensus algorithm inside the partition unit. 6 . 6.根据权利要求1所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述分区单元包括的信息有:分区单元ID号、stateRoot、transactionsRoot、receiptsRoot、其他分区单元的签名信息和时间戳,所述分区单元序号包括一号分区序号和其他若干个分区单元的序号。6. The consensus algorithm for improving performance in a heterogeneous network environment according to claim 1, wherein the information included in the partition unit is: partition unit ID number, stateRoot, transactionsRoot, receiptsRoot, and the information of other partition units. Signature information and time stamp, the partition unit serial number includes the first partition serial number and the serial numbers of several other partition units. 7.根据权利要求6所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述stateRoot表示数据传输处于每个状态时的哈希值,所述transactionsRoot表示数据传输的哈希值,所述receiptsRoot表示数据加密的哈希值,所述时间戳为分区单元成立的时间戳。7. The consensus algorithm for improving performance in a heterogeneous network environment according to claim 6, wherein the stateRoot represents the hash value when data transmission is in each state, and the transactionsRoot represents the hash value of data transmission. Value, the receiptsRoot represents the hash value of data encryption, and the timestamp is the timestamp when the partition unit is established. 8.根据权利要求1所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述S5中解压缩的具体分析步骤包括:8. The consensus algorithm for improving performance in a heterogeneous network environment according to claim 1, wherein the specific analysis step of decompression in the S5 comprises: S31,用于对加密压缩数据包进行解压缩,同时监控并统计信道条件信息,信道条件信息包括:所述解压缩端根据无线链路控制RLC/媒体接入控制MAC层动态提供的信道质量信息,统计以下一个或多个信道因子与预定门限值比较:平均丢包率PktLossRatio、平均混合重传次数HARQNum以及平均重传次数ARQNum;S31, for decompressing the encrypted and compressed data packets, and monitoring and counting channel condition information at the same time, where the channel condition information includes: channel quality information dynamically provided by the decompression end according to the radio link control RLC/media access control MAC layer , and compare one or more of the following channel factors with a predetermined threshold: the average packet loss rate PktLossRatio, the average number of mixed retransmissions HARQNum, and the average number of retransmissions ARQNum; S32,判断信道条件与预定门限值之间的关系:系统设置的信道质量可靠的阈值分别为K1、K2以及K3,判断信道质量CQ的取值,当PktLossRatio<K1、HARQNum<K2以及ARQNum<K3时,CQ=TRUE,否则CQ=FALSE;S32, determine the relationship between the channel condition and the predetermined threshold value: the reliable thresholds of the channel quality set by the system are respectively K1, K2 and K3, and determine the value of the channel quality CQ, when PktLossRatio<K1, HARQNum<K2 and ARQNum< When K3, CQ=TRUE, otherwise CQ=FALSE; S32,信道条件低于预定门限值时,所述解压缩端立即进行状态降级以及模式转换:所述解压缩端立即进行状态降级至无压缩上下文NC状态,并使双向优化O模式向双向可靠R模式转换,相应地,收发ROHC压缩数据包的设备的压缩端将状态降到最低状态初始化刷新IR,并使O模式向R模式转换,开始发送IR压缩分组以便及时同步解压缩端的上下文;S32, when the channel condition is lower than a predetermined threshold value, the decompression end immediately performs state degradation and mode conversion: the decompression end immediately performs state degradation to the state of no compression context NC, and makes the bidirectional optimized O mode to the bidirectional reliable R mode conversion, correspondingly, the compressor end of the device sending and receiving ROHC compressed data packets will reduce the state to the lowest state to initialize the refresh IR, and make the O mode change to the R mode, and start sending IR compressed packets to synchronize the context of the decompression end in time; S33,当发现信道条件超过预定门限值时,解压缩端立即进行状态升级以及模式转换,并发送ACK至收发ROHC压缩数据包的设备的压缩端,所述解压缩端立即将状态迁移到高状态并将模式切换至双向优化O模式,相应地,收发ROHC压缩数据包的设备的压缩端将状态迁移到高状态并将模式切换至O模式。S33, when it is found that the channel condition exceeds the predetermined threshold value, the decompression end immediately performs state upgrade and mode conversion, and sends an ACK to the compression end of the device that sends and receives ROHC compressed data packets, and the decompression end immediately transitions the state to high state and switch the mode to the bidirectional optimized O mode, correspondingly, the compressor side of the device that transmits and receives ROHC compressed data packets transitions the state to the high state and switches the mode to the O mode. 9.根据权利要求8所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述发现信道条件低于预定门限值成立包括:当CQ取值为FALSE时,所述解压缩端判断信道条件低于预定门限值。9 . The consensus algorithm for improving performance in a heterogeneous network environment according to claim 8 , wherein: finding that the channel condition is lower than a predetermined threshold value includes: when the value of CQ is FALSE, the The decompression end judges that the channel condition is lower than a predetermined threshold. 10.根据权利要求9所述的一种网络异构环境下提升性能的共识算法,其特征在于:所述发现信道条件高于预定门限值成立包括:系统设置的信道质量可靠次数的阈值为K4,当CQ取值K4次均为TURE时,所述解压缩端判断信道条件高于预定门限值。10 . The consensus algorithm for improving performance in a heterogeneous network environment according to claim 9 , wherein the finding that the channel condition is higher than a predetermined threshold value includes: the threshold set by the system for the number of times the channel quality is reliable is 10 . K4, when the value of CQ is TRUE for K4 times, the decompression end judges that the channel condition is higher than the predetermined threshold value.
CN202111330146.9A 2021-11-11 2021-11-11 A Consensus Algorithm to Improve Performance in a Heterogeneous Network Environment Pending CN114124350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111330146.9A CN114124350A (en) 2021-11-11 2021-11-11 A Consensus Algorithm to Improve Performance in a Heterogeneous Network Environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111330146.9A CN114124350A (en) 2021-11-11 2021-11-11 A Consensus Algorithm to Improve Performance in a Heterogeneous Network Environment

Publications (1)

Publication Number Publication Date
CN114124350A true CN114124350A (en) 2022-03-01

Family

ID=80378246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111330146.9A Pending CN114124350A (en) 2021-11-11 2021-11-11 A Consensus Algorithm to Improve Performance in a Heterogeneous Network Environment

Country Status (1)

Country Link
CN (1) CN114124350A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116346365A (en) * 2023-03-27 2023-06-27 深圳法政信息技术有限公司 An application method of cloud evidence room in notary office based on block chain technology

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101998438A (en) * 2009-08-17 2011-03-30 大唐移动通信设备有限公司 Method and equipment for improving performance of PDCP (Packet Data Convergence Protocol) ROHC (Robust Header Compression) algorithm
CN104618093A (en) * 2015-01-16 2015-05-13 深圳市中兴物联科技有限公司 Data encrypting method and device
CN108985740A (en) * 2018-07-07 2018-12-11 夸克链科技(深圳)有限公司 The implementation method of high-performance common recognition algorithm
CN109345386A (en) * 2018-08-31 2019-02-15 阿里巴巴集团控股有限公司 Transaction common recognition processing method and processing device, electronic equipment based on block chain
KR102286016B1 (en) * 2020-12-23 2021-08-04 주식회사 지에이치비 System Providing Cloud Service Based on Blockchain
CN113312646A (en) * 2021-06-22 2021-08-27 上海和数软件有限公司 Data encryption method based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101998438A (en) * 2009-08-17 2011-03-30 大唐移动通信设备有限公司 Method and equipment for improving performance of PDCP (Packet Data Convergence Protocol) ROHC (Robust Header Compression) algorithm
CN104618093A (en) * 2015-01-16 2015-05-13 深圳市中兴物联科技有限公司 Data encrypting method and device
CN108985740A (en) * 2018-07-07 2018-12-11 夸克链科技(深圳)有限公司 The implementation method of high-performance common recognition algorithm
CN109345386A (en) * 2018-08-31 2019-02-15 阿里巴巴集团控股有限公司 Transaction common recognition processing method and processing device, electronic equipment based on block chain
KR102286016B1 (en) * 2020-12-23 2021-08-04 주식회사 지에이치비 System Providing Cloud Service Based on Blockchain
CN113312646A (en) * 2021-06-22 2021-08-27 上海和数软件有限公司 Data encryption method based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116346365A (en) * 2023-03-27 2023-06-27 深圳法政信息技术有限公司 An application method of cloud evidence room in notary office based on block chain technology

Similar Documents

Publication Publication Date Title
US11218477B2 (en) Encryption key updates in wireless communication systems
US11323421B2 (en) Method and apparatus for encoding security status information
US7487353B2 (en) System, method and program for protecting communication
US9590954B2 (en) Transferring encrypted and unencrypted data between processing devices
US8458461B2 (en) Methods and apparatus for performing authentication and decryption
US6052466A (en) Encryption of data packets using a sequence of private keys generated from a public key exchange
CN113783691A (en) Hardware accelerated payload filtering in secure communications
CN102088441B (en) Data encryption transmission method and system for message-oriented middleware
CN114499857B (en) Method for realizing data correctness and consistency in encryption and decryption of large data quanta
CN111556004A (en) Hybrid dual network encryption system
CN113221146A (en) Method and device for data transmission between block chain nodes
CN114826748B (en) Audio and video stream data encryption method and device based on RTP, UDP and IP protocols
CN114124350A (en) A Consensus Algorithm to Improve Performance in a Heterogeneous Network Environment
CN119052231A (en) Lightweight file transmission method, system, storage medium and electronic equipment
CN110417804B (en) Bidirectional identity authentication encryption communication method and system suitable for single-chip microcomputer implementation
KR20040083794A (en) encryption/decryption method of application data
CN113726507B (en) Data transmission method, system, device and storage medium
JPWO2004105310A1 (en) ENCRYPTION DEVICE, ENCRYPTION METHOD, AND ENCRYPTION PROGRAM
TW202031009A (en) A double encryption and decryption system
CN109951434A (en) A highly robust real-time encryption and decryption method for industrial communication protocols
CN113037732B (en) Multi-user security encryption de-duplication method based on wide area network scene
EP4250158A1 (en) System and method for managing data-file transmission and access right to data files
CN117318930A (en) Encryption transmission method, equipment and storage medium for serial data
EP2005641B1 (en) Binding/combining of plural telecommunications functions
CN111741022A (en) Ultra-large file return based on one-way data import equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220301