Iot device end data collaborative modeling and reasoning method based on privacy computing

By employing adaptive differential privacy technology and hierarchical federated learning, combined with dynamic encrypted parameter exchange, efficient collaborative modeling and accurate inference on IoT devices are achieved. This solves the problems of rigid privacy protection and low modeling efficiency in collaborative modeling and application of IoT device data, thereby improving model performance and inference accuracy.

CN120850324BActive Publication Date: 2025-12-09MIANYANG TEACHERS COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511351915.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2025-12-09
Estimated Expiration
2045-09-22

AI Technical Summary

Technical Problem

Collaborative modeling and application of IoT device data faces challenges in data privacy protection and distributed modeling efficiency. Existing technologies suffer from rigid privacy protection, low modeling efficiency, and insufficient inference accuracy.

Method used

A privacy-based computation approach is adopted, which identifies high-dimensional sensitive fields through adaptive differential privacy technology, dynamically adjusts noise intensity, and combines hierarchical federated learning and dynamic encrypted parameter exchange to achieve cross-device parameter collaborative update and inference.

Benefits of technology

While ensuring data privacy, this method improves modeling efficiency and inference accuracy, dynamically matches the strength of privacy protection, and solves the problems of rigid privacy protection and low modeling efficiency in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850324B_ABST
    Figure CN120850324B_ABST
Patent Text Reader

Abstract

The present application relates to a privacy computing-based Internet of Things device end data collaborative modeling and reasoning method, including two parts of collaborative modeling and collaborative reasoning: in collaborative modeling, first identify and locate the high-dimensional sensitive field in the local data, adopt adaptive differential privacy technology for preprocessing to construct the local training set, perform hierarchical training through the federal learning framework, the bottom layer performs gradient descent calculation, the upper layer realizes cross-device parameter collaborative update through a dynamic encryption parameter exchange mechanism, the collaborative server weights and aggregates the encrypted gradient parameters to generate global gradient parameters, and the device end updates the local model after decryption and optimizes the preprocessing process in reverse. In collaborative reasoning, the preprocessed data to be reasoned is initially reasoned, and the global reasoning result is obtained through the secure multi-party computation protocol and verified. The use of the Internet of Things device data is realized, and the privacy protection accuracy and flexibility are enhanced while the distributed modeling efficiency and reasoning reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of data privacy protection, and particularly relates to an Internet of Things device end data collaborative modeling and reasoning method based on privacy computing. BACKGROUND

[0002] With the rapid development of Internet of Things (IoT) technology, massive IoT devices continuously generate large-scale and various types of data. These data contain key information such as device running state, environmental characteristics, and user behavior. Through modeling analysis, advanced functions such as device fault prediction, energy optimization, and intelligent decision-making can be realized, providing core support for the intelligent upgrading of IoT applications. However, the collaborative modeling and application of IoT device data face two major challenges: data privacy protection and distributed modeling efficiency.

[0003] On the one hand, IoT device data often contains sensitive information. For example, smart home device data may involve user habits, activity tracks, and other privacy; industrial device data may contain production process parameters and device running secrets; and medical IoT device data is directly related to patient health information. If these data are uploaded to the cloud or third-party servers for modeling, it is easy to cause privacy leakage and damage user trust. Therefore, how to realize collaborative modeling under the premise of data availability and invisibility has become the primary prerequisite for IoT data application.

[0004] On the other hand, the distributed nature of IoT devices makes centralized modeling difficult to implement. Massive devices are distributed in different physical locations, and data transmission faces problems such as bandwidth limitations, high latency, and other issues. Moreover, the data format, collection frequency, and feature distribution of different devices differ, i.e., data heterogeneity, and directly aggregating data for modeling will lead to decreased model generalization ability. Traditional centralized modeling methods cannot adapt to the distributed architecture of IoT and are difficult to cope with the challenges brought by data heterogeneity.

[0005] To solve the above problems, some privacy protection and distributed modeling researches have appeared in the prior art, for example: local modeling and result sharing: each device trains a model locally and only uploads the model result to the server for aggregation. However, this method ignores the data association between devices, and the model performance is limited by the amount of data on a single device, making it difficult to form a globally optimal model. Encrypted transmission and centralized modeling: use encryption technology to transmit raw data to the server and train the model in an encrypted state. However, the calculation overhead of encrypting raw data is extremely large, and centralized training still cannot avoid the privacy risks of centralized data storage, and it is also difficult to handle data heterogeneity problems. Federated learning basic framework: collaborative modeling is achieved by exchanging model parameters rather than raw data, which protects data privacy to some extent. However, existing federated learning solutions mostly use fixed privacy strategies, such as uniform noise intensity and single encryption algorithm, which cannot dynamically adjust the protection strength according to the sensitivity of the data, easily leading to over-protection, i.e. excessive noise reducing model performance, or under-protection, i.e. sensitive data leakage; and the coordination between parameter aggregation and local model update is insufficient, making it difficult to optimize the data preprocessing process in reverse, affecting the model iteration efficiency.

[0006] In addition, in the model inference stage, the existing technology often ignores the collaborative inference needs of the Internet of Things device end, either relying on cloud-based centralized inference with privacy leakage and delay risks, or using local inference only with limited inference accuracy due to the inability to utilize the complementary nature of multi-device data.

[0007] Therefore, there is an urgent need for a collaborative method that can adapt to the distributed architecture of the Internet of Things, dynamically match the privacy protection strength, and balance the modeling efficiency and inference accuracy, to achieve data-in-motion model, dynamic balance between privacy protection and model performance for collaborative modeling and inference of Internet of Things device end data. The present application proposes a method for collaborative modeling and inference of Internet of Things device end data based on privacy computing, which realizes efficient collaborative modeling and accurate inference of distributed devices under the premise of protecting data privacy through the fusion of adaptive differential privacy, hierarchical federated learning, and dynamic encryption parameter exchange, solving the problems of rigid privacy protection, low modeling efficiency, and insufficient inference accuracy in the prior art. SUMMARY

[0008] The present application aims to provide a method for collaborative modeling and inference of Internet of Things device end data based on privacy computing, to solve the technical problems of rigid privacy protection, low modeling efficiency, and insufficient inference accuracy in the prior art.

[0009] To solve the above technical problems, the technical solution adopted by the present application is as follows:

[0010] In a first aspect, a method for collaborative modeling of Internet of Things device end data based on privacy computing is provided, comprising the following steps:

[0011] S1: Each Internet of Things device end acquires local data, identifies and locates high-dimensional sensitive fields in the local data, and pre-processes the local data using adaptive differential privacy technology;

[0012] S2: Each Internet of Things device end constructs a local training set based on the pre-processed data, and performs hierarchical training using a federated learning framework. The bottom layer performs gradient descent calculation and iterative optimization of local model parameters based on the local training set;

[0013] S3: The upper layer realizes cross-device parameter collaborative update through a dynamic encryption parameter exchange mechanism, selects the encryption level of the homomorphic encryption algorithm according to the sensitive coefficient of the parameter, and only uploads the encrypted gradient parameter to the collaborative server;

[0014] S4: The collaborative server receives the encrypted gradient parameters uploaded by each device end, calls the aggregation algorithm matching the encryption level for weighted aggregation, and generates global gradient parameters;

[0015] S5: Each Internet of Things device end receives the encrypted global gradient parameters, updates the local model parameters after decryption using the local key, and simultaneously reversely optimizes the data preprocessing process in step S1 according to the decryption result. Repeat steps S1 to S4 until the loss function value of the global model converges to a preset threshold, and obtain the global model trained collaboratively.

[0016] Preferably, the specific process of identifying and locating high-dimensional sensitive fields in local data in step S1 is as follows:

[0017] S11: Construct a sensitive feature library, including specified sensitive field types in Internet of Things scenarios, and label the corresponding sensitive levels and feature dimension ranges for each sensitive field;

[0018] S12: Convert the local data collected by the Internet of Things device into a structured data format, extract the field information therein, including field name, data type, value range, and metadata characteristics of occurrence frequency;

[0019] S13: Preliminary matching based on sensitive features using a combination of rule-based reasoning and machine learning classification: The rule-based reasoning part performs exact matching of the parsed field metadata with the features in the sensitive feature library; The machine learning classification part trains a classification model using labeled sensitive field samples for fields that are difficult to determine directly by rules, inputs the feature vector of the field, and outputs the probability value of the field being a sensitive field;

[0020] S14: Calculate the feature dimension of each sensitive field, specifically by quantitatively evaluating the number of sub-features contained in the field and the rank of the data dimension matrix. When the dimension index exceeds the preset threshold, it is determined as a high-dimensional sensitive field.

[0021] Preferably, the specific process of quantitatively evaluating the number of sub-features contained in the field and the indicator of the rank of the data dimension matrix in step S14 is as follows:

[0022] S141: Sub-feature splitting according to the data structure of the sensitive field: for a structured field, directly extracting the sub-fields contained therein as sub-features; for an unstructured field, splitting the sub-features by keyword extraction;

[0023] S142: Remove duplicate sub-features after splitting, count the final number of sub-features and set a sub-feature number threshold. When the number of sub-features of a sensitive field exceeds the threshold, it is preliminarily determined that it has a high-dimensional feature attribute;

[0024] S143: Select sample data containing the sensitive field, and convert the sub-features of each record into a numerical vector to form a data matrix M with dimensions of sample number x sub-feature number;

[0025] S144: Solve the rank R of the matrix M by singular value decomposition SVD of the matrix to count the number of non-zero singular values;

[0026] S145: Weighted scoring based on the number of sub-features and the rank of the matrix to obtain a comprehensive score. When the comprehensive score exceeds a predetermined threshold, the sensitive field is determined to be a high-dimensional sensitive field.

[0027] Preferably, the specific process of pre-processing local data using adaptive differential privacy technology in step S1 is as follows:

[0028] S15: Establish differentiated processing rules for high-dimensional sensitive fields and low-dimensional sensitive fields based on the determination in step S145. For high-dimensional sensitive fields, use a strengthened privacy protection strategy; for low-dimensional sensitive fields, use a basic privacy protection strategy;

[0029] S16: Select the type of noise to be added according to the data distribution characteristics of the sensitive field: use Gaussian noise when the sub-features of the high-dimensional sensitive field follow a normal distribution; otherwise, use Laplace noise;

[0030] S17: Dynamically calculate the noise intensity:

[0031] Privacy budget allocation: allocate the global privacy budget ε total to the sensitive fields according to their comprehensive scores;

[0032] Sub-feature dimension weight: for each sub-feature of a high-dimensional sensitive field, assign a corresponding weight according to its independence. The higher the independence of a sub-feature, the greater the noise intensity coefficient;

[0033] Data sparsity correction: reduce the noise intensity for sub-features with high sparsity;

[0034] The final noise intensity σ is calculated by the formula: σ = k x (ε i - ¹) x weight x sparsity correction coefficient, where k is a scene coefficient, preset according to the data sensitivity of the Internet of Things device, ε i is a local privacy budget;

[0035] Preferably, the specific process of step S2 in which the bottom layer performs gradient descent calculation based on the local training set is as follows:

[0036] S21: A random mini-batch gradient descent strategy is adopted, a small batch of samples of a specified size is randomly selected from the local training set and input into the local model, and the local model calculates the output prediction value through forward propagation;

[0037] S22: According to the difference between the prediction value and the true label of the sample, the loss value is calculated, and the selection of the loss function depends on the type of task: cross-entropy loss is commonly used for classification tasks, mean square error is used for regression tasks, and for binary classification tasks, the loss function L is represented as: L = - [y log (ŷ) + (1-y) log (1-ŷ)], where y is the true label (0 or 1) and ŷ is the prediction probability;

[0038] S23: The gradient of the loss function with respect to the local model parameters is calculated by the back propagation algorithm;

[0039] S24: According to the calculated gradient parameters, the local model parameters are updated using the gradient descent formula: w new =w old - η ∇ w , b new = b old -η ∇ b , η wherein w new is the updated model weight parameter, w old is the model weight parameter before updating, and ∇ w is the gradient of the model weight parameter, b new is the updated model bias parameter, b old is the model bias parameter before updating, and ∇ b is the gradient of the model bias parameter.

[0040] Preferably, the upper layer in step S3 realizes cross-device parameter collaborative update through a dynamic encryption parameter exchange mechanism. The specific process of selecting the encryption level of the homomorphic encryption algorithm according to the sensitivity coefficient of the parameter is as follows:

[0041] S31: For the gradient parameter generated by local model training, the associated sensitive features are extracted, including the input feature type corresponding to the parameter, the influence weight of the parameter on the model output, and the relevance of the parameter to historical privacy leakage events;

[0042] S32: The sensitivity coefficient S of the parameter is calculated by using the weighted scoring method. Based on the sensitivity coefficient, the parameter is divided into three levels: high-sensitive parameter: S≥0.7, medium-sensitive parameter: 0.3≤S<0.7, and low-sensitive parameter: S<0.3;

[0043] S33: Based on the sensitive level, the encryption level is matched:

[0044] High-sensitive parameter: full homomorphic encryption level, select full homomorphic encryption algorithm to generate public key, private key and evaluation key, the private key is saved locally by the device end, the public key is uploaded to the collaborative server, and the gradient parameter is encrypted;

[0045] Medium-sensitive parameter: partial homomorphic encryption level, select partial homomorphic encryption algorithm, use simplified key generation mechanism, encrypt the gradient parameter, and the server performs preset operation in the encrypted state;

[0046] Low-sensitive parameter: lightweight encryption level, select lightweight encryption algorithm, only simple encryption processing is performed on the parameter: the symmetric key shared by the device end and the server is used to encrypt the parameter;

[0047] Preferably, the collaborative server receives the encrypted gradient parameters uploaded by each device end in step S4, calls the aggregation algorithm matched with the encryption level for weighted aggregation, and generates the specific process of the global gradient parameter as follows:

[0048] S41: The collaborative server receives the encrypted gradient parameters uploaded by each device end. The encrypted gradient parameters have encryption level identifiers and device end identity identifiers. The corresponding aggregation algorithm is called according to the encryption level identifier;

[0049] S42: For high-sensitive parameters, the weighted average algorithm in the encrypted domain is used for aggregation. For medium-sensitive parameters, the hybrid algorithm of “weighted summation in the encrypted domain + normalization in the plaintext domain” is used for aggregation. For low-sensitive parameters, the weighted average algorithm in the plaintext domain is used for aggregation;

[0050] S43: The global gradient parameters obtained by aggregation of different encryption levels are integrated and converted into a matrix dimension matched with the device end model parameters to form a complete global gradient parameter set.

[0051] Preferably, the local model parameters are updated after decryption in step S5 using the local key, and the data preprocessing process in step S1 is optimized in reverse according to the decryption result, as follows:

[0052] S51: The device end decrypts using the corresponding local key according to the encryption level identifier of the global gradient parameter: for the high-sensitive gradient parameter encrypted by homomorphic encryption, the private key saved locally is used for decryption to obtain the high-sensitive global gradient G high ; for the medium-sensitive gradient parameter encrypted by partial homomorphic encryption, the medium-sensitive global gradient G mid is obtained through a preset decryption algorithm; for the low-sensitive gradient parameter encrypted by lightweight encryption, the low-sensitive global gradient G low is obtained by using a shared symmetric key decryption.

[0053] The device end fuses the decrypted global gradient with the current parameters of the local model, and adjusts the parameters using the gradient descent update formula: the updated local model parameters θ new = θ old - η × (G high + G mid + G low ).

[0054] Where θ old is the local model parameter before updating, and η is the learning rate.

[0055] S52: Adjust the noise intensity based on the gradient characteristics, redistribute the privacy budget based on the model performance, and identify and optimize the sensitive fields based on the data distribution deviation.

[0056] In a second aspect, a data collaborative inference method for Internet of Things device ends based on privacy computing is provided, which applies the global model trained by the method of any one of claims 1-4, comprising the following steps:

[0057] The Internet of Things device end obtains the data to be inferred, and processes the data to be inferred using the same differential privacy preprocessing method as in step S1.

[0058] The device end uses the locally saved global model to perform preliminary inference on the preprocessed data to be inferred, and obtains a local inference result.

[0059] Each device end collaboratively calculates the local inference result using a secure multi-party computation protocol to obtain a final global inference result, and the secure multi-party computation protocol ensures that each device end only obtains the final result without leaking its own local inference result.

[0060] The collaborative server or the designated device end verifies the accuracy and consistency of the global inference result using a preset verification algorithm, and if the verification fails, triggers a re-inference process, and increases the privacy budget of the data to be inferred during re-inference.

[0061] The secure multi-party computation protocol is a secret sharing based protocol, each local inference result is split into multiple secret shares, each device end holds part of the secret shares of other device ends, and the final result is obtained through local calculation and share exchange.

[0062] The beneficial effects of the present application include:

[0063] 1. By constructing a sensitive feature library, combining rule-based reasoning and machine learning classification to locate high-dimensional sensitive fields, and quantitatively evaluating based on the number of sub-features and the rank of the data dimension matrix, the accurate identification of sensitive data is realized. Compared with the traditional one-size-fits-all privacy protection method, it can adopt a strengthened privacy policy for high-dimensional sensitive fields and a basic policy for low-dimensional fields, avoiding the decline in data usability caused by excessive protection or the privacy leakage risk caused by insufficient protection. At the same time, the adaptive differential privacy technology selects the noise type according to the data distribution of the sensitive field, and dynamically calculates the noise intensity through global privacy budget allocation, sub-feature weight, and sparsity correction, while requiring the preprocessed data to meet the ε-δ privacy proof, which not only meets the privacy compliance requirements of different scenarios, but also achieves a dynamic balance between privacy protection and data utility, solving the problem of fixed noise parameters and poor adaptability in traditional differential privacy.

[0064] 2. The dynamic encryption parameter exchange mechanism matches the encryption level according to the sensitive coefficient of the gradient parameter, adopts full homomorphic encryption for high sensitivity, partial homomorphic encryption for medium sensitivity, and lightweight encryption for low sensitivity, ensuring that the parameters are always in an encrypted state during transmission and aggregation. The server can only perform aggregation operations in the encrypted domain and cannot decrypt the original parameters, completely avoiding the risk of parameter leakage and solving the problem of single parameter encryption strategy and insufficient privacy protection in traditional federated learning.

[0065] 3. The hierarchical training mechanism of the federated learning framework separates local optimization and global collaboration: the bottom layer realizes fast iteration of the local model through random mini-batch gradient descent, and the upper layer realizes cross-device collaboration through encrypted parameter exchange and weighted aggregation. This closed-loop design of local training-global aggregation not only reduces the data transmission amount between the device end and the server, but also fully utilizes the local computing resources of each device, solving the problem of limited bandwidth and high delay in traditional centralized modeling.

[0066] 4. According to the encryption level, the matching aggregation algorithm is called, and the weight is allocated based on the data quality score to ensure the accuracy of the global gradient parameters. At the same time, the device end optimizes the data preprocessing strategy through the decrypted results, forming an iterative closed loop of modeling-feedback-optimization, significantly improving the model convergence speed and final performance, and solving the problem of rigid aggregation strategy and difficulty in adapting to data feature changes in traditional federated learning.

[0067] 5、The data collaborative reasoning method adopts the differential privacy preprocessing consistent with the training phase to process the data to be reasoned, and realizes the collaborative calculation of the local reasoning results through the secure multi-party computation protocol based on secret sharing. Each device can only obtain the final global reasoning result and cannot restore the local results of other devices, which not only utilizes the complementarity of multi-device data to improve the reasoning accuracy, but also avoids information leakage in the reasoning process, and solves the contradiction between low local reasoning accuracy and poor cloud reasoning privacy in the traditional reasoning. BRIEF DESCRIPTION OF DRAWINGS

[0068] Figure 1 The figure is a flowchart of the data collaborative modeling method of the Internet of Things device end based on privacy computing.

[0069] Figure 2 The figure is a flowchart of the data collaborative reasoning method of the Internet of Things device end based on privacy computing.

[0070] Figure 3 The figure is a flowchart of the data collaborative modeling and reasoning of the Internet of Things device end based on privacy computing. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings Figures 1 to 3 Further detailed description of the present application:

[0072] Example 1

[0073] Referring to the drawings Figure 1 and Figure 3 As shown in the figure, the data collaborative modeling method of the Internet of Things device end based on privacy computing comprises the following steps:

[0074] S1: Each Internet of Things device end obtains local data, identifies and locates high-dimensional sensitive fields in the local data, and pre-processes the local data by using adaptive differential privacy technology. The adaptive differential privacy technology dynamically selects Laplace noise or Gaussian noise according to the dimension of the sensitive field, wherein the strength of the noise is jointly and dynamically adjusted according to the preset privacy budget and the data characteristic distribution. The preset privacy budget is determined by the following method: different privacy protection levels are divided according to the sensitive level of the Internet of Things device end data, each privacy protection level corresponds to an initial privacy budget, and the initial privacy budget is corrected in combination with the sample size of the data. The larger the sample size, the larger the corrected privacy budget.

[0075] S2: Each Internet of Things device end constructs a local training set based on the pre-processed data, and performs hierarchical training by using a federated learning framework. The bottom layer performs gradient descent calculation iteration to optimize local model parameters based on the local training set.

[0076] S3: The upper layer realizes cross-device parameter collaborative update through a dynamic encryption parameter exchange mechanism, selects an encryption level of a homomorphic encryption algorithm according to a sensitive coefficient of the parameter, and uploads the encrypted gradient parameter to the collaborative server. The homomorphic encryption algorithm is a partial homomorphic encryption algorithm or a full homomorphic encryption algorithm. When the partial homomorphic encryption algorithm is used, only the addition or multiplication operation of the model parameter is supported. When the full homomorphic encryption algorithm is used, both the addition and multiplication operations of the model parameter are supported.

[0077] S4: The collaborative server receives the encrypted gradient parameters uploaded by each device end, calls an aggregation algorithm matched with the encryption level to perform weighted aggregation, and generates global gradient parameters. The weight coefficient in the aggregation process is associated with the quality score of the preprocessed data in step S1, and the parameter encryption state is maintained during the aggregation process.

[0078] S5: Each Internet of Things device end receives the encrypted global gradient parameters, updates the local model parameters after decryption using the local key, and simultaneously reversely optimizes the data preprocessing process in step S1 according to the decryption result. Steps S1 to S4 are repeatedly executed until the loss function value of the global model converges to a preset threshold, and the global model trained collaboratively is obtained.

[0079] The hierarchical training in the embodiment is to split the model training process into two levels of local independent optimization and global collaborative update, which not only preserves the data privacy of each Internet of Things device, but also improves the model performance through cross-device collaboration. The bottom layer focuses on the optimization of model parameters within a single device, and the upper layer is responsible for integrating the training results of multiple devices to form globally consensus model parameters. The two layers form a closed loop through encrypted parameter interaction.

[0080] Gradient descent calculation based on a local sample set: The bottom layer is a training link independently executed by each Internet of Things device end, and the core is to optimize the model parameters using local data. Specifically, it includes: data basis: using the local data preprocessed by adaptive differential privacy in step S1, a training sample set containing input features and labels is constructed to ensure data privacy. The core operation is to iteratively optimize the local model parameters through the gradient descent algorithm. For example, the device end calculates the loss of the model prediction value and the true label based on the local sample, then solves the parameter gradient through back propagation, and finally updates the parameters such as weight and bias in the gradient direction. The characteristic is to use only local data and not to interact with other devices to avoid data leakage; the bottom layer calculation of each device is independently performed, which is suitable for the data characteristics of itself, such as temperature sensors in different regions that will be optimized for local models.

[0081] The upper layer achieves cross-device collaboration through a dynamic encryption parameter exchange mechanism: the upper layer is a collaboration link connecting each device and the collaboration server, and the core is to integrate the training results of multiple devices under the premise of protecting parameter privacy, specifically including: selecting different encryption levels according to the sensitivity of the gradient parameters, such as a high sensitivity coefficient of parameters strongly related to user behavior. Cross-device parameter collaboration process: after each device completes the bottom layer gradient descent, only the encrypted gradient parameters are uploaded to the collaboration server instead of the complete model or raw data; the server aggregates multiple device gradients in an encrypted state to generate global gradient parameters; then the encrypted global gradient is distributed to each device end to guide the device to update the local model. The parameter transmission is encrypted throughout, and the server and other devices cannot decrypt the original gradient, ensuring parameter privacy; by aggregating multiple device gradients, the model parameters of each device are integrated into global information, such as a local model of a device absorbing the training experience of other regional devices.

[0082] The bottom layer local training provides the upper layer with gradient information based on real data, and the upper layer encryption aggregation integrates the dispersed local optimization results into the global optimal direction. Through the cycle of bottom layer optimization→encrypted upload→global aggregation→local update, the local model parameters of each device gradually converge, and finally converge to a global model with better performance, achieving the privacy protection goal of data not moving and model moving, and enabling the model to learn the common rules of multiple devices, such as device fault characteristics in different scenarios.

[0083] Embodiment 2

[0084] On the basis of embodiment 1, the specific process of identifying and positioning the high-dimensional sensitive field in the local data in step S1 is as follows:

[0085] S11: Construct a sensitive feature library, including specified sensitive field types in the Internet of Things scenario, sensitive field types involving device identification information, user identity information, location information, and behavior data, device identification information including device unique serial number and MAC address, location information including latitude and longitude and installation address, and behavior data including device operation records and usage duration distribution, and labeling the corresponding sensitive level and feature dimension range for each sensitive field.

[0086] S12: Structurally analyze the local data: convert the local data collected by the Internet of Things device into a structured data format, extract the field information including field name, data type, value range, and metadata characteristics of frequency of occurrence. Among them, the local data includes unstructured sensor stream data and semi-structured log data.

[0087] S13: Preliminary matching of sensitive features: A combination of rule-based reasoning and machine learning classification is used. The rule-based reasoning part performs an exact match between the parsed field metadata and the features in the sensitive feature library. For example, if the value of a certain field meets the format rules of a device unique serial number, it is directly marked as a sensitive field. The machine learning classification part uses the annotated sensitive field samples to train a classification model for fields that are difficult to determine directly by rules. The classification model can be a vector machine or a random forest. The input field feature vector includes data entropy, association with other sensitive fields, etc., and outputs the probability value of the field being a sensitive field.

[0088] S14: Calculate the feature dimension of each sensitive field. For example, a single device ID is a low-dimensional sensitive field, while a composite behavior record field containing timestamp, location coordinates, and operation type is a high-dimensional sensitive field. The dimension index is quantitatively evaluated by the number of sub-features contained in the field and the rank of the data dimension matrix. When the dimension index exceeds the preset threshold, it is determined to be a high-dimensional sensitive field.

[0089] The specific process of quantitatively evaluating the field by the number of sub-features contained in the field and the rank of the data dimension matrix in step S14 is as follows:

[0090] S141: Sub-feature splitting of sensitive fields according to data structure: For structured fields, directly extract the sub-fields contained as sub-features. For example, the "device operation record" field can be split into "operation timestamp", "operation type", "operation object ID", "operation result status" and other sub-features. For unstructured fields such as text logs containing location and time information, sub-features are extracted by keyword extraction.

[0091] S142: Remove duplicate sub-features after splitting. For example, "timestamp" appearing multiple times in the same field is only counted as one. The final number of sub-features is N. Set a sub-feature number threshold. The feature number threshold can be set to 5. When the number of sub-features of a sensitive field exceeds the threshold, it is preliminarily determined to have high-dimensional feature properties.

[0092] S143: Select sample data containing the sensitive field, such as randomly selecting 1000 records containing the field. Convert the sub-features of each record into a numerical vector. Non-numerical sub-features are converted by one-hot encoding to form a data matrix M with dimensions sample number x sub-feature number. For example, a sensitive field contains 5 sub-features, and 1000 samples form a 1000x5 matrix.

[0093] S144: Solve the rank R of matrix M by singular value decomposition SVD to count the number of non-zero singular values. The size of the rank reflects the number of linearly independent sub-features in the matrix, i.e. the effective dimension of the sensitive field.

[0094] The threshold value R of the rank of the matrix is set to 3, and when the calculated rank exceeds the threshold value, it is indicated that the sensitive field contains multiple linearly independent sub-features and has a high-dimensional characteristic. At the same time, the ratio (R / N) of the number of sub-features N and the rank R is combined to evaluate the dimension redundancy, and the higher the ratio, such as R / N≥0.6, the stronger the independence of the sub-features and the more significant the high-dimensional attribute.

[0095] S145: A comprehensive score is obtained based on the weighted score of the number of sub-features and the rank of the matrix, and the specific formula is as follows:

[0096] Comprehensive score = α × (N / N max ) + β × (R / R max );

[0097] Wherein, N max is the maximum number of sub-features, R max is the maximum value of the number of sub-features, and α and β are weight coefficients, α+β=1.

[0098] When the comprehensive score exceeds the preset threshold value of the comprehensive score, the sensitive field is determined to be a high-dimensional sensitive field, and the preset threshold value of the comprehensive score can be set to 0.7.

[0099] The specific process of preprocessing the local data by using the adaptive differential privacy technology in step S1 is as follows:

[0100] S15: Differential processing rules are established based on the high-dimensional sensitive field and the low-dimensional sensitive field determined in step S145. For the high-dimensional sensitive field, because it contains multiple independent sub-features and has a higher risk of privacy leakage, a strengthened privacy protection strategy is adopted, and for the low-dimensional sensitive field, a basic privacy protection strategy is adopted to reduce the unnecessary influence of noise on data usability.

[0101] S16: The type of added noise is selected according to the data distribution characteristics of the sensitive field: when the sub-features of the high-dimensional sensitive field obey the normal distribution, Gaussian noise is used, and its probability density function is more consistent with the data distribution, so that the statistical characteristics of the data can be maintained after adding noise; otherwise, Laplace noise is used, which has stronger robustness to abnormal values and can effectively mask the true values of discrete data.

[0102] S17: Dynamically calculate the noise intensity:

[0103] Privacy budget allocation: The global privacy budget ε total is allocated according to the comprehensive score of the sensitive field, and the high-dimensional sensitive field obtains a higher proportion of the budget, such as 60% ε total for a field with a comprehensive score of 0.9, and the calculation formula is: the budget ε i of a certain field = ε totalX (comprehensive score i / Σ comprehensive score j ).

[0104] wherein ε i denotes the privacy budget allocated to the i-th sensitive field, the privacy budget is a core index for measuring the strength of privacy protection in differential privacy technology, and the smaller the value of ε i , the higher the strength of privacy protection imposed on the field, that is, the stronger the added noise, but the availability of data may be correspondingly reduced. Conversely, the larger the value of ε i , the lower the strength of privacy protection, and the availability of data is relatively higher. ε total is the global privacy budget, that is, the total privacy budget allocated to the preprocessing process of all sensitive fields in the current Internet of Things device end local data, which is a preset fixed value, and is usually determined comprehensively according to the specific privacy protection requirements, the security level of the application scenario, and the data availability requirements; comprehensive score i is the comprehensive score of the i-th sensitive field, which is calculated by weighting the number of sub-features, the rank of the data dimension matrix and other indicators described in the foregoing, for quantitatively evaluating the dimension characteristics and privacy leakage risk of the sensitive field. The higher the comprehensive score, the more significant the high-dimensional attribute of the field, and the greater the privacy leakage risk, so more privacy budget needs to be allocated to enhance protection. Σ comprehensive score j is the sum of the comprehensive scores of all sensitive fields, wherein j represents the index of all sensitive fields, j = 1, 2,..., n, n is the total number of sensitive fields, and is used to normalize the comprehensive scores of the sensitive fields, so that the sum of the privacy budgets allocated to the fields is equal to the global privacy budget ε total , that is, Σ ε i = ε total , so as to realize the reasonable allocation of privacy budget among different sensitive fields.

[0105] Sub-feature dimension weight: for each sub-feature of the high-dimensional sensitive field, a corresponding weight is given according to its independence (R / N ratio), and the higher the independence of the sub-feature, such as R / N ≥ 0.8, the greater the noise intensity coefficient, such as the base coefficient × 1.2, to ensure the privacy protection of the key sub-feature.

[0106] Data sparsity correction: for sub-features with high sparsity, such as a certain operation type with a frequency < 5% in the sample, the noise intensity can be reduced by multiplying by a 0.8 coefficient to avoid data distortion caused by excessive noise.

[0107] The calculation formula of the final noise intensity σ is: σ = k × (ε i -¹) × weight × sparsity correction coefficient, where k is the scene coefficient, preset according to the data sensitivity of the Internet of Things device, such as k = 1.5 for medical devices and k = 1.0 for ordinary home devices, and ε i is the privacy budget of the local scene.

[0108] After adding noise, verify the privacy protection effect and feedback the adjustment budget in the following way:

[0109] Calculate the ε-δ privacy loss of the data after adding noise. If the actual loss exceeds the allocated ε i , reduce the subsequent budget allocation of the field and increase the noise intensity of other fields to compensate; evaluate the data availability indicators (such as the decrease in prediction accuracy during model training), and if the decrease exceeds the preset threshold (such as 10%), reduce the noise intensity of the corresponding sub-feature, and fine-tune the privacy budget allocation proportion, giving priority to the data availability of core sub-features.

[0110] The process of calculating the ε-δ privacy loss of the data after adding noise is as follows:

[0111] When adding Laplace noise to sensitive fields, the noise follows a Laplace distribution with a parameter of b , and the probability density function f ( x )= e −|x| / b / 2 b At this time, the privacy loss calculation formula is: ε =Δ f / b , δ = 0;

[0112] Where: Δ f is the maximum difference between adjacent data sets, i.e. the global sensitivity, represented as Δ f =D,D′max∣f(D)−f(D′)∣; b is the scale parameter of the Laplace noise (b > 0), and the noise intensity decreases as b increases. Laplace noise can achieve pure ε-differential privacy (δ = 0), and the privacy loss is only measured by ε. The smaller the ε, the higher the privacy protection strength.

[0113] When adding Gaussian noise to sensitive fields, the noise follows a Gaussian distribution with a mean of 0 and a variance of σ 2 At this time, the privacy loss needs to consider both ε and δ, and the calculation formula is: ε = Δ f · σ ·(2ln(1 / δ)) 1 / 2 / σ 2 −(Δf) 2 / 2σ 2 ; Where: Δ f is the global sensitivity; σ 2 is the variance of the Gaussian noise,σ >0 indicates a larger variance and higher noise intensity; δ is a preset relaxation parameter, usually taken as a minimum value, and can be set to δ≤10. −5 ε represents the upper probability limit under which privacy constraints are allowed to be violated. Gaussian noise is suitable for high-dimensional data scenarios, and privacy loss needs to be controlled by ε and δ. The formula reflects the trade-off between noise variance, sensitivity, and privacy budget.

[0114] Example 3

[0115] Based on Example 1 or Example 2, the specific process of performing gradient descent calculation based on the local training set in step S2 is as follows:

[0116] S21: A Mini-batch SGD strategy is employed, randomly selecting a small batch of samples of a specified size from the local training set and inputting it into the local model. The size of the small batch can be set to 32 or 64 samples. The local model calculates the output prediction value through forward propagation. The local model uses a neural network model, where the input features undergo a linear transformation through the hidden layer, such as z = wx + b, where z is the output, w is the weight, x is the input, and b is the bias. After processing by the Sigmoid activation function, the final prediction result is obtained, including the probability distribution for classification tasks and continuous values ​​for regression tasks.

[0117] S22: Calculate the loss value based on the difference between the predicted value and the true label of the sample. The choice of loss function depends on the task type: cross-entropy loss is commonly used for classification tasks, and mean squared error (MSE) is commonly used for regression tasks. For binary classification tasks, the loss function L is expressed as: L=-[y・log (ŷ)+(1-y)・log (1-ŷ)], where y is the true label and ŷ is the predicted probability.

[0118] S23: Calculate the gradient of the loss function with respect to the local model parameters weights w and biases b using the backpropagation algorithm. Starting from the output layer, calculate the gradient layer by layer in reverse according to the chain rule; that is, first calculate the gradient of the loss function with respect to the output layer parameters, and then use this as a basis to calculate the gradient of the hidden layer parameters. For example, the gradient of weight w is ∇. w= ( ∂L / ∂z ) xᵀ ,in ∂L / ∂z To account for the partial derivatives of the loss with respect to the linear transformation result z, xᵀ This is the transpose of the input features.

[0119] S24: Update the local model parameters using the gradient descent formula based on the calculated gradient parameters: w new =w old - η ∇ w, b new = b old -η ∇ b wherein η is a learning rate, which needs to be dynamically adjusted according to the convergence of the model, for example, initially set to 0.01, and decayed with the number of iterations, w new is the updated model weight parameter, w old is the model weight parameter before updating, and w is the gradient of the model weight parameter, b new is the updated model bias parameter, b old is the model bias parameter before updating, and b is the gradient of the model bias parameter.

[0120] In step S3, the upper layer realizes cross-device parameter collaborative updating through a dynamic encryption parameter exchange mechanism. The specific process of selecting the encryption level of the homomorphic encryption algorithm according to the sensitive coefficient of the parameter is as follows:

[0121] S31: For the gradient parameters including weight gradient and bias gradient generated by local model training, extract the associated sensitive features, including the input feature type corresponding to the parameter, the influence weight of the core parameter whose contribution to the prediction result exceeds 30% on the model output, and the relevance of the parameter to historical privacy leakage events (including the type of parameters that have been attacked and exploited). The input feature type includes whether it involves high-sensitive data such as user identity and location.

[0122] S32: Calculate the sensitive coefficient S of the parameter using the weighted scoring method, the formula is: S = a x A + b x B + g x C, wherein A is the sensitive data level associated with the parameter, set to 1-5 points, the higher the more sensitive; B is the influence weight of the parameter on the model output, normalized to 0-1; C is the historical risk coefficient, the value range is 0-1, based on historical attack records; a, b, g are weight coefficients, a + b + g = 1, adjusted according to the scene, such as a is larger in the privacy priority scene. The value range of the sensitive coefficient S is 0-1, the closer to 1 indicates that the parameter privacy risk is higher, based on the sensitive coefficient, the parameters are divided into three levels: high-sensitive parameters: S >= 0.7, medium-sensitive parameters: 0.3 <= S < 0.7, low-sensitive parameters: S < 0.3.

[0123] S33: Match the encryption level based on the sensitive level:

[0124] High-sensitive parameter: full homomorphic encryption level, select full homomorphic encryption algorithm CKKS, support all operations such as addition and multiplication in encrypted state. Generate public key, private key and evaluation key, the private key is saved locally by the device end, and the public key is uploaded to the collaborative server. The gradient parameters are encrypted to ensure that the parameters are always in an encrypted state during transmission and aggregation, and the server cannot decrypt the original parameters. It is suitable for core gradient parameters directly related to user behavior, although the calculation complexity is high, but it can provide the highest level of privacy protection.

[0125] Medium-sensitive parameter: partial homomorphic encryption level, select partial homomorphic encryption algorithm Paillier, support addition or multiplication operations in encrypted state. Simplified key generation mechanism is adopted to reduce computational overhead, after encrypting the gradient parameters, the server can perform preset addition aggregation operations in encrypted state, but cannot perform complex operations; it is suitable for secondary parameters such as device running state related gradients, balancing privacy and efficiency.

[0126] Low-sensitive parameter: lightweight encryption level, select lightweight encryption algorithm such as hash-based encryption, only simple encryption processing is performed on the parameters. The device and the server share a symmetric key such as AES key to encrypt the parameters. The encrypted data can be quickly decrypted, suitable for simple operations after parameter aggregation; it is suitable for low-risk parameters such as device general state gradient to improve collaboration efficiency.

[0127] Dynamic adjustment of encryption level is also set: the collaborative server monitors the network security state in the parameter transmission process in real time, such as whether there is abnormal interception, traffic analysis attack, when detecting high-risk attacks, automatically upgrade the encryption level of the corresponding parameters by one level, such as medium-sensitive to high-sensitive, if the encryption level is too high, resulting in too low aggregation efficiency, such as single aggregation time exceeding the preset threshold, according to the redundancy of parameter sensitivity coefficient, such as the parameter S=0.71 in high-sensitive parameter can be appropriately downgraded, dynamically adjust the encryption level of part of the parameters, and record the adjustment log for subsequent optimization.

[0128] Through the above process, the parameter encryption level and the sensitivity coefficient can be accurately matched, while ensuring the privacy of high-sensitive parameters, reducing the encryption overhead of low-sensitive parameters, and improving the efficiency and security of cross-device parameter collaborative update.

[0129] Embodiment 4

[0130] On the basis of embodiment 1 or embodiment 2 or embodiment 3, the collaborative server receives the encrypted gradient parameters uploaded by each device end in step S4, calls the aggregation algorithm matched with the encryption level for weighted aggregation, and generates the specific process of the global gradient parameter as follows:

[0131] S41: The collaborative server receives the encryption gradient parameters uploaded by each device. The encryption gradient parameters include encryption level identifiers for fully homomorphic encryption, partially homomorphic encryption, and lightweight encryption, as well as device identity identifiers. The corresponding aggregation algorithm is called based on the encryption level identifier.

[0132] S42: For highly sensitive parameters, a weighted average algorithm within the encrypted domain is used for aggregation. The server retrieves the weight coefficients for each device from a pre-set weight library. The weights are determined based on the device's data quality score, historical contribution, etc.; higher data quality results in higher weights. In encrypted mode, the encrypted gradient parameter of each device is multiplied by its corresponding weight to obtain the encrypted weighted gradient. Addition is performed on all encrypted weighted gradients, and then the result is divided by the sum of the weights to obtain the encrypted global gradient parameter.

[0133] For example, if the encryption gradient of device 1 is E(g1) and the weight is w1, and the encryption gradient of device 2 is E(g2) and the weight is w2, then the global encryption gradient E(G) = [w1×E(g1)+w2×E(g2)] / (w1+w2), where all operations are performed within the encryption domain.

[0134] Sensitive parameters are aggregated using a hybrid algorithm of weighted summation within the encrypted domain and normalization within the plaintext domain. The server sums the products of the encryption gradient parameters and weight coefficients of each device within the encrypted domain to obtain the encrypted weighted sum E(S) = E(w1×g1 + w2×g2 + ... + w n ×g n ).

[0135] The server calculates the total weight W = w1 + w2 + ... + w n (Plaintext operation). The encrypted weighted sum E(S) is multiplied by the reciprocal of the total weight sum W to obtain the encrypted global gradient parameters E(G) = E(S) × (1 / W). Low-sensitivity parameters are aggregated using a plaintext domain weighted average algorithm. The server uses a shared symmetric key to decrypt the encrypted gradient parameters, obtaining the plaintext gradients g1, g2, ..., g... n .

[0136] Calculate the weighted average by weight: G = (w1×g1 + w2×g2 + ... + w n ×g n ) / (w1+w2+...+w n The obtained global gradient parameters are re-encrypted in a lightweight manner and then sent to various devices.

[0137] S43: Integrate the global gradient parameters obtained from different encryption levels, unify the format, and convert them into a matrix dimension that matches the parameters of the device-side model, forming a complete set of global gradient parameters.

[0138] The local model parameters are updated after decryption in step S5 using the local key, and the data preprocessing process in step S1 is optimized according to the decryption result as follows:

[0139] S51: The device side decrypts according to the encryption level identifier of the global gradient parameter, and calls the corresponding local key: for the high-sensitive gradient parameter encrypted by full homomorphism, the private key saved locally is used for decryption to obtain the high-sensitive global gradient G high ; for the medium-sensitive gradient parameter encrypted by partial homomorphism, the medium-sensitive global gradient G mid is obtained through a preset decryption algorithm Paillier; and for the low-sensitive gradient parameter encrypted by lightweight, the shared symmetric key is used for decryption to obtain the low-sensitive global gradient G low .

[0140] The device side fuses the decrypted global gradient with the current parameters of the local model, and adjusts the parameters using the gradient descent update formula: the updated local model parameters θ new = θ old - η × (G high + G mid + G low ).

[0141] Wherein, θ old is the local model parameter before updating, and η is the learning rate, which is consistent with or dynamically adjusted with the learning rate in the underlying gradient descent calculation. During the updating process, the matching of the gradient at each level in the parameter dimension needs to be ensured, such as the weight gradient corresponding to the weight parameter and the bias gradient corresponding to the bias parameter.

[0142] S52: Noise intensity adjustment based on gradient characteristics:

[0143] Gradient anomaly detection: analyze the absolute value and distribution of the global gradient, if the absolute value of the global gradient corresponding to a certain sub-feature is continuously small, such as less than 0.01, it means that the sub-feature may be overwhelmed by too much noise in the preprocessing, resulting in the model unable to effectively learn its rules. If the gradient fluctuates sharply, such as the standard deviation being greater than 0.5, it may be caused by uneven noise addition leading to data distortion.

[0144] Dynamic correction of noise parameters: for the sub-features with small gradient, the noise intensity can be reduced, which can reduce the Laplace noise scale parameter from 2.0 to 1.5; for the sub-features with sharp gradient fluctuation, the noise smoothness can be improved, such as using adaptive Gaussian noise, dynamically adjusting the noise scale according to the data variance, and reducing the interference of extreme noise on model training.

[0145] Privacy budget reallocation based on model performance:

[0146] Performance and privacy balance analysis: if the local model performance is lower than the corresponding preset threshold, and the decrypted global gradient shows that the gradient contribution of the high-dimensional sensitive field is low, such as less than 10%, it means that the privacy budget allocation of the high-dimensional field may be excessive, that is, the noise is too strong, which may cover the effective features.

[0147] Dynamic adjustment of privacy budget: calculate the performance-privacy ratio of the high-dimensional sensitive field: ratio = (gradient contribution of the field) / (allocated privacy budget ratio).

[0148] For high-dimensional fields with a performance-privacy ratio lower than 0.5, reduce their privacy budget allocation, which can be reduced from the original 40% to 30%, and allocate the released budget to low-dimensional fields or performance-sensitive fields with low performance-privacy ratio.

[0149] The revised budget formula for a certain field is adjusted to: εi'=ε total × (comprehensive score i × performance-privacy ratio coefficient) / Σ (comprehensive score j × performance-privacy ratio coefficient), where the performance-privacy ratio coefficient is dynamically assigned according to performance feedback, such as a field with significant performance improvement has a coefficient > 1.

[0150] Sensitive field identification optimization based on data distribution bias:

[0151] Gradient distribution bias analysis: if the decrypted global gradient shows systematic bias on a certain field, such as the gradient of a certain regional location field is always negative, it may be that the sensitive field identification in step S1 missed the hidden sensitive features of this field, such as the indirect association between this location field and user privacy. Iterative update of sensitive feature library: add this field to the candidate set of sensitive feature library, and recalculate its comprehensive score, such as through the number of sub-features and matrix rank evaluation. If the comprehensive score after re-evaluation is ≥ 0.7, mark it as a new high-dimensional sensitive field and include it in the scope of subsequent enhanced protection, such as adding higher intensity noise.

[0152] Referring to Figure 2 and Figure 3 , the data collaborative inference method based on privacy computing of the Internet of Things device end, the global model trained by any of the methods includes the following steps:

[0153] The Internet of Things device end obtains to-be-reasoned data, and processes the to-be-reasoned data by using the same differential privacy preprocessing manner as step S1. The device end uses a locally saved global model to preliminarily reason the preprocessed to-be-reasoned data, and obtains a local reasoning result. Each device end cooperatively calculates the local reasoning result by using a secure multi-party computing protocol, and obtains a final global reasoning result. The secure multi-party computing protocol ensures that each device end only obtains the final result and does not leak the local reasoning result thereof. The cooperative server or a designated device end verifies the accuracy and consistency of the global reasoning result by using a preset verification algorithm. If the verification fails, a re-reasoning process is triggered, and the privacy budget of the to-be-reasoned data is increased during re-reasoning. The secure multi-party computing protocol is a protocol based on secret sharing, each local reasoning result is split into multiple secret shares, each device end holds part of the secret shares of other device ends, and the final result is obtained through local calculation and share exchange.

Claims

1. A privacy computing-based Internet of Things device end data collaborative modeling method, characterized in that, The method comprises the following steps: S1: Each Internet of Things device end acquires local data, identifies and locates high-dimensional sensitive fields in the local data, and pre-processes the local data by using adaptive differential privacy technology; S2: Each Internet of Things device end constructs a local training set based on the pre-processed data, and performs hierarchical training by using a federated learning framework, wherein the bottom layer performs gradient descent calculation iteration to optimize local model parameters based on the local training set; S3: The upper layer realizes cross-device parameter collaborative updating by using a dynamic encryption parameter exchange mechanism, selects an encryption level of a homomorphic encryption algorithm according to a sensitive coefficient of the parameter, and uploads the encrypted gradient parameter to a collaborative server; S4: The collaborative server receives the encrypted gradient parameter uploaded by each device end, calls an aggregation algorithm matched with the encryption level to perform weighted aggregation, and generates global gradient parameters; S5: Each Internet of Things device end receives the encrypted global gradient parameter, updates the local model parameter after decryption by using a local key, and reversely optimizes the data preprocessing process in step S1 according to the decryption result; Steps S1 to S4 are repeatedly executed until the loss function value of the global model converges to a preset threshold, and a global model trained collaboratively is obtained; The specific process of updating the local model parameter after decryption by using the local key and reversely optimizing the data preprocessing process in step S1 according to the decryption result in step S5 is as follows: S51: The device end calls the corresponding local key for decryption according to the encryption level identifier of the global gradient parameter: for the high-sensitive gradient parameter of full homomorphic encryption, the local saved private key is used for decryption to obtain the high-sensitive global gradient G high ; for the medium-sensitive gradient parameter of partial homomorphic encryption, the preset decryption algorithm is used to obtain the medium-sensitive global gradient G mid ; for the low-sensitive gradient parameter of lightweight encryption, the shared symmetric key is used for decryption to obtain the low-sensitive global gradient G low ; The device end fuses the decrypted global gradient with the current parameters of the local model, and adjusts the parameters using the gradient descent update formula: the updated local model parameters θ new =θ old -η×(G high +G mid +G low ); where θ old is the local model parameter before update, and η is the learning rate. S52: Adjust the noise intensity based on the gradient characteristics, reallocate the privacy budget based on the model performance, and identify and optimize the sensitive fields based on the data distribution deviation.

2. The privacy computing based Internet of Things device end data collaborative modeling method according to claim 1, characterized in that, The specific process of identifying and locating the high-dimensional sensitive fields in the local data in step S1 is as follows: S11: Construct a sensitive feature library, including specified sensitive field types in the Internet of Things scene, and label the corresponding sensitive levels and feature dimension ranges for each sensitive field; S12: Convert the local data collected by the Internet of Things device into a structured data format, extract the field information therein, including the metadata features of the field name, data type, value range and frequency of occurrence; S13: Preliminarily match the sensitive features based on rule-based reasoning and machine learning classification: the rule-based reasoning part accurately matches the parsed field metadata with the features in the sensitive feature library; The machine learning classification part trains a classification model by using the labeled sensitive field samples, inputs the feature vector of the field, and outputs the probability value of the field being a sensitive field; S14: Calculate the feature dimension of each sensitive field, specifically by quantitatively evaluating the indicators of the number of sub-features contained by the field and the rank of the data dimension matrix, and determining that it is a high-dimensional sensitive field when the dimension indicator exceeds a preset threshold.

3. The privacy computing based Internet of Things device end data collaborative modeling method according to claim 2, characterized in that, The specific process of quantitatively evaluating the indicators of the number of sub-features contained by the field and the rank of the data dimension matrix in step S14 is as follows: S141: Split the sensitive fields into sub-features according to the data structure: directly extract the sub-fields contained by the structured fields as sub-features; and split the sub-features from the unstructured fields by keyword extraction; S142: Remove the repeated sub-features after splitting, count the final number of sub-features N, and set a threshold for the number of sub-features. When the number of sub-features of a sensitive field exceeds the threshold, it is preliminarily determined that it has high-dimensional feature properties; S143: Select sample data containing the sensitive field, and convert the sub-features of each record into a numerical vector to form a data matrix M with dimensions sample number x sub-feature number; S144: Calculate the rank R of matrix M by singular value decomposition (SVD) of the matrix to count the number of non-zero singular values; S145: Based on the number of sub-features and the rank of the matrix, a weighted score is obtained to obtain a comprehensive score. When the comprehensive score exceeds a pre-set threshold, the sensitive field is determined to be a high-dimensional sensitive field.

4. The privacy computing based Internet of Things device end data collaborative modeling method according to claim 3, characterized in that, The specific process of preprocessing local data in step S1 using adaptive differential privacy technology is as follows: S15: Based on the high-dimensional sensitive field and low-dimensional sensitive field determined in step S145, differential processing rules are established. For high-dimensional sensitive fields, a strengthened privacy protection strategy is adopted; for low-dimensional sensitive fields, a basic privacy protection strategy is adopted; S16: Select the type of noise to add according to the data distribution characteristics of the sensitive field: when the sub-features of the high-dimensional sensitive field follow a normal distribution, Gaussian noise is used; Otherwise, Laplace noise is used; S17: Dynamically calculate the noise intensity: Privacy budget allocation: The global privacy budget ε is allocated to each sensitive field total Allocation by the composite score of the sensitive field; Sub-feature dimension weight: For each sub-feature of the high-dimensional sensitive field, assign a corresponding weight according to its independence. The higher the independence of the sub-feature, the greater the noise intensity coefficient; Data sparsity correction: Reduce the noise intensity for sub-features with high sparsity; The calculation formula of the final noise intensity σ is: σ=k×(ε i - ¹)×weight×sparsity correction coefficient, wherein k is a scene coefficient, preset according to the data sensitivity of the Internet of Things device, ε i is a local privacy budget.

5. The privacy compute based service approach for IoT device end data collaborative modeling method according to claim 1, wherein, The specific process of step S2 is as follows: S21: Use a random mini-batch gradient descent strategy to randomly select a small batch of samples from the local training set and input them into the local model. The local model calculates the output prediction value through forward propagation; S22: Calculate the loss value according to the difference between the prediction value and the true label of the sample. The choice of loss function depends on the task type: cross-entropy loss for classification tasks, mean square error for regression tasks. For binary classification tasks, the loss function L is represented as: L = -[y・log (ŷ) + (1-y)・log (1-ŷ)], where y is the true label (0 or 1) and ŷ is the prediction probability; S23: Calculate the gradient of the loss function with respect to the local model parameters through the backpropagation algorithm; S24: update the local model parameters using the gradient descent formula according to the calculated gradient parameters: w new =w old -η・ ∇ w , b new = b old -η・ ∇ b , where η is the learning rate, w new is the updated model weight parameter, w old is the model weight parameter before updating, ∇ w is the gradient of the model weight parameter, b new is the updated model bias parameter, b old is the model bias parameter before updating, ∇ b is the gradient of the model bias parameter.

6. The privacy computing based Internet of Things device end data collaborative modeling method according to claim 5, characterized in that, In step S3, the upper layer realizes cross-device parameter collaborative update through a dynamic encryption parameter exchange mechanism. The specific process of selecting the encryption level of the homomorphic encryption algorithm according to the sensitivity coefficient of the parameter is as follows: S31: For the gradient parameters generated by local model training, extract their associated sensitive features, including the input feature type corresponding to the parameter, the influence weight of the parameter on the model output, and the relevance of the parameter to historical privacy leakage events; S32: Calculate the sensitivity coefficient S of the parameter using a weighted scoring method. Based on the sensitivity coefficient, the parameters are divided into three levels: high-sensitive parameters: S ≥ 0.7, medium-sensitive parameters: 0.3 ≤ S < 0.7, and low-sensitive parameters: S < 0.3; S33: Match the encryption level based on the sensitivity level: High sensitivity parameters: full homomorphic encryption level, select full homomorphic encryption algorithm to generate public key, private key and evaluation key, the private key is saved locally by the device end, the public key is uploaded to the collaborative server, and the gradient parameter is encrypted; Medium sensitive parameters: partial homomorphic encryption level, select partial homomorphic encryption algorithm, use simplified key generation mechanism, encrypt the gradient parameter, and the server performs preset operation in encrypted state; Low sensitive parameters: lightweight encryption level, select lightweight encryption algorithm, only simple encryption processing is performed on the parameters: the symmetric key shared by the device end and the server is used to encrypt the parameters.

7. The privacy compute based service approach for IoT device end data collaborative modeling method according to claim 1, wherein, The specific process of generating global gradient parameters in step S4 of the collaborative server receiving the encrypted gradient parameters uploaded by each device end and calling the aggregation algorithm matched with the encryption level is as follows: S41: The collaborative server receives the encrypted gradient parameters uploaded by each device end, the encrypted gradient parameters have encryption level identifier and device end identity identifier, and the corresponding aggregation algorithm is called according to the encryption level identifier; S42: For high sensitive parameters, use the weighted average algorithm in the encryption domain for aggregation, for medium sensitive parameters, use the hybrid algorithm of "weighted summation in the encryption domain + plaintext domain normalization" for aggregation, and for low sensitive parameters, use the weighted average algorithm in the plaintext domain for aggregation; S43: Integrate the global gradient parameters obtained by different encryption levels, convert them into matrix dimensions matched with the device end model parameters, and form a complete set of global gradient parameters.

8. A data collaborative reasoning method for IoT devices based on privacy computing, using a global model trained by the method described in any one of claims 1-7, characterized in that... The steps include: The Internet of Things device end obtains the data to be inferred, and processes the data to be inferred using the same differential privacy preprocessing method as step S1; The Internet of Things device end uses the locally saved global model to perform preliminary inference on the preprocessed data to be inferred, and obtains local inference results; Each Internet of Things device end uses a secure multi-party computation protocol to perform collaborative calculation on the local inference results, and obtains the final global inference result, wherein the secure multi-party computation protocol ensures that each device end only obtains the final result and does not leak its own local inference result; The collaborative server or the designated Internet of Things device end uses a preset verification algorithm to verify the accuracy and consistency of the global inference result, and if the verification fails, a re-inference process is triggered, and the privacy budget of the data to be inferred is increased during re-inference; The secure multi-party computation protocol is a secret sharing based protocol, which splits each local inference result into multiple secret shares, each device end holds part of the secret shares of other device ends, and obtains the final result through local calculation and share exchange.

Citation Information

Patent Citations

  • Private data analysis method and system based on collaborative learning and dynamic encryption

    CN119557909A

  • Data privacy protection method

    CN119848936A