Logit-based zero-knowledge oil and gas internet of things secure communication method
By employing a logit-based zero-knowledge communication method, combined with adaptive inference switching and homomorphic encryption for personalized and distillation models, the problem of high communication overhead in federated learning in the oil and gas Internet of Things is solved, achieving zero-knowledge security with low communication consumption and high model performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXI UNIV
- Filing Date
- 2025-07-07
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional federated learning methods in the oil and gas Internet of Things (IoT) suffer from high communication overhead due to frequent model parameter interactions, making them difficult to deploy effectively in edge computing scenarios with limited bandwidth or terminal resources. Furthermore, they fail to adequately adapt to the data distribution and resource differences of terminal devices.
We employ a zero-knowledge communication method based on logit, which selects personalized and distilled models through a server. Combined with adaptive inference switching and homomorphic encryption, we achieve personalized model training and aggregation within the encrypted domain, reducing communication volume and protecting privacy.
It significantly reduces the amount of communication data, enhances privacy and security, improves the performance of personalized models, is suitable for communication cost-sensitive oil and gas IoT edge environments, and enables efficient federated learning with zero-knowledge security.
Smart Images

Figure CN121077694B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) security technology, and in particular to a zero-knowledge secure communication method for oil and gas IoT based on logit. Background Technology
[0002] With the widespread deployment of oil and gas IoT devices, the amount of data generated in edge scenarios continues to grow, driving the rapid application of edge intelligence in fields such as smart oilfields and smart pipelines. Against this backdrop, how to achieve efficient distributed intelligent collaboration while ensuring the privacy of oil and gas IoT data has become a key research issue.
[0003] Federated Learning (FL), a typical privacy-preserving distributed learning framework, enables multiple terminal devices to jointly train a global model without sharing local data. However, traditional federated learning methods often employ a uniform model structure and synchronous update strategy, failing to adequately adapt to the differences in data distribution, resources, and task objectives among terminal devices. Therefore, Personalized Federated Learning (PFL) has been proposed, aiming to train personalized models adapted to the local data characteristics of each client. Although PFL has made progress in improving model adaptability, most of its methods still rely on frequent model parameter interactions and synchronous transmission with the server, resulting in significant communication overhead. This severely restricts practical deployment and application in edge computing scenarios with limited bandwidth or terminal resources. Summary of the Invention
[0004] To address the above technical problems, this invention provides a zero-knowledge oil and gas IoT secure communication method based on logit, comprising the following steps:
[0005] S1. System Initialization: The server establishes communication connections with each client, selects a basic model and distributes it to each client, while each client deploys the required training model and dataset. ;
[0006] S2. Each client prepares its personalized model and distillation model, and loads the adaptive inference switch.
[0007] S3. Client Training and Encrypted Upload: The client receives the logit and other data from the server, decrypts it, and calculates the consensus class logit. It then enables the adaptive inference switch to confirm whether to train the distillation model. The client starts training the personalized model, combining the consensus class logit and the distillation model for backpropagation. After training, the personalized model is obtained. The personalized model's logit is homomorphically encrypted and uploaded to the server, giving the server zero knowledge of the original data.
[0008] S4. After receiving the encrypted logit uploaded by all clients, the server performs calculations within the encrypted domain to complete the federated aggregation process. The aggregation result is stored in encrypted form and sent to each client for subsequent training.
[0009] S5. The client enters the next round of training: After receiving and decrypting the aggregated logit returned by the server, the client uses it as a guiding signal for the new round of training, and enters step S3 again to continuously iterate and gradually optimize the performance of the personalized model.
[0010] The technical solution further defined in this invention is:
[0011] Furthermore, in step S1, the basic model selected by the server includes the client's personalized model and the distillation model, while the client deploys the relevant initialization parameters before training.
[0012] As described above, in a zero-knowledge oil and gas IoT secure communication method based on logit, in step S2, both the personalized model and the distillation model are models specified by the server during initialization; the adaptive inference switch is defined as follows:
[0013] ;
[0014] in, The function indicates that it outputs 1 if the condition is met, and 0 otherwise; Tr indicates whether to enable large model training, with a value of 1 indicating that it is enabled and 0 indicating that it is disabled. Indicates logical OR; This represents the upper limit threshold of the distillation model's accuracy; once this value is reached, the distillation model will no longer be trained. This indicates the accuracy of the current distillation model; This represents the change in the accuracy of the personalized model, where and These represent the accuracy of the personalized model at time t and time t-1, respectively. This represents the tolerance threshold for the decrease in accuracy of the personalized model; when the decrease in accuracy of the personalized model exceeds [a certain threshold]... At that time, start training the distillation model.
[0015] As described above, in a zero-knowledge oil and gas IoT secure communication method based on logit, in step S3, the client receives logit and other data from the server. The other data is the sum of the number of samples belonging to the same class c in the tags of all clients.
[0016] As described above, in the zero-knowledge oil and gas IoT secure communication method based on logit, the client decryption and calculation steps in step S3 are as follows:
[0017] ;
[0018] in, This represents the number of samples labeled c; This represents the sum of the number of samples of the same class across all clients, i.e., other data received by the client from the server; This represents the average logit of this class on client k; Indicates homomorphic encryption; Indicates consecutive multiplication; Indicates corresponding to The decryption process involves using a key to decrypt the data; This represents the consensus class logit obtained after server aggregation and normalization, which is the average logit of all samples with label c.
[0019] As described above, in a zero-knowledge oil and gas IoT secure communication method based on logit, in step S3, This indicates homomorphic encryption; set it to Paillier homomorphic encryption.
[0020] As described above, in a zero-knowledge oil and gas IoT secure communication method based on logit, step S3 involves backpropagation using a consensus-based logit model and a distillation model, as shown in the following equation, which is calculated by minimizing the overall loss function:
[0021] ;
[0022] in, These represent three adaptively varying scalars used to adjust the weights of the corresponding loss function. ; This represents the i-th sample from client k. Indicates the label of the corresponding sample. Represents a dataset, Represents the consensus class logit, Represents cross-entropy loss, The KL divergence is represented by , and MSE represents the mean squared error. Represents a softmax mapping; This represents the nonlinear mapping defined by the personalized model. This represents the nonlinear mapping defined by the distillation model. W and W represent the feature layer outputs of the distillation model and the personalization model, respectively; This represents the cross-entropy loss during personalized model training. and These represent the first and second distillations in the distillation model, respectively. This represents the loss function obtained using the consensus class logit.
[0023] As described above, in a zero-knowledge oil and gas IoT secure communication method based on logit, the homomorphic encryption process after training in step S3 is as follows:
[0024] ;
[0025] in, This represents the additive homomorphic encryption process. This represents the number of samples with label c. This represents the average logit for this class on client k.
[0026] As described above, in a zero-knowledge oil and gas IoT secure communication method based on logit, in step S4, the server performs calculations within the encrypted domain, where multiplication of data within the encrypted domain is equivalent to adding data and then encrypting it, thus achieving aggregation under encryption; at the same time, after decryption on the client side, weighted normalization is performed, and finally a consensus-type logit is obtained.
[0027] As described above, in a zero-knowledge oil and gas IoT secure communication method based on logit, the server performs the following operations within the encrypted domain in step S4:
[0028] ;
[0029] ;
[0030] in, This represents the number of samples labeled c; This represents the average logit for this class on client k.
[0031] The beneficial effects of this invention are:
[0032] This invention significantly reduces the amount of communication data by introducing a consensus-based logit compression mechanism, and combines homomorphic encryption to achieve zero-knowledge protection for the server, further enhancing privacy and security. Simultaneously, a two-layer distillation strategy is adopted on the client side to improve the performance of personalized models, and an adaptive inference switch is added to reduce computational consumption. This method is particularly suitable for the oil and gas IoT edge environment, which is sensitive to communication costs and exhibits significant data heterogeneity. While significantly reducing communication consumption, it achieves zero-knowledge security for the server, improving the performance of the IoT system. Compared with existing federated learning methods, this invention not only achieves lower communication consumption but also higher model performance in real-world IoT environments. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the overall process of the present invention;
[0034] Figure 2 This is a comparison of experimental results between the method in this embodiment and the federated learning algorithms FedProto and GPFL model, based on the FMNIST dataset.
[0035] Figure 3 This figure shows a comparison of experimental results between the method in this embodiment and the federated learning algorithms FedProto and GPFL, based on the CIFAR-10 dataset. Detailed Implementation
[0036] This embodiment provides a zero-knowledge oil and gas IoT secure communication method based on logit, such as... Figure 1 As shown, it includes the following steps:
[0037] S1. System Initialization: The server establishes communication connections with each client, selects a basic model and distributes it to each client, while each client deploys the required training model and dataset. The basic model selected by the server includes the client's personalized model and the distillation model to ensure model consistency. The client also needs to deploy relevant parameters, such as learning rate, training batch and other relevant initialization parameters before training.
[0038] S2. Each client prepares the personalized model and the distillation model, and loads the adaptive inference switch. Both the personalized model and the distillation model are models specified by the server during initialization. The adaptive inference switch is mainly to reduce the invalid training of the distillation model, thereby reducing its computational cost.
[0039] The adaptive inference switch is defined as follows:
[0040] ;
[0041] in, The function indicates that it outputs 1 if the condition is met, and 0 otherwise; Tr indicates whether to enable large model training, with a value of 1 indicating that it is enabled and 0 indicating that it is disabled. This indicates a logical OR; in two conditions, This represents the upper limit threshold of the distillation model's accuracy; once this value is reached, the distillation model will no longer be trained. This indicates the accuracy of the current distillation model; This represents the change in the accuracy of the personalized model, where and These represent the accuracy of the personalized model at time t and time t-1, respectively. This represents the tolerance threshold for the decrease in accuracy of the personalized model; when the decrease in accuracy of the personalized model exceeds [a certain threshold]... At that time, start training the distillation model.
[0042] S3. Client Training and Encrypted Upload: The client receives the logit and other data from the server (i.e., the sum of the number of samples belonging to the same class c in all client labels), decrypts it, calculates the consensus class logit, and enables the adaptive inference switch to confirm whether to train the distillation model; the client starts training the personalized model, combines the consensus class logit and the distillation model for backpropagation, and obtains the personalized model after training is completed; the personalized model's logit is homomorphically encrypted and uploaded to the server, so that the server has zero knowledge of the original data.
[0043] The client-side decryption and its operation steps are as follows:
[0044] ;
[0045] in, This represents the number of samples labeled c; This represents the sum of the number of samples of the same class across all clients, i.e., other data received by the client from the server; This represents the average logit of this class on client k; This indicates homomorphic encryption; in this embodiment, Paillier homomorphic encryption is selected. Indicates consecutive multiplication; Indicates corresponding to The decryption process involves using a key to decrypt the data; This represents the consensus class logit obtained after server aggregation and normalization, which is the average logit of all samples with label c.
[0046] The backpropagation process combining consensus-based logit and distillation models is shown in the following equation, which is calculated by minimizing the overall loss function:
[0047] ;
[0048] in, These represent three adaptively varying scalars used to adjust the weights of the corresponding loss function. ; This represents the i-th sample from client k. Indicates the label of the corresponding sample. Represents a dataset, Represents the consensus class logit, Represents cross-entropy loss, The KL divergence is represented by , and MSE represents the mean squared error. Represents a softmax mapping; This represents the nonlinear mapping defined by the personalized model. This represents the nonlinear mapping defined by the distillation model. W and W represent the feature layer outputs of the distillation model and the personalization model, respectively; This represents the cross-entropy loss during personalized model training. and These represent the first and second distillations in the distillation model, respectively. This represents the loss function obtained using the consensus class logit.
[0049] The homomorphic encryption process after training is as follows:
[0050] ;
[0051] in, This represents the additive homomorphic encryption process. This represents the number of samples with label c. This represents the average logit for this class on client k.
[0052] S4. After receiving the encrypted logit uploaded by all clients, the server performs calculations within the encrypted domain to complete the federated aggregation process. The aggregation result is stored in encrypted form and sent to each client for subsequent training.
[0053] The operations performed by the server within the encrypted domain are as follows:
[0054] ;
[0055] ;
[0056] in, This represents the number of samples labeled c; This represents the average logit for this class on client k.
[0057] Multiplication of data within the encrypted domain is equivalent to adding the data and then encrypting it, achieving aggregation under encryption. Homomorphic encryption cannot perform division operations under encryption. In order to keep the server confidential and achieve zero-knowledge input, weighted normalization is not performed on the server, but only after decryption on the client, ultimately obtaining a consensus class logit. Since the server does not have a private key, it cannot decrypt any information, and it cannot even know the specific logit and sample number of each client, thus achieving zero-knowledge server aggregation under strong privacy protection.
[0058] S5. The client enters the next round of training: After receiving and decrypting the aggregated logit returned by the server, the client uses it as a guiding signal for the new round of training, and enters step S3 again to carry out continuous iteration, gradually optimizing the performance of the personalized model, and realizing an efficient and privacy-preserving federated learning process.
[0059] To comprehensively evaluate the superior performance of the method in practical applications, this embodiment selects the dedicated image datasets FMNIST and CIFAR-10, and compares and analyzes the method with other federated learning algorithms in terms of communication compression and accuracy. The experiment uses an NVIDIA GeForce RTX 4060TI GPU and is run in an environment built using the Python 3.9.19 programming language and the PyTorch 2.4.0 framework.
[0060] In practice, the two different datasets, FMNIST and CIFAR-10, are operated on separately. Each dataset is divided into a training set and a test set. Specifically, the FMNIST training set contains 55,000 images and the test set contains 15,000 images; the CIFAR-10 training set contains 50,000 images and the test set contains 10,000 images.
[0061] The method in this embodiment was experimentally compared with the FedProto federated learning algorithm and the GPFL model. In the FMNIST case, the total communication cost of the method in this embodiment was only 0.12 GB, significantly lower than the 0.16 GB of the FedProto method and the 0.87 GB of the GPFL method, representing a reduction in communication overhead of approximately 25% to 86%. Figure 2 As shown, the model accuracy of the method in this embodiment is improved by 1.63% in the case of FMNIST.
[0062] In the CIFAR-10 context, the total communication cost of the method in this embodiment is 0.12 GB, compared to 0.43 GB for FedProto and 1.31 GB for GPFL, representing a 72% to 90% reduction in communication cost; Figure 3 As shown, the model accuracy of the method in this embodiment is improved by 2.16% under CIFAR-10 conditions.
[0063] In summary, compared with other federated learning methods, the method proposed in this embodiment not only achieves lower communication consumption but also higher model performance in real-world IoT environments. By introducing a consensus-based logit compression mechanism, it significantly reduces the amount of communication data, and by combining homomorphic encryption to achieve zero-knowledge protection for the server, it further enhances privacy and security. Simultaneously, it employs a two-layer distillation strategy on the client side to improve the performance of personalized models, and adds an adaptive inference switch to reduce computational consumption. This approach is particularly suitable for the oil and gas IoT edge environment, which is characterized by communication cost sensitivity and significant data heterogeneity. While significantly reducing communication consumption, it achieves zero-knowledge security for the server, thereby improving the performance of the IoT system.
[0064] In addition to the embodiments described above, the present invention may have other implementations. All technical solutions formed by equivalent substitution or equivalent transformation fall within the protection scope claimed by the present invention.
Claims
1. A zero-knowledge secure communication method for oil and gas IoT based on logit, characterized in that: Includes the following steps: S1. System Initialization: The server establishes communication connections with each client, selects a basic model and distributes it to each client, while each client deploys the required training model and dataset. ; S2. Each client prepares its personalized model and distillation model, and loads the adaptive inference switch. S3. Client Training and Encrypted Upload: The client receives the logit and other data from the server, decrypts it, and calculates the consensus class logit. It then enables the adaptive inference switch to confirm whether to train the distillation model. The client starts training the personalized model, combining the consensus class logit and the distillation model for backpropagation. After training, the personalized model is obtained. The personalized model's logit is homomorphically encrypted and uploaded to the server, giving the server zero knowledge of the original data. S4. After receiving the encrypted logit uploaded by all clients, the server performs calculations within the encrypted domain to complete the federated aggregation process. The aggregation result is stored in encrypted form and sent to each client for subsequent training. S5. The client enters the next round of training: After receiving and decrypting the aggregated logit returned by the server, the client uses it as a guiding signal for the new round of training, and enters step S3 again to continuously iterate and gradually optimize the performance of the personalized model. In step S2, both the personalized model and the distillation model are models specified by the server during initialization; the adaptive inference switch is defined as follows: ; in, The function indicates that it outputs 1 if the condition is met, and 0 otherwise; Tr indicates whether to enable large model training, with a value of 1 indicating that it is enabled and 0 indicating that it is disabled. Indicates logical OR; This represents the upper limit threshold of the distillation model's accuracy; once this value is reached, the distillation model will no longer be trained. This indicates the accuracy of the current distillation model; This represents the change in the accuracy of the personalized model, where and These represent the accuracy of the personalized model at time t and time t-1, respectively. This represents the tolerance threshold for the decrease in accuracy of the personalized model; when the decrease in accuracy of the personalized model exceeds [a certain threshold]... At that time, start training the distillation model.
2. The zero-knowledge oil and gas IoT secure communication method based on logit according to claim 1, characterized in that: In step S1, the basic model selected by the server includes the client's personalized model and the distillation model, while the client deploys the relevant initialization parameters before training.
3. The zero-knowledge oil and gas IoT secure communication method based on logit according to claim 1, characterized in that: In step S3, the client receives logit and other data from the server. The other data is the sum of the number of samples belonging to the same class c in the labels of all clients.
4. The zero-knowledge oil and gas IoT secure communication method based on logit according to claim 3, characterized in that: In step S3, the client decryption and its operation steps are as follows: ; in, This represents the number of samples labeled c; This represents the sum of the number of samples of the same class across all clients, i.e., other data received by the client from the server; This represents the average logit of this class on client k; Indicates homomorphic encryption; Indicates consecutive multiplication; Indicates corresponding to The decryption process involves using a key to decrypt the data; This represents the consensus class logit obtained after server aggregation and normalization, which is the average logit of all samples with label c.
5. The zero-knowledge oil and gas IoT secure communication method based on logit according to claim 4, characterized in that: In step S3 This indicates homomorphic encryption; set it to Paillier homomorphic encryption.
6. The zero-knowledge oil and gas IoT secure communication method based on logit according to claim 1, characterized in that: In step S3, the backpropagation process combining the consensus-based logit model and the distillation model is shown in the following equation, which is calculated according to the comprehensive minimization of the loss function: ; in, These represent three adaptively varying scalars used to adjust the weights of the corresponding loss function. ; This represents the i-th sample from client k. Indicates the label of the corresponding sample. Represents a dataset, Represents the consensus class logit, Represents cross-entropy loss, The KL divergence is represented by , and MSE represents the mean squared error. Represents a softmax mapping; This represents the nonlinear mapping defined by the personalized model. This represents the nonlinear mapping defined by the distillation model. W and W represent the feature layer outputs of the distillation model and the personalization model, respectively; This represents the cross-entropy loss during personalized model training. and These represent the first and second distillations in the distillation model, respectively. This represents the loss function obtained using the consensus class logit.
7. The zero-knowledge oil and gas IoT secure communication method based on logit according to claim 1, characterized in that: In step S3, the homomorphic encryption process after training is as follows: ; in, This represents the additive homomorphic encryption process. This represents the number of samples with label c. This represents the average logit for this class on client k.
8. The zero-knowledge oil and gas IoT secure communication method based on logit according to claim 1, characterized in that: In step S4, the server performs calculations within the encrypted domain, where multiplication of data within the encrypted domain is equivalent to adding data and then encrypting it, thus achieving aggregation under encryption; simultaneously, after decryption on the client side, weighted normalization is performed to finally obtain the consensus class logit.
9. A zero-knowledge oil and gas IoT secure communication method based on logit according to claim 8, characterized in that: In step S4, the server performs the following operations within the encrypted domain: ; ; in, This represents the number of samples labeled c; This represents the average logit for this class on client k.