A data collection method and terminal system based on blockchain proof of stake
The method optimizes drone-assisted IoT data collection using PoS and DDPG algorithms to address resource limitations and security issues, improving efficiency and security in IoT networks.
Patent Information
- Application Number
- CN202111045849.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-07
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-09-07
AI Technical Summary
The data collection time of drone is long, the computing resources and energy resources of IoT devices are limited, and the security issues of data transmission have not been effectively solved.
The data acquisition method based on blockchain proof of stake is adopted to collect data from multiple drones on the ground, build a communication model between IoT devices and drones, and use the proof of stake PoS consensus mechanism in the blockchain to optimize the transmission power of drone deployment and IoT devices, and combine the DDPG algorithm to optimize the drone deployment strategy to achieve data transmission and verification.
It improves the efficiency and security of IoT data acquisition, optimizes blockchain throughput, and improves the effectiveness of drone deployment.
Smart Images

Figure CN114125744B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wireless communication, and particularly relates to a data collection method and a terminal system based on blockchain proof of stake. Background Art
[0002] The Internet of Things (IoT), i.e., "the Internet where everything is connected", is a huge network formed by combining various information sensor devices with the network, realizing the interconnection and communication of people and things at any time and any place. IoT devices usually feature low cost and low power consumption, and are thus deployed on a large scale, providing services for different application fields such as agriculture, industry, and urban management. Since a large number of IoT nodes involve massive amounts of data, efficient and secure data collection and processing are very important. Since IoT devices are often deployed in vast areas, data collection is very challenging. On the one hand, the difficulty of data processing usually exceeds the computing power of the IoT devices themselves. On the other hand, due to the limited resources of IoT devices, it is difficult to directly feedback data to the core network, and various security threats also exist during data transmission.
[0003] With the rapid development of drone technology in recent years, drones are playing an increasingly important role in the field of wireless communication. Drones can be deployed in the IoT to provide communication services without the need for traditional network infrastructure, realizing drone-assisted IoT data collection. This can not only save capital and operating expenses, but also save the energy consumption of the IoT, because drones can be flexibly deployed near IoT devices to establish high-quality communication links. A single-drone-assisted IoT data collection scheme is proposed in the prior art, in which the drone sequentially passes through different IoT regions along an optimized trajectory and collects IoT data within the regions.
[0004] In addition, blockchain, as an integration of technologies such as "decentralized" collaboration, distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, and smart contract in the field of network trust management, has attracted wide attention and has been applied to fields such as the IoT, smart cities, and digital asset trading. A scheme for using blockchain to ensure data security in the IoT is proposed in the prior art. By using the "decentralized" mechanism of blockchain, various IoT devices, applications, and services are effectively connected and integrated to promote their mutual cooperation and meet the requirements of trust establishment, transaction acceleration, and massive connection.
[0005] However, in the drone solution, it does not consider that in a large-scale Internet of Things, the data collection time of drones is long, resulting in the loss of data value. At the same time, it does not consider the security issue of data transmission in the Internet of Things. In the blockchain solution, it does not consider the problem that the computing resources and energy resources of Internet of Things devices are limited, and it may be difficult for Internet of Things devices to complete some tasks in the blockchain. Summary of the Invention
[0006] The purpose of the present invention is to provide a data collection method and a terminal system based on blockchain proof of stake to solve the above problems.
[0007] To achieve the above purpose, the present invention adopts the following technical solutions:
[0008] The data collection method based on blockchain proof of stake includes the following steps:
[0009] S101. Based on the model of collecting data of multiple ground clusters of Internet of Things devices by multiple drones, construct a communication model between the Internet of Things devices and the drones;
[0010] S102. Based on the proof of stake PoS consensus mechanism in the blockchain, construct a blockchain model for data processing and verification between the drones;
[0011] S103. According to the communication model between the Internet of Things devices and the drones and the drone blockchain model, construct an optimization model of blockchain throughput;
[0012] S104. Based on the current position of the drones and the optimization model of blockchain throughput, obtain the transmission power strategy for data transmission of the Internet of Things devices;
[0013] S105. Based on the optimization model of blockchain throughput in step S103 and the transmission power strategy of the Internet of Things devices in S104, optimize the drone deployment strategy through the DDPG algorithm, update the current position of the drones, and repeatedly iterate to optimize the transmission power of the Internet of Things devices and the drone deployment until the blockchain throughput converges.
[0014] Further, in step S101, the data collection model composed of multiple drones and multiple ground clusters of Internet of Things devices determines the transmission model of wireless signals in the uplink according to the data collection model, and then determines the transmission rate of each cluster of Internet of Things devices according to the signal transmission model;
[0015] The uplink of the wireless signal from the j-th cluster of Internet of Things devices to the j-th drone constitutes an I j ×K-dimensional virtual multiple-input multiple-output model MIMO, and its transmission model expression is as follows:
[0016] y j =H j x j +zj .
[0017] Among them, x j , y j and z j are the I j -dimensional transmitted signal of the j-th cluster of IoT devices, the K-dimensional received signal of the j-th UAV, and the background noise. The j-th cluster of IoT devices consists of I j devices equipped with single antennas, and each UAV is equipped with K antennas; denotes the virtual MIMO channel matrix, defined as H j = S j L j , where L j is the large-scale component and S j is the small-scale component. In particular, d ji is the distance between the IoT node and the UAV:
[0018]
[0019]
[0020] Among them, η LoS and η NLoS are the average additional losses of the line-of-sight link and the non-line-of-sight link of the air-ground channel. a and b are variables depending on the environment, and f and c are the carrier frequency and the speed of light, is the elevation angle formed by the ground IoT node i and the UAV j.
[0021] Furthermore, the expression of the transmission rate of the j-th cluster of IoT devices is as follows:
[0022]
[0023] Among them, is the transmission power of all nodes in the j-th cluster of IoT, I K is the identity matrix, is the noise power; the small-scale fading is represented in the form of expectation;
[0024] It is assumed that only one cluster is in the active state during each collection, and there is no inter-cluster interference in the data collection process; for the IoT node i in the j-th cluster, the constraint condition of its transmission power is as follows:
[0025]
[0026]
[0027] Among them, and The maximum power for each Internet of Things device and each Internet of Things cluster, respectively.
[0028] Furthermore, for the blockchain model based on the PoS consensus mechanism described in step S102, the time consumed in the entire process from Internet of Things data collection to the formation of the blockchain includes the following parts:
[0029] Assume that the total amount of data transmitted by the Internet of Things devices in the j-th cluster is Ω j (bit), then the uplink transmission time of the j-th cluster of the Internet of Things is expressed as:
[0030]
[0031] When the drone finishes collecting the data of the Internet of Things cluster it serves, it constructs a candidate block for the next verification; the time consumed in this part depends on the computing power of the drone and is expressed as follows:
[0032]
[0033] Where represents the computing rate (bit / s) of drone j, and ν is the computing complexity coefficient for generating a block;
[0034] After the current drone generates a block, it broadcasts the block to other drones for verification, and the verified block is added to the chain; during this process, the time delay for broadcasting the block depends on the verification drone with the lowest reception rate, so the broadcast time is expressed as:
[0035]
[0036] Where r jk represents the transmission rate between drone j and drone k,
[0037]
[0038] Where q j is the transmission power of drone j, the signal transmission follows the free space transmission model, and K is the array gain of the receiving drone equipped with K antennas;
[0039] When the verifier receives the block to be verified, it verifies the block by checking the timestamp, signature, nonce, etc., and replies with a confirmation message to determine whether the current block can be added to the blockchain. The time consumed in this process is represented by .
[0040] Furthermore, the optimization model of the blockchain throughput described in step S103 is as follows:
[0041] According to the described transmission and blockchain processes, the blockchain throughput is introduced to evaluate the network performance and is defined as:
[0042]
[0043] where χ is the average transaction scale in the Internet of Things data;
[0044] Maximize the blockchain throughput by jointly optimizing the Internet of Things transmission power and drone deployment as follows:
[0045]
[0046]
[0047]
[0048]
[0049] where is the power vector of all nodes of the Internet of Things in the j-th cluster.
[0050] Furthermore, the transmission power strategy of the Internet of Things device described in step S104 is as follows:
[0051] Rewrite the transmission rate of the j-th cluster of Internet of Things devices according to the large system data analysis technology as follows:
[0052]
[0053] where
[0054]
[0055] Furthermore, the optimization problem of the j-th cluster of Internet of Things transmission is obtained:
[0056]
[0057]
[0058]
[0059]
[0060] By solving this problem, the optimal power allocation of the j-th cluster of Internet of Things devices is obtained as follows:
[0061]
[0062] where μ j satisfies the equation
[0063] Further, based on the optimization model of the blockchain throughput in step S103 and the transmission power strategy of the Internet of Things devices in S104, the drone deployment strategy is optimized through the DDPG algorithm, and the current position of the drone is updated. The transmission power of the Internet of Things devices and the drone deployment are repeatedly iteratively optimized until the blockchain throughput converges, and then the Internet of Things data collection scheme for blockchain proof of stake is obtained. The DDPG algorithm optimizes the drone deployment strategy as follows:
[0064] In DDPG, the current critic network is responsible for iteratively updating the value network parameters θ Q , and calculates the current Q value through the state s and the action a:
[0065] y j = r j + γQ′(s j+1 , μ′(s j+1 |θ μ′ )|θ Q′ ),
[0066] where γ is the discount factor; the current actor network is responsible for updating the iterative policy network parameters θ μ , and selects the action a according to the current state s, and then interacts with the environment; the critic target network calculates the Q value through experience replay, updates the parameters of the current critic network by minimizing the loss function, and periodically copies the network parameters to the critic target network; the loss function is expressed as follows:
[0067]
[0068] In addition, the current actor network updates the current actor network parameters through policy gradient based on the target Q value calculated by the critic target network, and periodically copies the network parameters to the actor target network; the policy gradient is expressed as follows:
[0069]
[0070] The target networks both adopt soft updates:
[0071] θ′ Q ← ρθ Q + (1 - ρ)θ′ Q , ρ << 1,
[0072] θ′ μ ← ρθ μ + (1 - ρ)θ′ μ , ρ << 1.
[0073] Random noise is added to the selected action, that is, the action a = μ(s t ; θ μ ) + n e , ne is random noise; The main factors for DDPG to optimize the UAV deployment problem include the following:
[0074] Define the state at time slot t as the channel state information CIS between the UAV and the nodes within the IoT cluster it serves, as well as the channel state information between UAVs in the blockchain, that is
[0075]
[0076] Define the action at time slot t as the change in the UAV's position on the two-dimensional coordinate, expressed as follows:
[0077]
[0078] Define the reward function of the action at time slot t as the difference between the blockchain throughput at time slot t and the blockchain throughput at time slot t - 1, in the form:
[0079] r t (s t ,a t )=Ψ t -Ψ t-1 .
[0080] Furthermore, a data collection system based on the proof of stake of the blockchain includes:
[0081] A communication model construction module for IoT devices and UAVs, which is used to construct a communication model for IoT devices and UAVs based on the model of collecting data of multiple ground IoT devices by multiple UAVs;
[0082] A blockchain model construction module for data processing and verification between UAVs, which is used to construct a blockchain model for data processing and verification between UAVs based on the proof of stake PoS consensus mechanism in the blockchain;
[0083] An optimization model construction module for blockchain throughput, which is used to construct an optimization model for blockchain throughput according to the communication model of IoT devices and UAVs and the UAV blockchain model;
[0084] An emission power strategy construction module for IoT device data transmission, which is used to obtain the emission power strategy for IoT device data transmission based on the current position of the UAV and the optimization model of blockchain throughput;
[0085] An iteration module, which is used to optimize the UAV deployment strategy through the DDPG algorithm based on the optimization model of blockchain throughput and the emission power strategy of IoT devices, update the current position of the UAV, and repeatedly iterate to optimize the emission power of IoT devices and the UAV deployment until the blockchain throughput converges.
[0086] Compared with the prior art, the present invention has the following technical effects:
[0087] The Internet of Things (IoT) data collection scheme based on blockchain proof of stake proposed by the present invention considers IoT clusters, i.e., each cluster has a corresponding drone for data collection and forwarding. Then, the drones that collect data package the data into blocks and use the Proof of Stake (PoS) consensus protocol to broadcast the mined blocks to other drones, which act as verifiers to confirm the blocks and link them to the ledger. Accordingly, the present invention proposes the problem of jointly optimizing IoT transmission and drone deployment to maximize blockchain throughput. This problem is decomposed into two layers, where the inner layer of IoT transmission is solved in a closed form, while the outer layer of drone deployment is approximated to the optimal using a learning method based on Deep Deterministic Policy Gradient (DDPG). Finally, the simulation results demonstrate the convergence of the scheme and prove that its performance is superior to traditional schemes. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 is a flowchart of an IoT data collection scheme based on blockchain proof of stake proposed by the present invention.
[0089] Figure 2 is a comparison graph of the convergence of the DDPG algorithm when the critic network is set with different learning rates for the IoT data collection scheme based on blockchain proof of stake provided by an embodiment of the present invention, with a learning rate of 0.0001 for the actor network;
[0090] Figure 3 is a comparison graph of the blockchain throughput corresponding to the maximum power limit of each IoT cluster at different altitudes of drone deployment for the IoT data collection scheme based on blockchain proof of stake provided by an embodiment of the present invention;
[0091] Figure 4 is a performance comparison graph of the IoT data collection scheme based on blockchain proof of stake provided by an embodiment of the present invention with single-optimized power or drone deployment strategies, average power allocation, and central deployment strategies;
[0092] Figure 5 is the finally optimized drone deployment distribution map for the IoT data collection scheme based on blockchain proof of stake provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0093] The following further elaborates on the present invention in detail with reference to the accompanying drawings. The following is an explanation rather than a limitation of the present invention. Refer to Figure 1 , an IoT data collection scheme based on blockchain proof of stake, includes the following steps:
[0094] S101: Based on the model of multiple drones collecting data from multiple clusters of IoT devices on the ground, construct a communication model between the IoT devices and the drones.
[0095] Specifically, the uplink from the j-th cluster of Internet of Things (IoT) devices to the j-th unmanned aerial vehicle (UAV) constitutes an I j ×K-dimensional virtual multiple-input multiple-output (MIMO) model, and its transmission model expression is as follows:
[0096] y j = H j x j + z j .
[0097] Where x j , y j and z j are the I j -dimensional transmission signal of the j-th cluster of IoT devices, the K-dimensional received signal of the j-th UAV, and the background noise. The j-th cluster of IoT devices consists of I j devices equipped with single antennas, and each UAV is equipped with K antennas; represents the virtual MIMO channel matrix, defined as H j = S j L j , where L j is the large-scale component, and S j is the small-scale component. In particular, d ji is the distance between the IoT node and the UAV:
[0098]
[0099]
[0100] Where η LoS and η NLoS are the average additional losses of the line-of-sight link and non-line-of-sight link of the air-ground channel, a and b are variables depending on the environment, f and c are the carrier frequency and the speed of light, is the elevation angle formed by the ground IoT node i and the UAV j.
[0101] Preferably, the expression of the transmission rate of the j-th cluster of IoT devices is as follows:
[0102]
[0103] Where is the transmission power of all nodes in the j-th cluster of IoT, I K is the identity matrix, is the noise power. In addition, the small-scale fading is represented in an expected form.
[0104] We assume that only one cluster is active during each data collection, so there is no inter-cluster interference in the data collection process. For the IoT node i in the j-th cluster, the constraint condition of its transmission power is as follows:
[0105]
[0106]
[0107] where, and are the maximum power of each IoT device and each IoT cluster, respectively.
[0108] S102: Based on the Proof of Stake (PoS) consensus mechanism in the blockchain, construct a blockchain model for data processing and verification among drones.
[0109] Specifically, the time consumed in the whole process from IoT data collection to the formation of the blockchain includes the following parts:
[0110] Assume that the total amount of data transmitted by the IoT devices in the j-th cluster is Ω j (bit), then the uplink transmission time of the IoT in the j-th cluster is expressed as:
[0111]
[0112] When the drone completes the data collection of the IoT cluster it serves, it constructs a candidate block for the next verification. The time consumed in this part depends on the computing power of the drone and is expressed as follows:
[0113]
[0114] where, represents the computing rate (bit / s) of drone j, and ν is the computing complexity coefficient for generating a block.
[0115] After the current drone generates a block, it broadcasts the block to other drones for verification, and only the blocks that pass the verification can be added to the chain. During this process, the time delay for broadcasting the block depends on the verification drone with the lowest reception rate, so the broadcast time is expressed as:
[0116]
[0117] where, r jk represents the transmission rate between drone j and drone k,
[0118]
[0119] where, q jLet \(P_j\) be the transmission power of the drone \(j\). The signal transmission follows the free space transmission model, and \(K\) is the array gain of the receiving drone equipped with \(K\) antennas.
[0120] When the verifier receives the block to be verified, it verifies the block by checking the timestamp, signature, nonce, etc., and replies with a confirmation message to determine whether the current block can be added to the blockchain. The time consumed in this process is denoted by Since this time is relatively small compared to the time of the previous process, it is assumed to be a small constant.
[0121] S103: Design an optimization model for blockchain throughput according to the communication model between IoT devices and drones and the drone blockchain model.
[0122] Specifically, according to the described transmission and blockchain processes, blockchain throughput is introduced to evaluate the network performance, which is defined as:
[0123]
[0124] where \(\chi\) is the average transaction scale size in IoT data.
[0125] Correspondingly, the blockchain throughput is maximized by jointly optimizing the IoT transmission power and drone deployment as follows:
[0126]
[0127]
[0128]
[0129]
[0130] where is the power vector of all IoT nodes in the \(j\)-th cluster.
[0131] S104: Based on the current position of the drone and the optimization model of blockchain throughput, obtain the transmission power strategy for IoT device data.
[0132] Specifically, according to the large system data analysis technology, the transmission rate of the \(j\)-th cluster of IoT devices is rewritten as follows:
[0133]
[0134] where
[0135]
[0136] Furthermore, the optimization problem of the \(j\)-th cluster of IoT transmission is obtained:
[0137]
[0138]
[0139]
[0140]
[0141] By solving this problem, the optimal power allocation of the j-th cluster of IoT devices is obtained as follows:
[0142]
[0143] where μ j satisfies the equation
[0144] S105: Based on the optimization model of the blockchain throughput in step S103 and the transmission power strategy of the IoT devices in S104, optimize the UAV deployment strategy through the DDPG algorithm, update the current position of the UAV, and repeatedly iterate to optimize the transmission power of the IoT devices and the UAV deployment until the blockchain throughput converges, and then the IoT data collection scheme for blockchain proof of stake is obtained.
[0145] Specifically, in DDPG, the current critic network is responsible for iteratively updating the value network parameter θ Q , and calculates the current Q value through the state s and the action a:
[0146] y j = r j + γQ′(s j+1 , μ′(s j+1 |θ μ′ )|θ Q′ ),
[0147] where γ is the discount factor. The current actor network is responsible for updating the iterative policy network parameter θ μ , and selects the action a according to the current state s, and then interacts with the environment. The critic target network calculates the Q value through experience replay, updates the parameters of the current critic network by minimizing the loss function, and periodically copies the network parameters to the critic target network. The loss function is expressed as follows:
[0148]
[0149] In addition, the current actor network updates the parameters of the current actor network through policy gradient based on the target Q value calculated by the critic target network, and periodically copies the network parameters to the actor target network. The policy gradient is expressed as follows:
[0150]
[0151] All target networks adopt soft updates:
[0152] θ′ Q ← ρθ Q +(1 - ρ)θ′ Q , ρ << 1,
[0153] θ′ μ ← ρθ μ +(1 - ρ)θ′ μ , ρ << 1.
[0154] In addition, to increase the randomness during the learning process and improve the convergence of learning, random noise is added to the selected actions, i.e., action a = μ(s t ; θ μ ) + n e , n e is random noise. In addition, the main factors for DDPG to optimize the UAV deployment problem include the following:
[0155] Define the state at time slot t as the channel state information (CIS) between the UAV and the nodes within the IoT cluster it serves, as well as the channel state information between UAVs in the blockchain, i.e.,
[0156]
[0157] Define the action at time slot t as the change in the UAV's position on the two - dimensional coordinate, which is expressed as follows:
[0158]
[0159] Define the reward function of the action at time slot t as the difference between the blockchain throughput at time slot t and the blockchain throughput at time slot t - 1, in the form:
[0160] r t (s t , a t ) = Ψ t - Ψ t-1
[0161] The technical effects of the present invention will be described in detail below in combination with simulations.
[0162] The present invention simulates the Internet of Things data collection scheme based on blockchain proof of stake to verify the superiority of the scheme of the present invention. The specific steps are as follows: The set basic parameters are that in a square area of 1000m×1000m, 20 Internet of Things nodes are randomly distributed in the Internet of Things network, forming 4 clusters, and 4 drones serve 4 clusters respectively. There are 5 nodes in each cluster; the communication bandwidth is 1MHz, the noise power is -174dBm, the carrier frequency is 2GHz, the total data volume of each cluster of nodes is 5M, the average service size is 200kB, the block mining difficulty is 1, the block verification time is 0.5s, and the drone computing power is 2.7×10 6 bit / s; the discount factor is 0.95, and the memory pool is 50000. The relevant performance simulation results of the present invention are as Figures 2 - 5 shown.
[0163] In an exemplary embodiment, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the secure transmission method based on the reconfigurable intelligent surface and active interference are implemented. Among them, the computer storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic memory (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memory (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid state drives (SSD)), etc.
[0164] In an exemplary embodiment, a terminal system is further provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the secure transmission method based on the reconfigurable intelligent surface and active interference are implemented. The processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), off-the-shelf programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0165] The present invention belongs to the field of wireless communication technologies, and discloses an Internet of Things (IoT) data collection solution and a terminal system based on blockchain proof of stake. In a network deploying drone-assisted IoT data collection, a communication model for multiple drones to collect data from multiple clusters of IoT devices on the ground is constructed. Then, based on the proof of stake (PoS) consensus mechanism in the blockchain, a blockchain model for data processing and verification among drones is constructed, an optimization model for blockchain throughput is designed. Based on the current positions of the drones and the optimization model of blockchain throughput, a transmission power strategy for IoT device data transmission is obtained. Finally, based on the transmission power strategy of the IoT devices, the drone deployment strategy is optimized through the DDPG algorithm, and the current positions of the drones are updated. By repeatedly iterating to optimize the transmission power of the IoT devices and the drone deployment, an optimized solution for the IoT data collection model based on blockchain proof of stake is obtained. Compared with traditional data collection solutions, the present invention more effectively improves the transmission security and efficiency of the network.
[0166] The above content is only for explaining the technical idea of the present invention, and cannot be used to limit the protection scope of the present invention. Any modification made on the basis of the technical solution according to the technical idea proposed by the present invention falls within the protection scope of the claims of the present invention.
Claims
1. A data collection method based on blockchain proof of stake, characterized in that, It includes the following steps: S101. Based on the model of collecting data of multiple clusters of Internet of Things (IoT) devices on the ground by multiple unmanned aerial vehicles (UAVs), construct a communication model between IoT devices and UAVs; S102. Based on the proof-of-stake (PoS) consensus mechanism in the blockchain, construct a blockchain model for data processing and verification among UAVs; S103. According to the communication model between IoT devices and UAVs and the UAV blockchain model, construct an optimization model for blockchain throughput; S104. Based on the current position of the UAV and the optimization model of blockchain throughput, obtain the transmission power strategy for IoT device data transmission; S105. Based on the optimization model of blockchain throughput in step S103 and the transmission power strategy of IoT devices in S104, optimize the UAV deployment strategy through the Deep Deterministic Policy Gradient (DDPG) algorithm, update the current position of the UAV, and repeatedly iterate to optimize the transmission power of IoT devices and the UAV deployment until the blockchain throughput converges; The optimization model of the blockchain throughput described in step S103 is as follows: According to the described transmission and blockchain processes, introduce blockchain throughput to evaluate network performance, which is defined as: Among them, is the average transaction scale in the Internet of Things data; Maximize the blockchain throughput by jointly optimizing the IoT transmission power and UAV deployment, specifically as follows: Among them, is the power vector of all nodes in the Internet of Things in the The blockchain model for data processing and verification among UAVs constructed based on the proof-of-stake (PoS) consensus mechanism in the blockchain described in step S102. The time consumed in the whole process from IoT data collection to the formation of the blockchain includes the following parts: Assume that the total amount of data transmitted by the cluster of Internet of Things devices is bit, then the uplink transmission time of the cluster of Internet of Things is expressed as: is the transmission rate of the j-th cluster of IoT devices; When the UAV completes the data collection of the IoT cluster it serves, construct a candidate block for the next verification; the time consumed in this part depends on the computing power of the UAV, which is expressed as: Among them, represents the computing rate of the drone in bit / s, and is the computing complexity coefficient for generating blocks; After the current UAV generates a block, broadcast the block to other UAVs for verification, and the verified block is added to the chain; in this process, the time delay of broadcasting the block depends on the verification UAV with the lowest reception rate, so the broadcast time is expressed as: Among them, represents the transmission rate of the drone and the drone and the transmission rate between them Among them, is the noise power, is the transmission power of the UAV The signal transmission follows the free space transmission model, is the array gain of the equipment with antennae for receiving the UAV. After the verifier receives the block to be verified, it verifies the block by checking the timestamp, signature, and nonce, and replies with a confirmation message to determine whether the current block can be added to the blockchain. The time consumed by this process is represented by denoted.
2. The data acquisition method based on blockchain proof of stake according to claim 1, wherein The data collection model composed of multiple UAVs and multiple clusters of IoT devices on the ground in step S101. According to the data collection model, determine the transmission model of wireless signals in the uplink, and then determine the transmission rate of each cluster of IoT devices according to the signal transmission model; The wireless signal is from the th cluster of Internet of Things devices to the th drone to form an uplink of the dimensional virtual multiple-input multiple-output model MIMO, and its transmission model expression is as follows: . Among them, , and are the -dimensional transmitted signals of the th cluster of Internet of Things (IoT) devices, the -dimensional received signals and background noise of the th UAV, the th cluster of IoT devices consists of devices equipped with single antennas, and each UAV is equipped with antennas; represents the virtual MIMO channel matrix, which is defined as , is the large-scale component, and is the small-scale component.
3. The data acquisition method based on blockchain proof of stake according to claim 2, wherein, Large-scale component Specifically: Among them, is the distance between the IoT node and the drone, and are the average additional losses of the LOS and NLOS links of the air-ground channel, and are variables depending on the environment, and are the carrier frequency and the speed of light, is the ground IoT node and the drone form the elevation angle.
4. The data acquisition method based on blockchain proof of stake according to claim 2, characterized in that The expression for the transmission rate of the cluster of IoT devices is as follows: Among them, is the transmission power of all nodes in the cluster of Internet of Things, is the unit matrix, is the noise power; small-scale fading is represented in the form of expectation; Assume that only one cluster is active during each data collection, and there is no inter-cluster interference in the data collection process; for the IoT nodes in the cluster, the constraint conditions for its transmission power are as follows: Among them, and are the maximum power of each Internet of Things device and the maximum power of each Internet of Things cluster, respectively.
5. The data acquisition method based on blockchain proof of stake according to claim 1, characterized in that, The transmission power strategy of the IoT devices described in step S104 is as follows: According to the large system data analysis technology, rewrite the transmission rate of the cluster of Internet of Things devices as follows: Wherein, Furthermore, the optimization problem of the cluster of Internet of Things transmissions is obtained: By solving this problem, the optimal power allocation of the cluster of Internet of Things devices is as follows: Among them, satisfy the equation .
6. The data collection method based on blockchain proof of stake according to claim 1, characterized in that Based on the optimization model of blockchain throughput in step S103 and the transmission power strategy of IoT devices in S104 in step S105, optimize the UAV deployment strategy through the DDPG algorithm, update the current position of the UAV, and repeatedly iterate to optimize the transmission power of IoT devices and the UAV deployment until the blockchain throughput converges, thus obtaining the IoT data collection scheme with blockchain proof of stake.
7. The data acquisition method based on blockchain proof of stake according to claim 6, wherein The DDPG algorithm optimizes the UAV deployment strategy as follows: In DDPG, the critic current network is responsible for iteratively updating the value network parameters , and calculates the current value through the state and the action : , Among them, is the discount factor; the performer's current network is responsible for updating and iterating the policy network parameters , and selects an action according to the current state , and then interacts with the environment; the critic target network calculates values, updates the parameters of the critic's current network by minimizing the loss function, and periodically copies the network parameters to the critic target network; the loss function is expressed as follows: In addition, the target value calculated by the performer's current network based on the critic's target network is used to update the parameters of the performer's current network through policy gradients, and the network parameters are regularly copied to the performer's target network; the policy gradient is expressed as follows: The value is used to update the parameters of the performer's current network through policy gradients, and the network parameters are regularly copied to the performer's target network; the policy gradient is expressed as follows: , The target network all adopts soft update: Add random noise to the selected action, i.e., the action , is the random noise; The main factors for DDPG to optimize the UAV deployment problem include the following: Define the state of a time slot as the channel state information CIS between the UAV and the nodes within the IoT cluster it serves, as well as the channel state information between UAVs in the blockchain, i.e., Define the action of a time slot as the change in the UAV's position on a two-dimensional coordinate, which is expressed as follows: Define the reward function of the action of a time slot as the difference between the blockchain throughput of the time slot and the blockchain throughput of the time slot as follows: 。 8. A data acquisition system based on blockchain proof of stake, characterized in that, The data collection method based on blockchain proof of stake according to any one of claims 1 to 7 includes: A communication model construction module between IoT devices and UAVs, which is used to construct a communication model between IoT devices and UAVs based on the model of collecting data of multiple clusters of IoT devices on the ground by multiple UAVs; A blockchain model construction module for data processing and verification between drones, which is used to construct a blockchain model for data processing and verification between drones based on the Proof of Stake (PoS) consensus mechanism in the blockchain; An optimization model construction module for blockchain throughput, which is used to construct an optimization model for blockchain throughput according to the communication model between Internet of Things (IoT) devices and drones and the drone blockchain model; A transmit power strategy construction module for IoT device data transmission, which is used to obtain the transmit power strategy for IoT device data transmission based on the current position of the drone and the optimization model of blockchain throughput; An iteration module, which is used to optimize the drone deployment strategy through the Deep Deterministic Policy Gradient (DDPG) algorithm based on the optimization model of blockchain throughput and the transmit power strategy of IoT devices, update the current position of the drone, and repeat the iteration to optimize the transmit power of IoT devices and the drone deployment until the blockchain throughput converges.