Blockchain-based Distributed Artificial Intelligence Model Training and Secure Sharing System and Method
Through distributed artificial intelligence model training and blockchain technology, performance bottlenecks and privacy protection problems of large-scale data processing are solved, efficient and secure data sharing and model training are achieved, and the security and reliability of the system are enhanced.
Patent Information
- Application Number
- CN202410977107.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The existing technology has performance bottlenecks when processing large-scale data, which affects processing speed and overall operating efficiency, and is complex in privacy protection and key management. There are hidden dangers in the security of smart contracts, which may endanger the security and reliability of the system.
The distributed artificial intelligence model training method is adopted, and features are extracted using convolutional neural networks and recurrent neural networks, comprehensive feature vectors are generated through multimodal fusion, and model parameters are encrypted and managed on the blockchain, combining dynamic key management and audit mechanisms to ensure the secure sharing of data and models.
Improves data processing speed and efficiency, enhances data security and system transparency, ensures security and privacy protection for cross-agency cooperation, and provides traceability and compliance of operations.
Smart Images

Figure CN119004525B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical fields of artificial intelligence and blockchain, and particularly to a distributed artificial intelligence model training and secure sharing system and method based on blockchain. Background Art
[0002] In recent years, artificial intelligence and blockchain technologies have made remarkable progress and been widely applied in many fields. The rise of deep learning and neural networks has enabled artificial intelligence technology to perform excellently in aspects such as image recognition, natural language processing, and predictive analysis. However, the training of artificial intelligence models requires a large amount of high-quality data, and the centralized storage and processing of data are prone to data leakage and privacy issues. As a decentralized distributed ledger technology, blockchain has the characteristics of transparency, immutability, and decentralization, providing an effective way to solve data security and sharing problems. By applying blockchain technology to artificial intelligence model training and data sharing, the security and credibility of data can be ensured, the secure circulation of data among different institutions and organizations can be promoted, the training efficiency and accuracy of artificial intelligence models can be improved, and thus data-driven intelligent applications can be realized in fields such as finance, healthcare, and the Internet of Things.
[0003] For example, the Chinese patent with the application number CN202311765926.5 and the publication date of January 23, 2024, discloses a data privacy protection method integrating blockchain technology and artificial intelligence, which relates to the field of blockchain technology. The invention proposes a medical examination blockchain system constructed based on blockchain technology, as well as a data access system for integrating real-time medical examination data with the blockchain. The system extracts features from the patient's medical examination form through a multi-modal information extraction model and uses the features as keys to encrypt the examination result data. The encrypted data is stored on the blockchain, ensuring the privacy, integrity, and immutability of the data. The method also includes a set of permission management systems for accessing and decrypting data to ensure that only authorized patients or medical institutions can access and manage the data. In addition, smart contracts are used to record the access and operation records of the data, further enhancing the security and transparency of the data.
[0004] However, the above technical solutions have at least the following technical problems: First, when faced with the need to process large-scale data in real time, the performance and efficiency of the system may encounter bottlenecks, affecting the processing speed and overall operating efficiency. Second, there are complexities in privacy protection and key management. Especially when using multi-modal features as keys, how to ensure the security and manageability of keys in the system has not been fully resolved, which may bring security risks. Finally, although smart contracts are used to record and manage data access and operations, there are also potential risks in the security and reliability of smart contracts. Once vulnerabilities occur, they may lead to serious security problems and economic losses, and may also endanger the security and reliability of the entire system. Summary of the Invention
[0005] To solve the above technical problems, embodiments of the present invention provide a blockchain-based distributed artificial intelligence model training and secure sharing system and method, which are used to solve the problems that modern technologies lack the ability to efficiently process large-scale data, affect the data processing speed and overall operating efficiency during real-time processing, and cannot meet the real-time processing requirements under high load; and lack simple and secure privacy protection and key management capabilities, with potential security risks and increased system complexity; and the smart contract may have vulnerabilities, endangering the security and reliability of the entire system and unable to ensure the complete security of data and operations.
[0006] The blockchain-based distributed artificial intelligence model training and secure sharing method disclosed in embodiments of the present invention includes the following steps:
[0007] S1: Obtain the original data, preprocess the original data, use a convolutional neural network and a recurrent neural network to extract image features and text features from the preprocessed data respectively, and fuse the extracted image features and text features into a comprehensive feature vector through multi-modal fusion technology;
[0008] S2: Split the comprehensive feature vector into data shards and send them to each node in the system. Iteratively train the distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and optimization algorithms to obtain node model parameters, and then use an aggregation algorithm to obtain global model parameters. Encrypt the global model parameters and upload them to the blockchain to ensure that only authorized users can decrypt and access them.
[0009] As a specific embodiment, in step S1, "preprocessing the original data" includes cleaning, formatting, and standardizing the data.
[0010] As a specific embodiment, in step S1, "using a convolutional neural network and a recurrent neural network to extract image features and text features from the preprocessed data respectively" includes:
[0011] In a convolutional neural network, each convolutional layer uses multiple filters to extract local region features to obtain a feature map;
[0012] Based on the obtained feature map, the pooling layer obtains the maximum pooling output of the output feature map through maximum pooling processing;
[0013] Based on the maximum pooling output of the output feature map, the global average pooling layer averages all the values of each feature map to form a single value, thereby generating a feature vector of the image.
[0014] As a specific implementation manner, in step S1, "extracting image features and text features from the preprocessed data using a convolutional neural network and a recurrent neural network" further includes: using a recurrent neural network to extract temporal dynamic features as text data features.
[0015] As a specific implementation manner, in step S2, "iteratively training a distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and an optimization algorithm to obtain node model parameters" specifically includes: based on a weight matrix and a bias vector, performing layer-by-layer calculations on the input data through a neural network and outputting a prediction result.
[0016] As a specific implementation manner, in step S2, "iteratively training a distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and an optimization algorithm to obtain node model parameters" specifically further includes: using a loss function to measure the gap between the prediction result and the true label.
[0017] As a specific implementation manner, in step S2, "iteratively training a distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and an optimization algorithm to obtain node model parameters" specifically further includes: using backpropagation to calculate the gradient of the loss function with respect to each parameter.
[0018] As a specific implementation manner, in step S2, "iteratively training a distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and an optimization algorithm to obtain node model parameters" specifically further includes: introducing the Adam optimization algorithm to update the parameters by calculating the first-order moment estimate and the second-order moment estimate of the gradient.
[0019] As a specific implementation manner, in step S2, "iteratively training a distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and an optimization algorithm to obtain node model parameters" specifically further includes: repeatedly performing the four operations of forward propagation, loss calculation, backpropagation, and parameter update, continuously updating the parameters of the distributed artificial intelligence model until the performance of the distributed artificial intelligence model reaches a specified threshold or a specified number of executions is completed.
[0020] Another embodiment of the present application also discloses a blockchain-based distributed artificial intelligence model training and secure sharing system. Applying the above-mentioned blockchain-based distributed artificial intelligence model training and secure sharing method, the blockchain-based distributed artificial intelligence model training and secure sharing system includes:
[0021] A data access and preprocessing module, configured to receive raw data from different data sources and preprocess the raw data from different data sources to obtain preprocessed data;
[0022] A feature extraction and management module, configured to extract image features and text features from the preprocessed data of the data access and preprocessing module by using convolutional neural network technology and recurrent neural network technology; and use multimodal fusion technology to fuse the extracted image features and text features to obtain a comprehensive feature vector;
[0023] A dynamic key management module, configured to receive the preprocessed data of the data access and preprocessing module, and dynamically generate and manage keys for accessing data and distributed artificial intelligence models with reference to the preprocessed data;
[0024] A model training and optimization module, configured to split the comprehensive feature vector of the feature extraction and management module into data shards and send them to nodes in the blockchain-based distributed artificial intelligence model training and secure sharing system for distributed artificial intelligence model training, and introduce an optimization algorithm during the training process to update the node model parameters;
[0025] A secure sharing module for data and models, configured to encrypt the node model parameters of the model training and optimization module by using encryption technology, upload the encrypted node model parameters to the blockchain, calculate global model parameters through an aggregation algorithm on the blockchain, and encrypt and store the global model parameters; and use the keys allocated by the dynamic key management module to ensure that only authorized users can decrypt and access the encrypted node model parameters and global model parameters; the model training and optimization module is further configured to receive the global model parameters of the secure sharing module for data and models and perform model optimization;
[0026] An auditing and compliance module is respectively connected to the data access and preprocessing module, the feature extraction and management module, the dynamic key management module, the model training and optimization module, and the secure sharing module for data and models through data transmission; the auditing and compliance module is configured to monitor system operations and record key activities to ensure that system operations comply with relevant laws, regulations and internal policies.
[0027] The beneficial effects of the technical solution of the embodiment of the present invention are:
[0028] 1. The distributed artificial intelligence model training technology is carried out in parallel on multiple computing nodes, significantly improving the processing speed and efficiency. The model parameters are dynamically adjusted through the Adam optimization algorithm, improving the training accuracy and the overall performance of the system.
[0029] 2. By implementing dynamic key management, a one-time key is generated for each data access or distributed artificial intelligence model training request, thus achieving a high level of data access security. Combining blockchain technology ensures the immutability and transparency of data transactions, enhancing the system's security protection capabilities.
[0030] 3. Strong encryption measures are used to protect the secure sharing of data and distributed artificial intelligence models, ensuring that only authorized users can access sensitive information, thus supporting cross-institutional and cross-regional cooperation. This not only expands the application scope of data but also maintains data privacy. The audit and compliance module records all key operations, providing a complete operation log to ensure the traceability and compliance of system operations, thereby enhancing the trust of enterprises and users in the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a structural diagram of a blockchain-based distributed artificial intelligence model training and secure sharing system according to an embodiment of the present invention;
[0032] Figure 2 It is a flowchart of a blockchain-based distributed artificial intelligence model training and secure sharing method according to another embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] In order to further elaborate on the technical means and effects adopted by the embodiments of the present invention to achieve the predetermined invention purpose, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the embodiments of the present invention belong.
[0035] The following specifically describes the specific solutions of the blockchain-based distributed artificial intelligence model training and secure sharing method provided by the embodiments of the present invention in conjunction with the accompanying drawings.
[0036] Refer to the attached Figure 1, a blockchain-based distributed artificial intelligence model training and secure sharing system provided by an embodiment of the present invention includes a data access and preprocessing module, a feature extraction and management module, a dynamic key management module, a model training and optimization module, a secure sharing module for data and models, and an auditing and compliance module.
[0037] The data access and preprocessing module is responsible for receiving raw data from different data sources, cleaning, formatting, and standardizing the raw data from different data sources to obtain preprocessed data, so as to ensure data quality and prepare for subsequent processing requirements. The preprocessed data maintains data consistency and integrity, enabling efficient subsequent feature extraction and distributed artificial intelligence model training.
[0038] The data access and preprocessing module is connected to the feature extraction and management module, the dynamic key management module, and the auditing and compliance module through data transmission.
[0039] The feature extraction and management module receives the preprocessed data from the data access and preprocessing module, and uses convolutional neural network technology and recurrent neural network technology to extract image features and text features from the preprocessed data; then, uses multimodal fusion technology to fuse the image and text features to obtain a comprehensive feature vector, and stores and manages the comprehensive feature vector to provide support for subsequent distributed artificial intelligence model training and optimization. The feature extraction and management module is connected to the model training and optimization module and the auditing and compliance module through data transmission.
[0040] The dynamic key management module is used to receive the preprocessed data from the data access and preprocessing module, and dynamically generate and manage keys for accessing data and distributed artificial intelligence models with reference to the preprocessed data. Specifically, hash functions and symmetric encryption algorithms can be used to encrypt the features of the preprocessed data (such as color distribution, texture features, statistical information, timestamps, etc.) to generate keys. The specific method is set according to specific implementation scenarios. The dynamic key management module is connected to the secure sharing module for data and models and the auditing and compliance module through data transmission.
[0041] The model training and optimization module is used to split the comprehensive feature vector into data shards and send them to the nodes in the blockchain-based distributed artificial intelligence model training and security sharing system for distributed artificial intelligence model training. During the training process, an optimization algorithm is introduced to update the node model parameters, and the node model parameters are passed to the data and model security sharing module. The data and model security sharing module generates global model parameters based on the node model parameters. The model training and optimization module is also used to receive the global model parameters from the data and model security sharing module for model optimization. The model training and optimization module is connected to the data and model security sharing module and the audit and compliance module through data transmission means.
[0042] The data and model security sharing module uses blockchain technology to ensure the secure sharing of data. The data and model security sharing module encrypts the node model parameters of the model training and optimization module using encryption technology, uploads the encrypted node model parameters to the blockchain, calculates the global model parameters through an aggregation algorithm on the blockchain, and encrypts and stores the global model parameters; uses the key allocated by the dynamic key management module to ensure that only authorized users can decrypt and access the encrypted node model parameters and global model parameters;
[0043] Exemplarily, the encryption technology includes symmetric encryption, asymmetric encryption, hash functions, and digital signatures.
[0044] The data and model security sharing module is connected to the model training and optimization module through data transmission means.
[0045] The audit and compliance module is used to monitor system operations, record key activities, and ensure that system operations comply with relevant laws, regulations, and internal policies. The audit and compliance module is connected to the data access and preprocessing module, the feature extraction and management module, the dynamic key management module, the model training and optimization module, and the data and model security sharing module through data transmission means.
[0046] Referring to the appendix Figure 2 In another embodiment of the present invention, a blockchain-based distributed artificial intelligence model training and security sharing method, based on the above blockchain-based distributed artificial intelligence model training and security sharing system, includes the following steps:
[0047] S1. Obtain the original data, preprocess the original data, use a convolutional neural network and a recurrent neural network to extract image features and text features from the preprocessed data respectively, and fuse the extracted features into a comprehensive feature vector through multimodal fusion technology.
[0048] Specifically, the raw data from multiple data sources is collected by the data access and preprocessing module. The types of data sources are very diverse and can include public databases, open datasets, and enterprise internal data, etc., which can be specifically set according to the specific implementation scenario and are not limited here.
[0049] After that, the data access and preprocessing module preprocesses the raw data. Through data cleaning, data standardization, and data formatting, the quality and consistency of the data are ensured. The specific processing methods are well-known technical means to those skilled in the art and will not be elaborated here.
[0050] The preprocessed data is passed to the feature extraction and management module. Based on the preprocessed data, the convolutional neural network (CNN) and the recurrent neural network (RNN) are used to extract image features and text features respectively; then, using multi-modal fusion technology, the image features and text features are fused to obtain a comprehensive feature vector.
[0051] Specifically, in the convolutional neural network, each convolutional layer uses multiple filters to extract local region features, and the calculation formula is:
[0052]
[0053] Among them, is the feature map obtained by the kc-th convolutional kernel at the position (ic, jc), σ CNN is the activation function, introducing non-linearity, such as ReLU or Sigmoid. The specific selection of which operation is not limited here, F C is the size of the convolutional layer window, I (ic+mc)(jc+nc) represents the pixel value of the input image at the position (ic + mc, jc + nc), and mc and nc are the local offsets of the convolutional kernel, represents the weight of the kc-th convolutional kernel at the position (mc, nc), b kc represents the bias value of the kc-th convolutional kernel.
[0054] The pooling layer of the convolutional neural network reduces the spatial size of the feature map through max pooling, and the formula is:
[0055]
[0056] Among them, ip, jp represent the positions in the output feature map, represents the max pooling output at the position (ip, jp) in the kp-th output feature map, and ap, bp are used to traverse the indices within the pooling window and vary in the interval [0, F P -1], F P is the size of the pooling window. Through the pooling operation, the network can reduce the size of the feature map and at the same time extract important features.
[0057] The global average pooling layer averages all the values of each feature map to form a single value, thereby generating a feature vector of the image. The formula for global average pooling is as follows:
[0058]
[0059] GAP = {GAP1, GAP2,..., GAP num}
[0060] Wherein, represents the max-pooling output at the position (ia, ja) in the ka-th output feature map, and GAP ka is the global average pooling result of the ka-th output feature map, H GAP and W GAP are the height and width of the feature map respectively. GAP is the feature vector of the image, num is the number of convolutional kernel output feature maps. Through global average pooling, each feature map is compressed into a single average value, and the dimension of the feature vector of the image is the same as the number of convolutional kernel output feature maps. The specific convolutional neural network technology is a well-known technical means in the art and will not be elaborated here.
[0061] The recurrent neural network is used to process text sequences and extract temporal dynamic features as text data features. The formula is:
[0062]
[0063] Wherein, is the hidden state at time tr, which is a representation of a time step and contains all the information from time step 1 to time step tr. σ RNN is the activation function, which is a non-linear function, such as tanh or ReLU. The specific operation selected is not limited here; W hh is the weight matrix from the previous hidden layer to the current hidden layer, responsible for transmitting information, and W hx is the weight matrix input to the hidden layer, x tr is the input data at time tr, and b h is the bias of the hidden layer. The specific recurrent neural network technology is a well-known technical means in the art and will not be elaborated here.
[0064] The multi-modal fusion technology fuses the extracted image and text features to obtain a comprehensive feature vector, which is expressed as:
[0065]
[0066] Wherein, K is the comprehensive feature vector, GAP is the feature vector of the image, T is the number of time steps of the entire input sequence, is the hidden state at the last time step T and is the text data feature of the entire sequence.
[0067] S2. Split the comprehensive feature vector into data shards and send them to each node in the system. The nodes iteratively train the distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and optimization algorithms to obtain the node model parameters, and then use the aggregation algorithm to obtain the global model parameters. The global model parameters are encrypted and uploaded to the blockchain to ensure that only authorized users can decrypt and access them.
[0068] The training of the distributed artificial intelligence model utilizes the immutability and transparency of the blockchain, improving the training efficiency and enhancing the security. It is a key step to achieve efficient, transparent, and secure data processing. Split the comprehensive feature vector K into data shards, and each data shard Di contains n i independent data instances di i , and the splitting method is specifically set according to the specific implementation scenario and is not limited here. The formula for the data shards is as follows:
[0069] K = {D1, D2,..., D k}
[0070]
[0071] D k is the data shard of node k, and d ij is an independent data instance in the data shard D i . After splitting, the data shards are sent to each node in the distributed artificial intelligence model through a secure channel, and each node uses the allocated data shards to train the node's distributed artificial intelligence model. In each training cycle, each node will perform four steps: forward propagation, loss calculation, backpropagation, and parameter update.
[0072] Forward propagation refers to the process in which the input data d ij is calculated layer by layer through the neural network and finally outputs the prediction result. The process is expressed as:
[0073] z (l) = W (l) u (l-1) + b (l)
[0074] u (l) = f(z (l) )
[0075] where u (l) represents the activation value of the l-th layer, and u (0) is exactly an independent data instance in the data shard D i , W (l) and b(l) respectively represent the weight matrix and bias vector of the l-th layer. At the beginning of training, the weight matrix W of the neural network (l) and the bias vector b (l) will be initialized. The initialization method is specifically set according to the specific implementation scenario and is not limited here. f is the activation function, which can be ReLU or Sigmoid, and the specific selection of operation is not limited here.
[0076] The loss function is used to measure the gap between the prediction result and the true label. Common loss functions include the mean square error function and the cross-entropy loss function, and the specific selection of operation is not limited here.
[0077] Backpropagation is used to calculate the gradient of the loss function with respect to each parameter, and the formula is:
[0078]
[0079] δ (l) =(δ (l+1) W (l+1) )⊙f′(z (l) )
[0080]
[0081] where, δ (L) is the error term of the output layer, δ (l) is the error term of the l-th layer, f′ is the derivative function of the activation function f, S is the loss function, and the specific selection of operation is not limited here. represents the gradient of the loss function S with respect to the output u (L) of the hidden layer, where, L is the last layer, and the activation value u (L) of the last layer is the output of the hidden layer, represents the transpose; is the gradient of the loss function S with respect to the weight matrix W (l) , is the gradient of the loss function S with respect to the bias vector b (l) .
[0082] To further improve the efficiency of training the distributed artificial intelligence model based on the blockchain, the embodiment of the present invention introduces the Adam optimization algorithm in the parameter update step to update the parameters by calculating the first-order moment estimate and the second-order moment estimate of the gradient, and the formula is:
[0083]
[0084] where, m t and v tThey are the first - order moment estimate and the second - order moment estimate of the gradient, respectively. The initial values are all zero vectors. β1 is the decay rate of the first - order moment estimate, with a value of 0.9. β2 is the decay rate of the second - order moment estimate, with a value of 0.999. is the gradient of the loss function L with respect to the parameter θ at the current time t. The parameter θ is the weight matrix W (l) or the bias vector b( l ). The formula for bias correction is:
[0085]
[0086] where, (β1) t is the t - th power of β1, (β2) t is the t - th power of β2. and are the first - order moment estimate and the second - order moment estimate after bias correction, respectively. The formula for parameter update is:
[0087]
[0088] where, θ new and θ old are the values of the parameter after and before the update, respectively. ∈ is a constant to prevent division by zero, which can be set specifically according to the specific implementation scenario and is not limited here. η is the learning rate, and the learning rate is automatically adjusted during training through a learning rate scheduler. The specific method is a well - known technical means in the art and will not be elaborated here.
[0089] Repeat the four operations of forward propagation, loss calculation, backpropagation, and parameter update, and continuously update the parameters of the distributed artificial intelligence model until the performance of the distributed artificial intelligence model reaches the specified threshold or the specified number of executions is completed. The specified threshold and the specified number of executions can be set specifically according to the specific implementation scenario and are not limited here.
[0090] After the iterative training of the distributed artificial intelligence model ends, the node model parameters obtained by each node are encrypted and uploaded to the blockchain for aggregation and synchronization. Use an aggregation algorithm to decrypt the encrypted node model parameters, calculate the global model parameters, encrypt the global model parameters and store them on the blockchain, and use a dynamic key management system to generate and distribute access keys to ensure that only authorized users can decrypt and access the global model parameters.
[0091] The distributed artificial intelligence model training and secure sharing system based on the blockchain monitors and records all operations and access requests through an audit and compliance module to ensure the transparency and compliance of operations.
[0092] In summary, the distributed artificial intelligence model training and secure sharing system based on the blockchain is completed.
[0093] The sequence of the invention embodiments is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0094] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments.
[0095] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention and should all be included in the protection scope of the present invention.
Claims
1. A method for training and securely sharing a distributed artificial intelligence model based on blockchain, characterized in that, It includes the following steps: S1: Obtain the original data, preprocess the original data, use a convolutional neural network and a recurrent neural network to extract image features and text features from the preprocessed data respectively, and fuse the extracted image features and text features into a comprehensive feature vector through multimodal fusion technology; S2: Split the comprehensive feature vector into data shards and send them to each node in the system. Iteratively train the distributed artificial intelligence model through forward propagation, loss calculation, backpropagation, and optimization algorithms to obtain node model parameters. In the implementation process of forward propagation, loss calculation, backpropagation, and optimization algorithms, based on the weight matrix and bias vector, calculate the input data layer by layer through the neural network and output the prediction result. The specific implementation is as follows: z (l) = W (l) u (l-1) + b (l) u (l) = f(z (l) ) where, u (l) represents the activation value of the l-th layer, u (l-1) represents the activation value of the (l - 1)-th layer, W (l) and b (l) represent the weight matrix and bias vector of the l-th layer respectively, and f is the activation function; Use the loss function to measure the gap between the prediction result and the true label; use backpropagation to calculate the gradient of the loss function with respect to each parameter. The formula is: δ (l) = (δ (l+1) W (l+1) ) ⊙ f ′ (z (l) ) Among them, δ (L) is the error term of the output layer, δ (l) is the error term of the l-th layer, δ (l+1) is the error term of the (l + 1)-th layer, W (l+1) is the weight matrix of the (l + 1)-th layer, f ′ is the derivative function of the activation function f, S is the loss function, represents the gradient of the loss function S with respect to the output u (L) of the hidden layer. Among them, L is the last layer, and the activation value u (L) of the last layer is the output of the hidden layer, represents the transpose; is the gradient of the loss function S with respect to the weight matrix W (l) , is the gradient of the loss function S with respect to the bias vector b (l) ; Introduce the Adam optimization algorithm to update the parameters by calculating the first-order moment estimate and second-order moment estimate of the gradient. The formula is: where m t and v t are the first and second moment estimates of the gradient respectively, β1 is the decay rate of the first moment estimate, β2 is the decay rate of the second moment estimate, is the gradient of the loss function L with respect to the parameter θ at the current time t, and the parameter θ is the weight matrix W (l) or the bias vector b (l) , and the formula for bias correction is: where, (β1) t is the t-th power of β1, (β2) t is the t-th power of β2, and are the first-order moment estimate and the second-order moment estimate after bias correction respectively, and the formula for parameter update is: where θ new and θ old are the values after and before parameter update respectively, ∈ is a constant to prevent division by zero, and η is the learning rate; Repeat the four operations of forward propagation, loss calculation, backpropagation, and parameter update, and continuously update the parameters of the distributed artificial intelligence model until the performance of the distributed artificial intelligence model reaches the specified threshold or the specified number of executions is completed; Then use the aggregation algorithm to obtain the global model parameters, encrypt the global model parameters and upload them to the blockchain to ensure that only authorized users can decrypt and access.
2. The method for training and securely sharing a distributed artificial intelligence model based on a blockchain according to claim 1, wherein In step S1, "preprocessing the original data" includes cleaning, formatting, and standardizing the data.
3. The method for training and securely sharing a distributed artificial intelligence model based on blockchain according to claim 1, wherein In step S1, "using a convolutional neural network and a recurrent neural network to extract image features and text features from the preprocessed data" includes: In the convolutional neural network, each convolutional layer uses multiple filters to extract local region features to obtain a feature map; Based on the obtained feature map, the pooling layer obtains the maximum pooling output of the output feature map through max pooling processing; Based on the maximum pooling output of the output feature map, the global average pooling layer averages all the values of each feature map to form a single value, thereby generating the feature vector of the image.
4. The method for training and securely sharing a distributed artificial intelligence model based on a blockchain according to claim 1, wherein In step S1, "using a convolutional neural network and a recurrent neural network to extract image features and text features from the preprocessed data" also includes: using a recurrent neural network to extract temporal dynamic features as text data features.
5. A distributed artificial intelligence model training and secure sharing system based on blockchain, characterized in that, Apply the blockchain-based distributed artificial intelligence model training and security sharing method according to any one of claims 1 to 4. The blockchain-based distributed artificial intelligence model training and security sharing system includes: A data access and preprocessing module, which is used to receive the original data from different data sources and preprocess the original data from different data sources to obtain preprocessed data; A feature extraction and management module, which is used to extract image features and text features from the preprocessed data based on the preprocessed data of the data access and preprocessing module by using convolutional neural network technology and recurrent neural network technology; use multimodal fusion technology to fuse the extracted image features and text features to obtain a comprehensive feature vector; A dynamic key management module, which is used to receive the preprocessed data from the data access and preprocessing module, and dynamically generate and manage keys for accessing data and distributed artificial intelligence models with reference to the preprocessed data; A model training and optimization module, which is used to split the comprehensive feature vectors of the feature extraction and management module into data shards and send them to the nodes in the blockchain-based distributed artificial intelligence model training and secure sharing system for distributed artificial intelligence model training, and introduce an optimization algorithm to update the node model parameters during the training process; A data and model secure sharing module, which is used to encrypt the node model parameters of the model training and optimization module by using encryption technology, upload the encrypted node model parameters to the blockchain, calculate the global model parameters through an aggregation algorithm on the blockchain, and encrypt and store the global model parameters; and use the keys assigned by the dynamic key management module to ensure that only authorized users can decrypt and access the encrypted node model parameters and global model parameters; the model training and optimization module is also used to receive the global model parameters of the data and model secure sharing module for model optimization; An audit and compliance module, which is connected to the data access and preprocessing module, the feature extraction and management module, the dynamic key management module, the model training and optimization module, and the data and model secure sharing module respectively through data transmission; the audit and compliance module is used to monitor system operations and record key activities to ensure that system operations comply with relevant laws, regulations and internal policies.
Citation Information
Patent Citations
Data processing method and device, equipment and medium
CN117195986A
Data privacy protection method fusing block chain technology and artificial intelligence
CN117436132A