Federal game vulnerability detection method, device and equipment based on privacy protection

By adopting blockchain smart contracts and homomorphic encryption technology in network security detection, a trusted environment is built and global model parameters that are anti-collective are generated, the problem of data leakage in traditional federated learning is solved and the level of data security and privacy protection is improved.

CN120455092AActive Publication Date: 2025-08-08BEIJING HAOWANG TECH CO LTD

Patent Information

Application Number
CN202510627494.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-08
Estimated Expiration
2045-05-15

AI Technical Summary

Technical Problem

There is a problem of data breach in existing network security detection, especially the lack of sufficient encryption protection in the traditional federated learning framework, resulting in the risk of model parameters being intercepted.

Method used

Blockchain smart contracts are used to build a trusted environment, integrate homomorphic encryption federated learning protocols, and process local data through differential privacy technology adaptively adjustable dynamic sensitivity and privacy parameters. Combining encryption weighted aggregation and threshold decryption mechanisms, we generate global model parameters that are anti-cohesion.

Benefits of technology

Ensure that data interaction is transparent and traceable, reduce the risk of data tampering, improve data security level and privacy compliance in network vulnerability detection scenarios, prevent co-conspiracy attacks, and enhance the security and robustness of the model aggregation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455092A_ABST
    Figure CN120455092A_ABST
Patent Text Reader

Abstract

The invention discloses a federated game vulnerability detection method, device and equipment based on privacy protection, relates to the technical field of network security protection, and aims to solve the problem of data leakage in the existing network security detection process. The method is applied to a vulnerability detection system, and the vulnerability detection system comprises a central server and a plurality of data terminals. The method comprises the following steps: constructing a trusted environment between a central server and a plurality of data terminals by using a block chain smart contract, and generating a federated learning protocol integrated with homomorphic encryption; a plurality of data terminals obtain privacy parameters through a federated learning protocol, and process local data by adopting a differential privacy technology of dynamic sensitivity and privacy parameter adaptive adjustment so as to send an encrypted perturbation gradient data set to the central server; the central server executes encryption weighted aggregation, and generates anti-collusion global model parameters through threshold decryption; and distributing the global model parameters to a plurality of data terminals, so that the plurality of data terminals execute vulnerability detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security protection technology, and in particular to a method, device and equipment for detecting federal game vulnerabilities based on privacy protection. Background Art

[0002] In an increasingly complex network environment, the patterns and frequencies of network attacks are increasing, so a more comprehensive and effective network security detection model is needed for protection.

[0003] Federated learning, a form of distributed machine learning, aims to address data silos by aggregating data from multiple parties to train models without directly exchanging raw data, thereby protecting user privacy and data security. Traditional federated learning frameworks, however, employ a synchronous update mechanism, requiring all participants to upload model updates simultaneously at the end of each training round. However, this lacks sufficient encryption during data transmission and model updates, creating the risk of model parameter interception and potentially leading to data leaks during subsequent network security testing. Summary of the Invention

[0004] The purpose of this application is to provide a federal game vulnerability detection method, device and equipment based on privacy protection, aiming to solve the problem of data leakage in the existing network security detection process.

[0005] To achieve the above objectives, this application adopts the following technical solutions: The present application provides a privacy-preserving federated game vulnerability detection method, which is applied to a vulnerability detection system comprising a central server and multiple data terminals. The method comprises: utilizing blockchain smart contracts to construct a trusted environment between the central server and the multiple data terminals, and generating a federated learning protocol integrating homomorphic encryption; controlling the multiple data terminals to obtain privacy parameters through the federated learning protocol, and processing local data using differential privacy technology with dynamic sensitivity and adaptive adjustment of privacy parameters to send an encrypted perturbation gradient dataset to the central server; after the central server receives the perturbation gradient dataset, performing encrypted weighted aggregation, and generating collusion-resistant global model parameters through a threshold decryption mechanism; and distributing the global model parameters to the multiple data terminals so that the multiple data terminals perform vulnerability detection.

[0006] The privacy-protection-based federal game vulnerability detection method provided in the embodiment of the present application builds a trusted environment through blockchain smart contracts and integrates homomorphic encryption protocols to ensure that the data interaction process is transparent and traceable without relying on third-party trust institutions, thereby reducing the risk of data tampering from the root; dynamic sensitivity adaptive differential privacy technology enables data terminals to intelligently adjust the noise injection intensity according to local data characteristics, maximizing data availability while ensuring privacy, and avoiding the problems of excessive ambiguity or insufficient protection caused by traditional fixed parameters; encrypted weighted aggregation and threshold decryption mechanism form a double security barrier. The former prevents the central server from directly accessing plaintext data, and the latter uses multi-node collaborative decryption threshold design. Even if some nodes are compromised, the complete model parameters cannot be restored, effectively resisting collusion attacks, and significantly improving the data security level and privacy compliance in network vulnerability detection scenarios.

[0007] In some embodiments, the above-mentioned privacy parameters include a privacy budget and a data freshness index. The above-mentioned differential privacy technology using dynamic sensitivity and adaptive adjustment of privacy parameters to process local data includes: generating time-varying sensitivity parameters based on the privacy budget, data freshness index and sensitivity parameters; generating adaptive noise based on the time-varying sensitivity parameters, and injecting local training gradients to form encrypted perturbation gradients; performing amplitude truncation processing on the encrypted perturbation gradients, and outputting a perturbation gradient data set that meets the preset norm constraints.

[0008] Based on this, this application generates time-varying sensitivity by integrating privacy budget and data freshness indicators, so that the noise injection intensity is dynamically optimized with the timeliness of the data. It not only avoids the loss of model accuracy caused by traditional differential privacy fixed noise, but also accurately matches the protection requirements of each stage of the data life cycle, achieves a balance between privacy protection and model utility in gradient perturbations, and strengthens local data leakage defense capabilities.

[0009] In some embodiments, the above-mentioned encrypted weighted aggregation is performed and collusion-resistant global model parameters are generated through threshold decryption, including: calculating the dynamic aggregation weight of each participating node based on the data quality score of the perturbed gradient data set; using a homomorphic encryption algorithm to perform weighted aggregation on the perturbed gradient data set to generate encrypted intermediate model parameters; and decrypting the intermediate model parameters into global model parameters through a threshold decryption mechanism.

[0010] Based on this, this application dynamically allocates aggregation weights through data quality scoring, suppresses the impact of low-quality or abnormal gradients on the global model, combines homomorphic encryption to ensure the encryption of weighted calculations throughout the process, and blocks a single node or a few colluding nodes from stealing the complete model through threshold decryption, doubly ensuring the security and robustness of the model aggregation process and preventing gradient reversal attacks.

[0011] In some embodiments, the above-mentioned threshold decryption mechanism is used to decrypt the intermediate model parameters into global model parameters, including: reconstructing the decryption key using the key fragments stored in the shards to jointly decrypt the intermediate model parameters; performing noise correction processing on the decrypted intermediate model parameters to eliminate the random disturbance introduced by differential privacy; and optimizing the corrected intermediate model parameters using the momentum optimization algorithm to output the collusion-resistant global model parameters.

[0012] Based on this, this application ensures that the decryption process requires multi-node collaboration through sharded key reconstruction, eliminating the risk of single-point key leakage; noise correction and momentum optimization simultaneously offset the model deviation of differential privacy noise, while maintaining the strength of privacy protection, improving the global model convergence accuracy, and blocking the possibility of colluding nodes inferring the original data through perturbation analysis.

[0013] In some embodiments, the privacy-preserving federated game vulnerability detection method provided in the present application also includes: when multiple data terminals send the detection result feature vectors to the central server, mapping the detection result feature vectors into knowledge graph nodes and constructing a multi-dimensional associated vulnerability topology structure; generating adversarial training samples based on the vulnerability topology structure and distributing them to the multiple data terminals to enhance defense capabilities; when multiple data terminals send the encrypted gradient parameters of the adversarial training to the central server, aggregating multiple encrypted gradient parameters to iteratively update the global model parameters.

[0014] Based on this, this application maps detection features into dynamically weighted knowledge graph nodes, reveals complex dependencies between vulnerabilities through three-dimensional correlation edges, generates adversarial samples to enhance the defense capabilities of local models, forms a closed-loop iteration of vulnerability detection and defense enhancement, improves the system's active protection capabilities against new unknown vulnerabilities, and blocks the attack chain propagation path.

[0015] In some embodiments, the above-mentioned mapping of the detection result feature vector into a knowledge graph node and constructing a multi-dimensional associated vulnerability topology structure includes: parsing the vulnerability attributes of the detection result feature vector, establishing a three-dimensional association edge of type-path-impact; using the attention mechanism to calculate the association strength of the three-dimensional association edge, and generating a dynamically weighted knowledge graph topology; encoding the knowledge graph topology into a feature vector as the input for the next round of training of the global model.

[0016] Based on this, this application constructs a vulnerability topology based on the three-dimensional association edges of type-path-impact, and combines the attention mechanism to dynamically quantify the vulnerability association strength, so that the knowledge graph encoding can accurately characterize the potential threat transmission path between vulnerabilities, provide interpretable feature input for the global model, enhance the context perception ability of vulnerability detection, and reduce the risk of false alarms and missed alarms.

[0017] In some embodiments, the above-mentioned use of blockchain smart contracts to build a trusted environment between a central server and multiple data terminals includes: defining data terminal access rules through blockchain smart contracts, generating a trusted data terminal list including an identity authentication mechanism; establishing a homomorphic encryption channel based on the trusted data terminal list, distributing initial model parameters and privacy budgets to the multiple data terminals; verifying the data compliance of the data terminals in real time, and dynamically updating the trusted data terminal list to maintain the credibility of the environment.

[0018] Based on this, this application uses smart contracts to implement terminal access control and real-time verification of data compliance, dynamically update the list of trusted nodes and establish encrypted channels, block unauthorized terminal access or malicious data injection, ensure the continued credibility of federated learning participants, and reduce the risks of collusion attacks and data pollution from the source.

[0019] The present application provides a privacy-protection-based federated game vulnerability detection device, which includes: a generation unit, which is used to use blockchain smart contracts to build a trusted environment between a central server and multiple data terminals, and generate a federated learning protocol with integrated homomorphic encryption; a processing unit, which is used to control multiple data terminals to obtain privacy parameters through the federated learning protocol, and use differential privacy technology with dynamic sensitivity and adaptive adjustment of privacy parameters to process local data, so as to send an encrypted perturbation gradient data set to the central server; the generation unit is also used to perform encrypted weighted aggregation after the central server receives the perturbation gradient data set, and generate anti-collusion global model parameters through a threshold decryption mechanism; the processing unit is also used to distribute the global model parameters to multiple data terminals, so that multiple data terminals can perform vulnerability detection.

[0020] In some embodiments, the above-mentioned privacy parameters include a privacy budget and a data freshness indicator. The above-mentioned processing unit is specifically used to: generate a time-varying sensitivity parameter based on the privacy budget, the data freshness indicator and the sensitivity parameter; generate adaptive noise based on the time-varying sensitivity parameter, and inject it into the local training gradient to form an encrypted perturbation gradient; perform amplitude truncation processing on the encrypted perturbation gradient, and output a perturbation gradient data set that meets the preset norm constraint.

[0021] In some embodiments, the above-mentioned generation unit is specifically used to: calculate the dynamic aggregation weight of each participating node based on the data quality score of the perturbation gradient data set; use the homomorphic encryption algorithm to perform weighted aggregation on the perturbation gradient data set to generate encrypted intermediate model parameters; and decrypt the intermediate model parameters into global model parameters through the threshold decryption mechanism.

[0022] In some embodiments, the above-mentioned generation unit is specifically used to: reconstruct the decryption key using the key fragments stored in the shards, and jointly decrypt the intermediate model parameters; perform noise correction processing on the decrypted intermediate model parameters to eliminate the random disturbance introduced by differential privacy; use the momentum optimization algorithm to optimize the corrected intermediate model parameters, and output the collusion-resistant global model parameters.

[0023] In some embodiments, the above-mentioned processing unit is also used to: when multiple data terminals send the detection result feature vectors to the central server, map the detection result feature vectors into knowledge graph nodes and construct a multi-dimensional associated vulnerability topology structure; generate adversarial training samples based on the vulnerability topology structure, and distribute them to the multiple data terminals to enhance defense capabilities; when multiple data terminals send the encrypted gradient parameters of the adversarial training to the central server, aggregate multiple encrypted gradient parameters to iteratively update the global model parameters.

[0024] In some embodiments, the above-mentioned processing unit is specifically used to: parse the vulnerability attributes of the detection result feature vector, establish three-dimensional correlation edges of type-path-impact; use the attention mechanism to calculate the correlation strength of the three-dimensional correlation edges, and generate a dynamically weighted knowledge graph topology; encode the knowledge graph topology into a feature vector as the input for the next round of training of the global model.

[0025] In some embodiments, the above-mentioned generation unit is specifically used to: define data terminal access rules through blockchain smart contracts, and generate a list of trusted data terminals including an identity authentication mechanism; establish a homomorphic encryption channel based on the trusted data terminal list, and distribute initial model parameters and privacy budgets to the multiple data terminals; verify the data compliance of the data terminals in real time, and dynamically update the list of trusted data terminals to maintain the credibility of the environment.

[0026] The present application provides an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the above-described privacy-protection-based federal game vulnerability detection method.

[0027] The present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal, the terminal executes the above-described privacy-protection-based federal game vulnerability detection method.

[0028] The present application provides a computer program product comprising instructions. When a computer executes the instructions, the computer executes the above-described method for detecting federal game vulnerabilities based on privacy protection.

[0029] The present application provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run computer programs or instructions to implement the above-described privacy-protection-based federal game vulnerability detection method.

[0030] Specifically, the chip provided in the embodiment of the present application also includes a memory for storing computer programs or instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0032] Figure 1 A framework diagram of a privacy-protection-based federal game vulnerability detection system provided in an embodiment of the present application; Figure 2 A flowchart of a method for detecting a federal game vulnerability based on privacy protection provided in an embodiment of the present application; Figure 3 A structural diagram of a federal game vulnerability detection device based on privacy protection provided in an embodiment of the present application; Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0034] In the description of this application, it should be understood that the terms "upper," "lower," "left," "right," "front," "back," "inner," "outer," and the like, indicating directions or positional relationships, are based on the directions or relative positional relationships shown in the accompanying drawings and are intended solely to facilitate the description of this application and simplify the description. They do not indicate or imply that the devices or components referred to must have a specific direction, be constructed, or operate in a specific direction. Therefore, they should not be construed as limitations on this application. Unless otherwise specified, the above-mentioned directionality descriptions may be flexibly set in actual application, provided that the relative positional relationships shown in the accompanying drawings are met.

[0035] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. Throughout this application, unless otherwise specified, "plurality" means two or more.

[0036] In the description of this application, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," "connected," and "connected" should be understood broadly. For example, they may refer to fixed connections, detachable connections, or integral connections. They may be directly connected, indirectly connected through an intermediary, or internally connected between two components. Those skilled in the art will understand the specific meanings of these terms in this application based on the specific circumstances.

[0037] In some embodiments, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, article, or apparatus that includes the element.

[0038] In some embodiments, words such as "exemplary" or "for example" are used to indicate an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0039] In the description of this specification, specific features, structures, materials or characteristics may be combined in an appropriate manner in any one or more embodiments or examples.

[0040] Among existing network security detection technologies, traditional centralized vulnerability detection solutions face the risk of data privacy leakage, while decentralized solutions often find it difficult to achieve efficient and unified model training and updates, and lack sufficient encryption protection during data transmission and model updates, posing the risk of model parameters being intercepted. At the same time, since differential privacy technology is not used to pre-process local data, uploaded data may still leak sensitive information.

[0041] In this context, to address the data leakage issues inherent in network security testing in related technologies, this application provides a privacy-preserving federated game vulnerability detection method, apparatus, and device. By employing differential privacy and homomorphic encryption, this method enables cross-organizational collaboration to build and update vulnerability detection models without sacrificing data privacy, improving data security and privacy protection during model training.

[0042] Figure 1 The embodiment of the present application provides a privacy-preserving federated game vulnerability detection system 100. The vulnerability detection system 100 includes a central server 110 and multiple data terminals (eg, a first data terminal 120, a second data terminal 130, and a third data terminal 140).

[0043] In some embodiments, central server 110 is responsible for organizing and managing the entire federated learning process. First data terminal 120, second data terminal 130, and third data terminal 140 each pre-process their local data using differential privacy techniques to ensure that the training data uploaded to central server 110 does not leak the original data information. The pre-processed data is used to learn vulnerability signatures.

[0044] Furthermore, the central server 110 aggregates the pre-processed data from the first data terminal 120 , the second data terminal 130 , and the third data terminal 140 based on the federated averaging algorithm to train a global model that focuses on identifying and predicting potential vulnerability patterns and risk indicators.

[0045] For example, during model training, homomorphic encryption technology is employed to ensure that model parameters cannot be intercepted or decrypted by third parties during transmission and updates. The trained model is then returned to the first, second, and third data terminals 120, 130, and 140, allowing them to perform vulnerability detection in their local environments without sharing actual data. This allows for continuous feedback of local detection results to optimize the global model.

[0046] Refer to the following Figure 2 The privacy protection-based federal game vulnerability detection method provided in an embodiment of the present application is described.

[0047] Figure 2 The embodiment of the present application provides a method flow chart of a method for detecting federal game vulnerabilities based on privacy protection. The subject executing the method can be an electronic device or various devices / modules in the electronic device, such as an integrated circuit or chip, and the embodiment of the present application does not make specific limitations on this.

[0048] For example, Figure 2As shown, the privacy protection-based federated game vulnerability detection method provided in the embodiment of the present application may include the following S201 to S204: S201. Use blockchain smart contracts to build a trusted environment between the central server and the multiple data terminals, and generate a federated learning protocol that integrates homomorphic encryption.

[0049] In some embodiments, data terminal access rules can be defined through blockchain smart contracts to generate a list of trusted data terminals including an identity authentication mechanism; and a homomorphic encryption channel can be established based on the list of trusted data terminals to distribute initial model parameters and privacy budgets to multiple data terminals.

[0050] In the embodiment of the present application, the above-mentioned access rules can be a hardware-software-behavior three-dimensional authentication system. Specifically, a three-dimensional identity authentication mechanism can be constructed by combining TPM hardware fingerprint, attribute encryption module, and historical behavior profiling.

[0051] For example, hardware-level authentication requires a pre-installed Trusted Platform Module (TPM) on the data terminal, which generates a unique device identity key pair through a key exchange protocol. Furthermore, during registration, a public key hash value must be submitted to the blockchain, where a smart contract verifies the immutability of the hardware fingerprint.

[0052] For example, software-level authentication: deploy a lightweight attribute encryption module, require the data terminal to install an encryption library that meets preset standards, and regularly obtain the certificate revocation list from the blockchain.

[0053] For example, behavioral-level authentication: build a historical behavior portrait model, record indicators such as the success rate, response delay, and number of abnormal interruptions of data terminals participating in federated learning, and evaluate credibility in real time through a support vector machine classifier.

[0054] In the embodiment of the present application, the trusted data terminal list may store multiple data terminals that meet the access rules.

[0055] For example, the central server may determine whether each data terminal satisfies the hardware-software-behavior three-dimensional authentication system according to the set system, and add the data terminals that meet the three-dimensional authentication system to the trusted data terminal list.

[0056] In the embodiments of the present application, homomorphic encryption refers to generating a shared key between trusted data terminals.

[0057] For example, after determining a list of trusted data terminals that meet the hardware-software-behavior three-dimensional authentication system, a data transmission channel may be established for each trusted data terminal, and a key may be configured.

[0058] In an embodiment of the present application, the privacy budget is used to blur the contribution of training samples in the training process when performing model training on a data terminal, thereby preventing attackers from inferring the original training samples.

[0059] Exemplarily, the central server distributes the initial model parameters and privacy budget to the trusted data terminal through the configured homomorphic encryption channel. The data terminal then uses the privacy budget and initial model parameters for local training to obtain trained data.

[0060] Furthermore, after obtaining the trained data, the data terminal can send the data to the central server. The central server receives the data feedback from multiple data terminals, verifies the data compliance of the data terminals in real time, and dynamically updates the trusted data terminal list to maintain the credibility of the environment.

[0061] In some embodiments, after the data terminal completes local model training, it will package the encrypted gradient data, training log and hardware status information and send them to the central server. The central server can verify whether the data sent by the data terminal is compliant based on the three-dimensional authentication system set in advance, and remove non-compliant data terminals from the list of trusted data terminals.

[0062] For example, the isolation forest algorithm can be used to detect metrics such as gradient sparsity and directional consistency. If a data terminal submits a gradient with a variance exceeding twice the global mean for three consecutive times, the system will mark it as "suspected anomaly" and reduce its aggregation weight to 0.3 (the normal weight is 1.0). Furthermore, the system analyzes whether the training time meets expectations based on the hardware configuration reported by the data terminal during registration (such as CPU model and memory capacity). If the training time exceeds the limit, the data terminal will be deemed non-compliant and removed.

[0063] In this way, this application uses smart contracts to implement terminal access control and real-time verification of data compliance, dynamically update the list of trusted nodes and establish encrypted channels, block unauthorized terminal access or malicious data injection, ensure the continued credibility of federated learning participants, and reduce the risk of collusion attacks and data pollution from the source.

[0064] S202. Control multiple data terminals to obtain privacy parameters through the federated learning protocol, and use differential privacy technology with dynamic sensitivity and adaptive adjustment of privacy parameters to process local data to send encrypted perturbation gradient data sets to the central server.

[0065] In the embodiment of the present application, the privacy parameters include a privacy budget and a data freshness index.

[0066] Among them, the data freshness index is defined by formula (1) as a weighted combination of the time decay function and the data activity factor.

[0067] Formula (1) Among them, F is the data freshness index, α is the time decay weight coefficient, λ is the decay rate constant, Δt is the interval length from data generation to the current moment; β is the activity weight coefficient, and A(t) is the dynamic activity score based on data call frequency and task relevance.

[0068] In some embodiments, after obtaining the privacy parameter and the data freshness index, the data terminal may first generate a time-varying sensitivity parameter based on the privacy budget, the data freshness index, and the sensitivity parameter.

[0069] The sensitivity parameter is defined as a weighted combination of global sensitivity and local sensitivity through formula (2).

[0070] Formula (2) Among them, S is the sensitivity parameter, ω is the data distribution weight coefficient, S g is the global L2 norm boundary based on the model parameter space, S l is an estimate of the local condition number based on the local data distribution characteristics.

[0071] For example, to generate time-varying sensitivity parameters, we can first calculate the real-time value of the data freshness indicator based on the distributed timestamp service stored in the blockchain, then call the sensitivity calculation module preset in the smart contract, combine the covariance matrix eigenvalue decomposition results of the local data set, dynamically calculate the local sensitivity, and further aggregate the global sensitivity through the federated averaging mechanism. Based on the data freshness, we can adaptively adjust the weight through formula (3) to obtain the delay sensitivity parameter.

[0072] Formula (3) Among them, σ() is the Sigmoid function, k is the freshness sensitivity coefficient, and θ is the bias term, which realizes the nonlinear change of sensitivity weight with data timeliness.

[0073] In some embodiments, after obtaining the time-varying sensitivity parameter, the data terminal may also generate adaptive noise based on the time-varying sensitivity parameter and inject the local training gradient to form an encrypted perturbation gradient.

[0074] For example, a variational noise generator based on the Laplace mechanism can be deployed through formula (4) to generate adaptive noise that matches the data distribution characteristics according to the time-varying sensitivity parameter and privacy budget.

[0075] Formula (4) Among them, δ is the relaxation probability parameter, and the noise variance is proportional to the square of the sensitivity, so as to achieve dynamic optimization of noise intensity with data freshness.

[0076] Furthermore, the data terminal can perform amplitude truncation processing on the encrypted perturbation gradient and output a perturbation gradient data set that meets the preset norm constraint.

[0077] For example, a multi-dimensional norm-constrained gradient truncation layer can be constructed to perform joint truncation processing on the encrypted perturbation gradient using formula (5).

[0078] Formula (5) Among them, τ L2 is the L2 norm threshold coefficient, τ cos is the cosine similarity retention threshold, and μ(g) is the historical gradient mean, which can prevent gradient explosion while retaining the effective update direction.

[0079] In this way, this application generates time-varying sensitivity by integrating privacy budget and data freshness indicators, so that the noise injection intensity is dynamically optimized with the timeliness of the data. It not only avoids the loss of model accuracy caused by traditional differential privacy fixed noise, but also accurately matches the protection requirements of each stage of the data life cycle, achieves a balance between privacy protection and model utility in gradient perturbations, and strengthens local data leakage defense capabilities.

[0080] S203: After receiving the perturbed gradient dataset, the central server performs encrypted weighted aggregation and generates anti-collusion global model parameters through a threshold decryption mechanism.

[0081] In an embodiment of the present application, encrypted weighted aggregation includes a dynamic weight allocation mechanism for multi-dimensional quality perception, specifically constructing a gradient quality assessment model through blockchain smart contracts. The model integrates three dimensions: data freshness index, behavior credibility score and model contribution to generate dynamic aggregation weights.

[0082] In some embodiments, after receiving the disturbance gradient dataset, the central server may score the data quality of the disturbance gradient dataset and calculate the dynamic aggregation weight of each participating node.

[0083] For example, the gradient quality assessment model may use formula (6) to calculate the dynamic aggregation weight.

[0084] Formula (6) Among them, W i is the aggregation weight of the i-th data terminal, W i(t) Score the credibility of the behavior based on the consistency of the historical gradient update direction, C i is the model convergence contribution index (calculated by Shapley value method), Fi(t) is the data freshness index of data terminal i, 、 、 is an adjustable weight coefficient.

[0085] In some embodiments, after calculating the dynamic aggregation weight, the central server can use a homomorphic encryption algorithm to perform weighted aggregation on the perturbed gradient data set to generate encrypted intermediate model parameters, and decrypt the intermediate model parameters into global model parameters through a threshold decryption mechanism.

[0086] For example, the central server can perform weighted aggregation operations based on dynamic aggregation weights using an improved homomorphic encryption algorithm (such as Paillier) to generate encrypted intermediate model parameters. This algorithm implements distributed weight mapping in the ciphertext domain through blockchain smart contracts, ensuring that the weighted calculation process satisfies the additive homomorphic property.

[0087] In this way, this application dynamically allocates aggregation weights through data quality scores, suppresses the impact of low-quality or abnormal gradients on the global model, combines homomorphic encryption to ensure the encryption of weighted calculations throughout the process, and blocks a single node or a few colluding nodes from stealing the complete model through threshold decryption, doubly ensuring the security and robustness of the model aggregation process and preventing gradient reversal attacks.

[0088] Optionally, decrypting the intermediate model parameters into global model parameters through the threshold decryption mechanism can be achieved by the following steps: Step P1: Reconstruct the decryption key using the key fragments stored in the shards and jointly decrypt the intermediate model parameters.

[0089] In some embodiments, the decryption threshold can be dynamically adjusted based on the node activity history stored in the blockchain. For example, the real-time threshold value can be calculated using formula (7).

[0090] Formula (7) Among them, T(t) is the decryption threshold at time t, N(t) is the number of current participating nodes, H c(t) is the number of historical collusion events, and γ and δ are adjustment coefficients. When an abnormal decryption request is detected, the smart contract automatically triggers the threshold recalculation process.

[0091] Furthermore, after obtaining the adjusted decryption threshold, a sharded decryption scheme can be implemented using an improved secret sharing scheme, requiring multiple trusted data terminals to jointly submit key shards. The key shard generation process is combined with a hardware fingerprint binding mechanism, where each shard contains a hash value of the data terminal's trusted platform module (TPM) hardware unique identifier.

[0092] In an embodiment of the present application, an anti-collusion verification protocol can also be deployed during the decryption process to verify the legitimacy of each shard provider through zero-knowledge proof.

[0093] For example, (zk-SNARKs technology) can be used to prove that "shard holders have legitimate keys and have not participated in historical collusion" without revealing the specific shard content.

[0094] Step P2: Perform noise correction on the decrypted intermediate model parameters to eliminate the random disturbance introduced by differential privacy.

[0095] Exemplarily, the noise correction process adopts a variational auto encoder (VAE) structure based on data freshness, and realizes noise component stripping through formula (8).

[0096] Formula (8) Where g1 is the corrected gradient, and the VAE encoder-decoder parameters θ are dynamically adjusted according to the data freshness F(t). When F(t) is lower than the threshold, the high-order noise suppression layer is activated.

[0097] Step P3: Use momentum optimization algorithm to optimize the corrected intermediate model parameters and output the anti-collusion global model parameters.

[0098] For example, the momentum optimization algorithm implements a weighted fusion of historical gradients and current updates by introducing a time decay factor. For example, based on formula (9).

[0099] Formula (9) Among them, v t is the momentum term at time t, μ is the momentum decay coefficient, η is the learning rate, and λ is the freshness sensitivity coefficient. This design allows the model update direction to maintain historical inertia while responding to the timeliness characteristics of fresh data.

[0100] In this way, this application ensures that the decryption process requires multi-node collaboration through sharded key reconstruction, eliminating the risk of single-point key leakage; noise correction and momentum optimization simultaneously offset the model deviation of differential privacy noise, while maintaining the strength of privacy protection, improving the global model convergence accuracy, and blocking the possibility of colluding nodes inferring the original data through perturbation analysis.

[0101] S204: Distribute the global model parameters to multiple data terminals, so that the multiple data terminals perform vulnerability detection.

[0102] In some embodiments, the central server may send the optimized global model parameters to each data terminal, so that the data terminal performs vulnerability detection according to the global model parameters.

[0103] In the privacy-protection-based federal game vulnerability detection method provided in the embodiment of the present application, a trusted environment is constructed through blockchain smart contracts and a homomorphic encryption protocol is integrated to ensure that the data interaction process is transparent and traceable without relying on a third-party trust agency, thereby reducing the risk of data tampering from the root; dynamic sensitivity adaptive differential privacy technology enables the data terminal to intelligently adjust the noise injection intensity according to local data characteristics, maximize data availability while ensuring privacy, and avoid excessive ambiguity or insufficient protection caused by traditional fixed parameters; encrypted weighted aggregation and threshold decryption mechanism form a double security barrier. The former prevents the central server from directly accessing plaintext data, and the latter uses multi-node collaborative decryption threshold design. Even if some nodes are compromised, the complete model parameters cannot be restored, effectively resisting collusion attacks and significantly improving the data security level and privacy compliance in network vulnerability detection scenarios.

[0104] Optionally, after performing vulnerability detection, the data terminal may send the obtained detection result feature vector to the central server, so that the central server iteratively updates the global model parameters.

[0105] In the embodiment of the present application, the detection result feature vector includes multi-dimensional vulnerability fingerprint information.

[0106] In some embodiments, the data terminal can locally deploy a lightweight vulnerability detection engine that integrates a symbolic execution-based taint analysis module and an attention-based graph neural network classifier.

[0107] For example, the taint analysis module can trace the data flow path and extract vulnerability triggering conditions (such as buffer overflow length and structured query language (SQL) injection keywords); the graph neural network classifier based on the attention mechanism constructs the control flow graph adjacency matrix and calculates the node embedding vector H through formula (10) (l+1) .

[0108] Formula (10) Among them, H (l) is the node feature of the first layer, A is the adjacency matrix, D is the degree matrix, W (l) is the trainable weight and σ is the activation function.

[0109] Furthermore, the taint analysis results can be fused with the embedded vector to generate a three-dimensional feature vector containing vulnerability type, trigger path, and risk level.

[0110] Exemplarily, formula (11) is used to achieve cross-modal feature fusion.

[0111] Formula (11) Among them, V1 is the taint analysis feature (such as data stream length, application interface call sequence), V2 is the graph embedding vector output by the graph neural network, and V3 is the metadata feature (such as file hash, process ID).

[0112] In some embodiments, after receiving the detection result feature vector, the central server can map the detection result feature vector into a knowledge graph node, construct a multi-dimensional associated vulnerability topology structure, and generate adversarial training samples based on the vulnerability topology structure, and distribute them to multiple data terminals to enhance defense capabilities.

[0113] In an embodiment of the present application, the node attributes of the knowledge graph node include 12-dimensional metadata such as hole type, impact range, and difficulty of utilization.

[0114] Optionally, the above-mentioned mapping of the detection result feature vectors into knowledge graph nodes and constructing a multi-dimensional associated vulnerability topology structure may include the following steps: Step Q1: Analyze the vulnerability attributes of the detection result feature vector and establish a three-dimensional association edge of type-path-impact.

[0115] In some embodiments, constructing multidimensional association edges includes: calculating the semantic similarity of vulnerability description text through a pre-trained CodeBERT model to construct semantic association edges (i.e., semantic association edges); constructing attack chain transfer probability moments based on historical attack logs to construct behavioral association edges (i.e., behavioral association edges); and analyzing system dependencies to identify combined exploitation paths between vulnerabilities to construct configuration association edges (i.e., configuration association edges).

[0116] Step Q2: Use the attention mechanism to calculate the association strength of the three-dimensional association edges and generate a dynamically weighted knowledge graph topology.

[0117] In this embodiment of the present application, the attention mechanism can adopt a multi-head self-attention mechanism, which can capture the multi-dimensional features in the vulnerability correlation relationship. Each attention head focuses on a different feature subspace, thereby more comprehensively understanding the complex correlation between vulnerabilities.

[0118] For example, for each vulnerable node, attention weights are calculated between it and all other nodes. These weights represent the strength of the association between the current node and other nodes. Based on the calculated attention weights, the strength of the three-dimensional association edges (semantic association edges, behavioral association edges, and configuration association edges) is dynamically adjusted. Finally, based on the dynamically adjusted association edge strengths, a weighted knowledge graph topology is generated.

[0119] Step Q3: Encode the knowledge graph topology into a feature vector as the input for the next round of training of the global model.

[0120] In some embodiments, a graph convolutional network (GCN) can be used for graph embedding. GCN can capture local and global structural information in the graph and fuse the information of each node (vulnerability) and its neighboring nodes into a low-dimensional feature vector.

[0121] For example, the knowledge graph topology can be used as input to the GCN. Through multi-layer convolution operations, the feature information of the node and its neighbors is gradually aggregated, encoding each vulnerability node as a fixed-length feature vector that contains the context of the vulnerability in the knowledge graph. Furthermore, the feature vectors of all vulnerability nodes are concatenated into a large feature matrix, which serves as the input for the next round of training of the global model.

[0122] In this way, this application constructs a vulnerability topology based on the three-dimensional association edges of type-path-impact, and combines the attention mechanism to dynamically quantify the vulnerability association strength, so that the knowledge graph encoding can accurately characterize the potential threat transmission path between vulnerabilities, provide interpretable feature input for the global model, enhance the context perception ability of vulnerability detection, and reduce the risk of false alarms and missed alarms.

[0123] Optionally, after receiving the adversarial training sample, the data terminal may perform training based on the adversarial training sample to generate encrypted gradient parameters, and then send the encrypted gradient parameters to the central server.

[0124] In some embodiments, the data terminal verifies the sample signature through a blockchain smart contract and decrypts the adversarial sample using the TPM hardware key shards. The decrypted adversarial sample is then fed into a lightweight encoder for training to obtain gradient parameters. Finally, the gradient parameters are encrypted and encapsulated to obtain encrypted gradient parameters.

[0125] Furthermore, upon receiving the encrypted gradient parameters, the central server aggregates the multiple encrypted gradient parameters to iteratively update the global model parameters.

[0126] Optionally, the encrypted gradient parameters received by the central server may contain outliers, so outliers with large differences from the normal gradient direction (such as deviations exceeding 45°) can be eliminated through a specific algorithm. In some embodiments, the processed encrypted gradient parameters can be aggregated based on a homomorphic encryption aggregation method to obtain an aggregated gradient, and the aggregated gradient can be subjected to noise processing to reduce the impact of noise on model updates.

[0127] For example, a stochastic gradient descent algorithm can be used to apply the aggregated gradients to the global model to adjust the weights and biases of the model.

[0128] It should be noted that homomorphic encryption allows mathematical operations to be performed in the encrypted state, so the central server can perform addition operations on the gradient without decryption.

[0129] In this way, this application maps detection features into dynamically weighted knowledge graph nodes, reveals complex dependencies between vulnerabilities through three-dimensional correlation edges, generates adversarial samples to enhance the defense capabilities of local models, forms a closed-loop iteration of vulnerability detection and defense enhancement, improves the system's active protection capabilities against new unknown vulnerabilities, and blocks the attack chain propagation path.

[0130] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the federal game vulnerability detection device or electronic device based on privacy protection includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0131] In the embodiment of the present application, the functional modules of the federal game vulnerability detection device or electronic device based on privacy protection can be divided according to the above method. For example, the federal game vulnerability detection device or electronic device based on privacy protection can include various functional modules corresponding to the functional divisions, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.

[0132] Figure 3 This is a structural diagram of a privacy-preserving federated game vulnerability detection device provided in an embodiment of the present application. The privacy-preserving federated game vulnerability detection device 300 includes: a generating unit 301 and a processing unit 302.

[0133] Among them: the above-mentioned generation unit 301 is used to use blockchain smart contracts to build a trusted environment between the central server and multiple data terminals, and generate a federated learning protocol with integrated homomorphic encryption; the processing unit 302 is used to control multiple data terminals to obtain privacy parameters through the federated learning protocol, and use differential privacy technology with dynamic sensitivity and adaptive adjustment of privacy parameters to process local data to send an encrypted perturbation gradient data set to the central server; the generation unit 301 is also used to perform encrypted weighted aggregation after the central server receives the perturbation gradient data set, and generate anti-collusion global model parameters through a threshold decryption mechanism; the processing unit 302 is also used to distribute the global model parameters to multiple data terminals so that multiple data terminals can perform vulnerability detection.

[0134] In some embodiments, the privacy parameters include a privacy budget and a data freshness indicator. The processing unit 302 is specifically used to: generate a time-varying sensitivity parameter based on the privacy budget, the data freshness indicator, and the sensitivity parameter; generate adaptive noise based on the time-varying sensitivity parameter, and inject it into the local training gradient to form an encrypted perturbation gradient; perform amplitude truncation processing on the encrypted perturbation gradient, and output a perturbation gradient data set that meets the preset norm constraint.

[0135] In some embodiments, the above-mentioned generation unit 301 is specifically used to: calculate the dynamic aggregation weight of each participating node based on the data quality score of the perturbation gradient data set; use the homomorphic encryption algorithm to perform weighted aggregation on the perturbation gradient data set to generate encrypted intermediate model parameters; and decrypt the intermediate model parameters into global model parameters through the threshold decryption mechanism.

[0136] In some embodiments, the generation unit 301 is specifically used to: reconstruct the decryption key using the key fragments stored in the shards and jointly decrypt the intermediate model parameters; perform noise correction processing on the decrypted intermediate model parameters to eliminate the random disturbance introduced by differential privacy; optimize the corrected intermediate model parameters using a momentum optimization algorithm and output collusion-resistant global model parameters.

[0137] In some embodiments, the processing unit 302 is further used to: when multiple data terminals send the detection result feature vectors to the central server, map the detection result feature vectors into knowledge graph nodes and construct a multi-dimensional associated vulnerability topology structure; generate adversarial training samples based on the vulnerability topology structure and distribute them to the multiple data terminals to enhance defense capabilities; when multiple data terminals send the encrypted gradient parameters of the adversarial training to the central server, aggregate multiple encrypted gradient parameters to iteratively update the global model parameters.

[0138] In some embodiments, the above-mentioned processing unit 302 is specifically used to: parse the vulnerability attributes of the detection result feature vector, establish a three-dimensional correlation edge of type-path-impact; use the attention mechanism to calculate the correlation strength of the three-dimensional correlation edge, and generate a dynamically weighted knowledge graph topology; encode the knowledge graph topology into a feature vector as the input for the next round of training of the global model.

[0139] In some embodiments, the above-mentioned generation unit 301 is specifically used to: define data terminal access rules through blockchain smart contracts, and generate a trusted data terminal list including an identity authentication mechanism; establish a homomorphic encryption channel based on the trusted data terminal list, and distribute initial model parameters and privacy budgets to the multiple data terminals; verify the data compliance of the data terminal in real time, and dynamically update the trusted data terminal list to maintain the credibility of the environment.

[0140] In the privacy-protected federal game vulnerability detection device provided in the embodiment of the present application, a trusted environment is constructed through blockchain smart contracts and a homomorphic encryption protocol is integrated to ensure that the data interaction process is transparent and traceable without relying on a third-party trust agency, thereby reducing the risk of data tampering from the root; dynamic sensitivity adaptive differential privacy technology enables the data terminal to intelligently adjust the noise injection intensity according to local data characteristics, maximize data availability while ensuring privacy, and avoid excessive ambiguity or insufficient protection caused by traditional fixed parameters; encrypted weighted aggregation and threshold decryption mechanism form a double security barrier. The former prevents the central server from directly accessing plaintext data, and the latter uses multi-node collaborative decryption threshold design. Even if some nodes are compromised, the complete model parameters cannot be restored, effectively resisting collusion attacks and significantly improving the data security level and privacy compliance in network vulnerability detection scenarios.

[0141] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0142] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 includes but is not limited to: a processor 401 and a memory 402 .

[0143] The memory 402 is used to store executable instructions of the processor 401. It is understandable that the processor 401 is configured to execute instructions to implement the privacy-preserving federated game vulnerability detection method in the above embodiment.

[0144] It should be noted that those skilled in the art can understand that Figure 4 The electronic device structure shown in the figure does not limit the electronic device, and the electronic device may include Figure 4 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0145] The processor 401 is the control center of the electronic device. It connects the various parts of the entire electronic device using various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402 and accessing data stored in the memory 402, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 401 may include one or more processing units. Optionally, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly handles wireless communications. It is understood that the modem processor may not be integrated into the processor 401.

[0146] Memory 402 can be used to store software programs and various data. Memory 402 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and application programs required by at least one functional module (such as a determination unit, a processing unit, etc.). Furthermore, memory 402 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0147] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 402 including instructions. The above instructions can be executed by the processor 401 of the electronic device 400 to implement the privacy protection-based federal game vulnerability detection method in the above embodiment.

[0148] In actual implementation, Figure 3 The steps performed by the generating unit 301 and the processing unit 302 in Figure 4 The processor 401 in the embodiment calls the computer program stored in the memory 402. The specific execution process can be referred to the description of the method part in the above embodiment, which will not be repeated here.

[0149] Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0150] In an exemplary embodiment, the present application also provides a computer program product comprising one or more instructions, which can be executed by the processor 401 of the electronic device to implement the privacy protection-based federal game vulnerability detection method in the above embodiment.

[0151] It should be noted that when the instructions in the above-mentioned computer-readable storage medium or one or more instructions in the computer program product are executed by the processor of the electronic device, the various processes of the above-mentioned method embodiment are implemented and the same technical effect as the above-mentioned method can be achieved. To avoid repetition, they will not be repeated here.

[0152] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete the full classification or partial functions described above.

[0153] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0154] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0155] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0156] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, or the entire classification part or part of the technical solution can be embodied in the form of a software product. The software product is stored in a storage medium and includes a number of instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute the entire classification part or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc., various media that can store program code.

[0157] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for detecting federal game vulnerabilities based on privacy protection, characterized in that: Applied to a vulnerability detection system, the vulnerability detection system includes a central server and multiple data terminals, and the method includes: Using blockchain smart contracts to build a trusted environment between the central server and the multiple data terminals, and generating a federated learning protocol that integrates homomorphic encryption; Controlling the multiple data terminals to obtain privacy parameters through a federated learning protocol, and processing local data using a differential privacy technology with dynamic sensitivity and adaptive adjustment of the privacy parameters to send an encrypted perturbation gradient dataset to the central server; After the central server receives the perturbation gradient data set, it performs encrypted weighted aggregation and generates anti-collusion global model parameters through a threshold decryption mechanism; The global model parameters are distributed to the plurality of data terminals so that the plurality of data terminals perform vulnerability detection.

2. The method according to claim 1, characterized in that The privacy parameters include the privacy budget and the data freshness index. The differential privacy technology using dynamic sensitivity and adaptive adjustment of the privacy parameters to process local data includes: generating a time-varying sensitivity parameter according to the privacy budget, the data freshness indicator, and the sensitivity parameter; Generate adaptive noise based on the time-varying sensitivity parameter, and inject it into the local training gradient to form an encrypted perturbation gradient; Amplitude truncation processing is performed on the encrypted perturbation gradient to output the perturbation gradient data set that meets a preset norm constraint.

3. The method according to claim 1, characterized in that The method of performing encrypted weighted aggregation and generating anti-collusion global model parameters through threshold decryption includes: Calculating the dynamic aggregation weight of each participating node based on the data quality score of the perturbation gradient data set; Using a homomorphic encryption algorithm to perform weighted aggregation on the perturbed gradient dataset to generate encrypted intermediate model parameters; The intermediate model parameters are decrypted into the global model parameters through the threshold decryption mechanism.

4. The method according to claim 3, characterized in that Decrypting the intermediate model parameters into the global model parameters through the threshold decryption mechanism includes: Reconstructing the decryption key using the key fragments stored in the shards, and jointly decrypting the intermediate model parameters; Performing noise correction processing on the decrypted intermediate model parameters to eliminate random disturbances introduced by differential privacy; A momentum optimization algorithm is used to optimize the corrected intermediate model parameters and output the anti-collusion global model parameters.

5. The method according to claim 1, wherein The method further comprises: When the plurality of data terminals send the detection result feature vectors to the central server, mapping the detection result feature vectors into knowledge graph nodes and constructing a multi-dimensional associated vulnerability topology structure; generating adversarial training samples based on the vulnerability topology structure and distributing the samples to the plurality of data terminals to enhance defense capabilities; When the multiple data terminals send the encrypted gradient parameters of the adversarial training to the central server, the multiple encrypted gradient parameters are aggregated to iteratively update the global model parameters.

6. The method according to claim 5, characterized in that Mapping the detection result feature vectors into knowledge graph nodes and constructing a multi-dimensional associated vulnerability topology structure includes: Analyze the vulnerability attributes of the detection result feature vector and establish a three-dimensional correlation edge of type-path-impact; An attention mechanism is used to calculate the association strength of the three-dimensional association edges to generate a dynamically weighted knowledge graph topology; The knowledge graph topology is encoded as a feature vector and used as the input for the next round of training of the global model.

7. The method according to claim 1, characterized in that The use of blockchain smart contracts to build a trusted environment between the central server and the multiple data terminals includes: Defining data terminal access rules through the blockchain smart contract and generating a list of trusted data terminals including an identity verification mechanism; Establishing a homomorphic encryption channel based on the trusted data terminal list, and distributing initial model parameters and privacy budgets to the multiple data terminals; The data compliance of the data terminal is verified in real time, and the trusted data terminal list is dynamically updated to maintain the credibility of the environment.

8. A federal game vulnerability detection device based on privacy protection, characterized in that: The device comprises: A generation unit, which is used to build a trusted environment between the central server and multiple data terminals using blockchain smart contracts, and to generate a federated learning protocol that integrates homomorphic encryption; a processing unit, configured to control the plurality of data terminals to obtain privacy parameters through a federated learning protocol, and process local data using a differential privacy technique with dynamic sensitivity and adaptive adjustment of the privacy parameters, so as to send an encrypted perturbation gradient dataset to the central server; The generating unit is further configured to perform encrypted weighted aggregation after the central server receives the perturbation gradient dataset, and generate anti-collusion global model parameters through a threshold decryption mechanism; The processing unit is further configured to distribute the global model parameters to the multiple data terminals, so that the multiple data terminals perform vulnerability detection.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing instructions, characterized in that: When a computer executes the instruction, the computer performs the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Distributed cooperation method for communication optimization

    CN116468133A

  • Federal learning excitation method based on dynamic game

    CN116528344A

  • Federal learning method and system capable of meeting personalized privacy protection requirements of participants

    CN116882524A

  • Defense method for inference attack in federated learning

    CN117371037A

  • Financial abnormal behavior detection method and device based on federal learning

    CN117670547A

Cited By

  • Method and device for multi-party combined training of disease and pest recognition model

    CN121010890A

  • Video monitoring vulnerability detection method and device based on knowledge graph, and medium

    CN121309219A