Cross-domain intelligent wireless sensing method based on federated learning and blockchain

The FL-BLC collaborative security framework, built using lightweight federated learning and blockchain, combined with the DB-SE-Yolov8 sensing algorithm, solves the problems of insufficient cross-domain identification capabilities and resource constraints in wireless sensing scenarios, achieving high-precision and high-efficiency cross-domain wireless sensing.

CN121151871BActive Publication Date: 2026-04-14QINGDAO UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Wireless sensing scenarios suffer from insufficient cross-domain recognition capabilities, challenges in data privacy protection, and a contradiction between real-time sensing and computational efficiency under resource constraints. Furthermore, existing methods have limited generalization capabilities in complex environments.

Method used

A lightweight federated learning framework and blockchain are used to construct the FL-BLC collaborative security framework. Combined with the DB-SE-Yolov8 sensing algorithm, cross-domain wireless sensing is achieved through channel state information data preprocessing, lightweight training and feature fusion.

Benefits of technology

It improves the accuracy and privacy protection capabilities of cross-domain wireless sensing, optimizes resource utilization efficiency, adapts to the limited computing power and energy consumption of edge devices, and meets the high precision and high efficiency requirements in complex cross-domain scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121151871B_ABST
    Figure CN121151871B_ABST
Patent Text Reader

Abstract

The application discloses a cross-domain intelligent wireless sensing method based on federated learning and block chain, relates to the technical field of wireless sensing, solves the problems of efficient cooperation and privacy protection of cross-domain heterogeneous data, insufficient generalization ability of multi-target sensing model under a dynamic environment, and contradiction between real-time sensing and calculation efficiency under resource constraints, and the application constructs a FL-BLC cooperative security framework based on lightweight federated learning and block chain to perform distributed training on a local client model; on the basis of the framework, a DB-SE-Yolov8 sensing algorithm model is constructed to extract and reserve global and local fine-grained information by adopting a parallel double-branch network structure, to dynamically weight and fuse multi-scale feature information through a gating mechanism, to perform regression statistics on the extracted feature information by using a full-connection linear classifier, to perform probability mapping by using a Softmax activation function, and to output a sensing result; while improving the precision of cross-domain wireless sensing, the privacy protection capability of cross-domain heterogeneous data is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless sensing technology, specifically to a cross-domain intelligent wireless sensing method based on federated learning and blockchain. Background Technology

[0002] With the rapid development of next-generation information technologies such as 5G, blockchain, and federated learning, the Internet of Things (IoT) has become a key driver of global technological revolution and industrial transformation. Wireless sensing, as an emerging IoT technology, enables environmental monitoring and control by transmitting and receiving WiFi signals between devices and analyzing signal propagation characteristics, providing technical support for smart homes, indoor positioning, health monitoring, and smart security. However, wireless sensing scenarios are highly dynamic, and wireless signals are easily disturbed by environmental factors, causing the pre-established mapping relationship between actions and wireless signals to frequently fail in practical applications. Although the mapping relationship can be restored by retraining the sensing model, this significantly increases computational costs. Therefore, improving the cross-domain recognition capability of the sensing model has become a critical issue.

[0003] Meanwhile, due to the complex and ever-changing communication environment, cross-domain wireless sensing faces three major challenges: First, the problem of efficient collaboration and privacy protection of cross-domain heterogeneous data, where multi-source heterogeneous data makes traditional centralized training face the risk of data silos and privacy leaks; second, the insufficient generalization ability of multi-target sensing models in dynamic environments, where wireless signals are easily affected by multipath effects, occlusion and other environmental interferences, and the spatiotemporal coupling of multi-target states; and third, the contradiction between real-time sensing and computational efficiency under resource constraints, where multi-target wireless sensing needs to process massive amounts of signal data in real time, but edge devices generally suffer from limited computing power and energy consumption.

[0004] While various wireless sensing methods have addressed these issues to some extent, they still face numerous challenges. On one hand, environmental sensitivity can lead to feature space shifts. Because electromagnetic wave propagation is affected by the physical environment, domain shift issues significantly degrade sensing performance, limiting its application to complex real-world scenarios. On the other hand, while deep learning models can enhance feature extraction accuracy, their complexity results in computational complexity, high memory requirements, and limited generalization ability, necessitating a reduction in model complexity. Furthermore, as node scale expands, blockchain implementation becomes more complex, making maintaining high system performance and lightweight consensus algorithms a major challenge. Federated learning also faces issues in complex network environments, such as the difference between simulated and real data affecting model accuracy and high communication costs, requiring improvement in terms of complexity and dynamic adaptation to network environments. Summary of the Invention

[0005] To address the shortcomings and deficiencies of existing technologies, this invention provides a cross-domain intelligent wireless sensing method that employs a lightweight federated learning framework and a lightweight blockchain to construct a lightweight collaborative security framework (FL-BLC), and designs a DB-SE-Yolov8 sensing algorithm based on Yolov8 pruning distillation and dual-branch feature fusion. This method improves the accuracy of cross-domain wireless sensing while effectively enhancing the privacy protection capabilities of cross-domain heterogeneous data.

[0006] To achieve the above objectives, the present invention provides the following technical solution: The cross-domain intelligent wireless sensing method based on federated learning and blockchain provided by the present invention specifically includes the following steps:

[0007] S1. Channel State Information (CSI) data acquisition and preprocessing: noise reduction and visualization preprocessing of the acquired CSI data;

[0008] S2. Construct the FL-BLC collaborative security framework. The FL-BLC collaborative security framework is based on a lightweight federated learning framework and a lightweight blockchain architecture. It performs distributed training on the local client model and receives global parameters after federated weighted average aggregation from the server to update the local client model.

[0009] S3. Construct the DB-SE-Yolov8 perception algorithm model. Based on the FL-BLC collaborative security framework constructed in step S2, the local client model is based on the Yolov8 deep learning model. The lightweight Yolov8-cls model after pruning and distillation is used to extract the basic features of the preprocessed CSI data in step S1. A parallel dual-branch network structure is used to extract and retain global and local fine-grained information. Multi-scale feature information is dynamically weighted and fused through a gating mechanism.

[0010] S4. Data Recognition and Classification: The feature information extracted in step S3 is regressed and statistically analyzed using a fully connected linear classifier, and the probability is mapped using the Softmax activation function to output the perception results.

[0011] Preferably, in step S1, the noise reduction and visualization processing of the collected CSI data specifically involves: using the CSI ratio method (CSI-Ratio) to suppress channel state information noise, eliminating environmental interference by calculating the phase difference between adjacent subcarriers; performing geometric standardization and data normalization processing on the noise-reduced channel state information data, extracting the phase tensor from the frequency domain features to construct a two-dimensional spatiotemporal matrix, and using the spatiotemporal feature mapping method to project the four-dimensional original data onto the two-dimensional time-frequency image space as a visual input that the model can process.

[0012] Preferably, in step S2, the lightweight federated learning framework adopts a dynamic parameter aggregation mechanism and an end-to-end encryption protocol. Each client participating in federated learning trains the model locally based on the local dataset. During the training process of the same round of federated learning framework, the client and the server need to perform two encryption operations and two decryption processes in each round of interaction, and upload the trained model parameters to the server for global aggregation.

[0013] Preferably, the client performs local training of the model based on the local dataset, which specifically includes: adopting a strategy that combines cross-entropy loss and dynamic learning rate to improve the training efficiency and stability of the model within the federated learning framework; and after each round of local training, the client extracts the trained model parameters in the form of a dictionary for encryption and uploading.

[0014] The client and server need to perform two encryption operations in each round of interaction: first, encrypting the local model parameters and uploading them to the server; second, encrypting the server-aggregated global model and sending it to the client. Two decryption operations are required: the server decrypts the model parameters for global aggregation, and the client decrypts the aggregated parameters to update the local model.

[0015] The server-side global aggregation specifically includes: after decrypting the model parameters of each client, the server designs the joint weight coefficients. Joint weighting coefficient Data volume of the client With verification loss The decision was made jointly, involving a large amount of data. Reflects the client's local knowledge capacity and verifies loss. The generalization ability of local models is measured by normalizing the loss difference using the Softmax function; finally, the server performs a weighted average of the effective parameters to generate a global model.

[0016] Preferably, in step S2, the lightweight blockchain architecture specifically includes three dimensions: a lightweight storage structure, an improved Byzantine fault-tolerant consensus algorithm, and a Merkle tree-based data integrity verification mechanism. Among them, the lightweight storage structure includes an index value, a previous block hash value, a timestamp, a set of verification functions, and a set of encrypted model parameters. The hash value of the current block is calculated by serializing the block into JSON and sorting it by dictionary key to ensure that the same data structure corresponds to a unique hash value, thereby ensuring the immutability of the data.

[0017] The preferred, improved Byzantine fault-tolerant consensus algorithm reduces the number of message passes and simplifies the process by merging the PREPARE and COMMIT phases into a single COMBINED phase, thus unifying the maximum number of fault-tolerant nodes to 2f+1.

[0018] The Merkle tree-based data integrity verification mechanism specifically includes: dividing the encrypted model parameters into several fixed-length data blocks {B1, B2, ..., Bk}; calculating the hash value of each data block; merging the hash values ​​of data blocks layer by layer from bottom to top; if the number of data blocks is not a power of 2, using empty nodes to fill in the gaps until the root hash is generated; when verifying the integrity of a specific data block, obtaining the verification path from the hash value of that data block to the root hash; reconstructing the hash chain layer by layer based on the verification path; if the reconstructed hash value is consistent with the root hash, the verification is successful, and the blocks on the chain can be trusted by nodes to complete subsequent operations.

[0019] Preferably, in step S3, the Yolov8 deep learning model includes three parts: Backbone, Neck, and Head. The Backbone part performs pooling operations through multiple convolutional layers to extract hierarchical features; the Neck part is used to fuse multi-scale features, specifically a Feature Pyramid Network structure; and the Head part is responsible for the final classification and detection task, mapping the extracted features to the category space.

[0020] The pruning and distillation technique for the Yolov8 deep learning model specifically includes: pruning by analyzing the scaling factor γ of the batch normalization layer to calculate the importance score of each channel; then, selecting the channel with the lowest importance for removal based on the pruning ratio; and finally, automatically updating the network dependencies to ensure model connectivity and functional integrity.

[0021] The distillation technique employs a teacher-student model architecture, selecting a pruned Yolov8 model as the teacher model. The distillation loss is defined by the difference between the output probability distribution pt of the teacher model and the output probability distribution ps of the student model. The final training objective function is a weighted sum of the task loss and the distillation loss, where the task loss is the cross-entropy classification loss. The distillation loss and the task loss are weighted by a balancing coefficient.

[0022] Preferably, in step S3, the upper branch of the parallel dual-branch network structure is the global feature branch. The average adaptive pooling operation is applied to the output of Yolov8-cls to downsample the extracted spatial features, thereby reducing the size of the output feature tensor by half, thus removing redundant features and retaining the main features.

[0023] The lower branch of the parallel dual-branch network structure is the attention feature branch, which adopts the SE attention mechanism. By introducing Squeeze and Excitation operations, for the input feature map, global average pooling is first performed to compress the spatial dimension, and then attention weights are generated through two fully connected layers. Pay attention weight It is applied to input features to improve the model's ability to perceive key features and enhance cross-domain learning capabilities.

[0024] Preferably, in step S3, the dynamic weighted fusion of multi-scale feature information through a gating mechanism includes: obtaining the weights of the upper branch obtained by global average pooling and the weights obtained by the lower branch after processing, and concatenating these two weights; then generating gating weights through a fully connected layer and a Softmax function; calculating the fused features based on the gating weights; and finally adding Dropout random deactivation between the two fully connected layers and mapping it to the class space with the fully connected layer to obtain the output.

[0025] Preferably, in step S4, data recognition and classification specifically includes: using a fully connected linear classifier to perform regression statistics on the feature information extracted in step S3; employing supervised learning and training with labeled sample data; distinguishing target action types by merging samples with the same features; and simultaneously performing feature learning based on sample data to update the model's internal parameters; inputting the category prediction vector output by the fully connected linear classifier into the Softmax activation function; performing probability mapping on the category prediction vector through the Softmax activation function to obtain the prediction probability corresponding to each category; and determining the category corresponding to the highest probability as the final perception result.

[0026] The present invention provides a cross-domain intelligent wireless sensing method based on federated learning and blockchain. It has the following beneficial effects:

[0027] (1) The cross-domain intelligent wireless sensing method of the present invention is based on the collaborative security framework FL-BLC of lightweight federated learning and blockchain. After local training on the client, the model parameters are encrypted and hashed for verification. The encrypted parameters are written into the blockchain in batches, which realizes the immutability of parameter transmission and data privacy protection. After verifying the integrity of the data, the server uses the federated averaging algorithm to generate a global model and encrypts the global parameters and writes them into the blockchain for each client to decrypt and update synchronously. This ensures that the system has high robustness and real-time performance in scenarios with multiple clients, and provides key protection for cross-domain wireless sensing data security.

[0028] Meanwhile, the constructed DB-SE-Yolov8 perception algorithm model adopts a dual-branch structure design. Basic features are extracted from the Yolov8-cls obtained after pruning and distilling the Yolov8 deep learning model. One branch uses average adaptive pooling to ensure global information representation capability, while the lower branch leverages the SE attention module to enhance local fine-grained feature capture. A gating mechanism is used to dynamically weight and fuse multi-scale feature information, significantly improving the robustness and accuracy of recognition in different scenarios. This effectively compensates for the shortcomings of single-path models in cross-domain recognition, fully meeting the high-precision and high-efficiency wireless perception requirements in complex cross-domain scenarios.

[0029] (2) The lightweight design of the DB-SE-Yolov8 perception algorithm model constructed in this invention further optimizes the efficiency of resource utilization. By pruning and distilling the Head prediction network and Neck bottleneck network of Yolov8, the number of model parameters and computational complexity are significantly reduced. Combined with the lightweight characteristics of the SE attention module, it effectively adapts to the reality of limited computing power and energy consumption of edge devices, and alleviates the contradiction between real-time processing of massive data and resource constraints in multi-target wireless perception. Attached Figure Description

[0030] Figure 1 This is a flowchart of the DB-SE-Yolov8 algorithm model under the FL-BLC framework in Example 1.

[0031] Figure 2 This is a schematic diagram of the FL-BLC collaborative security framework in Embodiment 1.

[0032] Figure 3 This is a structural framework diagram of the overall blockchain structure in Embodiment 1.

[0033] Figure 4 This is a schematic diagram of the Byzantine Fault-Tolerant Consensus Algorithm (DPBFT) in Embodiment 1.

[0034] Figure 5 This is a schematic diagram of the DB-SE-Yolov8 perception algorithm model in Example 1 of this embodiment;

[0035] Figure 6 This is a structural framework diagram of the Yolov8 deep learning model in Example 1.

[0036] Figure 7 This is a structural framework diagram of the teacher-student model architecture in Example 1.

[0037] Figure 8 This is a flowchart of the adaptive average pooling process in Example 1.

[0038] Figure 9 This is a structural framework diagram of the SE attention mechanism in Embodiment 1.

[0039] Figure 10 This is a structural framework diagram of the dynamic gating mechanism module in Embodiment 1.

[0040] Figure 11 This is a structural diagram of the linear classifier and result output module in Example 1.

[0041] Figure 12 A comparison of confusion matrices showing the recognition performance of the DB-SE-Yolov8 algorithm under the FL-BLC collaborative security framework;

[0042] Figure 13A bar chart comparing the cross-domain recognition accuracy of different algorithms in different scenarios;

[0043] Figure 14 A bar chart comparing the test runtime of different algorithms in different scenarios;

[0044] Figure 15 A comparison of the confusion matrix of ablation experiments to remove the confusion of the FL-BLC collaborative security framework. Detailed Implementation

[0045] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Example 1

[0046] like Figure 1 As shown, the cross-domain intelligent wireless sensing method based on federated learning and blockchain of this invention first performs denoising and visualization preprocessing on Channel State Information (CSI). Then, under the FL-BLC collaborative security framework, feature extraction is performed using the DB-SE-Yolov8 sensing algorithm model. After passing through a fully connected linear classifier, a category prediction vector is output. Finally, a Softmax activation function is used for probability mapping to output the gesture type recognition result. Specifically, it includes the following steps:

[0047] S1. Channel State Information (CSI) data acquisition and preprocessing: noise reduction and visualization preprocessing of the acquired CSI data;

[0048] Channel State Information (CSI) reflects the quality and characteristics of a channel, transforming complex wireless signals into useful environmental information. The CSI generation and processing process is as follows: The transmitting end (such as a router or mobile phone) sends wireless signals into the surrounding environment, carrying data or control information. During signal propagation, these signals encounter various obstacles, such as walls, furniture, and people. These obstacles cause continuous changes in the signal's frequency, amplitude, and phase, resulting in reflection, refraction, and attenuation. These changes are the source of CSI. The receiving end (such as a mobile phone or sensor) captures these changed signals and calculates the CSI by measuring their propagation path, strength, and time of arrival, thus enabling wireless sensing.

[0049] To ensure the accuracy of the sample data, the raw wireless sensing signals used as model input undergo feature enhancement and format normalization. First, the CSI-Ratio method is employed to suppress and reduce noise in the channel state information, eliminating environmental interference by calculating the phase difference between adjacent subcarriers. Then, a phase tensor is extracted from the frequency domain features to construct a two-dimensional spatiotemporal matrix. Finally, a spatiotemporal feature mapping method is used to project the four-dimensional raw data onto a two-dimensional time-frequency image space, forming a visual input that the model can process. To eliminate interference from device differences and abnormal samples on model training, this invention employs a two-stage data normalization strategy: first, geometric normalization, which uniformly scales heterogeneous time-series images to a 224×224 pixel size to ensure consistent input size.

[0050] Next is statistical normalization, which uses a learnable affine transformation method to perform zero-mean, unit-variance processing on each channel, as shown in the following formula:

[0051]

[0052]

[0053] Where Ti is the i-th channel matrix of tensor T. To perform the mean operation, The operation to calculate the standard deviation, and These are the weights and biases of the affine transformation, respectively. The normalized tensor T_Norm, after the above processing, retains both spatiotemporal characteristics and consistency with the statistical distribution.

[0054] S2. Construct an FL-BLC collaborative security framework to improve the security of wireless sensing data, such as... Figure 2 As shown, the FL-BLC collaborative security framework is based on a lightweight federated learning framework and a lightweight blockchain architecture. Multiple clients act as data owners, deploying DB-SE-Yolov8 perceptrons locally. Each party strictly adheres to the "data not leaving its domain" principle, securely training the model, extracting knowledge, and uploading it to blockchain network nodes using local data. Blockchain technology ensures the security, immutability, and traceability of data and model parameters. The central server securely downloads and globally aggregates model parameters from the nodes, taking security measures to prevent information leakage. After generating an updated model, it distributes it to nodes via a secure channel for the next round of local training, forming a continuous optimization loop to achieve continuous model optimization and updates.

[0055] S2.1 Traditional federated learning increases communication costs between mobile devices and servers. Even with cost reductions through iteratively sending small messages or decreasing the total number of communication rounds, computational pressure remains high. The lightweight federated learning framework provided by this invention employs a dynamic parameter aggregation mechanism and an end-to-end encryption protocol to achieve privacy-preserving distributed model training. Specifically, it includes the following steps:

[0056] (1) The client trains the model locally based on the local dataset. However, the local data exhibits significant non-independent and identically distributed characteristics, specifically class distribution bias and sample imbalance. This data heterogeneity can lead to slow convergence and limited generalization performance during training. To improve recognition efficiency, this invention adopts a strategy that combines cross-entropy loss and dynamic learning rate to improve the training efficiency and stability of the model within the federated learning framework. The client-side local training process is as follows:

[0057] a. To address the issues of unclear gradient direction and susceptibility to local optima in traditional classification tasks due to the mean squared error (MSE) function, we first use the cross-entropy loss function to calculate the error between the model's prediction and the true label, thus obtaining the loss value. The formula for the cross-entropy loss function is as follows:

[0058]

[0059] Where N is the number of samples, and yi is the true class index of sample i. This is the model's unnormalized predicted score for sample i belonging to class j. This function guides the model to adjust its parameters to reduce error by comparing the predicted probability distribution with the true distribution.

[0060] b. Considering the highly heterogeneous environment of federated learning, with significant differences in computing power, data distribution, and network conditions among different clients, the Adam optimizer is used in conjunction with momentum and adaptive learning rate. The gradient is calculated based on this loss value. A larger learning rate is used initially to allow for rapid adjustment of model parameters. As training progresses, the learning rate is gradually reduced, enabling the model to converge more accurately to the vicinity of the optimal solution. This further improves the training efficiency and stability of the model within the FL framework. The process formula is shown below: ;

[0061]

[0062] Where t is the current training step number, which is the current federated round; mt and vt are the first and second moments of the gradient under the current round t, respectively; β1 and β2 are the decay rates; gt is the gradient of the parameters under the current round t; ϵ is a constant to prevent division by zero; θt is the parameter in the current state; It is a dynamic learning rate. γ is the initial learning rate; γ is the decay factor, which is dynamically selected within the (0,1) interval; k is the decay interval.

[0063] c. Finally, after each round of local training, the client extracts the trained model parameters in the form of a dictionary for encryption and uploading.

[0064] (2) Parameter encryption and uploading: During the training process of the FL framework, the client and the server need to perform two encryption operations in each round of interaction: first, encrypt the local model parameters and upload them to the server, and second, encrypt the global model aggregated by the server and send it to the client.

[0065] To defend against eavesdropping, tampering, and replay attacks, and to ensure privacy and data security during parameter transmission, each client must encrypt local model parameters after local training. The encryption process employs an improved AES-GCM algorithm: based on the client ID and federated round t, a 256-bit temporary session key K is generated using HMAC-SHA256, avoiding the risk of long-term exposure of static keys. The parameter encryption process is represented as follows:

[0066]

[0067] in, These are the model parameters for the k-th client in the t-th round; A 12-byte random number is used to ensure randomness in each encryption. A 16-byte authentication tag is used to ensure tamper-proof security. The encrypted model parameters will then be converted into ciphertext. Simultaneously, a hash value is calculated and awaited upload. The hash calculation is as follows:

[0068] Among them, SHA3-256 is a sponge structure based on the Keccak algorithm, which can convert input data of arbitrary length into a fixed-length 256-bit hash value.

[0069] (3) Parameter verification and decryption: In the same federation round, the system needs to perform two decryption processes: the server decrypts the model parameters for global aggregation and the client decrypts the aggregated parameters to update the local model; due to the instability of the local network, the weight parameters may be lost. Therefore, this invention adopts a localized parameter verification mechanism, as follows:

[0070] First, verify hash consistency. The receiver calculates the received ciphertext. The hash value is obtained and compared with the hash value provided by the sender to ensure data integrity; then the digital signature is verified by the sender on the parameters. Vectorization operation yields Then, it is digitally signed, and the recipient verifies the signature using a public key to ensure the data source is trustworthy. ;in, For digital signatures based on private keys.

[0071] Some model parameters may be lost or fail to validate due to network issues. The system allows skipping these parameters and aggregating only the valid parameter set. This mechanism is implemented by dynamically adjusting the aggregation weights to avoid infinite repetition of training rounds due to a single point of failure. After parameter validation, the model parameters are decrypted. The decryption operation uses the dynamic key K from the encryption phase and a random number. : The key K required for the decryption function is generated using HMAC-SHA256 based on the client identity and round t, ensuring that each round of the session is independent.

[0072] (4) The server performs global aggregation. After the server decrypts the model parameters of each client, the distribution of non-IID data in the excellent local dataset and the possibility of training parameter loss are considered. The traditional FedAvg algorithm may converge slowly due to the difference in the quality of local models on the client side. This invention uses joint weight coefficients Joint weighting coefficient Data volume of the client With verification loss The decision was made jointly, involving a large amount of data. Reflects the client's local knowledge capacity and verifies loss. To measure the generalization ability of local models, the difference in loss is normalized using the Softmax function:

[0073]

[0074] Among them, the temperature coefficient β>0 adjusts the loss sensitivity: when β→0, It degenerates into FedAvg; as β→+∞, it only loses the client-dominated aggregation with the minimum loss, suppressing interference from low-quality parameters.

[0075] Finally, the server performs a weighted average of the effective parameters to generate a global model: .

[0076] In federated learning (S2.2), the transmission of model parameters between the client and server is fundamental to achieving distributed collaboration, optimizing model performance, protecting data privacy, and improving system efficiency and scalability. However, issues such as lack of trust, data tampering, and privacy leaks can negatively impact federated learning performance. Therefore, this invention employs a lightweight blockchain architecture and distributed ledger technology to link data sequentially in chronological order. Cryptographic hash functions ensure the immutability of each block's content, and a consensus mechanism establishes a distributed ledger among entities, thereby enhancing the security of perceived data.

[0077] The overall structure of the blockchain is as follows Figure 3 As shown. The top of the left side represents smart contracts, stored on the blockchain to ensure transparency and immutability; the middle section represents the core of the blockchain system—Distributed Ledger Technology (DLT), a series of linked blocks representing the chronological record of all transactions in the network. Each block contains the cryptographic hash of the previous block, forming an immutable chain of records to ensure data integrity and prevent unauthorized modification; the bottom section represents the distributed network, including consensus nodes and non-consensus nodes: consensus nodes are responsible for verifying transactions and creating new blocks through the consensus algorithm, while non-consensus nodes participate in the network, forwarding transactions and maintaining copies of the ledger. The right side describes the evolution of trust relationships within the blockchain platform, where r is the trust value. In the initial stage, no trust is established between entities. As interactions occur and are recorded on the blockchain, trust begins to build, and through continuous transaction verification and validation, the trust relationship gradually strengthens, eventually reaching a high level of trust. The lightweight blockchain architecture specifically includes three dimensions: lightweight storage structure, improved Byzantine fault-tolerant consensus algorithm, and Merkle tree-based data integrity verification mechanism.

[0078] (1) Lightweight Blockchain Storage Structure: Traditional blockchain blocks typically contain fields such as transaction lists and Merkle roots, leading to a linear increase in storage overhead with transaction volume, making it difficult to adapt to the resource constraints of edge devices. The lightweight storage structure of this invention includes an index value, a previous block hash value, a timestamp, a set of verification functions, and a set of encrypted model parameters. The hash value of the current block is calculated by serializing the block into JSON and sorting it by dictionary key to ensure that the same data structure corresponds to a unique hash value, thereby ensuring data immutability. The formula is as follows.

[0079] Definition of the attribute set of the i-th block Bi (i>0):

[0080]

[0081] Here, Index represents the index value of the current block, avoiding redundant timestamp lookups; Hi−1 is the hash value of the previous block, ensuring data immutability through chained hashing; T is the timestamp service, referring to the time each transaction occurred; V is the set of verification functions, replacing the traditional Merkle root and reducing storage overhead; and Data is the encrypted model parameters. .

[0082] (2) Improved Byzantine Fault-Tolerant Consensus Algorithm (DPBFT): The consensus mechanism of blockchain can ensure that all nodes reach consensus on the distributed ledger, thereby verifying the validity of transactions, maintaining the integrity and immutability of the ledger, and promoting network governance. The traditional PBFT algorithm can tolerate up to 1 / 3 of the nodes failing or malicious attacks, and requires three confirmation phases: pre-prepare, prepare, and commit. It is sensitive to the number of nodes; the more nodes there are, the more exponentially the communication complexity increases. The PREPARE and COMMIT phases require collecting 2f and 2f+1 confirmations respectively, resulting in high communication overhead and redundant processes. Figure 4 As shown, this invention merges the PREPARE and COMMIT phases into a single COMBINED phase, unifying the maximum number of fault-tolerant nodes to 2f+1, reducing the number of message passes and simplifying the process. It directly skips the intermediate states of PREPARE, thereby reducing the number of message passes and simplifying the process. Only one calculation is needed to determine the probability of successful node consensus:

[0083]

[0084] Where n is the total number of nodes, f = ⌊(n−1) / 2⌋ is the maximum fault-tolerant number of nodes in DPBFT, and p is the node failure probability. However, considering the coupling between Byzantine nodes and network failures, a network quality index NQI ∈ [0,1] is introduced to quantify the reliability of the network:

[0085]

[0086] Where α and β are weighting coefficients, satisfying α+β=1; PLR is the packet loss rate, which measures the reliability of message transmission; and L is the latency, which affects the real-time performance of consensus.

[0087]

[0088] The probability of honest nodes correctly receiving messages is dynamically adjusted based on network quality. When a decrease in NQI leads to a decrease in Pc that is less than 0.5, this impact can be partially offset by appropriately increasing the maximum number of fault-tolerant nodes f, thereby adapting to the uncertainties in real-world network environments and improving the protocol's practicality.

[0089] (3) Based on the Merkle tree-based data integrity verification mechanism, the encrypted model parameters are dencrypted and divided into several fixed-length data blocks {B1,B2,...,Bk}; the hash value of each data block is calculated. h i =Hash( B i⊕nce), where nce is a collision-resistant random number; the hash values ​​of data blocks are merged layer by layer from bottom to top to generate the root hash hroot. If the number of data blocks is not a power of 2, empty nodes are used to fill in the gaps, and the intermediate nodes satisfy hparent=Hash(hleft∥hright).

[0090] When verifying the integrity of a specific data block Bi, first obtain the verification path Pi={hsibling,huncle1,...,hunclem} from hi to hroot, and then reconstruct the hash chain layer by layer based on Pi:

[0091] If hcalc=hroot, the verification is successful, and the block on the chain can be trusted by the node to complete subsequent operations.

[0092] S3. Construct the DB-SE-Yolov8 perception algorithm model, such as Figure 5 As shown, based on the FL-BLC collaborative security framework constructed in step S2, the local client model is based on the Yolov8 deep learning model. It utilizes a pruned and distilled lightweight Yolov8-cls model to extract the basic features of the preprocessed CSI data from step S1. A parallel dual-branch network structure is used to extract and retain both global and local fine-grained information. Multi-scale feature information is dynamically weighted and fused through a gating mechanism. Specifically, this includes:

[0093] (1) such as Figure 6 As shown, the YOLOv8 deep learning model consists of three parts: Backbone, Neck, and Head. The Backbone is responsible for extracting multi-scale features from the input image by performing pooling operations through multiple convolutional layers. The Neck is used to fuse multi-scale features, specifically a Feature Pyramid Network structure. Upsampling of high-level features is achieved through transposed convolution, which is the inverse operation of convolutional layers, with both the kernel and stride set to 2. The Head is responsible for the final classification and detection task, mapping the extracted features to the category space and generating a feature pyramid through a feature pyramid network to enhance the detection capability at different scales. The Head makes the final prediction by combining convolutional blocks and upsampling blocks to refine the features.

[0094] (2) In order to improve the response speed of the model in real-time wireless sensing tasks and reduce computational complexity, YOLOv8 is used as a feature extraction module, and it is pruned and distilled to obtain YOLOv8-cls. Basic features are extracted through the YOLOv8-cls lightweight model.

[0095] Pruning techniques simplify the model structure by removing redundant or unimportant network parameters. The importance score of each channel is calculated by analyzing the scaling factor γ of the batch normalization layer; then, the channel with the lowest importance is removed based on the pruning ratio; finally, network dependencies are automatically updated to ensure model connectivity and functional integrity. The importance coefficient of the k-th channel in layer l is:

[0096]

[0097] Where N is the number of datasets, and ⊙ represents the Hadamard product. The Frobenius norm is used, where F is set to 1 by default. An adaptive thresholding method is employed to determine the pruning ratio. ,in, and , where are the mean and standard deviation of the importance of the l-th channel, respectively, and α is the control coefficient. If If <τl, then remove the channel.

[0098] Distillation technology employs a teacher-student model architecture, such as Figure 7 As shown, the pruned Yolov8 model is selected as the teacher model, and the distillation loss is defined by the difference between the output probability distribution pt of the teacher model and the output probability distribution ps of the student model.

[0099] ;

[0100] The final training objective function is a weighted sum of the task loss and the distillation loss. ,in, λ is the cross-entropy classification loss, and λ is the balance coefficient.

[0101] (3) A parallel dual-branch network structure is used to extract and retain both global and local fine-grained information. The upper branch of the parallel dual-branch network structure is the global feature branch. In order to improve the recognition accuracy of the algorithm model, and at the same time to reduce the amount of data, reduce the computational load and time complexity of the model in the perception process, and improve efficiency, average adaptive pooling is applied to the output of Yolov8-cls, such as... Figure 8 As shown, the extracted spatial features are downsampled, reducing the size of the output feature tensor by half, thereby removing redundant features while retaining the main features;

[0102] In a parallel dual-branch network structure, the lower branch is the attention feature branch, such as... Figure 9 As shown, the SE attention mechanism is employed, and features are further extracted from the input by introducing Squeeze and Excitation operations. For the input feature map... ∈ R B×C×H×WFirst, global average pooling is performed to compress the spatial dimension, and the output is obtained. y ∈ R B×C Then, attention weights are generated through a two-layer fully connected network. Pay attention weight Applying to input features to obtain This enhances the model's ability to perceive key features and strengthens its cross-domain learning capabilities. The formula is as follows: , Where W1∈RC / r×C and W2∈RC×C / r are the weights of the fully connected layers for dimensionality reduction and dimensionality increase, and σ() is the sigmoid activation function.

[0103] (4) Dynamically weighted and fused multi-scale feature information through a gating mechanism, such as Figure 10 As shown, the flow and fusion of information are mainly controlled through reset and update gates. When the update gate Zt is close to 1, the model tends to retain the old state, ignoring Xt information and effectively skipping time step t. Conversely, when Zt is close to 0, the new hidden state Ht approaches the candidate hidden state Htt. This is used to address the vanishing gradient problem in neural networks.

[0104] Obtain the weight b1 obtained from the upper branch after global average pooling and the weight b2 obtained after processing the lower branch, and concatenate these two weights. Next, gated weights are generated using a fully connected layer and a Softmax function. , ; Computational fusion features Finally, a Dropout random deactivation is added between the two fully connected layers, with a deactivation rate of 0.5, and mapped to the class space along with the fully connected layers to obtain the output. .

[0105] S4. Data Recognition and Classification: A fully connected linear classifier is used to perform regression statistics on the feature information extracted in step S3. Supervised learning is employed, combining labeled sample data for training. Target action types are distinguished by merging samples with similar features. Simultaneously, feature learning is performed based on the sample data to update the model's internal parameters. Figure 11 As shown, the category prediction vector output by the fully connected linear classifier is input into the Softmax activation function. The Softmax activation function performs probability mapping on the category prediction vector to obtain the prediction probability corresponding to each category. The category corresponding to the highest probability is determined as the final perception result.

[0106] This invention constructs an FL-BLC collaborative security framework, leveraging the immutability of blockchain and distributed training via federated learning to protect user data while effectively improving perception accuracy. Simultaneously, a DB-SE-Yolov8 perception algorithm model is constructed, employing pruning and distillation techniques to obtain a smaller Yolov8-cls model, reducing parameter complexity. A dual-branch structure is used to fuse a lightweight SE attention mechanism, reducing model size and enhancing feature extraction and learning capabilities. A dynamic gating mechanism achieves efficient and robust wireless perception, effectively extracting fine-grained features while ensuring the extraction of domain-independent features.

[0107] Example 2

[0108] The present invention analyzes the cross-domain intelligent wireless sensing method based on federated learning and blockchain in Embodiment 1 through the following simulation experiments:

[0109] (I) Preparation of Experimental Dataset

[0110] When conducting experiments within the domain and across locations and directions, wireless signal CSI data collected centrally from the publicly available Widar3.0 dataset from Tsinghua University was used. For collaborative security operations, three clients were set up to simulate users 1, 2, and 3 in the Classroom environment. Each client loaded its own gesture recognition samples as a local dataset, with 80% of the data allocated to the training set and 20% to the validation set. Finally, user 2's test set was selected as the sample for testing the model's accuracy. Specific details regarding the evaluation dataset can be found in Table 1.

[0111]

[0112] Table 1. Detailed description of the evaluation dataset

[0113] (II) Performance Indicators for Classification Tasks

[0114] If the dataset contains N types of gestures, the i-th gesture type is considered positive, and the rest are considered negative, where i takes values ​​from 1, 2, ..., N. Assume that among the samples the model classifies as positive, the number of correctly identified samples is TPi, and the number of incorrectly identified samples is FPi; while among the samples the model classifies as negative, the number of correctly identified samples is TNi, and the number of incorrectly identified samples is FNi. The explanations of the evaluation metrics for the classification task are as follows:

[0115] (1) Confusion Matrix: The confusion matrix reflects the number of correct and incorrect recognitions of each gesture type sample by the network model. When the matrix value is a normalized proportion (within [0,1]), it is convenient to compare the performance of the model across datasets. For a dataset containing N gesture types, the dimension of its confusion matrix is ​​N×N, and the specific structure can be found in Table 2.

[0116]

[0117] Table 2 Definition of Confusion Matrix

[0118] In this model, rows represent the true class of the samples, columns represent the predicted class of the model, and cell Si,j represents the proportion of true samples of class i that are predicted to be class j. For example, if S3,2 = 0.1, it means that 10% of samples that actually belong to class 2 are misclassified as class 3. The diagonal element Si,i represents the model's correct recognition rate (i.e., recall) for class i, while the off-diagonal elements reflect the degree of confusion between classes.

[0119] (2) Accuracy: Accuracy represents the proportion of samples correctly identified by the model. The formula for calculating accuracy is:

[0120]

[0121] Here, TS represents the total number of samples correctly identified by the network model, and FS represents the total number of samples incorrectly identified by the network model. If the number of samples in each class in the dataset is unbalanced, it may not accurately reflect the performance of the model. For example, if a certain class accounts for a very high proportion of samples (such as 90%), the model can achieve high accuracy by predicting only the majority class, but may completely ignore the minority class.

[0122] (3) Precision, also known as accuracy, measures the proportion of samples that the model predicts as positive but are actually positive, reflecting the accuracy of the model's prediction. For the i-th gesture type, its precision is expressed as:

[0123]

[0124] When the cost of false positives (FP) is high, accuracy should be optimized first.

[0125] (4) Recall, also known as the full coverage rate, measures the proportion of samples that are actually positive that are correctly identified as positive by the model, reflecting the model's ability to capture positive samples. For the i-th gesture type, its recall is expressed as:

[0126]

[0127] When the consequences of missed detections (FN) are severe, recall should be optimized as a priority.

[0128] (5) F1 score (F1-Score): Precision and recall usually have an inverse relationship. The F1 score, which combines both, is used for evaluation. A higher F1 score indicates that the model has achieved a better balance between precision and recall, and thus better overall performance. The F1-Score can be expressed as:

[0129]

[0130] The F1-Score ranges from [0,1]. The higher the F1-Score, the better the network model's performance in recognizing the i-th type of gesture. When measuring the overall performance of the model, the average of the relevant performance of each type is taken as the final result.

[0131] (III) This embodiment studies and analyzes the accuracy and efficiency of the DB-SE-Yolov8 model in wireless sensing through comparative algorithms and ablation experiments, verifying its significant effect and superior performance in improving the accuracy of intelligent wireless sensing and reducing time complexity. Simultaneously, it compares the performance of different algorithms in sensing and recognition tasks.

[0132] 1. Comparative Analysis of Different Algorithms

[0133] To verify the performance of the algorithm in Example 1 in terms of perception accuracy, recognition efficiency, and cross-domain recognition, three mainstream intelligent wireless sensing algorithms—Dual-Attention CSI Network (DACN), Environment Independent (EI), and Joint Adversarial Domain Adaptation (JADA)—were selected as comparison algorithms. The cross-domain intelligent wireless sensing method based on federated learning and blockchain of this invention was compared with the other three mainstream intelligent wireless sensing algorithms under the same training and test sets. The hyperparameters for training the algorithm of this invention and the comparison algorithms are shown in Tables 3 and 4.

[0134]

[0135] Table 3 Hyperparameter settings for the algorithm of this invention

[0136]

[0137] Table 4 Comparison of Algorithm Parameter Settings

[0138]

[0139] Table 5 (a) Comparison of cross-domain performance of different algorithms

[0140]

[0141] Table 5(b) Comparison of cross-domain performance of different algorithms

[0142] Tables 5(a) and 5(b) show the comparison results of different algorithms on different performance metrics. Cross-L represents sample data across locations, while Cross-O represents sample data across orientations.

[0143] The analysis results in Tables 5(a) and 5(b) show that the DB-SE-Yolov8 model outperforms other comparative algorithms in recognition accuracy across all test scenarios. Compared to the other three comparative algorithms (JADA, EI, and DACN), the DB-SE-Yolov8 algorithm improves recognition accuracy by 2.67% to 5.67% in intra-domain recognition scenarios; by 8.50% to 10.00% in cross-domain and cross-location recognition scenarios; and by 5.33% to 10.17% in cross-domain and cross-orientation recognition scenarios. These results demonstrate that, within the FL-BLC framework, the DB-SE-Yolov8 algorithm not only achieves collaborative security among clients and protects data privacy, but also exhibits significant advantages in various cross-domain recognition scenarios, enabling higher-performance cross-domain recognition.

[0144] Figure 12 The confusion matrix of the algorithm's recognition performance shows an imbalance in the distribution of model results during intra-domain recognition. This may affect the stability of the algorithm's perception accuracy in practical applications, and is an issue that needs to be addressed in future optimizations. Observing the performance of various algorithms in different cross-domain scenarios, a common feature emerges: the accuracy of intra-domain recognition is generally higher than that in cross-domain scenarios. This is because the training and testing environments differ in cross-domain scenarios, making it difficult for the model to fully learn the new environmental features in the test set during training, thus limiting its recognition ability in new environments. However, the DB-SE-Yolov8 algorithm, by incorporating an attention mechanism and employing the FL-BLC collaborative safety framework, significantly enhances its ability to learn cross-domain features, resulting in superior performance in cross-domain recognition. Therefore, the DB-SE-Yolov8 algorithm under the FL-BLC collaborative safety framework has a clear advantage in cross-domain recognition tasks.

[0145] Figure 13 and Figure 14The figures show a comparison of recognition accuracy and test runtime for different algorithms in different scenarios. As can be seen, the DB-SE-Yolov8 algorithm consistently delivers significantly shorter test times than the comparison algorithms across all test scenarios. Specifically, compared to other algorithms: the DB-SE-Yolov8 algorithm reduces test time by 15.51%–24.53% in in-domain scenarios; by 26.78%–28.28% in cross-location scenarios; and by 2.37%–24.05% in cross-orientation scenarios. These results demonstrate that the DB-SE-Yolov8 algorithm effectively reduces test time and improves recognition efficiency in various scenarios. This advantage is primarily attributed to the lightweight design employed in both the attention module and the FL-BLC collaborative safety framework, which significantly reduces the number of training parameters and feature data. The DB-SE-Yolov8 algorithm, through its lightweight design and efficient feature dimensionality reduction operation, exhibits low test runtime in various scenarios, thus demonstrating a significant advantage in recognition efficiency.

[0146] 2. Analysis of Ablation Control Experiment

[0147] To verify the role and impact of the FL-BLC framework on the recognition performance of the perceptual model, this embodiment conducted an ablation experiment, removing the FL-BLC collaborative security framework and directly comparing it with the initial DB-SE-Yolov8 algorithm.

[0148]

[0149] Table 6 Comparison of cross-domain performance and test runtime in ablation experiments.

[0150] Table 6 presents comparative data on the accuracy of ablation experiments and the testing time. Figure 15 Table 8 shows the confusion matrices for intra-domain and inter-domain recognition using the ablation algorithm. Analysis of Table 8 reveals that the recognition accuracy of the model after removing FL-BLC decreases to varying degrees in both intra-domain and various cross-domain recognition scenarios. Specifically, the recognition accuracy of the ablation-removed model decreases by 1.33%, 4.66%, and 1.33% in intra-domain, cross-location, and cross-directional scenarios, respectively. This clearly demonstrates that the FL-BLC collaborative security framework can improve perception accuracy, especially in cross-domain datasets. Furthermore, observation and analysis... Figure 15 The confusion matrix after ablation experiments revealed that the performance of the ablation-enhanced model was highly unstable in cross-domain scenarios, demonstrating that FL-BLC can also enhance model stability. The accuracy for intra-domain scene recognition was higher than in any cross-domain scenario, while test runtime was not necessarily correlated and therefore not comparable longitudinally.

[0151] In summary, this invention presents a cross-domain intelligent wireless sensing method based on federated learning and blockchain. The FL-BLC collaborative security framework ensures data security and parameter transmission confidentiality, while the DB-SE-Yolov8 algorithm enhances feature extraction capabilities and sensing efficiency through structural optimization. The combination of these two approaches significantly improves sensing accuracy and efficiency in both intra-domain and cross-domain scenarios, and exhibits good robustness and generalization performance.

[0152] Finally, although this specification describes embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A cross-domain intelligent wireless sensing method based on federated learning and blockchain, characterized in that, Specifically, the following steps are included: S1. Channel State Information (CSI) data acquisition and preprocessing: noise reduction and visualization preprocessing of the acquired CSI data; S2. Construct the FL-BLC collaborative security framework. The FL-BLC collaborative security framework is based on a lightweight federated learning framework and a lightweight blockchain architecture. It performs distributed training on the local client model and receives global parameters after federated weighted average aggregation from the server to update the local client model. The lightweight federated learning framework employs a dynamic parameter aggregation mechanism and an end-to-end encryption protocol. Each client participating in federated learning trains the model locally based on its local dataset. During the training process of the same round of federated learning framework, the client and server need to perform two encryption operations and two decryption processes in each round of interaction, and upload the trained model parameters to the server for global aggregation. The lightweight blockchain architecture specifically includes three dimensions: lightweight storage structure, improved Byzantine fault-tolerant consensus algorithm, and Merkle tree-based data integrity verification mechanism; The lightweight storage structure includes an index value, a previous block hash value, a timestamp, a set of verification functions, and a set of encrypted model parameters. The hash value of the current block is calculated by serializing the block into JSON and sorting it by dictionary key to ensure that the same data structure corresponds to a unique hash value, thereby ensuring the immutability of the data. S3. Construct the DB-SE-Yolov8 perception algorithm model. Based on the FL-BLC collaborative security framework constructed in step S2, the local client model is based on the Yolov8 deep learning model. The lightweight Yolov8-cls model after pruning and distillation is used to extract the basic features of the preprocessed CSI data in step S1. A parallel dual-branch network structure is used to extract global and local fine-grained information. Multi-scale feature information is dynamically weighted and fused through a gating mechanism. The upper branch of the parallel dual-branch network structure is the global feature branch. The average adaptive pooling operation is applied to the output of Yolov8-cls to downsample the extracted spatial features, reducing the size of the output feature tensor by half, thereby removing redundant features and retaining the main features. The lower branch of the parallel dual-branch network structure is the attention feature branch, which adopts the SE attention mechanism. By introducing Squeeze and Excitation operations, for the input feature map, global average pooling is first performed to compress the spatial dimension, and then attention weights are generated through two fully connected layers. The attention weights It is applied to input features to improve the model's ability to perceive key features and enhance cross-domain learning capabilities; S4. Data Recognition and Classification: The feature information extracted in step S3 is regressed and statistically analyzed using a fully connected linear classifier, and the probability is mapped using the Softmax activation function to output the perception results.

2. The cross-domain intelligent wireless sensing method based on federated learning and blockchain according to claim 1, characterized in that, In step S1, the noise reduction and visualization processing of the collected CSI data is specifically as follows: the CSI ratio method is used to suppress channel state information noise, and environmental interference is eliminated by calculating the phase difference between adjacent subcarriers; the noise-reduced channel state information data is geometrically standardized and data normalized, the phase tensor is extracted from the frequency domain features to construct a two-dimensional spatiotemporal matrix, and the four-dimensional original data is projected onto the two-dimensional time-frequency image space using the spatiotemporal feature mapping method as a visual input that the model can process.

3. The cross-domain intelligent wireless sensing method based on federated learning and blockchain according to claim 1, characterized in that, In step S2, the client performs local training of the model based on the local dataset, specifically by: adopting a strategy that combines cross-entropy loss and dynamic learning rate to improve the training efficiency and stability of the model within the federated learning framework; and after each round of local training, the client extracts the trained model parameters in the form of a dictionary for encryption and uploading. The client and server need to perform two encryption operations in each round of interaction, specifically: first, encrypting the local model parameters and uploading them to the server, and second, encrypting the global model aggregated by the server and sending it to the client; and two decryption operations, specifically: the server decrypts the model parameters for global aggregation and the client decrypts the aggregated parameters to update the local model. The server-side global aggregation specifically includes: after decrypting the model parameters of each client, the server designs the joint weight coefficients. The joint weighting coefficient Data volume of the client With verification loss The decision was made jointly, involving a large amount of data. Reflects the client's local knowledge capacity and verifies loss. The generalization ability of local models is measured by normalizing the loss difference using the Softmax function; finally, the server performs a weighted average of the effective parameters to generate a global model.

4. The cross-domain intelligent wireless sensing method based on federated learning and blockchain according to claim 1, characterized in that, In step S2, the improved Byzantine fault-tolerant consensus algorithm merges the PREPARE and COMMIT phases into a single COMBINED phase, unifying the maximum number of fault-tolerant nodes to 2f+1, reducing the number of message passes and simplifying the process. The Merkle tree-based data integrity verification mechanism specifically includes: dividing the encrypted model parameters into several fixed-length data blocks {B1, B2, ..., Bk}; calculating the hash value of each data block; merging the hash values ​​of data blocks layer by layer from bottom to top; if the number of data blocks is not a power of 2, using empty nodes to fill in the gaps until a root hash is generated; when verifying the integrity of a specific data block, obtaining the verification path from the hash value of that data block to the root hash; reconstructing the hash chain layer by layer based on the verification path; if the reconstructed hash value is consistent with the root hash, the verification is successful, and the blocks on the chain can be trusted by nodes to complete subsequent operations.

5. The cross-domain intelligent wireless sensing method based on federated learning and blockchain according to claim 1, characterized in that, In step S3, the Yolov8 deep learning model consists of three parts: Backbone, Neck, and Head. The Backbone part performs pooling operations through multiple convolutional layers to extract hierarchical features. The Neck part is used to fuse multi-scale features, specifically a Feature Pyramid Network structure. The Head part is responsible for the final classification and detection task, mapping the extracted features to the category space. The pruning and distillation technique for the Yolov8 deep learning model specifically includes: the pruning technique calculates the importance score of each channel by analyzing the scaling factor γ of the batch normalization layer; then, the channel with the lowest importance is selected for removal according to the pruning ratio; finally, the network dependencies are automatically updated to ensure model connectivity and functional integrity. The distillation technique employs a teacher-student model architecture, selecting a pruned Yolov8 model as the teacher model. The distillation loss is defined by the difference between the output probability distribution pt of the teacher model and the output probability distribution ps of the student model. The final training objective function is a weighted sum of the task loss and the distillation loss, where the task loss is the cross-entropy classification loss. The distillation loss and the task loss are weighted by a balancing coefficient.

6. The cross-domain intelligent wireless sensing method based on federated learning and blockchain according to claim 1, characterized in that, In step S3, the dynamic weighted fusion of multi-scale feature information through a gating mechanism specifically includes: obtaining the weights of the upper branch obtained by global average pooling and the weights obtained by the lower branch after processing, and concatenating these two weights; then generating gating weights through a fully connected layer and a Softmax function; and finally calculating the fused features based on the gating weights. Finally, Dropout is added between the two fully connected layers for random deactivation, and the output is obtained by mapping the fully connected layers to the class space.

7. The cross-domain intelligent wireless sensing method based on federated learning and blockchain according to claim 1, characterized in that, In step S4, data identification and classification specifically include: using a fully connected linear classifier to perform regression statistics on the feature information extracted in step S3; using supervised learning to train the model in combination with labeled sample data; distinguishing target action types by merging samples with the same features; and simultaneously performing feature learning based on sample data to update the model's internal parameters. The category prediction vector output by the fully connected linear classifier is input into the Softmax activation function. The Softmax activation function performs probability mapping on the category prediction vector to obtain the prediction probability corresponding to each category. The category corresponding to the highest probability is determined as the final perception result.

Citation Information

Patent Citations

  • Small target detection tracking method and system based on improved YOLOv8

    CN118675070A

  • Agricultural data security sharing method based on federal learning

    CN120151029A