CN116963077A - Block chain slicing method for spectrum transaction - Google Patents

Block chain slicing method for spectrum transaction Download PDF

Info

Publication number
CN116963077A
CN116963077A CN202310827385.8A CN202310827385A CN116963077A CN 116963077 A CN116963077 A CN 116963077A CN 202310827385 A CN202310827385 A CN 202310827385A CN 116963077 A CN116963077 A CN 116963077A
Authority
CN
China
Prior art keywords
node
transaction
nodes
slice
spectrum
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
CN202310827385.8A
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.)
Beijing Jiaotong University
Original Assignee
Beijing Jiaotong University
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 Beijing Jiaotong University filed Critical Beijing Jiaotong University
Priority to CN202310827385.8A priority Critical patent/CN116963077A/en
Publication of CN116963077A publication Critical patent/CN116963077A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W16/00Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
    • H04W16/02Resource partitioning among network components, e.g. reuse partitioning
    • H04W16/10Dynamic resource partitioning
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/009Security arrangements; Authentication; Protecting privacy or anonymity specially adapted for networks, e.g. wireless sensor networks, ad-hoc networks, RFID networks or cloud networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/66Trust-dependent, e.g. using trust scores or trust relationships
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W16/00Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
    • H04W16/14Spectrum sharing arrangements between different networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention provides a block chain slicing method for spectrum transaction. The method comprises the following steps: setting a spectrum block chain double-layer slicing system, wherein the bottom layer slicing block chain consists of a plurality of slices, each slicing transaction is processed respectively, the upper layer slicing block chain consists of a high-layer node, and a global ledger of the spectrum block chain system is maintained; dividing the transaction into corresponding fragments according to the address of the transaction submitting node based on the account model, and performing processing verification by utilizing multi-master node practical Bayesian-busy consensus; and carrying out self-adaptive dynamic adjustment on the intra-slice transaction load and the cross-slice transaction duty ratio slices, and triggering slice reconfiguration after the number of the slices to be adjusted exceeds a threshold value. The method can reduce the proportion of the cross-fragment spectrum transaction, and efficiently process the intra-fragment spectrum transaction and the cross-fragment spectrum transaction, so as to improve the transaction processing speed and throughput and ensure the real-time performance and the safety of the spectrum transaction.

Description

Block chain slicing method for spectrum transaction
Technical Field
The invention relates to the technical field of mobile communication, in particular to a block chain slicing method for spectrum transaction.
Background
With the large-scale commercial use of the Fifth Generation mobile communication system (5G) in the world, the wireless communication traffic presents a surge situation, while the Sixth Generation mobile communication system (6G) puts higher demands on the wireless communication technology, for example, the peak rate reaches 100 Gbit/s-1 Tbit/s, the communication delay is 0.1ms, the number of connection devices per cubic meter is hundreds, and the like, the frequency spectrum is generally increased by 10-100 times as a scarce resource, and the supply and demand contradiction between the two seriously hinders the high-speed development of the wireless mobile communication technology, so that we are driven to further improve the spectrum resource management mode.
The spectrum management technology based on the blockchain can effectively solve the potential safety hazard brought by centralized spectrum management, is applied to spectrum sharing with the advantages of safety, fairness and transparency, can ensure the safety and privacy of spectrum sharing among multiple nodes under the condition that an untrusted spectrum agency does not exist, and permanently records spectrum transaction data on a distributed account book maintained by a blockchain consensus node. The spectrum transaction introduced into the blockchain has performance bottleneck problems, and system throughput, storage capacity, computational power overhead and the like are always limiting factors that the blockchain cannot be applied on a large scale. The 6G-oriented mobile communication network provides higher requirements for transaction processing capacity, throughput and storage capacity of a blockchain system, and is oriented to massive business demands of future mobile communication, the demands of various businesses on spectrum resources are changed when the demands are also presented, such as eMBB, URLLC, mMTC, the scene of spectrum use can be changed at any time, and the real-time demands on spectrum transactions are higher and higher, so that the blockchain expansibility problem aiming at spectrum transactions is urgently solved.
The slicing technology is considered as an effective solution capable of solving the problem of blockchain throughput, and the core idea is to divide and cure the solution, divide all nodes in a blockchain network into different groups, each group is called a slice, and allocate tasks to different slices, and process different tasks in parallel among the slices, and mainly divide the tasks into network slices, transaction slices and state slices. However, for the spectrum block chain, the research of the slicing technology is still in a starting stage, and no practical floor application exists. Currently, in the slicing schemes in the prior art, there are slicing based on regions, random slicing, slicing based on reputation values, and the like. Scholars propose a blockchain spectrum sharing scheme based on small area division, which reduces delay by reducing the duty ratio of the number of block acknowledgements within a certain range; the learner puts forward an Elastic slicing scheme based on a random slicing strategy, and divides the miner nodes into a plurality of committees, and each committee processes disjoint tasks in parallel to improve transaction throughput; a scholars put forward a fragmenting method based on reputation grades, and the security problem caused by malicious node aggregation in a single partition in the existing fragmenting scheme is solved by reducing the difference of reputation grade distribution of each fragmenting node. In the existing cross-slice processing protocol, there are OmniLedger, rapidChain, monoxide as a main-stream slice protocol. The method is easy to generate security problems, and needs to broadcast to the whole network when performing cross-fragment transaction decoupling processing, so that unnecessary communication overhead is generated; a scholars put forward a rapidcircuit slicing method, nodes convert a cross-slice transaction into an on-slice transaction for processing according to routing of a routing table, the complexity of slicing communication is reduced, and when the network scale is large, the method can cause higher processing delay of the cross-slice transaction; the scholars put forward a monoside fragmentation method, the method divides a network into a plurality of asynchronous consensus areas, and a final atomicity technology of cross-regional transactions is put forward to efficiently process cross-fragment transactions, so that the expandability of the system is improved, but the final atomicity can cause larger cross-fragment transaction delay.
The above-mentioned drawbacks of the prior art region-based slicing method include: according to the region-based slicing method in the prior art, the positions of nodes are used as dividing basis, the nodes in a certain region form a slice and a slicing account book is maintained, but the nodes are always in the slice after being added into a certain slice, and the slice is invalid due to the fact that malicious nodes are easily gathered due to the fact that the nodes are fixed in the slice, so that the safety of the whole block chain system is affected, and the performance difference of the nodes and the cross-slice spectrum transaction are not considered in the slicing method.
The random slicing-based method in the prior art utilizes a random function to randomly select node groups to be sliced, thereby ensuring the randomness of slicing, reducing the aggregation probability of malicious nodes and enhancing the security to a certain extent; the node credit value-based partitioning method divides nodes by utilizing the node credit value, prevents malicious nodes from gathering by considering node performance differences, and guarantees partition consensus safety. The spectrum transaction is still faced with a series of problems of random change of transaction requirements, high transaction real-time requirement, harmful interference to adjacent nodes caused by the spectrum transaction, and the like, and the fragmentation mechanism is difficult to be directly applied to the spectrum transaction scene.
Disclosure of Invention
The embodiment of the invention provides a block chain slicing method for spectrum transaction, which is used for effectively ensuring the real-time performance and the safety of spectrum transaction.
In order to achieve the above purpose, the present invention adopts the following technical scheme.
A blockchain slicing method for spectrum-oriented transactions, comprising:
step S1, setting a spectrum block chain double-layer segmentation system which consists of a bottom layer segmentation block chain and an upper layer segmentation block chain, wherein the bottom layer segmentation block chain consists of a plurality of segments, nodes with different identities are arranged in each segment, the nodes in the segments maintain self segmentation account books, the spectrum transactions in the segments are processed, the upper layer segmentation block chain consists of high-layer nodes, the global account books of the spectrum block chain system are maintained, and the global state of the system is recorded;
s2, carrying out transaction segmentation on the transaction in the system based on the account model, dividing the transaction into corresponding segments according to the transaction submitting node address, carrying out processing verification, updating the node performance state according to the node transaction response, communication and common behavior characteristics after each round of transaction is completed, and storing the node performance state in a node state information base;
and S3, monitoring the intra-slice load by a high-level node, adjusting the slices and synchronizing data when the slice load exceeds a certain threshold, calculating the slice-crossing transaction ratio, migrating the node when the slice-crossing transaction ratio exceeds a certain threshold, triggering the slice reconfiguration when the number of the slices to be adjusted exceeds the threshold, and sending a request to a slice management node for the slice reconfiguration.
Preferably, the spectrum blockchain double-layer slicing system comprises a super node, a slicing management node, a preprocessing node, a high-level node, a key node and a common node, wherein the super node bears a wireless environment map REM and is used for constructing a transaction map and storing wireless environment information and node performance state information; the preprocessing node is used for transaction matching and assistance in validity verification; the slicing management node is used for slicing management work and comprises slicing initialization, slicing node adjustment and reconfiguration; the high-level nodes are selected by the partition management node according to a certain rule, and each high-level node forms an upper-level partition maintaining the global state and is used for maintaining the global block, spectrum cross-partition transaction processing and dynamic partition management and state synchronization; the key nodes are used for transaction consensus in the slice, intra-slice data synchronization and inter-slice communication; the common node is used for generating spectrum trade according to own spectrum use requirement or available spectrum resources.
Preferably, the step S1 includes:
s1-1: before every n epoch periods of the blockchain system start, the super node accesses REM to acquire the latest node state information and transaction data, updates a network node topological graph, brings newly added nodes into the slicing system, cleans nodes which exit the network, and updates the transaction graph;
S1-2: the segmentation management node initiates a segmentation information acquisition application to the super node, and the super node sends the constructed transaction map to the segmentation management node;
s1-3: dividing nodes by the partition management node according to the spectrum transaction map, wherein the dividing comprises the steps of determining the number of the partitions, selecting a center node and expanding the partitions;
after the first round of division is finished, the system selects nodes added with a plurality of fragments at the same time, recalculates the weight sum of all neighbor nodes of the fragments where the nodes are positioned, selects the weight sum of the largest fragment to be added, deletes the nodes in other fragments, updates the average performance of all nodes in the fragments, sorts the nodes which do not belong to any fragments according to the performance states from high to low, adds the node with the highest performance state to the fragment with lower average performance, and pushes the nodes to finish the division of all nodes;
s1-4: before each round of consensus period starts, the key node is selected by the system according to the behavior and performance of the key node, the evaluation score is updated after each round of consensus period ends, and roles of the key node and the common node are dynamically adjusted;
s1-5: and the initialization stage of the double-layer slicing system is completed, each slicing forms a bottom-layer slicing system, nodes in the slicing maintain self-slicing account books, high-layer nodes form an upper-layer slicing system, and the high-layer nodes maintain global account books.
Preferably, the step S1-1 includes:
(1) The super node updates transaction map information in each epoch period, accesses the wireless environment map to acquire transaction data, node state information and interference relation among nodes, and builds a blockchain network topology state map;
(2) Determining whether an edge exists according to the transaction relation among the nodes, determining the weight of the edge, and constructing a transaction map, wherein the transaction map is expressed as follows:
G=<V,E> (15)
in the above formula, G represents a transaction graph, V represents all nodes in the transaction graph, E represents edges between nodes in the transaction graph, and the nodes are represented as:
V={v i |i=1,2,...,N} (16)
in the above, v i Representing node-i, N represents the number of nodes in the system, and the edges are represented as:
E={e i,j |i,j=1,2,...,N;i≠j} (17)
in the above, e i,j Representing the relation between the node-i and the node-j, determining the weight of the edge according to whether the two nodes have a transaction relation and the matching degree of the transaction types, wherein e i,j =e j,i The weight calculation mode is as follows:
e i,j =α*F i,j +β*K i,j +γ*U i,j (18)
wherein, alpha, beta and gamma are weight values, and satisfy alpha+beta+gamma=1, the values are adjusted and set according to the specific spectrum trade condition of the system, F i,j Representing the transaction frequency, K, between node-i and node-j i,j Representing the spectrum trade matching degree between the node-i and the node-j, U i,j Representing the cumulative transaction benefit value between node-i and node-j, e when no transaction relationship exists between nodes i,j =e j,i =0;
(3) After the weight calculation of all the inter-node edges is completed, node weights are calculated, the node weights are expressed as the sum of the weights of all the inter-node edges transacted with the node, and the mathematical expression is as follows:
wherein V (i) represents the weight of the node-i, X represents the set of all the nodes transacted with the node-i, and the super node completes the construction of the transaction map.
Preferably, the step S1-3 includes:
the partition management node determines a central node according to the weight of each node in the transaction map, the number of the partitions is the number of the central nodes, when the weight of a certain node is greater than the weight of all neighbor nodes, the node is selected as the central node, and the mathematical expression is as follows:
in the above, S center V (i) and V (j) respectively represent weights of node-i and node-j for a central node set, X represents a neighbor node set of node-i, M min and Mmax Representing the minimum and maximum number of slices.
The segments are expanded after the central node is determined, node attribution is determined according to the relation of edges between the rest nodes and the central node, the central node sequentially traverses the neighbor nodes according to the weight value of the edge between the central node and the neighbor nodes, and when the node-k is located in the segment M i When the sum of the weights of the edges between all the neighboring nodes-j of the middle node-k exceeds a certain threshold value, the neighboring nodes-k are divided into fragments M i The mathematical expression is as follows:
wherein ,for the segment M i Set of intermediate nodes, θ th Is the home threshold.
Preferably, the step S1-4 includes:
the key nodes are selected by the system according to the behavior and performance before each round of consensus period starts, the evaluation score is updated after each round of consensus period ends, and roles of the key nodes and the common nodes are dynamically adjusted;
selecting high-level nodes meeting the conditions according to the node energy storage capacity, the processing capacity and the integrity, calculating a performance weighted cumulative sum, sequentially selecting the highest node as a high-level node leader, and adopting the following calculation formula:
S senior =s 1 *m i +s 2 *h i +s 3 *p i (22)
in the above, s 1 、s 2 S, s 3 Is a weight value and satisfies s 1 +s 2 +s 3 =1,m i Representing the storage capacity of the node, h i Representing node integrity, p i Representing node processingCapability, the values of which are normalized;
selecting all system high-level nodes meeting the requirements based on the calculation result to form global fragments, and adding the global fragments into each fragment;
the partition management node selects each partition key node according to the node verification capability, the accumulated benefit value and the transaction response rate, and the key node election mode is as follows:
S Leader =k 1 *u i +k 2 *v i +k 3 *r i (23)
In the above, k 1 、k 2 And k 3 Is a weight value and satisfies k 1 +k 2 +k 3 =1,u i Representing the accumulated benefit value of the node, v i Representing node verification capability, r i And the node transaction response rate is represented, and the values of the node transaction response rate are normalized.
Preferably, the step S2 includes:
the method comprises the steps of improving a PBFT algorithm, providing a Bayesian-preemptive-bargaining algorithm MPPT based on multiple master nodes, finishing verification and confirmation of the nodes to spectrum transaction data in the same stage, changing a master node selection mode, enabling the master nodes to be acted by high-level nodes and key nodes, enabling other nodes to be auxiliary nodes, starting a view switching protocol when the co-bargaining fails, sending an application of re-selecting the master nodes to a fragmentation management node, and preparing a new round of co-bargaining protocol, wherein the MPPT algorithm comprises five stages: a request phase, a preparation phase, a validation phase, a verification phase, and a response phase:
a request stage: the client sends a request message to the key node, wherein the request message is in the format of < request, t, e, s, c >, the request is a message requested by the client, t represents a time stamp, the sequence requested by the client is checked through the time stamp, c is the number of the client, e is an expense sequence number, and s is a spectrum authorization sequence number;
the preparation stage: the key node receives < request, t, e, s, c > sent by the client, packages the requests sent by the client into blocks and sorts the blocks, distributes a sequence number n and calculates a transaction identifier, broadcasts a preparation message to all the auxiliary nodes in the group and attaches a digital signature, and the format of the preparation message is as follows: the method is characterized in that the method comprises the steps of < preparation, v, h, n, k, d > q, request >, v is a view number, h is a block height, n represents a transaction sequence, k is the situation of the current fragment node, d is a transaction identifier, and q is a digital signature. The transaction identifier is obtained by hash calculation of transaction occurrence time, transaction department fragment number, account addresses of both transaction sides, expense serial numbers and spectrum authorization serial numbers, and once transaction related information is tampered with, the hash value is changed, and the method is expressed as follows:
Wherein H represents a hash function, w i Wallet address, m, representing both nodes of transaction-i i Representing the fragment number of the transaction-i;
and (3) a confirmation stage: after receiving the preparation message, the secondary node checks whether the transaction identifier of the request is identical to d, whether the view number v is identical to the current view number, whether the block height is the current block chain height value plus 1, and then verifies the block content, wherein the verification result message format is < commit, v, h, n, r, i >, q >, r is a block verification result, h is a block height, i is the current secondary node number, signs the verification result, and sends the signed verification result to the key node and the high-level node respectively, and the node number is related to the current epoch, the fragment number, the public key hash and the IP address, and is expressed as follows:
i=H(E,M,K,IP) (25)
wherein E is the current epoch period, M is the fragment number where the node is located, K represents the node public key hash, and IP represents the node network address;
and (3) a checking stage: the key node and the high-level node carry out result aggregation after receiving the same verification results of 2f+1 different slave nodes, the verification result message format is < check, v, n, a, j >, q >, a is an aggregation verification result, j is an aggregation number of correct verification node numbers, the verification processing result is signed, the signed verification result is sent to the slave node, and the aggregation verification result is expressed as follows:
wherein ,ri Q is the verification result of each node i For the digital signature of each node, n correctly verified node number, i k The number of each correct verification node is given;
and (3) a response stage: when the duplicate nodes receive the same aggregation verification results from the key nodes and the higher-level nodes, the duplicate nodes indicate that the block can be submitted in a chain, transaction contents in the block are recorded in a local account book, the client is replied, the replied message is in the format of < reply, t, c, j, a >, and when the client receives 2f+1 valid signatures from different duplicates and the same aggregation verification results, the consensus is finished;
when the aggregation verification results of the key node and the high-level node are inconsistent, and cannot be correctly identified or are still not identified for a certain time, the high-level node can initiate a view switching protocol and send an aggregation verification to the identified nodes, each identified node verifies, if any node receives 2f+1 node verification passing messages, the view switching protocol is responded, key node selection is carried out again according to the performance state of each node of the system at the moment, and a new round of the identified protocol is prepared; if the verification fails, the higher-layer node is considered to have illegal actions, the key node starts the view switching protocol, sends an application for reselecting the higher-layer node to the fragmentation management node, and prepares a new round of consensus protocol.
Preferably, the step S2 further includes: spectrum trade consensus flow:
s2-1: the buyer node submits a frequency spectrum transaction application to the on-chip key node according to the pre-transaction matching result, wherein the application information comprises transaction matching information and node numbers;
s2-2: dividing the transaction into an intra-chip transaction and a cross-chip transaction by the intra-chip key node according to whether the transaction two parties are positioned in the same chip or not, wherein the cross-chip transaction is forwarded to a high-level node for processing verification;
s2-3: after a certain number of transaction requests are received by a key node, firstly ordering the transactions, and after verification, assisting in completing validity verification of transaction information by a preprocessing node, wherein the validity verification comprises transaction format, transaction node validity, transaction time, expense sequence number and spectrum authorization sequence number, and calculating a unique identifier of the transaction, a high-level node refers to an upper-level sliced block chain for a sliced transaction, processes and verifies the sliced transaction based on assistance of the preprocessing node, and returns a result to the key node of the sliced transaction where both sides of the transaction are located after verification;
s2-4: the key node generates a new block and packages legal transactions into the block according to a certain rule, creates an intra-chip transaction and a cross-chip transaction merck tree in the block body respectively, attaches a digital signature and broadcasts the block to other nodes in the chip;
S2-5: each verification node receives the broadcast information of the key node and then executes an MPPT (maximum power point tracking) consensus algorithm to verify the block, wherein the MPPT consensus algorithm comprises block validity verification and transaction content verification, after the consensus is completed, the accounting node records the transaction content completion data in the block into a local account book, and other nodes synchronize the block content;
s2-6: after each node completes data synchronization, the higher-layer node extracts the transaction identifier in the sliced block, compresses the hash value, the time stamp and the transaction related data of the sliced block to form a block abstract, submits the block abstract to the upper-layer sliced block to construct a global block, the upper-layer sliced block executes MPPT consensus after the block is generated to verify the global block, and all the higher-layer nodes perform data synchronization after verification passes.
Preferably, the step S3 includes:
s3-1: the slicing management node sends a slicing scheme to slicing nodes, and each node groups slices and maintains a slicing account book;
s3-2: the partition management node monitors each partition load in real time based on the pre-transaction matching result, when a certain partition load exceeds a threshold value, the partition load needs to be adjusted, the partition load is defined as the number of spectrum transactions divided into the partitions, and the mathematical expression is as follows:
Representing slices M i Is the transaction quantity T total Representing the total transaction amount, delta th Representing a transaction load threshold;
s3-3: the high-level management node calculates the cross-slice transaction proportion, and when the ratio of the cross-slice transaction number initiated by the node to other slices to the intra-slice transaction number initiated by the node exceeds a threshold value, the slice adjustment is performed, and the calculation formula is as follows:
T cro /T intra ≥ζ th (28)
in the above, T cro Representing the number of cross-slice transactions initiated by a node to a certain other slice, ζ th Representing the number of intra-chip transactions initiated by a node ζ th The transaction load threshold is represented, a higher-layer node sends an adjustment request to a fragmentation management node after triggering a fragmentation adjustment protocol, and a high-frequency cross-fragment transaction node is added into fragments which are most frequently connected;
s3-4: the system fragmentation information is updated by the fragmentation management node and broadcast to the high-level nodes, and node state synchronization is carried out on the corresponding fragments;
s3-5: the segmentation management node calculates the segmentation adjustment quantity, and performs segmentation reconfiguration when the segmentation adjustment quantity exceeds a certain threshold value, and the segmentation management node applies transaction map information to the super node again and performs segmentation reconfiguration according to the updated transaction map;
s3-6: and the segmentation management node sends a new segmentation scheme to each system node, and each node performs segmentation repartitioning and reselection of related nodes according to the updated segmentation scheme.
Preferably, the step S3 further includes: triggering a slice adjustment protocol when the single slice is overheated, sending adjustment information to a high-level node of the slice by a slice management node, adjusting the slice node by utilizing a minimum weighted activity number algorithm, wherein the activity number is defined as the transaction number of the slice, the weight is defined as the reciprocal of the slice processing performance, and selecting the slice with the minimum weighted activity number to join according to the product of the activity number and the weight; when the adjusting node is selected, a transaction pair which is highly correlated and relatively independent is selected, and all nodes of the corresponding fragments after node adjustment perform state synchronization on the joining or exiting of the adjusting node.
According to the technical scheme provided by the embodiment of the invention, the block chain slicing mechanism facing the spectrum transaction is designed, so that the slicing mechanism based on the block chain is more suitable for an actual spectrum transaction system and is more suitable for a wireless communication scene. The invention aims to reduce the proportion of the cross-fragment spectrum transaction by the fragmentation mechanism, efficiently process the spectrum transaction in the fragments and the cross-fragment spectrum transaction to improve the transaction processing speed and throughput, improve the capability of the system for resisting security threats such as double-flower attacks, sybil attacks and the like, reduce the storage expense, ensure the instantaneity and the security of the spectrum transaction, keep the fragment dynamics and good activity, and integrally improve the performance of the spectrum block chain system from multiple aspects such as the system throughput, the storage expense, the communication expense and the like.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic architecture diagram of a spectrum block chain dual-layer slicing system according to an embodiment of the present invention;
FIG. 2 is a process flow diagram of a blockchain slicing method for spectrum-oriented transactions according to an embodiment of the present invention;
FIG. 3 is a process flow diagram of a slice initialization stage according to an embodiment of the present invention;
FIG. 4 is a flowchart of a spectrum transaction processing verification process according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an improved PBFT consensus process according to an embodiment of the present invention;
FIG. 6 is a process flow diagram of an adaptive adjustment flow phase provided by an embodiment of the present invention;
Fig. 7 is a fragment initialization information interaction diagram provided in an embodiment of the present invention;
FIG. 8 is a flowchart of a specific information interaction for processing transactions according to an embodiment of the present invention;
FIG. 9 is a flow chart of information interaction in a slice adaptive dynamic adjustment phase according to an embodiment of the present invention;
FIG. 10-a is a schematic diagram of a simulation scenario provided by an embodiment of the present invention, and FIG. 10-b is a schematic diagram of an initial transaction map provided by an embodiment of the present invention;
FIG. 11 is a schematic diagram of a cross-slice transaction duty cycle according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a transaction ratio across a sliced spectrum within 60s of simulation time (30 times out of a block);
FIG. 13 is a schematic diagram of transaction communication overhead according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of an average transaction delay provided by an embodiment of the present invention;
fig. 15 is a schematic diagram of system throughput according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present invention and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or coupled. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including 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. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
For the purpose of facilitating an understanding of the embodiments of the invention, reference will now be made to the drawings of several specific embodiments illustrated in the drawings and in no way should be taken to limit the embodiments of the invention.
An architecture diagram of a dual-layer system for partitioning a spectrum block chain according to an embodiment of the present invention is shown in fig. 1, where the system is composed of a bottom layer partition block chain and an upper layer partition block chain. The bottom layer sliced block chain consists of a plurality of slices, nodes with different identities are arranged in each slice, the nodes participate in maintaining the node state consistency of the slice together, processing the spectrum transaction in the slice, the different slices maintain disjoint data account books to realize state slicing, respectively processing the disjoint spectrum transaction in the slice, and effectively improving the transaction throughput of the system. The upper layer of the block chain is composed of high-level nodes selected by the system, a global account book of the spectrum block chain system is maintained, and the global state of the system is recorded.
The high-level nodes exist in the upper-level sliced block chain and the bottom-level sliced block chain at the same time, and the upper-level sliced block chain has two main functions: processing cross-slice transactions and increasing the speed of cross-slice transaction processing. And synchronizing system data and the fragmentation state, reducing the fragmentation state synchronization overhead and time delay, and maintaining the overall safety of the system. Based on a double-layer slicing architecture, the transaction in the same slicing is packaged and broadcasted by a key node of the slicing, a verification node runs a multi-master node PBFT (Practical Byzantine Fault Tolerance, practical Bayesian) consensus protocol, account records are carried out by the key node, blocks are broadcasted to each node in each slicing for data synchronization, and cross-slice transaction is submitted to an upper-layer slicing block chain to be directly processed by a high-layer node. Under the structure, the segmented block storage structure of the embodiment of the invention adopts a separate storage mode to separately store the intra-segment transaction and the inter-segment transaction and respectively construct the merck tree, so that the inter-segment transaction processing and the data synchronization are more efficiently carried out, the global block only constructs one merck tree in the upper-layer segmented block chain, and each leaf node is the abstract information of each segmented block. In order to solve the problem of continuous accumulation of account books, the embodiment of the invention uses the account book pruning technology to check whether the spectrum transaction in all blocks is completed after every n epochs are finished, wherein the completion of the spectrum transaction is defined as the end of the spectrum use of a buyer, the right of the spectrum use is normally returned to a seller node, and if the whole network confirms that the transaction in all blocks before a certain block is completed, the blocks can be safely discarded.
The spectrum block chain double-layer slicing system mainly relates to six types of identity nodes, namely super nodes, slicing management nodes, preprocessing nodes, high-level nodes, key nodes and common nodes. The super node bears REM (Radio Environment Map, wireless environment map) and has stronger information processing capability and information interaction capability, and is responsible for constructing a transaction map and storing detailed state information such as wireless environment information, node performance and the like; the preprocessing node is responsible for transaction matching and assistance in validity verification; the slicing management node is responsible for slicing management work, including slicing initialization, slicing node adjustment and reconfiguration; the high-level nodes are selected by the partition management nodes according to a certain rule, each high-level node forms an upper-level partition maintaining the global state, forms a double-layer partition framework with other partitions, and is responsible for maintaining the global block, spectrum cross-partition transaction processing and dynamic partition management and state synchronization; the key nodes are responsible for transaction consensus within the present shards, intra-shard data synchronization and cross-shard communication. Common nodes may also be referred to as user nodes that generate spectrum transactions based on their own spectrum usage needs or available spectrum resources.
The premise of executing the blockchain segmentation method for spectrum transaction provided by the embodiment of the invention is that a spectrum blockchain system is operated for a period of time, all nodes in a network can pass the verification of the identity authentication node, support the spectrum transaction/transaction auxiliary function, agree to the deployment of a spectrum matching intelligent contract and a segmentation management contract and execute the method strictly according to the contract.
The processing flow of the blockchain slicing method for spectrum transaction provided by the embodiment of the invention is shown in fig. 2, and comprises the following processing steps:
step S10: and a fragmentation initialization stage.
Step S20, a spectrum transaction processing verification stage.
Step S30, a segmentation self-adaptive dynamic adjustment stage.
Specifically, the step S10 includes: the flowchart of the segmentation initialization stage provided by the embodiment of the invention is shown in fig. 3, and mainly comprises the following steps:
s1-1: before every n epoch periods of the blockchain system starts, the super node accesses REM to acquire the latest node state information and transaction data and updates the network node topological graph, and the main purpose of the process is to bring newly added nodes into the slicing system, and simultaneously clean the nodes exiting the network in time and update the transaction graph.
(1) And in each epoch period, the super node updates transaction map information, accesses the wireless environment map to acquire transaction data, node state information and interference relation among nodes, and constructs a blockchain network topology state diagram.
(2) According to the transaction relation among the nodes, whether an edge exists or not can be determined, the weight of the edge is determined, and a transaction map is further constructed and can be expressed as:
G=<V,E> (1)
in the above formula, G represents a transaction graph, V represents all nodes in the transaction graph, and E represents edges between nodes in the transaction graph. Wherein the node can be expressed as:
V={v i |i=1,2,...,N} (2)
in the above, v i Representing node-i, and N represents the number of nodes in the system. "edges" may be expressed as:
E={e i,j |i,j=1,2,...,N;i≠j} (3)
in the above, e i,j Representing the relation between the node-i and the node-j, determining the weight of the edge according to whether the two nodes have transaction relation and the matching degree of the transaction types, wherein e i,j =e j,i . The weight calculation mode is as follows:
e i,j =α*F i,j +β*K i,j +γ*U i,j (4)
wherein, alpha, beta and gamma are weight values and satisfy alpha+beta+gamma=1, the values can be adjusted and set according to the specific spectrum trade condition of the system, F i,j Representing the transaction frequency, K, between node-i and node-j i,j Representing the spectrum trade matching degree between the node-i and the node-j, U i,j Representing the cumulative transaction benefit value between node-i and node-j, e when no transaction relationship exists between nodes i,j =e j,i =0. The transaction frequency, the matching degree and the accumulated transaction benefit value are provided by a node transaction information base in the wireless environment diagram borne by the super node, and the numerical values are normalized. Higher transaction frequencies represent tighter node connections and more frequent transactions. The higher the matching degree is, the more similar the node frequency types are, and the higher the probability of transaction relation occurs. The higher the cumulative transaction benefit value, the better the spectrum transaction between the nodes has on the spectrum usage benefit.
(3) After the weight calculation of all the inter-node edges is completed, node weights are calculated, the node weights are expressed as the sum of the weights of all the inter-node edges which are transacted with the node, and the mathematical expression is as follows:
where V (i) represents the weight of node-i and X represents the set of all nodes transacted with node-i. So far, the super node completes the construction of the transaction map.
S1-2: the segmentation management node initiates a segmentation information acquisition application to the super node, and the super node sends the constructed transaction map to the segmentation management node.
S1-3: the partition management node divides the nodes according to the spectrum transaction map, and mainly comprises the determination of the number of the partitions, the selection of the center node and the expansion of the partitions.
(1) The partition management node determines the center nodes according to the weight of each node in the transaction map, and the number of the partitions is the number of the center nodes. When the weight of a certain node is greater than the weights of all the neighbor nodes, the node is selected as a central node, and the mathematical expression is as follows:
in the above, S center V (i) and V (j) represent weights of node-i and node-j, respectively, and X represents a neighbor node set of node-i, for the center node set. M is M min and Mmax The minimum and maximum number of slices are represented, and can be determined according to actual trade conditions of the spectrum block chain system.
(2) The central node extends the fragments after determining, the node attribution is determined according to the relation of the edges between the rest nodes and the central node, the central node traverses the neighbor nodes according to the weight value of the edges between the central node and the neighbor nodes, and when the node-k and the fragment M are located i When the sum of the weights of the edges between all the neighboring nodes-j of the middle node-k exceeds a certain threshold value, the neighboring node-k is divided into fragments M i The mathematical expression is as follows:
wherein ,for the segment M i Set of intermediate nodes, θ th The attribution threshold value can be specifically set according to the actual transaction condition of the system.
(3) After the first round of division is finished, some nodes are divided into a plurality of slices at the same time based on the expansion method, and some nodes possibly do not belong to any slices, so that the partial nodes need to be de-duplicated or distributed, in order to balance the slice performance and the load, and the partial nodes are divided based on the node performance and the transaction state. Firstly, the system selects a node which is added with a plurality of fragments simultaneously, recalculates the weight sum of all neighbor nodes of the fragments where the node is positioned, selects the maximum fragment addition of the weight sum, and deletes the node in other fragments. And then updating the average performance of all nodes in the fragments, sorting the nodes which do not belong to any fragments according to the performance states from high to low, adding the node with the highest node performance state into the fragment with lower average performance, and pushing the node to finish the division of all the nodes.
S1-4: the key nodes of the system are selected by the system according to the behavior and the performance before the start of each round of consensus period, the evaluation score is updated after the end of each round of consensus period, and the roles of the key nodes and the common nodes are dynamically adjusted so as to adapt to a dynamic network and optimize the consensus performance.
(1) The high-rise node is used as a core component of the system, bears more communication, processing and storage burdens, and simultaneously, in order to avoid the node from threatening malicious behaviors such as system safety or private profit after being configured into the high-rise node by improving the node, the system introduces an integrity evaluation index, selects the high-rise node meeting the conditions according to the node energy storage capacity, the processing capacity and the integrity, then calculates the weighted cumulative sum of the performance, sequentially selects the highest node as a high-rise node leader, and has the following calculation formula:
S senior =s 1 *m i +s 2 *h i +s 3 *p i (8)
in the above, s 1 、s 2 S, s 3 Is a weight value and satisfies s 1 +s 2 +s 3 =1,m i Representing the storage capacity of the node, h i Representing node integrity, p i The node processing capacity is represented, and the values are normalized. The storage capacity can be expressed by combining the storage capacity and the storage speed of the node, and the stronger the storage capacity is, the stronger the capacity of the node for accommodating and reading and writing the blockchain data is; the node reliability represents the weighted sum of the abnormal behavior times of the node and the scoring mean value of other nodes, and the higher the reliability is, the fewer the historical malicious or fault behavior times of the node are; processing power may be characterized by node computing power and network bandwidth, with higher processing power indicating faster processing of blockchain data information by the node. And selecting all system high-level nodes meeting the requirements based on the calculation result of the formula to form global fragments, and adding the global fragments into each fragment.
(2) The partition management node selects each partition key node according to the node verification capability, the accumulated benefit value and the transaction response rate, and the key node election mode is as follows:
S Leader =k 1 *u i +k 2 *v i +k 3 *r i (9)
in the above, k 1 、k 2 And k 3 Is a weight value and satisfies k 1 +k 2 +k 3 =1,u i Representing the accumulated benefit value of the node, v i Representing node verification capability, r i And the node transaction response rate is represented, and the values of the node transaction response rate are normalized. The accumulated benefit value represents the behavior of the node in the spectrum transaction matching process, and the higher the accumulated benefit value is, the higher the spectrum resource utilization rate of the node is and the smaller the transaction interference is caused; the node verification capability represents the behavior of the node in the consensus process, and the more the number of correct consensus times is and the shorter the time is, the stronger the node verification capability is; transaction response rate represents node in spectrum transaction submitting processThe higher the transaction response rate, the more honest the node is, and the fewer the malicious actions that do not submit the transaction according to the spectrum matching result or deliberately do not submit the spectrum transaction occur.
S1-5: so far, the initialization stage of the double-layer slicing system is completed, each slicing forms a bottom-layer slicing system, nodes in the slicing maintain self-slicing account books, high-layer nodes form an upper-layer slicing system, and the high-layer nodes maintain global account books.
Specifically, the step S20 includes: the spectrum transaction processing verification flow provided by the embodiment of the invention is shown in fig. 4.
After the segmentation initialization is completed, transaction segmentation is carried out on the transaction in the system based on the account model, the transaction is divided into corresponding segments according to the transaction submitting node address for processing and verification, and after each round of transaction is completed, the node performance state is updated according to the node transaction response, communication, consensus and other behavior characteristics and is stored in a node state information base in REM. In the double-layer slicing architecture, a high-layer node in the upper-layer slicing stores all data information of the whole network, so that the high-layer node can refer to the cross-slice transaction to the upper-layer blockchain for processing verification, and larger cross-slice communication expenditure is avoided by converting the cross-slice transaction into an intra-slice transaction, the time delay of the cross-slice transaction is reduced, and the instantaneity of spectrum transaction is ensured.
(1) Spectrum transaction consensus algorithm design
Fig. 5 is a flowchart of an improved PBFT consensus process according to an embodiment of the present invention. Compared with other consensus mechanisms, the PBFT consensus algorithm can provide better performance, but the classical PBFT consensus algorithm has the problems that a selected master node is random, a voting process is complex, a dynamic network is not suitable for the problem and the like, and cannot be directly applied to a spectrum transaction scene. The five stages of the improved algorithm are: a request phase (request), a preparation phase (preparation), a acknowledge phase (commit), a check phase (check), a response phase (reply). The consensus process is shown in fig. 5, and is briefly described as follows:
A request stage: the client sends a request message to the key node, wherein the request message is in the format of < request, t, e, s, c >, wherein the request is a message requested by the client, t represents a timestamp, the sequence of the request of the client can be checked through the timestamp, the client can be prevented from sending multiple requests to the same consensus, c is the number of the client, e is an expense sequence number, s is a spectrum authorization sequence number, and node asset expense certification and spectrum authorization certification have unique hash values as sequence numbers in a certain window period, so that the sources of the requests can be verified and double-flower attacks can be prevented.
The preparation stage: the key node receives < request, t, e, s, c > -from the client, firstly packages the requests from the client into blocks and sorts them, allocates sequence number n and calculates transaction identification, then broadcasts preparation information (including high-level node) to all the auxiliary nodes in the group and attaches digital signature, the format of the preparation information is < preparation, v, h, n, k, d > q, request >, where v is view number, h is block height, n represents transaction sequence, k is the case of the present fragment node, d is transaction identification, q is digital signature. The transaction identifier is obtained by hash calculation of transaction occurrence time, transaction department fragment number, account addresses of both transaction sides, expense serial numbers and spectrum authorization serial numbers, and once transaction related information is tampered with, the hash value is changed, and the method is expressed as follows:
Wherein H represents a hash function, w i Wallet address, m, representing both nodes of transaction-i i Indicating the fragment number where transaction-i is located.
And (3) a confirmation stage: after receiving the preparation message, the secondary node checks whether the transaction identifier of the request is identical to d, whether the view number v is identical to the current view number, whether the block height is the current block chain height value plus 1, then verifies the block content, wherein the verification result message format is < commit, v, h, n, r, i >, q >, r is the block verification result, h is the block height, i is the current secondary node number, signs the verification result, and sends the signed verification result to the key node and the high-level node respectively. The node number is associated with the current epoch, fragment number, public key hash, and IP address, and is expressed as follows:
i=H(E,M,K,IP) (11)
wherein E is the current epoch period, M is the fragment number where the node is located, K represents the node public key hash, and IP represents the node network address.
And (3) a checking stage: the key node and the high-level node aggregate results after receiving the same verification results of 2f+1 different slave nodes, the verification result message format is < check, v, n, a, j >, q >, a is an aggregate verification result, j is an aggregate number of correct verification node numbers, the verification processing result is signed, and the signed verification result is sent to the slave node. The results of the polymerization verification are shown below:
wherein ,ri Q is the verification result of each node i For the digital signature of each node, n correctly verified node number, i k The number of the node is verified for each correct.
And (3) a response stage: when the duplicate nodes receive the same aggregation verification results from the key nodes and the higher-level nodes, the duplicate nodes indicate that the block can be submitted into a chain, transaction contents in the block can be recorded in a local account book, then the client is replied, the replying message is in the format of < reply, t, c, j, a >, and when the client receives 2f+1 valid signatures from different duplicates and the same aggregation verification results, the common identification is finished.
When the aggregation verification results of the key node and the high-level node are inconsistent, and cannot be correctly identified or are still not identified for a certain time, the high-level node can initiate a view switching protocol and send an aggregation verification to the identified nodes, each identified node verifies, if any node receives 2f+1 node verification passing messages, the view switching protocol is responded, key node selection is carried out again according to the performance state of each node of the system at the moment, and a new round of the identified protocol is prepared; if the verification fails, the higher-layer node is considered to have illegal actions, the key node starts the view switching protocol, sends an application for reselecting the higher-layer node to the fragmentation management node, and prepares a new round of consensus protocol.
(2) Spectrum transaction consensus flow
S2-1: and the buyer node submits a frequency spectrum transaction application to the on-chip key node according to the pre-transaction matching result, wherein the application information comprises transaction matching information and node numbers.
S2-2: the intra-slice key node divides the transaction into intra-slice transaction and inter-slice transaction according to whether the transaction two parties are located in the same slice, wherein the inter-slice transaction is forwarded to the high-level node for processing verification.
S2-3: after the key node receives a certain number of transaction requests, firstly ordering the transactions, and then the preprocessing node assists in completing validity verification of transaction information, wherein the validity verification comprises transaction format, transaction node validity, transaction time, spending serial numbers and spectrum authorization serial numbers, and calculates unique identifiers of the transactions. The higher-level node refers to the upper-level sliced block chain for the cross-slice transaction, and also processes and verifies the cross-slice transaction based on the assistance of the preprocessing node, and returns the result to the key node of the slice where both sides of the transaction are located after the verification is passed.
S2-4: the key node generates a new block and packages legal transactions into blocks according to a certain rule, creates an intra-chip transaction and a cross-chip transaction merck tree in the block body respectively, then attaches a digital signature and broadcasts the block to other nodes in the chip.
S2-5: each verification node executes MPPT consensus algorithm to verify the block after receiving the broadcast information of the key node, wherein the MPPT consensus algorithm comprises block validity verification and transaction content verification, and after the consensus is completed, the accounting node records the transaction content completion data in the block into a local account book, and other nodes synchronize the block content.
S2-6: after each node completes data synchronization, the higher-layer node extracts the transaction identification in the segmented block, compresses the hash value, the time stamp and the transaction related data of the segmented block to form a block abstract, submits the block abstract to the upper-layer segmented block to construct a global block, the upper-layer segmented block executes MPPT consensus after the block is generated to verify the global block, and all the higher-layer nodes perform data synchronization after verification.
Specifically, the step S30 includes: a processing flow chart of a self-adaptive adjustment flow stage provided by the embodiment of the invention is shown in fig. 6, wherein after the slicing distribution is completed, a high-level node monitors the intra-slicing load, when the slicing load exceeds a certain threshold value, slicing adjustment is performed, data synchronization is performed, the slicing cross-slice transaction proportion is calculated, when the cross-slice transaction proportion exceeds a certain threshold value, node migration is performed, when the number of the slicing to be adjusted exceeds the threshold value, slicing reconfiguration is triggered, and a request is sent to a slicing management node, so that slicing reconfiguration is performed. The detailed steps at this stage are as follows:
S3-1: the slicing management node sends a slicing scheme to the slicing nodes, and each node groups slices and maintains a slicing ledger.
S3-2: the partition management node monitors each partition load in real time based on the pre-transaction matching result, and when a certain partition load exceeds a threshold value, the partition load needs to be adjusted.
T Mi /T total ≥δ th (13)
In the above, T Mi Representing slices M i Is the transaction quantity T total Representing the total transaction amount, delta th The transaction load threshold is represented and can be adjusted according to the transaction condition of the system. The whole slicing is easy to be jammed due to the overheating of a single slice, and the influence on the performance is farThe performance degradation caused by the cross-slice transaction is exceeded, so the embodiment of the invention solves the problem of single-slice overheating by carrying out slice dynamic adjustment based on load balancing. When the single chip is overheated, triggering a slice adjustment protocol, sending adjustment information to a higher-level node of the slice by a slice management node, adjusting the slice node by utilizing a minimum weighted activity number algorithm, wherein the activity number is defined as the transaction number of the slice, the weight is defined as the reciprocal of the slice processing performance, and selecting the slice with the minimum weighted activity number to join according to the product of the activity number and the weight. When the adjusting nodes are selected, highly-associated and relatively independent transaction pairs are selected as much as possible, so that the increase of the number of cross-slice transactions caused by slice adjustment is reduced, and all the nodes of the corresponding slices after the node adjustment perform state synchronization on the joining or exiting of the adjusting nodes.
S3-3: the high-level management node calculates the cross-slice transaction proportion, and when the ratio of the cross-slice transaction number initiated by the node to other slices to the intra-slice transaction number initiated by the node exceeds a threshold value, the slice adjustment is performed, and the calculation formula is as follows:
T cro /T intra ≥ζ th (14)
in the above, T cro Representing the number of cross-slice transactions initiated by a node to a certain other slice, ζ th Representing the number of intra-chip transactions initiated by a node ζ th And (3) representing a transaction load threshold, triggering a fragmentation adjustment protocol, and then sending an adjustment request to a fragmentation management node by a higher-layer node, and adding the high-frequency cross-fragment transaction node into the most frequently-contacted fragments.
S3-4: and the fragment management node updates the system fragment information and broadcasts the system fragment information to the high-level nodes, and the corresponding fragments are subjected to node state synchronization.
S3-5: the segmentation management node calculates the segmentation adjustment quantity, and performs segmentation reconfiguration when the segmentation adjustment quantity exceeds a certain threshold value, and at the moment, the segmentation management node applies transaction map information to the super node again, and performs segmentation reconfiguration according to the updated transaction map.
S3-6: and the segmentation management node sends a new segmentation scheme to each system node, and each node performs segmentation repartitioning and reselection of related nodes according to the updated segmentation scheme.
Information interaction graph
The entity in the invention mainly comprises common base station nodes (buyers and sellers), super nodes for constructing a transaction map, a fragment management node for executing fragment management, and selected key nodes and high-level nodes. Assuming that the spectrum blockchain system has been running for a period of time, transaction data, node state information and the like of the nodes are stored in the wireless environment map borne by the super nodes.
Information interaction diagram for segmentation initialization stage
The embodiment of the invention provides a fragment initialization information interaction diagram, as shown in fig. 7, in which the initial stage of each epoch is firstly to perform the fragment initialization work, and the information interaction process in the fragment initialization stage is briefly described as follows:
(1) The segmentation management node sends a segmentation auxiliary information application to the super node;
(2) The super node accesses REM to construct a transaction map and returns a response;
(3) The partition management node determines a central node and the number of the partitions according to the transaction map;
(4) The fragmentation management node sends a confirmation request to the central node, and the central node returns a response;
(5) The central node expands the slicing, divide other nodes meeting the condition to this slicing, and return this slicing node information to the slicing management node;
(6) The partition management node sends a node state information application to the super node, calculates a node state value according to the node state information, and selects a high-level node and each partition key node;
(7) The fragmentation management node sends a confirmation request to the high-level node and each fragmentation key node, and the high-level node and each fragmentation key node return a confirmation response;
(8) The high-level node and each sliced key node respectively create and maintain a global ledger/sliced ledger.
Transaction processing verification stage information interaction diagram
The specific information interaction flow for processing a transaction provided by the embodiment of the invention is shown in fig. 8, and the specific processing procedure comprises:
(1) The buyer node submits transaction application information to the on-chip key node;
(2) The key node verifies the basic information of the transaction, broadcasts the on-chip spectrum transaction to the on-chip verification node, and submits the on-chip transaction to the high-level node;
(3) The key node performs sorting and validity verification on the transactions, and the high-level node returns the verification result of the cross-piece transactions to the key node;
(4) The key node generates a new block, packages legal transactions into the block according to a certain rule, and broadcasts the block to other nodes in the segment;
(5) Each verification node verifies the block after receiving the broadcast information of the key node, and after verification, the accounting node records transaction contents in the block in a local account book to finish data link entry, and other nodes synchronize the block contents;
(6) After each node completes data synchronization, the higher-level node extracts the block abstract and submits the block abstract to the upper-level partition to construct a global block, and all the higher-level nodes verify and synchronize the data of the global block.
Information interaction diagram of segmentation self-adaptive dynamic adjustment stage
In the running process of the spectrum block chain system, in order to ensure the load balance of the fragments, maintain the optimal state of the fragments for a long time, reduce the performance loss of the cross-fragment operation, and need to perform self-adaptive dynamic adjustment on the fragments, fig. 9 is a flow chart of information interaction in the stage of self-adaptive dynamic adjustment of the fragments, which is provided by the embodiment of the invention, and is briefly described as follows:
(1) The partition management node confirms a partition scheme to the node, and each partition creates and maintains a local account book;
(2) The segmentation management node monitors and calculates the segmentation load and sends segmentation adjustment information to the higher-level node of the corresponding segmentation, and the corresponding segmentation returns an adjustment response;
(3) The corresponding nodes join (exit) the target (source) fragments, and the high-level nodes exchange the fragments to synchronize the information and send the information to each fragment;
(4) The high-level node calculates the inter-slice node cross-slice transaction proportion, sends an adjustment request to the high-frequency cross-slice node, and the corresponding node performs slice adjustment to join the target slice and returns an adjustment response;
(5) The corresponding nodes join (exit) the target (source) fragments, and the high-level nodes exchange the fragments to synchronize the information and send the information to each fragment;
(6) The segmentation management node calculates the segmentation adjustment quantity and triggers a reconfiguration protocol to carry out global adjustment of the segmentation system;
(7) The segmentation management node applies for updated transaction map information from the super node, updates the system segmentation scheme and broadcasts the system segmentation scheme to the high-level nodes;
the invention aims to reduce communication overhead and transaction delay by reducing the cross-slice transaction proportion, improve the throughput of the system and solve the problem of expandability of a frequency spectrum block chain system, and the simulation analysis is mainly carried out from the following aspects: cross-slice spectrum transaction proportion, communication overhead, average transaction latency, and system throughput.
(1) Simulation scene
The simulation scenario is shown in fig. 10-a, where the simulation area is 20km×20km, the abscissa and ordinate ranges (-10000 m,10000 m), a certain number of blockchain nodes are distributed in the area, the transmission power of each node is 7dBm-30dBm, the number of spectrum owned by each node is 10-40MHz, and there are enough assets to support spectrum transactions. The block size was 4MB, the block out speed was 2 seconds, the transaction arrival rate obeyed the poisson distribution with intensity of 2000 transactions per block out interval, and the simulation time was 60 seconds. Assuming the system has been in operation for a period of time, an initial transaction map may be drawn based on the node transaction relationship, as shown in fig. 10-b.
(2) Cross-slice transaction duty cycle simulation analysis
Fig. 11 is a schematic diagram of a cross-slice transaction ratio provided by the embodiment of the present invention, and fig. 11-a shows that in 100 iterative slicing experiments, the cross-slice spectrum transaction ratio of the proposed slicing mechanism, the regional slicing mechanism and the random slicing mechanism is respectively adopted, the number of nodes is set to 200, the number of slices is set to 4, and the number of transaction generation is 200. The scheme provided by the embodiment of the invention can effectively reduce the cross-slice spectrum transaction ratio, and compared with other two algorithms, the cross-slice spectrum transaction ratio is reduced by about 57%. For more visual contrast observation, fig. 11-b shows cumulative distribution curves of the cross-slice transaction ratio in 100 slicing experiments, wherein the probability of the cross-slice transaction ratio being less than 0.64 is 18% and 30% respectively when a random slicing mechanism and a regional slicing mechanism are adopted, and the probability is 100% when the proposed slicing mechanism is adopted, because the random slicing mechanism and the regional slicing mechanism ignore the influence of node historical transaction information and transaction type on the slicing structure; fig. 12 shows the cross-slice spectrum transaction duty ratio in 60s simulation time (30 times of the total block), and the curve in fig. 12 is in a decreasing trend, because each slice is subjected to cross-slice transaction duty ratio monitoring in the running process of the system so as to perform self-adaptive dynamic adjustment of the slices, and the result shows that the invention can better reduce the cross-slice transaction duty ratio, thereby reducing unnecessary communication overhead and calculation overhead and improving the system performance.
(3) Traffic simulation analysis
The embodiment of the invention simulates the influence of different node numbers and different fragment numbers on the system traffic when 200 transactions are processed. Fig. 13-a compares the impact of different node numbers on transaction communication overhead when the proposed scheme, the regional slicing scheme and the random slicing scheme are respectively adopted, the node number is increased from 100 to 400, and the slicing number is set to be 4. As can be seen from the figure, the system traffic generally increases with the increase of the number of nodes, and the fluctuation of the traffic is caused by different duty ratios of each cross transaction. Fig. 13-b illustrates the effect of different numbers of slices on transaction communication overhead at a given number of system nodes. As can be seen from fig. 13-b, the system traffic decreases with increasing number of slices, since an increasing number of slices results in a decreasing slice size, and the number of nodes involved per transaction decreases. Compared with other methods, the scheme provided by the embodiment of the invention has the advantages that the communication cost of the transaction is at a lower level, and the communication cost caused by spectrum transaction can be effectively reduced.
(4) Transaction time delay simulation analysis
In this simulation experiment, considering the transaction broadcast delay, the transaction processing verification delay and the block verification delay, fig. 14 is a schematic diagram of average transaction delay provided in an embodiment of the present invention. FIG. 14 compares the transaction delays of the proposed fragmentation scheme, regional fragmentation and random fragmentation scheme, and it can be seen from FIG. 14-a that when the number of fragments is fixed, the average transaction delay increases with the increase of the number of nodes, because the increase of the number of nodes brings more transaction broadcast overhead and verification overhead, but the transaction delay of the proposed scheme is still at a lower level compared to other methods; when the number of nodes is fixed in fig. 14-b, the transaction delay is reduced along with the increase of the number of fragments, and finally tends to be horizontal, because the scale of each fragment is reduced along with the increase of the number of fragments under the condition that the cross-fragment ratio is basically unchanged, the transaction broadcasting cost and the verification cost are also reduced, and further the time cost is also reduced.
(5) Transaction throughput simulation analysis
The system transaction throughput is defined as the ratio of the number of transactions processed by the system over the out-block interval. Fig. 15 is a schematic diagram of system throughput provided by the embodiment of the present invention, it can be seen from fig. 15 that when the number of slices is fixed, the system throughput is reduced with the increase of the number of nodes, because the increase of the number of nodes causes the increase of transaction verification delay and communication overhead, and when the number of nodes is 190, the system throughput is respectively improved by 46.7% and 83.5% compared with the regional slicing and random slicing mechanisms; when the number of nodes is fixed, the throughput of the system of the regional slicing scheme and the random slicing scheme is increased along with the increase of the number of the slicing, and then the throughput of the system is increased along with the increase of the number of the slicing, and when the number of the slicing is increased to a certain extent, the number of the cross-slice transactions is increased sharply, and the cross-slice transactions require higher transaction processing time delay, so that the throughput is reduced. When the number of fragments is 4, the system throughput of the regional fragmentation mechanism and the random fragmentation mechanism reaches the maximum value, and compared with the two mechanisms, the system throughput of the proposed fragmentation mechanism is respectively improved by 46% and 73%. According to the scheme provided by the embodiment of the invention, the number of fragments is increased to linearly increase, and when the number of fragments reaches a certain number, the transaction throughput tends to be gentle, because the cross-fragment transaction ratio of the proposed fragmentation mechanism is at a lower level, the fragmentation scale is smaller due to the increase of the number of fragments, the transaction broadcasting and processing verification speed is improved, the throughput of the system is linearly increased, and when the number of fragments reaches a certain number, the cross-fragment ratio is gradually increased, so that the throughput of the system tends to be gentle.
In summary, the invention designs a block chain double-layer slicing architecture for spectrum transaction, wherein the bottom layer slicing can process disjoint spectrum transaction in parallel and maintain a zoned account book, the upper layer can better maintain the global state consistency of a spectrum block chain system, and simultaneously, directly process cross-slice transaction, thereby ensuring the system security and improving the real-time performance of spectrum transaction; according to the method, node division is carried out based on the transaction map and the node performance state, the malicious node aggregation probability can be reduced while the low cross-chip transaction proportion is ensured, and the slicing efficiency and the capacity of resisting the witch attack are improved; the invention designs a practical Bayesian-preemption consensus protocol based on multiple master nodes, which utilizes the participation of the multiple master nodes in consensus to simplify the PBFT consensus process and reduce the consensus communication overhead and the calculation power overhead, thereby improving the transaction processing efficiency, ensuring the safety of spectrum transaction and improving the throughput of the system; the invention designs a spectrum transaction data storage mode aiming at a double-layer slicing architecture, adopts separate storage and compression processing to reduce node storage overhead and improve the capability of resisting double-flower attacks, and introduces an account book trimming technology to periodically process an account book so as to relieve system storage pressure; and finally, carrying out transaction load monitoring and cross-slice duty ratio monitoring based on transaction matching, balancing the slice load by self-adapting dynamic adjustment of slices, reducing the cross-slice transaction proportion, keeping the slice dynamics and good activity, and meeting the random change characteristic of the frequency spectrum transaction requirement.
The slicing mechanism realizes network slicing, transaction slicing and state slicing, can improve the utilization rate of spectrum resources by utilizing spectrum transaction under the condition of not depending on a third party, improves the processing speed and the transaction throughput of spectrum transaction by the slicing mechanism, reduces the storage cost, ensures the safety of a spectrum block chain slicing system and improves the system performance.
Those of ordinary skill in the art will appreciate that: the drawing is a schematic diagram of one embodiment and the modules or flows in the drawing are not necessarily required to practice the invention.
From the above description of embodiments, it will be apparent to those skilled in the art that the present invention may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, with reference to the description of method embodiments in part. The apparatus and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (10)

1. A blockchain slicing method for spectrum-oriented transactions, comprising:
step S1, setting a spectrum block chain double-layer segmentation system which consists of a bottom layer segmentation block chain and an upper layer segmentation block chain, wherein the bottom layer segmentation block chain consists of a plurality of segments, nodes with different identities are arranged in each segment, the nodes in the segments maintain self segmentation account books, the spectrum transactions in the segments are processed, the upper layer segmentation block chain consists of high-layer nodes, the global account books of the spectrum block chain system are maintained, and the global state of the system is recorded;
s2, carrying out transaction segmentation on the transaction in the system based on the account model, dividing the transaction into corresponding segments according to the transaction submitting node address, carrying out processing verification, updating the node performance state according to the node transaction response, communication and common behavior characteristics after each round of transaction is completed, and storing the node performance state in a node state information base;
and S3, monitoring the intra-slice load by a high-level node, adjusting the slices and synchronizing data when the slice load exceeds a certain threshold, calculating the slice-crossing transaction ratio, migrating the node when the slice-crossing transaction ratio exceeds a certain threshold, triggering the slice reconfiguration when the number of the slices to be adjusted exceeds the threshold, and sending a request to a slice management node for the slice reconfiguration.
2. The method of claim 1, wherein the spectrum blockchain dual-layer sharding system comprises super nodes, sharding management nodes, preprocessing nodes, higher-level nodes, key nodes and common nodes, wherein the super nodes bear a wireless environment map REM for constructing a transaction map and storing wireless environment information and node performance state information; the preprocessing node is used for transaction matching and assistance in validity verification; the slicing management node is used for slicing management work and comprises slicing initialization, slicing node adjustment and reconfiguration; the high-level nodes are selected by the partition management node according to a certain rule, and each high-level node forms an upper-level partition maintaining the global state and is used for maintaining the global block, spectrum cross-partition transaction processing and dynamic partition management and state synchronization; the key nodes are used for transaction consensus in the slice, intra-slice data synchronization and inter-slice communication; the common node is used for generating spectrum trade according to own spectrum use requirement or available spectrum resources.
3. The method according to claim 1 or 2, wherein said step S1 comprises:
s1-1: before every n epoch periods of the blockchain system start, the super node accesses REM to acquire the latest node state information and transaction data, updates a network node topological graph, brings newly added nodes into the slicing system, cleans nodes which exit the network, and updates the transaction graph;
S1-2: the segmentation management node initiates a segmentation information acquisition application to the super node, and the super node sends the constructed transaction map to the segmentation management node;
s1-3: dividing nodes by the partition management node according to the spectrum transaction map, wherein the dividing comprises the steps of determining the number of the partitions, selecting a center node and expanding the partitions;
after the first round of division is finished, the system selects nodes added with a plurality of fragments at the same time, recalculates the weight sum of all neighbor nodes of the fragments where the nodes are positioned, selects the weight sum of the largest fragment to be added, deletes the nodes in other fragments, updates the average performance of all nodes in the fragments, sorts the nodes which do not belong to any fragments according to the performance states from high to low, adds the node with the highest performance state to the fragment with lower average performance, and pushes the nodes to finish the division of all nodes;
s1-4: before each round of consensus period starts, the key node is selected by the system according to the behavior and performance of the key node, the evaluation score is updated after each round of consensus period ends, and roles of the key node and the common node are dynamically adjusted;
s1-5: and the initialization stage of the double-layer slicing system is completed, each slicing forms a bottom-layer slicing system, nodes in the slicing maintain self-slicing account books, high-layer nodes form an upper-layer slicing system, and the high-layer nodes maintain global account books.
4. A method according to claim 3, wherein said step S1-1 comprises:
(1) The super node updates transaction map information in each epoch period, accesses the wireless environment map to acquire transaction data, node state information and interference relation among nodes, and builds a blockchain network topology state map;
(2) Determining whether an edge exists according to the transaction relation among the nodes, determining the weight of the edge, and constructing a transaction map, wherein the transaction map is expressed as follows:
G=<V,E> (1)
in the above formula, G represents a transaction graph, V represents all nodes in the transaction graph, E represents edges between nodes in the transaction graph, and the nodes are represented as:
V={v i |i=1,2,...,N} (2)
in the above, v i Representing node-i, N represents the number of nodes in the system, and the edges are represented as:
E={e i,j |i,j=1,2,...,N;i≠j} (3)
in the above, e i,j Representing the relation between the node-i and the node-j, determining the weight of the edge according to whether the two nodes have a transaction relation and the matching degree of the transaction types, wherein e i,j =e j,i The weight calculation mode is as follows:
e i,j =α*F i,j +β*K i,j +γ*U i,j (4)
wherein, alpha, beta and gamma are weight values, and satisfy alpha+beta+gamma=1, the values are adjusted and set according to the specific spectrum trade condition of the system, F i,j Representing transaction frequency between node-i and node-j,K i,j Representing the spectrum trade matching degree between the node-i and the node-j, U i,j Representing the cumulative transaction benefit value between node-i and node-j, e when no transaction relationship exists between nodes i,j =e j,i =0;
(3) After the weight calculation of all the inter-node edges is completed, node weights are calculated, the node weights are expressed as the sum of the weights of all the inter-node edges transacted with the node, and the mathematical expression is as follows:
wherein V (i) represents the weight of the node-i, X represents the set of all the nodes transacted with the node-i, and the super node completes the construction of the transaction map.
5. A method according to claim 3, wherein said step S1-3 comprises:
the partition management node determines a central node according to the weight of each node in the transaction map, the number of the partitions is the number of the central nodes, when the weight of a certain node is greater than the weight of all neighbor nodes, the node is selected as the central node, and the mathematical expression is as follows:
in the above, S center V (i) and V (j) respectively represent weights of node-i and node-j for a central node set, X represents a neighbor node set of node-i, M min and Mmax Representing the minimum and maximum number of slices.
The segments are expanded after the central node is determined, node attribution is determined according to the relation of edges between the rest nodes and the central node, the central node sequentially traverses the neighbor nodes according to the weight value of the edge between the central node and the neighbor nodes, and when the node-k is located in the segment M i All neighbors of intermediate node-kWhen the sum of the weights of the edges between the nodes-j exceeds a certain threshold value, the neighbor node-k is divided into fragments M i The mathematical expression is as follows:
wherein ,for the segment M i Set of intermediate nodes, θ th Is the home threshold.
6. A method according to claim 3, wherein said step S1-4 comprises:
the key nodes are selected by the system according to the behavior and performance before each round of consensus period starts, the evaluation score is updated after each round of consensus period ends, and roles of the key nodes and the common nodes are dynamically adjusted;
selecting high-level nodes meeting the conditions according to the node energy storage capacity, the processing capacity and the integrity, calculating a performance weighted cumulative sum, sequentially selecting the highest node as a high-level node leader, and adopting the following calculation formula:
S senior =s 1 *m i +s 2 *h i +s 3 *p i (8)
in the above, s 1 、s 2 S, s 3 Is a weight value and satisfies s 1 +s 2 +s 3 =1,m i Representing the storage capacity of the node, h i Representing node integrity, p i Representing the processing capacity of the node, and normalizing the values of the processing capacity;
selecting all system high-level nodes meeting the requirements based on the calculation result to form global fragments, and adding the global fragments into each fragment;
the partition management node selects each partition key node according to the node verification capability, the accumulated benefit value and the transaction response rate, and the key node election mode is as follows:
S Leader =k 1 *u i +k 2 *v i +k 3 *r i (9)
In the above, k 1 、k 2 And k 3 Is a weight value and satisfies k 1 +k 2 +k 3 =1,u i Representing the accumulated benefit value of the node, v i Representing node verification capability, r i And the node transaction response rate is represented, and the values of the node transaction response rate are normalized.
7. A method according to claim 3, wherein said step S2 comprises:
the method comprises the steps of improving a PBFT algorithm, providing a Bayesian-preemptive-bargaining algorithm MPPT based on multiple master nodes, finishing verification and confirmation of the nodes to spectrum transaction data in the same stage, changing a master node selection mode, enabling the master nodes to be acted by high-level nodes and key nodes, enabling other nodes to be auxiliary nodes, starting a view switching protocol when the co-bargaining fails, sending an application of re-selecting the master nodes to a fragmentation management node, and preparing a new round of co-bargaining protocol, wherein the MPPT algorithm comprises five stages: a request phase, a preparation phase, a validation phase, a verification phase, and a response phase:
a request stage: the client sends a request message to the key node, wherein the request message is in the format of < request, t, e, s, c >, the request is a message requested by the client, t represents a time stamp, the sequence requested by the client is checked through the time stamp, c is the number of the client, e is an expense sequence number, and s is a spectrum authorization sequence number;
The preparation stage: the key node receives < request, t, e, s, c > sent by the client, packages the requests sent by the client into blocks and sorts the blocks, distributes a sequence number n and calculates a transaction identifier, broadcasts a preparation message to all the auxiliary nodes in the group and attaches a digital signature, and the format of the preparation message is as follows: the method is characterized in that the method comprises the steps of < preparation, v, h, n, k, d > q, request >, v is a view number, h is a block height, n represents a transaction sequence, k is the situation of the current fragment node, d is a transaction identifier, and q is a digital signature. The transaction identifier is obtained by hash calculation of transaction occurrence time, transaction department fragment number, account addresses of both transaction sides, expense serial numbers and spectrum authorization serial numbers, and once transaction related information is tampered with, the hash value is changed, and the method is expressed as follows:
wherein H represents a hash function, w i Wallet address, m, representing both nodes of transaction-i i Representing the fragment number of the transaction-i;
and (3) a confirmation stage: after receiving the preparation message, the secondary node checks whether the transaction identifier of the request is identical to d, whether the view number v is identical to the current view number, whether the block height is the current block chain height value plus 1, and then verifies the block content, wherein the verification result message format is < commit, v, h, n, r, i >, q >, r is a block verification result, h is a block height, i is the current secondary node number, signs the verification result, and sends the signed verification result to the key node and the high-level node respectively, and the node number is related to the current epoch, the fragment number, the public key hash and the IP address, and is expressed as follows:
i=H(E,M,K,IP) (11)
Wherein E is the current epoch period, M is the fragment number where the node is located, K represents the node public key hash, and IP represents the node network address;
and (3) a checking stage: the key node and the high-level node carry out result aggregation after receiving the same verification results of 2f+1 different slave nodes, the verification result message format is < check, v, n, a, j >, q >, a is an aggregation verification result, j is an aggregation number of correct verification node numbers, the verification processing result is signed, the signed verification result is sent to the slave node, and the aggregation verification result is expressed as follows:
wherein ,ri Q is the verification result of each node i For the digital signature of each node, n correctly verified node number, i k The number of each correct verification node is given;
and (3) a response stage: when the duplicate nodes receive the same aggregation verification results from the key nodes and the higher-level nodes, the duplicate nodes indicate that the block can be submitted in a chain, transaction contents in the block are recorded in a local account book, the client is replied, the replied message is in the format of < reply, t, c, j, a >, and when the client receives 2f+1 valid signatures from different duplicates and the same aggregation verification results, the consensus is finished;
when the aggregation verification results of the key node and the high-level node are inconsistent, and cannot be correctly identified or are still not identified for a certain time, the high-level node can initiate a view switching protocol and send an aggregation verification to the identified nodes, each identified node verifies, if any node receives 2f+1 node verification passing messages, the view switching protocol is responded, key node selection is carried out again according to the performance state of each node of the system at the moment, and a new round of the identified protocol is prepared; if the verification fails, the higher-layer node is considered to have illegal actions, the key node starts the view switching protocol, sends an application for reselecting the higher-layer node to the fragmentation management node, and prepares a new round of consensus protocol.
8. The method of claim 7, wherein said step S2 further comprises: spectrum trade consensus flow:
s2-1: the buyer node submits a frequency spectrum transaction application to the on-chip key node according to the pre-transaction matching result, wherein the application information comprises transaction matching information and node numbers;
s2-2: dividing the transaction into an intra-chip transaction and a cross-chip transaction by the intra-chip key node according to whether the transaction two parties are positioned in the same chip or not, wherein the cross-chip transaction is forwarded to a high-level node for processing verification;
s2-3: after a certain number of transaction requests are received by a key node, firstly ordering the transactions, and after verification, assisting in completing validity verification of transaction information by a preprocessing node, wherein the validity verification comprises transaction format, transaction node validity, transaction time, expense sequence number and spectrum authorization sequence number, and calculating a unique identifier of the transaction, a high-level node refers to an upper-level sliced block chain for a sliced transaction, processes and verifies the sliced transaction based on assistance of the preprocessing node, and returns a result to the key node of the sliced transaction where both sides of the transaction are located after verification;
s2-4: the key node generates a new block and packages legal transactions into the block according to a certain rule, creates an intra-chip transaction and a cross-chip transaction merck tree in the block body respectively, attaches a digital signature and broadcasts the block to other nodes in the chip;
S2-5: each verification node receives the broadcast information of the key node and then executes an MPPT (maximum power point tracking) consensus algorithm to verify the block, wherein the MPPT consensus algorithm comprises block validity verification and transaction content verification, after the consensus is completed, the accounting node records the transaction content completion data in the block into a local account book, and other nodes synchronize the block content;
s2-6: after each node completes data synchronization, the higher-layer node extracts the transaction identifier in the sliced block, compresses the hash value, the time stamp and the transaction related data of the sliced block to form a block abstract, submits the block abstract to the upper-layer sliced block to construct a global block, the upper-layer sliced block executes MPPT consensus after the block is generated to verify the global block, and all the higher-layer nodes perform data synchronization after verification passes.
9. A method according to claim 3, wherein said step S3 comprises:
s3-1: the slicing management node sends a slicing scheme to slicing nodes, and each node groups slices and maintains a slicing account book;
s3-2: the partition management node monitors each partition load in real time based on the pre-transaction matching result, when a certain partition load exceeds a threshold value, the partition load needs to be adjusted, the partition load is defined as the number of spectrum transactions divided into the partitions, and the mathematical expression is as follows:
Representing slices M i Is the transaction quantity T total Representing the total transaction amount, delta th Representing a transaction load threshold;
s3-3: the high-level management node calculates the cross-slice transaction proportion, and when the ratio of the cross-slice transaction number initiated by the node to other slices to the intra-slice transaction number initiated by the node exceeds a threshold value, the slice adjustment is performed, and the calculation formula is as follows:
T cro /T intra ≥ζ th (14)
in the above, T cro Representing the number of cross-slice transactions initiated by a node to a certain other slice, ζ th Representing the number of intra-chip transactions initiated by a node ζ th The transaction load threshold is represented, a higher-layer node sends an adjustment request to a fragmentation management node after triggering a fragmentation adjustment protocol, and a high-frequency cross-fragment transaction node is added into fragments which are most frequently connected;
s3-4: the system fragmentation information is updated by the fragmentation management node and broadcast to the high-level nodes, and node state synchronization is carried out on the corresponding fragments;
s3-5: the segmentation management node calculates the segmentation adjustment quantity, and performs segmentation reconfiguration when the segmentation adjustment quantity exceeds a certain threshold value, and the segmentation management node applies transaction map information to the super node again and performs segmentation reconfiguration according to the updated transaction map;
s3-6: and the segmentation management node sends a new segmentation scheme to each system node, and each node performs segmentation repartitioning and reselection of related nodes according to the updated segmentation scheme.
10. The method of claim 9, wherein said step S3 further comprises: triggering a slice adjustment protocol when the single slice is overheated, sending adjustment information to a high-level node of the slice by a slice management node, adjusting the slice node by utilizing a minimum weighted activity number algorithm, wherein the activity number is defined as the transaction number of the slice, the weight is defined as the reciprocal of the slice processing performance, and selecting the slice with the minimum weighted activity number to join according to the product of the activity number and the weight; when the adjusting node is selected, a transaction pair which is highly correlated and relatively independent is selected, and all nodes of the corresponding fragments after node adjustment perform state synchronization on the joining or exiting of the adjusting node.
CN202310827385.8A 2023-07-06 2023-07-06 Block chain slicing method for spectrum transaction Pending CN116963077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310827385.8A CN116963077A (en) 2023-07-06 2023-07-06 Block chain slicing method for spectrum transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310827385.8A CN116963077A (en) 2023-07-06 2023-07-06 Block chain slicing method for spectrum transaction

Publications (1)

Publication Number Publication Date
CN116963077A true CN116963077A (en) 2023-10-27

Family

ID=88447074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310827385.8A Pending CN116963077A (en) 2023-07-06 2023-07-06 Block chain slicing method for spectrum transaction

Country Status (1)

Country Link
CN (1) CN116963077A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117478304A (en) * 2023-12-28 2024-01-30 湖南天河国云科技有限公司 Block chain management method, system and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117478304A (en) * 2023-12-28 2024-01-30 湖南天河国云科技有限公司 Block chain management method, system and computer equipment
CN117478304B (en) * 2023-12-28 2024-03-01 湖南天河国云科技有限公司 Block chain management method, system and computer equipment

Similar Documents

Publication Publication Date Title
CN109150972B (en) Working method of consensus mechanism of double-layer partitioned efficient block chain
CN110971684B (en) PBFT-based block chain network node load balancing method
CN112163856A (en) Consensus method and system for block chain and Internet of things fusion scene
CN112636905B (en) System and method for extensible consensus mechanism based on multiple roles
CN114218612B (en) Consensus method suitable for alliance chain high-frequency transaction scene
CN116963077A (en) Block chain slicing method for spectrum transaction
CN113553375B (en) Partitioned storage device and method for image type block chain
CN112769580A (en) Block chain layered excitation consensus algorithm
CN111080452A (en) Hierarchical transaction method suitable for energy source block chain
CN109919760A (en) Byzantine failure tolerance common recognition algorithm based on voting mechanism
Xue et al. STBC: A novel blockchain-based spectrum trading solution
CN116094721A (en) Clustering-based extensible shard consensus algorithm
CN113259179A (en) Byzantine fault-tolerant consensus method and system based on node scoring
CN114490020A (en) Block chain fragmentation method and system and electronic equipment
Li et al. Scalable blockchain storage mechanism based on two-layer structure and improved distributed consensus
Wang et al. A node rating based sharding scheme for blockchain
CN116669111A (en) Mobile edge computing task unloading method based on blockchain
CN115664682A (en) Consensus method for sharing medical data based on alliance chain master-slave multi-chain
CN113242553B (en) Malicious node detection method based on block chain fragmentation
CN115022326A (en) Block chain Byzantine fault-tolerant consensus method based on collaborative filtering recommendation
CN116567631B (en) Mobile terminal security authentication method based on segmented block chain
Prabhakar et al. TCON-A lightweight Trust-dependent Consensus framework for blockchain
CN116233145B (en) Block chain asynchronous consensus method and device based on slicing strategy
Wang et al. A fast and secured peer-to-peer energy trading using blockchain consensus
Wang et al. Blockchain-based fog radio access networks: Architecture, key technologies, and challenges

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