A blockchain-based spectrum sensing task pricing and allocation method
Patent Information
- Application Number
- CN202311043853.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-08-18
AI Technical Summary
而大多数频谱感知任务的定价与分配是由中心节点或其代理进行的,这种方式容易引起中心节点的不公正行为和恶意操作,导致资源的浪费和利益的不公平分配
[0081]有益效果:本发明中提出的一种基于区块链的频谱感知任务定价与分配方法具有以下优势:将频谱感知任务定价与分配过程建模成Stackelberg博弈并部署在智能合约中,不仅可以实现去中心化的频谱资源管理,确保频谱资源的公正分配,而且能够最大化基站和次级用户效用,同时保障感知任务交易的公平性和安全性。
Smart Images

Figure CN117041989B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wireless communication technology, specifically relating to a blockchain-based method for pricing and allocating spectrum sensing tasks. Background Technology
[0002] For wireless networks, spectrum is crucial and scarce. However, current spectrum allocation strategies result in low spectrum utilization and a growing shortage of spectrum resources. There is an urgent need to find effective spectrum resource allocation methods to improve spectrum utilization. Spectrum sharing is a crucial technology for meeting the massive spectrum resource demands under limited spectrum conditions, and spectrum sensing is a vital prerequisite for achieving spectrum sharing. In real-world scenarios, single-user sensing is limited by its sensing range, vulnerable to malicious attacks, and susceptible to multipath fading and shadowing effects, often leading to the assumption that the sensing results of a single user are unreliable. Collaborative sensing, through incentive mechanisms, attracts more users to participate in sensing, offering high flexibility and scalability, and overcoming these difficulties to ensure the accuracy and reliability of sensing data. Therefore, it is necessary to design reasonable pricing and allocation methods for spectrum sensing tasks to incentivize intelligent devices to participate in collective sensing. However, the pricing and allocation of most spectrum sensing tasks are handled by a central node or its agents, which is prone to unfair behavior and malicious operations by the central node, leading to resource waste and unfair distribution of benefits. Furthermore, collaborative spectrum sensing also faces problems such as malicious user collusion attacks and sensing data tampering, severely impacting the performance and efficiency of spectrum sensing. The emergence of blockchain offers an opportunity to solve these problems.
[0003] To address the aforementioned problems, this invention proposes a blockchain-based method for pricing and allocating spectrum sensing tasks. This method not only enables decentralized management and ensures fair allocation of spectrum sensing tasks, but also guarantees the security and reliability of spectrum sensing task transactions. Summary of the Invention
[0004] Technical Problem: The purpose of this invention is to propose a blockchain-based method for pricing and allocating spectrum sensing tasks. The pricing and allocation process of spectrum sensing tasks is modeled as a Stackelberg game and deployed in a smart contract. This method can not only achieve decentralized spectrum resource management and ensure fair allocation of spectrum resources, but also maximize the utility of base stations and secondary users, while ensuring the fairness and security of spectrum sensing task transactions.
[0005] Technical solution: The present invention provides a blockchain-based method for pricing and allocating spectrum sensing tasks, comprising the following steps:
[0006] Step 1: Blockchain initialization. The target communication area includes a blockchain, one primary user, M secondary users, and one base station. Before joining the blockchain, the base station and users need to register with a trusted institution (TA) through the user contract (UC) to obtain identity, public key, private key, valid certificate, and wallet address. The UC mainly includes the user registration and login process. The UC is the foundation of the spectrum-aware smart contract. Only users who register and log in through the smart contract can use other module contracts.
[0007] Step 2: The base station broadcasts the specific spectrum sensing task content and execution requirements, along with its signature and public key, to the blockchain through the service contract SC for verification of authenticity and validity; SC is used to manage spectrum sensing tasks, including service requests, service reviews, and service queries; SC is an important component of spectrum sensing task management, and service information must be requested and reviewed before it can be used for transactions;
[0008] Step 3: After receiving the spectrum sensing task content through the contract address, the secondary user calculates its own profitability based on the base station's initial task price to decide whether to participate in the spectrum sensing task. The secondary user decides whether to participate in the execution of the spectrum sensing task based on its own utility. If the secondary user participates in the execution of the spectrum sensing task, proceed to step 4; otherwise, return to step 2, and the base station re-publishes the initial price of the sensing task.
[0009] Step 4: If secondary users participate in the execution of spectrum sensing tasks, the Stackelberg game deployed in the transaction contract TC will be invoked to obtain the optimal pricing and allocation scheme for spectrum sensing tasks. TC mainly includes transaction confirmation, transaction status update, transaction evaluation and transaction traceability, which are used to reward users who successfully complete spectrum sensing tasks. It is the core of the spectrum sensing smart contract and ensures the security and fairness of transactions during the spectrum sensing task process.
[0010] Step 5: After the secondary user executes and completes the spectrum sensing task according to the optimal allocation scheme, it needs to upload the sensing results through digital signature and public key, and wait for the base station to evaluate the results; if the uploaded data meets the requirements, the smart contract will automatically pay the reward to the secondary user;
[0011] Step 6: The base station collects all local transaction records over a period of time, then encrypts and digitally signs these transaction records; these transactions are created into blocks, and after the blocks reach consensus using a practical Byzantine fault-tolerant mechanism, the transaction data is written into the blockchain.
[0012] in,
[0013] The third step specifically includes the following:
[0014] Step 31: Calculate the cost of secondary users performing spectrum sensing tasks. The cost is mainly related to the difficulty, workload, and execution cycle of the spectrum sensing task. The cost of spectrum sensing task difficulty, workload, and execution cycle are defined as follows:
[0015]
[0016]
[0017]
[0018] Where A i 、D(t i ), Q i The costs of secondary user i completing the spectrum sensing task are, in order: difficulty cost, task quantity cost, and task execution cycle cost. i For the difficulty level of the spectrum sensing task, s i For the execution cycle of the spectrum sensing task, t i To complete the spectrum sensing task, c i The maximum spectrum sensing task that a secondary user can bear is α1, α2, α3, q, k, b, which are constants and their values are determined by the base station based on the spectrum sensing task issued by the base station.
[0019] The total cost for secondary users to perform spectrum sensing tasks is defined as follows:
[0020] R i =A i D(t i )Q i (4)
[0021] Step 32, the secondary user pays the unit fee p for the spectrum sensing task based on the base station payment. i The utility of a secondary user is defined as follows:
[0022] U N =p i t i -R i (5)
[0023] Where t i The amount of spectrum sensing tasks completed by secondary user i, R i The total cost of performing spectrum sensing tasks for secondary users.
[0024] The fourth step specifically includes the following:
[0025] Step 41: After the secondary user decides to participate in the spectrum sensing task, the base station calculates its own utility:
[0026]
[0027] Where V represents the base station revenue coefficient, T represents the minimum completion amount of the spectrum sensing task, M represents the number of secondary users, and U... B Indicates the utility of the base station.
[0028] Step 42: The base station incentivizes secondary users to participate in the spectrum sensing task through pricing strategies to maximize their utility. Secondary users, in turn, maximize their utility through optimal task strategies. The interaction between secondary users and the base station can be modeled as a Stackelberg game, where the base station, as the leader, determines the optimal price, and the secondary users, as followers, determine the task quantity. Therefore, maximizing the utility of secondary users is defined as Problem 1, i.e., P1: U N This indicates the utility of secondary users.
[0029]
[0030] Maximizing base station utility can be defined as Problem 2, i.e., P2:T represents the minimum amount of spectrum sensing task to be completed.
[0031]
[0032] Step 43, let t * and p * The optimal strategy for the base station and the secondary user is determined if it satisfies the following conditions:
[0033]
[0034] Then point (p) * , t * The equilibrium of the Stackelberg game is obtained through the following process.
[0035] Step 44, determine the optimal workload for secondary users:
[0036] Calculate secondary user utility U N Regarding the number t of completed spectrum sensing tasks i First and second partial derivatives:
[0037]
[0038]
[0039] It can be known that when c i =t i When the first derivative reaches its minimum value,
[0040] when
[0041]
[0042] At that time, UN Monotonically increasing,
[0043] when
[0044]
[0045] At that time, U N Monotonically decreasing,
[0046] When t i When = 0,
[0047]
[0048] Therefore, t exists. i make U N Reaching the maximum value, at this point
[0049]
[0050] And because of t i ≤c i ,get
[0051]
[0052] in
[0053]
[0054] Step 45, according to t * According to the gain value
[0055] Sort all secondary users in order, decomposing problem 2 into a series of sub-problems about price ranges; where qA i Q i / c i A represents the gain value of secondary user i. i Q i The costs and execution cycles of secondary user i completing the spectrum sensing task are, in order, the difficulty cost and the execution cycle cost. i q represents the maximum spectrum sensing workload that secondary user i can handle, and q is a constant whose value is determined by the base station.
[0056] The series of sub-problems concerning the price range are:
[0057] a. Case 1: Assumption
[0058]
[0059] Problem 2 is transformed into minimization problem P2a;
[0060]
[0061]
[0062]
[0063] when When P2a is the optimal solution, it can be obtained from the following formula:
[0064]
[0065] in
[0066]
[0067] b. Case 2: Assumption
[0068]
[0069] Problem 2 can be transformed into minimizing problem P2b.
[0070]
[0071]
[0072]
[0073] Similar to problem P2a, when The optimal solution for P2b can be derived from the following formula:
[0074]
[0075] Based on P2a and P2b, further consider the case where T is in other intervals, let
[0076]
[0077]
[0078] The optimal solution to problem 2 can be easily obtained as follows:
[0079]
[0080] The optimal task pricing and allocation scheme for base stations and secondary users can be obtained (t) * ,p * ):t * p represents the optimal task strategy for secondary users. * This represents the optimal pricing strategy for the base station.
[0081] Beneficial effects: The spectrum sensing task pricing and allocation method proposed in this invention has the following advantages: By modeling the spectrum sensing task pricing and allocation process as a Stackelberg game and deploying it in a smart contract, it can not only realize decentralized spectrum resource management and ensure the fair allocation of spectrum resources, but also maximize the utility of base stations and secondary users, while ensuring the fairness and security of sensing task transactions. Attached Figure Description
[0082] Figure 1 It is a system model diagram;
[0083] Figure 2 This is a system interaction flowchart. Detailed Implementation
[0084] Step 1: Blockchain Initialization. The target communication area includes a blockchain, one primary user, four secondary users, and one base station. Before joining the blockchain, the base station and users need to register with a Trusted Authority (TA) through a User Contract (UC) to obtain their identity, public key, private key, valid certificate, and wallet address.
[0085] Step 2: The base station broadcasts the specific spectrum sensing task content and execution requirements to the blockchain via a Service Contract (SC), including the minimum total number of sensing tasks T=10 and the task difficulty level r. i = [2.5, 5, 7.5, 10], task execution cycle s i = [2.5,5,7.5,10], which represents the unified initial task quote p=10, along with its signature and public key, used to verify authenticity and validity.
[0086] Step 3: After receiving the spectrum sensing task content via their contract addresses, the four secondary users with maximum task capacity of [5, 6, 7, 7] calculate their own profitability based on the base station's initial quote to decide whether to participate in the spectrum sensing task. This step includes the following:
[0087] Step 31: Calculate the cost for secondary users to perform spectrum sensing tasks. The cost is mainly related to the difficulty, workload, and execution cycle of the spectrum sensing task. The costs for difficulty, workload, and execution cycle of the spectrum sensing task are defined as follows:
[0088]
[0089]
[0090]
[0091] Where A i 、D(t i ), Q i The costs are, in order, the difficulty cost, the workload cost, and the execution cycle cost for secondary user i to complete the spectrum sensing task. α1=2, α2=0.1, α3=0.1, q=1, k=0.25, b=5.
[0092] The total cost for secondary users to perform spectrum sensing tasks is defined as follows:
[0093] R i =A i D(t i )Q i (4)
[0094] Step 32, the secondary user pays the unit fee p for the spectrum sensing task based on the base station payment. i Calculate your own utility. Secondary user utility is defined as:
[0095] U N =p i t i -R i (5)
[0096] Where t i The amount of spectrum sensing tasks completed by secondary user i, R i The total cost of performing spectrum sensing tasks for secondary users. Secondary users can decide whether to participate in performing spectrum sensing tasks based on their own utility. If a secondary user participates in performing a spectrum sensing task, proceed to step four; otherwise, return to step two and the base station republishes the initial quote for the sensing task.
[0097] Step 4: If secondary users participate in executing spectrum sensing tasks, the Stackelberg game deployed in the Transaction Contract (TC) will be invoked to obtain the optimal pricing and allocation scheme for the spectrum sensing tasks. This step includes the following processes:
[0098] Step 41: After the secondary user decides to participate in the spectrum sensing task, the base station calculates its own utility:
[0099]
[0100] Where V represents the base station revenue coefficient, T represents the minimum completion amount of the spectrum sensing task, M represents the number of secondary users, and U... B This indicates the utility of the base station.
[0101] Step 42: The base station incentivizes secondary users to participate in the spectrum sensing task through pricing strategies, maximizing their utility. Secondary users, in turn, maximize their utility through optimal task strategies. Therefore, the interaction between secondary users and the base station can be modeled as a Stackelberg game. The base station, as the leader, determines the optimal price, and the secondary users, as followers, determine the task quantity. Thus, maximizing the utility of secondary users can be defined as Problem 1 (P1): U N This indicates the utility of secondary users.
[0102]
[0103] Maximizing base station utility can be defined as Problem 2 (P2): T represents the minimum amount of spectrum sensing task to be completed.
[0104] P2:maxU B
[0105] stp i ≥0 (8)
[0106]
[0107] Step 43, let t * and p * The optimal strategy for the base station and the secondary user is determined if it satisfies the following conditions:
[0108]
[0109] Then point (p) * , t * ) is the Nash equilibrium of the Stackelberg game.
[0110] Step 44, determine the optimal workload for secondary users:
[0111] Calculate secondary user utility U N Regarding the number t of completed spectrum sensing tasks i First and second partial derivatives:
[0112]
[0113]
[0114] It can be known that when c i =t i When the first derivative reaches its minimum value.
[0115] when
[0116]
[0117] At that time, U N Monotonically increasing,
[0118] when
[0119]
[0120] At that time, U N Monotonically decreasing,
[0121] When t i When = 0,
[0122]
[0123] Therefore, t exists. i make U N Reaching the maximum value, at this point
[0124]
[0125] And because of t i ≤c i Therefore, we can obtain
[0126]
[0127] in
[0128]
[0129] Step 45, according to t * According to the gain value
[0130] Sort all secondary users in order, breaking down problem 2 into a series of sub-problems about price ranges. Where qA i Q i / c i A represents the gain value of secondary user i. i Q i The costs and execution cycles of secondary user i completing the spectrum sensing task are, in order, the difficulty cost and the execution cycle cost. i q represents the maximum spectrum sensing workload that secondary user i can handle, and q is a constant whose value is determined by the base station.
[0131] (a) Case 1: Assumption
[0132]
[0133] Problem 2 can be transformed into minimizing problem P2a.
[0134]
[0135]
[0136]
[0137] when When P2a is the optimal solution, it can be obtained from the following formula:
[0138]
[0139] in
[0140]
[0141] (b) Case 2: Assumption
[0142]
[0143] Problem 2 can be transformed into minimizing problem P2b.
[0144]
[0145]
[0146]
[0147] Similar to problem P2a, when The optimal solution for P2b can be derived from the following formula:
[0148]
[0149] Based on P2a and P2b, further consider the case where T is in other intervals, let
[0150]
[0151] The optimal solution to problem 2 can be easily obtained as follows:
[0152]
[0153] Step 46, (t) * ,p * () is the optimal spectrum sensing task pricing and allocation scheme for base stations and secondary users.
[0154] Step 5: After the secondary user executes and completes the spectrum sensing task according to the allocation scheme, they need to upload the sensing results using digital signatures and public keys, and wait for the base station to evaluate the results. If the uploaded data meets the requirements, the smart contract will automatically pay the reward to the secondary user.
[0155] Step 6: The base station collects all local transaction records over a period of time, then encrypts and digitally signs these records. These transactions are then created into blocks. After the blocks reach consensus using a practical Byzantine fault-tolerant mechanism, this transaction data is written to the blockchain.
[0156] The specific embodiments described in this invention are merely illustrative of the spirit of the invention. Those skilled in the art can make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. A blockchain-based method for pricing and allocating spectrum sensing tasks, characterized in that, The method includes the following steps: Step 1: Blockchain initialization. The target communication area includes a blockchain, one primary user, M secondary users, and one base station. Before joining the blockchain, the base station and users need to register with a trusted institution (TA) through the user contract (UC) to obtain identity, public key, private key, valid certificate, and wallet address. The UC mainly includes the user registration and login process. The UC is the foundation of the spectrum-aware smart contract. Only users who register and log in through the smart contract can use other module contracts. Step 2: The base station broadcasts the specific spectrum sensing task content and execution requirements, along with its signature and public key, to the blockchain through the service contract SC for verification of authenticity and validity; SC is used to manage spectrum sensing tasks, including service requests, service reviews, and service queries; SC is an important component of spectrum sensing task management, and service information must be requested and reviewed before it can be used for transactions; Step 3: After receiving the spectrum sensing task content through the contract address, the secondary user calculates its own profitability based on the base station's initial task price to decide whether to participate in the spectrum sensing task. The secondary user decides whether to participate in the execution of the spectrum sensing task based on its own utility. If the secondary user participates in the execution of the spectrum sensing task, proceed to step 4; otherwise, return to step 2, and the base station re-publishes the initial price of the sensing task. Step 4: If secondary users participate in the execution of spectrum sensing tasks, the Stackelberg game deployed in the transaction contract TC will be invoked to obtain the optimal pricing and allocation scheme for spectrum sensing tasks. TC mainly includes transaction confirmation, transaction status update, transaction evaluation and transaction traceability, which are used to reward users who successfully complete spectrum sensing tasks. It is the core of the spectrum sensing smart contract and ensures the security and fairness of transactions during the spectrum sensing task process. Step 5: After the secondary user executes and completes the spectrum sensing task according to the optimal allocation scheme, it needs to upload the sensing results through digital signature and public key, and wait for the base station to evaluate the results; if the uploaded data meets the requirements, the smart contract will automatically pay the reward to the secondary user; Step 6: The base station collects all local transaction records over a period of time, then encrypts and digitally signs these transaction records; these transactions are created into blocks, and after the blocks reach consensus using a practical Byzantine fault-tolerant mechanism, the transaction data is written into the blockchain.
2. The blockchain-based pricing and allocation method for spectrum sensing tasks according to claim 1, characterized in that, The third step specifically includes the following: Step 31: Calculate the cost of secondary users performing spectrum sensing tasks. The cost is mainly related to the difficulty, workload, and execution cycle of the spectrum sensing task. The cost of spectrum sensing task difficulty, workload, and execution cycle are defined as follows: Where A i D(t) i ), Q i The costs of secondary user i completing the spectrum sensing task are, in order: difficulty cost, task quantity cost, and task execution cycle cost. i For the difficulty level of the spectrum sensing task, s i For the execution cycle of the spectrum sensing task, t i To complete the spectrum sensing task, c i The maximum spectrum sensing task that a secondary user can bear is α1, α2, α3, q, k, b, which are constants and their values are determined by the base station based on the spectrum sensing task issued by the base station. The total cost for secondary users to perform spectrum sensing tasks is defined as follows: R i =A i D(t i )Q i (4) Step 32, the secondary user pays the unit fee p for the spectrum sensing task based on the base station payment. i Calculate self-utility; secondary user utility is defined as: U N =p i t i -R i (5) Where t i The amount of spectrum sensing tasks completed by secondary user i, R i The total cost of performing spectrum sensing tasks for secondary users.
3. The blockchain-based pricing and allocation method for spectrum sensing tasks according to claim 1 or 2, characterized in that, The fourth step specifically includes the following: Step 41: After the secondary user decides to participate in the spectrum sensing task, the base station calculates its own utility: Where V represents the base station revenue coefficient, T represents the minimum completion amount of the spectrum sensing task, M represents the number of secondary users, and U... B Indicates the utility of the base station. Step 42: The base station incentivizes secondary users to participate in spectrum sensing tasks through pricing strategies to maximize their utility, and the secondary users maximize their utility through optimal task strategies. The interaction between secondary users and the base station can be modeled as a Stackelberg game, where the base station, as the leader, determines the optimal price, and the secondary users, as followers, determine the task quantity. Therefore, maximizing the utility of the secondary users is defined as Problem 1, i.e., P1: U N This represents the utility of secondary users. Maximizing base station utility can be defined as Problem 2, i.e., P2:T represents the minimum amount of spectrum sensing task to be completed. Step 43, let t * and p * The optimal strategy for the base station and the secondary user is determined if it satisfies the following conditions: Then point (p) * , t * The equilibrium of the Stackelberg game is obtained through the following process. Step 44, determine the optimal workload for secondary users: Calculate secondary user utility U N Regarding the number t of completed spectrum sensing tasks i First and second partial derivatives: It can be known that when c i =t i When the first derivative reaches its minimum value, when At that time, U N Monotonically increasing, when At that time, U N Monotonically decreasing, When t i When = 0, Therefore, t exists. i make U N Reaching the maximum value, at this point And because of t i ≤c i ,get in Step 45, based on t * According to the gain value Sort all secondary users in order, decomposing problem 2 into a series of sub-problems about price ranges; where qA i Q i / c i A represents the gain value of secondary user i. i Q i The costs and execution cycles of secondary user i completing the spectrum sensing task are, in order, the difficulty cost and the execution cycle cost. i q represents the maximum spectrum sensing workload that secondary user i can handle, and q is a constant whose value is determined by the base station.
4. The blockchain-based pricing and allocation method for spectrum sensing tasks according to claim 3, characterized in that, The series of sub-problems concerning the price range are: a. Case 1: Assumption Problem 2 is transformed into minimization problem P2a; when When P2a is the optimal solution, it can be obtained from the following formula: in b. Case 2: Assumption Problem 2 can be transformed into minimizing problem P2b. Similar to problem P2a, when The optimal solution for P2b can be derived from the following formula: Based on P2a and P2b, further consider the case where T is in other intervals, let The optimal solution to problem 2 can be easily obtained as follows: The optimal task pricing and allocation scheme for base stations and secondary users can be obtained (t) * ,p * ):t * p represents the optimal task strategy for secondary users. * This represents the optimal pricing strategy for the base station.
