A risk adaptive consensus based homomorphic federated learning method and system for industrial internet
By employing a risk-adaptive consensus-based dense federated learning method in industrial settings, dynamically switching consensus protocols and using homomorphic encryption to protect data, the problems of efficiency, security, and node fairness in collaborative learning in industrial settings are solved, achieving full lifecycle data privacy protection and model training reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-23
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to balance real-time performance and security in the complex network environments of industrial sites. Node election mechanisms suffer from fairness issues, and privacy protection for core industrial data is insufficient.
We adopt a risk-adaptive consensus-based encrypted federated learning method, which uses a verifiable random function to fairly elect a verification committee and a master aggregation node, uses homomorphic encryption to protect data privacy, dynamically switches the consensus protocol according to network risks, and combines a threshold decryption mechanism to achieve secure and efficient model collaborative training.
It enables fair participation of industrial edge nodes, dynamically balances the efficiency and security of the consensus process, builds a data privacy protection system throughout the entire lifecycle, adapts to the cross-domain collaborative learning needs of industrial sites, and improves the reliability of model training.
Smart Images

Figure CN121562859B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of artificial intelligence, machine learning, federated learning model, and specifically relates to a risk adaptive consensus based on a secure federated learning method and system for industrial internet. BACKGROUND
[0002] The development of industrial internet promotes the demand for cross-domain collaborative learning, aiming to combine data from multiple industrial sites to improve equipment maintenance and process optimization. However, when applying collaborative learning paradigms such as federated learning to industrial site networks, a series of unique challenges are faced:
[0003] First, the real-time and security of the consensus mechanism are difficult to balance. The industrial site network environment is complex and dynamic. Existing decentralized federated learning solutions usually use fixed Byzantine fault-tolerant consensus protocols (such as PBFT). To ensure strong consistency and security, these protocols usually require multiple rounds of broadcast communication, which has inherent high communication complexity. When the number of nodes is large or the network is unstable, it will produce significant consensus delay, seriously affecting the real-time performance of the model training task. On the contrary, if a lightweight protocol with fewer communication rounds is used to pursue efficiency, its security level against Byzantine node malicious behavior is often insufficient. Existing methods lack effective means to deal with the dynamic changes of network state, and cannot balance efficiency and security flexibly during training.
[0004] Second, the node election mechanism has the potential for fairness and decentralization. Secure consensus usually relies on a verification committee composed of some nodes. Existing election mechanisms (such as based on historical contribution, proof of work PoW, etc.) are prone to cause resource-occupying nodes (such as large servers) to occupy committee seats for a long time, which not only violates the principle of distributed and equal participation of industrial internet, but also forms a potential centralized attack surface. Industrial scenarios need an election method that can ensure equal participation opportunities for all compliant nodes.
[0005] Third, the privacy leakage risk of industrial core data has not been fully addressed. Industrial model update data may contain sensitive process parameters and equipment operating status. Many existing collaborative learning solutions focus on ensuring the credibility of the consensus process, but lack protection for the model update data itself during transmission. Plain text or simply encrypted data still has the risk of being analyzed by malicious nodes or external attackers to infer the original data features during transmission and aggregation. In addition, if the decryption key is controlled by a single entity, there is a serious risk of single-point leakage leading to exposure of all data.
[0006] In summary, the prior art is difficult to provide a systematic collaborative learning solution under the multiple constraints of the real-time requirements of the industrial site, the complex network environment, the inherent demand for node fairness, and the high level of privacy protection requirements for production data. SUMMARY
[0007] In view of the defects and deficiencies of the prior art, the present application provides a risk adaptive consensus based on the industrial internet of things Method and system for federated learning in encrypted state.
[0008] The scheme is applied to a distributed network composed of multiple industrial edge computing gateways deployed in an industrial site. Its core is that before each model training round, based on the random seed determined by the network consensus, the verification committee and the main aggregation node are elected by the verifiable random function, ensuring that the election is independent of the historical reputation or computing power assets of the nodes. After training using local private industrial data, the unselected nodes use homomorphic encryption technology to encrypt the model gradient and other update data, generate encrypted update data and submit it.
[0009] The key innovation of the present application is to introduce a risk adaptive consensus mechanism. The committee members calculate a quantitative anomaly score by weighting the network response delay, the historical behavior of the main aggregation node, and the message validity. Based on the Byzantine fault tolerance mechanism, the committee exchanges and verifies the digitally signed anomaly scores to collectively determine whether the current consensus environment is low risk or high risk. According to the risk level, the system adaptively switches the consensus protocol: execute the two-stage protocol with low communication complexity to improve efficiency when the risk is low; when the risk is high, trigger view change and enable the new master node to execute the three-stage protocol with high security strength to ensure security.
[0010] After consensus, the main aggregation node performs homomorphic addition aggregation on the encrypted update data. Finally, through the threshold decryption mechanism jointly participated by the committee members, the global model update is generated, thus completing a round of safe, efficient and fair model collaborative training. The present application integrates the technical challenges of balancing efficiency and security, fair participation of nodes and data lifecycle privacy protection faced by collaborative learning in industrial scenarios.
[0011] The technical scheme adopted by the present application to solve its technical problems is:
[0012] A risk adaptive consensus based on the industrial internet of things Method and system for federated learning in encrypted state, applied to a distributed network composed of multiple industrial edge computing gateways, the industrial edge computing gateway is deployed in an industrial site and collects industrial equipment running state data, comprising:
[0013] Before each training round, based on the random seed determined by the network consensus, the verification committee and the main aggregation node are elected from the industrial edge computing gateway through a verifiable random function;
[0014] The training node is an industrial edge computing gateway that is not selected as a verification committee. After completing model training locally using industrial equipment running state data, it uses homomorphic encryption public key to encrypt model update data to generate ciphertext update data and submit it to the main aggregation node.
[0015] The consensus process is executed by the verification committee, including:
[0016] a) Each member generates a quantitative anomaly score based on network response delay normalization results, main aggregation node historical behavior records, and message validity, and weighted;
[0017] b) By broadcasting the digitally signed anomaly score, a low-risk or high-risk level decision is made based on the Byzantine fault tolerance mechanism;
[0018] c) When the risk is low, a low-communication-complexity two-stage communication protocol is executed, and when the risk is high, a view change is triggered and a high-security-strength three-stage communication protocol is executed by the new main aggregation node;
[0019] The ciphertext update data that passes the consensus is subjected to homomorphic addition aggregation, and the global model update is generated by the verification committee through a threshold decryption mechanism.
[0020] Further, the random seed is generated based on the block hash confirmed by the last round of consensus and the current training round number through a hash algorithm. The industrial edge computing gateway participating in the election uses the local private key to calculate the random seed to obtain a pseudo-random value and a zero-knowledge proof, and then broadcasts its identity, pseudo-random value and zero-knowledge proof. Other nodes verify the validity of the zero-knowledge proof through their public keys, and the election result is determined only by the random seed and the local key of each industrial edge computing gateway, independent of the historical reputation, computing power assets or data contribution of the node.
[0021] Further, the sum of the risk factor weights of the quantitative anomaly score in step a) is 1, the normalization result of the network response delay is obtained by processing the difference between the current observation delay and the historical delay mean and standard deviation through the Sigmoid function, the historical delay mean and standard deviation are calculated based on the response delay data of the past M rounds of training, M is a positive integer; The message validity is determined by the invalid message indicator. Invalid messages include messages with failed signature verification, incorrect message format and unmatched hash values. When the invalid message indicator is 1, it means that an invalid message has been received, and when it is 0, it means that the message is valid.
[0022] Further, the historical behavior record of the main aggregation node is iteratively updated by an exponential moving average, and the updating manner is that the historical behavior record value is equal to a preset attenuation factor multiplied by a consensus failure indicator of this round, plus (1-preset attenuation factor) multiplied by a historical behavior record value of the last round; wherein the consensus failure indicator is 1 when the view change is triggered, and 0 when the consensus is successful, and the preset attenuation factor is in the range of [0, 1].
[0023] Further, the specific process of the view change is that the verification committee member triggering the view change broadcasts a view change request carrying evidence, any verification committee member starts the view change after receiving at least f+1 valid requests, determines a new main aggregation node according to the election ordering of the verifiable random function, and the new main aggregation node broadcasts a new view message containing view change evidence to take over the consensus process, and f is the maximum number of Byzantine nodes allowed by the system.
[0024] Further, the two-stage communication protocol includes a proposal phase and a preparation phase, the proposal phase is that the main aggregation node broadcasts a proposal message containing a block to be consensus to the verification committee, the preparation phase is that the verification committee member broadcasts a preparation message after verifying the validity of the proposal message, and the main aggregation node reaches consensus after collecting at least 2f+1 valid preparation messages; the three-stage communication protocol adds a commit phase on the basis of the two-stage communication protocol, the verification committee member broadcasts a commit message after collecting at least 2f+1 valid preparation messages, and any participant node reaches consensus after collecting at least 2f+1 valid commit messages, and f is the maximum number of Byzantine nodes allowed by the system.
[0025] Further, in the threshold decryption mechanism, the private key of the homomorphic decryption is divided into K key fragments, K is a positive integer, and the key fragments are respectively kept by the industrial edge computing gateways of the verification committee, and at least t members need to provide key fragments for collaborative operation during decryption, and f < t ≤ K, f is the maximum number of Byzantine nodes allowed by the system.
[0026] Further, the specific implementation of the Byzantine fault-tolerant mechanism in step b) is that each verification committee member collects at least 2f+1 abnormal scores from different members, which are verified to be valid by digital signature, to form a consistent score set, counts the number of abnormal scores exceeding a preset threshold in the consistent score set, and if the number is less than f+1, it is determined as low risk, otherwise as high risk; the value of the preset threshold is in the range of [0, 1], and f is the maximum number of Byzantine nodes allowed by the system.
[0027] Further, the model update data is the gradient of the model parameters, the training node completes model training based on a local private data set, and the model is a fault prediction model or a process optimization model.
[0028] And a risk adaptive consensus-based secure federated learning system for industrial internet, comprising a plurality of industrial edge computing gateways deployed in industrial sites, the industrial edge computing gateways are connected and collect the running state data of the industrial equipment in the site, and the plurality of industrial edge computing gateways form a distributed network, the system further comprises:
[0029] An election unit is configured to elect a verification committee and a main aggregation node from the industrial edge computing gateways through a verifiable random function based on a random seed determined by the network-wide consensus before the start of each training round;
[0030] A secure processing unit is configured to use the homomorphic encryption public key to encrypt the gradient data of the model parameters to generate secure update data, and submit it to the main aggregation node after the industrial edge computing gateways that are not selected as the verification committee complete the model training locally using the industrial equipment running state data and the local private data set as training nodes;
[0031] A risk adaptive consensus unit is configured to perform a consensus process by the verification committee, the consensus process comprises: generating a quantitative anomaly score based on network response delay normalization results, main aggregation node historical behavior records and message validity weighting, reaching a low-risk or high-risk level determination through broadcasting a digitally signed anomaly score and based on a Byzantine fault tolerance mechanism, and adaptively switching the communication protocol according to the risk level: executing a two-stage communication protocol for low risk, and triggering view replacement and executing a three-stage communication protocol by a new main aggregation node for high risk;
[0032] An aggregation decryption unit is configured to perform homomorphic addition aggregation on the secure update data passed by the consensus by the finally confirmed main aggregation node, and generate a global model update through the threshold decryption mechanism of the verification committee to update the local model of all industrial edge computing gateways.
[0033] And a computer device comprising a memory, a processor and a computer program stored on the memory, the processor implements the method as described above when executing the computer program.
[0034] A non-transitory computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described above.
[0035] Compared with the prior art, the present application and its preferred schemes at least include the following beneficial effects:
[0036] The fair participation and decentralized deployment of the industrial edge node are realized, the dependence on node computing power assets, historical reputation or data contribution is eliminated through the election mechanism based on the cryptographic random function, the monopoly risk of resource-occupying nodes is avoided, the resource-constrained industrial edge computing gateway obtains equal verification and participation opportunities, the centralized attack risk is reduced, and the core demand of distributed collaboration of the industrial internet is met.
[0037] The efficiency and security of the consensus process are dynamically balanced, the risk perception and adaptive consensus protocol switching mechanism are used, the communication protocol strength can be flexibly adjusted according to the actual risk state of the industrial network, the training real-time performance is ensured in the low-risk scene of the stable network environment, the Byzantine fault tolerance capability is strengthened in the high-risk scene with security threats, the complex environment of industrial field network is effectively adapted, and the pain points of the existing fixed consensus protocol that cannot balance efficiency and security are solved.
[0038] A full-life-cycle data privacy protection system is constructed, the model update data is processed in a secret state through homomorphic encryption, and multi-node collaborative decryption is realized by combining a threshold decryption mechanism, so that the reverse attack risk caused by data plaintext transmission or simple encryption is avoided, and the single-node key holding caused single-point leakage risk is prevented, the sensitive information in the industrial core production data is fully protected, and the strict requirements of the industrial scene on data security are met.
[0039] The overall application requirements of the industrial field are adapted, efficient, secure and fair cross-domain collaborative learning is realized in the resource-constrained edge computing environment through the deep integration of various technical modules, the training reliability of the industrial equipment maintenance and process optimization model is improved, and practical and stable technical support is provided for the landing of the industrial internet cross-domain collaborative learning. BRIEF DESCRIPTION OF DRAWINGS
[0040] The application will be further described in detail below with reference to the drawings and specific embodiments:
[0041] Figure 1 The overall flowchart of the embodiment method of the application is shown in the figure;
[0042] Figure 2 The implementation flowchart of the dynamic adaptive consensus step of the embodiment of the application is shown in the figure;
[0043] Figure 3 The determination and protocol execution flowchart of the dynamic adaptive consensus process of the embodiment of the application is shown in the figure. DETAILED DESCRIPTION
[0044] In order to make the features and advantages of the application more obvious and easy to understand, the following embodiments are described in detail as follows:
[0045] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0046] It should be noted that the terms used herein are only intended to describe specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and it should also be understood that when the terms "comprise" and / or "include" are used in the specification, there is a reference to the presence of a feature, step, operation, device, component, and / or combinations thereof.
[0047] The main purpose of the present application is to overcome the defects of low consensus efficiency, unfair edge node election and production data privacy leakage in the prior art in industrial scene application. Specifically, the present application aims to solve how to achieve dynamic balance of real-time and security of model training in an industrial field with heterogeneous network environment and limited resources by dynamically perceiving network risks and adaptively switching communication protocols. The embodiment of the present application discloses a construction and implementation process of a risk-adaptive consensus-based homomorphic federated learning method for industrial internet. In principle, it is applied to a distributed network composed of multiple industrial edge computing nodes, which are connected and collect the running state data of industrial equipment on site; comprising the following steps:
[0048] S1 election stage: before the start of each training round, The industrial edge computing nodes of the participating party are based on a random seed determined by the network consensus, wherein, , a verifiable random function is used to calculate the election ranking value of each node, and then the verification committee and the main aggregation node are selected;
[0049] S2 local processing: after the industrial edge computing node as the training node completes the training of the fault prediction or process optimization model locally using the collected industrial equipment running state data, the local model is encrypted using the homomorphic encryption public key to generate homomorphic update data, ensuring that the industrial production data does not leave the factory;
[0050] S3 consensus stage: after the main aggregation node collects the homomorphic update data and packages it into a block, it broadcasts a proposal message to the verification committee, and the verification committee members perform an adaptive consensus process based on network risk perception, as follows:
[0051] S3-1 risk assessment: each member of the verification committee independently calculates an anomaly score that quantifies the risk of the main aggregation node's behavior, and the anomaly score is calculated as follows:
[0052]
[0053] wherein, is the abnormal score calculated by the committee member to the primary aggregation node , is the Sigmoid function, is the node , is the observed response delay of the industrial network of the primary aggregation node and are respectively the mean and standard deviation of the response delay of the past M rounds of training (M is a positive integer) for reflecting the congestion status of the current industrial network, wherein, M , is the historical behavior record value of the node , is the member of the node , receives a binary indicator of invalid messages from , is the preset risk factor weight, wherein
[0054] S3-2 Risk Consensus, a Byzantine fault-tolerant consensus on the consensus risk level of the current industrial network is reached among the committee members through broadcasting digitally signed abnormal scores, each committee member broadcasts a message authenticated by its digital signature containing the abnormal score calculated by it; after collecting at least messages of this kind from different members with valid signatures, each committee member forms a local and consistent score set, counts the number of abnormal scores whose median value exceeds the preset threshold , and compares it with , if the number is less than , the risk level is determined to be low risk; otherwise, it is determined to be high risk, wherein is the maximum number of Byzantine nodes that the system can tolerate, ;
[0055] S3-3 Protocol Execution, according to the risk level reached by the consensus, the subsequent communication protocol is adaptively executed, if the risk level is low risk, the two-stage communication protocol is executed; if the risk level is high risk, the view change protocol is executed to elect a new primary aggregation node, and the three-stage communication protocol is executed by the new primary aggregation node.
[0056] S4 aggregation and decryption step: after consensus is reached, the final confirmed master aggregation node performs homomorphic addition operation on all ciphertext update data in the block to complete aggregation, and the aggregated ciphertext result is decrypted by the verification committee through a threshold decryption mechanism, and then used for global industrial model update. The specific process is as follows: the historical bad behavior record value Update by exponential moving average:
[0057]
[0058] wherein, is the record value of the i-th round, is the record value of the i-th round, is the record value of the i-th round, is the record value of the i-th round, is a binary indicator of whether the master aggregation node fails in consensus, and if the view change protocol is triggered in this round, is 1, and if the master aggregation node successfully completes the block consensus, is recorded as 0, is a preset decay factor, wherein .
[0059] As a preferred scheme of the embodiment, in the election stage, the result of the election process is determined only by the random seed and the local key of each industrial edge computing node, and is independent of the historical reputation, computing power asset or data contribution of the node.
[0060] As a preferred scheme of the embodiment, in the view change protocol stage, when the verification committee members triggering the protocol broadcast the view change request carrying the evidence; when a verification committee member receives valid view change requests, it confirms that the current master aggregation node is invalid, starts the view change, and determines the new master aggregation node according to the verifiable random function election ordering; the new master aggregation node broadcasts a new view message containing valid view change evidence to the verification committee to take over the consensus process of the industrial network.
[0061] As a preferred scheme of the embodiment, the communication protocol in step S3-3 further comprises:
[0062] The two-stage communication protocol consists of a proposal stage and a preparation stage. In the proposal stage, the master aggregation node broadcasts a proposal message containing the block to be consensus to the verification committee. In the preparation stage, each member of the verification committee broadcasts a preparation message indicating that it is ready to accept the proposal after verifying the validity of the proposal message. Consensus is reached after the master aggregation node collects at least valid preparation messages; the three-stage communication protocol includes the proposal and preparation stages, and further includes a commit stage based on the proposal and preparation stages. Each member of the verification committee broadcasts a commit message indicating that it is ready to commit the proposal after collecting at least After receiving at least valid prepare messages, consensus is reached, ensuring data consistency under Byzantine attacks, where is the maximum number of Byzantine nodes that the system can tolerate.
[0063] As a preferred solution of the embodiment, the threshold decryption mechanism includes:
[0064] The private key of homomorphic decryption is divided into key fragments, which are respectively kept by the industrial edge computing nodes of the verification committee, where At least members are needed to decrypt the aggregated result, where provides its key fragment for collaborative operation to prevent any single industrial node from stealing the global model parameters.
[0065] As a preferred solution of the embodiment, before the start of each training round, in order to prevent the centralized factory node with rich computing resources from monopolizing the consensus right, a verifiable random function is used to elect the main aggregation node of the round.
[0066] Step A: Random seed generation: At the beginning of the training round R, all industrial edge nodes in the network need to agree on a public random seed used for this round of election. Based on the block hash generated by the last round of consensus confirmation, the formula is as follows:
[0067]
[0068] Where R is the number of the current training round, and is the public network state; is the hash value of the last round of consensus final confirmation block recorded on the distributed ledger, which is also the public network state; SHA256 is a cryptographic hash function; Represents the splicing operation. It is unpredictable before the end of the last round of consensus, so It is also unpredictable before the start of the current round, and all nodes can calculate the same value based on public information, ensuring the consistency of the seed across the network;
[0069] Step B: VRF calculation and verification: Each industrial edge node that wants to participate in the election uses its local private key to calculate , obtaining a pseudo-random hash value and a zero-knowledge proof The process is represented as:
[0070]
[0071] Subsequently, the node broadcasts its identity, the calculated and the proof to the entire network. Upon receiving the broadcast, other participant nodes in the network verify the validity of the proof using the public key of the node . The cryptographic properties of verifiable random functions ensure that only the node holding can generate a legitimate pair, and the value of is uniformly randomly distributed;
[0072] Step C: Committee Generation:
[0073] After excluding all participant nodes with failed verification, all honest participant nodes sort all candidate nodes in ascending order according to the legitimate random hash value . In the sorted result, the highest-ranked participant node is designated as the primary aggregation node for this round, denoted as ; the participant nodes ranked , including , form the verification committee. This election result is independent of the historical reputation, assets, or contribution of the nodes, ensuring the fairness of the election.
[0074] As a preferred solution of the present embodiment, the local processing step includes: by the participant nodes that are not selected for the verification committee, i.e., the training nodes, locally completing model training and performing privacy protection processing on the generated model update data. This step further includes:
[0075] The training node completes a round of model training on its local private data set to obtain model update data , typically the gradient of the model parameters;
[0076] Homomorphic encryption: to protect the privacy of in subsequent transmission and aggregation processes, the training node encrypts using the publicly available homomorphic encryption public key to generate encrypted update data . The process is represented as:
[0077]
[0078] Data upload: the training node The generated ciphertext update data is sent to the elected primary aggregation node of this round .
[0079] As a focus of the embodiment scheme of the present application, the implementation of the consensus step specifically includes:
[0080] Risk assessment, each member of the verification committee independently calculates an anomaly score quantifying the risk of the behavior of the primary aggregation node, which further includes:
[0081] a. Proposal broadcast: the primary aggregation node After collecting ciphertext update data, it is packaged into a proposal block B and the proposal message is broadcast to the verification committee;
[0082] b. Anomaly score calculation: each member of the verification committee After receiving the proposal, independently calculates the anomaly score of according to the formula , which provides a quantitative risk assessment result for the behavior of the primary aggregation node by weighted sum of communication delay, historical behavior and current message compliance, The value of is 0 or 1. The historical behavior record value is updated iteratively by exponential moving average (EMA), so that recent behavior has a greater impact weight than long-term behavior.
[0083] Risk consensus, the stage aims to reach a Byzantine fault-tolerant consensus on the risk assessment itself, which further includes:
[0084] a. Signature broadcast: the verification committee member Broadcasts a message containing signed by its digital signature.
[0085] b. Forming a consistent set and determining: each member waits and collects until it receives at least valid signed messages of this type from different members, forming a locally consistent score set. Based on this set, each member independently counts the number of anomaly scores whose values exceed the preset threshold. If the number is less than , it is determined that the risk level of this round is low risk; otherwise, it is determined to be high risk. This mechanism ensures that the determination results of all honest members on the risk level are consistent.
[0086] Protocol execution: according to the risk level consensus reached in the last step, adaptively execute the subsequent protocol, which further includes:
[0087] a. Low-risk path: if the risk is low, a two-phase communication protocol is executed. The protocol includes a proposal and preparation phase, and the communication overhead is low, which is suitable for a trusted network environment;
[0088] b. High-risk path: if the risk is high, a view change protocol is executed. The committee members broadcast a view change request carrying evidence, and after receiving a valid request, a new primary aggregation node is determined. The new primary aggregation node takes over the process by broadcasting a new view message and enforces a three-phase communication protocol with higher security, which adds a commit phase based on the two-phase protocol to complete the current round of consensus.
[0089] As a preferred scheme of the embodiment, the aggregation and decryption steps are completed by the final confirmed primary aggregation node to calculate the model update and distribute it to all participant nodes, which further includes:
[0090] Homomorphic aggregation: the primary aggregation node performs homomorphic addition operation on all homomorphic update data in the consensus-confirmed block to obtain the aggregated homomorphic global result ].
[0091] Threshold decryption: K members of the verification committee use a threshold decryption mechanism. At least t members are required to provide their own private key fragments and cooperate to decrypt ] to recover the plaintext global model update , where , is the maximum number of Byzantine nodes that the system can tolerate.
[0092] Global model update: the final plaintext is broadcast to all participant nodes to update their local models, thus completing a complete round of training.
[0093] The above technical scheme is adopted in the blockchain field to improve the scalability and efficiency of consensus nodes. Compared with the prior art, the present application creatively and deeply integrates cryptographic fair election, dynamic risk assessment and adaptive consensus protocol to solve the technical challenges of efficiency, security, fairness and privacy protection in decentralized federated learning.
[0094] In order to more clearly illustrate how the technical components in the present scheme work together to achieve risk adaptation, as Figure 1As shown, the system implementation scheme provided by the embodiment for reference is to encapsulate the federated learning method provided by the above embodiment into four core modules, which are all deployed in each industrial edge computing node, and the four modules are a field interface and encryption module, a risk perception and evaluation module, a risk adaptive consensus module, and a threshold key management module. Data interaction between the modules includes raw data, ciphertext gradient, public key, private key fragment, control signal / AS score, etc., and the system needs to access the monitoring signals and raw data of industrial equipment (such as numerical control machine tools). At the same time, the complete training process of the present scheme is as follows: first, verify the committee and the main aggregation node based on VRF election, then locally process and generate ciphertext update data by the training node, then execute the dynamic adaptive consensus process, then perform ciphertext aggregation and threshold decryption to update the global model, and finally judge whether the model converges, if it converges, end the training, if it does not converge, repeat the above process.
[0095] As shown in Figure 2 The execution process of the dynamic adaptive consensus process provided by the embodiment of the present application is as follows: the process starts at S3 stage, first performs S3-1 risk assessment (calculates the abnormal score AS of the main aggregation node), then enters S3-2 risk consensus (committee members broadcast signed scores to form a consistent set), then judges the risk level; if it is low risk, execute two-stage communication protocol, if it is high risk, execute view change protocol and execute three-stage communication protocol by the new main node, after consensus is reached, enter the ciphertext aggregation and threshold decryption link, and finally update the global model.
[0096] As shown in Figure 3 The specific execution process of the consensus stage (S3) is as follows: first, start S3-1 risk assessment, calculate the abnormal score AS of the main aggregation node by formula; then execute S3-2 risk consensus, committee members broadcast the AS score signed by digital signature, collect at least 2f+1 valid messages to form a consistent set; determine the risk level based on the set, if it is low risk, execute two-stage communication protocol, if it is high risk, execute view change protocol, replace the main aggregation node and execute three-stage communication protocol; after consensus is reached, proceed to the ciphertext aggregation and threshold decryption step, complete the global model update.
[0097] Finally, the technical effects of the present scheme are illustrated and verified in the following two aspects:
[0098] 1. Communication message complexity comparison
[0099] The existing standard PBFT protocol contains three complete stages of "pre-preparation, preparation, and submission", and in a network of n nodes, the total network message communication volume is The present application introduces a risk adaptive mechanism, in the normal industrial production period determined as low risk, the system switches to the low risk path, only performs the "proposal" and "preparation" two stages, removes the high overhead "submission" stage. In the low risk mode, the message communication of the present application is reduced to Compared with the prior art , the present application significantly reduces the network communication overhead.
[0100] 2, consensus delay comparison
[0101] The prior art takes at least 3 network round trip time (RTT) to complete a consensus. If considering the side chain cross chain verification common in industrial network, the delay often exceeds 4 RTT. The low risk path of the present application reduces the consensus interaction to 2 RTT. The theoretical consensus delay of the present application is reduced by 1 RTT compared with the standard scheme, about 33%, and more than 50% compared with the double chain scheme. For the delay sensitive industrial edge computing scene, the delay reduction brought by the protocol mechanism reduction is significant.
[0102] Based on the same inventive concept, the present application also provides a computer device, which comprises one or more processors and a memory for storing one or more computer programs; the program includes program instructions, and the processor is used to execute the program instructions stored in the memory. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, and are used to implement one or more instructions, and are specifically used to load and execute one or more instructions in the computer storage medium to realize the above method.
[0103] It should be further noted that based on the same inventive concept, the present application also provides a computer storage medium, which stores a computer program, and the computer program is run by a processor to execute the above method. The storage medium can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the computer readable storage medium include: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus.
[0104] It should be noted that unless otherwise defined, technical or scientific terms used in the present application should be understood as having the common meaning in the field of the present application to those having ordinary skill in the art. The terms "first", "second" and similar terms used in the present application do not denote any order, quantity or importance, but are only used to distinguish different components. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms cover the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connected" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships, and when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0105] The above is only the preferred embodiment of the present application, and is not intended to limit the other forms of the present application. Any skilled person in the art can modify or change the above disclosed technical content to equivalent embodiments. However, any simple modification, equivalent change and modification of the above embodiments without departing from the technical solution of the present application, and according to the technical essence of the present application, still belongs to the protection scope of the technical solution of the present application.
[0106] The application is not limited to the above best mode, and anyone can derive other various forms of an industrial internet-oriented risk adaptive consensus-based homophonic federated learning method and system under the inspiration of the application, and any equivalent changes and modifications made in the patent application scope of the application shall fall within the scope of the application.
Claims
1. A dense-state federated learning method based on risk-adaptive consensus for the Industrial Internet, applied to a distributed network composed of multiple industrial edge computing gateways, wherein the industrial edge computing gateways are deployed in industrial sites and collect operational status data of industrial equipment, characterized in that... include: Before each training round begins, a verification committee and a main aggregation node are elected from the industrial edge computing gateway using a verifiable random function based on a random seed determined by the consensus of the entire network. The training node is an industrial edge computing gateway that was not selected for the validation committee. After completing model training locally using industrial equipment operating status data, it uses a homomorphic encryption public key to encrypt the model update data to generate encrypted update data, which is then submitted to the main aggregation node. The consensus process is executed by the verification committee, including: a) Each member generates a weighted quantitative anomaly score based on the network response delay normalization result, the historical behavior record of the main aggregation node, and the validity of the message; b) By broadcasting digitally signed abnormal scores, a low-risk or high-risk level determination is made based on the Byzantine fault tolerance mechanism. c) When the risk is low, a two-phase communication protocol with low communication complexity is executed; when the risk is high, a view replacement is triggered and a three-phase communication protocol with high security strength is executed by the new master aggregation node. Homomorphic addition aggregation is performed on the encrypted update data that has passed the consensus, and the verification committee collaboratively generates a global model update through a threshold decryption mechanism. The two-phase communication protocol includes a proposal phase and a preparation phase. In the proposal phase, the main aggregator broadcasts a proposal message containing the block to be reached for consensus to the verification committee. In the preparation phase, after the verification committee members verify the validity of the proposal message, they broadcast a preparation message. Consensus is reached after the main aggregator collects at least 2f+1 valid preparation messages. The three-phase communication protocol adds a commit phase to the two-phase communication protocol. After the verification committee members collect at least 2f+1 valid preparation messages, they broadcast a commit message. Consensus is reached after any participating node collects at least 2f+1 valid commit messages, where f is the maximum number of Byzantine nodes allowed by the system. In step a), the sum of the risk factor weights for quantifying the anomaly score is 1. The normalized result of the network response latency is obtained by processing the difference between the current observed latency and the historical latency mean and standard deviation using the Sigmoid function. The historical latency mean and standard deviation are calculated based on the response latency data from the past M rounds of training, where M is a positive integer. The validity of the message is determined by the invalid message indicator. Invalid messages include messages with signature verification failure, incorrect message format, and hash value mismatch. When the invalid message indicator is 1, it indicates that an invalid message has been received, and when it is 0, it indicates that the message is valid.
2. The dense-state federated learning method based on risk adaptive consensus for the Industrial Internet as described in claim 1, characterized in that: The random seed is generated using a hash algorithm based on the block hash confirmed in the previous consensus round and the current training round number. The industrial edge computing gateways participating in the election use their local private keys to calculate the random seed, obtain a pseudo-random value and a zero-knowledge proof, and then broadcast their own identity, pseudo-random value, and zero-knowledge proof. Other nodes verify the validity of the zero-knowledge proof using their public keys. The election result is determined solely by the random seed and the local keys of each industrial edge computing gateway, independent of the node's historical reputation, computing power assets, or data contribution.
3. The dense-state federated learning method based on risk adaptive consensus for the Industrial Internet as described in claim 1, characterized in that: The historical behavior records of the main aggregation node are updated iteratively using an exponential moving average: in, For the first The recorded value of the wheel, For the first Wheel As a binary indicator of whether the main aggregator node has failed in consensus, if the view replacement protocol is ultimately triggered in this round of consensus, then... If it is 1, If the main aggregator node successfully completes the block consensus, then Recorded as 0, The preset attenuation factor is where .
4. The dense-state federated learning method based on risk adaptive consensus for the Industrial Internet according to claim 1, characterized in that: The specific process of the view replacement is as follows: the verification committee member that triggers the view replacement broadcasts a view replacement request carrying evidence; after any verification committee member receives at least f+1 valid requests, the view replacement is initiated; a new master aggregation node is determined according to the election order of the verifiable random function; the new master aggregation node broadcasts a new view message containing evidence of the view replacement to take over the consensus process, where f is the maximum number of Byzantine nodes allowed by the system.
5. A dense-state federated learning method based on risk-adaptive consensus for the Industrial Internet, as described in claim 1, is characterized in that: In the threshold decryption mechanism, the private key for homomorphic decryption is divided into K key fragments, where K is a positive integer. These fragments are stored separately by the industrial edge computing gateway of the verification committee. During decryption, at least t members are required to provide key fragments for collaborative computation, and the condition f < t ≤ K is met, where f is the maximum number of Byzantine nodes allowed by the system.
6. The dense-state federated learning method based on risk adaptive consensus for the Industrial Internet according to claim 1, characterized in that: The Byzantine fault tolerance mechanism in step b) is specifically implemented as follows: each verification committee member collects at least 2f+1 abnormal scores from different members that have been verified by digital signatures to form a consistent score set. The number of abnormal scores exceeding a preset threshold is counted. If the number is less than f+1, it is judged as low risk; otherwise, it is high risk. The preset threshold ranges from [0,1], where f is the maximum number of Byzantine nodes allowed by the system.
7. A dense-state federated learning method based on risk adaptive consensus for the Industrial Internet, as described in claim 1, is characterized in that: The model update data is the gradient of the model parameters, the training node completes model training based on a local private dataset, and the model is a fault prediction model or a process optimization model.
8. A dense-state federated learning system based on risk-adaptive consensus for the Industrial Internet, characterized in that, The system includes multiple industrial edge computing gateways deployed in industrial sites. These gateways connect to and collect operational status data from industrial equipment in the sites. The multiple industrial edge computing gateways form a distributed network. The system also includes: The election unit is configured to elect a verification committee and a main aggregation node from the industrial edge computing gateway before the start of each training round, based on a random seed determined by the consensus of the entire network, using a verifiable random function. The encrypted processing unit is configured as an industrial edge computing gateway that is not selected for the verification committee as a training node. After completing the model training locally using industrial equipment operation status data and local private dataset, it uses homomorphic encryption public key to encrypt the gradient data of model parameters to generate encrypted update data and submits it to the main aggregation node. The risk-adaptive consensus unit is configured to have the verification committee execute the consensus process, which includes: generating a quantified anomaly score based on the network response delay normalization result, the historical behavior record of the main aggregation node, and the message validity weighting; broadcasting the digitally signed anomaly score and determining a low-risk or high-risk level based on the Byzantine fault tolerance mechanism; and adaptively switching the communication protocol according to the risk level: low-risk cases execute a two-phase communication protocol, while high-risk cases trigger a view change and have the new main aggregation node execute a three-phase communication protocol. The aggregation decryption unit is configured to perform homomorphic addition aggregation on the consensus-passed encrypted update data by the final confirmed main aggregation node, and then collaboratively generate a global model update through the threshold decryption mechanism of the verification committee, so that all industrial edge computing gateways can update their local models. The two-phase communication protocol includes a proposal phase and a preparation phase. In the proposal phase, the main aggregator broadcasts a proposal message containing the block to be reached for consensus to the verification committee. In the preparation phase, after the verification committee members verify the validity of the proposal message, they broadcast a preparation message. Consensus is reached after the main aggregator collects at least 2f+1 valid preparation messages. The three-phase communication protocol adds a commit phase to the two-phase communication protocol. After the verification committee members collect at least 2f+1 valid preparation messages, they broadcast a commit message. Consensus is reached after any participating node collects at least 2f+1 valid commit messages, where f is the maximum number of Byzantine nodes allowed by the system. In step a), the sum of the risk factor weights for quantifying the anomaly score is 1. The normalized result of the network response latency is obtained by processing the difference between the current observed latency and the historical latency mean and standard deviation using the Sigmoid function. The historical latency mean and standard deviation are calculated based on the response latency data from the past M rounds of training, where M is a positive integer. The validity of the message is determined by the invalid message indicator. Invalid messages include messages with signature verification failure, incorrect message format, and hash value mismatch. When the invalid message indicator is 1, it indicates that an invalid message has been received, and when it is 0, it indicates that the message is valid.
Citation Information
Patent Citations
Federal learning method based on high-availability non-interactive security aggregation
CN116451776A
Gearbox fault diagnosis method based on multisource agent federal field generalization
CN121302413A