Privacy protection-based federated game vulnerability detection method, device and equipment

By employing differential privacy and homomorphic encryption techniques in federated learning, a trusted environment is constructed, and a federated learning protocol integrating homomorphic encryption is generated. This solves the problem of data leakage in traditional federated learning, enables efficient vulnerability detection model updates through cross-organizational collaboration, and improves data security and privacy protection.

CN120455092BActive Publication Date: 2025-12-05BEIJING HAOWANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional federated learning frameworks lack sufficient encryption protection during data transmission and model updates, leading to data leakage. Traditional centralized vulnerability detection solutions face the risk of data privacy breaches, while decentralized solutions struggle to achieve efficient and unified model training and updates, and also lack sufficient encryption protection during data transmission and model updates.

Method used

By employing differential privacy and homomorphic encryption technologies, a trusted environment is constructed through blockchain smart contracts, generating a federated learning protocol with integrated homomorphic encryption. Local data is processed using differential privacy technology with adaptive adjustment of dynamic sensitivity and privacy parameters. An encrypted perturbation gradient dataset is used to execute the encrypted perturbation gradient dataset, and a threshold decryption mechanism is used to generate anti-collusion global model parameters.

Benefits of technology

It enables cross-organizational collaboration in building and updating vulnerability detection models without sacrificing data privacy, improving data security and privacy protection in model training, preventing data leaks and collusive attacks, and enhancing the security and privacy compliance of network vulnerability detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455092B_ABST
    Figure CN120455092B_ABST
Patent Text Reader

Abstract

The application discloses a privacy protection-based federal game vulnerability detection method and device and equipment, 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 center server and a plurality of data terminals. The method comprises the following steps: a blockchain smart contract is used to build a trusted environment between the center server and the plurality of data terminals, and a federal learning protocol integrated with homomorphic encryption is generated; the plurality of data terminals obtain privacy parameters through the federal learning protocol, and process local data by using a differential privacy technology adaptive to dynamic sensitivity and privacy parameters, so as to send an encrypted perturbation gradient data set to the center server; the center server performs encrypted weighted aggregation, and generates anti-collusion global model parameters through threshold decryption; and the global model parameters are distributed to the plurality of data terminals, so that the plurality of data terminals perform vulnerability detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network security protection, and particularly relates to a federated game vulnerability detection method and device based on privacy protection and equipment. BACKGROUND

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

[0003] At present, as a kind of distributed machine learning, federated learning aims to solve the problem of data silos by aggregating multi-party data to train models without directly exchanging raw data, thereby protecting user privacy and data security. However, the traditional federated learning framework adopts a synchronous update mechanism, and all participants need to synchronize the model updates at the end of each training round, but there is a lack of sufficient encryption protection during data transmission and model update, which poses a risk of model parameters being intercepted, making it possible for data to be leaked during subsequent network security detection processes. SUMMARY

[0004] The present application aims to provide a federated game vulnerability detection method and device based on privacy protection and equipment, which aims to solve the problem of data leakage in the existing network security detection process.

[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0006] The present application provides a federated game vulnerability detection method based on privacy protection, which is applied to a vulnerability detection system including a center server and multiple data terminals. The method includes: using a blockchain smart contract to build a trusted environment between the center server and the multiple data terminals, and generating a federated learning protocol integrated with homomorphic encryption; controlling the multiple data terminals to obtain privacy parameters through the federated learning protocol, and using a dynamic sensitivity and privacy parameter self-adaptive adjustment differential privacy technology to process local data, so as to send an encrypted perturbation gradient data set to the center server; after the center server receives the perturbation gradient data set, performing encrypted weighted aggregation, and generating an anti-collusion global model parameter through a threshold decryption mechanism; distributing the global model parameter to the multiple data terminals, so that the multiple data terminals perform vulnerability detection.

[0007] The method for federated game vulnerability detection based on privacy protection provided by the embodiments of the present application builds a trusted environment through a blockchain smart contract and integrates a homomorphic encryption protocol, ensures that the data interaction process is transparent and traceable and does not need to rely on a third-party trust agency, and reduces the data tampering risk from the root; the dynamic sensitivity adaptive differential privacy technology enables the data terminal to intelligently adjust the noise injection intensity according to the local data characteristics, maximizes the data availability on the premise of privacy protection, and avoids the problems of excessive blurring or insufficient protection caused by traditional fixed parameters; the encrypted weighted aggregation and threshold decryption mechanism form a double security barrier, the former prevents the center server from directly accessing the plaintext data, and the latter cooperatively decrypts the threshold value through multiple nodes, so that even if part of the nodes are attacked, the complete model parameters cannot be restored, effectively resisting collusion attacks, and significantly improving the data security level and privacy compliance in the network vulnerability detection scenario.

[0008] In some embodiments, the privacy parameters include a privacy budget and a data freshness indicator, and the differential privacy technology that adaptively adjusts the dynamic sensitivity and the privacy parameters to process the local data includes: generating a time-varying sensitivity parameter according to the privacy budget, the data freshness indicator, and the sensitivity parameter; generating adaptive noise based on the time-varying sensitivity parameter, and injecting the local training gradient to form an encrypted perturbed gradient; performing amplitude truncation processing on the encrypted perturbed gradient to output a perturbed gradient dataset that satisfies a preset norm constraint.

[0009] Based on this, the present application generates a time-varying sensitivity by fusing a privacy budget and a data freshness indicator, so that the noise injection intensity is dynamically optimized with the data timeliness, avoiding the model precision loss caused by the fixed noise of traditional differential privacy, and accurately matching the protection needs of each stage of the data life cycle, achieving a balance between privacy protection and model utility in gradient perturbation, and strengthening the local data leakage defense capability.

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

[0011] Based on this, the present application dynamically allocates the aggregation weight through the data quality score, suppresses the influence of low-quality or abnormal gradients on the global model, integrates homomorphic encryption to ensure that the weighted calculation is in the whole cipher state, and blocks the complete model from being stolen by a single node or a few colluding nodes through threshold decryption, double-protecting the safety and robustness of the model aggregation process, and preventing gradient reverse attacks.

[0012] In some embodiments, the decryption of the intermediate model parameters into the global model parameters through the threshold decryption mechanism comprises: reconstructing a decryption key by using the key fragments stored in the fragments, 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; and optimizing the corrected intermediate model parameters by using a momentum optimization algorithm to output collusion-resistant global model parameters.

[0013] Based on this, the application ensures that the decryption process needs to be coordinated by multiple nodes through the reconstruction of the key fragments, eliminating the risk of single-key leakage; the noise correction and momentum optimization are synchronized to offset the model deviation of the differential privacy noise, improving the convergence accuracy of the global model while maintaining the strength of privacy protection, and blocking the possibility of reverse deduction of the original data by the collusion nodes through disturbance analysis.

[0014] In some embodiments, the privacy protection-based federated game vulnerability detection method provided by the application further comprises: in the case where the detection result feature vectors are sent to the center server by the plurality of data terminals, 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 plurality of data terminals to enhance the defense capability; in the case where the encrypted gradient parameters of the adversarial training are sent to the center server by the plurality of data terminals, aggregating the plurality of encrypted gradient parameters to iteratively update the global model parameters.

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

[0016] In some embodiments, the mapping of the detection result feature vectors into knowledge graph nodes and the construction of the multi-dimensional associated vulnerability topology structure comprise: analyzing the vulnerability attributes of the detection result feature vectors to establish three-dimensional associated edges of type-path-impact; calculating the associated strength of the three-dimensional associated edges by using an attention mechanism to generate a dynamically weighted knowledge graph topology; and encoding the knowledge graph topology into a feature vector as the input of the next round of training of the global model.

[0017] Based on this, the application constructs a vulnerability topology based on the three-dimensional associated edges of type-path-impact, dynamically quantifies the vulnerability associated strength by combining the attention mechanism, so that the knowledge graph coding can accurately represent the potential threat transmission path between vulnerabilities, provide interpretable feature input for the global model, enhance the context awareness capability of vulnerability detection, and reduce the risk of false positives and false negatives.

[0018] In some embodiments, the above-mentioned construction of a trusted environment between the central server and the plurality of data terminals by the blockchain smart contract comprises: defining data terminal access rules by the blockchain smart contract, generating a trusted data terminal list containing an identity verification mechanism; establishing a homomorphic encryption channel based on the trusted data terminal list, distributing initial model parameters and a privacy budget to the plurality of data terminals; verifying data compliance of the data terminals in real time, and dynamically updating the trusted data terminal list to maintain the environmental trustworthiness.

[0019] Based on this, the present application realizes terminal access control and real-time data compliance verification through the smart contract, dynamically updates the trusted node list and establishes an encryption channel, blocks unauthorized terminal access or malicious data injection, and ensures the continuous trustworthiness of the federal learning participants, thereby reducing the collusion attack and data pollution risk from the source.

[0020] The present application provides a privacy protection-based federal game vulnerability detection device, which comprises: a generating unit for constructing a trusted environment between a central server and a plurality of data terminals by a blockchain smart contract, and generating a federal learning protocol integrated with homomorphic encryption; a processing unit for controlling the plurality of data terminals to obtain privacy parameters through the federal learning protocol, and processing local data by using a differential privacy technology with adaptive adjustment of dynamic sensitivity and privacy parameters, so as to send an encrypted perturbed gradient data set to the central server; the generating unit is also used for, after the central server receives the perturbed gradient data set, performing encrypted weighted aggregation, and generating anti-collusion global model parameters through a threshold decryption mechanism; and the processing unit is also used for distributing the global model parameters to the plurality of data terminals, so that the plurality of data terminals perform vulnerability detection.

[0021] In some embodiments, the privacy parameters include a privacy budget and a data freshness indicator, and the processing unit is specifically configured to: generate a time-varying sensitivity parameter according to the privacy budget, the data freshness indicator, and a sensitivity parameter; generate adaptive noise based on the time-varying sensitivity parameter, and inject the local training gradient to form an encrypted perturbed gradient; and perform amplitude truncation processing on the encrypted perturbed gradient, and output a perturbed gradient data set satisfying a preset norm constraint.

[0022] In some embodiments, the generating unit is specifically configured to: calculate dynamic aggregation weights of each participating node according to a data quality score of the perturbed gradient data set; perform weighted aggregation on the perturbed gradient data set by using a homomorphic encryption algorithm, to generate encrypted intermediate model parameters; and decrypt the intermediate model parameters into global model parameters by using a threshold decryption mechanism.

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

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

[0025] In some embodiments, the processing unit is specifically configured to: analyze the vulnerability attributes of the detection result feature vectors, establish a three-dimensional association edge of type-path-impact; calculate the association strength of the three-dimensional association edge by using an attention mechanism, and generate a dynamically weighted knowledge graph topology; encode the knowledge graph topology into a feature vector as an input of the next round of training of the global model.

[0026] In some embodiments, the generation unit is specifically configured to: define data terminal access rules through a blockchain smart contract, generate a list of trusted data terminals containing an identity verification mechanism; establish a homomorphic encryption channel based on the list of trusted data terminals, 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 environmental trustworthiness.

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

[0028] The present application provides a computer-readable storage medium, which stores instructions, when the instructions are run on a terminal, causing the terminal to execute the above-described privacy protection-based federated game vulnerability detection method.

[0029] The present application provides a computer program product containing instructions, when the computer executes the above instructions, causing the computer to execute the above-described privacy protection-based federated game vulnerability detection method.

[0030] The chip provided in the embodiments of the present application further comprises a memory for storing computer programs or instructions.

[0031] Specifically, the chip provided in the embodiments of the present application further comprises a memory for storing computer programs or instructions. BRIEF DESCRIPTION OF DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0033] Figure 1 A framework diagram of a federated game vulnerability detection system based on privacy protection provided by the embodiments of the present application is shown in FIG. 1.

[0034] Figure 2 A method flowchart of a federated game vulnerability detection method based on privacy protection provided by the embodiments of the present application is shown in FIG. 2.

[0035] Figure 3 A structural diagram of a federated game vulnerability detection device based on privacy protection provided by the embodiments of the present application is shown in FIG. 3.

[0036] Figure 4 A structural diagram of an electronic device provided by the embodiments of the present application is shown in FIG. 4. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0038] In the description of the present application, it should be understood that the terms "upper", "lower", "left", "right", "front", "back", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or relative position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise specified, the above orientation description can be flexibly arranged in the process of actual application, as long as the relative position relationship shown in the drawings is met.

[0039] The terms "first", "second", etc. are used only to describe purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0040] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting", "communicating" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integral connection. It can be directly connected, or indirectly connected through an intermediate medium, or the communication between the two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0041] In some embodiments, the terms "including", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, article or device. Without more limitation, the element defined by the sentence "including a…" does not exclude the presence of other identical elements in the process, article or device including the element.

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

[0043] In the description of the present application, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0044] In the existing network security detection technology, the traditional centralized vulnerability detection scheme faces the risk of data privacy leakage, while the decentralized scheme is often difficult to realize efficient unified model training and updating, and lacks sufficient encryption protection in the data transmission and model updating process, and there is a risk that the model parameters will be intercepted; At the same time, since the differential privacy technology is not used to preprocess local data, the uploaded data may still leak sensitive information.

[0045] In this context, in order to solve the problem of data leakage in the network security detection process in the related art, the application provides a federated game vulnerability detection method based on privacy protection, a device and equipment. By using differential privacy technology and homomorphic encryption technology, the effect of cross-organizational collaboration to build and update the vulnerability detection model is achieved without sacrificing data privacy, improving the data security and privacy protection level of model training.

[0046] Figure 1 A federated game vulnerability detection system based on privacy protection is provided for the embodiments of the application. The vulnerability detection system 100 includes a center server 110 and a plurality of data terminals (such as a first data terminal 120, a second data terminal 130 and a third data terminal 140).

[0047] In some embodiments, the center server 110 is responsible for organizing and managing the entire federated learning process. The first data terminal 120, the second data terminal 130 and the third data terminal 140 respectively preprocess the local data by using differential privacy technology, to ensure that the training data uploaded to the center server 110 will not leak the original data information, and the preprocessed data is used for learning of vulnerability features.

[0048] Further, the center server 110 aggregates the preprocessed data from the first data terminal 120, the second data terminal 130 and the third data terminal 140 based on the federated average algorithm, for training a global model that focuses on identifying and predicting potential vulnerability patterns and risk indicators.

[0049] Exemplarily, in the model training process, homomorphic encryption technology is used to ensure that the model parameters are not intercepted or decrypted by a third party during transmission and updating. After that, the trained model is returned to the first data terminal 120, the second data terminal 130 and the third data terminal 140, so that the model can be used for vulnerability detection in the local environment without sharing the actual data, while the local detection results can be continuously fed back to optimize the global model.

[0050] The following refers to the following Figure 2 The federated game vulnerability detection method based on privacy protection provided by the embodiments of the application is described.

[0051] Figure 2 The method flowchart of the federated game vulnerability detection method based on privacy protection provided by the embodiments of the application, the subject executing the method can be an electronic device, or each device / module in the electronic device, such as an integrated circuit or a chip, which is not limited by the embodiments of the application.

[0052] Exemplarily, as Figure 2As shown, the privacy protection based federated game vulnerability detection method provided in the embodiments of the present application can include the following S201 to S204:

[0053] S201, constructing a trusted environment between the center server and the plurality of data terminals by using a blockchain smart contract, and generating a federated learning protocol integrated with homomorphic encryption.

[0054] In some embodiments, the data terminal access rule can be defined by the blockchain smart contract, a trusted data terminal list containing an identity verification mechanism is generated, and a homomorphic encryption channel is established based on the trusted data terminal list, and initial model parameters and privacy budget are distributed to the plurality of data terminals.

[0055] In the embodiments of the present application, the above-mentioned access rule can be a hardware-software-behavior three-dimensional authentication system. Specifically, a three-dimensional identity verification mechanism can be constructed in combination with a TPM hardware fingerprint, an attribute encryption module, and a historical behavior portrait.

[0056] Illustratively, hardware-level authentication: requiring the data terminal to preinstall a trusted platform module, generating a device unique identity key pair through a key exchange protocol. And, the public key hash value needs to be submitted to the blockchain during registration, and the smart contract verifies the tamper resistance of the hardware fingerprint.

[0057] Illustratively, software-level authentication: deploying a lightweight attribute encryption module, requiring the data terminal to install an encryption library that meets the preset standard, and periodically obtaining a certificate revocation list from the blockchain.

[0058] Illustratively, behavior-level authentication: constructing a historical behavior portrait model, recording indicators such as the success rate, response delay, and number of abnormal interruptions of the data terminal participating in federated learning, and evaluating the trustworthiness in real time through a support vector machine classifier.

[0059] In the embodiments of the present application, the trusted data terminal list can store a plurality of data terminals that meet the access rule.

[0060] Illustratively, the center server can determine whether each data terminal meets the hardware-software-behavior three-dimensional authentication system according to the set hardware-software-behavior three-dimensional authentication system, and add the data terminal that meets the three-dimensional authentication system to the trusted data terminal list.

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

[0062] Illustratively, after determining the trusted data terminal list that meets the hardware-software-behavior three-dimensional authentication system, a data transmission channel can be established for each trusted data terminal, and a key is configured.

[0063] In the embodiments of the present application, the privacy budget is used to blur the contribution degree of the training sample in the training process when the model is trained at the data terminal, so as to prevent the original training sample from being obtained by the attacker through reverse deduction.

[0064] For example, the center server distributes the initial model parameters and the privacy budget to the trusted data terminal through the configured homomorphic encryption channel, and then the data terminal performs local training using the privacy budget and the initial model parameters to obtain the trained data.

[0065] Further, after obtaining the trained data, the data terminal can send the data to the center server, the center server receives the data fed back by the plurality of data terminals, verifies the data compliance of the data terminal in real time, and dynamically updates the list of trusted data terminals to maintain the environmental trustworthiness.

[0066] In some embodiments, when the data terminal completes the local model training, the encrypted gradient data, the training log and the hardware state information are packaged and sent to the center server, and the center server can verify whether the data sent by the data terminal is compliant according to the three-dimensional authentication system set in advance, and exclude the data terminal that is not compliant from the list of trusted data terminals.

[0067] For example, the isolated forest algorithm can be used to detect indicators such as gradient sparsity and direction consistency. If a data terminal continuously submits gradients with a variance exceeding twice the global mean for three times, the system will mark it as "suspected abnormal" and reduce its aggregation weight to 0.3 (normal weight is 1.0). At the same time, combined with the hardware configuration (such as CPU model, memory capacity) reported by the data terminal when registering, whether the training time consumption is expected is analyzed, and in the case of training time consumption timeout, the data terminal is judged to be not compliant, at this time the data terminal is excluded.

[0068] In this way, the present application realizes terminal access control and real-time data compliance verification through smart contract, dynamically updates the list of trusted nodes and establishes an encrypted channel, blocks unauthorized terminal access or malicious data injection, ensures the continuous trustworthiness of the participants in federated learning, and reduces the risk of collusion attack and data pollution from the source.

[0069] S202, control a plurality of data terminals to obtain privacy parameters through a federated learning protocol, and use a differentially private technology with adaptive adjustment of dynamic sensitivity and privacy parameters to process local data, so as to send an encrypted perturbed gradient data set to a center server.

[0070] In the embodiments of the present application, the privacy parameters include a privacy budget and a data freshness indicator.

[0071] The data freshness indicator is defined as a weighted combination of a time decay function and a data activity factor by formula (I).

[0072] Equation (I)

[0073] wherein F is a data freshness indicator, a is a time decay weight coefficient, l is a decay rate constant, and At is an interval length from data generation to the current time; b is an activity weight coefficient, and A(t) is a dynamic activity score based on data call frequency and task relevance.

[0074] In some embodiments, after obtaining the privacy parameter and the data freshness indicator, the data terminal can first generate a time-varying sensitivity parameter according to the privacy budget, the data freshness indicator, and the sensitivity parameter.

[0075] wherein the sensitivity parameter is defined as a weighted combination of global sensitivity and local sensitivity by Equation (II).

[0076] Equation (II)

[0077] wherein S is the sensitivity parameter, w is a data distribution weight coefficient, S g is a global L2 norm boundary based on the model parameter space, and S l is a local condition number estimate value based on the local data distribution characteristics.

[0078] Illustratively, to generate the time-varying sensitivity parameter, the real-time value of the data freshness indicator can be calculated based on the distributed timestamp service stored in the blockchain, and then the sensitivity calculation module pre-stored in the smart contract is called to dynamically calculate the local sensitivity in combination with the eigenvalue decomposition result of the covariance matrix of the local data set, and further the global sensitivity is aggregated through the federated average mechanism, and the weight is adaptively adjusted according to the data freshness by Equation (III) to obtain the time-varying sensitivity parameter.

[0079] Equation (III)

[0080] wherein s() is a Sigmoid function, k is a freshness sensitivity coefficient, and 0 is a bias term, realizing the nonlinear change of the sensitivity weight with the data timeliness.

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

[0082] Illustratively, a variational noise generator based on the Laplace mechanism can be deployed by Equation (IV) to generate adaptive noise matching the data distribution characteristics according to the time-varying sensitivity parameter and the privacy budget.

[0083] Equation (IV)

[0084] wherein, δ is a relaxation probability parameter, the noise variance is proportional to the square of the sensitivity, to achieve dynamic optimization of noise intensity with data freshness.

[0085] Further, the data terminal can perform amplitude truncation processing on the encrypted perturbed gradient, and output a perturbed gradient dataset satisfying a preset norm constraint.

[0086] Exemplarily, a gradient truncation layer with multi-dimensional norm constraint can be constructed, and joint truncation processing is performed on the encrypted perturbed gradient through formula (five).

[0087] Formula (five)

[0088] wherein, τ L2 is an L2 norm threshold coefficient, τ cos is a cosine similarity retention threshold, and μ(g) is a historical gradient mean value, to prevent gradient explosion while retaining effective update direction.

[0089] In this way, the application generates time-varying sensitivity by fusing privacy budget and data freshness indicators, so that the noise injection intensity is dynamically optimized with data timeliness, avoiding the model precision loss caused by the fixed noise of traditional differential privacy, accurately matching the protection needs of each stage of the data life cycle, achieving a balance between privacy protection and model utility in gradient perturbation, and strengthening the local data leakage defense capability.

[0090] S203, after the center server receives the perturbed gradient dataset, performs encrypted weighted aggregation, and generates an anti-collusion global model parameter through a threshold decryption mechanism.

[0091] In the embodiments of the application, the encrypted weighted aggregation includes a multi-dimensional quality-aware dynamic weight distribution mechanism. Specifically, a gradient quality evaluation model is constructed through a blockchain smart contract, which generates dynamic aggregation weights by fusing data freshness indicators, behavior credibility scores, and model contribution degrees in three dimensions.

[0092] In some embodiments, after receiving the perturbed gradient dataset, the center server can calculate the dynamic aggregation weights of each participating node according to the data quality scores of the perturbed gradient dataset.

[0093] Exemplarily, the gradient quality evaluation model can calculate the dynamic aggregation weights through formula (six).

[0094] Formula (six)

[0095] wherein, W i is the aggregation weight of the i-th data terminal, W i(t) is a behavior credibility score constructed based on the consistency of the historical gradient update direction, C ia contribution degree index for model convergence (calculated by Shapley value method), F i(t) a data freshness index of the data terminal i, 、 、 is an adjustable weight coefficient.

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

[0097] Illustratively, the center server can use an improved homomorphic encryption algorithm (such as Paillier) to perform weighted aggregation operation based on the dynamic aggregation weight, and generate encrypted intermediate model parameters. This algorithm realizes distributed weight mapping in the ciphertext domain through a blockchain smart contract, ensuring that the weighted calculation process meets the additive homomorphism property.

[0098] Thus, the present application dynamically allocates aggregation weights through data quality scoring, suppresses the influence of low-quality or abnormal gradients on the global model, combines homomorphic encryption to ensure that the weighted calculation is in a ciphertext state throughout, and blocks the stealing of the complete model by a single node or a small number of colluding nodes through threshold decryption, thereby double-protecting the security and robustness of the model aggregation process and preventing gradient reverse attacks.

[0099] Optionally, the decryption of the intermediate model parameters into global model parameters through the threshold decryption mechanism can be realized by the following steps:

[0100] Step P1, reconstruct the decryption key using the key fragments of the sharded storage to jointly decrypt the intermediate model parameters.

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

[0102] Formula (seven)

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

[0104] Further, after obtaining the adjusted adjusted decryption threshold, the fragmented decryption can be implemented through an improved secret sharing scheme, requiring multiple trusted data terminals to jointly submit key fragments. Among them, the key fragment generation process combines the hardware fingerprint binding mechanism, and each fragment contains the trusted platform module (TPM) hardware unique identifier hash value of the data terminal.

[0105] In the embodiments of the present application, an anti-collusion verification protocol can also be deployed in the decryption process to verify the legitimacy of each fragment provider through zero-knowledge proof.

[0106] Illustratively, the (zk-SNARKs technology) can be used to prove that the "fragment holder has a legal key and has not participated in historical collusion", without revealing the specific fragment content.

[0107] Step P2, performing noise correction processing on the decrypted intermediate model parameters to eliminate the random disturbance introduced by differential privacy.

[0108] Illustratively, the noise correction processing adopts a variational auto encoder (VAE) structure based on data freshness, and the noise component stripping is realized through formula (eight).

[0109] Formula (eight)

[0110] Wherein g1 is the corrected gradient, and the encoder-decoder parameters θ of VAE 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.

[0111] Step P3, using a momentum optimization algorithm to optimize the corrected intermediate model parameters, and outputting the anti-collusion global model parameters.

[0112] Illustratively, the momentum optimization algorithm realizes the weighted fusion of historical gradient and current update by introducing a time decay factor. For example, based on formula (nine).

[0113] Formula (nine)

[0114] Wherein v t is the momentum term at time t, μ is the momentum decay coefficient, η is the learning rate, and λ is the freshness sensitive coefficient. This design makes the model update direction both maintain historical inertia and respond to the timeliness characteristics of fresh data.

[0115] Thus, the application ensures that the decryption process needs to be cooperated by multiple nodes through fragment key reconstruction, eliminates the risk of single key leakage, and synchronously offsets the model deviation of differential privacy noise through noise correction and momentum optimization, maintains the intensity of privacy protection, improves the global model convergence accuracy, and blocks the possibility of collusion nodes through disturbance analysis to reverse the original data.

[0116] In S204, the global model parameters are distributed to the plurality of data terminals, so that the plurality of data terminals perform vulnerability detection.

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

[0118] In the privacy protection based federated game vulnerability detection method provided in the embodiments of the application, a trusted environment is constructed through a blockchain smart contract and a homomorphic encryption protocol is integrated, so that the data interaction process is transparent and traceable and does not need to rely on a third-party trust institution, and the data tampering risk is reduced from the root; the dynamic sensitivity adaptive differential privacy technology enables the data terminal to intelligently adjust the noise injection intensity according to the local data characteristics, maximally retains the data availability on the premise of privacy protection, avoids the problems of excessive blurring or insufficient protection caused by traditional fixed parameters, and forms a double security barrier through the encrypted weighted aggregation and the threshold decryption mechanism, the former prevents the central server from directly accessing the plaintext data, and the latter enables the complete model parameters to be restored even if some nodes are attacked through the multi-node cooperative decryption threshold design, effectively resists collusion attacks, and significantly improves the data security level and privacy compliance in the network vulnerability detection scenario.

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

[0120] In the embodiments of the application, the detection result feature vector contains multi-dimensional vulnerability fingerprint information.

[0121] In some embodiments, the data terminal can locally deploy a lightweight vulnerability detection engine, which integrates a taint analysis module based on symbolic execution and a graph neural network classifier based on attention mechanism.

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

[0123] Formula (X)

[0124] wherein H (l) is the l-th layer node feature, A is an adjacency matrix, D is a degree matrix, W (l) is a trainable weight, and σ is an activation function.

[0125] Further, the results of the taint analysis can be combined with the embedding vectors to generate a three-dimensional feature vector containing vulnerability type, triggering path, and risk level.

[0126] By way of example, Formula (XI) is used to implement cross-modal feature fusion.

[0127] Formula (XI)

[0128] wherein V1 is a taint analysis feature (such as data flow length, application program interface call sequence), V2 is a graph embedding vector output by a graph neural network, and V3 is a metadata feature (such as file hash, process identifier).

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

[0130] In the embodiments of the present application, the node attributes of the knowledge graph node include 12-dimensional metadata such as vulnerability type, impact range, and exploit difficulty.

[0131] Optionally, the above mapping of the detection result feature vector to the knowledge graph node and the construction of the multi-dimensional associated vulnerability topology can include the following steps:

[0132] Step Q1, analyze the vulnerability attributes of the detection result feature vector to establish a three-dimensional associated edge of type-path-impact.

[0133] In some embodiments, constructing the multi-dimensional associated edge includes: constructing a semantic association edge (i.e., semantic association edge) by calculating the semantic similarity of the vulnerability description text through a pre-trained CodeBERT model; constructing a behavior association edge (i.e., behavior association edge) by constructing an attack chain transition probability matrix based on historical attack logs; and constructing a configuration association edge (i.e., configuration association edge) by analyzing system dependency relationships and identifying combined exploitation paths between vulnerabilities.

[0134] Step Q2, calculate the association strength of the three-dimensional associated edge using an attention mechanism to generate a dynamically weighted knowledge graph topology.

[0135] In the embodiments of the present application, the attention mechanism can adopt a multi-head self-attention mechanism, which can capture multi-dimensional features in vulnerability correlation relationships. Each attention head focuses on different feature subspaces, thereby comprehending the complex correlations between vulnerabilities more comprehensively.

[0136] Illustratively, for each vulnerability node, the attention weights between it and all other nodes are calculated. These weights represent the correlation strength between the current node and other nodes. Then, the strength of the three-dimensional correlation edges (semantic correlation edges, behavior correlation edges, and configuration correlation edges) is dynamically adjusted according to the calculated attention weights. Finally, based on the dynamically adjusted correlation edge strength, a weighted knowledge graph topology is generated.

[0137] Step Q3, encode the knowledge graph topology into a feature vector as the input of the next round of training of the global model.

[0138] 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 neighbor nodes into a low-dimensional feature vector.

[0139] Illustratively, the knowledge graph topology can be used as the input of the GCN, and through multi-layer convolution operations, the feature information of the nodes and their neighbors is gradually aggregated, and each vulnerability node is encoded into a fixed-length feature vector that contains the context information of the vulnerability in the knowledge graph. Further, the feature vectors of all vulnerability nodes are spliced into a large feature matrix as the input of the next round of training of the global model.

[0140] In this way, the present application constructs a vulnerability topology based on the type-path-impact three-dimensional correlation edges, dynamically quantifies the correlation strength of vulnerabilities by combining the attention mechanism, enables the knowledge graph encoding to accurately represent the potential threat transmission paths between vulnerabilities, provides an interpretable feature input for the global model, enhances the context awareness capability of vulnerability detection, and reduces the risk of false positives and false negatives.

[0141] Optionally, after receiving the adversarial training sample, the data terminal can train to generate an encrypted gradient parameter based on the adversarial training sample, and then send the encrypted gradient parameter to the center server.

[0142] In some embodiments, the data terminal verifies the sample signature through a blockchain smart contract, uses a TPM hardware key shard to jointly decrypt the adversarial sample, inputs the decrypted adversarial sample into a lightweight encoder for training to obtain a gradient parameter, and finally encrypts and encapsulates the gradient parameter to obtain an encrypted gradient parameter.

[0143] Further, the center server aggregates the plurality of encrypted gradient parameters to iteratively update the global model parameters in a case of receiving the encrypted gradient parameters.

[0144] Optionally, the encrypted gradient parameters received by the center server can have abnormal values, and thus the abnormal values with a gradient direction difference (e.g., deviating more than 45°) can be removed by a specific algorithm.

[0145] In some embodiments, the encrypted gradient parameters after processing can be aggregated based on a homomorphic encryption aggregation method to obtain aggregated gradient, and the aggregated gradient can be processed to reduce the influence of noise on model updating.

[0146] Illustratively, the aggregated gradient can be applied to the global model using a stochastic gradient descent algorithm to adjust the weights and biases of the model.

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

[0148] In this way, the present application maps the detection features into dynamically weighted knowledge graph nodes, reveals the complex dependency relationship between vulnerabilities through three-dimensional association edges, generates adversarial samples to enhance the defense capability of the local model, forms a closed-loop iteration of vulnerability detection and defense enhancement, improves the active defense capability of the system against new unknown vulnerabilities, and blocks the propagation path of the attack chain.

[0149] The above mainly introduces the scheme provided by the embodiments of the present application from the perspective of the method. In order to realize the above functions, the federated game vulnerability detection device or electronic equipment based on privacy protection includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0150] The embodiments of the present application can divide the functional modules of the privacy protection based federated game vulnerability detection device or electronic equipment according to the above method. For example, the privacy protection based federated game vulnerability detection device or electronic equipment can include various functional modules corresponding to each functional division, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or in the form of software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. When actually implemented, there can be another division method.

[0151] Figure 3 A structural diagram of a privacy protection based federated game vulnerability detection device provided by the embodiments of the present application. The privacy protection based federated game vulnerability detection device 300 includes a generation unit 301 and a processing unit 302.

[0152] The generation unit 301 is configured to construct a trusted environment between the center server and the plurality of data terminals by using a blockchain smart contract, and generate a federated learning protocol integrated with homomorphic encryption. The processing unit 302 is configured to control the plurality of data terminals to obtain privacy parameters through the federated learning protocol, and process local data by using a differential privacy technology with dynamic sensitivity and privacy parameter adaptive adjustment, so as to send an encrypted perturbed gradient data set to the center server. The generation unit 301 is further configured to perform encrypted weighted aggregation after the center server receives the perturbed gradient data set, and generate anti-collusion global model parameters through a threshold decryption mechanism. The processing unit 302 is further configured to distribute the global model parameters to the plurality of data terminals, so that the plurality of data terminals perform vulnerability detection.

[0153] In some embodiments, the privacy parameters include a privacy budget and a data freshness indicator. The processing unit 302 is specifically configured to generate 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 the local training gradient to form an encrypted perturbed gradient. The processing unit 302 is further configured to perform amplitude truncation processing on the encrypted perturbed gradient, and output a perturbed gradient data set satisfying a preset norm constraint.

[0154] In some embodiments, the generation unit 301 is specifically configured to calculate the dynamic aggregation weight of each participating node according to the data quality score of the perturbed gradient data set, perform weighted aggregation on the perturbed gradient data set by using a homomorphic encryption algorithm, and generate encrypted intermediate model parameters. The generation unit 301 is further configured to decrypt the intermediate model parameters into global model parameters through a threshold decryption mechanism.

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

[0156] In some embodiments, the processing unit 302 is further configured to: in a case where the data terminals send the detection result feature vectors to the central server, map the detection result feature vectors to knowledge graph nodes, and construct a multi-dimensional associated vulnerability topology structure; generate an adversarial training sample based on the vulnerability topology structure, and distribute the data terminals to enhance the defense capability; and in a case where the data terminals send the encrypted gradient parameters of the adversarial training to the central server, aggregate the encrypted gradient parameters to iteratively update the global model parameters.

[0157] In some embodiments, the processing unit 302 is specifically configured to: analyze the vulnerability attributes of the detection result feature vectors, establish a three-dimensional association edge of type-path-impact; calculate the association strength of the three-dimensional association edge using an attention mechanism, and generate a dynamically weighted knowledge graph topology; and encode the knowledge graph topology into a feature vector as an input of the next round of training of the global model.

[0158] In some embodiments, the generation unit 301 is specifically configured to: define data terminal access rules through a blockchain smart contract, generate a trusted data terminal list containing an identity verification mechanism; establish a homomorphic encryption channel based on the trusted data terminal list, and distribute initial model parameters and a privacy budget to the data terminals; and dynamically update the trusted data terminal list in real time to verify the data compliance of the data terminals and maintain the environmental trustworthiness.

[0159] In the privacy protection-based federated game vulnerability detection device provided in the embodiments of the present application, a trusted environment is constructed through a blockchain smart contract and a homomorphic encryption protocol is integrated, ensuring that the data interaction process is transparent and traceable and does not need to rely on a third-party trust institution, thereby reducing the data tampering risk from the root; the dynamic sensitivity adaptive differential privacy technology enables the data terminals to intelligently adjust the noise injection intensity according to the local data characteristics, maximally retains the data availability on the premise of privacy protection, and avoids the problems of excessive blurring or insufficient protection caused by traditional fixed parameters; the encrypted weighted aggregation and threshold decryption mechanism form a double security barrier, the former prevents the central server from directly accessing the plaintext data, and the latter cooperatively decrypts the threshold value through multiple nodes, so that even if some nodes are attacked, the complete model parameters cannot be restored, effectively resisting collusion attacks, and significantly improving the data security level and privacy compliance in the network vulnerability detection scenario.

[0160] As to the apparatus in the above embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.

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

[0162] The memory 402 described above is configured to store executable instructions of the processor 401. It can be understood that the processor 401 is configured to execute the instructions to implement the privacy protection based federated game vulnerability detection method in the above embodiments.

[0163] It should be noted that those skilled in the art can understand that the electronic device structure shown in Figure 4 does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown in Figure 4 , or combine certain components, or different component arrangements.

[0164] The processor 401 is the control center of the electronic device, connects various parts of the electronic device through various interfaces and lines, executes software programs and / or modules stored in the memory 402 and data stored in the memory 402, processes data, and thus monitors the entire electronic device. The processor 401 can include one or more processing units. Optionally, the processor 401 can 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 processes wireless communication. It can be understood that the modem processor can also not be integrated into the processor 401.

[0165] The memory 402 can be used to store software programs and various data. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs (such as determination units, processing units, etc.) required by at least one functional module, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.

[0166] In an exemplary embodiment, a computer readable storage medium including instructions is also provided, for example, the memory 402 including instructions, which can be executed by the processor 401 of the electronic device 400 to implement the privacy protection based federated game vulnerability detection method in the above embodiments.

[0167] In actual implementation, Figure 3 The steps performed by the generating unit 301 and the processing unit 302 in the foregoing embodiment can be implemented by the processor 401 in the computer program stored in the memory 402. Figure 4 The specific execution process can refer to the description of the method part in the foregoing embodiment, and details are not described herein.

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

[0169] In the exemplary embodiments, the embodiments of the present application also provide a computer program product including one or more instructions, which can be executed by the processor 401 of the electronic device to complete the privacy protection based federated game vulnerability detection method in the foregoing embodiments.

[0170] It should be noted that the instructions in the computer readable storage medium or the one or more instructions in the computer program product are executed by the processor of the electronic device to realize each process of the foregoing method embodiments, and the same technical effects as the foregoing method can be achieved. To avoid repetition, details are not described herein.

[0171] Through the description of the foregoing embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the foregoing functional modules is taken as an example for illustration, and in actual application, the foregoing functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete the full classification part or part of the functions described above.

[0172] In several embodiments provided in the present 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 only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual ones can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0173] The units described as separate components may or may not be physically separate, and the components displayed as units may be a physical unit or multiple physical units, that is, may be located in one place, or also can be distributed to multiple different places. Part or all of the classified units can be selected according to actual needs to achieve the purpose of the embodiment of the present application.

[0174] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0175] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole classification or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk and various program code storage media.

[0176] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A privacy protection based federated game vulnerability detection method, characterized in that, The application is applied to a vulnerability detection system comprising a central server and a plurality of data terminals, and the method comprises: A trusted environment between the central server and the plurality of data terminals is constructed by using a blockchain smart contract, which comprises: defining data terminal access rules through the blockchain smart contract, generating a trusted data terminal list containing an identity authentication mechanism, the access rules being a three-dimensional authentication system of hardware-software-behavior, including a comprehensive identity authentication mechanism combining a TPM hardware fingerprint, an attribute encryption module and a historical behavior portrait; based on the trusted data terminal list, a homomorphic encryption channel is established, and initial model parameters and a privacy budget are distributed to the plurality of data terminals; the data compliance of the data terminals is verified in real time, and the trusted data terminal list is dynamically updated to maintain the environmental trustworthiness; and a federated learning protocol integrated with homomorphic encryption is generated; The plurality of data terminals obtain privacy parameters through the federated learning protocol, and locally process data by using a differential privacy technology with a dynamic sensitivity and the privacy parameters adaptively adjusted, so as to send an encrypted perturbed gradient data set to the central server; The privacy parameters comprise the privacy budget and a data freshness index, and the locally processing data by using the differential privacy technology with the dynamic sensitivity and the privacy parameters adaptively adjusted comprises: A time-varying sensitivity parameter is generated according to the privacy budget, the data freshness index and a sensitivity parameter; An adaptive noise is generated based on the time-varying sensitivity parameter, and a local training gradient is injected to form an encrypted perturbed gradient; An amplitude truncation processing is performed on the encrypted perturbed gradient, and the perturbed gradient data set satisfying a preset norm constraint is output; After the central server receives the perturbed gradient data set, an encrypted weighted aggregation is performed, and an anti-collusion global model parameter is generated through a threshold decryption mechanism; The encrypted weighted aggregation constructs a gradient quality evaluation model through a blockchain smart contract, and the gradient quality evaluation model generates a dynamic aggregation weight by fusing a data freshness index, a behavior trustworthiness score and a model contribution degree in three dimensions; The global model parameter is distributed to the plurality of data terminals, so that the plurality of data terminals perform vulnerability detection.

2. The method of claim 1, wherein, The performing of the encrypted weighted aggregation and the generation of the anti-collusion global model parameter through the threshold decryption comprise: A dynamic aggregation weight of each participating node is calculated according to a data quality score of the perturbed gradient data set; A homomorphic encryption algorithm is used to perform weighted aggregation on the perturbed gradient data set, and an encrypted intermediate model parameter is generated; The intermediate model parameter is decrypted into the global model parameter through the threshold decryption mechanism.

3. The method of claim 2, wherein, The decrypting of the intermediate model parameter into the global model parameter through the threshold decryption mechanism comprises: The intermediate model parameter is jointly decrypted by using key fragments of a sharded storage to reconstruct a decryption key; Noise correction processing is performed on the decrypted intermediate model parameter to eliminate random perturbations introduced by differential privacy. The momentum optimization algorithm is used to optimize the parameters of the corrected intermediate model, and the global model parameters resistant to collusion are output.

4. The method of claim 1, wherein, The method further comprises: In the case where the plurality of data terminals send the detection result feature vectors to the central server, the detection result feature vectors are mapped to knowledge graph nodes, and a multi-dimensional associated vulnerability topology structure is constructed; Based on the vulnerability topology structure, an adversarial training sample is generated and distributed to the plurality of data terminals to enhance the defense capability; In the case where the plurality of data terminals send the encrypted gradient parameters of adversarial training to the central server, the plurality of encrypted gradient parameters are aggregated to iteratively update the global model parameters.

5. The method of claim 4, wherein, The detection result feature vectors are mapped to knowledge graph nodes, and a multi-dimensional associated vulnerability topology structure is constructed, comprising: The vulnerability attributes of the detection result feature vectors are parsed, a three-dimensional association edge of type-path-impact is established, the association strength of the three-dimensional association edge is calculated using an attention mechanism, and a dynamically weighted knowledge graph topology is generated; The knowledge graph topology is encoded into a feature vector as the input of the next round of training of the global model.

6. A privacy-preserving federated game vulnerability detection apparatus, characterized in that, The device comprises: A generation unit configured to construct a trusted environment between the central server and the plurality of data terminals using a blockchain smart contract, and generate a federated learning protocol integrated with homomorphic encryption; A processing unit configured to control the plurality of data terminals to obtain a privacy parameter through the federated learning protocol, and process local data using a differential privacy technology adaptively adjusted by a dynamic sensitivity and the privacy parameter, so as to send an encrypted perturbed gradient dataset to the central server; the privacy parameter comprises a privacy budget and a data freshness indicator, and the processing of the local data using the differential privacy technology adaptively adjusted by the dynamic sensitivity and the privacy parameter comprises: generating a time-varying sensitivity parameter according to the privacy budget, the data freshness indicator, and a sensitivity parameter; generating adaptive noise based on the time-varying sensitivity parameter, and injecting the adaptive noise into a local training gradient to form an encrypted perturbed gradient; performing amplitude truncation processing on the encrypted perturbed gradient, and outputting the perturbed gradient dataset satisfying a preset norm constraint; The generation unit is further configured to, after the central server receives the perturbed gradient dataset, perform encrypted weighted aggregation, and generate global model parameters resistant to collusion through a threshold decryption mechanism; the encrypted weighted aggregation constructs a gradient quality evaluation model through the blockchain smart contract, and the gradient quality evaluation model generates a dynamic aggregation weight by fusing a data freshness indicator, a behavior trust score, and a model contribution degree in three dimensions; The processing unit is further configured to distribute the global model parameters to the plurality of data terminals, so that the plurality of data terminals perform vulnerability detection.

7. An electronic device, comprising: It comprises: A processor; A memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method of any one of claims 1 to 5.

8. A computer-readable storage medium having stored therein instructions, the computer-readable storage medium comprising: When the computer executes the instructions, the computer executes the method of any one of claims 1 to 5.

Citation Information

Patent Citations

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

    CN117670547A

  • Decentralized federated learning method and system based on personalized local differential privacy

    CN118940857A