A storage method and system for decentralized multi-party computing data
Through the division of blockchain technology and data directory structure, decentralized multi-party computing data storage is realized, which solves the problems of data privacy leakage and storage efficiency in multi-party secure computing, and improves the security and reliability of data.
Patent Information
- Application Number
- CN202210596297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-05-30
AI Technical Summary
Existing multi-party secure computing technology relies too much on third-party central management modules, leading to the risk of data privacy leakage, and fails to effectively solve the storage efficiency, security and reliability issues of massive data.
Adopting the tamper-proof, traceability and decentralization characteristics of blockchain technology, by dividing computing information and governance information, using the information data structure and private information data structure on the blockchain chain for storage, combined with the GRPC interface module and local PostgreDB private data storage module realizes the storage of decentralized multi-party computing data.
It effectively solves the data leakage problem of traditional multi-party computing that relies too much on third-party center management, improves the on-chain storage capacity of massive data, and ensures the privacy and security of data and the reliability, efficiency and standardization of storage.
Smart Images

Figure CN115964734B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data storage, and in particular to a storage method and system for decentralized multi-party computing data. Background Art
[0002] With the continuous development of the information age, the popularity of smart phones and various wearable devices belonging to the Internet of Things terminals has led to an explosive growth of a large amount of sensitive and private personal data. Data has become an important factor of production, so the ability to obtain and analyze data has become the core competitiveness of many companies and organizations. However, massive big data not only has problems such as large data volume, inconsistent data supervision rules and storage formats, and complex data management and storage types, but also due to the needs of corporate organizations and individuals for their own data ownership and privacy protection, there are also a large number of data islands, resulting in many technical barriers in the process of data exchange and use.
[0003] In order to solve the problems of data silos and data privacy, multi-party secure computing methods have emerged. Multi-party secure computing refers to solving the problem of multiple data holders who do not trust each other completing the same computing task in a distributed network under the premise of ensuring the data privacy security of all parties. However, in existing multi-party secure computing, third-party servers are generally used as central management modules, responsible for key management or node information configuration and other functions, which also leads to over-reliance on third parties and will have a high risk of data privacy leakage. Blockchain technology, as a new type of computer application technology with decentralized distributed storage function, can not only solve the dependence of traditional secure multi-party computing on third-party central management modules, but also realize the persistent storage function of multi-party computing and related data information, with the characteristics of non-tamperability and traceability. Therefore, the existing technology mostly adopts multi-party secure computing methods based on blockchain technology to realize the collaborative management and storage of massive data.
[0004] At present, although the introduction of blockchain technology has effectively solved the problem of over-reliance on third-party central management modules, and multi-party secure computing technology has also solved the problem of privacy protection during data interaction, existing solutions mostly focus on local optimization of unilateral data privacy or data island issues, and have not comprehensively proposed a solution from a global perspective for the storage efficiency of multi-party data, data storage security, and data processing reliability. Summary of the invention
[0005] The present invention provides a storage method and system for decentralized multi-party computing data, which utilizes the tamper-proof, traceability and decentralized characteristics of blockchain technology to solve the data leakage problem of traditional multi-party computing that over-relies on third-party collaborative centers. At the same time, this method uses a new data storage method to solve the on-chain storage problem of massive data.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A method for storing decentralized multi-party computing data includes:
[0008] Get data;
[0009] Classifying data types, wherein the data types include computing information and governance information;
[0010] Determine a data storage format according to the data type, wherein the data storage format includes an on-blockchain information data structure and a private information data structure;
[0011] A data storage method is determined according to the data storage format.
[0012] Optionally, determining the data storage method according to the data storage format includes: using the blockchain on-chain information data structure to store computing information, using the private information data structure to store computing information, and using the blockchain on-chain information data structure to store governance information.
[0013] Optionally, the use of an on-blockchain information data structure to store computing information specifically includes:
[0014] Obtaining properties of the calculation information;
[0015] According to the attributes, the storage is performed in a directory structure of category-data table-data column or category-computing contract.
[0016] Optionally, the private information data structure is used to store the calculation information, specifically including:
[0017] The calculation information is stored in a local database in a unified management manner.
[0018] Optionally, the use of an on-chain information data structure of a blockchain to store governance information specifically includes:
[0019] The blockchain is used to store user management information, node management information and approval management information.
[0020] Optionally, the computing information includes data tables, data columns, computing contracts, private data tables, private data columns, private variables and private functions.
[0021] Optionally, the decentralized multi-party computing data storage method further includes:
[0022] The approval process is obtained from the storage method, and the approval process is stored.
[0023] Optionally, the approval process includes:
[0024] Submitting requests for on-chain user identities and permissions or operations on computing nodes to the blockchain server;
[0025] The blockchain server node calls the user identity authentication chain code to verify the identity of the initiator of the operation request and obtains the first verification result;
[0026] If the first verification result is passed, the blockchain server calls the user authority query chain code to verify the authority of the initiator of the operation request and obtains the second verification result;
[0027] If both verification results are passed, the operation request will be officially uploaded to the chain.
[0028] Optionally, the approval process also includes:
[0029] Submit an operation request to the blockchain server for the on-chain directory or computing contract;
[0030] The blockchain server node calls the blockchain server API interface to call the smart contract, verifies the identity of the initiator of the operation request, and obtains the first verification result;
[0031] If the first verification result is passed, the smart contract is called again to pre-process and cache the operation request on the chain to obtain the internal control ID code and the pre-processed operation request;
[0032] Distributing the pre-processed request to each organization member involved in the operation;
[0033] When each of the organization members calls the internal control ID to check the content of the pre-processed operation request, the current approval result in the pre-processing cache is obtained;
[0034] Each organization member calls the smart contract based on the organization's internal approval opinions and submits an approval operation request containing their own approval opinions;
[0035] The system synchronously modifies the opinions of each approver contained in the on-chain pre-processing cache according to the approval operation request, and further determines whether each member of the organization meets the approval opinions and unanimously agrees to pass the operation request;
[0036] If so, the operation request is officially uploaded to the chain.
[0037] If not, the operation request fails, and the system continues to wait for each organizer to submit an approval operation request and verify the final approval result.
[0038] To achieve the above object, the present invention also provides the following solution:
[0039] A storage system for decentralized multi-party computing data includes a GRPC interface module, a data storage central control module, a blockchain public data storage module and a local PostgreDB private data storage module. The interface module is connected to the data storage central control module, and the data storage central control module is respectively connected to the blockchain public data storage module and the local PostgreDB private data storage module.
[0040] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0041] The present invention provides a decentralized multi-party computing data storage method, which is based on blockchain technology and utilizes the tamper-proof, traceability and decentralized characteristics of blockchain technology to solve the data leakage problem of traditional multi-party computing that is overly dependent on third-party collaborative centers. At the same time, the method uses a new data storage method to solve the on-chain storage problem of massive data. In addition, for the reliability, efficiency and standardization of storage during data storage, computing information and governance information are separated, and governance information is classified as public data, which is distributed and stored in each node on the blockchain. This decentralized storage ensures the privacy security of each data. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 This is a flow chart of a decentralized multi-party computing data storage method of the present invention;
[0044] Figure 2 A schematic diagram of a data storage structure of the present invention;
[0045] Figure 3 This is a schematic diagram of the data storage structure 2 of the present invention;
[0046] Figure 4 This is a structural diagram of a storage system for decentralized multi-party computing data of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The present invention provides a storage method and system for decentralized multi-party computing data, which utilizes the tamper-proof, traceability and decentralized characteristics of blockchain technology to solve the data leakage problem of traditional multi-party computing that over-relies on third-party collaborative centers. At the same time, this method uses a new data storage method to solve the on-chain storage problem of massive data.
[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] Embodiment 1:
[0051] Figure 1 This is a flow chart of a decentralized multi-party computing data storage method of the present invention, such as Figure 1 As shown, the present invention provides a method for storing decentralized multi-party computing data, comprising the following steps:
[0052] Step 101: Get data.
[0053] Step 102: Divide data types, where the data types include computing information and governance information, and the computing information includes data tables, data columns, computing contracts, private data tables, private data columns, private variables, and private functions.
[0054] In the process of multi-party computing data storage, strictly speaking, the definition of data not only refers to the original information of the data involved in the calculation, but also includes the calculation content information, here called "computing contract", and the upstream management resource information involved in the calculation, including the user information with the allocation of these data, the network node configuration information involved in the calculation process of the allocation data, and the calculation normative approval information. According to the functional subdivision, data tables, data columns, and computing contracts (including private data tables, data columns, and private variables and private functions in private calculations) are all "computing information", which mainly defines the calculation content and objects, and user management, node management, and approval management are all "governance information", which mainly defines the configuration and rationality of the resources involved in the calculation. According to the final storage form, data information that is allowed to be made public, such as tables, columns, computing contracts, and governance information under the category, are ultimately stored in the form of directories on the blockchain, so this part becomes "on-chain storage information"; for data information that requires strict confidentiality, such as the specific data (private data) and calculation forms and parameters (private functions, private variables) involved in the calculation, they cannot exist on the chain. This type of data will ultimately be stored in a local private database, so this type of data is called "private storage information."
[0055] Step 103: Determine a data storage format based on the data type, where the data storage format includes an on-blockchain information data structure and a private information data structure.
[0056] Step 104: Determine a data storage method according to the data storage format.
[0057] The step 104 specifically includes: using the blockchain on-chain information data structure to store computing information, using the private information data structure to store computing information, and using the blockchain on-chain information data structure to store governance information.
[0058] Furthermore, the use of the blockchain information data structure to store the calculation information specifically includes:
[0059] Gets the properties of the calculation information.
[0060] According to the attributes, the storage is performed in a directory structure of category-data table-data column or category-computing contract.
[0061] The scope here usually refers to a coordinated task goal or overall name for participating in multi-party computing. For example, "digital identity" is a task scope. Under this scope, there are multiple participating departments and organizations, such as the Public Security Bureau, the Tax Bureau, the Social Security Bureau and other data holders. The data tables belong to these organizational departments under the scope, and the data columns belong to the relevant content in the corresponding information tables within these corresponding organizations, such as age, tax records, social security records and other information. This storage method avoids the problem of limited blockchain transaction storage capacity caused by directly storing data on the chain. At the same time, the data itself is stored in the internal servers of each data holder. Only the data directories representing the characteristic attributes of data information are stored on the blockchain, which ensures the privacy of data storage and greatly increases the blockchain's restrictions on the amount of stored data. Similarly, for the computing contracts proposed by the data holders participating in multi-party secure computing, data must also be stored in the directory format of storing computing contracts under the already created scope. The computing contract here is also a computing task, such as computing and evaluating Zhang San's credit record for that year.
[0062] Furthermore, the use of a private information data structure to store the calculation information specifically includes:
[0063] The calculation information is stored in a local database in a unified management manner.
[0064] For private data storage information, this type of data includes the original data participating in the multi-party computing organization and the specific forms of private variables and functions involved in the calculation, which are stored in a localized database for unified management.
[0065] Furthermore, the use of blockchain on-chain information to store governance information specifically includes:
[0066] The blockchain is used to store user management information, node management information and approval management information.
[0067] The massive data involved in multi-party computing not only involves the storage of its computing information, but also involves data governance issues such as reliability, storage efficiency and compliance of the multi-party data involved in the computing during the storage process. Therefore, for the reliability of storage during data storage, the present invention stores the identities of all users participating in multi-party computing and the user's permissions to operate the stored data as a type of data on the chain, effectively ensuring the reliability of each transaction in the process of blockchain data storage on the chain, and avoiding the problem of non-participating users or ordinary users in organizations without operating permissions impersonating administrators to illegally tamper with data directory information. Further, for the problem of execution efficiency during data storage, the present invention stores the scheduling information managed by the organizations participating in the computing on the chain as a type of data on the chain. These managements include the addition, deletion and transfer of nodes in the multi-party computing process of each organization, and the reasonable allocation and scheduling of computing nodes can effectively improve the efficiency of on-chain storage and improve the storage performance of blockchain for multi-party computing data. In addition, in order to address compliance issues during data storage, the present invention adds an approval control link to the process of storing proposals, and stores the data information of the approval preprocessing results and the final processing results as a type of data on the chain, so that each transaction record can be traced and the problems of impersonation and improper proposals can be effectively avoided, which greatly ensures the standardization and traceability of the data on-chain process.
[0068] From the above content, it can be seen that for multi-party computing data, the present invention effectively improves the storage capacity of the blockchain system to store massive data by proposing a storage method that is abstract from the data directory structure itself. At the same time, for the reliability, efficiency and standardization of storage during data storage, a divide-and-conquer method of user management, node management and approval management is proposed, and these data are classified as public data and stored in each node on the chain in a distributed manner. This decentralized storage ensures the privacy and security of each data.
[0069] The following describes the storage structure of a public data directory based on blockchain and the storage structure of a private data directory based on blockchain:
[0070] The storage structure of the public data directory based on blockchain:
[0071] Since not all data information held by each participant in a multi-party secure computation is public, different data holders have different data authority management standards. Therefore, data that can be made public and does not require high privacy are collectively referred to as public data. Blockchain is essentially a decentralized distributed database, and the storage of data directories is stored on the chain in the form of key-value pairs (key-value, kv). Further, according to the method described above, the present invention uses the hierarchical order of category (Catalog)-data table (Directory)-data column (Column) or category (Catalog)-computation contract (Compute) as the storage structure of the data directory, that is, the composite key (CompositeKey, cKey) in the kv key value is stored in the on-chain database, and the corresponding value (Value) content is the corresponding attribute contained in the directory.
[0072] Figure 2 The data storage structure of the present invention is combined with Figure 2 As shown, obviously, for the data storage structure of the category (Catalog), because there is only one independent level of category, the cKey type is the Catalog itself, and its specific storage format is Catalog.[CatalogName] as cKey. Here, Catalog is used as a prefix to indicate that this type of data belongs to the category type, and the suffix CatalogName represents the specific name of the category type data, which has a single reference. The value (Value) here is the various attributes contained in the category entity (CatalogEntity) type, such as Figure 2 The displayed category name (CatalogName), organization list (OrgNames), administrator name (AdminName), and super administrator name (SuperAdminName). It should be noted that the organization list here usually includes multiple data holding organizations involved in the calculation. For example, the digital identity category can include organizations such as the Public Security Bureau, Tax Bureau, Civil Affairs Bureau, and Social Security Bureau.
[0073] Similarly, for the data storage structure of the Compute contract, because there are two layers of dependencies between the category and the Compute contract, the cKey here should be Compute.[CatalogName].[ComputeName]. The prefix Compute here indicates that this type of data belongs to the Compute contract class, and the suffix indicates that the Compute contract of "ComputeName" is established under the category named "CatalogName". The value here is the various attributes contained in the ComputeEntity type, such as Figure 2The shown category name (CatalogName), computing contract name (ComputeName), contract version number (Version), contract content (Content), data source called by computing (DataName), computing initiator list (StarterNameNames), computing contract approver list (AuditorNames), computing contract participant list (Participants), computing contract programming language (Language), programming language version (LangVersion), computing virtual machine (VirtualMachine, VM), computing execution frequency control (Frequency). It should be noted that the computing contract content here contains the formal expression of the transactions to be processed by multi-party computing.
[0074] Similarly, for the data storage structure of the table (Directory), because there is a two-level dependency relationship between the category and the table, the cKey here should be Directory.[CatalogName].[DirectoryName]. The prefix Directory here indicates that this type of data belongs to the data table class, and the suffix indicates that the data table of "DirectoryName" is established under the category named "CatalogName". The corresponding value of cKey here is the various attributes contained in the table entity (DirectoryEntity) type, such as Figure 2 The category name (CatalogName), table name (DirectoryName), table organization (OrgName), table availability status (Status), and table data source (DataSource) are shown. It should be noted that the availability status of the table here refers to the five states of the table: normal (Normal), unavailable (Disable), error (Error), Abandon (disabled), and Maintain (maintenance). The data source of the table declares whether the table comes from a private database (SQL) or an external interface (API). Similarly, for the data storage structure of the column (Column), because there are three layers of dependency between the category, table, and column, the cKey here should be Column.[CatalogName].[DirectoryName].[ColumnName]. The prefix Column here indicates that this type of data belongs to the data column class, and the suffix indicates that the data column of this "ColumnName" is established in a table named "DirectoryName", and this table belongs to the category named "CatalogName". The value here is the various attributes contained in the column entity (ColumnEntity) type, such as Figure 2 The catalog name (CatalogName), table name (DirectoryName), column name (ColumnName), column administrator (AdminName), column attributes (Attributes), column data type (DataType), and column data source (DataSource) are shown. It should be noted that the column attributes here refer to the empty attribute (NULL), primary key (PrimaryKey), and unique key (Unique), while the column data source declares whether the column comes from the database or the external interface (API).
[0075] Similarly, the management of on-chain nodes participating in the multi-party data storage process is also very important data information, so it is stored on the chain as public data. Obviously, for the data storage structure of the node (Node), because it defines the organization to which the node belongs, the reasonable scheduling of the organizational nodes distributed on the blockchain network to participate in the process of multi-party data storage on the chain can further improve the efficiency of the blockchain's on-chain storage of massive data. Since this type of data does not involve information such as scope and computing contracts, the Ckey format of its storage directory is Node.[OrgName].[NodeName]. Here, Node is used as a prefix to indicate that this type of data is uniformly affiliated with the node type, the suffix OrgName indicates that the node belongs to the organization named "OrgName", and NodeName indicates the name of the node. The content of the corresponding Ckey value here is the node instance (NodeEntity), which contains a directional node communication link address (URL), according to which it can communicate with the corresponding network node, and then control the startup status of the node.
[0076] Similarly, user identity and operation permissions are also very important data information in the process of multi-party data storage on the chain, so they are stored on the chain as public data. Obviously, for the data storage structure of the user (User), because it defines the user's operation permissions on the original data and calculation contract on the chain, as well as the management of the user's identity, the scope and calculation are not involved here, so the Ckey format of its storage directory is User.[UserName].[OrgName]. Here, User is used as a prefix to indicate that this type of data uniformly belongs to the user type, and the suffix indicates that the user named "UserName" belongs to the organization named "OrgName". The corresponding Ckey value here is the various attributes contained in the user entity (UserEntity) type, such as Figure 2The displayed information includes the user name (UserName), the organization to which the user belongs (OrgName), whether the user has the permission to create a table (CreateDirectory), whether the user has the permission to create a calculation (CreateCompute), whether the user has the permission to approve the calculation contract (AuditCompute), whether the user has the permission to modify the table (ModifyCompute), whether the user has the permission to modify the calculation contract (ModifyCompute), and whether the user is an organization administrator (IsOrgAdmin).
[0077] Similarly, considering the rationality and standardization of storage operations related to the scope and computing contracts, the storage operations on the public data directory (also referred to as proposals here) must be approved, so the information on the approval method for the relevant data on the chain is also stored on the chain as public data. Obviously, for the data storage structure of the approval method (Permit), because its function is to approve the rationality of the proposal stored on the chain, the attribute characteristics that need to be recorded on the key are the data-oriented operation methods (addition, deletion, modification, and query) involved in the proposal, the index composite key of the data corresponding to the proposal, and the approval opinion of the approver, so the Ckey format of the storage directory of the approval method type data is Permit.[Method].[CompositeKey].[ModifyStatus]. Here, Permit is used as a prefix to indicate that this type of data is uniformly affiliated with the approval method type. The "Method" in the suffix refers to the operation method type of the proposal in the approval. Specifically, it refers to a type of operation of adding, deleting, modifying and checking the data objects involved in the proposal; "CompositeKey" refers to the index composite key of the storage data for the approval method. The composite key must contain the location information of the data storage. For example, the operation of adding to Catalog requires approval before the operation can be officially stored on the chain. In this case, the CompositeKey should be Catalog.[ID].[CatalogName]; "ModifyStatus" refers to the approver's approval opinion on the proposal. Correspondingly, the content of the corresponding CKey value here is the various attributes contained in the approval proposal entity (PermitEntity) type, such as Figure 2 The content of the approval proposal (Values) and the final status result (Status) of the approval proposal are shown.
[0078] Therefore, for public data, according to the storage method of the data directory, the data types of seven categories, such as scope, computing contract, table, column, node, user and approval method, are stored on the chain. This method of abstracting the data directory storage directly solves the problem of limited on-chain storage capacity in existing blockchain storage solutions, and realizes the storage management of massive raw data through operations on the data directory.
[0079] The storage structure of a private data directory based on blockchain:
[0080] Based on the previous definition of public data, similarly, in the process of storing multi-party secure computing data on the chain based on blockchain technology, there are data that the data holder has high requirements for data privacy and is not convenient for public disclosure. We collectively refer to it as private data. This type of data is core and critical to corporate organizations or individuals due to its own attributes, involving commercial secrets or personal privacy. Therefore, it is necessary to strictly protect its data security during the calculation process to avoid data exposure. Blockchain technology is a data distributed storage technology. Although it has the advantages of tamper-proof and traceability, for private data, the way of storing it on the chain is obviously no longer applicable to this scenario. The present invention proposes a method of local storage of private data to solve the storage of private data and private computing involved in the multi-party computing process. Furthermore, the present invention uses a method of establishing a relational database (PostgreSQL) locally to classify and store non-public data types for the storage of private data. Here, private data is stored in two categories according to the secondary attributes of the directory storage structure under the category.
[0081] The first category is data tables and data columns containing private data attributes, which are referred to as private tables and private columns in the present invention. Both private tables and private columns contain data privacy information that is inconvenient to be disclosed, such as the source of private table or private column data, the key-value mapping relationship within private table and private column data, and the composition information of private table and private column data sources. First, there are two types of data sources for private tables or private columns, namely the local database of the data holder and the data receiving and sending interface API of the data holder. Figure 3 The data storage structure 2 of the present invention is combined with Figure 3For the case where a local private database is used as a data source, the present invention proposes a data storage structure for a private database. The storage structure includes a primary key (ID) and a connection string (ConnecString) for the private database. The connection string for the private database has unique directivity, declares the key-related information for starting the private database, and has a high degree of privacy. Furthermore, for the case where a private table that determines the private database as a data source includes a primary key (ID), a foreign key (Database_ID) corresponding to the private database ID, and the name of the private database table; for the case where a private column that determines the private database as a data source includes a primary key (ID), a foreign key (Directory_ID) corresponding to the private table ID previously linked to the private database, and the name of the private database column (ColumnName). It should be emphasized that here the private database column is subordinate to the private database table, the foreign key of the private database column is mapped to the primary key of the private database table, and the foreign key of the private database table is mapped to the primary key of the private database. This series of mappings enables the data information of the private database table and the private database column to be logically coupled. Similarly, for the case where a private interface API is used as a data source, the present invention proposes a data storage structure for a private API table and a data storage structure for a private API column. Since the data of the API interface comes from the outside, for the private table whose data source is API, it includes the primary key (ID), API interface address (URL), interface method (Method), interface parameters (Parameters), and interface header information list (Header); for the private column whose data source is API, it includes the primary key (ID), the foreign key (Directory_API_ID) corresponding to the private table ID linked to the API interface, and the name of the private API column (ColumnName). It should be emphasized that the private API column here belongs to the private API table, the foreign key of the private API column is mapped to the primary key of the private API table, and the private API table is linked to the API interface through the URL address. This series of mappings enables the data information of the private API table and the API column to be logically coupled. Furthermore, for the attributes of the tables and columns in the public data directory on the chain, it can be found that they all contain the attribute of the data source, and this attribute plays a decisive role in the division of the storage structure of private tables and private columns in the private data directory. Therefore, the definition of the data storage format of the private data source has become a key technology to break through the barriers between private storage and public storage data.The present invention proposes a data source storage structure for a private table, including a category name (CatalogName), a table name (DirectoryName), a foreign key (DirectoryID) mapped to a private table ID, and a category (Kind) of the private table, where the category is whether the private table is derived from a private database or a private interface; similarly, the present invention proposes a data source storage structure for a private column, including a category name (CatalogName), a table name (DirectoryName), a column name (ColumnName), a foreign key (DirectoryID) mapped to a private column ID, and a category (Kind) of the private column, where the category is whether the private column is derived from a private database or a private interface. Through the definition of the data storage structure of the private data source, the information coupling of the public data part and the private data part of each data table and data column is realized, and the source traceability of each piece of data is guaranteed.
[0082] The second category is the storage of private variables and private function data information involved in the computing contract. Since many internal functions and variables are involved in multi-party secure computing, the specific forms and contents of these variables and functions are restricted from being exposed to the outside. Therefore, for the private variables called in the computing contract, the present invention proposes a data storage structure for private variables, which includes a category name (CatalogName), a computing contract name (ComputeName), a version number (Version), a variable identifier (IDentifier), and a variable value (Value); similarly, for the private functions called in the computing contract, the present invention provides a data storage structure for private functions, which includes a category name (CatalogName), a computing contract name (ComputeName), a version number (Version), a function identifier (IDentifier), a function category (Kind), and a function content (Value). It is worth noting that since the functions or variables called by it have content updates after each calculation update, in order to avoid data conflicts and calculation errors, the correct version number is a very important attribute for multi-party computing. The categories of private functions are divided into three categories: mathematical expressions (expression, EXPR), bytecode operation expressions (webassembly, WASM) and interface functions (API). Furthermore, the storage of private variables and private functions still follows the data storage directory structure format proposed in the public data part. For example, the primary key format of private variables in the local database PostgreSQL is PrivateVar.[CatalogName].[ComputeName].[Version], and the primary key format of private functions in the local database is PrivateFunc.[CatalogName].[ComputeName].[Version]. Therefore, by defining the storage structure of private computing data such as private variables and private functions, the execution efficiency of multi-party computing is greatly improved while ensuring the confidentiality of the data of the participants in the multi-party secure computing process.
[0083] Based on the above definitions of the two types of storage structures for private data, it is obvious that whether it is the storage of private tables or private columns, or the storage of private variables or private functions, they all follow the directory hierarchy structure and store private data in the local database in the format of category-table-column or category-computing contract. Therefore, the storage method of the private data directory not only ensures the security of private data, but also ensures the reliability of the source of each piece of data. The storage of private computing data facilitates the data interaction and transmission in the subsequent multi-party computing contract operation process, and improves the execution efficiency of the calculation.
[0084] The present invention has proposed a storage method for multi-party computing data in the foregoing content, and introduced the definition of the storage format after abstracting the original data into a directory structure from the perspective of public data and private data, further realizing the immobility of data and the mobility of information, breaking through the bottleneck of limited capacity when massive data is uploaded to the chain in traditional methods. Furthermore, in order to achieve efficient management of multi-party data, it is necessary not only to design the storage format of the data from the storage method, but also to design the interface for the corresponding functions of the data storage management in the operation method. The present invention designs interfaces for the functional requirements of data storage according to the directory structure from the two categories of public data and private data. These interfaces not only cover the method implementation of six categories of public data classes, such as scope, public data tables and data columns, computing contracts, user identities and operating permissions, computing nodes, and review and approval, but also cover the method implementation of three categories of private data classes, such as private tables and columns, private data sources, private variables, and private functions.
[0085] In conjunction with Table 1, it can be seen that the present invention has designed four interfaces for the category module, namely, adding a new category (AddCatalog), deleting a category that has been stored on the chain (DelCatalog), modifying a category that has been stored on the chain (ModCatalog), and finding the category that has been added on the chain (FindCatalog). It should be noted that the category here is usually a task with certain functionality that is jointly planned by multiple data owners, such as the digital identity mentioned above. This category category is usually rarely modified after being specified, and the relevant multi-party computing contracts and operations on the on-chain data tables and columns must be established under the category to perform subsequent storage. The specific implementation method of this type of interface is: First, according to the business needs of multi-party computing, a reasonable category object instance should be defined (here it is assumed that the category name is CatalogName), and the data structure of the category instance should be strictly in accordance with Figure 2 The data storage structure of the Catalog type is designed, and then the key (CKey) of the category object stored on the chain is initialized to CKey = Catalog.{CatalogName}, and the value (Value) of the category object is initialized to Value = {CatalogEntity}, where CatalogEntity contains Figure 2All the information such as CatalogName, OrgName, AdminName, SuperAdminName, etc. in the Catalog storage structure. Therefore, the process of storing a category object on the chain is actually to add a category object. Specifically, execute the operation instruction of AddCatalog(User, CatalogEntity) (where User is the user identity authentication token Token. All operations on the storage object on the blockchain must verify the user's identity before the interface call can be made. Therefore, this parameter must exist in the subsequent addition, deletion, modification and query interface methods on the chain). The corresponding chain code on the blockchain can be called through the interface. After approval by the organization, the category object can finally be stored on the chain in the Ckey-Value manner. Similarly, the interface of each Catalog category module must meet the settings of the interface parameters in Table 1, and the interface can be successfully called to realize the on-chain storage and management of category type data information.
[0086] Table 1 Catalog category module interface
[0087] AddCatalog(User,CatalogEntity) Adding a new category DelCatalog(User,CatalogName) Deleting an existing category ModCatalog(User,CatalogEntity) Modify an existing category FindCatalog(User,CatalogName) Find an existing category
[0088] Combined with Table 2, it can be seen that the present invention has designed 8 interfaces for the data table and column module, namely, adding a new table (AddDirectory), deleting a specified table (DelDirectory), modifying a specified table (ChangeDirectory), searching for the corresponding table under the category according to the name of the table (FindDirectory), adding a new column (AddColumn), deleting a specified column (DelColumn), modifying a specified column (ModColumn), and searching for columns in the specified category and the specified table according to the name of the column (FindColumn). The specific implementation method of this type of interface is: according to the characteristic attributes of the data objects of the multiple organizations involved in the category, the attribute characteristics of the data table and the data column are abstracted, and the corresponding attributes of the data table and the data column are searched according to the name of the column. Figure 2 The data structure of Directory type and Column type shown in the figure is used to instantiate the data table and data column. Specifically, the key of the data table that needs to be stored on the chain should be initialized to Ckey = Directory.{CatalogName}.{DirectoryName}, and the value of the data table should be initialized to Value = {DirectoryEntity}, where DirectoryEntity contains Figure 2The Directory storage structure contains all the information such as CatalogName, DirectoryName, OrgName, Status, DataSource, etc. Similarly, the key of the data column that needs to be stored on the chain should be initialized to Ckey = Directory.{CatalogName}.{DirectoryName}.{ColumnName}, and the value of the data column should be initialized to Value = {ColumnEntity}, where ColumnEntity contains Figure 2 The Column storage structure contains all the information such as CatalogName, DirectoryName, ColumnName, AdminName, Attributes, DataType, DataSource, etc. Therefore, the process of storing the two types of data objects, data tables and data columns, on the chain is actually equivalent to adding a table and adding a column. Specifically, through the operation instruction of AddDirectory(User, DirectoryEntity), the corresponding chain code on the blockchain side can be called through the interface. After approval by the organization, the on-chain storage of data table object information can be realized. Similarly, the interface of each Directory data table or data column module must meet the settings of the interface parameters in Table 2, and the interface can be successfully called to realize the on-chain storage and management of data information of the data table type.
[0089] Table 2 Directory list module interface
[0090]
[0091]
[0092] Combined with Table 3, it can be seen that the present invention has designed 4 interfaces for the computing contract module, namely, adding a new computing contract (AddCompute), deleting a specified computing contract (DelCompute), modifying a specified computing contract (ModCompute), and finding a specified computing contract (FindCompute). The specific implementation method of this type of interface is: according to the various computing tasks that need to be performed by multiple organizations under the scope, the information containing data objects in the computing tasks is abstracted, and stored on the chain in the form of a computing contract (Compute). This contract should include the organizations involved in the calculation, the variables and functions involved in the calculation, and the configuration requirements of the execution environment for the multi-party calculation, and in accordance with Figure 2The Compute type data structure shown in the figure is used to instantiate the computing contract. Specifically, the key of the computing contract that needs to be stored on the chain should be initialized to Ckey = Compute.{CatalogName}.{Version}, and the value of the data table should be initialized to Value = {ComputeEntity}, where ComputeEntity contains Figure 2 All the information such as CatalogName, DirectoryName, Version, Content, etc. in the Compute storage structure. Therefore, the process of storing data objects such as computing contracts on the chain is actually equivalent to adding a new computing contract. Specifically, through the operation instruction of AddCompute(User, ComputeEntity), the corresponding chain code on the blockchain side can be called through the interface. After approval by the organization, the information of the computing contract object type can be stored on the chain. Similarly, the interface of each Compute computing contract module must meet the settings of the interface parameters in Table 3, and the interface can be successfully called to realize the on-chain storage and management of the data information of the computing contract type.
[0093] Table 3 Compute computing contract module interface
[0094] AddCompute(User,ComputeEntity) Add a new computation contract DelCompute(User,ComputeName) Delete an existing computation contract FindCompute(User,ComputeName) Find an existing computation contract ModCompute(User,ComputeEnity) Modify an existing computation contract
[0095] As can be seen from Table 4, the present invention designs four interfaces for the user identity and permission management module, namely, adding a new user and its operation permission (AddUser), deleting a specified user and its operation permission (DelUser), modifying a user identity information or operation permission (ModUser), and querying the user identity and operation permission according to the user name (FindUserByName). The specific implementation methods of this type of interface are as follows:
[0096] According to all organizational managers involved in the multi-party computing task scope, the identity information of these personnel objects is abstracted and Figure 2 Specifically, the key for storing the user identity data on the chain should be initialized to Ckey = User.{UserName}.{OrgName}, and the value of the data table should be initialized to Value = {UserEntity}, where UserEntity contains Figure 2All information such as UserName, OrgName, CreateDirectory, CreateCompute, etc. in the User storage structure. Therefore, the process of storing data objects such as user identity on the chain is actually equivalent to adding a new user. Specifically, through the operation instruction of AddUser(User, UserEntity), the corresponding chain code on the blockchain side can be called through the interface. After approval by the organization, the information of the user identity object type can be stored on the chain. Similarly, the interface of each User user module must meet the settings of the interface parameters in Table 4, and the interface can be successfully called to realize the on-chain storage and management of the data information of the user identity type.
[0097] Table 4 User module interface
[0098] AddUser(User,UserEnity) Add a new user and its permissions DelUser(User,UserName) Delete an old user and its operation permissions ModUser(User,UserEnity) Modify a user and their operation permissions FindUser(User,UserName) Find a user and their permissions
[0099] As can be seen from Table 5, the present invention designs four interfaces for the computing node management module, namely, adding a new computing node (RegisterNode), deleting a specified node (LogoutNode), modifying a specified node in an organization (ModifyNode), and searching for all nodes in an organization (FindNodeByOrg).
[0100] According to the needs of multi-party computing tasks, the network nodes are reasonably scheduled, the attribute characteristics of the network nodes participating in multi-party computing are abstracted, and the Figure 2 The Node type data structure shown in the figure is used to instantiate the node type data. Specifically, the key of the node object that needs to be stored on the chain should be initialized to Ckey = Node.{OrgName}.{NodeName}, and the value of the node object should be initialized to Value = {NodeEntity}, where NodeEntity contains Figure 2 All information such as OrgName, NodeName, URL, etc. in the Node storage structure. Therefore, the process of storing data objects such as computing nodes on the chain is actually equivalent to adding a new computing node. Specifically, through the operation instruction of RegisterNode(User, NodeEntity), the corresponding chain code on the blockchain side can be called through the interface. After approval by the organization, the information of the node object type can be stored on the chain. Similarly, the interface of each Node user module must meet the settings of the interface parameters in Table 5, and the interface can be successfully called to realize the on-chain storage and management of the data information of the node type.
[0101] Table 5 Discovery node module interface
[0102] RegisterNode(User,NodeEnity) Add a new node LogoutNode(User,NodeName) Remove a node ModifyNode(User,NodeEntity) Modify the link information of a node FindNodeByOrg(User,OrgName) Find nodes contained in a specified organization
[0103] Combined with Table 6, it can be seen that the present invention designs two interfaces for the approval management module, namely, adding a new approval proposal (PermitApply) and clearing all cached approval results (CleanLedgerWithUser). Considering the compliance of the on-chain storage operation of data objects involved in multi-party computing, it must be strictly executed according to the approval process and each organization involved in the calculation must meet the approval requirements before formal storage on the chain can be realized. Therefore, the attribute characteristics of the parameter objects involved in the approval process are abstracted here and Figure 2 The data structure of the Permit type shown in the figure is used to instantiate the approval method type data. Specifically, the key of the approval method object that needs to be stored on the chain should be initialized to Ckey = Permit.{Method}.{CompositeKey}.{ModifyStatus}, and the value of the approval method object should be initialized to Value = {PermitEntity}, where PermitEntity contains Figure 2 Permit stores all the information such as Method, CompositeKey, ModifyStatus, etc. in the structure. Therefore, the process of storing data objects such as approval methods on the chain is actually equivalent to adding a new approval proposal, which can be understood as the organizer involved in the calculation. For the proposal approved by the previous various data types on the chain, specifically, through the operation instruction of PermitApply(User, PermitEntity), the corresponding chain code on the blockchain end can be called through the interface. After the proposal is approved by the multi-party computing organization, the formal chain storage of the previous various types of data information can be realized. Similarly, the interface of each Permit user module must meet the settings of the interface parameters in Table 6, and the interface can be successfully called to realize the chain storage and clearing of the previous various types of data information.
[0104] Table 6 Permit module interface
[0105] PermitApply(User,PermitEntity) Add an approval proposal CleanLedgerWithUser(User) Clear all cached approval results
[0106] In combination with Table 7, it can be seen that the present invention has designed 13 interfaces for the private data directory module, namely, adding a link to a new private database (PutDBConnect), adding a private database table (PutDBDirectory), deleting a private database table (DelDBDirectory), modifying a private database table (ModDBDirectory), searching for a private database table (FindDBDirectory), adding a private database column (PutDBColumn), deleting a private database column (DelDBColumn), modifying a private database column (ModDBColumn), searching for a private database column (FindDBColumn), adding a private API table (PutAPIDirectory), deleting a private API table (DelAPIDirectory), modifying a private API table (ModAPIDirectory), searching for all private API tables (FindAllAPIDirectory), adding a private API column (PutAPIColumn), deleting a private API column (DelAPIColumn), modifying a private API column (ModAPIColumn), and searching for all private API columns (FindAllAPIColumn).
[0107] The specific implementation of this type of interface is as follows: Since the data objects participating in multi-party computing can be divided into data objects stored on the chain and private data objects stored locally according to the privacy level, the original data of each participant is not allowed to be directly stored on the chain. The local storage method for this type of data needs to be in accordance with Figure 3The data structures of the private database, private data table, private data column, private API table, and private API column shown in the example are designed. Specifically, the private data that needs to be stored locally is usually stored in the form of a data table or a data column. First, a link to a local private database needs to be created. The creation of the private database is implemented by calling PutDBConnect (ID, ConnectString), where ID is the ID of the private database DB (Database), and ConnectString is the startup key of the private database. Then, the data table information to be stored is stored in the parameter format of the private table ID, the private database ID, and the private table name, and the corresponding private data table can be stored in the private database established previously by executing the operation instruction of PutDBDirector (ID, DataBaseID, DirectoryName). The private data column is similar to it. It should be noted that the private API interface corresponds to the data accessed from the outside world. Therefore, for the storage of the private API table or private API column data information, the link address URL of the external API interface, the method Method requested by the interface, the parameter information requested by the interface, and the header information Header of the interface need to be initialized in sequence in the operation instruction to realize the storage operation of the API type data table and data column. Therefore, the interface of each private data directory module must meet the corresponding parameter settings in Table 7, and the corresponding interface can be successfully called to realize the storage and management of data objects such as private databases, private data tables, private data columns, private API tables, and private API columns.
[0108] Table 7 Private data directory module interface
[0109] PutDBConnect(ID,ConnectString) Add a link to a new private database PutDBDirectory(ID,DataBaseID,DirectoryName) Add a table belonging to a private database DelDBDirectory(DirectoryID) Delete a table belonging to a private database ModDBDirectory(DirectoryID,DirectoryName) Modify a table belonging to a private database FindDBDirectory(DirectoryID) Find a table belonging to a private database PutDBColumn(ID,DirectoryID,ColumnName) Add a column belonging to a private database DelDBColumn(ColumnnID) Delete a column belonging to a private database ModDBColumn(ColumnID,ColumnName) Modify a column belonging to a private database FindDBColumn(ColumnID) Find a column belonging to a private database PutAPIDirectory(ID,URL,Method,Paras,Header) Add a table belonging to the private API DelAPIDirectory(APIDirectoryID) Delete a table belonging to a private API ModAPIDirectory(APIDirectoryID,Paras) Modify a table belonging to a private API FindAllAPIDirectory(APIID) Find all tables belonging to private API PutAPIColumn(ID,APIDirectoryID,ColumnName) Add a column belonging to the private API DelAPIColumn(APIColumnID) Delete a column belonging to a private API ModAPIColumn(APIColumnID,ColumnName) Modify a column belonging to a private API FindAllAPIColumn(APIDirectoryID) Find all columns belonging to private API
[0110] As can be seen from Table 8, the present invention designs 8 interfaces for the private data source module, namely, adding a data source of a private table (AddDirectoryDataSource), deleting a data source of a private table (DelDirectoryDataSource), modifying the data source of a private table according to the table ID (ChangeDirectoryDataSource), finding the data source of a private table according to the table ID (FindDirectoryDataSourceByID), adding a data source of a private column (AddColumnDataSource), deleting a data source of a private column (DelColumnDataSource), modifying the data source of a private column (ChangeColumnDataSource), and finding the data source of a private column according to the column ID (FindColumnDataSourceByID).
[0111] The specific implementation of this type of interface is as follows: Considering that the local private data of each organization participating in multi-party computing comes from its own private database and the data obtained by the organization's external interface API, the source of the data table or data column must be clearly stated in the storage of private data, that is, the DataSource information declared in Table 8. This type of information will also be stored as private data in the local private database. The specific local storage method needs to be specified according to Figure 3 The data structure of the data source of the private data table and the data source of the private data column shown in the example is designed. The chain stores the abstracted attribute directory information representing the data characteristics of each organizer, and the value of the data itself is stored in the local database. Among them, these data can be divided into data (tables, columns) of the private database or data (tables, columns) obtained from the private API according to the source. Specifically, the private data source objects that need to be stored locally are stored in two categories: private table data source and private column data source. The storage of private data sources requires the existence of such data tables or data columns first, whether they are from the local private database or passed in by an external API. Therefore, for the data tables existing in the private database, by executing AddDirectoryDataSource(CatalogName, DirectoryName, DirectoryID, Kind), where the parameters correspond to the category name, table name, table ID, and table source type (local private data or API external data) corresponding to the data table, the data source information of the private data table can be stored. Similarly, the data source information of private data tables, private API tables and private API columns can be stored locally in the above manner under the parameter format setting of Table 8.
[0112] Table 8 Private data source module interface
[0113]
[0114] As can be seen from Table 9, the present invention designs 8 interfaces for the private computing module, namely, adding a private variable (PutPrivateData), deleting a private variable (DelPrivateData), modifying a private variable (ModPrivateData), finding a private variable (FindPrivateData), adding a private function (AddPrivateFunc), modifying a private function (ModPrivateFunc), finding a private function (FindPrivateFunc), and deleting a private function (DelPrivateFunc).
[0115] The specific implementation of this type of interface is as follows: Considering that the multi-party computing data object not only contains the original data of each organization participating in the calculation, but also contains the specific function form involved in the calculation contract (the algorithm implementation of the function) and some variable parameter information involved in the calculation. Therefore, for private variables and private functions, which belong to the local storage method of calculation information, it is necessary to follow Figure 3 Specifically, for private variable type data, after the corresponding data structure is instantiated with the category name to which the private variable belongs, the computing contract name to which the private variable belongs, the version number of the computing contract, the name of the private variable, the private variable and other parameter information, the local storage of the private variable data type can be realized by executing PutPrivateData(CatalogName, ComputeName, Version, Identifier, Value). Similarly, the above method is also adopted for private functions. Under the condition of meeting the specification of the parameter format in Table 9, the local storage of private function data can be realized.
[0116] Table 9 Private calculation variables and function module interfaces
[0117]
[0118]
[0119] Through the above-mentioned 65 interfaces, classified governance of multi-party data is realized, and the unification of the storage method from on-chain public data to local database private data is truly realized. Whether it is the addition, deletion, modification and query of on-chain data directories or computing contracts, or the addition, deletion, modification and query of private data and private computing-related content stored in local databases, it greatly enriches the data holders' governance and protection of data, and also facilitates data users to accurately locate and trace data, which has certain practical significance in the security and standardization of data storage.
[0120] Compared with the prior art, this embodiment 1 has the following advantages:
[0121] 1. The present invention proposes a method for abstracting the data's own attributes from massive data, and storing the data's publicly available feature information on the blockchain according to a directory structure.
[0122] 2. For data with different privacy and security requirements, the present invention divides the storage into two types: public data storage structure and private data storage structure.
[0123] 3. The present invention manages the computing nodes involved in multi-party computing data to achieve reasonable resource scheduling. At the same time, the management of user identity and operation permissions ensures the reliability of all operations. These management data information are stored on the blockchain.
[0124] Embodiment 2:
[0125] This embodiment adds a proposal approval function to the basic function of traditional blockchain data on-chain, classifies and approves various types of data objects, and adds an internal control ID method to the approval process of multiple organizations to facilitate query and review. Different from Example 1, the storage method of decentralized multi-party computing data provided in this embodiment can also include the following:
[0126] Step 105: Acquire the approval process from the storage method and store the approval process.
[0127] The storage of multi-party computing data based on blockchain must not only consider the problem of massive data storage capacity, but also the standardization, reliability, and efficiency of requests during the process of uploading the data directory to the chain. Because once there is an operation on the chain directory by impersonating the identity of an internal user of the organization, it will bring great risks of privacy leakage and data pollution to the entire system; at the same time, if the operation proposals submitted by users within the organization do not meet the requirements are rashly uploaded to the chain, it will also cause the risk of data pollution. Therefore, based on the structural characteristics of the on-chain data directory mentioned above, the operation process of the data storage directory is divided into two types of management.
[0128] In the first category, the approval process may include:
[0129] Step 10511: Submit to the blockchain server a request for the identity and authority of the user on the chain or an operation request for the computing node.
[0130] Step 10512: The blockchain server node calls the user identity authentication chain code to verify the identity of the initiator of the operation request and obtains the first verification result.
[0131] Step 10513: If the first verification result is passed, the blockchain server calls the user authority query chain code to verify the authority of the initiator of the operation request and obtains the second verification result.
[0132] Step 10514: If the first verification result is passed, the operation request is officially uploaded to the chain.
[0133] Steps 10511-10514 are for the approval process of the data directory of the user identity and operation authority on the chain and the data directory of the computing node on the chain, which are irrelevant to the attributes of the original data itself but are related to the management of the multi-party computing data. The present invention proposes an approval process based on blockchain identity authentication. Specifically, first, the user submits to the blockchain server through the client webpage or APP interface to send an operation request for the user identity and authority on the chain or the computing node. These requests can be the addition, deletion, modification and query of such data directories. After receiving the operation request from the client, the blockchain server node calls the identity authentication chain code to verify the identity of the initiator of the operation request, that is, to confirm whether the initiator of this request is a member of the organization. If the verification is an error, it means that there is a problem with the identity of the initiator, and the verification failure result is returned; if the verification is passed, the next step is entered. Continue to call the user authority query chain code to confirm whether the initiator of the request has the corresponding data operation authority. If the operation authority is verified incorrectly, an error is returned, the operation request fails, and the initiator's authority is insufficient; if the operation authority is verified correctly, the proposal is broadcast, approved, and the data directory is updated and stored in the account book after the operation of the user or node is completed. This method is applicable to operations on user or node data directories. This is because there is an attribute option for the organization to which user information or computing node information belongs, and each user or user node has the property of belonging to only one organization. Therefore, you only need to ensure that the person is a member of the corresponding organization to confirm the identity and proceed to the next step of reviewing the operation permissions.
[0134] In the second category, the approval process may include:
[0135] Step 10521: Submit an operation request for the on-chain directory or computing contract to the blockchain server.
[0136] Step 10522: The blockchain server node calls the blockchain server API interface to call the smart contract, verifies the identity of the initiator of the operation request, and obtains the first verification result.
[0137] Step 10523: If the first verification result is passed, the smart contract is called again to pre-process and cache the operation request on the chain to obtain the internal control ID code and the pre-processed operation request.
[0138] Step 10524: Distribute the pre-processed request to each organization member involved in the operation.
[0139] Step 10525: After each of the organization members calls the internal control ID to view the content of the pre-processed operation request, the current approval result in the pre-processing cache is obtained.
[0140] Step 10526: Each organization member invokes the smart contract based on the organization's internal approval opinions and submits an approval operation request containing their own approval opinions;
[0141] Step 10527: The system synchronously modifies the opinions of each approver contained in the on-chain pre-processing cache according to the approval operation request, and further determines whether each of the organization members meets the approval opinions and unanimously agrees to pass the operation request;
[0142] Step 10528: If all members of the organization approve the operation request once, the operation request will be formally uploaded to the chain.
[0143] Step 10529: If none of the organization members approves the operation request once, the operation request fails, and the system continues to wait for each organizer to submit an approval operation request and verify the final approval result.
[0144] Steps 10521-10529 are related to the original attributes of the data itself, and the operation approval process of the on-chain storage directory or computing contract. Different from the previous category, both the category and the computing contract are jointly owned by multiple organizations. For example, the data required for the computing contract may come from tables or columns under multiple organizations, and the category itself has the meaning of being jointly constructed and completed by multiple organizations. Therefore, a single identity authentication cannot guarantee the rationality of the approval. In order to solve this problem, the present invention proposes a multi-party approval method for the on-chain directory or computing contract. Specifically, first, the user can enter the operation request for the category or computing contract through the client or APP interface, such as adding a new category or finding a computing contract with a specified name and version. Then, the smart contract is called by calling the blockchain server API interface to verify the identity of the initiator and whether it is an internal member of the organization. If not, the operation request is rejected, the operation fails, and the failure result is returned; if the verification is successful, the smart contract is further called to implement the preprocessing of the operation request. The preprocessing here means that the operation request is cached on the chain in advance, and the composite key with the preprocessing signal and the operation value are stored on the blockchain in the form of cKey-Value. However, this is not a formal storage, but a pre-storage. Only after the request is formally approved can it be formally stored on the chain according to the standard Key-Value. Further, when the above preprocessing is completed, an internal control ID code after the data HASH of the request content and the time of request initiation will be returned, and the request will be distributed to the members of each organization involved in the operation. Further, when all members of the organization call the internal control ID to check the request content, the approval result will be given. Only when all the reviewers pass it once can the execution of the operation request be formally approved. Otherwise, as long as one person does not approve it, the operation request will fail. It should be noted here that, unlike the first type of approval process, the second type of operation objects (such as categories or computing contracts) have directory attributes belonging to multiple organizations, so it is inevitable that multiple parties need to jointly approve it; on the other hand, the internal control ID is mainly proposed to solve the query and sorting of proposals in the approval process, and prevent data reading and writing conflicts caused by multiple proposals at the same time.
[0145] Through the above two types of approval processes, the problem of proposal standardization in traditional blockchain multi-party data processing requests is effectively solved, and the addition of internal control links ensures that the approval organization can quickly trace back to previous proposals and effectively prevent data read and write conflicts caused by a large number of proposals. This not only effectively improves the standardization of blockchain governance of multi-party computing data in the reform, but also ensures that every operation on the chain is traceable and worth guaranteeing.
[0146] Embodiment 3:
[0147] Based on the above content, a decentralized multi-party computing data storage method is proposed. Figure 4 As shown, the present invention also provides a storage system for decentralized multi-party computing data, which includes a GRPC interface module 1, a data storage central control module 2, a blockchain public data storage module 3 and a local PostgreDB private data storage module 4, wherein the interface module 1 is connected to the data storage central control module 2, and the data storage central control module 2 is respectively connected to the blockchain public data storage module 3 and the local PostgreDB private data storage module 4. The GRPC interface module 1 is a GRPC (Google Remote Procedure Call) interface module exposed to the outside by the storage layer.
[0148] First, in the GRPC interface module 1 of the storage layer, the system provides a series of interfaces for the outside world. These interfaces operate on the data directory (including data attribute information that can be publicly uploaded to the chain and highly private original private data information) according to five different functional types, the user identity and authority operations of multi-party computing, the operation of the approval process of the on-chain data proposal, the operation of the on-chain network node operations participating in multi-party computing and storage functions, and the operation of the computing contract objects involved in the scope of multi-party computing (including not only the computing content information but also the private functions and private variable data information involved in the computing). The interface implementation methods of these operations can basically cover the functions of adding, deleting, modifying and checking the on-chain storage and local storage of all organizational data participating in multi-party computing. For external users facing the storage module, whether it is the data organization manager or the client user, they can send relevant operation requests to the data storage central control module by calling the storage layer GRPC interface, and the parameters of the request are required to be passed strictly in accordance with the interface declaration.
[0149] Secondly, the data storage central control module 2 includes three sub-layers, namely the control layer (Controller), the service layer (Service), and the model layer (Model). The control layer is responsible for receiving and parsing the request signal transmitted by the external interface. In addition, the response to the storage-related operations fed back to the client is also processed in this layer, which mainly plays the role of communicating with the front end, parsing the client request and passing the parameters to the service layer. The service layer here is mainly responsible for the specific implementation of each interface function. The specific implementation is written in the Golang language. The corresponding methods are encapsulated and passed to the model layer through the request parameter information received from the control layer. The model layer is a collection of storage methods for various types of data objects. After retrieving and matching the corresponding object type, the corresponding operation method is used to serialize the object to be stored into JSON, preparing for the on-chain storage of data. Specifically, after the client participating in multi-party computing makes various storage-related operation requests for data objects through this system, it passes the request to the control layer through the interface exposed to the outside in GRPC. The control layer then calls the various interface methods for adding, deleting, modifying and checking the data directory that have been implemented in the corresponding service layer, and combines the corresponding storage methods of the model layer to further pass the storage object to the blockchain end to call the corresponding chain code to realize the on-chain storage of data or pass it to the local database to call SQL instructions to realize the storage of private data. This part of the operation examples corresponds to the implementation of each data type interface in the aforementioned content.
[0150] Here is a specific implementation example:
[0151] For example, there are three organizations, A, B, and C. These three organizations have a lot of private data of their own. Some data can be made public, but some cannot. These three organizations jointly establish a category called digital identity. Under the category of digital identity, many operations can be performed. We call these operations computing contracts.
[0152] If a client now sends a request to query the credit rating information of a certain user X-Person, then before this operation, it is necessary to establish the storage of this multi-party computing data information.
[0153] 1. First, the digital identity is stored on the chain as a category catalog in the form of a data structure. Because the category of this digital identity is information that can be made public, the specific chaining method uses the AddCatalog interface of the catalog type data and assigns relevant parameters. According to sending the AddCatalog (parameter information) request, the client request is received through the GRPC interface, and it is passed to the storage layer central control module. Through hierarchical parsing and transmission, the Catalog object to be stored is encapsulated. The final form of the encapsulation is the ckey-value form. The specific ckey and value correspond to the data structure in Example 1;
[0154] 2. Since Catalog data information is public and can be uploaded to the chain, there is a corresponding Catalog chain code on the blockchain. Through various ready-made integrated packages of the blockchain, Catalog is stored on the chain in the form of key-value. Of course, this chain-up process needs to first verify whether the identity of the client initiating the request is legal and compliant, and then it can be officially stored on the chain after approval and review by the administrators of the three organizations ABC.
[0155] 3. Similarly, the scope should include computing tasks, that is, computing contracts. For example, the credit assessment here can be used as a computing contract. Then, the Compute storage can also be put on the chain using a storage process similar to the previous Catalog.
[0156] 4. Similarly, for data tables and data columns, specifically within each organization, each data item of each person in the table is not directly stored on the chain. What is stored on the chain is the attribute information contained in these tables, such as the information in each column, including user name, debt, gender, and the like, as well as the name of the table, the usage status of the table, etc. After this information is abstracted, it can be stored on the chain in a similar way to the above.
[0157] 5. Correspondingly, under the scope of this digital identity, each organization should have corresponding administrators who can manage this data or be responsible for approval. The identities of these people, that is, User type data, need to be uploaded to the chain, as described above.
[0158] 6. The realization of computing tasks under the scope of digital identity requires the allocation of network nodes to participate in the calculation. Therefore, the above method can also be used to store node type data on the chain.
[0159] 7. In addition to the above-mentioned data types that can be made public, those that cannot be made public, such as each specific data item in the tables of the above three organizations, are private data and exist in the local database in the form of private tables and private columns. The specific storage method is that, first of all, it is necessary to define the data structure of the private tables or private columns of the private data part according to the aforementioned content, design the various parameter indicators of the tables and columns to be stored, and then call the various types of interfaces about private tables in the aforementioned content, such as PutDBDirectory (parameters) to add a private data table. The specific operation process is also to call the interface for directory resources set on the GRPC end, and then parse the request through the central control module and finally enter the local private database to realize local storage of data tables or columns within each organization. These tables exist within each organization according to their respective affiliations;
[0160] 8. Similarly, for a computing contract, such as calculating a customer's credit rating, this computing task actually corresponds to the fact that each organization should first query the person's information based on their own internal private data tables, and then conduct a credit score assessment within each organization, and then summarize it through a multi-party calculation specific algorithm. The specific calculation does not belong to the storage content, so it will not be introduced in detail. However, for each organization to calculate its own credit rating, there is a credit score evaluation function corresponding to each organization. This function will also involve some variables that are unique to the calculation method of each organization. Therefore, for these private functions and private variables that cannot be made public and exist within each organization, the data storage of the localized private database is realized in a similar way to step 7.
[0161] 9. Since these private data belong to their respective organizations, the storage of private data does not require approval. After calling this storage system interface, they can enter their respective internal localized private databases and store them by themselves. Only the public storage data types on the chain need to be reviewed;
[0162] After completing the initial data storage of the above "digital identity" category, the request for this credit rating assessment is made. Because this credit rating assessment involves the process of multi-party computing, we will not discuss it too much here, but this calculation involves what kind of computing contract to adopt (the corresponding credit rating assessment contract here), which organizations' tables are needed, and which private variables and private functions are needed. All of these can be queried on the chain through the system's interface. As for how to call these data for coordinated calculation after the query, it is the function of the multi-party computing kernel computing center module, which will not be introduced for the time being.
[0163] Furthermore, for the storage of multi-party data object information that is allowed to be disclosed, the storage object and operation request should be passed to the blockchain network module, i.e., the blockchain public data storage module 3, through the storage control layer. After receiving this serialized request containing the storage data object information, the blockchain network will first call the chain code corresponding to the data object, perform user identity authentication and operation approval according to the data type with storage. It should be emphasized here that the blockchain module contains smart contract chain codes corresponding to five types of data types, including operations on directory resources (including categories, data tables, and data columns) that need to be stored on the chain, operations on computing contract type objects, operations on users and their permissions, operations on on-chain nodes, and operations on approval processes. Therefore, for client requests that have passed the on-chain identity authentication, their contents are obtained through parsing by the smart contract on the blockchain, and then the approval process method is determined based on whether the object of the operation is an operation on a directory resource or computing contract or an operation on a on-chain node or user identity. If it is a data type such as directory resources or computing contracts, the object requested to be stored on the chain is temporarily stored in the blockchain cache through preprocessing (but not officially on the chain). Specifically, it is mainly in the form of a composite key-value pair cKey-Value, with the method of calling the GRPC interface (addition, deletion or modification) and the type of the operation target (category, data table, data column, computing contract, etc.) as the composite key CKey, and the content of the data object to be stored is stored as the value Value in the virtual cache on the chain. After waiting for the approval results to be fully passed, the data information to be stored will be further transferred from the cache to the on-chain storage area; if it is a data type such as node or user identity storage, no preprocessing is required. After the on-chain client identity authentication is correct, the operation authority is directly verified. If it is satisfied, the operation request is executed and the transaction is on the chain. Otherwise, the authority is insufficient and the request is reported. After implementing various operations on the chain, the blockchain module will transmit the final stored result information to the client through JSON deserialization through the central control module.
[0164] Finally, for the operation and processing of private data information, similarly, the storage layer calls the GRPC interface to send a request to the storage control layer. However, it is worth noting that the interface called here is no longer a public interface, but a private interface developed for private data types, and at this time the central control module no longer calls the blockchain module chain code, but directly uses SQL operation instructions to implement the storage of private data objects in the local private database or API end, that is, the local PostgreDB private data storage module 4. Specifically, after the control layer of the central control module parses the operation request of private data, it calls the interface of the private data corresponding to the service layer and the storage method of the private data type corresponding to the model layer, and encapsulates the data object operation request and the object to be stored through JSON serialization, and passes it to the local private data storage module. Through SQL operation instructions, operations on the local private database PostgreSQL can be implemented, including the addition, deletion, modification and query of private database tables and private database columns, the addition, deletion, modification and query of private data sources, and the addition, deletion, modification and query of private variables and private functions involved in private calculations. After the data storage of these private data is realized in the local database, the processing results of each request will also be fed back to the client through the control layer.
[0165] From a systemic perspective, the decentralized multi-party computing data storage system based on blockchain technology functionally realizes the decentralized management of massive data; it also divides and conquers the two data types of public data and private data, using a data directory structure to store public data and a localized database to store private data; it also integrates the functional modules of resource scheduling of computing nodes on the chain and the management of user identity and operation permissions; finally, by combining the internal control ID method in the approval process, it realizes the standardized approval of public data operations and the function of transaction location and traceability. From the perspective of research and development prospects, under the premise of ensuring the reliability, standardization and efficiency of data storage, this system not only solves the current blockchain technology's memory limitation problem for massive data storage, but also solves the problem of data division for different privacy requirements, and has a certain market value.
[0166] In the storage system of the present invention, the blockchain module can be replaced by other alliance chains and public chains. In the present invention, blockchain is used to express it uniformly without specific reference. In the storage system of the present invention, the private database PostgreSQL module can be replaced by other relational databases.
[0167] The following is an explanation of the professional terms involved in the present invention:
[0168] Blockchain: Blockchain is a decentralized distributed ledger implemented by cryptographic methods. Using this technology, persistent storage of states other than computing can be achieved among multiple participants in the computing process, that is, saving the definition of the computing program itself and the data source.
[0169] Decentralized multi-party computing: refers to multiple participants holding their own private data, jointly executing a data computing logic and obtaining processing results, so as to achieve a specific effect by jointly using the private data of all parties while ensuring the security of the private data of all parties, thereby giving full play to the value of the data.
[0170] Distributed storage system: There are peer nodes distributed in the blockchain network, and each node stores the ledger information separately. The storage of ledger data and the forwarding of messages are completed through these nodes scattered in the network. Therefore, the data in the blockchain is stored in a distributed manner in the network, forming a distributed storage system.
[0171] Compared with the prior art, the present invention has the following advantages:
[0172] 1. The purpose of the present invention is to propose a method for abstracting data structures from multi-party data and storing them according to data directories, rather than directly storing the data on the chain, so as to solve the problem that the existing blockchain data is directly stored in limited memory space and cannot be modified.
[0173] 2. The present invention divides multi-party data into two categories: public data and private data according to the data privacy level of each data holder. For public data, the data class that can be made public by multi-party computing participants is abstracted from its attributes and stored on the blockchain according to the directory structure. For private data, it is classified into categories such as private data, private variables, and private functions, and stored in the SQL database according to the privacy requirements of each computing participant organization for data ownership.
[0174] 3. The present invention manages the user identities and the user's data operation rights among multiple data participants, solving the problem of identity authentication of the operator. At the same time, the design of the scheduling module of the computing node solves the problem of reasonable allocation of computing resources.
[0175] 4. Aiming at the problems of fake identity proposals and unreasonable requests in the process of multi-party data storage and chain-uploading, the present invention adds a process approval function to further standardize the requirements for the rationality of proposals in the multi-party computing process.
[0176] 5. Aiming at the problems of concurrent conflicts and request confusion among a large number of requests in the same time period during multi-party data calculation, the present invention proposes an internal control ID management method to effectively solve the problem of request confusion, while ensuring the queryability and traceability of each transaction, further improving the efficiency of multi-party data approval.
[0177] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0178] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for storing decentralized multi-party computing data, characterized in that: include: Get data; Classifying data types, wherein the data types include computing information and governance information; The computing information includes data tables, data columns, computing contracts, private data tables, private data columns, private variables and private functions; the governance information includes user management information, node management information and approval management information; Determine a data storage format according to the data type, wherein the data storage format includes an on-blockchain information data structure and a private information data structure; Determining a data storage method according to the data storage format; Determining the data storage method according to the data storage format includes: Using blockchain on-chain information data structures to store computing information, using private information data structures to store computing information, and using blockchain on-chain information data structures to store governance information, specifically including: obtaining the attributes of the computing information; storing the information on the blockchain in a directory structure of category-data table-data column or category-computing contract according to the attributes, and storing private data tables, private data columns, private variables, and private functions in a local private database; using blockchain on-chain information data structures to store user management information, node management information, and approval management information; For the data storage structure of the category, the specific storage format of the category is Catalog.[CatalogName] as the key, Catalog as the prefix indicates that this type of data is uniformly affiliated with the category type, and the suffix CatalogName represents the specific name of the category type data, which has a single reference; the value content is the various attributes contained in the category entity type: category name, organization list, administrator name, super administrator name; For the data storage structure of the computing contract, the specific storage format of the computing contract is Compute.[CatalogName].[ComputeName] as the key, the prefix Compute indicates that this type of data belongs to the computing contract class, and the suffix "ComputeName" indicates that the computing contract is established under the category named "CatalogName"; the value content is the various attributes contained in the computing contract entity type: category name, computing contract name, contract version number, contract content, data source of computing call, computing initiator list, computing contract approver list, computing contract participant list, computing contract programming language, programming language version, computing virtual machine used, and computing execution frequency control; For the data storage structure of the table, the specific storage format of the table is Directory.[CatalogName].[DirectoryName] as the key, the prefix Directory indicates that this type of data belongs to the data table class, and the suffix "DirectoryName" indicates that the data table is established under the category named "CatalogNam"; the value content is the various attributes contained in the table entity type: category name, table name, table affiliated organization, table available status, table data source; For the data storage structure of the column, the specific storage format of the column is Column.[CatalogName].[DirectoryName].[ColumnName] as the key. The prefix Column indicates that this type of data belongs to the data column class, and the suffix indicates that the data column of "ColumnName" is established in the table named "DirectoryName", and this table belongs to the category named "CatalogName". The value content is the various attributes contained in the column entity type: category name, table name, column name, column administrator, column attribute, column data type, column data source; For the data storage structure of the node, the specific storage format of the node management information is Node.[OrgName].[NodeName] as the key. Node as the prefix indicates that this type of data belongs to the node type. The suffix OrgName indicates that the node belongs to the organization named "OrgName". NodeName indicates the name of the node. The value content is the node instance, which contains the directional node communication link address. For the user's data storage structure, the specific storage format of user management information is User.[UserName].[OrgName] as the key. User as the prefix indicates that this type of data belongs to the user type, and the suffix indicates that the user named "UserName" belongs to the organization named "OrgName". The value content is the various attributes contained in the user entity type: user name, organization to which the user belongs, whether the user has the permission to create a table, whether the user has the permission to create a calculation, whether the user has the permission to approve the calculation contract, whether the user has the permission to modify the table, whether the user has the permission to modify the calculation contract, and whether the user is an organization administrator. For the data storage structure of the approval method, the specific storage format of the approval management information is Permit.[Method].[CompositeKey].[ModifyStatus] as the key. Permit as the prefix indicates that this type of data belongs to the approval method type. The "Method" in the suffix refers to the operation method type of the proposal in the approval, "CompositeKey" refers to the index composite key of the storage data facing the approval method, and "ModifyStatus" refers to the approver's approval opinion on the proposal; the value content is the various attributes contained in the approval proposal entity type: the content of the approval proposal and the final status result of the approval proposal.
2. The method for storing decentralized multi-party computing data according to claim 1, characterized in that: Also includes: The approval process is obtained from the storage method, and the approval process is stored.
3. The method for storing decentralized multi-party computing data according to claim 2, characterized in that: The approval process includes: Submitting requests for on-chain user identities and permissions or operations on computing nodes to the blockchain server; The blockchain server node calls the user identity authentication chain code to verify the identity of the initiator of the operation request and obtains the first verification result; If the first verification result is passed, the blockchain server calls the user authority query chain code to verify the authority of the initiator of the operation request and obtains the second verification result; If both verification results are passed, the operation request will be officially uploaded to the chain.
4. The method for storing decentralized multi-party computing data according to claim 2, characterized in that: The approval process also includes: Submit an operation request to the blockchain server for the on-chain directory or computing contract; The blockchain server node calls the blockchain server API interface to call the smart contract, verifies the identity of the initiator of the operation request, and obtains the first verification result; If the first verification result is passed, the smart contract is called again to pre-process and cache the operation request on the chain to obtain the internal control ID code and the pre-processed operation request; Distributing the pre-processed request to each organization member involved in the operation; When each of the organization members calls the internal control ID to check the content of the pre-processed operation request, the current approval result in the pre-processing cache is obtained; Each organization member calls the smart contract based on the organization's internal approval opinions and submits an approval operation request containing their own approval opinions; The system synchronously modifies the opinions of each approver contained in the on-chain pre-processing cache according to the approval operation request, and further determines whether each member of the organization meets the approval opinions and unanimously agrees to pass the operation request; If yes, the operation request is officially uploaded to the chain; If not, the operation request fails, and the system continues to wait for each organizer to submit an approval operation request and verify the final approval result.
5. A storage system based on the decentralized multi-party computing data storage method according to any one of claims 1 to 4, characterized in that: It includes a GRPC interface module, a data storage central control module, a blockchain public data storage module and a local PostgreDB private data storage module. The interface module is connected to the data storage central control module, and the data storage central control module is respectively connected to the blockchain public data storage module and the local PostgreDB private data storage module.
