CN112995996A - Security cooperative spectrum sensing method based on block chain intelligent contract - Google Patents
Security cooperative spectrum sensing method based on block chain intelligent contract Download PDFInfo
- Publication number
- CN112995996A CN112995996A CN202110167220.3A CN202110167220A CN112995996A CN 112995996 A CN112995996 A CN 112995996A CN 202110167220 A CN202110167220 A CN 202110167220A CN 112995996 A CN112995996 A CN 112995996A
- Authority
- CN
- China
- Prior art keywords
- secondary user
- base station
- sensing
- data
- users
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B17/00—Monitoring; Testing
- H04B17/30—Monitoring; Testing of propagation channels
- H04B17/382—Monitoring; Testing of propagation channels for resource allocation, admission control or handover
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
- H04L9/3239—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3247—Cryptographic 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W16/00—Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
- H04W16/14—Spectrum sharing arrangements between different networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W72/00—Local resource management
- H04W72/04—Wireless resource allocation
- H04W72/044—Wireless resource allocation based on the type of the allocated resource
- H04W72/0453—Resources in frequency domain, e.g. a carrier in FDMA
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing 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)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a safe cooperative spectrum sensing method based on a block chain intelligent contract, which aims at the problem of multi-user cooperative spectrum sensing in a cognitive radio system, applies a block chain intelligent contract technology and introduces a credit mechanism to realize safe cooperative spectrum sensing. The method comprehensively considers the channel error rate, the detection probability, the secondary user base station budget and the secondary user residual energy, establishes a secondary user utility function, constructs a secondary user game model, determines whether the secondary user uploads the sensing data or not by solving Nash equilibrium, selects the secondary user by calculating and updating the credit value of each secondary user through the secondary user base station, and obtains a final judgment result through voting fusion.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a secure cooperative spectrum sensing method based on a block chain intelligent contract.
Background
With the rapid development of mobile internet and internet of things, the demand of people for spectrum resources is more urgent. The traditional radio frequency spectrum allocation is a fixed allocation strategy, so that frequency spectrum resources cannot be fully utilized, the cognitive radio technology is a frequency spectrum sharing technology, the frequency spectrum utilization rate can be improved, and the frequency spectrum sensing is one of key technologies of a cognitive radio system. The single secondary user is easily affected by shadow effect, multipath fading and other factors when executing spectrum sensing, and is difficult to make a correct local judgment result.
Disclosure of Invention
The purpose of the invention is as follows: in order to overcome the defects of the prior art, the invention provides a safe cooperative spectrum sensing method based on a block chain intelligent contract, which can solve the problem of poor performance and effect of spectrum sensing.
The technical scheme is as follows: the invention discloses a safety cooperative spectrum sensing method based on a block chain intelligent contract, which is used in a cognitive radio scene and comprises the following steps:
(1) initializing a secondary user set, and representing the utility of the secondary users and the credit value of each secondary user;
(2) the secondary user base station issues a spectrum sensing task, provides a task requirement, writes the task requirement into an intelligent contract code and issues the intelligent contract code, and a miner packs the intelligent contract code and writes the intelligent contract code into a block chain;
(3) the secondary user base station broadcasts the address of the intelligent contract on the block chain, and the interested local sensing node calls contract content through the address of the intelligent contract and checks the sensing task requirement;
(4) determining an optimal result of income balance among the secondary users in the secondary user game process through Nash balance according to the self factors of the secondary users to obtain optimal spectrum sensing time and calculate self utility, if the self utility of the secondary user is larger than the average value of the utilities of all the secondary users, receiving a spectrum sensing task, and registering the secondary user receiving the sensing task on an intelligent contract, namely locally generating a pair of public and private key pairs (key pairs)public,keyprivate);
(5) The intelligent contract combines the budget of the secondary user base station, the quotations of different nodes and the credit value of the secondary user to select the registered secondary user, each time a secondary user is selected, the quotation of the secondary user is deducted from the budget of the base station, if the budget is used up or all the registration secondary users are selected up, the step 6 is entered, otherwise, the secondary user is selected again;
(6) the selected secondary user executes a spectrum sensing task, performs local sensing on a signal transmitted by a primary user, makes local judgment, uploads a local judgment result to a secondary user base station, and the secondary user base station verifies sensing data;
(7) the fusion center distributes different weights to each secondary user according to different credit values, obtains a fusion result according to the weights of the secondary users and the perception result thereof, finally adopts a voting fusion criterion to perform data fusion, compares the fusion result with a voting threshold and makes a final judgment result;
(8) and after each round of spectrum sensing task is finished, the secondary user base station issues consideration, and the updated secondary user credit value is issued to the block chain for the next sensing according to the correct times and the wrong times of the secondary user historical sensing.
Further, the method comprises the following steps:
in the step (4), the optimal spectrum sensing time of the user is determined through a game, and the optimal spectrum sensing time is obtained by solving the following equation group:
wherein α, β are weightsFactor, B is the budget of the secondary user base station for issuing the sensing task, γ is the snr of the secondary user base station for receiving the secondary user signal, N is the total number of secondary users, and the secondary user set is denoted as { 1.. eta.,. i.. eta.. N }, Pi rcReceiving, by the secondary subscriber base station, the probability that the local decision result of the secondary subscriber i is correct, fsRepresenting the sampling frequency, usually a constant value, SNRiSignal-to-noise ratio, t, representing the reception by a secondary user i of a signal transmitted by a primary useriRepresenting the perceived time of the secondary user i, EiFor the remaining energy of the secondary user i,representing the false alarm probability of the secondary user i, the Q function is a complementary cumulative distribution function, expressed as:
further, the method comprises the following steps:
the self-utility of the secondary user is expressed as:
further, the method comprises the following steps:
in the step (6), the verifying the sensing data by the secondary user base station specifically includes:
when the secondary user i uploads the perception Data to the secondary user base station, the digest of the perception Data is generated by using the Hash algorithmDataReuse the private keyFor abstract digestDataEncrypting to generate digital signature signdigest(ii) a Secondary user i signs digital signature signdigestAttaching the Data to the rear of the perception Data, and uploading the Data to a secondary user base station; the secondary user base station uses the public key of the secondary user i after receivingDecrypting digital signature signdigestObtaining abstract diges of perception DataDtataThen, a Hash algorithm is used for perception Data uploaded by the secondary user i to obtain digest'DataIf the result is obtained and decrypting the digital signature signdigestResulting digestDataCoherent, i.e. digest'Data=digestDataAnd then proving that the perception data is uploaded by the secondary user i and is not tampered by a malicious user.
Further, the method comprises the following steps:
in the step (5), the intelligent contract selects the registered secondary user by combining the budget of the secondary user base station, the quotations of different nodes and the reputation value of the secondary user, and comprises the following steps:
in the stage of selecting users by the secondary user base station, the secondary user base station sorts the secondary users according to the values of a selection function s (i) according to the registration condition of the secondary users:
wherein, TiIs the reputation value of secondary user i, ciIs the offer of the secondary user i, α is the weighting factor, B is the budget of the secondary user base station for issuing the sensing task, N is the total number of secondary users, the secondary user set is denoted as { 1.. eta., i.. eta.. N }, Pi rcReceiving the probability that the local judgment result of the secondary user i is correct for the secondary user base station;
the secondary user base station selects a plurality of secondary users from large to small according to the sorting of the selection function s (i), and when one secondary user is selected, the base station deducts the price of the secondary user from the budget until the budget B is used up or all the entry secondary users are selected up.
Further, the method comprises the following steps:
in the step (6), the secondary user receiving the sensing task performs local sensing on the signal transmitted by the primary user, and makes a local decision, including:
the local perception result of the secondary user i is diThe fusion center fuses the local perception results of all secondary users to obtain a fusion result:
wherein, wiThe weight of the reputation value of the secondary user i is calculated by the following formula:
wherein, TiThe credit value of a secondary user i, N is the total number of the secondary users, the secondary user set is expressed as { 1.,. i.,. N }, then, the secondary user base station adopts a voting fusion criterion to perform data fusion, and the secondary user base station performs data fusion on the secondary user setAnd comparing with a voting threshold to obtain a final judgment result d:
further, the method comprises the following steps:
in the step (8), the reputation value T of the secondary user base station to the secondary user iiThe update of (1) is:
wherein, Ti kAnd the reputation value of the kth perception of the secondary user i, P is the number of times that the historical perception of the secondary user i is correct, and G is the number of times that the secondary user i is wrong.
Has the advantages that: compared with the prior art, the invention has the following remarkable advantages: 1. the method takes the secondary user effectiveness maximization as an optimization target, and plays the sensing strategies of all secondary users, wherein the sensing strategies are the optimal sensing time of each secondary user. Nash equilibrium is the optimal result of each user game, and when other users do not change the strategy, the secondary user i cannot obtain higher return by independently changing the strategy; 2. different from the traditional single-user spectrum sensing, the method considers the mutual cooperation among the secondary users, and the cooperative spectrum sensing method provided by the invention considers the condition that malicious secondary users exist, takes the credit value as the standard for selecting the secondary users to execute the spectrum sensing task by the secondary user base station, and ensures the accuracy and the safety of spectrum sensing; 3. different from the traditional spectrum sensing, the method of the invention introduces the block chain technology into the spectrum sensing process, converts the spectrum sensing task into the form of an intelligent contract, and effectively prevents the attack of malicious secondary users by adopting the digital signature technology when the secondary users upload the local judgment result.
Drawings
FIG. 1 is a schematic flow diagram of the process of the present invention;
FIG. 2 is a schematic diagram of a network model of the method of the present invention;
FIG. 3 is a diagram of a simulation result of the relationship between the number of secondary users and utility;
FIG. 4 is a diagram of a simulation result of relationship between budget and detection probability;
fig. 5 is a simulation result diagram of the relationship between the number of malicious users and the detection probability.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
The block chain is a chain data structure which takes blocks as units and is connected according to a time sequence, a third party is not needed, a set of non-falsifiable account book records are maintained among users at the same level which are mutually untrusted or weakly trusted through technologies such as cryptography, a consensus mechanism and the like, and the consistency, authenticity, safety and reliability of data shared by all nodes in a distributed network are guaranteed. The block chain can ensure the safety of the transaction by using an asymmetric encryption technology, and the intelligent contract can realize the programmability and autonomy of the transaction.
The intelligent contract is a section of code running on the block chain, the contract is written into the block chain in a digital form, and the code is automatically executed when the contract content is met, so that the complexity of manual operation is avoided, and the condition that two contract parties cannot default is also ensured. Due to the characteristics of the block chain, data cannot be deleted or modified, the whole process is public and transparent, the source can be traced, and the interference of malicious attack behaviors to the appropriated normal execution is avoided to the great extent.
The digital signature technology is another characteristic of the block chain, and by verifying the digital signature, the information can be ensured not to be tampered in the transmission process, the safety of the information can be ensured, and malicious attack can be resisted. The digital signature is composed of a digital abstract and an asymmetric encryption technology, information is firstly shortened into a character string with a fixed length through the digital abstract technology, and then the abstract is encrypted through the asymmetric encryption technology, so that the digital signature is formed.
The system model of the invention is shown in figure 2, a secondary user base station issues a spectrum sensing task, the task requirements including acquisition time, budget, geographical position limitation, frequency range and the like are provided, the task is compiled into an intelligent contract code by using a programming language supported by a block chain, such as Solidity and the like, the compiled intelligent contract is issued, and a miner packs the intelligent contract and writes the intelligent contract into the block chain. The intelligent contract is not automatically executed after being issued to the block chain, and a corresponding trigger condition is needed to allow the intelligent contract to be executed. In the method, the secondary user selects to accept the task after checking the task content, and the registration on the intelligent contract is the trigger condition of the intelligent contract. After the intelligent contract is issued on the block chain, the secondary user base station broadcasts the address of the intelligent contract on the block chain, interested local sensing nodes can call contract content through the address of the intelligent contract, the sensing task requirement is checked, the self utility is calculated according to factors such as self preference, residual energy, geographic position, estimated reward and the like, if the utility is greater than the average value of the utilities of all secondary users, the spectrum sensing task is received, and the secondary user receiving the sensing task registers on the intelligent contract. The intelligent contract combines the budget of the secondary user base station, the quotations and the reputation values of different nodes to select the registered nodes and simultaneously inform the selected sensing nodes.
And the selected nodes start to execute the perception tasks, the perception data are uploaded to the secondary user base station after being encrypted and signed, and then the secondary user base station decrypts and fuses the perception data and sends perception rewards.
The method applies the block chain digital signature technology to the process of verifying the spectrum data by the secondary user base station so as to determine the data source and detect whether the data source is maliciously tampered. Each spectrum sensing device registers, namely a public and private key pair (key) is generated locallypublic,keyprivate) Wherein the public key is publicly visible, and the private key is stored locally and is only visible. When the secondary user i uploads the perception Data to the secondary user base station, the digest of the perception Data is generated by using the Hash algorithmDataReuse the private keyFor abstract digestDataEncrypting to generate digital signature signdigest. Secondary user i signs digital signature signdigestAnd attaching the sensing Data to the back, and uploading the sensing Data and the sensing Data to a secondary user base station. The secondary user base station uses the public key of the secondary user i after receivingDecrypting digital signature signdigestObtaining the abstract digest of the perception DataDataThen, a Hash algorithm is used for perception Data uploaded by the secondary user i to obtain digest'DataIf the result is obtained and decrypting the digital signature signdigestResulting digestDataCoherent, i.e. digest'Data=digestDataThen it can be proved that the perception data is uploaded by the secondary user i and has not been tampered by a malicious user.
The secondary user carries out spectrum sensing locally by adopting an energy detection mode, and then the detection probability of the secondary user iComprises the following steps:
wherein the content of the first and second substances,and the false alarm probability of the secondary user i is represented, namely the probability that the secondary user misjudges that the primary user exists when the primary user does not exist. t is tiRepresenting the perceived time of the secondary user i, fsRepresenting the sampling frequency, usually a constant value, tifsRepresenting the number of sub-user i sample points. SNRiAnd the signal-to-noise ratio of the signal transmitted by the primary user is received by the secondary user i.
The Q function is a complementary cumulative distribution function expressed as:
if the channel between the secondary user and the secondary user base station is ideal, the detection result of the local secondary user can be accurately reported to the secondary user base station through the control channel, however, in practical situations, the wireless channel is often affected by various fading and interference, so that the transmitted data can generate error codes, and the performance of spectrum sensing is deteriorated.
Assuming that channels between all the secondary users and the secondary user base station are independently and identically distributed, the channel error rate is Pe. Note P (u)0) Probability of absence of primary user, P (u)1) The probability of existence of the primary user and the correct probability P perceived by the secondary user ii cAnd error probability Pi inRespectively as follows:
the probability P that the local judgment result of the secondary user i is correct is received by the secondary user base stationi rcAnd probability of error Pi rinRespectively as follows:
Pi rc=Pi c(1-Pe)+Pi inPe (5)
Pi rin=Pi cPe+Pi in(1-Pe) (6)
wherein, PeIs the transmission error rate. Assuming that the secondary user adopts the DPSK modulation mode, the error rate of the non-coherent demodulation adopted by the receiving end isAnd gamma is the signal-to-noise ratio of the secondary user signal received by the secondary user base station.
And the secondary user base station issues tasks and gives corresponding budgets as rewards for paying to the secondary users so as to stimulate the secondary users to participate in spectrum sensing. The energy consumed by the secondary user in sensing the spectrum is related to the sensing time, and in addition, the lower the residual energy of the secondary user is, the higher the cost for participating in spectrum sensing is. Thus, the utility function defining the secondary user i is:
wherein, alpha and beta are weighting factors, B is the budget of the secondary user base station for issuing the perception task, and tiIs the secondary user perception time, EiIs the remaining energy of the secondary user i. The first half of the utility represents the benefit of the secondary user and the second half represents the perceived cost.
In equation (7), only the sensing time tiThe secondary user can decide that the secondary user needs to determine the optimal sensing time of the secondary user in order to optimize the utility of the secondary user, and therefore, the optimization problem can be expressed as:
and (4) playing games among the N secondary users, wherein the players are all the secondary users, and the game strategy of each secondary user is the sensing time. Since each secondary user is rational and selfish, they will target individual utility maximization. Nash equilibrium is the optimal result of each user game, and when other users do not change the strategy, the secondary user i cannot obtain higher return by independently changing the strategy.
The following is a proof that nash equilibrium exists for the secondary user-perceived time game:
the policy set of the secondary user isThe optimal utility of the secondary user isObviously, the set of games made up of secondary users is a finite set that is not empty, and the set of policies is also non-empty, so that only the utility function u of the secondary user i needs to be proveniWith respect to tiIs less than 0. As can be seen from the formula of the detection probability,
Therefore, uiWith respect to tiIs a first derivative of
Therefore, uiWith respect to tiIs a second derivative of
Wherein
Wherein
As can be seen from the formula of s, s > 0 because the weighting factor, the task budget, and the signal-to-noise ratio are all positive numbers. Since the signal-to-noise ratio γ > 0, the slave functionCan be used forIt is seen that f (γ) ∈ (0,0.5) when γ > 0. And because ofTherefore, the terms preceding L in equation (14) are all positive. Since m is less than or equal to 0 and Q is greater than 0, L is less than 0, thereforeNash equilibrium exists for the secondary user to perceive the time game.
Due to uiWith respect to tiIs less than 0, and the first derivative is monotonically decreased, and because m is less than or equal to 0, i.e.Therefore, it is not only easy to use
when t isiThe time → ∞ of the time,due to the fact thatSo when t isiThe time → ∞ of the time,i.e. uiWith respect to tiThere is a negative value of the first derivative of (a).
Therefore, if uiWith respect to tiFirst derivative ofIs greater than 0, there is an optimal sensing timeSo that u isiHas a maximum value ofThis can be obtained by solving the following system of equations:
Under the condition that the detection probabilities of other N-1 secondary users are known, each secondary user can obtain the optimal sensing time according to the utility function of the secondary user, so that the maximum utility of the secondary user is obtained. The game exists among the N secondary users, Nash equilibrium is the optimal result of income balance among the secondary users in the game process, and when other participants do not change their strategies, the secondary user i cannot obtain higher return by independently changing own strategies. If the maximum utility is greater than the average of all secondary users, the secondary user i chooses to register for the perception task and registers on the intelligent contract.
The sub-user base station makes the sub-user according to the selection function according to the registration condition of the sub-userIs sorted and a number of users are selected from large to small until budget B is exhausted or all entry-time users are selected. The selected secondary users start to execute the spectrum sensing task and upload the sensing data to the secondary user baseAnd the station and the secondary user base station fuse the perception data and send perception reward, namely the first half part of the utility function of the secondary user.
And the secondary user receiving the sensing task carries out local sensing on the signal transmitted by the main user, makes local judgment, then sends the local judgment result to the fusion center, and the fusion center fuses all the local judgment results to make a final judgment result. In order to discover and eliminate malicious users, the method of the invention provides a reputation mechanism. The credit value of the user is related to the historical perception situation and the detection probability of the perception, the secondary user base station checks the historical perception behavior data of each secondary user from the block distributed in a packaging mode, and the credit value is continuously updated according to the times of successfully perceiving the data of each secondary user and the detection probability of the time. In the fusion stage, the fusion center distributes different weights to each secondary user according to different credit values, the secondary users with higher credit values are endowed with higher weights, and conversely, malicious users are endowed with lower weights, and the influence of the malicious users on the final judgment result is less considered or even eliminated, so that the accuracy of the judgment result is improved. In order to avoid malicious secondary users from misreading the credit value to obtain higher weight, the secondary user base station publishes the updated credit value to the block chain, so that tampering is prevented, and the secondary users are publicly visible.
In the stage of selecting users by the secondary user base station, the secondary user base station sorts the secondary users according to the values of a selection function s (i) according to the registration condition of the secondary users:
wherein, TiIs the reputation value of secondary user i, ciIs the offer of the secondary user i. The sub-user base station selects several sub-users from large to small according to the sorting of the selection function s (i), and the base station deducts the sub-user from the budget when selecting one sub-userUntil budget B is exhausted or all entry sub-users are selected.
And the selected secondary users start to execute the spectrum sensing task and upload sensing data to the secondary user base station, and the secondary user base station makes final judgment according to the weight of the cognitive users and the sensing result thereof. And then, the secondary user base station updates the credit value of the secondary user i by combining the historical perception situation of the secondary user i and the detection probability of the current perception for the next perception.
The local perception result of the secondary user i is diThe fusion center fuses the local perception results of all secondary users to obtain a fusion result:
wherein, wiThe weight of the reputation value of the secondary user i is calculated by the following formula:
then, the sub-user base station adopts voting fusion criterion to perform data fusion and performs data fusionAnd comparing with a voting threshold to obtain a final judgment result d:
the times P of correct historical perception and the times G of errors of the secondary user i can be obtained according to the historical perception situation, so that the reputation value T of the secondary user i by the secondary user base stationiThe update of (1) is:
finally, as shown in fig. 1, the process of the invention based on the above optimization problem is as follows:
1) initialization: the set of secondary users is represented by { 1. -. i. -. N }, with a total of N, and the secondary user utility is represented by U, TiRepresents the reputation value of secondary user i and is initialized to 50;
2) the secondary user base station issues a spectrum sensing task, and provides task requirements including acquisition time, budget, geographical position limitation, frequency range and the like, a Solidity language is used for writing the task into an intelligent contract code, the written intelligent contract is issued, and a miner packs the intelligent contract and writes the intelligent contract into a block chain;
3) the secondary user base station broadcasts the address of the intelligent contract on the block chain, and the interested local sensing node calls contract content through the address of the intelligent contract and checks the sensing task requirement;
4) the secondary user i according to the preference and the residual energy EiDetermining the self optimal spectrum sensing time t through game based on factors such as geographic position, estimated reward and the likei,tiFrom a set of equations
and calculates self-utilityAnd if the utility is greater than the average value of the utilities of all secondary users, receiving the spectrum sensing task. Secondary users who accept the perception task register on the intelligent contract, i.e. a pair of public and private keys (key) is generated locallypublic,keyprivate);
5) Intelligent contract combined with secondary user base station budget B and quotation of different nodesAnd a reputation value TiAnd selecting the entry sub-user. Intelligent contract according to selection functionSelecting a plurality of sub-users from large to small, and deducting the quotation c of the sub-user from the base station budget when each sub-user is selectediUntil budget B is used up or all entry sub-users are selected;
6) and the selected secondary user executes a spectrum sensing task, performs local sensing on the signal transmitted by the primary user, makes local judgment, uploads a local judgment result to the secondary user base station, and the secondary user base station verifies the sensing data.
When the secondary user i uploads the perception Data to the secondary user base station, the digest of the perception Data is generated by using the Hash algorithmDataReuse the private keyFor abstract digestDataEncrypting to generate digital signature signdigest. Secondary user i signs digital signature signdigestAnd attaching the sensing Data to the back, and uploading the sensing Data and the sensing Data to a secondary user base station. The secondary user base station uses the public key of the secondary user i after receivingDecrypting digital signature signdigestObtaining abstract diges of perception DataDtataThen, a Hash algorithm is used for perception Data uploaded by the secondary user i to obtain digest'DataAnd checks if digest'Data=digestDataTo judge the authenticity of the data;
7) the fusion center is based on different credit values TiAssigning different weights to each sub-userAccording to the weight of the secondary user and the perception result diObtaining a fusion resultFinally, data fusion is carried out by adopting a voting fusion criterion, andcomparing with voting threshold to make final decision result
8) After each round of spectrum sensing task is finished, the secondary user base station sends consideration, and the updated credit value of the secondary user is updated according to the times P of correct historical sensing and the times G of errors of the secondary user iAnd issuing the block chain for the next sensing.
In summary, the invention provides a security cooperative spectrum sensing method based on a reputation mechanism, aiming at a multi-user cooperative spectrum sensing scene in a cognitive radio system, and combining a block chain technology. The method constructs a system model based on a block chain intelligent contract technology, and introduces a block chain asymmetric encryption digital signature technology in the process of transmitting a local judgment result to a secondary user base station by a secondary user so as to resist the fake attack of spectrum sensing data of a malicious user. The method comprehensively considers the channel error rate, the detection probability, the secondary user base station budget and the secondary user residual energy, establishes a secondary user utility function, constructs a secondary user game model, determines whether the secondary user uploads the sensing data or not by solving Nash equilibrium, selects the secondary user by calculating and updating the credit value of each secondary user through the secondary user base station, and obtains a final judgment result through voting fusion.
Document [16] D.Yang, G.Xue, X.Fang, J.Tang.inductive Mechanisms for Crowdsensing: Crowdsource With Smartphones [ J ]. IEEE/ACM transformations on network, 2016,24(3): 1732-.
Under the condition that the budget of a secondary user base station is fixed, the utility of the secondary user is maximized by optimizing the perception time of the secondary user, the utility of the secondary user is obtained by subtracting cost from reward, the reward is the proportion of the perception time of the secondary user i in the total perception time of all secondary users multiplied by the budget of the secondary user base station, and the cost is the perception time of the secondary user i multiplied by unit cost. Document [16] obtains the optimal sensing time of each sub-user by solving nash equilibrium, does not consider the channel error rate and the energy consumption of the sub-user, does not consider the situation of malicious user attack, and does not have the process that the sub-user base station selects a plurality of sub-users to complete the spectrum sensing task.
As shown in fig. 3, under different secondary user base station budgets, the secure cooperative spectrum sensing method based on the block chain intelligent contract is better than the comparison document [16] algorithm in terms of secondary user average efficiency; in fig. 4, when the budget of the secondary user base station changes, the detection probability of the secure cooperative spectrum sensing method based on the block chain intelligent contract is better than that of the comparative literature algorithm; fig. 5 shows that the number of malicious users does not change at the same time, and the detection probability of the security collaborative spectrum sensing method based on the block chain intelligent contract is higher than that of the comparative literature algorithm. As can be seen from the combination of the attached drawings 3, 4 and 5, the method improves the accuracy and the safety of spectrum sensing, and can effectively resist the counterfeiting attack of spectrum sensing data.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (7)
1. A secure cooperative spectrum sensing method based on a block chain intelligent contract is used in a cognitive radio scene and comprises the following steps:
(1) initializing a secondary user set, and representing the utility of the secondary users and the credit value of each secondary user;
(2) the secondary user base station issues a spectrum sensing task, provides a task requirement, writes the task requirement into an intelligent contract code and issues the intelligent contract code, and a miner packs the intelligent contract code and writes the intelligent contract code into a block chain;
(3) the secondary user base station broadcasts the address of the intelligent contract on the block chain, and the interested local sensing node calls contract content through the address of the intelligent contract and checks the sensing task requirement;
(4) determining an optimal result of income balance among the secondary users in the secondary user game process through Nash balance according to the self factors of the secondary users to obtain optimal spectrum sensing time and calculate self utility, if the self utility of the secondary user is larger than the average value of the utilities of all the secondary users, receiving a spectrum sensing task, and registering the secondary user receiving the sensing task on an intelligent contract, namely locally generating a pair of public and private key pairs (key pairs)public,keyprivate);
(5) The intelligent contract combines the budget of the secondary user base station, the quotations of different nodes and the credit value of the secondary user to select the registered secondary user, each time a secondary user is selected, the quotation of the secondary user is deducted from the budget of the base station, if the budget is used up or all the registration secondary users are selected up, the step 6 is entered, otherwise, the secondary user is selected again;
(6) the selected secondary user executes a spectrum sensing task, performs local sensing on a signal transmitted by a primary user, makes local judgment, uploads a local judgment result to a secondary user base station, and the secondary user base station verifies sensing data;
(7) the fusion center distributes different weights to each secondary user according to different credit values, obtains a fusion result according to the weights of the secondary users and the perception result thereof, finally adopts a voting fusion criterion to perform data fusion, compares the fusion result with a voting threshold and makes a final judgment result;
(8) and after each round of spectrum sensing task is finished, the secondary user base station issues consideration, and the updated secondary user credit value is issued to the block chain for the next sensing according to the correct times and the wrong times of the secondary user historical sensing.
2. The secure cooperative spectrum sensing method based on the blockchain intelligent contract according to claim 1, wherein in the step (4), the optimal spectrum sensing time of the user is determined through gaming, and the optimal spectrum sensing time is obtained through the following equation group:
wherein, α and β are weighting factors, B is a budget for the secondary user base station to issue a sensing task, γ is a signal-to-noise ratio of the secondary user base station to receive the secondary user signal, N is a total number of the secondary users, the secondary user set is expressed as { 1.. thei rcReceiving, by the secondary subscriber base station, the probability that the local decision result of the secondary subscriber i is correct, fsRepresenting the sampling frequency, usually a constant value, SNRiSignal-to-noise ratio, t, representing the reception by a secondary user i of a signal transmitted by a primary useriRepresenting the perceived time of the secondary user i, EiIs the remaining energy of the secondary user i, PfiRepresenting the false alarm probability of the secondary user i, the Q function is a complementary cumulative distribution function, expressed as:
4. the secure cooperative spectrum sensing method based on the blockchain intelligent contract according to claim 1, wherein in the step (6), the secondary user base station verifies the sensing data, and specifically includes:
when the secondary user i is to the secondary user base stationWhen sensing the Data, generating the abstract digest of the sensing Data by using the Hash algorithmDataReuse the private keyFor abstract digestDataEncrypting to generate digital signature signdigest;
Secondary user i signs digital signature signdigestAttaching the Data to the rear of the perception Data, and uploading the Data to a secondary user base station;
the secondary user base station uses the public key of the secondary user i after receivingDecrypting digital signature signdigestObtaining the abstract digest of the perception DataDataThen, a Hash algorithm is used for perception Data uploaded by the secondary user i to obtain digest'DataIf the result is obtained and decrypting the digital signature signdigestThe resulting digest digeDsattCoherent, i.e. digest'Data=digestDataAnd then proving that the perception data is uploaded by the secondary user i and is not tampered by a malicious user.
5. The method for spectrum sensing based on block chain intelligent contracts for security collaboration, as claimed in claim 1, wherein in the step (5), the intelligent contracts select the registered secondary users in combination with the secondary user base station budget, the offers of different nodes, and the reputation values of the secondary users, and the method comprises:
in the stage of selecting users by the secondary user base station, the secondary user base station sorts the secondary users according to the values of a selection function s (i) according to the registration condition of the secondary users:
wherein, TiIs the reputation value of secondary user i, ciIs the offer of the secondary user i, α is the weighting factor, B is the budget of the secondary user base station for issuing the sensing task, N is the total number of secondary users, the secondary user set is denoted as { 1.. eta., i.. eta.. N }, Pi rcReceiving the probability that the local judgment result of the secondary user i is correct for the secondary user base station;
the secondary user base station selects a plurality of secondary users from large to small according to the sorting of the selection function s (i), and when one secondary user is selected, the base station deducts the price of the secondary user from the budget until the budget B is used up or all the entry secondary users are selected up.
6. The secure cooperative spectrum sensing method based on the blockchain intelligent contract according to claim 1, wherein in the step (6), the secondary user receiving the sensing task performs local sensing on the signal transmitted by the primary user, and makes a local decision, which includes:
the local perception result of the secondary user i is diThe fusion center fuses the local perception results of all secondary users to obtain a fusion result:
wherein, wiThe weight of the reputation value of the secondary user i is calculated by the following formula:
wherein, TiThe credit value of a secondary user i, N is the total number of the secondary users, the secondary user set is expressed as { 1.,. i.,. N }, then, the secondary user base station adopts a voting fusion criterion to perform data fusion, and the secondary user base station performs data fusion on the secondary user setAnd comparing with a voting threshold to obtain a final judgment result d:
7. the method for sensing secure cooperative spectrum based on blockchain intelligent contracts according to claim 1, wherein in the step (8), the updating of the reputation value T of the secondary user i by the secondary user base station is as follows:
wherein, Ti kAnd the reputation value of the kth perception of the secondary user i, P is the number of times that the historical perception of the secondary user i is correct, and G is the number of times that the secondary user i is wrong.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110167220.3A CN112995996B (en) | 2021-02-05 | 2021-02-05 | Security cooperative spectrum sensing method based on block chain intelligent contract |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110167220.3A CN112995996B (en) | 2021-02-05 | 2021-02-05 | Security cooperative spectrum sensing method based on block chain intelligent contract |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112995996A true CN112995996A (en) | 2021-06-18 |
CN112995996B CN112995996B (en) | 2022-08-26 |
Family
ID=76348785
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110167220.3A Active CN112995996B (en) | 2021-02-05 | 2021-02-05 | Security cooperative spectrum sensing method based on block chain intelligent contract |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112995996B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114189299A (en) * | 2021-11-08 | 2022-03-15 | 西安电子科技大学广州研究院 | Rapid consensus method and system capable of defending against spectrum sensing data forgery attacks |
CN114499713A (en) * | 2022-02-17 | 2022-05-13 | 重庆邮电大学 | Cooperative spectrum sensing method based on asymmetric information of block chain |
CN114650110A (en) * | 2022-03-07 | 2022-06-21 | 南京邮电大学 | Cooperative spectrum sensing method based on highest node degree clustering |
CN115632728A (en) * | 2022-09-19 | 2023-01-20 | 南京理工大学 | Credible spectrum sensing method based on block chain technology |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110798273A (en) * | 2019-10-21 | 2020-02-14 | 南京邮电大学 | Cooperative spectrum sensing method based on optimal secondary user utility |
-
2021
- 2021-02-05 CN CN202110167220.3A patent/CN112995996B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110798273A (en) * | 2019-10-21 | 2020-02-14 | 南京邮电大学 | Cooperative spectrum sensing method based on optimal secondary user utility |
Non-Patent Citations (3)
Title |
---|
J. LIN: "Spectrum Resource Trading and Radio Management Data Sharing Based on Blockchain", 《2020 IEEE 3RD INTERNATIONAL CONFERENCE ON INFORMATION SYSTEMS AND COMPUTER AIDED EDUCATION (ICISCAE), 2020, PP. 83-87, DOI: 10.1109/ICISCAE51034.2020.9236794.》 * |
吕鑫鑫等: "多任务群智频谱感知算法", 《信号处理》 * |
彭艺等: "基于区块链的安全频谱感知技术研究", 《软件导刊》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114189299A (en) * | 2021-11-08 | 2022-03-15 | 西安电子科技大学广州研究院 | Rapid consensus method and system capable of defending against spectrum sensing data forgery attacks |
CN114499713A (en) * | 2022-02-17 | 2022-05-13 | 重庆邮电大学 | Cooperative spectrum sensing method based on asymmetric information of block chain |
CN114499713B (en) * | 2022-02-17 | 2024-01-05 | 绍兴市上虞区舜兴电力有限公司 | Cooperative spectrum sensing method based on asymmetric information of blockchain |
CN114650110A (en) * | 2022-03-07 | 2022-06-21 | 南京邮电大学 | Cooperative spectrum sensing method based on highest node degree clustering |
CN114650110B (en) * | 2022-03-07 | 2023-07-25 | 南京邮电大学 | Cooperative spectrum sensing method based on highest node degree clustering |
CN115632728A (en) * | 2022-09-19 | 2023-01-20 | 南京理工大学 | Credible spectrum sensing method based on block chain technology |
Also Published As
Publication number | Publication date |
---|---|
CN112995996B (en) | 2022-08-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112995996B (en) | Security cooperative spectrum sensing method based on block chain intelligent contract | |
Nguyen et al. | Federated learning meets blockchain in edge computing: Opportunities and challenges | |
Wang et al. | A blockchain based privacy-preserving incentive mechanism in crowdsensing applications | |
WO2023168886A1 (en) | Cooperative spectrum sensing method based on highest node degree clustering | |
Zhang et al. | BSFP: blockchain-enabled smart parking with fairness, reliability and privacy protection | |
Li et al. | Utility-based cooperative spectrum sensing scheduling in cognitive radio networks | |
Bigwood et al. | Ironman: Using social networks to add incentives and reputation to opportunistic networks | |
Anderegg et al. | Ad hoc-VCG: a truthful and cost-efficient routing protocol for mobile ad hoc networks with selfish agents | |
CN110825810A (en) | Block chain-based crowd sensing double privacy protection method | |
CN110189128A (en) | A kind of algorithm and device of the distributed common recognition quickly generated for block | |
CN105827410A (en) | Block chain transmission method and system with trusted node/satellite node construction | |
Patnaik et al. | ProBLeSS: A proactive blockchain based spectrum sharing protocol against SSDF attacks in cognitive radio IoBT networks | |
Khan et al. | Blockchain-based distributive auction for relay-assisted secure communications | |
CN110798273B (en) | Cooperative spectrum sensing method based on optimal secondary user utility | |
CN108898440A (en) | Flow exchanging method and device | |
CN106850583B (en) | Distributed cooperative spectrum sensing attack defense method based on utility | |
CN110149379A (en) | A kind of more former chain handling capacity extended methods based on layer logic | |
CN114519198A (en) | Block chain consensus method and computer-readable storage medium | |
CN113992526A (en) | Credibility calculation-based alliance chain cross-chain data fusion method | |
Yun et al. | MMOG user participation based decentralized consensus scheme and proof of participation analysis on the bryllite blockchain system | |
CN104754576B (en) | Device authentication method, user equipment and the network equipment | |
CN109150623B (en) | Method for resisting SSDF attack of malicious user based on round robin reputation value | |
KR20200108763A (en) | Method to manage decenteralized game | |
CN115801253A (en) | Multi-party secret sharing method and electronic equipment for safe multi-party calculation | |
CN102624748B (en) | Peer-to-peer (P2P) network access control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |