Artificial intelligence model training method and system based on block chain
By introducing blockchain technology into artificial intelligence model training, using smart contracts and decentralized computing resources, the problems of data privacy and process transparency in traditional methods are solved, and more efficient and reliable artificial intelligence model training is achieved.
Patent Information
- Application Number
- CN202510389947.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-31
AI Technical Summary
Traditional artificial intelligence model training methods have problems such as data privacy, transparency of training process and credibility of results, and centralized computing resources lead to data leakage risks, untraceable processes and uneven resource allocation.
The blockchain-based artificial intelligence model training method is adopted to automatically collect and encrypt training data through smart contracts to ensure data privacy and security; the model is trained using decentralized computing resources, and the intermediate results in the training process are recorded in real time through the blockchain; abnormal behaviors during the training process are monitored through the consensus mechanism of blockchain nodes and the training parameters are optimized.
It improves the security, transparency and credibility of artificial intelligence model training, solves the problems of data privacy and process transparency in traditional methods, and improves training efficiency and reliability through decentralized computing resources.
Smart Images

Figure CN119892377A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a blockchain-based artificial intelligence model training method and system. Background Art
[0002] With the rapid development of artificial intelligence technology, model training has achieved remarkable results in many fields. However, in the process of artificial intelligence model training, issues such as data privacy, transparency of the training process, and credibility of the results are still important factors restricting technological progress. Traditional artificial intelligence training methods usually rely on centralized computing resources. Although this method is efficient, it also has the risk of data leakage, untraceable process, and uneven distribution of computing resources.
[0003] As a decentralized distributed ledger technology, blockchain technology has the advantages of being tamper-proof, transparent, and highly secure. It can solve problems such as data privacy protection, transparency, and traceability, and automatically manage data access, computing resource scheduling, and model updates through smart contracts. However, the application of blockchain technology in artificial intelligence model training is still in its infancy. How to effectively combine blockchain with the artificial intelligence training process to improve the efficiency and reliability of training is still a technical problem that needs to be solved.
[0004] Therefore, developing an artificial intelligence model training method based on blockchain, which ensures the security of data, the transparency of the training process and the traceability of the model through the decentralized characteristics of blockchain, has important technical significance and broad application prospects. Summary of the invention
[0005] The present invention provides an artificial intelligence model training method based on blockchain, comprising the following steps: Automatically collect and encrypt training data through smart contracts to ensure data privacy and security, and store it in an unalterable manner through blockchain; Automatically verify and determine data access permissions based on the rules of blockchain smart contracts to ensure that only authorized computing nodes can access training data; Transmit verified data to distributed computing nodes through the blockchain network, use decentralized computing resources to train artificial intelligence models, and record intermediate results of the training process in real time through the blockchain; Through the consensus mechanism of blockchain nodes, abnormal behaviors in the training process are monitored and corrected, and training parameters are optimized to ensure the stability and efficiency of model training; After training is completed, the final model and its related information are stored through the blockchain, and the model version is released through smart contracts to ensure the traceability and transparency of model updates.
[0006] As described above, a blockchain-based artificial intelligence model training method, in which training data is collected and encrypted, specifically includes automatically obtaining raw data from multiple data sources, encrypting the raw data through an encryption algorithm, and storing it in the blockchain to ensure the privacy and security of the data; the multiple data sources include data collected by sensors, real-time monitoring data, user input data, images, videos or other sensor network data.
[0007] As described above, a blockchain-based artificial intelligence model training method is used, in which the access rights to data are automatically verified and determined according to the rules of the blockchain smart contract. Specifically, the computing node is authenticated according to a preset permission control model, and it is automatically confirmed whether the node has authorization to read the training data. If the node fails the verification, its access request is rejected.
[0008] As described above, a blockchain-based artificial intelligence model training method is used, in which decentralized computing resources are used to train the artificial intelligence model. Specifically, the model training task is performed through decentralized computing resources, and the intermediate results generated during the training process are recorded in real time through the blockchain.
[0009] As described above, a blockchain-based artificial intelligence model training method, wherein abnormal behavior during the training process is monitored through the consensus mechanism of the blockchain nodes, further includes comparing the error between the calculation results of each node in the training process and the global model, and dynamically adjusting the influence of the node on the global training results based on the error value.
[0010] As described above, a blockchain-based artificial intelligence model training method, wherein the training parameters are optimized, specifically including dynamically adjusting the learning rate of the computing nodes to adapt to the data volume, computing load and historical training performance of different nodes.
[0011] As described above, a blockchain-based artificial intelligence model training method, in which the model version is released through a smart contract, specifically including recording and publishing the summary information of the model parameters, performance indicators and training data after the training is completed to the blockchain through a smart contract, ensuring that each version release and update has a clear timestamp and can be traced back to the source.
[0012] The present invention also provides an artificial intelligence model training system based on blockchain, comprising: The data collection module is used to automatically collect and encrypt training data through smart contracts to ensure the privacy and security of the data, and store it in an unalterable manner through the blockchain; Smart contract module, which is used to automatically verify and determine data access rights according to the rules of blockchain smart contracts, ensuring that only authorized computing nodes can access training data; The computing resource scheduling module is used to transmit verified data to distributed computing nodes through the blockchain network, use decentralized computing resources to train artificial intelligence models, and record the intermediate results of the training process in real time through the blockchain; The blockchain verification module is used to monitor and correct abnormal behaviors during the training process through the consensus mechanism of blockchain nodes, and optimize training parameters to ensure the stability and efficiency of model training; The model publishing module is used to store the final model and its related information through the blockchain after training is completed, and to publish the model version through smart contracts to ensure the traceability and transparency of model updates.
[0013] The beneficial effects achieved by the present invention are as follows: the present invention not only solves the security, transparency and efficiency problems faced in traditional artificial intelligence training, but also improves the overall performance of artificial intelligence model training through innovative blockchain applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0015] Figure 1 This is a flowchart of an artificial intelligence model training method based on blockchain provided in Example 1 of the present application; Figure 2 This is a schematic diagram of a data annotation system based on big data management provided in Example 2 of the present application. DETAILED DESCRIPTION
[0016] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0017] Embodiment 1 like Figure 1 As shown, the first embodiment of the present application provides an artificial intelligence model training method based on blockchain, comprising the following steps: Step S10: Automatically collect and encrypt training data through smart contracts to ensure the privacy and security of the data, and store it in an unalterable manner through blockchain; First, the system establishes connections with multiple data sources to automatically collect the required training data. This data includes data collected by sensors, real-time monitoring data, user input data, images, videos, or other sensor network data. The data source can be a device, sensor, or cloud service. Through the interface, the smart contract automatically controls the data collection process to ensure the real-time, integrity, and legality of data collection.
[0018] After data collection is completed, the system encrypts the data through encryption algorithms to prevent the data from being accessed or tampered by unauthorized entities during storage and transmission. The system uses modern encryption technology, such as symmetric encryption algorithms (such as AES algorithms) or asymmetric encryption algorithms (such as RSA algorithms), and selects appropriate encryption methods according to the different nature of the data. Smart contracts automatically generate, manage and distribute keys to ensure the secure exchange and storage of keys. The encryption process is fully controlled by smart contracts to ensure that each encryption link meets the established security standards, and the encryption keys are stored on the blockchain to further prevent key leakage and tampering.
[0019] The encrypted data will be uploaded to the blockchain for storage. During this process, the system will generate a unique hash value for each data fragment to ensure the integrity and immutability of the data. By storing the data hash value on the blockchain, any attempt to modify the data will be detected by the blockchain network, because changes in the hash value mean changes in the data. As a decentralized distributed ledger, the blockchain ensures the immutability and transparency of data storage. Each stored data will generate a block, which are linked to each other to form a chain to ensure the security of data storage.
[0020] Throughout the entire process, smart contracts automatically perform operations such as data collection, encryption, storage, and verification. Smart contracts manage the frequency of data collection, encryption methods, and storage paths according to predetermined rules to ensure the efficiency and consistency of the data collection and encryption process. The management of encryption keys is also automatically executed through smart contracts. The system can flexibly manage encryption keys according to the different properties of data to ensure efficiency and security during the encryption process.
[0021] Smart contracts also perform data integrity checks during data collection, encryption, and storage to ensure that all collected data is not lost or tampered with. After each data collection, the smart contract will hash the data and compare the hash value with the previous data to ensure that the newly collected data is consistent with the original data. If any data anomalies are detected, the smart contract will automatically trigger an alarm and suspend further processing of the data to ensure data reliability.
[0022] Step S20: According to the rules of the blockchain smart contract, automatically verify and determine the access rights to the data to ensure that only authorized computing nodes can access the training data; In step S20, the system automatically performs verification and management of data access rights through the rules of the blockchain smart contract to ensure that only authorized computing nodes can access the encrypted training data stored on the blockchain.
[0023] When a computing node needs to access training data, the smart contract authenticates the node requesting access. Each computing node has a unique identifier on the blockchain, which is usually based on a public key, digital signature, or other form of identity credentials. This identity information has been recorded in the blockchain in advance. The smart contract will match the node information stored in the blockchain with the node identity currently requested to confirm whether the node is a legitimate computing node. If the verification fails, the node's access request will be rejected.
[0024] Once the identity verification is successful, the smart contract will proceed to check the access rights of the node. The access rights for each data set are pre-set based on the sensitivity of the data, the role of the computing node, and the historical reputation. The smart contract dynamically calculates the access rights of the node based on the node's historical behavior and its reputation score. The reputation score formula generates a weighted score by combining factors such as the node's historical behavior, access frequency, and consumed computing resources. The following is the formula used to dynamically calculate the node reputation score: ,in, It is the final reputation score of the computing node, which reflects the overall reputation of the node and determines whether the node can access a specific data set; is the score of the i-th behavior The relevant weight coefficient; is the reputation score of the node in the past i-th behavior. Each behavior (such as data request, computing task execution, etc.) will generate a score. represents the reputation value of the i-th behavior; n is the number of all historical behaviors of the node in the system, representing the total number of node behaviors; is a regulation factor used to adjust the impact of the average behavioral reputation of all nodes on the final reputation score; is the kth score in the node's historical behavior; m is the number of historical scores, reflecting the node's behavior frequency and behavior pattern; It is a measure of the access frequency of a node, reflecting how frequently a node requests access to data; is the frequency adjustment factor, which is used to adjust the final reputation score according to the access frequency of the node; It is a measure of the maximum access time of a node in the system, and is used to measure the degree of consumption of system resources by the node; is the average access time of the node, which indicates the time consumed by the node to access data each time; It is a time adjustment factor used to adjust the impact of a node on consuming system resources. The higher the reputation score, the greater the possibility that the node is authorized to access data.
[0025] After calculating the final reputation score according to the rules of the smart contract, the smart contract will compare the node's score with the preset access rights threshold. If the node's reputation score exceeds the set threshold, the smart contract will grant the node access to the training data. If the node's score is below the threshold, the access request will be denied, and the denial will be automatically recorded in the blockchain, ensuring that all access decisions are transparent and traceable.
[0026] Smart contracts also monitor the permission management process in real time. Whenever a node requests access to data, the smart contract automatically records all relevant information about the request, including the node's identity, the timestamp of the access, the type of data set requested for access, and the result of granting access rights. This information will be encrypted and stored on the blockchain to ensure complete transparency of data access and can be audited and traced back at any time.
[0027] If a node is found to frequently initiate abnormal access requests during system operation, the smart contract will automatically adjust the node's permissions to reduce its chances of accessing sensitive data. Smart contracts can also analyze node behavior in real time and dynamically adjust access permissions based on the node's behavior history to ensure the security and fairness of the system.
[0028] Step S30: The verified data is transmitted to the distributed computing nodes through the blockchain network, and the AI model is trained using decentralized computing resources, and the intermediate results of the training process are recorded in real time through the blockchain; In step S30, the verified and authorized computing nodes automatically obtain the encrypted training data stored in the blockchain through smart contracts. All transmission processes are carried out through the blockchain network to ensure that the data is not leaked or tampered with during transmission. Each computing node starts to process training tasks in parallel based on its local computing resources and performs model training on the local data set. In distributed training, the training results of all computing nodes, such as calculated gradients, loss function values, and model update parameters, will be recorded in real time on the blockchain to ensure the transparency and immutability of the training process.
[0029] During the training process, the gradient update mechanism used by the computing nodes is based on the gradient descent method. Each computing node i calculates the loss function based on its local data set. Gradient , and update the local model parameters according to the gradient. For each node parameter update, the calculation formula is: ,in, represents the model parameters of the i-th node at the t-th iteration; is the learning rate; is the gradient calculated by the i-th node at the t-th iteration. The local update of each node is based only on its local data set, while the update of the global model is based on the weighted average of the calculation results of all nodes. The update formula of the global model is calculated by weighting the gradient of the node to ensure that the contribution of each node in the global training is reasonable. The specific global update formula is as follows: ,in, represents the parameters of the global model at the t+1th iteration; are the parameters of the global model at iteration t; is the weight of the i-th node; is the gradient calculated by the i-th node. Through this weighted average method, the gradient information of all nodes is aggregated into the global model, thereby achieving the coordinated update of each computing node in distributed training.
[0030] In order to ensure the stability and accuracy of the training process, the system also introduces a dynamic adjustment mechanism, especially the adjustment of the adaptive learning rate. The learning rate of each node will be dynamically adjusted according to its historical performance, data quality, and training efficiency. The specific adjustment formula is: ,in, is the adaptive learning rate of the ith node in the t+1th iteration; is the learning rate of the i-th node in the t-th iteration; is the regulating factor; The amount of local data processed by the i-th node; is the amount of data of the node with the largest amount of data among all nodes. This formula ensures that the learning rate of each node is dynamically adjusted according to the amount of data it processes. If the local data volume of the node is large, the learning rate is low, and vice versa. This adjustment ensures that the update pace of each node matches its computing resources, avoiding unstable training process caused by imbalanced computing load.
[0031] During the entire training process, the intermediate results of all computing nodes, such as gradients, loss functions, model parameters, and other information, will be recorded in real time in the blockchain by the smart contract. Each time a node completes a training, the smart contract will store the calculation results and training status on the blockchain through encryption to ensure that the data cannot be tampered with and is always traceable. The updates and participation behaviors of each node can be audited through the blockchain to ensure the transparency and fairness of each step and avoid any potential malicious behavior or calculation errors.
[0032] In order to ensure the convergence of the global model, the smart contract will also dynamically adjust the training strategy according to the performance of each node during the training process. If the gradient deviation of a node is large or the error during its training is too high, the smart contract will automatically trigger the adjustment mechanism to reduce the weight of the node in the global training process or perform other optimizations. Through this mechanism, the system ensures that the training process always converges in the right direction and avoids any improper behavior of a single node affecting the training effect of the entire system.
[0033] Step S40: Monitor and correct abnormal behaviors during the training process through the consensus mechanism of blockchain nodes, and optimize training parameters to ensure the stability and efficiency of model training; In step S40, the system uses the consensus mechanism of blockchain nodes to monitor and correct abnormal behaviors in the training process of the artificial intelligence model in real time, and automatically optimizes the problems of model instability or low training efficiency that may occur during the training process. The introduction of the consensus mechanism not only ensures the fairness and transparency of the training process, but also ensures the efficiency and consistency of model training through a decentralized verification mechanism.
[0034] During each round of training, all participating nodes will update their parameters and calculate the gradient of the loss function based on the local data set and the global model. These calculation results are uploaded to the blockchain in real time through smart contracts and verified and recorded by blockchain nodes. However, due to factors such as data imbalance, node performance differences, and possible network delays during distributed training, some nodes may produce inconsistent results or exhibit abnormal behaviors during training. These abnormal behaviors may affect the update of the global model and even cause the convergence of model training to slow down or fail to converge.
[0035] To solve this problem, blockchain uses its built-in consensus mechanism to verify the calculation results of each node in real time. The consensus mechanism automatically identifies possible outliers by comparing the gradient information submitted by all nodes. If the calculation results of a node deviate significantly from the results of other nodes, the system will automatically mark the results of the node as "abnormal" and identify and warn through smart contracts. At this time, the smart contract will correct the calculation results of the node according to the preset rules, eliminate abnormal data, and record relevant information through the blockchain to ensure the transparency and auditability of the training process.
[0036] After the abnormal behavior is identified and marked, the smart contract will automatically adjust the training parameters or learning rate of the node to prevent the node from having an adverse effect on the global model. For example, the smart contract can automatically reduce the node's weight in the global model update based on the node's error margin, or adjust its learning rate so that it contributes its calculation results more smoothly in subsequent training processes. Through this dynamic adjustment mechanism, the system can optimize the training process in real time, ensure the consistency of each node's training effect with the global model, and ensure stability and efficiency during the training process.
[0037] Smart contracts also automatically adjust other hyperparameters in the global model training process, such as learning rate, batch size, etc., to cope with the training progress and error of different nodes. By analyzing the training performance of each node, smart contracts can adaptively optimize these hyperparameters to ensure the maximum efficiency of model training. For example, if the training process of some nodes is relatively slow, the smart contract can automatically increase the learning rate of these nodes to speed up their convergence and avoid "bottleneck" phenomenon in the training process.
[0038] Step S50: After the training is completed, the final model and its related information are stored through the blockchain, and the model version is released through the smart contract to ensure the traceability and transparency of the model update.
[0039] After the model training is completed, the smart contract will automatically summarize all the information in the training process, including but not limited to the final parameters of the model, the source of the training data, the hyperparameter configuration during the training process (such as learning rate, batch size, etc.), the convergence of the loss function, and the performance of the model on the training set and the validation set. All of this information will be stored on the blockchain through encryption algorithms to ensure the security and immutability of the data. The decentralized nature of the blockchain enables this information to be verified and stored on multiple nodes, thereby avoiding the risk of single point failure and ensuring the transparency and credibility of the data.
[0040] Subsequently, the smart contract will generate a new model version based on the training process and publish it to the blockchain. Each published model version contains the following: The final parameters of the model, that is, the model parameters obtained after the training process; Summary information about the dataset used during training; Hyperparameter configuration during model training (such as learning rate, batch size, etc.); Performance indicators during training (such as loss function value, accuracy, etc.); The generation timestamp of the model version and the associated blockchain transaction hash value.
[0041] Through the automated control of smart contracts, the model version number and related information are updated in real time, and a new record is generated on the blockchain. Each newly released version contains a unique identifier and is connected to the hash value of the previous version to form an orderly version control chain, ensuring that each version update can be traced and verified.
[0042] In order to ensure that each newly released model version is strictly optimized and updated, the smart contract will evaluate each model update based on comprehensive optimization goals. Specifically, the optimization goals include training loss, validation loss, model stability, node contribution and other factors. The optimization process of the model version can be described by the following comprehensive loss function: ,in, are the final model parameters obtained after training; is the model parameter of the previous version, used to calculate version consistency; and They are the training data set and the test data set, which are used to train and verify the model; is the loss function of the i-th computing node on the training set; is the loss function of the jth computing node on the test set; N and M represent the total number of computing nodes involved in training and the total number of computing nodes used for verification, respectively; is the weight factor used to adjust each loss; and are the weights used to weight the training loss and validation loss respectively; is a small constant used to ensure the stability of the calculation; is the Hessian matrix of the i-th node, which is used to capture the change of gradient; Represents the gradient of the i-th node during the training process, measuring the direction and magnitude of the model parameter update; is the second-order gradient of the i-th node, which measures the curvature of the loss function and optimizes the gradient update during model training; Represents the trace of the matrix, calculates the sum of the diagonal elements of the matrix, and is used to adjust the pace of model updates to ensure the stability of the training process. This loss function takes into account multiple factors such as training error, verification error, model stability, and node contribution. By adjusting the weight factor, the smart contract can flexibly balance different optimization goals to ensure that each new version of the model is strictly optimized and meets various performance requirements.
[0043] After the model is released, all model updates and version information will be recorded through the blockchain. After each model update, the relevant version number, training loss, validation loss, model parameters and other information will be permanently stored through blockchain transactions to ensure the transparency and immutability of the update process. The decentralized nature of the blockchain ensures the immutability of the model version, and even the model developer cannot modify the released version. Each version release is connected to the blockchain block, so that subsequent version updates can be traced back to the previous version and ensure the transparency of each update.
[0044] Embodiment 2 like Figure 2 As shown, Embodiment 2 of the present application provides an artificial intelligence model training system based on blockchain, including: The data collection module 21 is used to automatically collect and encrypt training data through smart contracts to ensure the privacy and security of the data, and store it in an unalterable manner through the blockchain; The data acquisition module is responsible for automatically collecting and encrypting training data through smart contracts to ensure the privacy and security of the data, and storing it in an unalterable manner through blockchain. This module aims to obtain the required training data from multiple data sources (such as sensors, external databases, etc.) in an automated manner, and encrypt the data to prevent the data from being stolen or tampered with during transmission. The main functions and workflow of the data acquisition module are as follows: Collect training data from multiple data sources. These data sources can be sensors, external APIs, historical data storage, real-time data streams, etc. The module automatically selects data sources and collects data according to the rules defined in the smart contract to ensure the integrity and timeliness of the data.
[0045] Before the collected data is encrypted, the data collection module will perform preliminary preprocessing on the data. These preprocessing steps include but are not limited to data cleaning (removing duplicate data or invalid data), data formatting (unifying data structure), data normalization (standardizing or normalizing numerical data), etc.
[0046] All collected training data is encrypted using an encryption algorithm to ensure the privacy and security of the data during transmission. The encryption method can be symmetric encryption or asymmetric encryption, and the specific algorithm is selected according to actual needs. The encrypted data cannot be accessed or tampered with by unauthorized entities.
[0047] The data collection module uploads the encrypted data to the blockchain through smart contracts. During the data upload process, the data will be stored in an encrypted form on the blockchain to ensure that the data cannot be tampered with. Each data upload will generate a block to record the data's hash value, upload time, and other relevant information. The decentralized nature of the blockchain ensures data persistence and transparency.
[0048] Before data is uploaded to the blockchain, the data collection module will manage data access permissions through smart contracts. Smart contracts determine which nodes or users can access specific data sets based on the node's identity and permission rules. Unauthorized computing nodes will not be able to access sensitive data, ensuring data privacy.
[0049] Each time data is collected and uploaded, the data collection module generates a hash value of the data and compares it with the original data to ensure that the data has not been changed or damaged during transmission.
[0050] The data collection module also has real-time monitoring capabilities, which can track every step of the data collection process and record detailed logs of each data collection, processing, and upload. Smart contracts will manage these logs and provide audit functions for data access to ensure transparency of the entire process.
[0051] The smart contract module 22 is used to automatically verify and determine the access rights to the data according to the rules of the blockchain smart contract, ensuring that only authorized computing nodes can access the training data; The smart contract module is responsible for automatically verifying and determining data access rights to ensure that only authorized computing nodes can access training data. The main task of this module is to verify the identity and permissions of computing nodes through smart contracts based on pre-set rules and decide whether to allow nodes to access specific training data. The main functions and workflow of the smart contract module are as follows: The smart contract module manages the access rights of computing nodes, ensuring that each node follows the predetermined rules when accessing training data. Smart contracts automatically assign access rights based on each node's identity, tasks, and computing power. Access rights can be set based on factors such as the node's historical reputation score, node type, and task urgency.
[0052] At each data access request, the smart contract module first authenticates the requested computing node. The verification process includes checking whether the node's identity information meets the predetermined conditions. Identity information usually includes the node's public key, signature, historical behavior records, etc., to ensure that only legitimate and authorized nodes can initiate data access requests. Once the node's identity is verified, the smart contract module will determine whether the node has access to the data based on the pre-set permission rules. These permission rules include: the node's historical performance (for example, reputation score, accuracy of task execution, etc.); the node's data access frequency and type (some nodes may only be allowed to access specific types of data); the node's computing power and task priority (nodes with stronger computing power or higher task priority may have priority in obtaining data access rights).
[0053] After the permission verification and decision are completed, the smart contract module will perform the corresponding operations according to the permission rules. If the node has the right to access the data, the smart contract will automatically generate access permission credentials and allow the node to access the corresponding training data; if the node fails to pass the verification or does not have sufficient permissions, the smart contract will reject its data access request. In addition, all access operations and permission verification processes will be recorded on the blockchain to ensure the transparency and traceability of each access.
[0054] The smart contract module records the detailed information of each data access in real time through the blockchain, including the access time, access node, accessed data type and the performed operation. This information will be used for subsequent audits and backtracking to ensure that each data access can be verified and traced. Through the immutability of the blockchain, all access records can prevent malicious tampering and data leakage.
[0055] The smart contract module supports dynamic permission adjustment, which adjusts access rights in real time according to the historical behavior of the node and system requirements. For example, if a node does not perform as expected, the smart contract can automatically reduce the access rights of the node, or increase the rights of certain nodes in an emergency to ensure the smooth progress of the training task; the smart contract module also supports multi-level access control, allowing computing nodes of different levels to access data of different sensitivities. For example, some nodes may only be able to access low-sensitivity data, while nodes with higher permissions are required to access critical data sets. Multi-level access control ensures fine-grained protection of data.
[0056] The computing resource scheduling module 23 is used to transmit the verified data to the distributed computing nodes through the blockchain network, use the decentralized computing resources to train the artificial intelligence model, and record the intermediate results of the training process in real time through the blockchain; The computing resource scheduling module is responsible for transmitting data verified by smart contracts to distributed computing nodes for AI model training. The core task of this module is to intelligently schedule data based on factors such as the load, computing power, and task priority of computing nodes to ensure the optimal use of distributed computing resources and improve the efficiency of the training process. The main functions and workflow of the computing resource scheduling module are as follows: After receiving the data verified by the smart contract module, the computing resource scheduling module is responsible for transmitting the data to the appropriate distributed computing nodes. The scheduling module selects the appropriate node for data distribution based on the current state, computing power and task type of the node. This module ensures that the verified data can reach the appropriate computing node in a timely manner to avoid excessive load between nodes or idle computing resources.
[0057] The computing resource scheduling module continuously monitors the load of each computing node to ensure that data and computing tasks can be evenly distributed to each node. The module dynamically adjusts the data allocation strategy based on factors such as real-time computing load, node CPU and memory usage, and network bandwidth. If the computing load of some nodes is high or the resources are close to saturation, the scheduling module will avoid allocating new data or training tasks to these nodes and instead select idle or lightly loaded nodes.
[0058] The computing resource scheduling module uses intelligent scheduling algorithms (such as load balancing algorithms, priority scheduling, etc.) to allocate data based on the computing power of the nodes, available resources, and the requirements of the training tasks. By optimizing the use of computing resources, the scheduling module can accelerate the training process, avoid resource waste, and improve the overall efficiency of the system. The scheduling strategy also evaluates the nodes based on their historical performance (such as task completion and computing efficiency), thereby dynamically selecting the most suitable node to perform the computing task.
[0059] The computing resource scheduling module automatically adjusts the computing resource allocation according to the priority of the training tasks. Some high-priority tasks may need to be processed immediately, while low-priority tasks can be executed later. Task priorities are usually evaluated based on factors such as the urgency of the task, the complexity of the training objectives, and resource requirements. The scheduling module ensures that critical tasks are prioritized by adjusting the execution order of different tasks, thereby improving the overall efficiency of the training process.
[0060] The computing resource scheduling module is not only responsible for data transmission, but also ensures the synchronization of task scheduling and data transmission. During the training process, data is transmitted from the blockchain to the computing node and synchronized with the computing task. The scheduling module interacts with the training task management system to ensure that each node can quickly start the training task after receiving the data and return the training results to the system.
[0061] In order to cope with training tasks of different sizes and sudden computing needs, the computing resource scheduling module can automatically expand computing resources. When the system detects that the computing requirements of the training task exceed the current resource capacity, the scheduling module can automatically call more computing nodes to expand resources to ensure that the training task can be completed in time. In addition, the module also has adaptive scheduling capabilities, which can dynamically adjust the resource allocation strategy according to changes in computing load and adjustments to task priorities to adapt to changes in the training process.
[0062] The computing resource scheduling module continuously monitors the training progress of each node and provides real-time feedback. By real-time monitoring of computing nodes, the scheduling module can detect potential training bottlenecks or performance degradation issues. Once abnormal node performance or task delays are found, the module will reallocate computing tasks or adjust data transmission strategies to ensure the smooth progress of the training process.
[0063] The blockchain verification module 24 is used to monitor and correct abnormal behaviors during the training process through the consensus mechanism of the blockchain nodes, and optimize the training parameters to ensure the stability and efficiency of the model training; The main function of the blockchain verification module is to record the intermediate results of the training process in real time and ensure that the data cannot be tampered with. This module combines smart contracts with blockchain to ensure that the intermediate calculation results (such as gradients, loss function values, model parameters, etc.) in each training process can be encrypted and stored through the blockchain, and prevent any data tampering, thereby ensuring the transparency of the training process and the credibility of the data. The main functions and workflow of the blockchain verification module are as follows: The blockchain verification module collects and records the intermediate results calculated by each computing node in real time during each training process. These intermediate results include but are not limited to model parameters, gradients, loss function values, etc. At each calculation update, the module records these intermediate results in encrypted form on the blockchain through smart contracts to ensure the integrity and confidentiality of the data. During the training process, all intermediate results are encrypted using encryption algorithms to ensure that only authorized entities can read the data. Then, a unique identifier (hash value) for the data is generated through a hash algorithm, and the hash value and related data are stored on the blockchain. Each stored data is verified by a smart contract to ensure that the data cannot be tampered with.
[0064] The decentralized and tamper-proof nature of blockchain technology means that each stored data cannot be modified or deleted after it is recorded. Each intermediate result is connected to the previous block on the blockchain through a hash value, forming a complete chain. Even if a node attempts to modify the intermediate result of a calculation, the tampering behavior of the node will be discovered immediately because the modified data will cause the hash value on the blockchain to not match, resulting in verification failure.
[0065] The blockchain verification module is not only responsible for storing intermediate results, but also allows all participants (including computing nodes and system administrators) to view the intermediate results stored on the blockchain. Through open and transparent data records, all steps, calculation results and node performance in the training process can be audited and verified. This enables the system to effectively prevent any malicious behavior and data tampering, and enhance the credibility of the system.
[0066] The blockchain verification module ensures the correctness and consistency of the calculation results of all computing nodes through the consensus mechanism of the blockchain. The calculation results submitted by each node will be verified through the consensus mechanism of the blockchain, and only the calculation results that have been agreed upon can be recorded on the blockchain. If the calculation results of a node are significantly different from those of other nodes, the system will automatically mark the results of the node as abnormal and make corrections or recalculations to prevent the wrong results from affecting the global model.
[0067] The blockchain verification module also has the function of detecting abnormal behavior. During the training process, if the calculation results of a node deviate significantly from the calculation results of other nodes, the module will mark it as abnormal through the smart contract and make relevant reports. All abnormal behaviors and their handling processes will be recorded on the blockchain to ensure the transparency of the training process and provide a basis for subsequent audits and analysis.
[0068] The blockchain verification module creates a new block for each training step and stores the intermediate results and their version information on the blockchain. Through smart contract management, the system can achieve version control of the training process. Each training update and parameter adjustment will generate a new version to ensure that the history of all versions can be traced and verified.
[0069] The model publishing module 25 is used to store the final model and its related information through the blockchain after the training is completed, and to publish the model version through the smart contract to ensure the traceability and transparency of the model update.
[0070] The model publishing module is responsible for storing the final training model through the blockchain and publishing version information. This module ensures that each trained final model can be effectively stored and releases a new model version through a smart contract. By using the immutability of the blockchain, the model publishing module ensures that each version of the model has a complete history that can be traced and verified, thereby ensuring the transparency, traceability and credibility of the model update. The main functions and workflow of the model publishing module are as follows: The model publishing module encrypts the final model parameters (including weights, biases, training hyperparameters, etc.) after training is completed, and stores these data on the blockchain through smart contracts. Blockchain storage ensures that the model cannot be tampered with during storage and transmission, and only authorized users and computing nodes can read it. The model storage process includes: encrypting the final model parameters; generating model storage records through smart contracts; using blockchain's decentralized storage technology to ensure the security and integrity of each model version.
[0071] After each training is completed, the model publishing module will generate new model version information and publish it to the blockchain. Each version information includes: version number: a number that uniquely identifies each model version; version timestamp: records the specific time when the model was released; related performance indicators: including training accuracy, verification error, loss function value, etc.; model metadata: such as a summary of the training data set, hyperparameter configuration used during training, etc.
[0072] By publishing this information through smart contracts, the system can generate a hash value for each version to ensure the immutability and transparency of version records.
[0073] The model release module controls the version of each updated model through smart contracts. When a new model version is released, the system automatically records its version number and related information and associates it with the previous version. This version control mechanism ensures that the historical update process of the model is fully traceable. Each model release forms an immutable blockchain record that can provide full audit and verification.
[0074] The model publishing module uses the transparency of blockchain to ensure that each published model version can be publicly verified. Anyone or any system can verify the model version history and its related performance indicators by querying the blockchain. This makes the model publishing process completely transparent, eliminating any possible concealment or tampering, and enhancing the fairness and credibility of the model.
[0075] The model release module automatically releases each model version through smart contracts. Whenever training is completed, the smart contract will automatically trigger the release operation, including: encrypting and storing model parameters; recording model versions and related training information; publishing model version information and forming an orderly chain with other versions on the blockchain.
[0076] Each time a model is released, the model release module will generate a verification code (hash value) for that version and store it on the blockchain. These hash values will be stored on the blockchain together with the model's training data, hyperparameter configuration and other information. By verifying the hash value, the system can verify the integrity of the stored model and ensure that the released model is consistent with the intermediate results of the training process and has not been tampered with.
[0077] Through blockchain storage and version management, the model release module provides a solid foundation for the optimization and iteration of subsequent versions. Each new version can be traced back to the previous version, which is convenient for subsequent analysis and improvement. Through this mechanism of continuous update and version management, the system can continuously optimize the model while maintaining the transparency and reliability of each iteration.
[0078] Corresponding to the above embodiment, an embodiment of the present invention provides a computer storage medium, including: at least one memory and at least one processor; The memory is used to store one or more program instructions; A processor is used to run one or more program instructions to execute a blockchain-based artificial intelligence model training method.
[0079] Corresponding to the above embodiments, an embodiment of the present invention provides a computer-readable storage medium, which contains one or more program instructions, and the one or more program instructions are used by a processor to execute a blockchain-based artificial intelligence model training method.
[0080] The embodiments disclosed in the present invention provide a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed on a computer, the computer executes the above-mentioned blockchain-based artificial intelligence model training method.
[0081] In the embodiment of the present invention, the processor may be an integrated circuit chip having the ability to process signals. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0082] The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The processor reads the information in the storage medium and completes the steps of the above method in combination with its hardware.
[0083] The storage medium may be a memory, which may be, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.
[0084] Among them, the non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
[0085] The volatile memory may be a random access memory (RAM) which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus DRAM (DRRAM).
[0086] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0087] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention can be implemented using a combination of hardware and software. When software is used, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that can be accessed by general or special-purpose computers.
[0088] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A blockchain-based artificial intelligence model training method, characterized in that: The following steps are involved: Automatically collect and encrypt training data through smart contracts to ensure data privacy and security, and store it in an unalterable manner through blockchain; Automatically verify and determine data access permissions based on the rules of blockchain smart contracts to ensure that only authorized computing nodes can access training data; Transmit verified data to distributed computing nodes through the blockchain network, use decentralized computing resources to train artificial intelligence models, and record intermediate results of the training process in real time through the blockchain; Through the consensus mechanism of blockchain nodes, abnormal behaviors in the training process are monitored and corrected, and training parameters are optimized to ensure the stability and efficiency of model training; After training is completed, the final model and its related information are stored through the blockchain, and the model version is released through smart contracts to ensure the traceability and transparency of model updates.
2. The blockchain-based artificial intelligence model training method according to claim 1, characterized in that: Collect and encrypt training data, specifically including automatically obtaining raw data from multiple data sources, encrypting the raw data through an encryption algorithm, and storing it in the blockchain to ensure the privacy and security of the data; multiple data sources include data collected by sensors, real-time monitoring data, user input data, images, videos or other sensor network data.
3. The blockchain-based artificial intelligence model training method according to claim 1, characterized in that: According to the rules of the blockchain smart contract, the access rights to the data are automatically verified and determined. Specifically, the computing node is authenticated according to the preset permission control model, and it is automatically confirmed whether the node has the authorization to read the training data. If the node fails the verification, its access request is rejected.
4. The method according to claim 1, characterized in that Use decentralized computing resources to train artificial intelligence models. Specifically, use decentralized computing resources to execute model training tasks, and record the intermediate results generated during the training process in real time through the blockchain.
5. The blockchain-based artificial intelligence model training method according to claim 1, characterized in that: When monitoring abnormal behaviors during the training process through the consensus mechanism of the blockchain nodes, it further includes comparing the error between the calculation results of each node in the training process and the global model, and dynamically adjusting the influence of the node on the global training results based on the error value.
6. The blockchain-based artificial intelligence model training method according to claim 1, characterized in that: Optimize training parameters, including dynamically adjusting the learning rate of computing nodes to adapt to the data volume, computing load and historical training performance of different nodes.
7. The blockchain-based artificial intelligence model training method according to claim 1, characterized in that: The model version is released through smart contracts, which specifically includes recording and publishing the model parameters, performance indicators and summary information of the training data after training to the blockchain through smart contracts, ensuring that each version release and update has a clear timestamp and can be traced back to the source.
8. An artificial intelligence model training system based on blockchain, characterized in that: include: The data collection module is used to automatically collect and encrypt training data through smart contracts to ensure the privacy and security of the data, and store it in an unalterable manner through the blockchain; Smart contract module, which is used to automatically verify and determine data access rights according to the rules of blockchain smart contracts, ensuring that only authorized computing nodes can access training data; The computing resource scheduling module is used to transmit verified data to distributed computing nodes through the blockchain network, use decentralized computing resources to train artificial intelligence models, and record the intermediate results of the training process in real time through the blockchain; The blockchain verification module is used to monitor and correct abnormal behaviors during the training process through the consensus mechanism of blockchain nodes, and optimize training parameters to ensure the stability and efficiency of model training; The model publishing module is used to store the final model and its related information through the blockchain after training is completed, and to publish the model version through smart contracts to ensure the traceability and transparency of model updates.
Citation Information
Patent Citations
Artificial intelligence training model method and device based on block chain, and medium
CN111125784A
Model processing method, system and equipment based on block chain and medium
CN115860115A
Secure distributed machine learning adaptive aggregation method with privacy protection
CN117852074A
Federal learning defecation vehicle node detection method based on block chain information interaction
CN118520341A
Blockchain-based deep neural network model federated recombination method and system
WO2024212280A1
Cited By
Decentralized AI model optimization method based on block chain
CN120781394A
Blockchain-based decentralized ai model optimization method
CN120781394B
Security-enhanced data verification method and system applied to intelligent platform
CN120811664A
Training method and device of training architecture based on block chain, and electronic equipment
CN121235035A
Technical personnel training and project dynamic authorization engine method based on block chain
CN121280189A