Blockchain-based automated artificial intelligence data sharing method and system

By using a blockchain-based automated AI data sharing method, which utilizes off-chain storage of encrypted data, on-chain verification models, and access control smart contracts, the problems of data silos, privacy and security, and lack of trust are solved, achieving efficient and secure data sharing and promoting the development of AI applications.

CN119848908BActive Publication Date: 2026-07-31BEIJING ZHONGKE JINCAI TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZHONGKE JINCAI TECH
Filing Date
2025-03-19
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as data silos, privacy and security vulnerabilities, lack of trust, and inefficiency, especially in automated artificial intelligence data sharing scenarios where effective solutions are lacking.

Method used

By adopting a blockchain-based automated artificial intelligence data sharing method, efficient, secure, and automated data sharing is achieved through off-chain storage of encrypted data, on-chain verification models, access control smart contracts, and real-time audit reports.

Benefits of technology

It solves the problems of data silos, privacy and security, and lack of trust, improves the efficiency and security of data sharing, promotes the deep integration of artificial intelligence and blockchain technology, and supports data-driven AI applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848908B_ABST
    Figure CN119848908B_ABST
Patent Text Reader

Abstract

This invention discloses an automated artificial intelligence data sharing method and system based on blockchain, belonging to the field of data sharing technology. The method includes: a data provider uploading encrypted raw data to an off-chain storage unit; an on-chain verification model running directly on the encrypted data to generate a data validity verification result; automatically issuing a reward to the data provider upon successful validity verification and writing an access control smart contract for the uploaded data; preventing the data provider from uploading data to the blockchain and clearing the encrypted data in the off-chain storage unit upon failure of validity verification; automatically sharing data with the data requester based on the access control smart contract after the data requester submits an access request; and saving key on-chain operation records in real time and periodically generating audit reports based on the saved records to ensure the compliance of the sharing process. This method solves the problems of data silos, privacy and security, lack of trust, and low efficiency in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data sharing technology, and in particular to an automated artificial intelligence data sharing method and system based on blockchain. Background Technology

[0002] With the rapid development of artificial intelligence technology, data has become a core resource driving AI model training and optimization. However, data sharing faces many challenges in practical applications: 1. Data silos: Data from different institutions or individuals is often stored in isolation, lacking effective sharing mechanisms, resulting in low data resource utilization and difficulty in supporting cross-domain collaboration; 2. Privacy and security issues: Data sharing involves sensitive information (such as personal privacy and trade secrets), and traditional centralized sharing methods pose risks of data leakage, tampering, and misuse; 3. Inefficiency of manual operations: Traditional data sharing processes rely on manual negotiation and approval, which is inefficient and cannot meet the needs of large-scale, real-time data sharing; 4. Lack of incentive mechanisms: Data providers lack effective incentives, leading to insufficient willingness to share data and limiting the circulation and value mining of data resources. Currently, some technologies have attempted to address the aforementioned issues, but limitations remain: 1. Centralized data sharing platforms rely on third-party intermediaries, posing a single point of failure risk and making it difficult to guarantee data transparency and immutability; 2. Traditional encryption technologies, while protecting data privacy, cannot resolve trust issues during the sharing process and lack automated execution capabilities; 3. The initial application of blockchain technology, due to its decentralized, immutable, and traceable characteristics, has been attempted for data sharing. However, existing solutions are mostly limited to data storage and access control, lacking deep support for AI data sharing scenarios, particularly in terms of automated execution, privacy protection, and incentive mechanisms. To address these issues, this invention proposes a blockchain-based automated artificial intelligence data sharing method and system. It aims to solve problems such as data silos, privacy and security vulnerabilities, lack of trust, and low efficiency in existing technologies, providing an efficient, secure, and automated data sharing solution. This will promote the deep integration of artificial intelligence and blockchain technologies, providing reliable support for data-driven AI applications. Summary of the Invention

[0003] This invention provides a blockchain-based automated artificial intelligence data sharing method, comprising: Step 1: The data provider uploads the encrypted raw data to the off-chain storage unit. The on-chain verification model runs directly on the encrypted data and generates the data validity verification result. Step 2: After the validity verification is passed, the reward will be automatically issued to the data provider, and an access control smart contract will be written for the data uploaded by them. Step 3: If the validity verification fails, prevent the data provider from uploading the data to the blockchain and clear the encrypted data in the off-chain storage unit. Step 4: After the data requester submits an access request, the on-chain data sharing center automatically shares the data with the data requester based on the access control smart contract. Step 5: Save key on-chain operation records in real time, and generate audit reports regularly based on the saved records to ensure the compliance of the sharing process.

[0004] As described above, an automated artificial intelligence data sharing method based on blockchain is used, in which off-chain storage units are specifically used to store data uploaded by data providers. A distributed storage architecture is adopted. After the data provider uploads the data, the off-chain storage unit will automatically generate a unique storage identifier for it based on the descriptive information and the characteristics of random samples.

[0005] The above-described blockchain-based automated artificial intelligence data sharing method, in which an on-chain verification model can verify the validity of data without decryption, includes the following sub-steps in its training process: Both the training and test datasets are encrypted into ciphertext format; Create an artificial intelligence model in a encrypted environment, and train and optimize the model using a training dataset; The model's output is repeatedly tested using the test dataset to verify whether it meets expectations. Once the test is passed, training is terminated, and the final validation model is obtained.

[0006] The blockchain-based automated artificial intelligence data sharing method described above includes the following sub-steps: (1) Writing access control smart contracts for data uploaded by data providers. Define four key data items: data access fee, single access time, access role, and whether to make the data public. Automatically generate access control smart contracts based on predefined data entries and associate them with uploaded data; Add a reentrancy detection unit to respond promptly to reentrancy attacks suffered during smart contract execution.

[0007] The aforementioned blockchain-based automated artificial intelligence data sharing method involves an on-chain data sharing center automatically sharing data with the data requester based on an access control smart contract after the data requester submits an access request. This method includes the following sub-steps: Generate a search identifier based on the data requester's requirement description and sample; Perform a matching operation between the retrieval identifier and the storage identifier of the on-chain data, and retrieve the on-chain data with the highest matching degree and put it into the cache area; Several sample data retrieved from the cache are shown to the data requester, who then determines whether to submit an access request based on the sample. If an access request is submitted, the access control smart contract is executed immediately, and the retrieved data in the cache is automatically shared with the data requester based on the various events in the contract. If the data requester does not submit an access request within the scheduled time, the retrieved data will be cleared from the cache and the cache will be released.

[0008] As described above, in an automated AI data sharing method based on blockchain, if the data requester only provides a requirement description, the data description part of the storage identifier is obtained by inverse XOR operation and matched with the retrieval identifier; if the data requester provides both a requirement description and an instance sample, the storage identifier and the retrieval identifier are directly matched, and finally, the on-chain data with the highest matching degree is retrieved based on the operation result and placed in the cache area.

[0009] The blockchain-based automated artificial intelligence data sharing method described above, which saves key on-chain operation records in real time and generates audit reports periodically based on the saved records, specifically includes the following sub-steps: Define key operational events in smart contracts; Use off-chain listeners to capture key operation events in real time and store them in the database; Set up a scheduled task to periodically generate audit reports based on the monitored data in the database.

[0010] The present invention also provides an automated artificial intelligence data sharing system based on blockchain, comprising: an off-chain storage module, an on-chain verification module, an on-chain data sharing module, and an off-chain monitoring module; Off-chain storage module, used to store encrypted data uploaded by data providers; The on-chain verification module is used to verify the validity of uploaded data; The on-chain data sharing module is used to automatically share on-chain data with data requesters; The off-chain monitoring module is used to save key on-chain operation records in real time and generate audit reports periodically based on the saved records.

[0011] The beneficial effects achieved by this invention are as follows: it solves the problems of data silos, privacy and security, lack of trust and low efficiency in the prior art, provides an efficient, secure and automated data sharing solution, promotes the deep integration of artificial intelligence and blockchain technology, and provides reliable support for data-driven AI applications. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0013] Figure 1 This is a flowchart of an automated artificial intelligence data sharing method based on blockchain, provided in Embodiment 1 of this application; Figure 2 This is a schematic diagram of an automated artificial intelligence data sharing system based on blockchain, provided in Embodiment 2 of this application. Detailed Implementation

[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] Example 1 like Figure 1 As shown, Embodiment 1 of this application provides an automated artificial intelligence data sharing method based on blockchain, including: Step S10: The data provider uploads the encrypted original data to the off-chain storage unit, and the on-chain verification model runs directly on the encrypted data to generate the data validity verification result; The off-chain storage unit is specifically designed to store data uploaded by data providers. Employing a distributed storage architecture, after a data provider uploads data, the off-chain storage unit automatically generates a unique storage identifier based on the descriptive information and the characteristics of random samples. Using this storage identifier, the on-chain data sharing center can quickly retrieve data from the desired domain or industry. The automatic generation formula for the storage identifier is as follows: Where S is the generated storage identifier, and Hash() is the hash function used to convert data into hash values. For the vector of the j-th word in the uploaded data description information, The standard deviation of the word vectors in the description information. Let j be the mean of the word vectors in the descriptive information, where j ranges from 1 to J, and J is the total number of word vectors in the descriptive information. is the feature value (such as variance, mean, or principal component) of the k-th random sample. It is the smallest eigenvalue among all random samples. Let k be the largest eigenvalue among all random samples, where k ranges from 1 to K, and K is the number of random samples drawn. The symbol "" represents the largest eigenvalue among all random samples. " indicates the XOR operation.

[0016] On-chain verification models can verify the validity of data without decrypting it. The training process includes the following sub-steps: Step S11: Encrypt both the training dataset and the test dataset into ciphertext format; The floating-point encryption algorithm used in this embodiment is more suitable for machine learning tasks.

[0017] Step S12: Create an artificial intelligence model in a encrypted environment and train and optimize the model using the training dataset; Because the computational complexity of the model is high in encrypted environments, this embodiment uses a lightweight linear model as the base model.

[0018] In a encrypted environment, the loss function of this model also requires direct computation on the encrypted data, so the loss function of this model is expressed as: Where L is the loss value of the current training batch, and E() represents the encryption function. This is the i-th plaintext input in the current training batch. This is the i-th plaintext output in the current training batch. and Let E(A) and E(B) represent ciphertext addition and ciphertext multiplication, respectively, where i takes values ​​from 1 to n, and n is the total number of training samples in the current training batch. For ciphertext E(A) and ciphertext E(B), E(A) E(B) = E(A+B), E(A) E(B) = E(AXB).

[0019] ciphertext The text is decrypted into plaintext L. The parameters in the model are then tuned based on the changes in the value of L until the value of L no longer decreases or shows no obvious decreasing trend, at which point training is paused.

[0020] Step S13: Use the test dataset to iteratively check whether the output of the model meets expectations. Once the check passes, terminate the training and obtain the final validation model. The encrypted test data is input into the model to obtain the encrypted output of the model. Then the encrypted output is decrypted into plaintext output. If it is consistent with the expected output, the test data passes the verification. When more than 99% of the test data in the test dataset can pass the verification, the model is considered to have passed the verification, the training of the model is terminated, and the final verification model is deployed on the blockchain.

[0021] Step S20: After the validity verification is passed, the reward is automatically issued to the data provider, and an access control smart contract is written for the data uploaded by the provider. As an incentive mechanism, after a data provider provides valid data, the on-chain data sharing center will immediately issue a reward to the data provider to increase the user's enthusiasm for providing data. The reward can be any legal and compliant form such as virtual tokens, points, or gift redemption codes.

[0022] After the data is registered in the on-chain data sharing center, that is, after the data is on the chain, a special smart contract needs to be written to define its access rules, which is divided into the following sub-steps: Step S21: Define four key data items: data access fee, single access time, access role, and whether to make them public; Data access fee, single access time, access role, and whether it is public are the four required fields. In addition, data providers can add other data entries as needed.

[0023] Step S22: Automatically generate an access control smart contract based on the defined data entries and associate it with the uploaded data; Each defined data entry is mapped to a specific state variable. Then, logic code is automatically generated based on the content filled in by the data provider. This logic code contains multiple events, and each event is used only to check whether a state variable is compliant. The generated logic code is stored in a separate function, which serves as the automatic control unit of the access control smart contract. The generated smart contract is associated with the uploaded data to automate access control for the uploaded data.

[0024] Step S23: Add a reentrancy detection unit to respond promptly to reentrancy attacks suffered during smart contract execution; The reentrancy detection unit is used to monitor the triggering of various events and the changes in various state variables during the execution of a smart contract in real time. Based on this information, it determines whether the contract has been subjected to a reentrancy attack and freezes the account of the current data access user if the determination result is yes, thereby achieving rapid response and handling of reentrancy attacks. The core function of the reentrancy detection unit is expressed as follows: Where R represents the probability coefficient of the current smart contract being subjected to a reentrancy attack. This indicates the number of external calls to event q within the current detection time (the detection time is set to 50ms in this embodiment). This is the average number of external calls to event q within a preset detection period (5 seconds in this embodiment). The reentrancy attack detection coefficient for event q is given, where q ranges from 1 to Q, and Q is the total number of events contained in the smart contract. I() is an indicator function that determines whether an event is reentrant or not. Returns 1 if the condition is met, otherwise returns 0. This represents the current value of the p-th state variable. This represents the value of the p-th state variable after the last external call ended. This represents the reentrancy attack detection coefficient for the p-th state variable, where p ranges from 1 to P, and P is the total number of state variables contained in the smart contract.

[0025] When the probability coefficient R is higher than the threshold, the smart contract is considered to have suffered a reentrancy attack, and the current data access user account is frozen in time to reduce losses.

[0026] Step S30: If the validity verification fails, prevent the data uploaded by the data provider from being uploaded to the blockchain and clear the encrypted data in the off-chain storage unit; Uploading data to the blockchain means registering the unique storage identifier of off-chain data with the on-chain data sharing center to enable subsequent automatic sharing. Data that is not uploaded to the blockchain will not be shared, nor should it be stored off-chain. Therefore, uploaded data that fails the validity verification will be deleted by the off-chain storage unit.

[0027] Step S40: After the data requester submits an access request, the on-chain data sharing center automatically shares the data with the data requester based on the access control smart contract; The on-chain data sharing center can quickly retrieve the data that best meets the data requester's needs and share the data with the data requester while strictly adhering to the contract. The specific sharing process is divided into the following sub-steps: Step S41: Generate a search identifier based on the data requester's requirement description and sample. The requirement description is mandatory; the data requester needs to describe in text what kind of data they want. The example sample is optional and is used to precisely describe the data format, fields, etc., that the data requester desires. The method for generating the retrieval identifier is the same as the method for generating the storage identifier.

[0028] Step S42: Perform a matching operation between the retrieval identifier and the storage identifier of the on-chain data, and retrieve the on-chain data with the highest matching degree and put it into the cache area; If the data requester only provides a requirement description, the data description part of the storage identifier is obtained by inverse XOR operation and matched with the retrieval identifier. If the data requester provides both a requirement description and an instance sample, the storage identifier and retrieval identifier are directly matched. Finally, the on-chain data with the highest matching degree is retrieved based on the operation result and placed in the cache. The retrieved data can be one or multiple records. The expression for the matching operation is: Where D is the matching degree calculation result, To retrieve the z-th byte in the identifier, This is the z-th byte in the storage identifier, where z ranges from 1 to M, and M is the identifier length, i.e., the number of bytes contained in the current hash value.

[0029] Step S43: Show several sample data retrieved from the cache to the data requester, and the data requester determines whether to submit an access request based on the sample; The display sample is the sample extracted when generating the storage identifier. The data requester checks whether the display sample meets its expectations and decides whether to submit an access request.

[0030] Step S44: If an access request is submitted, the access control smart contract is executed immediately, and the retrieved data in the cache is automatically shared with the data requester based on the various events in the contract; The smart contract first verifies whether the data access user meets the access role, has paid the access fee, is within the single access time, and other custom access conditions by calling its associated events. If any one of the verifications fails, the data access user will not be able to successfully obtain the data. If all verifications are successful, an authorization key is sent to the data access user. The data access user uses the authorization key to obtain the decrypted original data. The authorization key will be automatically expired after the data access user completes the data acquisition action or after the single access time expires, and the original data cannot be obtained again using this key. If the data is public data, the data acquisition action will be triggered directly after the access conditions are verified.

[0031] Step S45: If the data requester does not submit an access request within the predetermined time, the retrieved data is cleared from the cache and the cache is released.

[0032] Step S50: Save key on-chain operation records in real time, and generate audit reports periodically based on the saved records to ensure the compliance of the sharing process; This functionality is implemented through an off-chain listener, and it consists of the following sub-steps: Step S51: Define key operation events in the smart contract; For example, data modification, permission changes, and transaction execution can be configured by the administrator as needed.

[0033] Step S52: Use an off-chain listener to capture key operation events in real time and store them in the database; During each critical operation, the contract triggers a corresponding event containing relevant parameters. Off-chain listeners can monitor and capture these events in real time and store the data in the database.

[0034] Step S53: Set up a scheduled task to periodically generate audit reports based on the monitored data in the database; Set up a scheduled task to periodically extract data from the database, generate reports according to a preset template, and then provide the reports to relevant personnel via email or user interface.

[0035] Example 2 like Figure 2 As shown, Embodiment 2 of this application provides an automated artificial intelligence data sharing system based on blockchain, including: an off-chain storage module 21, an on-chain verification module 22, an on-chain data sharing module 23, and an off-chain monitoring module 24; Off-chain storage module 21 is used to store encrypted data uploaded by the data provider; specifically, it includes the following sub-modules: 1. Data receiving submodule, used to receive encrypted data uploaded by the data provider; 2. Storage identifier generation submodule, used to generate a unique storage identifier for the uploaded data based on the description information and the characteristics of the random sample; Using this storage identifier, the on-chain data sharing module can quickly obtain data from the required field or industry. The automatic generation formula for the storage identifier is expressed as: Where S is the generated storage identifier, and Hash() is the hash function used to convert data into hash values. For the vector of the j-th word in the uploaded data description information, The standard deviation of the word vectors in the description information. Let j be the mean of the word vectors in the descriptive information, where j ranges from 1 to J, and J is the total number of word vectors in the descriptive information. is the feature value (such as variance, mean, or principal component) of the k-th random sample. It is the smallest eigenvalue among all random samples. Let k be the largest eigenvalue among all random samples, where k ranges from 1 to K, and K is the number of random samples drawn. The symbol "" represents the largest eigenvalue among all random samples. " indicates the XOR operation.

[0036] The on-chain verification module 22 is used to verify the validity of uploaded data and, based on the validity verification result, to perform data uploading or deletion operations; specifically, it includes the following sub-modules: 1. On-chain verification model training submodule, used to train an artificial intelligence model to verify the validity of data in a encrypted environment; The training process specifically includes the following sub-steps: ① Encrypt both the training and test datasets into ciphertext format; The floating-point encryption algorithm used in this embodiment is more suitable for machine learning tasks.

[0037] ② Create an artificial intelligence model in a encrypted environment, and train and optimize the model using a training dataset; Because the computational complexity of the model is high in encrypted environments, this embodiment uses a lightweight linear model as the base model.

[0038] In a encrypted environment, the loss function of this model also needs to be directly calculated on the encrypted data. Therefore, the loss function designed for this model is expressed as follows: Where L is the loss value of the current training batch, and E() represents the encryption function. This is the i-th plaintext input in the current training batch. This is the i-th plaintext output in the current training batch. and Let E(A) and E(B) represent ciphertext addition and ciphertext multiplication, respectively, where i takes values ​​from 1 to n, and n is the total number of training samples in the current training batch. For ciphertext E(A) and ciphertext E(B), E(A) E(B) = E(A+B), E(A) E(B) = E(AXB).

[0039] ciphertext The text is decrypted into plaintext L. The parameters in the model are then tuned based on the changes in the value of L until the value of L no longer decreases or shows no obvious decreasing trend, at which point training is paused.

[0040] ③ Use the test dataset to iteratively check whether the model's output results meet expectations. Once the check passes, terminate training to obtain the final validation model. The encrypted test data is input into the model to obtain the encrypted output of the model. Then the encrypted output is decrypted into plaintext output. If it is consistent with the expected output, the test data passes the verification. When more than 99% of the test data in the test dataset can pass the verification, the model is considered to have passed the verification, the training of the model is terminated, and the final verification model is deployed on the blockchain.

[0041] 2. The model execution submodule is used to run the on-chain verification model directly on the uploaded encrypted data and generate the validity verification results of the data; As an incentive mechanism, the on-chain data sharing module will immediately issue a reward to the data provider after the data provider provides valid data, so as to increase the user's enthusiasm for providing data. The reward can be any legal and compliant form such as virtual tokens, points, gift redemption codes, etc.

[0042] On-chain data sharing module 23 is used to automatically share on-chain data with data requesters; it specifically includes the following sub-modules: 1. The data upload submodule is used to upload data that has passed the validity verification to the blockchain and to clear data that has failed the validity verification. Data that fails validity verification cannot be uploaded to the blockchain, and data that is not uploaded to the blockchain will not be shared. Therefore, uploaded data that fails validity verification will be cleared by off-chain storage. 2. Access Control Smart Contract Writing Submodule: This module is used to write a dedicated smart contract for uploaded data that has been put on the blockchain to define its access rules. Specifically, it includes the following sub-steps: ① Define four key data items: data access fee, single access time, access role, and whether to make the data public; Data access fee, single access time, access role, and whether it is public are the four required fields. In addition, data providers can add other data entries as needed.

[0043] ② Automatically generate access control smart contracts based on the defined data entries and associate them with the uploaded data; Each defined data entry is mapped to a specific state variable. Then, logic code is automatically generated based on the content filled in by the data provider. This logic code contains multiple events, and each event is used only to check whether a state variable is compliant. The generated logic code is stored in a separate function, which serves as the automatic control unit of the access control smart contract. The generated smart contract is associated with the uploaded data to automate access control for the uploaded data.

[0044] ③ Add a reentrancy detection unit to respond promptly to reentrancy attacks suffered during smart contract execution; The reentrancy detection unit is used to monitor the triggering of various events and the changes in various state variables during the execution of a smart contract in real time. Based on this information, it determines whether the contract has been subjected to a reentrancy attack and freezes the account of the current data access user if the determination result is yes, thereby achieving rapid response and handling of reentrancy attacks. The core function of the reentrancy detection unit is expressed as follows: Where R represents the probability coefficient of the current smart contract being subjected to a reentrancy attack. This indicates the number of external calls to event q within the current detection time (the detection time is set to 50ms in this embodiment). This is the average number of external calls to event q within a preset detection period (5 seconds in this embodiment). The reentrancy attack detection coefficient for event q is given, where q ranges from 1 to Q, and Q is the total number of events contained in the smart contract. I() is an indicator function that determines whether an event is reentrant or not. Returns 1 if the condition is met, otherwise returns 0. This represents the current value of the p-th state variable. This represents the value of the p-th state variable after the last external call ended. This represents the reentrancy attack detection coefficient for the p-th state variable, where p ranges from 1 to P, and P is the total number of state variables contained in the smart contract.

[0045] When the probability coefficient R is higher than the threshold, the smart contract is considered to have suffered a reentrancy attack, and the current data access user account is frozen in time to reduce losses.

[0046] 3. Contract execution submodule, used to automatically share data with data requesters based on access control smart contracts; The specific sharing process is divided into the following sub-steps: ① Generate a search identifier based on the data requester's requirements and sample data; The requirement description is mandatory; the data requester needs to describe in text what kind of data they want. The example sample is optional and is used to precisely describe the data format, fields, etc., that the data requester desires. The method for generating the retrieval identifier is the same as the method for generating the storage identifier.

[0047] ② Perform a matching operation between the retrieval identifier and the storage identifier of the on-chain data, and retrieve the on-chain data with the highest matching degree and put it into the cache area; If the data requester only provides a requirement description, the data description part of the storage identifier is obtained by inverse XOR operation and matched with the retrieval identifier. If the data requester provides both a requirement description and an instance sample, the storage identifier and retrieval identifier are directly matched. Finally, the on-chain data with the highest matching degree is retrieved based on the operation result and placed in the cache. The retrieved data can be one or multiple records. The expression for the matching operation is: Where D is the matching degree calculation result, To retrieve the z-th byte in the identifier, This is the z-th byte in the storage identifier, where z ranges from 1 to M, and M is the identifier length, i.e., the number of bytes contained in the current hash value.

[0048] ③ Show several sample data retrieved from the cache to the data requester, and the data requester can decide whether to submit an access request based on the sample; The display sample is the sample extracted when generating the storage identifier. The data requester checks whether the display sample meets its expectations and decides whether to submit an access request.

[0049] ④ If an access request is submitted, the access control smart contract will be executed immediately, and the retrieved data in the cache will be automatically shared with the data requester based on the various events in the contract; The smart contract first verifies whether the data access user meets the access role, has paid the access fee, is within the single access time, and other custom access conditions by calling its associated events. If any one of the verifications fails, the data access user will not be able to successfully obtain the data. If all verifications are successful, an authorization key is sent to the data access user. The data access user uses the authorization key to obtain the decrypted original data. The authorization key will be automatically expired after the data access user completes the data acquisition action or after the single access time expires, and the original data cannot be obtained again using this key. If the data is public data, the data acquisition action will be triggered directly after the access conditions are verified.

[0050] ⑤ If the data requester does not submit an access request within the predetermined time, the retrieved data will be cleared from the cache and the cache will be released.

[0051] The off-chain monitoring module 24 is used to save key on-chain operation records in real time and generate audit reports periodically based on the saved records to ensure the compliance of the sharing process. Specifically, it is divided into the following sub-steps: ① Define key operation events in the smart contract; For example, data modification, permission changes, and transaction execution can be configured by the administrator as needed.

[0052] ② Capture key operational events in real time and store them in the database; During each critical operation, the contract triggers a corresponding event containing relevant parameters. The off-chain monitoring module can listen to and capture these events in real time and store the data in the database.

[0053] ③ Set up a scheduled task to periodically generate audit reports based on the monitored data in the database; Set up a scheduled task to periodically extract data from the database, generate reports according to a preset template, and then provide the reports to relevant personnel via email or user interface.

[0054] Corresponding to the above embodiments, 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 automated artificial intelligence data sharing method.

[0055] Corresponding to the above embodiments, this embodiment of the invention provides a computer-readable storage medium containing one or more program instructions, which are executed by a processor to provide a blockchain-based automated artificial intelligence data sharing method.

[0056] The embodiments disclosed in this invention provide a computer-readable storage medium storing computer program instructions that, when executed on a computer, cause the computer to perform the aforementioned blockchain-based automated artificial intelligence data sharing method.

[0057] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can 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.

[0058] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.

[0059] The storage medium can be memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.

[0060] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.

[0061] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0062] 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.

[0063] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using a combination of hardware and software. When applied as software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.

[0064] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment 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 within the scope of protection of the present invention.

Claims

1. A blockchain-based automated artificial intelligence data sharing method, characterized in that, include: Step 1: The data provider uploads the encrypted raw data to the off-chain storage unit. The on-chain verification model runs directly on the encrypted data and generates the data validity verification result. After the data provider uploads data, the off-chain storage unit automatically generates a unique storage identifier based on the descriptive information and the characteristics of the random samples. This storage identifier allows the on-chain data sharing center to quickly retrieve the required data. The automatic generation formula for the storage identifier is as follows: Where S is the generated storage identifier, and Hash() is the hash function used to convert data into hash values. For the vector of the j-th word in the uploaded data description information, The standard deviation of the word vectors in the description information. Let j be the mean of the word vectors in the descriptive information, where j ranges from 1 to J, and J is the total number of word vectors in the descriptive information. Let k be the feature value of the k-th random sample. It is the smallest eigenvalue among all random samples. Let k be the largest eigenvalue among all random samples, where k ranges from 1 to K, and K is the number of random samples drawn. The symbol "" represents the maximum eigenvalue. " indicates the XOR operation; The on-chain verification model uses a lightweight linear model as the base model. The input data is the encrypted original data, and the output data is the ciphertext of the verification result. Step 2: After the validity verification is passed, the reward will be automatically issued to the data provider, and an access control smart contract will be written for the data uploaded by them. Step 3: If the validity verification fails, prevent the data provider from uploading the data to the blockchain and clear the encrypted data in the off-chain storage unit. Step 4: After the data requester submits an access request, the on-chain data sharing center automatically shares the data with the data requester based on the access control smart contract. Step 5: Save key on-chain operation records in real time, and generate audit reports periodically based on the saved records to ensure the compliance of the sharing process. This includes the following sub-steps: Define key operational events in smart contracts; Use off-chain listeners to capture key operation events in real time and store them in the database; Set up a scheduled task to periodically generate audit reports based on the monitored data in the database.

2. The blockchain-based automated artificial intelligence data sharing method of claim 1, wherein, The on-chain verification model verifies the validity of data without decrypting it. The training process includes the following sub-steps: Both the training and test datasets are encrypted into ciphertext format; Create an artificial intelligence model in a encrypted environment, and train and optimize the model using a training dataset; The model's output is repeatedly tested using the test dataset to verify whether it meets expectations. Once the test is passed, training is terminated, and the final validation model is obtained.

3. The blockchain-based automated artificial intelligence data sharing method of claim 1, wherein, Writing access control smart contracts for data uploaded by data providers includes the following sub-steps: Define four key data items: data access fee, single access time, access role, and whether to make the data public. Automatically generate access control smart contracts based on predefined data entries and associate them with uploaded data; Add a reentrancy detection unit to respond promptly to reentrancy attacks suffered during smart contract execution.

4. The blockchain-based automated artificial intelligence data sharing method of claim 1, wherein, After a data requester submits an access request, the on-chain data sharing center automatically shares the data with the data requester based on the access control smart contract, specifically including the following sub-steps: Generate a search identifier based on the data requester's requirement description and sample; Perform a matching operation between the retrieval identifier and the storage identifier of the on-chain data, and retrieve the on-chain data with the highest matching degree and put it into the cache area; Several sample data retrieved from the cache are shown to the data requester, who then determines whether to submit an access request based on the sample. If an access request is submitted, the access control smart contract is executed immediately, and the retrieved data in the cache is automatically shared with the data requester based on the various events in the contract. If the data requester does not submit an access request within the scheduled time, the retrieved data will be cleared from the cache and the cache will be released.

5. The blockchain-based automated artificial intelligence data sharing method of claim 4, wherein, If the data requester only provides a requirement description, the data description part of the storage identifier is obtained by inverse XOR operation and matched with the retrieval identifier. If the data requester provides both a requirement description and an instance sample, the storage identifier and the retrieval identifier are matched directly. Finally, the on-chain data with the highest matching degree is retrieved based on the operation result and placed in the cache area.

6. A blockchain-based automated artificial intelligence data sharing system for executing the blockchain-based automated artificial intelligence data sharing method as described in any one of claims 1-5, characterized in that, include: Off-chain storage module, on-chain verification module, on-chain data sharing module, off-chain monitoring module; Off-chain storage module, used to store encrypted data uploaded by data providers; The on-chain verification module is used to verify the validity of uploaded data; The on-chain data sharing module is used to automatically share on-chain data with data requesters; The off-chain monitoring module is used to save key on-chain operation records in real time and generate audit reports periodically based on the saved records.

7. The blockchain-based automated artificial intelligence data sharing system of claim 6, wherein, On-chain verification module details Includes the following sub-modules: The on-chain verification model training submodule is used to train an artificial intelligence model to verify the validity of data in a encrypted environment. The model execution submodule is used to run the on-chain verification model directly on the uploaded encrypted data and generate the validity verification results of the data.

8. The blockchain-based automated artificial intelligence data sharing system of claim 6, wherein, The on-chain data sharing module specifically includes the following sub-modules: The data upload submodule is used to upload data that has passed the validity verification to the blockchain and to clear data that has failed the validity verification. The access control smart contract writing submodule is used to write a dedicated smart contract for uploaded data that has been put on the chain to define its access rules; The contract execution submodule is used to automatically share data with data requesters based on access control smart contracts.