A decentralized AI training and trading platform and method

Through the decentralized AI training and trading platform of blockchain and federated learning, malicious attacks and data privacy issues in artificial intelligence model aggregation are solved, efficient model quality evaluation and secure transactions are achieved, and multiple AI models are supported. , improving the application and security of AI technology.

CN117408332BActive Publication Date: 2024-11-29HUAZHONG UNIV OF SCI & TECH
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202311359009.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-19
Publication Date
2024-11-29
Estimated Expiration
2043-10-19

AI Technical Summary

Technical Problem

The existing technology is vulnerable to malicious attacks during the aggregation of artificial intelligence models, and the model quality evaluation and trading platform are not very practical. It lacks the support of multiple AI models, so data privacy and security are difficult to guarantee.

Method used

Adopt a decentralized AI training and trading platform based on blockchain and federated learning, and use smart contracts and certificate authorization agencies to automate model training and transactions, evaluate contribution and issue token incentives, ensuring model quality and security.

Benefits of technology

It realizes efficient coordination of global model training while maintaining data privacy, eliminates malicious nodes, improves model quality and transaction security, supports the sharing and transaction of multiple AI models, and promotes the widespread application of AI technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117408332B_ABST
    Figure CN117408332B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of artificial intelligence technology, and discloses a decentralized AI training and trading platform and method based on blockchain and federated learning, including: an AI training layer, which is used for edge devices / terminals to obtain the latest global model parameters from the blockchain side, and independently perform federated learning training tasks using local data, and submit the trained local model parameters to the blockchain layer. The training nodes need to be authenticated by a certificate authority before joining the federated learning training; a blockchain layer, in which the federated learning training node obtains a new comprehensive global model from the blockchain and starts training using local data; after the training is completed, the federated learning training node submits the local model to the blockchain, and the smart contract monitors the number of local models uploaded to the blockchain in real time. If the first threshold is reached, a new round of aggregation operation is triggered; a trading layer, which is used to add the finally generated global model to the AI ​​model pool for any user to trade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a decentralized AI training and trading platform based on blockchain and federated learning. Background Art

[0002] Federated learning enables collaborative model learning without sharing original data, and is increasingly attracting the attention of technology giants and industries that require privacy protection. Although federated learning can solve data privacy issues between data owners, its anti-attack capabilities face great challenges due to the frequent interactions between data and the exposure of central servers. The immutability of distributed storage and permission management access control technology in blockchain technology can effectively solve the problems of reliable data transmission and resistance to malicious attacks. Therefore, blockchain technology has been widely proposed to be used in federated learning to solve security issues. After investigation, many projects have applied the fusion technology of blockchain and federated learning to practical scenarios. (1) Blockchain and federated learning are applied in the Internet of Things and edge computing networks to ensure network efficiency and security, (2) A tea variety identification platform based on blockchain and federated learning is introduced, and (3) A fast fashion supply chain federated sharing platform based on blockchain is proposed.

[0003] Through the above analysis, the problems and defects of the prior art are as follows:

[0004] 1. Introducing decentralized trusted edge intelligence: The AI ​​model aggregation process is vulnerable to malicious attacks, which leads to a decline in model quality. Decentralization is achieved through blockchain, and malicious nodes are removed by judging their contribution during the model aggregation stage, thus ensuring that most edge intelligence is trustworthy.

[0005] 2. Token incentives for model quality assessment: The existing technology is to calculate the contribution of participants by evaluating the accuracy of the local model through the test set. This evaluation method requires a lot of time or calculation. We need a complete contribution evaluation and incentive mechanism based on the blockchain.

[0006] 3. Realize a platform based on AI capability trading: At present, the models on the federated learning side are relatively simple and not very practical. Most of the existing patents and research focus on certain applications. There is no extensive federated learning model pool and it does not support multiple transactions. A more complete trading platform with a large AI model pool is urgently needed. Summary of the invention

[0007] In order to solve data privacy and security issues, fight against malicious attacks, and realize model trading and sharing, the present invention provides a decentralized AI training and trading platform based on blockchain and federated learning. The platform can provide a huge AI model pool that can be traded using tokens, and support federated learning training of multiple artificial intelligence models of different scales. Blockchain nodes and distributed edge devices can freely apply to join model training after identity authentication, and obtain corresponding token rewards based on their contribution. Tokens can be used to purchase AI models trained by the platform, or they can be sold to the outside.

[0008] The present invention is implemented as follows: a decentralized AI training and trading method based on blockchain and federated learning, comprising:

[0009] 1) Initialize the platform:

[0010] a. Choose a suitable blockchain platform;

[0011] b. Design and deploy smart contracts to automate model training and transaction processes;

[0012] c. Establish a certificate authority to authenticate the training nodes;

[0013] d. Initialize the AI ​​model pool and set the transaction layer for AI model transactions;

[0014] 2) Federated learning training process:

[0015] a. The training node passes CA authentication and obtains the corresponding certificate;

[0016] b. The training node obtains the latest global model parameters from the blockchain side;

[0017] c. The training node uses local data to perform federated learning training tasks;

[0018] d. Submit the trained local model parameters to the blockchain layer;

[0019] 3) Global model aggregation and update:

[0020] a. In a new round of aggregation operation, all local models will be aggregated to form a new global model;

[0021] b. The new global model will be uploaded to the blockchain through a smart contract and added to the AI ​​model pool;

[0022] 4) AI model trading:

[0023] a. Any user can select and purchase a suitable AI model in the AI ​​model pool;

[0024] b. The purchased models will be labeled to indicate their ownership and usage rights;

[0025] c. For the secondary use or transfer of the model, it is necessary to operate through smart contracts to ensure the transfer of ownership and payment of fees;

[0026] 5) Security and performance optimization:

[0027] a. Carry out corresponding security design and optimization according to the security requirements of the blockchain platform;

[0028] b. Improve the performance and efficiency of the platform by continuously optimizing smart contracts and related algorithms;

[0029] 6. Platform maintenance and continuous iteration:

[0030] a. Continuously maintain and upgrade the platform to meet changing user needs and technological developments;

[0031] b. Iterate and improve the platform based on actual application scenarios and feedback to enhance user experience and performance.

[0032] Further, the aggregation operation includes:

[0033] S101 performs an average operation on all local models in this round to obtain an average model. Evaluate the deviation between each local model and the average model respectively;

[0034] S102: if the deviation of the local model is less than the second threshold, it is identified as a normal model; otherwise, it is identified as a malicious model;

[0035] S103 assigns the contribution of the normal model submission node according to the deviation, and the two are inversely proportional; deducting the contribution of the malicious model submission federated learning training node, the two are in direct proportion.

[0036] S104 aggregates all normal models, that is, performs an average operation on all normal models to obtain a global model;

[0037] S105 uploads the contribution of this round of global model and federated learning training nodes to the blockchain.

[0038] Furthermore, the deviation of the local model from the average model is evaluated as follows:

[0039]

[0040] Where t represents the number of rounds, k represents the number of local models, represents the similarity between the two models in round t, represents the weight of the average model in round t, represents the weight of the k-th local model in the t-th round, It represents the Minkowski distance between the local model in round t and the average model in round t.

[0041] If at least 50% of the nodes in the on-chip blockchain network are honest, the second threshold is s_mid+Aσ; where s_mid is the median of the deviation set, σ is the standard deviation of the deviation set distribution, and A is an adjustable constant coefficient.

[0042] When the cumulative contribution of a node is lower than the third threshold, the smart contract exercises access control and disqualifies the node from participating in all system transactions.

[0043] Furthermore, the token incentive mechanism for model quality evaluation includes:

[0044] Federated learning can evaluate the contribution of training participants based on methods such as individual method, leave-one-out method, Shapley value, and minimum kernel. Blockchain evaluates the contribution completed by federated learning and rewards or punishes tokens according to the size of the contribution.

[0045] Furthermore, the operation process of the decentralized AI training and trading platform based on blockchain and federated learning includes:

[0046] S201, edge devices in the distributed AI training layer perform blockchain-based trusted federated learning;

[0047] S202: The blockchain evaluates contributions and issues tokens based on the models submitted by edge devices participating in the federated learning task and the incentive mechanism in the smart contract. Users participating in the federated learning training can obtain corresponding tokens as incentives.

[0048] S203, blockchain nodes and edge devices must join the training after identity authentication with the certificate authority;

[0049] S204, the global models on the blockchain form a huge shared AI model pool, which includes AI models such as smart security, smart grid, medical image processing, natural language processing, etc. Buyers can use tokens to trade AI models. Tokens can be used to purchase AI models trained by the platform or sold to others.

[0050] Another object of the present invention is to provide a decentralized AI training and trading method based on blockchain and federated learning, comprising:

[0051] S1, the task publisher publishes the training tasks, which include: smart security, smart grid, medical image processing, natural language processing and other machine learning tasks, and provides a test set and an untrained machine learning model, which is used as the initial global model.

[0052] S2, a node in the blockchain network, downloads the untrained machine learning model and initializes the parameters of the model used for training.

[0053] S3, the federated learning training node uses the local user data set to train the model based on the latest comprehensive global model (or initial model). After the training is completed, the local model is obtained. The participant initiates a proposal request (i.e., a transaction request) to upload the trained local model parameters to the blockchain.

[0054] S4, when the number of local models in the blockchain meets the aggregation conditions, the smart contract submits a request for aggregated model parameters, generates a new global model and tests its accuracy using the test set.

[0055] S5, the final generated global model will be added to the AI ​​model pool for any user to trade.

[0056] Another object of the present invention is to provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the decentralized AI training and trading method based on blockchain and federated learning.

[0057] Another object of the present invention is to provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the decentralized AI training and trading method based on blockchain and federated learning.

[0058] Another object of the present invention is to provide an information data processing terminal, which is used to implement the decentralized AI training and trading platform based on blockchain and federated learning.

[0059] Another object of the present invention is to provide a decentralized AI training and trading platform based on blockchain and federated learning, comprising:

[0060] The AI ​​training layer is used for edge devices / terminals to obtain the latest global model parameters from the blockchain side and independently perform federated learning training tasks using local data. The trained local model parameters are submitted to the blockchain layer. Training nodes must be authenticated by a certificate authority before they can join the federated learning training.

[0061] At the blockchain layer, the federated learning training node obtains a new comprehensive global model from the blockchain and starts training using local data. After the training is completed, the federated learning training node submits the local model to the blockchain. The smart contract monitors the number of local models uploaded to the blockchain in real time. If the first threshold is reached, a new round of aggregation operations is triggered.

[0062] The trading layer is used to add the final generated global model to the AI ​​model pool for any user to trade.

[0063] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:

[0064] First, traditional machine learning methods require centralized data training, which may involve sending sensitive user data to a central server, posing potential privacy risks. Federated learning proposes the concept of decentralized training, but there is a problem, namely how to protect the privacy of user data while effectively coordinating the training of global models. The present invention moves model training to the user's local area, where each user trains a local model while keeping the data local, and then uses smart contracts and parameter aggregation technology to synthesize these local models to create a global model. By measuring the deviation between the local model and the global model and determining the contribution of the user node, this method not only solves the data privacy problem, but also effectively coordinates the training of the global model, providing a creative privacy and security effect.

[0065] Blockchain technology usually involves consensus algorithms and smart contracts, but when it is combined with AI training, the problems of parameter aggregation and node security need to be solved. Parameter aggregation needs to ensure that the data will not be leaked or tampered with when the model parameters are merged at the blockchain layer. In addition, the problem of malicious node attacks needs to be solved to protect the security of the entire system. The present invention realizes the secure aggregation of parameters and can eliminate malicious nodes by designing smart contracts and consensus algorithms. In addition, by evaluating the contribution of user nodes and issuing token incentives, nodes are encouraged to participate in good behavior. This combined technology not only ensures the security of the blockchain layer, but also protects the overall security of distributed AI training, and has a creative node security effect.

[0066] The present invention provides a new AI model trading platform, where users can trade trained AI models, but this involves how to ensure the legitimacy of transactions and the privacy of models. Smart contracts must approve transactions and ensure the confidentiality of models. The present invention approves model transactions through smart contracts in the blockchain, and uses tokens as the price of transactions, providing a safe and traceable model trading method. This technology not only supports model sharing, but also protects the privacy of models, bringing creative technical effects to the field of AI model trading.

[0067] The invention successfully solves multiple technical problems involving federated learning, blockchain, data privacy, and AI model transactions, and brings a series of creative technical effects to these fields, including innovations in data privacy protection, node security, and model transactions. These effects promote the development of distributed AI while protecting users and their data, and have important technical and commercial potential.

[0068] Second, the present invention successfully solves the single point failure problem existing in traditional edge intelligent computing by introducing a decentralized architecture. This architecture not only improves the robustness and reliability of the system, but also protects user data and privacy. User data is processed and trained locally and does not leave the local area, thereby reducing potential privacy risks and providing higher security and credibility for edge intelligent computing.

[0069] This invention introduces a model quality evaluation and incentive mechanism, which encourages edge computing devices to provide high-quality models through the incentive algorithm of smart contracts. This mechanism ensures the accuracy and reliability of edge intelligent computing models, while motivating users to participate in model contributions. This helps improve the performance and efficiency of the entire system.

[0070] The present invention designs a transaction layer and a huge AI model pool, allowing any user to trade AI models using virtual tokens. This design not only improves the sharing and availability of AI models, but also ensures the security and reliability of transactions through blockchain authorization. Users can exchange models without worrying about data leakage or model integrity issues, thereby promoting the development of AI model transactions.

[0071] This invention creates a trading platform based on AI capabilities, applying blockchain and federated learning fusion technology to practical scenarios. The existence of this platform enables more users to participate in the training and trading of artificial intelligence models, promoting the widespread dissemination and utilization of AI technology. Users can select and exchange models according to their needs, realizing personalized AI applications and promoting the innovation and popularization of AI technology.

[0072] In summary, the technical solution of the present invention not only solves the key problems in existing edge intelligent computing, but also brings many innovative technical effects and advantages, including data privacy protection, model quality improvement, transaction security and promotion of AI technology. These effects and advantages make the present invention have important commercial and social significance in the field of edge intelligent computing and AI model trading.

[0073] Third, as auxiliary evidence of the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:

[0074] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are:

[0075] The technical solution of the present invention has huge commercial potential and expected benefits. First, by providing a secure edge intelligent computing and AI model trading platform, the present invention provides enterprises with an efficient way to utilize distributed AI resources, reduces the training and reasoning costs of AI models, and improves the intelligence level of decision-making and application. This will bring huge benefits in the enterprise field, improve production efficiency and competitiveness. Secondly, the technology of the present invention can also be used in medical diagnosis, smart cities, autonomous driving and other fields, has broad application prospects, and is expected to promote the development of AI technology on a global scale. Therefore, the commercial value and expected benefits of the present invention are very considerable.

[0076] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad:

[0077] In the field of edge intelligent computing and AI model trading, there are many technical challenges such as data privacy protection, node security, model sharing, etc. This invention provides a comprehensive solution by integrating federated learning and blockchain technology, filling the technical gaps in these fields. The technical level of the industry in this field is relatively backward at home and abroad, and the innovative technical solution of this invention puts it in a leading position.

[0078] (3) Whether the technical solution of the present invention solves the technical problems that people have been eager to solve but have not been able to solve successfully:

[0079] The technical solution of the present invention solves important problems that have long plagued the field of AI, namely, how to protect the privacy of user data in a distributed environment, how to ensure the quality and security of models, and how to establish a reliable model trading platform. These issues have always been a hot topic in academia and industry, but successful solutions have long been unsuccessful. The present invention successfully solves these technical problems with innovative thinking and comprehensive technical solutions.

[0080] (4) Whether the technical solution of the present invention overcomes technical prejudice:

[0081] The present invention overcomes the technical bias of traditional centralized AI model training and trading methods. Traditional methods rely on centralized data storage and processing, and there are concerns about data privacy and security. The present invention breaks through this bias through technical means such as decentralization, blockchain, and federated learning, and realizes efficient distributed AI model training and trading, providing users with safer and more reliable AI services. Therefore, the technical solution of the present invention is an important challenge and improvement to the bias of traditional technology. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0083] Figure 1 It is a schematic diagram of a decentralized AI training and trading platform based on blockchain and federated learning provided by an embodiment of the present invention;

[0084] Figure 2 is an operation flow chart of the distributed AI training layer provided by an embodiment of the present invention;

[0085] Figure 3 It is an operation flow chart of the blockchain layer provided by an embodiment of the present invention;

[0086] Figure 4 is an operation flow chart of the transaction layer provided by an embodiment of the present invention;

[0087] Figure 5 is a schematic diagram of a front-end page on a vehicle provided by an embodiment of the present invention;

[0088] Figure 6 It is a schematic diagram of a hardware module and a specific implementation scenario provided by an embodiment of the present invention;

[0089] Figure 7 1 is an accuracy evaluation diagram of the eye and mouth models in fatigue driving detection provided by an embodiment of the present invention; wherein, (a) eyes, (b) mouth. DETAILED DESCRIPTION

[0090] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0091] In view of the problems existing in the prior art, the present invention provides a decentralized AI training and trading platform based on blockchain and federated learning. The present invention is described in detail below with reference to the accompanying drawings.

[0092] like Figure 1 As shown, the decentralized AI training and trading platform based on blockchain and federated learning provided by the embodiment of the present invention includes:

[0093] like Figure 2As shown in the figure, the AI ​​training layer is used for edge devices / terminals to obtain the latest global model parameters from the blockchain side, and independently perform federated learning training tasks using local data, submitting the trained local model parameters to the blockchain layer. Training nodes must be authenticated by a certificate authority before they can join the federated learning training.

[0094] At the blockchain layer, the federated learning training node obtains a new comprehensive global model from the blockchain and starts training using local data. After the training is completed, the federated learning training node submits the local model to the blockchain. The smart contract monitors the number of local models uploaded to the blockchain in real time. If the first threshold is reached, a new round of aggregation operations is triggered.

[0095] The trading layer is used to add the final generated global model to the AI ​​model pool for any user to trade.

[0096] Aggregation operations include:

[0097] S101 performs an average operation on all local models in this round to obtain an average model. Evaluate the deviation between each local model and the average model respectively;

[0098] S102: if the deviation of the local model is less than the second threshold, it is identified as a normal model; otherwise, it is identified as a malicious model;

[0099] S103 assigns the contribution of the normal model submission node according to the deviation, and the two are inversely proportional; deducting the contribution of the malicious model submission federated learning training node, the two are in direct proportion.

[0100] S104 aggregates all normal models, that is, performs an average operation on all normal models to obtain a global model;

[0101] S105 uploads the contribution of this round of global model and federated learning training nodes to the blockchain.

[0102] The deviation of the local model from the average model is evaluated as follows:

[0103]

[0104] represents the similarity between the two models in round t, represents the weight of the average model in round t, represents the weight of the k-th local model in the t-th round, It represents the Minkowski distance between the local model of the tth round and the average model of the tth round; if at least 50% of the nodes in the on-chip blockchain network are honest, the second threshold is s_mid+Aσ; where s_mid is the median of the deviation set, σ is the standard deviation of the deviation set distribution, and A is an adjustable constant coefficient; when the cumulative contribution of the node is lower than the third threshold, the smart contract exercises access control and makes the node lose the qualification to participate in all system transactions.

[0105] Token incentive mechanism for model quality evaluation, including:

[0106] Federated learning can evaluate the contribution of training participants based on methods such as individual method, leave-one-out method, Shapley value, and minimum kernel. Blockchain evaluates the contribution completed by federated learning and rewards or punishes tokens according to the size of the contribution.

[0107] The operation process of the decentralized AI training and trading platform based on blockchain and federated learning includes:

[0108] S201, edge devices in the distributed AI training layer perform blockchain-based trusted federated learning;

[0109] S202: The blockchain evaluates contributions and issues tokens based on the models submitted by edge devices participating in the federated learning task and the incentive mechanism in the smart contract. Users participating in the federated learning training can obtain corresponding tokens as incentives.

[0110] S203, blockchain nodes and edge devices must join the training after identity authentication with the certificate authority;

[0111] S204, the global models on the blockchain form a huge shared AI model pool, which includes AI models such as smart security, smart grid, medical image processing, natural language processing, etc. Buyers can use tokens to trade AI models. Tokens can be used to purchase AI models trained by the platform or sold to others.

[0112] The decentralized AI training and trading method based on blockchain and federated learning provided in the embodiment of the present invention includes:

[0113] S1, the task publisher publishes the training tasks, which include: smart security, smart grid, medical image processing, natural language processing and other machine learning tasks, and provides a test set and an untrained machine learning model, which is used as the initial global model.

[0114] S2, a node in the blockchain network, downloads the untrained machine learning model and initializes the parameters of the model used for training.

[0115] S3, the federated learning training node uses the local user data set to train the model based on the latest comprehensive global model (or initial model). After the training is completed, the local model is obtained. The participant initiates a proposal request (i.e., a transaction request) to upload the trained local model parameters to the blockchain.

[0116] S4, when the number of local models in the blockchain meets the aggregation conditions, the smart contract submits a request for aggregated model parameters, generates a new global model and tests its accuracy using the test set.

[0117] S5, the final generated global model will be added to the AI ​​model pool for any user to trade.

[0118] The blockchain determines malicious models by evaluating the deviation of each local model from the average model and assigns the contribution of each edge device training node according to the incentive mechanism. In addition to malicious models, the node aggregates all normal models to obtain the global model of this round and submits it to the chain. After submission to the chain, tokens are issued to the training nodes as incentives based on the incentive mechanism in the smart contract. Blockchain nodes must also be authenticated by a certificate authority before they can join the blockchain network. In addition, the blockchain has the characteristics of evidence storage and traceability, that is, the records added to the blockchain are permanently stored, and each transaction record in the blockchain is bound to the trader information, which is fully recorded and traceable and cannot be destroyed or tampered with. The operation process of the blockchain layer is as follows: Figure 3 shown.

[0119] At the transaction layer, any user can use tokens to purchase AI models trained by the platform. These models are located on the blockchain, and they can also sell their own AI models to obtain tokens. The AI ​​model pool contains all the global models that have been trained on the blockchain, such as smart security, smart grid, medical image processing, natural language processing and other artificial intelligence models, which are convenient for trading users to buy and sell. When a user needs to make a transaction, he first submits an application to the blockchain. After the blockchain approves it, the transaction can be carried out. The operation process of the transaction layer is as follows: Figure 4 shown.

[0120] An application embodiment of the present invention provides a computer device, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of a decentralized AI training and trading method based on blockchain and federated learning.

[0121] The application embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of a decentralized AI training and trading method based on blockchain and federated learning.

[0122] The application embodiment of the present invention provides an information data processing terminal, which is used to implement a decentralized AI training and trading platform based on blockchain and federated learning.

[0123] The following are steps for building a decentralized AI training and trading platform based on blockchain and federated learning:

[0124] 1. Platform initialization:

[0125] a. Choose a suitable blockchain platform (such as Ethereum, Corda, etc.) and set up the corresponding nodes.

[0126] b. Design and deploy smart contracts to automate model training and transaction processes.

[0127] c. Establish a certificate authority (CA) to authenticate the training nodes.

[0128] d. Initialize the AI ​​model pool and set the transaction layer for AI model transactions.

[0129] 2. Federated learning training process:

[0130] a. The training node is authenticated by the CA and obtains the corresponding certificate.

[0131] b. The training node obtains the latest global model parameters from the blockchain side.

[0132] c. The training node uses local data to perform federated learning training tasks and submits the trained local model parameters to the blockchain layer.

[0133] d. The smart contract monitors the number of local models uploaded to the blockchain in real time. If the first threshold is reached, a new round of aggregation operation is triggered.

[0134] 3. Global model aggregation and update:

[0135] a. In a new round of aggregation operation, all local models will be aggregated to form a new global model.

[0136] b. The new global model will be uploaded to the blockchain through a smart contract and added to the AI ​​model pool.

[0137] 4. AI model trading:

[0138] a. Any user can select and purchase a suitable AI model from the AI ​​model pool.

[0139] b. Purchased models will be labeled to indicate their ownership and usage rights.

[0140] c. For the secondary use or transfer of the model, it is necessary to operate through a smart contract to ensure the transfer of ownership and payment of fees.

[0141] 5. Security and performance optimization:

[0142] a. Carry out corresponding security design and optimization according to the security requirements of the blockchain platform.

[0143] b. Improve the performance and efficiency of the platform by continuously optimizing smart contracts and related algorithms.

[0144] 6. Platform maintenance and continuous iteration:

[0145] a. Continuously maintain and upgrade the platform to meet changing user needs and technological developments.

[0146] b. Iterate and improve the platform based on actual application scenarios and feedback to enhance user experience and performance.

[0147] Example 1: Intelligent medical diagnosis application

[0148] The technical solution of the present invention can be applied to the field of intelligent medical diagnosis. Hospitals and medical institutions can use the decentralized edge intelligence architecture provided by the present invention to establish a secure medical diagnosis system. The patient's medical data can be kept locally without leaving the hospital network, thereby protecting the patient's privacy. Each hospital can independently train local medical models, and then use blockchain technology to aggregate these models to form a global medical diagnosis model.

[0149] The system can also use an evaluation and incentive mechanism based on model quality to encourage hospitals to provide high-quality medical models. When the medical model performs well in diagnosing patients, the hospital can receive token incentives, thereby improving the accuracy and reliability of medical diagnosis.

[0150] Example 2: Smart City Traffic Management

[0151] In the field of smart cities, the technical solution of the present invention can be used for traffic management. Traffic monitoring cameras, sensors and other equipment can collect and process data locally without transmitting images and sensor data to a central server. Each traffic monitoring point can train a local model to identify traffic violations, congestion, etc.

[0152] By using blockchain technology, the models of various traffic monitoring points can be securely aggregated to form a city-wide traffic management system. The evaluation and incentive mechanism based on model quality can encourage each monitoring point to provide accurate traffic data and models in order to obtain token incentives.

[0153] Effect 1: Data privacy protection

[0154] In the edge intelligent computing system implementing the present invention, data privacy is fully protected. Compared with the traditional centralized method, the user's data does not need to be transmitted to the central server, but is processed and trained locally. This advantage is particularly evident in medical diagnosis applications. In a medical diagnosis system, using the technical solution of the present invention, the amount of data transmission is greatly reduced and the risk of privacy leakage is significantly reduced. In addition, through the data verification and permission management of the blockchain, it is ensured that only authorized users can access the data, further strengthening the privacy protection effect.

[0155] Effect 2: Improved model quality

[0156] The evaluation and incentive mechanism based on model quality has been verified in the implementation examples and has a significant impact on the improvement of model quality. In the experiment in the traffic management system, the model quality of each traffic monitoring point has improved over a period of time. This is because the monitoring points actively participate in the training and contribution of the model to obtain token rewards, thereby improving the accuracy of the model.

[0157] It should be noted that the embodiments of the present invention may be implemented by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portion may be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated hardware design. A person of ordinary skill in the art will appreciate that the above-mentioned devices and methods may be implemented using computer executable instructions and / or contained in a processor control code, such as provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention may be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-mentioned hardware circuits and software, such as firmware. We have applied this technology in the scenario of fatigue driving detection in the Internet of Vehicles. The front-end page we deployed on the vehicle is as follows. Figure 5 As shown, the hardware modules and specific implementation scenarios are as follows Figure 6 As shown in the figure, the accuracy evaluation of our eye and mouth models in fatigue driving detection is as follows Figure 7 (a) and (b) show that the accuracy of the model can still be maintained at a high level even in the presence of malicious attacks.

[0158] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered within the protection scope of the present invention.

Claims

1. A decentralized AI training and trading method based on blockchain and federated learning, characterized in that: Using blockchain technology and federated learning algorithms, a decentralized AI training and trading platform has been built. This platform automates the training and trading process of AI models through smart contracts, realizes the identity authentication of training nodes, global aggregation and update of AI models, and the purchase and ownership transfer of AI models. At the same time, the platform is continuously maintained and iterated to adapt to changing user needs and technological development. include: 1) Initialize the platform: a. Choose a suitable blockchain platform; b. Design and deploy smart contracts to automate model training and transaction processes; c. Establish a certificate authority to authenticate the training nodes; d. Initialize the AI ​​model pool and set the transaction layer for AI model transactions; 2) Federated learning training process: a. The training node passes CA authentication and obtains the corresponding certificate; b. The training node obtains the latest global model parameters from the blockchain side; c. The training node uses local data to perform federated learning training tasks; d. Submit the trained local model parameters to the blockchain layer; 3) Global model aggregation and update: a. In a new round of aggregation operation, all local models will be aggregated to form a new global model; b. The new global model will be uploaded to the blockchain through a smart contract and added to the AI ​​model pool; 4) AI model trading: a. Any user can select and purchase a suitable AI model in the AI ​​model pool; b. The purchased models will be labeled to indicate their ownership and usage rights; c. For the secondary use or transfer of the model, it is necessary to operate through smart contracts to ensure the transfer of ownership and payment of fees; 5) Security and performance optimization: a. Carry out corresponding security design and optimization according to the security requirements of the blockchain platform; b. Improve the performance and efficiency of the platform by continuously optimizing smart contracts and related algorithms; 6) Platform maintenance and continuous iteration: a. Continuously maintain and upgrade the platform to meet changing user needs and technological developments; b. Iterate and improve the platform based on actual application scenarios and feedback to enhance user experience and performance; Aggregation operations include: S101 performs an average operation on all local models in this round to obtain an average model; and evaluates the deviation between each local model and the average model; S102: if the deviation of the local model is less than the second threshold, it is identified as a normal model; otherwise, it is identified as a malicious model; S103 assigns the contribution of the normal model submission node according to the deviation, and the two are in inverse proportion; deducts the contribution of the malicious model submission federated learning training node, and the two are in direct proportion; S104 aggregates all normal models, that is, performs an average operation on all normal models to obtain a global model; S105 uploads the contribution of this round of global model and federated learning training nodes to the blockchain; The deviation of the local model from the average model is evaluated as follows: represents the similarity between the two models in round t, represents the weight of the average model in round t, represents the weight of the k-th local model in the t-th round, It represents the Minkowski distance between the local model of the tth round and the average model of the tth round; if at least 50% of the nodes in the on-chip blockchain network are honest, the second threshold is s_mid+Aσ; where s_mid is the median of the deviation set, σ is the standard deviation of the deviation set distribution, and A is an adjustable constant coefficient; when the cumulative contribution of the node is lower than the third threshold, the smart contract exercises access control and makes the node lose the qualification to participate in all system transactions.

2. The decentralized AI training and trading method based on blockchain and federated learning as claimed in claim 1, characterized in that: Token incentive mechanism for model quality evaluation, including: Federated learning can evaluate the contribution of training participants based on methods such as individual method, leave-one-out method, Shapley value, and minimum kernel. Blockchain evaluates the contribution completed by federated learning and rewards or punishes tokens according to the size of the contribution.

3. The decentralized AI training and trading method based on blockchain and federated learning as claimed in claim 1, characterized in that: The operation process of the decentralized AI training and trading method based on blockchain and federated learning includes: S201, edge devices in the distributed AI training layer perform blockchain-based trusted federated learning; S202: The blockchain evaluates contributions and issues tokens based on the models submitted by edge devices participating in the federated learning task and the incentive mechanism in the smart contract. Users participating in the federated learning training can obtain corresponding tokens as incentives. S203, blockchain nodes and edge devices must join the training after identity authentication with the certificate authority; S204, the global models on the blockchain form a huge shared AI model pool, which includes AI models such as smart security, smart grid, medical image processing, natural language processing, etc. Buyers can use tokens to trade AI models; tokens can be used to purchase AI models trained by the platform, and can also be sold to the outside.

4. The decentralized AI training and trading method based on blockchain and federated learning as claimed in claim 1, characterized in that: The decentralized AI training and trading method based on blockchain and federated learning also includes: S1, the task publisher publishes the training tasks, which include: smart security, smart grid, medical image processing, natural language processing, and provides a test set and an untrained machine learning model, which is used as the initial global model; S2, a node in the blockchain network, downloads an untrained machine learning model and initializes the parameters of the model used for training; S3: The federated learning training node uses the local user data set to train the model based on the latest comprehensive global model, and obtains the local model after the training is completed; the participant initiates a proposal request to upload the trained local model parameters to the blockchain; S4, when the number of local models in the blockchain meets the aggregation conditions, the smart contract submits a request for aggregation model parameters, generates a new global model and tests its accuracy using the test set; S5, the final generated global model will be added to the AI ​​model pool for any user to trade.

5. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the decentralized AI training and trading method based on blockchain and federated learning as described in any one of claims 1 to 4.

6. An information data processing terminal, which is used to implement the decentralized AI training and trading method based on blockchain and federated learning as described in any one of claims 1 to 4.

7. A decentralized AI training and trading platform based on blockchain and federated learning that uses the decentralized AI training and trading method based on blockchain and federated learning as described in any one of claims 1 to 4, characterized in that: include: The AI ​​training layer is used for edge devices / terminals to obtain the latest global model parameters from the blockchain side and independently perform federated learning training tasks using local data. The trained local model parameters are submitted to the blockchain layer. Training nodes must be authenticated by a certificate authority before they can join the federated learning training. At the blockchain layer, the federated learning training node obtains a new comprehensive global model from the blockchain and starts training using local data; After the training is completed, the federated learning training node submits the local model to the blockchain. The smart contract monitors the number of local models uploaded to the blockchain in real time. If the first threshold is reached, a new round of aggregation operation is triggered. The trading layer is used to add the final generated global model to the AI ​​model pool for any user to trade.

Citation Information

Patent Citations

  • Personalized model training method and system combining federated learning and user portrait

    CN112329940A

  • Federal learning system based on block chain

    CN113420335A

  • Robustness federated learning model aggregation method based on truth value discovery

    CN114186237A

  • End-side cloud architecture-based distributed federated learning security defense method and application

    CN114448601A

  • Aggregation server selection method for decentralized federated learning

    CN115081002A