CN114124350A - Consensus algorithm for improving performance in network heterogeneous environment - Google Patents

Consensus algorithm for improving performance in network heterogeneous 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
equal
request
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. 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.
2. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 1, wherein: 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.
3. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 2, wherein: each group of preset keys in the S11 has an index number, and the preset algorithm is as follows: n { (N &0x 07)% 5}, where N is a key index and N is a random number.
4. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 2, wherein: the specific operation steps for 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.
5. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 1, wherein: what is done when the flow packed in S2 is decoupled is a BFT consensus algorithm inside the partition unit.
6. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 1, wherein: the partition unit includes information such as: 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.
7. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 6, wherein: the stateRoot represents a hash value of data transmission in each state, 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.
8. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 1, wherein: the specific analysis step of decompression 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;
s32, 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;
s33, 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.
9. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 8, wherein: the finding that the channel condition is below the predetermined threshold comprises: and when the CQ value is FALSE, the decompression end judges that the channel condition is lower than a preset threshold value.
10. The consensus algorithm for improving performance in a network heterogeneous environment according to claim 9, wherein: the finding that the channel condition is above the predetermined threshold comprises: 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 preset threshold value.
CN202111330146.9A 2021-11-11 2021-11-11 Consensus algorithm for improving performance in network heterogeneous environment Pending CN114124350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111330146.9A CN114124350A (en) 2021-11-11 2021-11-11 Consensus algorithm for improving performance in network heterogeneous environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111330146.9A CN114124350A (en) 2021-11-11 2021-11-11 Consensus algorithm for improving performance in network heterogeneous 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 Consensus algorithm for improving performance in network heterogeneous environment

Country Status (1)

Country Link
CN (1) CN114124350A (en)

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

Similar Documents

Publication Publication Date Title
US11323421B2 (en) Method and apparatus for encoding security status information
US11218477B2 (en) Encryption key updates in wireless communication systems
US9590954B2 (en) Transferring encrypted and unencrypted data between processing devices
US6052466A (en) Encryption of data packets using a sequence of private keys generated from a public key exchange
EP0464562B1 (en) Method and apparatus for decryption of an information packet having a format subject to modification
US20070162957A1 (en) Methods, systems and devices for securing supervisory control and data acquisition (SCADA) communications
US20090089574A1 (en) System, method and program for protecting communication
CN114499857B (en) Method for realizing data correctness and consistency in encryption and decryption of large data quanta
RU2147793C1 (en) Method for decryption of repeated data packet in confidential communication system
CN115118526B (en) VR device data migration method
CN114124350A (en) Consensus algorithm for improving performance in network heterogeneous environment
CN101421973B (en) Method and device for plural telecommunications functions having sharing transaction(s)
KR20040083794A (en) encryption/decryption method of application data
JP4631423B2 (en) Message authentication method, message authentication apparatus and message authentication system using the authentication method
WO2007103222A2 (en) Methods, systems and devices for securing supervisory control and data acquisition (scada) communications
TW202031009A (en) A double encryption and decryption system
JPWO2004105310A1 (en) ENCRYPTION DEVICE, ENCRYPTION METHOD, AND ENCRYPTION PROGRAM
CN112333204B (en) 5G network transmission security device based on TCP IP protocol disorder feature code
EP2005641B1 (en) Binding/combining of plural telecommunications functions
Guštin CAN Bus Security protocol specification
EP1226679A1 (en) Communication protocol for secure communications systems
CN113037732A (en) Multi-user security encryption de-duplication method based on wide area network scene
CN117176831A (en) Controller network communication method, system, equipment and medium

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