Blockchain-based data processing method and device, electronic equipment and storage medium
By deploying user contracts and digital collection contracts on blockchain network nodes, the problem of fragmented digital collections across different digital collection platforms is solved, simplifying cross-platform digital collection information query and processing, and improving liquidity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-06-16
- Publication Date
- 2026-05-26
AI Technical Summary
In blockchain networks, users' digital collections across different digital platforms are fragmented, leading to cumbersome processing and hindering liquidity.
By deploying user contracts and digital collectible contracts on nodes in the blockchain network, the mapping relationship between object identifiers and platform addresses, as well as digital collectible information, is stored. This allows users to send transaction requests through any digital collectible platform and directly determine the digital collectible information of the target object across multiple platforms.
It enables the sharing of digital collection information for the same user across different digital collection platforms, simplifies the processing flow, and improves the liquidity of digital collections.
Smart Images

Figure CN116991950B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of blockchain technology, and more specifically, to a data processing method, apparatus, electronic device, and storage medium based on blockchain. Background Technology
[0002] In the field of blockchain technology, users can process their digital collections through digital asset management platforms. In related technologies, a blockchain network or system may correspond to multiple digital asset management platforms. A user can process their digital collections on a specific platform; that is, after a blockchain node receives a transaction request from a user through a particular platform, it can process the user's digital collections on that platform according to the transaction request. If a user owns digital collections on multiple platforms, they need to send separate transaction requests to the blockchain node through each platform to process the digital collections on each platform. For example, a user may be able to find their digital collections on one platform, but only be able to find their digital collections on another platform.
[0003] The process of sending transaction requests to blockchain nodes through different digital collection platforms to process digital collections on different platforms is cumbersome, resulting in the fragmentation of digital collections belonging to the same user across different platforms, which is not conducive to the flow of digital collections. Summary of the Invention
[0004] This disclosure provides a data processing method, apparatus, electronic device, and storage medium based on blockchain, which can solve the technical problem of fragmented digital collections of the same user on different data collection platforms in the aforementioned related technologies.
[0005] This disclosure provides a blockchain-based data processing method, executed by any node in a blockchain network. The node deploys user contracts and digital collectible contracts, and has a state database. The user contracts store a first mapping relationship between an object identifier of a target object and a first object address of the target object on a first digital collectible platform in the state database. The digital collectible contracts store digital collectible information and its corresponding holder address information in the state database. The method includes: receiving a first transaction request, the first transaction request including the object identifier; retrieving the first mapping relationship based on the object identifier in the first transaction request to determine the first object address corresponding to the object identifier; and determining the target digital collectible information owned by the target object based on the first object address and the digital collectible information and its corresponding holder address information stored in the state database.
[0006] This disclosure provides a blockchain-based data processing device, executed by any node in a blockchain network. The node deploys user contracts and digital collectible contracts, and has a state database. The user contracts store a first mapping relationship between an object identifier of a target object and a first object address of the target object on a first digital collectible platform in the state database. The digital collectible contracts store digital collectible information and its corresponding holder address information in the state database. The device includes: a receiving module for receiving a first transaction request, the first transaction request including the object identifier; a determining module for retrieving the first mapping relationship based on the object identifier in the first transaction request, and determining the first object address corresponding to the object identifier; the determining module is further configured to determine the target digital collectible information owned by the target object based on the first object address and the digital collectible information and its corresponding holder address information stored in the state database.
[0007] In some embodiments of this disclosure, the user contract is further configured to store a second mapping relationship between the object identifier and the second object address of the target object on the second digital collection platform in the state database; the target digital collection information includes first digital collection information owned by the target object on the first digital collection platform and second digital collection information owned by the target object on the second digital collection platform; wherein, the determining module is configured to retrieve the second mapping relationship based on the object identifier in the first transaction request, determine the second object address corresponding to the object identifier; and return the first digital collection information and the second digital collection information based on the first object address and the second object address, as well as the digital collection information and its corresponding holder address information stored in the state database.
[0008] In some embodiments of this disclosure, the first mapping relationship includes a first key and a first value; the first key includes a first prefix and a first composite primary key, the first composite primary key including the object identifier and the first object address; the first value includes the target object's first platform object information on the first data storage platform; the second mapping relationship includes a second key and a second value; the second key includes the first prefix and a second composite primary key, the second composite primary key including the object identifier and the second object address; the second value includes the target object's second platform object information on the second data storage platform; the apparatus further includes: an acquisition module, configured to retrieve the first mapping relationship and the second mapping relationship based on the object identifier in the first transaction request, and obtain the first platform object information and the second platform object information; and a feedback module, configured to return the first platform object information and the second platform object information.
[0009] In some embodiments of this disclosure, the receiving module is further configured to receive a second transaction request, the second transaction request including the first digital collectible information, the first object address, the second object address, and the contract name of the digital collectible contract; the determining module is further configured to determine, based on the first object address, the second object address, the first mapping relationship, and the second mapping relationship, that the first object address and the second object address in the second transaction request both correspond to the first object identifier; the device further includes a processing module configured to, based on the contract name of the digital collectible contract, invoke the digital collectible contract to modify the holder address information of the first digital collectible information in the status database from the first object address to the second object address.
[0010] In some embodiments of this disclosure, the receiving module is further configured to receive a second transaction request, the second transaction request including the first object address; the apparatus further includes a retrieval module, configured to retrieve, based on the first object address in the second transaction request, whether a third mapping relationship exists between the first object address and the object identifier in the status database; the feedback module is further configured to, if the third mapping relationship exists, return the object identifier corresponding to the first object address to indicate that the first object address verification has passed, wherein the user contract is further configured to store the third mapping relationship in the status database; if the third mapping relationship does not exist, return a response message to indicate that the first object address verification has failed.
[0011] In some embodiments of this disclosure, the third mapping relationship includes a third key and a third value; the third key includes a second prefix and the address of the first object; the third value includes the object identifier.
[0012] In some embodiments of this disclosure, the receiving module is further configured to receive a first registration request from the first data storage platform, the first registration request including the object identifier, the first object address, the contract name of the user contract, the first object signature, and the first data storage platform signature; the processing module is further configured to, if the first object signature and the first data storage platform signature pass the verification, invoke the user contract according to the contract name of the user contract, and store the first mapping relationship between the object identifier and the first object address, and the third mapping relationship between the first object address and the object identifier in the status database.
[0013] In some embodiments of this disclosure, the node is further deployed with a standardized storage contract; the receiving module is further configured to receive a digital collectible series release transaction request, the digital collectible series release transaction request including digital collectible series metadata and the contract name of the standardized storage contract; the processing module is further configured to invoke the standardized storage contract according to the contract name of the standardized storage contract, and store the digital collectible series metadata in the state database in the form of key-value pairs.
[0014] In some embodiments of this disclosure, the digital collection series metadata includes the creator identifier of the published digital collection series, the series name, the platform address of the digital collection platform that published the digital collection series, and the creator address; wherein, the processing module is used to store the hash value of the third prefix, the creator identifier, and the series name as a fourth key; and to store the series name, the platform address, and the creator address as a fourth value corresponding to the fourth key.
[0015] In some embodiments of this disclosure, the receiving module is further configured to receive a digital collectible release transaction request, the digital collectible release transaction request including digital collectible metadata and the contract name of the standardized storage contract; the processing module is further configured to invoke the standardized storage contract according to the contract name of the standardized storage contract, and store the digital collectible metadata in the state database in the form of key-value pairs.
[0016] In some embodiments of this disclosure, the digital collectible metadata includes the creator identifier, collectible name, digital collectible hash, platform address, creator address, holder address, series primary key of the digital collectible series, preview image link address of the digital collectible, and Uniform Resource Identifier (URI) of the digital collectible medium. The processing module is used to obtain a predetermined hash value of the creator identifier, the collectible name, and the digital collectible hash; store a fourth prefix, the predetermined hash value, and a predetermined character as a fifth key; and store the collectible name, the platform address, the creator address, the holder address, the series primary key, the preview image link address of the digital collectible, the digital collectible hash, and the URI of the digital collectible medium as a fifth value corresponding to the fifth key.
[0017] In some embodiments of this disclosure, the node further deploys a target contract; the receiving module is further configured to receive a target service request sent by the target data storage platform, the target service request carrying target service parameters, the target service parameters including a target service operation identifier, a target method name, a target operator identifier, a target service request operation content, and a target signature; the device further includes a generation module, configured to generate a target reentrancy key based on the target service operation identifier, the target method name, and the target operator identifier in the target service request after the target signature verification is passed; the processing module is further configured to, if the target reentrancy key exists in the state database, obtain the target reentrancy value corresponding to the target reentrancy key from the state database; if the first part of the target reentrancy value matches the target service request operation content, return the second part of the target reentrancy value as the execution result of the target service request to the target data storage platform.
[0018] In some embodiments of this disclosure, the acquisition module is further configured to: obtain the hash value of the target service request operation content if the target reentrancy key does not exist in the state database; execute the target service request operation content to obtain the execution result of the target service request; and obtain the hash value of the target operator identifier and the target service operation identifier. The processing module is further configured to: use the fifth prefix, the target method name, and the hash value of the target operator identifier and the target service operation identifier as the sixth key; use the hash value of the target service request operation content and the execution result of the target service request as the sixth value corresponding to the sixth key; and store the sixth key and the sixth value in the state database.
[0019] This disclosure provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the blockchain-based data processing method as described in the above embodiments.
[0020] This disclosure provides an electronic device, including: at least one processor; and a storage device configured to store at least one program, which, when executed by the at least one processor, causes the at least one processor to implement the blockchain-based data processing method as described in the above embodiments.
[0021] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the blockchain-based data processing method provided in various optional implementations of the above embodiments.
[0022] In some embodiments of this disclosure, by deploying user contracts and digital collectible contracts on nodes, nodes can store the object identifier of a target object and the first mapping relationship between the target object and the first object address on the first digital collectible platform in the state database through the user contract, and store digital collectible information and its corresponding holder address information in the state database through the digital collectible contract. This allows nodes to retrieve the first mapping relationship based on the object identifier in the first transaction request after receiving it, thus determining the corresponding first object address. Then, based on the first object address, the digital collectible information, and the corresponding holder address information, it is determined that the target object owns the target digital collectible information. By deploying user contracts and digital collectible contracts on nodes, users can directly send transaction requests including object identifiers to nodes through any digital collectible platform corresponding to the blockchain network or system to determine the target object's digital collectible information on the digital collectible platform, achieving the interconnection of digital collectibles for the same user on the digital collectible platform. Attached Figure Description
[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0024] Figure 1 A schematic diagram of a system structure according to an embodiment of this disclosure is shown.
[0025] Figure 2 A flowchart illustrating a blockchain-based data processing method according to an embodiment of this disclosure is shown.
[0026] Figure 3 This diagram illustrates the data storage configuration of a single blockchain in one embodiment of the present disclosure.
[0027] Figure 4 This diagram illustrates an interface showing the digital collection information of the target object displayed on digital collection platforms 1, 2, and 3 on a client side in one embodiment of this disclosure.
[0028] Figure 5 This diagram illustrates an interface diagram of a client displaying digital collection information in one embodiment of the present disclosure.
[0029] Figure 6 This diagram illustrates the interaction between a client, a data storage platform, and a node in one embodiment of the present disclosure.
[0030] Figure 7 A flowchart illustrating a blockchain-based data processing method according to another embodiment of this disclosure is shown.
[0031] Figure 8 This diagram illustrates an interface during the transfer of digital collectibles in one embodiment of this disclosure.
[0032] Figure 9 A flowchart illustrating a blockchain-based data processing method according to another embodiment of this disclosure is shown.
[0033] Figure 10 This diagram illustrates a digital collection series and its storage architecture according to one embodiment of the present disclosure.
[0034] Figure 11 A flowchart illustrating a blockchain-based data processing method according to another embodiment of this disclosure is shown.
[0035] Figure 12 A flowchart illustrating a reentrancy mechanism under a blockchain-based data processing method in one embodiment of this disclosure is shown.
[0036] Figure 13 A flowchart illustrating the processing of a service request is shown in one embodiment of this disclosure.
[0037] Figure 14 A schematic diagram of the block structure is shown in one embodiment of this disclosure.
[0038] Figure 15 This diagram illustrates the overall framework for processing service requests in one embodiment of the present disclosure.
[0039] Figure 16 A block diagram of a blockchain-based data processing apparatus according to an embodiment of the present disclosure is shown.
[0040] Figure 17A schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0041] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0042] The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more specific details omitted, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0043] The accompanying drawings are merely illustrative of this disclosure, and the same reference numerals in the drawings denote the same or similar parts, thus omitting repeated descriptions of them. Some block diagrams shown in the drawings do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in at least one hardware module or integrated circuit, or in different network and / or processor devices and / or microcontroller devices.
[0044] The flowchart shown in the accompanying drawings is merely illustrative and does not necessarily include all content and steps, nor does it require execution in the described order. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0045] In this specification, the terms “a,” “the,” and “at least one” are used to indicate the presence of at least one element / component / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first,” “second,” and “third,” etc., are used only as markings and are not a limitation on the number of objects.
[0046] Figure 1 An exemplary system architecture that can be applied to embodiments of this disclosure is shown. For example... Figure 1 As shown, the system architecture may include a client 101, a data storage platform 102, and a node 103.
[0047] In this context, each of the 102 digital collection platforms corresponds to a specific blockchain on which node 103 resides. Client 101 can send a transaction request for processing digital collections to any of the 102 platforms. Upon verification of the transaction request from client 101, the receiving platform forwards it to one of the nodes on the blockchain's 103. If the receiving node is the blockchain's master node (also known as the ledger node), it packages the transaction request into a block and submits it for proposal. After consensus on the proposal is passed, the corresponding block is uploaded to the blockchain, and the execution result of the transaction request is updated in the state database. If the receiving node is not the blockchain's master node, it broadcasts the transaction request. The master node receives the broadcast, packages the transaction request, and submits it for proposal. After consensus on the corresponding block is passed, the receiving node synchronizes the block from other nodes and then updates the execution result of the transaction request in the state database it maintains.
[0048] In some embodiments of this disclosure, node 103 is a node in a consortium blockchain. Figure 1 In this context, n is a positive integer greater than or equal to 1, determined by the total number of nodes in the blockchain.
[0049] exist Figure 1In the system shown, client 101, data storage platform 102, and node 103 communicate via a network. This network can be a wireless or wired network using standard communication technologies and / or protocols. The network is typically the Internet, but can be any network, including but not limited to a Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies may be used to replace or supplement the aforementioned data communication technologies.
[0050] Client 101 can be an electronic device capable of sending transaction requests to consensus nodes or master nodes. This electronic device can be a smartphone, computer, server, etc., and this embodiment of the disclosure does not impose any limitations on it. Node 103 can be a server, computer, or other device that meets the access requirements of the blockchain it belongs to, and this embodiment of the disclosure does not impose any limitations on it.
[0051] The exemplary embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0052] Figure 2 A flowchart illustrating a blockchain-based data processing method according to an embodiment of this disclosure is shown schematically. The blockchain-based data processing method provided in this disclosure can be executed by any electronic device with computing power, such as a server, or any one or more terminal devices, or an interaction between a server and a terminal device; this disclosure does not limit this. For example, the electronic device with computing power is... Figure 1 Any one of the nodes in node 103.
[0053] like Figure 2As shown, an embodiment of this disclosure provides a blockchain-based data processing method including the following steps S201 to S203.
[0054] S201, Receive the first transaction request, the first transaction request includes the object identifier.
[0055] The first transaction request can be any type of operation, and this embodiment of the disclosure does not impose any restrictions on it. For example, the first transaction request can be a registration request.
[0056] The Digital Collection Platform is a platform for managing digital collectibles. Users can manage their digital collections through the platform. For example, users can view and process their digital collectibles through the corresponding application installed on the client side. These processing actions are sent to the Digital Collection Platform as transaction requests, which are then verified and forwarded to nodes in the blockchain network. The Digital Collection Platform can also issue digital collectibles.
[0057] In some embodiments, the data storage platform may include a first data storage platform, and optionally, a second data storage platform different from the first data storage platform. Optionally, the data storage platform may also include a general-purpose data storage platform, which refers to a platform that can be used to manage at least one data storage platform; for example, the general-purpose data storage platform can be used to manage both the first and second data storage platforms simultaneously. In this embodiment of the disclosure, the platform that sends the first transaction request to the nodes in the blockchain network can be either a general-purpose data storage platform or the first data storage platform.
[0058] Digital collectibles refer to digital goods with certain collectible value that are recorded using blockchain technology (such as any of the following: consortium blockchain, public blockchain, and private blockchain; in the examples below, a consortium blockchain will be used as an example). Digital collectibles can include digital paintings and calligraphy, digital images, music, game items, and 3D (3-dimensional) models. Taking a digital image as an example, the process of converting a digital image into a digital collectible involves: packaging the custom data for the digital image (e.g., image description, attributes) into a data package (usually JSON (JavaScript Object Notation, a lightweight data interchange format) code); issuing this data package through a corresponding smart contract; then, packaging the issuance of this data package as a transaction request into a block for proposal; and finally, adding the block to the blockchain after consensus is reached. Digital collectibles are generally stored in centralized / decentralized storage systems. The metadata of digital collectibles can be stored directly on the blockchain, or the URI (UniformResource Identifier) of the off-chain storage source of the digital collectible can be stored on the blockchain. Each specific digital collection may include any one or more of the following: collection category (Denom), collection identifier (ID), metadata, and metadata URI.
[0059] An object identifier is a unique identifier for a target object. In some embodiments of this disclosure, the object identifier can be the value obtained by hashing a unique string corresponding to the target object. For example, the unique string corresponding to the target object may include an identification number used to prove the identity of the target object. This application does not limit the type of identification number used to prove the identity of the target object; any identification number that can uniquely identify the target object can be used as the identification number for proving the identity of the target object.
[0060] In some embodiments of this disclosure, the first transaction request is initiated by the target object through a client and forwarded to nodes in the blockchain network via a first data storage platform or a general data storage platform. In some embodiments, the client is configured with a wallet-sdk (a plugin), and the target object can initiate a transaction request through the wallet-sdk in the client. The wallet-sdk plugin can appear as a standalone application or as a browser plugin; this disclosure does not limit this. After receiving the first transaction request sent by the target object through the client, the first data storage platform or the general data storage platform verifies the signature of the first object in the first transaction request. After successful verification, the first transaction request is sent to nodes in the blockchain network.
[0061] For example, a first transaction request sent by a target object to a first data storage platform via a client may include a first part and a second part. The first part consists of a first request plaintext, a first target object public key corresponding to the target object and the first data storage platform, and a first platform public key of the first data storage platform. The second part is obtained by encrypting the hashed digest of the first part using the private key of the target object and the first data storage platform. After receiving the first transaction request, the first data storage platform performs a hash operation on the first part to obtain a digest to be confirmed. It then decrypts the second part using the public key of the target object and the first data storage platform to obtain the first digest. The first digest is then compared with the digest to be confirmed; if they match, the signature verification is successful. Subsequently, the first data storage platform encrypts the digest of the first part using its own private key (which can be referred to as the first platform private key) to obtain the third part of the first transaction request, and then sends the first transaction request, including the first, second, and third parts, to the node. After receiving the first transaction request from the first data storage platform, the node verifies the first transaction request based on the target object's first public key on the first data storage platform and the first platform's first public key. If the verification is successful, subsequent steps are performed according to the first transaction request. Specifically, the first target object's first public key and first target object's first private key are generated by the first data storage platform when the target object initiates registration with the platform, and the first data storage platform sends these first target object's public and private keys to the target object's client.
[0062] For example, a first transaction request sent by a target object to a general data repository platform via a client may include a first part and a second part. The first part consists of a first request plaintext, a general target object public key corresponding to the target object and the general data repository platform, and a general platform public key of the general data repository platform. The second part is obtained by encrypting the hashed digest of the first part using the general target object private key corresponding to the target object and the general data repository platform. After receiving the first transaction request, the general data repository platform performs a hash operation on the first part to obtain a digest to be confirmed. It then decrypts the second part using the general target object public key corresponding to the target object and the general data repository platform to obtain the first digest. The first digest is then compared with the digest to be confirmed; if they match, the signature verification is successful. Subsequently, the general data repository platform encrypts the digest of the first part using its own private key (which can be called the general platform private key) to obtain the third part of the first transaction request, and then sends the first transaction request, including the first, second, and third parts, to the node. After receiving the first transaction request from the general data repository platform, the node verifies the first transaction request based on the target object's general target object public key and the general platform public key of the general data repository platform. If the verification is successful, subsequent steps are performed according to the first transaction request. Specifically, the general target object public key and general target object private key corresponding to the target object and the general data repository platform are generated by the general data repository platform when the target object initiates registration with the platform, and the general data repository platform sends the general target object public key and general target object private key to the target object's client.
[0063] S202, based on the object identifier in the first transaction request, retrieve the first mapping relationship and determine the first object address corresponding to the object identifier.
[0064] In some embodiments of this disclosure, the following is performed: Figure 2 The corresponding blockchain-based data processing method deploys user contracts on its nodes and includes a state database. The user contracts store the user's object identifiers and mappings between the user's object addresses on various data storage platforms within the state database. In some embodiments, the user contracts can store the object identifier of a target object and a first mapping between the target object's first object address on a first data storage platform in the state database. The first data storage platform can be any data storage platform.
[0065] The state database is used to record the results of transaction request execution. For example, a node's data storage for a single blockchain is as follows: Figure 3As shown, the History index database 301 stores version changes of keys in the State database 303, the Block index database 302 stores the index of block files, and the State database stores the execution results of transaction requests included in each block of the blockchain 304. The History index database 301, Block index database 302, and State database 303 all support LevelDB (a key-value database that supports key queries, composite key queries, and range key queries). The State database also supports CouchDB (another key-value database).
[0066] In some embodiments of this disclosure, before retrieving the first mapping relationship based on the object identifier in the first transaction request and determining the first object address corresponding to the object identifier, the first mapping relationship needs to be stored in a state database of the node. In some embodiments, storing the first mapping relationship in the state database of the node may include: receiving a first registration request from a first data storage platform, the first registration request including an object identifier, a first object address, a user contract's contract name, a first object signature, and a first data storage platform signature; if the first object signature and the first data storage platform signature pass verification, then, based on the user contract's contract name, calling the user contract, and storing the first mapping relationship between the object identifier and the first object address in the state database.
[0067] Upon receiving the first registration request from the target object via a client, the First Data Storage Platform can first invoke an AI-powered real-name verification interface to verify the user's identity, such as through three-factor authentication. In some embodiments, the three factors may include: name, client number, and identification document number used to prove the target object's identity. After successful three-factor authentication, the First Data Storage Platform generates a first target object public key, a first target object private key, a first object address, and an object identifier corresponding to the target object and the First Data Storage Platform. Subsequently, the First Data Storage Platform sends the first target object public key and the first target object private key to the target object's client, enabling the client to sign subsequent first transaction requests sent to the First Data Storage Platform (e.g., including the aforementioned first transaction request) to generate a first object signature. Furthermore, the First Data Storage Platform can also generate a first registration request plaintext based on the first object address and the target object's object identifier, and sign the first registration request plaintext using the First Data Storage Platform's first platform private key to obtain a First Data Storage Platform signature. The First Registration Request plaintext, the First Object Signature, and the First Data Storage Platform Signature are then sent as the first registration request to the node. The first registration request plaintext may include the first object address, the object identifier of the target object, and the contract name of the user contract. The first registration request plaintext is used to instruct the node receiving the first registration plaintext to invoke the user contract and store the first mapping relationship between the first object address and the object identifier of the target object in the state database of the node.
[0068] In some embodiments, the first object address can be generated based on the public key of the first target object corresponding to the first data storage platform. This disclosure does not limit how the first object address is generated from the public key. For example, the public key can be compressed into a first string of 32 bytes using the keccak-256 algorithm (a one-way hash function algorithm). Then, the last 20 bytes of characters in the first string are extracted to obtain a second string. Finally, the string "zx" is added before the second string to obtain the first object address.
[0069] In some embodiments, the successful verification of the first data platform signature may include: obtaining a digest of the plaintext of the first registration request after hashing; decrypting the first data platform signature using the first platform public key of the first data platform to obtain a digest of the first data platform signature; and determining that the first data platform signature verification is successful if the digest of the plaintext of the first registration request is the same as the digest of the first data platform signature.
[0070] Once the node's state database stores the first mapping relationship, it can retrieve the first mapping relationship based on the object identifier in the first transaction request and determine the first object address corresponding to the object identifier of the target object.
[0071] S203, based on the address of the first object and the digital collection information stored in the status database and its corresponding holder address information, determine the target digital collection information owned by the target object.
[0072] In some embodiments of this disclosure, in addition to user contracts, nodes also deploy digital collectible contracts. These digital collectible contracts can be used to store digital collectible information and its corresponding holder address information in a state database. The state database stores up-to-date information on digital collectibles and their corresponding holder addresses to ensure the accuracy of the target digital collectible information owned by the identified target object. The target digital collectible information may include digital collectible information for which the holder address is the address of the first object.
[0073] In some embodiments of this disclosure, if the node receiving the first transaction request is the master node of the blockchain network, the node will execute the first transaction request and obtain an execution result. Then, it will package the first transaction request into a block, and the broadcast proposal message will include the corresponding execution result, so that the consensus nodes in the blockchain network can reach a consensus on the block. After consensus is reached by the consensus nodes in the blockchain network, the block will be uploaded to the blockchain, and the execution result corresponding to the first transaction request will be updated to the node's state database. If the node receiving the first transaction request is not the master node of the blockchain network, the node receiving the first transaction request will broadcast the first transaction request. After receiving the broadcast, the master node will execute the first transaction request and obtain the corresponding execution result. Then, the master node will package the first transaction request into a block and propose it. The broadcast proposal message may include the corresponding execution result. After the consensus of the block corresponding to the first transaction request is passed, the node receiving the first transaction request can synchronize the block from other nodes (e.g., the master node and / or consensus nodes) to its own blockchain, and then update the execution result corresponding to the first transaction request to the node's state database.
[0074] In some embodiments of this disclosure, the target object may only possess digital collectibles on the first digital collection platform. Therefore, based on the first object address, the target digital collectible whose holder address is the first object address is determined from the status database, thus obtaining all the digital collectibles owned by the target object. It should be noted that even if the target object only possesses digital collectibles on the first digital collection platform, it may also possess object addresses on other digital collection platforms. However, since there are no digital collectibles under those object addresses, during S202, querying other mapping relationships between the object address and object identifier stored in the status database yields the object address, but digital collectible information cannot be determined based on that object address either. Therefore, the process of retrieving other mapping relationships based on the object identifier is not reflected in S202.
[0075] In other embodiments of this disclosure, the user contract can also be used to store a second mapping relationship between an object identifier and a second object address of a target object on the second digital collection platform in the state database, and the target digital collection information can include first digital collection information owned by the target object on the first digital collection platform and second digital collection information owned by the target object on the second digital collection platform. In this case, taking receiving the first transaction request from a general digital collection platform as an example, determining the target digital collection information owned by the target object based on the first object address and the digital collection information stored in the state database and its corresponding holder address information can include: retrieving the second mapping relationship based on the object identifier in the first transaction request to determine the second object address corresponding to the object identifier; and returning the first digital collection information and the second digital collection information based on the first object address and the second object address, as well as the digital collection information stored in the state database and its corresponding holder address information.
[0076] When the state database stores the first mapping relationship and the second mapping relationship, the first object address and the second object address can be obtained by retrieving the first mapping relationship and the second mapping relationship through the object identifier. Then, the node can determine the target digital collectible information whose holder address is the first object address and the second object address according to the first object address and the second object address. Among them, the digital collectible information corresponding to the first object address is the first digital collectible information, and the digital collectible information corresponding to the second object address is the second digital collectible information.
[0077] For example, a target object possesses digital collectibles on three platforms (Data Collection Platform 1, Data Collection Platform 2, and Data Collection Platform 3) within the same blockchain network. The mapping relationships 1 (address 1 of the target object on Data Collection Platform 1) between the target object and its object identifier, 2 (address 2 of the target object on Data Collection Platform 2) between the target object and its object identifier, and 3 (address 3 of the target object on Data Collection Platform 3) between the target object and its object identifier are all stored in the node's state database according to the user contract. The target object can send the aforementioned first transaction request, which includes the target object's object identifier, to a general data collection platform created for the same blockchain network via a client. The general data collection platform forwards this first transaction request to the node. Upon receiving the first transaction request, the node retrieves mapping relationships 1, 2, and 3 from the state database using the object identifier included in the first transaction request, thus obtaining the corresponding addresses 1, 2, and 3. After the consensus of the first transaction request is passed, the node uses addresses 1, 2, and 3, along with the digital collectible information and its corresponding holder address information in the state database, to determine the target digital collectible information on Digital Collection Platform 1, Digital Collection Platform 2, and Digital Collection Platform 3. The target object's client can display the target digital collectible information on Digital Collection Platform 1, Digital Collection Platform 2, and Digital Collection Platform 3 through the application in the client of this general digital collection platform.
[0078] For example, the target digital collection information of the target object displayed by the client on Digital Collection Platform 1, Digital Collection Platform 2, and Digital Collection Platform 3 is as follows: Figure 4 As shown. Figure 4 In this context, the blockchain account address of the target object can be represented by an object identifier, which can better reflect the relationship between digital collectibles and their owners. The digital collectible indicated by 401 is the first digital collectible owned by the target object on the digital collection platform 1, the digital collectible indicated by 402 is the second digital collectible owned by the target object on the digital collection platform 2, and the digital collectible indicated by 403 is the third digital collectible owned by the target object on the digital collection platform 3.
[0079] Detected on the client Figure 4 After the digital collection control corresponding to 401 is selected, the interface that appears is as follows: Figure 5 As shown. In Figure 5 The digital collection information displayed in 501 indicates that the owner of the digital collection is represented by the target object's account name. In the general digital collection platform, using the target object's account name to represent the owner of the digital collection can more directly reflect the relationship between the digital collection and the owner.
[0080] In some embodiments of this disclosure, the first mapping relationship may include a first key and a first value; the first key may include a first prefix and a first composite primary key, the first composite primary key may include an object identifier and a first object address; the first value may include first platform object information of the target object on the first data storage platform; the second mapping relationship may include a second key and a second value; the second key may include a first prefix and a second composite primary key, the second composite primary key may include an object identifier and a second object address; the second value may include second platform object information of the target object on the second data storage platform.
[0081] In some embodiments of this disclosure, the node can also retrieve the first mapping relationship and the second mapping relationship based on the object identifier in the first transaction request, obtain the first platform object information and the second platform object information, and return the first platform object information and the second platform object information.
[0082] The specific prefix used in this disclosure is not limited. For example, the first prefix could be "user_id2addr_" to indicate that the first mapping relationship corresponds to the mapping between the object identifier of the target object and the address of the first object. The first platform object information may include the basic information of the target object on the first digital collection platform, such as the target object's username, object identifier, user type, public key, and address. Different user types correspond to different permissions. In this disclosure, the user type may include one or more of the following: platform user, ordinary user, administrator user, etc. Platform users may have permissions such as issuing digital collectibles and issuing points; administrator users may have permissions to call user contracts to register users; and ordinary users may have permissions to purchase and transfer digital collectibles. The second digital collection platform information may include the basic information of the target object on the second digital collection platform.
[0083] In some embodiments, according to Figure 2 When a corresponding blockchain-based data processing method processes a transaction request, the interaction between the client, the data storage platform, and the nodes is as follows: Figure 6 As shown, the user sends a transaction request to the Data Storage Platform via the wallet-sdk in the client, which includes a private key signature corresponding to the Data Storage Platform. After receiving the transaction request and verifying the signature, the Data Storage Platform forwards the transaction request to the node, which then processes the request accordingly.
[0084] In this embodiment of the disclosure, the user contract storage structure for implementing ID mapping can be designed as follows:
[0085] 1) The mapping relationship between object identifier ID and object address (which may include the first mapping relationship between the object identifier and the first object address, and optionally, the second mapping relationship between the object identifier and the second object address): can be used to connect digital collections corresponding to multiple object addresses of a target object. That is, the same target object can have only one object identifier as the entity ID, and the same target object can have multiple object addresses on multiple digital collection platforms. One digital collection platform corresponds to one object address. If the same target object is registered on multiple digital collection platforms, then the target object has multiple sets of object public and private keys allocated by multiple digital collection platforms.
[0086] Primary key (including the first key mentioned above): prefix "user_id2addr_" + composite primary key (including the first composite primary key mentioned above, each composite primary key can include entity ID + corresponding object address, each object address can be generated based on the corresponding object public key);
[0087] Value range (including the first value mentioned above): User basic information - UserInfo - JSON string (which may include the target object's account name on the corresponding data platform, the target object's entity ID on the corresponding data platform, user type, corresponding object public key, etc.).
[0088] In this embodiment, both the composite primary key and the value field include the entity ID of the target object. This is for convenient transmission to the upper-layer business during queries and is duplicated with the primary key. For example, if a user queries using the corresponding object address, the business database of Data Storage Platform A can find the corresponding entity ID from MySQL, then generate a primary key based on the entity ID to query the blockchain, and then directly use the entity ID in the value field returned by the blockchain network. This way, Data Storage Platform A does not need to add the entity ID to the value returned to the client again.
[0089] 2) The mapping relationship between object addresses and object identifiers (including the third mapping relationship between the first object address and the object identifier): This can be used to verify whether the corresponding object address is valid.
[0090] Primary key (including the third key mentioned above): prefix "user_addr2id_" + corresponding object address value field (including the third value mentioned above): entity ID
[0091] In this embodiment of the disclosure, the core API design provided by the user contract can be as follows:
[0092] 1) Find the list of object addresses contained in a target object.
[0093] Input: The object identifier ID of the target object
[0094] Output: Returns a set of UserInfos, which contains basic user information for all object addresses to which the object ID belongs. This set of basic user information does not include the digital collectibles owned by the target object. The digital collectibles owned by the target object are stored in a digital collectible contract. The digital collectible contract has a holder address field (e.g., ownerAddr field) for each digital collectible, which indicates the object address corresponding to each digital collectible.
[0095] Use case: It can be used to access the digital collections of objects belonging to the target object.
[0096] Or with Figure 6 For example, suppose the target object owns digital collectibles A1, A2, and A3 on digital collection platform A (first digital collection platform), and digital collectibles B1 and B2 on digital collection platform B (second digital collection platform). Digital collection platforms A and B correspond to the same blockchain platform or blockchain network. Each node in this blockchain network deploys a user contract and a digital collectible contract. Through the digital collectible contract, the ownerAddr field of digital collectibles A1, A2, and A3 is the first object address (address UA), and the ownerAddr field of digital collectibles B1 and B2 is the second object address (address UB). Through this user contract, the entity ID of the target object can be stored to correspond to the first object address and the second object address respectively, indicating that these two object addresses refer to the same target object.
[0097] When a target user initiates a registration request to the Data Storage Platform A through a client, the registration request carries the user's real-name identity information, such as the three elements mentioned above. The Data Storage Platform A first calls the AI-powered real-name verification interface to verify the identity of the three elements in the registration request. After successful verification, the Data Storage Platform A's backend service can perform a hash operation on the target user's ID number to obtain the target user's object identifier. The Data Storage Platform A then assigns a first target object public key and a first target object private key to the target user. These first target object public and private keys can be stored locally on the client. A first object address can be generated using the first target object public key. The Data Storage Platform A can also send the first object address and the target object's object identifier to nodes in the blockchain network to store the first mapping relationship between the object identifier ID and the first object address by calling the user contract. Optionally, a third mapping relationship between the first object address and the object identifier ID can also be stored.
[0098] When a target user initiates a registration request to the Data Storage Platform B through a client, the registration request carries the user's real-name identity information, such as the three elements mentioned above. The Data Storage Platform B first calls the AI-powered real-name verification interface to verify the identity of the three elements in the registration request. After the three elements are verified, the Data Storage Platform B's backend service can perform a hash operation on the target user's ID number to obtain the target user's object identifier. The Data Storage Platform B then assigns a second target object public key and a second target object private key to the target user. These second target object public and private keys can be stored locally on the client. A second object address can be generated using the second target object public key. The Data Storage Platform B can also send the second object address and the target user's object identifier to nodes in the blockchain network to store a second mapping relationship between the object identifier ID and the second object address by calling the user contract. Optionally, it can also store a mapping relationship between the second object address and the object identifier ID.
[0099] The target object's client calls wallet-sdk and signs the transaction request QA (assuming the transaction request QA is to query the digital collectibles held by the target object in the digital collection platform A, but this disclosure is not limited to this) using the first target object's private key, obtaining the first object signature. The client then sends the transaction request QA, including the first object signature and the target object's object identifier, to the digital collection platform A. Upon receiving the transaction request QA, the digital collection platform A verifies the signature using the first target object's public key. After successful verification, the platform A signs the transaction request QA using its first platform public key, generating the first digital collection platform signature. The platform A then sends the transaction request QA, including the first object signature, the first digital collection platform signature, and the target object's object identifier, to a node in the blockchain network. Once the transaction request QA has been verified and packaged for consensus, the node calls the user contract. Using the target object's object identifier, it finds the corresponding first object address (UA), and then calls the digital collectibles contract. Through the ownerAddr field, it can find that the target object holds digital collectibles A1, A2, and A3.
[0100] The target object's client calls wallet-sdk, uses the second target object's private key to sign the transaction request QB (assuming the transaction request QB is to query the digital collectibles held by the target object in the digital collection platform B), obtains the second object signature, and sends the transaction request QB, including the second object signature and the target object's object identifier, to the digital collection platform B. After receiving the transaction request QB, the digital collection platform B verifies the signature using the second target object's public key. After successful verification, the digital collection platform B signs the transaction request QB using its second platform public key, generates the second digital collection platform signature, and sends the transaction request QB, including the second object signature, the second digital collection platform signature, and the target object's object identifier, to a node in the blockchain network. After the transaction request QB is verified and packaged for consensus, the node can call the user contract, find the corresponding second object address (address UB) through the target object's object identifier, and then call the digital collectibles contract. Through the ownerAddr field, it can find out that the target object holds digital collectibles B1 and B2.
[0101] In this embodiment of the disclosure, by reusing the function of AI real-name verification, access to the same data storage platform can be achieved with only a single real-name verification. For example, if the same target object logs in to data storage platform A multiple times, only one real-name verification is required. When logging in to data storage platform A for the second time, the target object only needs to log in with its account name on data storage platform A. Data storage platform A can record the correspondence between the target object's account name on data storage platform A and the address of the first object. The target object's account name on data storage platform A is not related to the blockchain network.
[0102] 2) Locate the object identifier to which the target object's object address belongs. This involves searching for the mapping between the input object address and the object identifier ID. If the input object address is found, the corresponding object identifier ID is returned, indicating that the input object address is valid. If the return value is empty, it means that the input user address does not exist in the user contract, and therefore the input object address is invalid.
[0103] Input: The address of the target object
[0104] Output: Returns the corresponding object identifier ID.
[0105] Use case: Called within digital collectible contracts to verify the legitimacy of users.
[0106] For example, when a target object wants to perform a certain operation on a digital collectible through a general digital collection platform, such as transferring the target object's digital collectible from digital collection platform A to digital collection platform B, the target object initiates a transaction request on the general digital collection platform. This transaction request carries the name of the contract to be invoked (here, let's assume it's the digital collectible contract) and the operation to be performed (that is, changing the ownerAddr field of the digital collectible in the digital collectible contract from the address UA registered by the target object on digital collection platform A to the address UB registered by the target object on digital collection platform B). When the underlying blockchain network receives this transaction request, it invokes the digital collectible contract, queries the relevant information of the digital collectible, and then the digital collectible contract invokes the user contract. If it finds that both address UA and address UB correspond to the same entity ID, it allows the ownerAddr field of the digital collectible in the digital collectible contract to be changed from the UA address to the UB address.
[0107] For example, in order to display the digital collection products of the same target object on different digital collection platforms on a general digital collection platform, a transaction request can be initiated. This transaction request carries the user's entity ID. By calling the user contract, the object addresses of all digital collection platforms corresponding to the entity ID can be found. Then, by calling the digital collection contract, the digital collections owned by the user on different digital collection platforms can be found by using the object addresses of all digital collection platforms.
[0108] The blockchain-based data processing method provided in this disclosure deploys user contracts and digital collection contracts on nodes. This allows nodes to store, through user contracts, a first mapping relationship between the object identifier of a target object and the first object address of the target object on a first digital collection platform in a state database, and through digital collection contracts, to store digital collection information and its corresponding holder address information in the state database. Upon receiving a first transaction request including the object identifier, the node can retrieve the first mapping relationship based on the object identifier included in the first transaction request to determine the corresponding first object address. Then, based on the first object address, the digital collection information, and the corresponding holder address information, it is determined that the target object possesses the target digital collection information. By deploying user contracts and digital collection contracts on nodes, users no longer need to send transaction requests to nodes separately through different digital collection platforms to determine their digital collection information on different platforms. Instead, they can directly send a transaction request including the object identifier to the node through any one of the multiple digital collection platforms corresponding to the blockchain to determine the target object's digital collection information on different platforms, thus achieving seamless integration of the same user's digital collections across different digital collection platforms. Furthermore, the universal digital collection platform created by the blockchain-based data processing method provided in this disclosure embodiment can enable the target object's clients to display the target object's digital collections on different digital collection platforms through corresponding applications, making it more convenient for users to manage their digital collections.
[0109] like Figure 7 As shown, another embodiment of this disclosure provides a blockchain-based data processing method including the following steps S701 to S703.
[0110] S701, Receive a second transaction request, the second transaction request including the first digital collectible information, the first object address, the second object address, and the contract name of the digital collectible contract.
[0111] In some embodiments of this disclosure, the content of the second transaction request is used to instruct the node to modify the holder address information in the first digital collectible information from the first object address to the second object address. For example, if the target object owns digital collectible 1 on the first digital collectible platform, the content of the second transaction request is to modify the first object address corresponding to digital collectible 1 to the second object address of the target object on the second digital collectible platform. For example, as... Figure 8 As shown in (1), according to the application of the general digital collection platform in the client of the target object, the client can display the digital collection owned by the target object. After the client detects that the collection transfer control 801 is selected, it enters the following... Figure 8 The interface shown in (2) displays the currently transferable digital collections and their respective digital collection platforms. Figure 8 In the interface shown in (2), after the client detects that the control 802 corresponding to digital collection 1 has been selected, it enters the following... Figure 8 The interface shown in (3) is in Figure 8 The interface shown in (3) lists the digital collection 1 to which digital collection platform 2 and digital collection platform 3 can be transferred. Figure 8 In the interface shown in (3), if the client detects that control 803 corresponding to the data storage platform 2 is selected, the client sends a second transaction request to the general data storage platform. After the signature is verified, the general data storage platform sends the second transaction request to the node in the corresponding blockchain network.
[0112] S702, based on the first object address, the second object address, the first mapping relationship, and the second mapping relationship, determine that the first object address and the second object address in the second transaction request both correspond to the first object identifier.
[0113] In some embodiments of this disclosure, after receiving a second transaction request, the node retrieves a first mapping relationship based on the first object address to determine the object identifier corresponding to the first object address; it then retrieves a second mapping relationship based on the second object address to determine the object identifier corresponding to the second object address. Next, it compares whether the object identifier corresponding to the first object address and the object identifier corresponding to the second object address are the same object identifier. If the object identifier corresponding to the first object address and the object identifier corresponding to the second object address are the same, it is determined that both the first object address and the second object address correspond to the first object identifier.
[0114] In some embodiments of this disclosure, before proceeding to S702, in addition to verifying the signature of the second transaction request, the node also needs to verify whether the address of the target object on the general data storage platform that forwards the second transaction request is correct. If the general data storage platform is the first data storage platform, verifying the correctness of the address of the target object on the general data storage platform that forwards the second transaction request is equivalent to verifying whether the address of the first object included in the second transaction request is correct. It should be noted that verifying the correctness of the address before proceeding to S702 is unrelated to the actual content of the transaction request, but only relates to the target object and the data storage platform that forwards the second transaction request. In some embodiments, if the transaction request received by the node is not the second transaction request in S701, in addition to verifying the signature of the second transaction request, the node also needs to verify whether the address of the target object on the data storage platform that forwards the transaction request is correct.
[0115] Taking the data storage platform that forwards the second transaction request as the first data storage platform as an example, the process of verifying whether the first object address included in the second transaction request is correct may include: receiving the second transaction request, which includes the first object address; searching the state database for a third mapping relationship between the first object address and the object identifier based on the first object address in the second transaction request; if a third mapping relationship exists, returning the object identifier corresponding to the first object address to indicate that the first object address verification has passed, wherein the user contract is also used to store the third mapping relationship in the state database; if no third mapping relationship exists, returning a response message to indicate that the first object address verification has failed. In some embodiments, in Figure 2 In the description corresponding to S202, after receiving the first registration request, the node calls the user contract and stores the first mapping relationship between the object identifier and the first object address in the state database, and also stores the third mapping relationship between the first object address and the object identifier in the state database.
[0116] In some embodiments of this disclosure, the third mapping relationship includes a third key and a third value; the third key includes a second prefix and a first object address, and the third value includes an object identifier. The embodiments of this disclosure do not limit the specific string that the second prefix can be; for example, the second prefix could be "user_addr2id_".
[0117] S703, based on the contract name of the digital collectible contract, invoke the digital collectible contract and modify the holder address information of the first digital collectible information in the status database from the first object address to the second object address.
[0118] In some embodiments of this disclosure, before proceeding to S703, consensus nodes in the blockchain network need to reach a consensus on the proposal corresponding to the second transaction request. After the consensus on the proposal corresponding to the second transaction request is reached, the node then invokes the digital collectible contract to modify the holder address information of the first digital collectible information in the state database from the first object address to the second object address.
[0119] The blockchain-based data processing method provided in this disclosure enables nodes to more easily transfer the digital collections of a target object across different digital collection platforms by deploying digital collection contracts and user contracts in the nodes. This facilitates the transfer and flow of the same user's digital collections across different digital collection platforms.
[0120] In another embodiment of this disclosure, in addition to deploying user contracts and digital collection contracts, the node also deploys standardized storage contracts. For example... Figure 9 As shown, another embodiment of this disclosure provides a blockchain-based data processing method including the following steps S901 to S902.
[0121] S901, Receives a digital collectibles series release transaction request. The digital collectibles series release transaction request includes the digital collectibles series metadata and the contract name of the standardized storage contract.
[0122] The digital collectibles series release and transaction request is initiated by a user with the authority to release digital collectibles series via a client, and forwarded to the node through the Digital Collectibles Platform. Upon receiving the digital collectibles series release and transaction request, the node completes step S901 accordingly. The user who initiates the digital collectibles series release and transaction request can be referred to as the creator.
[0123] In embodiments of this disclosure, standardized storage contracts can be used to store metadata of a digital collection series in a state database.
[0124] In some embodiments of this disclosure, the digital collectible series metadata includes the creator identifier of the published digital collectible series, the series name, the platform address of the digital collectible platform that published the digital collectible series, and the creator address. In other embodiments of this disclosure, the digital collectible series metadata also includes at least one of the following: the upper limit of the number of digital collectibles in the series (default 0 indicates no upper limit), the URL (Uniform Resource Locator) of the series cover, the series description, the maximum number of digital collectibles issued on the same medium (default 0 indicates no upper limit), and whether the serial number of the digital collectibles in the series starts from 0 (default starts from 1). Wherein, the creator identifier is the object identifier of the user who issued the digital collectible series publication transaction request; the series name is the name of the digital collectible series, for example, the series name is XX Records; the creator address is the object address of the creator on the digital collectible platform that published the digital collectible series; the URL of the series cover is the link address of the series cover; the series description is a description of the characteristics of the digital collectible series, for example, if the digital collectible series is XX Records, then the series description can be a description of the creative background, value, etc. of XX Records; the maximum number of digital collectibles issued on the same medium is the maximum number of digital collectibles issued in the storage system corresponding to the same URI.
[0125] S902, based on the contract name of the standardized storage contract, invoke the standardized storage contract to store the digital collection series metadata in the form of key-value pairs into the state database.
[0126] In some embodiments, the node executes S902 after the consensus of the proposal corresponding to the digital collection series release transaction request is passed.
[0127] In some embodiments of this disclosure, the standardized storage contract is invoked according to the contract name of the standardized storage contract to store the digital collection series metadata in the form of key-value pairs in the state database. This may include: storing the hash value of the third prefix, creator identifier, and series name as the fourth key; and storing the series name, platform address, and creator address as the fourth value corresponding to the fourth key. The specific string of the third prefix is not limited in this disclosure; for example, the third prefix may be "nftSeries_". In some embodiments, the content of the fourth value and the corresponding field names may be as shown in Table 1.
[0128] Table 1
[0129] field name type Is this field required? describe seriesName string yes Series Name platformAddr string yes Platform address creatorAddr string yes Creator address
[0130] In another embodiment, the fourth value also includes the upper limit of the number of digital collectibles in the series, the URL of the series cover, the series description, the maximum number of digital collectibles issued on the same medium, and whether the serial number of the digital collectibles in the series starts from 0. In this case, the content of the fourth value and the corresponding field names can be as shown in Table 2.
[0131] Table 2
[0132]
[0133] Among them, string, int64 and bool are data types.
[0134] In some embodiments of this disclosure, the standardized storage contract can also be used to store metadata of digital collectibles in a digital collectibles series in a state database. The process of storing metadata of digital collectibles in a digital collectibles series according to the standardized storage contract may include: receiving a digital collectible release transaction request, the digital collectible release transaction request including digital collectible metadata and the contract name of the standardized storage contract; and, based on the contract name of the standardized storage contract, invoking the standardized storage contract to store the digital collectible metadata in the state database in the form of key-value pairs.
[0135] In this system, the request to publish a digital collectible is initiated by a user with digital collectible publishing permissions via a client, and then forwarded to the nodes through the digital collection platform. This user can be referred to as the creator of the digital collectible. In some embodiments, the metadata of the digital collectible includes the creator identifier, collectible name, digital collectible hash, platform address, creator address, holder address, series primary key of the digital collectible series, preview image link address, and Uniform Resource Identifier (URI) of the digital collectible medium. Specifically, the collectible name is the name of the digital collectible, for example, "XX Vinyl Record"; the digital collectible hash is the calculated hash value of the digital collectible; the platform address is the address of the digital collection platform that issued the digital collectible; the holder address is the object address of the holder of the digital collectible on the corresponding digital collection platform; the series primary key of the digital collectible series is the fourth key of the series to which the digital collectible belongs; the preview image link address is the URL of the preview image of the digital collectible; and the URI of the digital collectible medium is the URI of the storage system storing the digital collectible.
[0136] In some embodiments of this disclosure, the digital collectible metadata also includes at least one of the following: digital collectible resource value, digital collectible status, digital collectible author, digital collectible description, collectible tag, and collectible details.
[0137] In some embodiments, storing digital collectible metadata in the state database in key-value pairs includes: obtaining a predefined hash value for the creator identifier, collectible name, and digital collectible hash; storing a fourth prefix, the predefined hash value, and a predefined character as a fifth key; and storing the collectible name, platform address, creator address, holder address, series primary key, preview image link address of the digital collectible, digital collectible hash, and digital collectible medium Uniform Resource Identifier as a fifth value corresponding to the fifth key. It should be noted that the node stores the digital collectible metadata in the state database in key-value pairs only after the proposal corresponding to the digital collectible transaction request has passed consensus.
[0138] In some embodiments, the predetermined string is "1", which is used to identify the uniqueness of the digital collection. This disclosure does not limit the specific string to which the fourth prefix is; for example, the fourth prefix is "nft_". Exemplarily, the fifth key is: "nft_+sm3(creator identifier+collection name+digital collection hash)+1". Here, sm3() is a hash operation.
[0139] When the metadata of a digital collectible also includes: the resource value of the digital collectible, the status of the digital collectible, the author of the digital collectible, the description of the digital collectible, the collectible tags, and the detailed information of the collectible, the content of the fifth value and the corresponding field names can be shown in Table 3. Among them, enum is a data type.
[0140] Table 3
[0141]
[0142]
[0143] For example, after the node deploys the standard storage contract, the storage architecture of the digital collection series and the digital collection is as follows: Figure 10 As shown. In Figure 10 In this framework, the authorization contract authorizes other users to act as agents for the digital collectible's owner, handling matters such as transferring the digital collectible on behalf of the owner. The resource transfer contract enables the change of ownership of the digital collectible, while the management contract manages the digital collectible, including its issuance and transfer.
[0144] The blockchain-based data processing method provided in this disclosure, on the one hand, enables nodes to store digital collectible information and its metadata in key-value pairs by deploying standard storage contracts in the nodes. This eliminates the need to create new contracts to define the on-chain attributes of digital collectibles (referring to the metadata of digital collectibles, such as anime characters, clothing, etc.) when issuing new digital collectible series, facilitating unified retrieval and management of digital collectibles. On the other hand, storing digital collectible metadata in key-value pairs avoids the problem of not being able to retain rare indexes when issuing new digital collectibles due to the need for intermittent indexing. Furthermore, storing digital collectible metadata in key-value pairs allows the index of the digital collectible to be inserted into the key when issuing new digital collectibles, thereby enabling intermittent indexing of digital collectibles, retaining rare indexes, and allowing users to customize the index corresponding to digital collectibles.
[0145] In another embodiment of this disclosure, the node also deploys the target contract. For example... Figure 11 As shown, another embodiment of this disclosure provides a blockchain-based data processing method including the following steps S1101 to S1104.
[0146] S1101 Receive the target service request sent by the target data storage platform. The target service request carries target service parameters, including the target service operation identifier, the target method name, the target operator identifier, the target service request operation content, and the target signature.
[0147] The target business request can be any type of business request, and this embodiment of the disclosure does not impose any restrictions on it. For example, the target business request is an operation to transfer digital collectible 1. The target business operation identifier (operateId) is used to uniquely identify the content of the target business request operation. In some embodiments, the target business operation identifier is assigned by the data collection platform that forwards the target business request, and only one target business identifier will be assigned to each target business request. This embodiment of the disclosure does not impose any restrictions on how the target business operation identifier is generated; any method that generates different target operation identifiers for different target business requests can be applied here. The target method name corresponds to the content of the target business request operation and the target business request itself. For example, when the target business request operation content corresponding to a target business request initiated by the client, processed and forwarded by the data collection platform, is to transfer digital collectible 1 to the target user, the corresponding target method name is "transfer method".
[0148] The target operator identifier is used to indicate the initiator corresponding to the target service request. In some embodiments, the specific content of the target operator identifier is not limited in this disclosure and can be determined based on the target method name. For example, the content that can serve as the target operator identifier includes: the user's object identifier, object address, and public key, as well as the address, platform identifier (platform ID), and public key of the data storage platform.
[0149] For example, if the target business request is to issue digital collectibles, the corresponding target method is named "Issuance Method." The operator initiating this request needs the appropriate permissions to call the Issuance Method. Typically, the digital collectible platform has the permission to call the Issuance Method. Therefore, the operator identifier in this case can be the platform identifier that identifies the digital collectible platform. Using the platform identifier makes it easier to identify the issuer. If the target business request is to transfer digital collectibles, the corresponding target method is named "Transfer Method." Users typically have the permission to call the Transfer Method, and digital collectibles are usually identified by their address. Therefore, the operator identifier in this case can be the user's address.
[0150] The target signature is used by the node to verify the target business request. If the signature verification is successful, the node can proceed to the next step based on the target business request.
[0151] S1102, after the target signature verification is passed, generate the target reentrancy key based on the target business operation identifier, target method name and target operator identifier in the target business request.
[0152] For example, the target reentrancy key can take the form of: prefix + target method name + sm3 (target operator identifier + target business operation identifier). This disclosure does not limit the specific string that the prefix of the target reentrancy key can be; for example, the prefix could be "reentrance_opt_".
[0153] S1103, if the target reentrancy key exists in the state database, then retrieve the target reentrancy value corresponding to the target reentrancy key from the state database.
[0154] Before explaining S1103, it is necessary to explain under what circumstances the node's state database will have a target reentrancy key and the corresponding target reentrancy value.
[0155] If a node receives the target service request for the first time, the target reentrancy key and target reentrancy value corresponding to the target service request will not exist in the state database. If, after the node receives the target service request for the first time, the target service request has been proposed and consensus has been achieved on the blockchain network where the node resides, and the node has already stored the target reentrancy key and target reentrancy value in the state database according to the target contract, then when the node receives the target service request for the second time, the target reentrancy key will already exist in the state database. The target contract is used to store the target reentrancy key and target reentrancy value in the state database.
[0156] Whether the node state database has a target reentrancy key depends on whether the node has received the target business request before receiving it this time, and whether the target business request has been proposed and passed by consensus in the blockchain network, and whether the corresponding target reentrancy key and target reentrancy value have been stored in the state database according to the target contract.
[0157] If the target reentrancy key exists in the state database, it means that the node had already received the target service request before receiving it this time, and the proposal corresponding to the service request had passed consensus, and the target service request had been executed. The reentrancy key and target reentrancy value corresponding to the execution result have been stored in the state database according to the target contract. Then, the target reentrancy value corresponding to the target reentrancy key is retrieved from the state database. Then, S1104 is executed.
[0158] If the target reentrancy key does not exist in the state database, it means that the node had not received the target service request before receiving it this time, or had received the target service request but did not ultimately execute it, and had not stored the reentrancy key corresponding to the execution result and the target reentrancy value into the state database according to the state contract. In this case, the target reentrancy value corresponding to the target reentrancy key is retrieved from the state database, resulting in a target reentrancy value of length 0, that is, the target reentrancy value is empty. In some embodiments, after obtaining the target reentrancy value, it can be converted into a byte array so that when the length of the byte array is identified as 0, it is determined that the target reentrancy value is empty.
[0159] If the target reentrancy key does not exist in the state database, the target business request needs to continue processing. In some embodiments, the process of continuing to process the target business request includes: if the target reentrancy key does not exist in the state database, obtaining the hash value of the target business request operation content; executing the target business request operation content to obtain the execution result of the target business request; obtaining the hash values of the target operator identifier and the target business operation identifier; using the fifth prefix, the target method name, and the hash values of the target operator identifier and the target business operation identifier as the sixth key; using the hash value of the target business request operation content and the execution result of the target business request as the sixth value corresponding to the sixth key; and storing the sixth key and the sixth value in the state database. Here, the sixth key corresponds to the target reentrancy key, the sixth value corresponds to the target reentrancy value, and the fifth prefix is the prefix of the target reentrancy key.
[0160] For example, the content of the sixth value and the corresponding field names can be shown in Table 4.
[0161] Table 4
[0162]
[0163] It should be noted that the processing of the target business request continues only after the proposal corresponding to the target business request has passed the consensus of the consensus nodes in the blockchain network.
[0164] S1104. If the first part of the target reentrant value matches the target business request operation content, then the second part of the target reentrant value is used as the execution result of the target business request and returned to the target data storage platform.
[0165] The target re-entry value corresponds to the sixth value. The first part of the target re-entry value is the hash value of the target business request operation content. In some embodiments, the matching of the first part of the target re-entry value with the target business request operation content may include: the first part of the target re-entry value being the same as the hash value of the target business request operation content. If the first part of the target re-entry value matches the target business request operation content, it indicates that the target business request corresponding to the target re-entry value is the same business request as the target business request received by the node in this instance. Therefore, the second part of the target re-entry value representing the execution result of the target business request can be directly returned to the data storage platform.
[0166] In another embodiment of this disclosure, the target reentrant value, also known as the sixth value, is the hash value of the target service request operation content and the content of the target service request execution result converted into a byte array. In this case, such as Figure 12 As shown, the reentrancy mechanism under the blockchain-based data processing method can include: S01 to S10.
[0167] S01: Receive the target business request. The target business request includes args[0]: the operation content of the target business request, and args[1]: the target signature + traceID (log identifier of the business layer, used to determine the life cycle of the target business request);
[0168] S02: Obtain the target reentrancy key based on the operatorId (target operation identifier) and the target method name;
[0169] S03: Retrieve the target reentrancy value from the target reentrancy key;
[0170] S04: Check if the length of the target re-entry value is 0. If the length of the target re-entry value is not 0, execute S05. If the length of the target re-entry value is 0, execute S07.
[0171] S05: Determine whether the target reentrant value is prefixed with the content of the byte array after converting the hash value of args[0]. If yes, execute S10; otherwise, execute S06.
[0172] S06: Returns a non-reentrant exception;
[0173] S07: Execute the business logic of the method;
[0174] S08: Are there any abnormalities?
[0175] S09: Concatenate the hash value of args[0] and the response string, convert the concatenated content into a byte array and put it into the target reentrant value. The response string is the execution result obtained in S07.
[0176] S10: Extract the content of the execution result of the target business request in the target reentrant value after converting it into a byte array, convert the content into a string format and return it.
[0177] exist Figure 11 or Figure 12 In the corresponding implementation, the process of processing business requests is as follows: Figure 13 As shown, it includes S1301 to S1318.
[0178] S1301: The user initiates a business request to the Data Collection Platform through the client;
[0179] S1302: After receiving the business request, the Data Storage Platform processes the business request and sends the processed business request to the blockchain backend. The request parameters of the processed business request include business parameters, user dynamic signature, and platform dynamic signature.
[0180] S1303: After receiving a business request from the Data Storage Platform, the blockchain backend (node) parses the business request. The parsing includes verifying the signature based on the user's dynamic signature and the platform's dynamic signature. After the signature verification is successful, S1304 is executed.
[0181] S1304: The blockchain backend calls the response method to execute the method logic based on the parsing result;
[0182] S1305, the blockchain backend determines whether the current business request is a reentrant business request at the contract layer. A reentrant business request refers to a business request that has a corresponding target reentrant key and target reentrant value stored in the state database.
[0183] S1306: If it is determined that the current business request is not a reentrant business request, the current business request is packaged into a block for proposal. After the consensus of the proposal is passed, the execution result of the business request is updated in the state data of the blockchain backend.
[0184] S1307: Deduct the corresponding points required for the service request from the user account that initiated the service request;
[0185] S1308: After updating the execution result in the status database, change the status of the digital collection corresponding to the business request, for example, change the owner of the digital collection from user 1;
[0186] S1309: The blockchain backend executes post-processing logic after the business request is executed at the contract layer;
[0187] S1310: The blockchain backend stores this business request as a completed business request in the database and returns a successful business request response message to the data storage platform.
[0188] S1311: When the Data Storage Platform does not receive a successful response message from the blockchain backend due to network jitter, it re-initiates the business request to the blockchain backend.
[0189] S1312: After receiving the business request sent again by the Data Storage Platform, the blockchain backend parses the business request. The parsing process is the same as in S1303, and will not be described again here.
[0190] S1313: After the blockchain backend completes the parsing of the business request, it calls the corresponding method to execute the method logic;
[0191] S1314: The blockchain backend determines whether the current business request is a reentrant business request at the contract layer. Since this business request is the second business request processed by the blockchain backend, and the processing of this business request has been completed in the previous one, it is determined that this business request is a reentrant business request.
[0192] S1315: Returns the result of the last execution of this service request;
[0193] S1316: The blockchain backend determines that the business request was successfully executed based on the execution result and returns a response message indicating that the business request was successful to the Data Storage Platform;
[0194] S1317: After receiving the successful response message from the Data Storage Platform, the Data Storage Platform sends a successful response message to the user's client.
[0195] S1318: After receiving the successful response message from the data storage platform, the user's client displays the successful business request to the user.
[0196] In some embodiments of this disclosure, Figure 2 , Figure 7 , Figure 9 , Figure 11 and Figure 12 In the corresponding embodiment, the structure of the mentioned block can be as follows: Figure 14 As shown. Figure 14 In a blockchain, a block consists of three parts: a block header, block data, and block metadata. The block number in the block header is an integer starting from 0 (the number of the genesis block), and it increments by 1 for each new block appended to the blockchain. The hash value of the previous block is the hash value of all data included in the previous block (including the block header, block data, and block metadata). The block data includes at least one transaction. Figure 14 The block data displayed in the block includes the first transaction and the Nth transaction (N is an integer greater than or equal to 1). The Merkle tree is a tree that stores hash values, and Kafka is a messaging system.
[0197] exist Figure 14The first two lines and the third line of each transaction constitute the transaction header. For example, for the first transaction, the header type-1, version, timestamp, channel ID, transaction ID, time information, transparent message payload, chaincode path, chaincode name, chaincode version, chaincode type, input (chaincode function, parameters), and timeout constitute the transaction header. The third line of each transaction (creator (certificate, public key) - client, corresponding signature value) constitutes the transaction signature, which is used to verify whether the transaction has been tampered with. The fifth line of each transaction (endorsing node identity group (certificate, public key), endorser node signature group) constitutes the endorsement of the transaction. The endorsing node is the node that simulates the execution of the proposal corresponding to the transaction and issues a verification pass response. The sixth line of each transaction (proposal hash value, chaincode event, response status, namespace) constitutes the proposal of the transaction. The seventh line (read set) and the eighth line (write set) of each transaction constitute the proposal return for that transaction. The read and write sets contain the simulated execution results returned by the endorsing nodes. After the consensus of the proposal corresponding to the transaction is passed, the data in the read and write sets is used to update the corresponding content in the state database.
[0198] In some embodiments of this disclosure, Figure 2 , Figure 7 , Figure 9 , Figure 11 and Figure 12 In the corresponding embodiment, the node can be a node in a consortium blockchain.
[0199] The blockchain-based data processing method provided in this disclosure, by deploying a target contract on nodes, allows nodes to store the target reentrancy key (sixth key) and target reentrancy value (sixth value) corresponding to the successful execution of a target business request in state data. This enables nodes to retrieve the target reentrancy value and, based on this value, determine that the received target business request has already been executed, directly obtain the execution result from the target reentrancy value and return it. By deploying the target contract on nodes, the method avoids the situation where a successful execution of a target business request is returned as a failure due to network jitter delays, ensuring that user clients do not receive incorrect execution results due to network jitter.
[0200] For example, under the blockchain-based data processing method provided in the various embodiments of this disclosure, the overall framework for processing business requests is as follows: Figure 15 As shown. Figure 15In this context, API stands for Application Programming Interface; the standard interaction protocol is the protocol standard corresponding to the blockchain and is related to the blockchain; the permission contract is used to store the permissions of different types of users to implement permission management; the digital collection transfer contract is used to realize the transfer of ownership of digital collections; the points contract is used to record the changes in points in user accounts; and the reentrancy mechanism contract is... Figure 11 The target contract in the corresponding embodiment.
[0201] exist Figure 15 Within the overall framework for processing business requests, as shown, when a user first enters Data Storage Platform A or Data Storage Platform B, they are required to undergo three-factor authentication. Upon successful authentication, both platforms generate corresponding public / private keys, object addresses, and object identifiers for the user. The public / private keys and object addresses correspond to the respective Data Storage Platforms, while the object identifiers generated by both platforms are identical. Subsequently, both platforms send registration requests to the nodes. These requests instruct the nodes to invoke the user contract to store the mapping relationship between the user's object address and object identifier on the Data Storage Platform into the node's state database.
[0202] Subsequent accesses to Data Platform A or Data Platform B by the user do not require further verification. For example, when a user sends a service request to a node through Data Platform A, Data Platform A verifies the signature of the service request using the public key corresponding to the user and Data Platform A. Once the signature is verified, the service request is processed. The processing of service requests by Data Platform A can be found in [link to relevant documentation]. Figure 13 S1302 in the corresponding embodiment will not be described again here. Afterwards, the data collection platform A sends the processed business request to the blockchain backend for parsing. Based on the parsing result and the standardized interaction protocol, it calls the corresponding contract to process the business request. For example, if the business request includes operations that require storing the mapping relationship between object identifiers and object addresses in the state database, the user contract is called for corresponding processing; or, for example, if the business request includes operations that require transferring digital collectibles, the digital collectible transfer contract is called for corresponding processing. If the current business request has already been executed, the previous execution result is directly returned according to the reentrant mechanism contract.
[0203] Figure 15 The standardized interaction protocol in the blockchain can be a meta-commodity protocol standard (such as Zhixin Chain), such as an interface standard defined by any of the public blockchains ERC-721, ERC-1155, ERC-20, etc. ERC stands for Ethereum Request for Comment, which means a protocol proposal submitted by the developer.
[0204] Figure 16 A block diagram of a blockchain-based data processing apparatus according to an embodiment of the present disclosure is illustrated. The apparatus is executed by any node in a blockchain network. Each node deploys user contracts and digital collectible contracts, and has a state database. The user contracts store in the state database an object identifier of a target object and a first mapping relationship between the target object and a first object address on a first digital collectible platform. The digital collectible contracts store in the state database digital collectible information and its corresponding holder address information. Figure 16 As shown, the device includes: a receiving module 1601, used to receive a first transaction request, the first transaction request including an object identifier; a determining module 1602, used to retrieve a first mapping relationship based on the object identifier in the first transaction request, and determine a first object address corresponding to the object identifier; the determining module 1602 is also used to determine the target digital collectible information owned by the target object based on the first object address and the digital collectible information stored in the status database and its corresponding holder address information.
[0205] In some embodiments of this disclosure, the user contract is further used to store a second mapping relationship between an object identifier and a second object address of a target object on the second digital collection platform in the state database; the target digital collection information includes first digital collection information owned by the target object on the first digital collection platform and second digital collection information owned by the target object on the second digital collection platform; wherein, the determining module 1602 is used to retrieve the second mapping relationship based on the object identifier in the first transaction request, determine the second object address corresponding to the object identifier; and return the first digital collection information and the second digital collection information based on the first object address and the second object address, as well as the digital collection information stored in the state database and its corresponding holder address information.
[0206] In some embodiments of this disclosure, the first mapping relationship includes a first key and a first value; the first key includes a first prefix and a first composite primary key, the first composite primary key including an object identifier and a first object address; the first value includes first platform object information of the target object on the first data storage platform; the second mapping relationship includes a second key and a second value; the second key includes a first prefix and a second composite primary key, the second composite primary key including an object identifier and a second object address; the second value includes second platform object information of the target object on the second data storage platform; the apparatus further includes: an acquisition module, configured to retrieve the first mapping relationship and the second mapping relationship based on the object identifier in the first transaction request, and obtain the first platform object information and the second platform object information; and a feedback module, configured to return the first platform object information and the second platform object information.
[0207] In some embodiments of this disclosure, the receiving module 1601 is further configured to receive a second transaction request, the second transaction request including first digital collectible information, a first object address, a second object address, and the contract name of the digital collectible contract; the determining module 1602 is further configured to determine, based on the first object address, the second object address, the first mapping relationship, and the second mapping relationship, that the first object address and the second object address in the second transaction request both correspond to a first object identifier; the device further includes a processing module, configured to, based on the contract name of the digital collectible contract, invoke the digital collectible contract and modify the holder address information of the first digital collectible information in the status database from the first object address to the second object address.
[0208] In some embodiments of this disclosure, the receiving module 1601 is further configured to receive a second transaction request, the second transaction request including a first object address; the apparatus further includes a retrieval module, configured to retrieve, based on the first object address in the second transaction request, whether a third mapping relationship exists between the first object address and an object identifier in the status database; and a feedback module, further configured to, if a third mapping relationship exists, return the object identifier corresponding to the first object address to indicate that the first object address verification has passed, wherein the user contract is further configured to store the third mapping relationship in the status database; and if no third mapping relationship exists, return a response message to indicate that the first object address verification has failed.
[0209] In some embodiments of this disclosure, the third mapping relationship includes a third key and a third value; the third key includes a second prefix and a first object address; the third value includes an object identifier.
[0210] In some embodiments of this disclosure, the receiving module 1601 is further configured to receive a first registration request from the first data storage platform, the first registration request including an object identifier, a first object address, a contract name of the user contract, a first object signature, and a first data storage platform signature; the processing module is further configured to, if the first object signature and the first data storage platform signature pass the verification, call the user contract according to the contract name of the user contract, and store in the state database a first mapping relationship between the object identifier and the first object address, and a third mapping relationship between the first object address and the object identifier.
[0211] In some embodiments of this disclosure, the node is also deployed with a standardized storage contract; the receiving module 1601 is also used to receive a digital collection series release transaction request, the digital collection series release transaction request including digital collection series metadata and the contract name of the standardized storage contract; the processing module is also used to call the standardized storage contract according to the contract name of the standardized storage contract, and store the digital collection series metadata in the form of key-value pairs in the state database.
[0212] In some embodiments of this disclosure, the digital collection series metadata includes the creator identifier, series name, platform address of the digital collection platform that published the digital collection series, and creator address; wherein, the processing module is used to store the hash value of the third prefix, creator identifier and series name as a fourth key; and to store the series name, platform address and creator address as a fourth value corresponding to the fourth key.
[0213] In some embodiments of this disclosure, the receiving module 1601 is further configured to receive a digital collectible publishing and trading request, the digital collectible publishing and trading request including digital collectible metadata and the contract name of the standardized storage contract; the processing module is further configured to call the standardized storage contract according to the contract name of the standardized storage contract, and store the digital collectible metadata in the form of key-value pairs in the state database.
[0214] In some embodiments of this disclosure, the digital collectible's metadata includes the creator's identifier, collectible name, digital collectible hash, platform address, creator's address, holder's address, series primary key of the digital collectible series, preview image link address of the digital collectible, and Uniform Resource Identifier (URI) of the digital collectible medium. A processing module is used to obtain a predetermined hash value for the creator's identifier, collectible name, and digital collectible hash; store a fourth prefix, the predetermined hash value, and a predetermined character as a fifth key; and store the collectible name, platform address, creator's address, holder's address, series primary key, preview image link address of the digital collectible, digital collectible hash, and URI of the digital collectible medium as a fifth value corresponding to the fifth key.
[0215] In some embodiments of this disclosure, the node further deploys a target contract; the receiving module 1601 is further configured to receive a target service request sent by the target data storage platform, the target service request carrying target service parameters, including a target service operation identifier, a target method name, a target operator identifier, a target service request operation content, and a target signature; the device further includes a generation module, configured to generate a target reentrancy key based on the target service operation identifier, target method name, and target operator identifier in the target service request after the target signature verification is passed; the processing module is further configured to, if the target reentrancy key exists in the state database, retrieve the target reentrancy value corresponding to the target reentrancy key from the state database; if the first part of the target reentrancy value matches the target service request operation content, return the second part of the target reentrancy value as the execution result of the target service request to the target data storage platform.
[0216] In some embodiments of this disclosure, the acquisition module 1601 is further configured to: obtain the hash value of the target business request operation content if the target reentrancy key does not exist in the state database; execute the target business request operation content to obtain the execution result of the target business request; obtain the hash values of the target operator identifier and the target business operation identifier; and the processing module is further configured to: use the fifth prefix, the target method name, and the hash values of the target operator identifier and the target business operation identifier as the sixth key; use the hash value of the target business request operation content and the execution result of the target business request as the sixth value corresponding to the sixth key; and store the sixth key and the sixth value in the state database.
[0217] Other aspects of the blockchain-based data processing apparatus disclosed herein can be found in the above embodiments.
[0218] It should be noted that although several units of the device for performing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0219] Figure 17 A schematic diagram of an electronic device suitable for implementing embodiments of the present disclosure is shown. It should be noted that... Figure 17 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0220] like Figure 17 As shown, the electronic device includes a central processing unit (CPU) 1701, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1702 or a program loaded from storage section 1708 into random access memory (RAM) 1703. The RAM 1703 also stores various programs and data required for system operation. The CPU 1701, ROM 1702, and RAM 1703 are interconnected via bus 1704. An input / output (I / O) interface 1705 is also connected to bus 1704.
[0221] The following components are connected to I / O interface 1705: an input section 1706 including a keyboard, mouse, etc.; an output section 1707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1708 including a hard disk, etc.; and a communication section 1709 including a network interface card such as a LAN card, modem, etc. The communication section 1709 performs communication processing via a network such as the Internet. Drive 1710 is also connected to I / O interface 1705 as needed. Removable media 1711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1710 as needed so that computer programs read from it can be installed into storage section 1708 as needed.
[0222] In particular, according to embodiments of this disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including methods for executing... Figure 2 , Figure 7 , Figure 9 , Figure 11 and Figure 12 The program code for the method shown. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1709, and / or installed from the removable medium 1711. When the computer program is executed by the central processing unit (CPU) 1701, it performs the various functions defined in the system of this application.
[0223] It should be noted that the computer-readable medium disclosed herein may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having at least one wire, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0224] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0225] The modules and / or units and / or sub-units described in the embodiments of this disclosure can be implemented in software or hardware, and the described modules and / or units and / or sub-units can also be located in a processor. The names of these modules and / or units and / or sub-units do not, in some cases, constitute a limitation on the module and / or unit and / or sub-unit itself.
[0226] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods as described in the following embodiments.
[0227] It should be noted that although several modules, units, or sub-units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules, units, or sub-units described above can be embodied in one module, unit, or sub-unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules, units, or sub-units.
[0228] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this disclosure.
Claims
1. A data processing method based on blockchain, characterized in that, The method is executed by any node in the blockchain network, which deploys user contracts and digital collectible contracts and has a state database. The user contract is used to store in the state database a first mapping relationship between the object identifier of the target object and the first object address of the target object on the first data storage platform, and a second mapping relationship between the object identifier and the second object address of the target object on the second data storage platform; The digital collectible contract is used to store digital collectible information and its corresponding holder address information in the status database. The method includes: Receive a first transaction request, the first transaction request including the object identifier; Based on the object identifier in the first transaction request, retrieve the first mapping relationship and the second mapping relationship, and determine the first object address and the second object address corresponding to the object identifier; Based on the first object address and the second object address, as well as the digital collection information and its corresponding holder address information stored in the status database, the target digital collection information owned by the target object is determined. The target digital collection information includes the first digital collection information owned by the target object on the first digital collection platform and the second digital collection information owned by the target object on the second digital collection platform. Receive a second transaction request, the second transaction request including the first digital collectible information, the first object address, the second object address, and the contract name of the digital collectible contract; Based on the first object address, the second object address, the first mapping relationship, and the second mapping relationship, it is determined that both the first object address and the second object address in the second transaction request correspond to the object identifier; Based on the contract name of the digital collectible contract, the digital collectible contract is invoked, and the holder address information of the first digital collectible information in the status database is modified from the first object address to the second object address.
2. The method according to claim 1, characterized in that, The first mapping relationship includes a first key and a first value; The first key includes a first prefix and a first composite primary key, wherein the first composite primary key includes the object identifier and the first object address; The first value includes the first platform object information of the target object on the first data storage platform; The second mapping relationship includes a second key and a second value; The second key includes the first prefix and the second composite primary key, and the second composite primary key includes the object identifier and the second object address; The second value includes the target object's second platform object information on the second data storage platform; The method further includes: Based on the object identifier in the first transaction request, the first mapping relationship and the second mapping relationship are retrieved to obtain the first platform object information and the second platform object information; Return the information of the first platform object and the information of the second platform object.
3. The method according to claim 1, characterized in that, Also includes: Receive a second transaction request, the second transaction request including the address of the first object; Based on the first object address in the second transaction request, retrieve whether a third mapping relationship exists between the first object address and the object identifier in the status database; If the third mapping relationship exists, the object identifier corresponding to the first object address is returned to indicate that the first object address has been verified, wherein the user contract is also used to store the third mapping relationship in the state database; If the third mapping relationship does not exist, a response message is returned to indicate that the first object address verification failed.
4. The method according to claim 3, characterized in that, The third mapping relationship includes a third key and a third value; The third key includes the second prefix and the address of the first object; The third value includes the object identifier.
5. The method according to claim 1, characterized in that, Also includes: Receive a first registration request from the first data storage platform, the first registration request including the object identifier, the first object address, the contract name of the user contract, the first object signature, and the first data storage platform signature; If the signature of the first object and the signature of the first data storage platform pass the verification, then according to the contract name of the user contract, the user contract is invoked to store the first mapping relationship between the object identifier and the first object address, and the third mapping relationship between the first object address and the object identifier in the state database.
6. The method according to claim 1, characterized in that, The nodes are also deployed with standardized storage contracts; The method further includes: Receive a digital collectible series release transaction request, wherein the digital collectible series release transaction request includes digital collectible series metadata and the contract name of the standardized storage contract; Based on the contract name of the standardized storage contract, the standardized storage contract is invoked to store the digital collection series metadata in the state database in the form of key-value pairs.
7. The method according to claim 6, characterized in that, The metadata of the digital collection series includes the creator's identifier, series name, platform address of the digital collection platform that published the digital collection series, and creator's address; Specifically, storing the digital collection series metadata in the status database in the form of key-value pairs includes: Store the hash values of the third prefix, the creator identifier, and the series name as the fourth key; The series name, the platform address, and the creator address are stored as a fourth value corresponding to the fourth key.
8. The method according to claim 6, characterized in that, Also includes: Receive a digital collectible release and transaction request, wherein the digital collectible release and transaction request includes digital collectible metadata and the contract name of the standardized storage contract; Based on the contract name of the standardized storage contract, the standardized storage contract is invoked to store the digital collection metadata in the state database in the form of key-value pairs.
9. The method according to claim 8, characterized in that, The digital collectible's metadata includes the creator's identifier, collectible name, digital collectible hash, platform address, creator's address, holder's address, series primary key of the digital collectible series, preview image link address of the digital collectible, and digital collectible medium Uniform Resource Identifier. Specifically, storing the digital collection metadata in the status database in the form of key-value pairs includes: Obtain the creator identifier, the collection name, and the predetermined hash value of the digital collection hash; Store the fourth prefix, the predetermined hash value, and the predetermined character as the fifth key; The collection name, platform address, creator address, holder address, series primary key, preview image link address of the digital collection, digital collection hash, and digital collection medium Uniform Resource Identifier are stored as the fifth value corresponding to the fifth key.
10. The method according to claim 1, characterized in that, The node also deploys the target contract; The method further includes: Receive a target service request sent by the target data storage platform. The target service request carries target service parameters, which include a target service operation identifier, a target method name, a target operator identifier, a target service request operation content, and a target signature. After the target signature verification is successful, a target reentrancy key is generated based on the target service operation identifier, the target method name, and the target operator identifier in the target service request; If the target reentrancy key exists in the state database, then the target reentrancy value corresponding to the target reentrancy key is obtained from the state database; If the first part of the target reentrant value matches the target service request operation content, then the second part of the target reentrant value is used as the execution result of the target service request and returned to the target data storage platform.
11. The method according to claim 10, characterized in that, Also includes: If the target reentrancy key does not exist in the state database, then the hash value of the target business request operation content is obtained; Execute the target service request operation content and obtain the execution result of the target service request; Obtain the hash values of the target operator identifier and the target business operation identifier; The hash values of the fifth prefix, the target method name, the target operator identifier, and the target business operation identifier are used as the sixth key; The hash value of the target business request operation content and the execution result of the target business request are used as the sixth value corresponding to the sixth key; The sixth key and the sixth value are stored in the state database.
12. A data processing device based on blockchain, characterized in that, The device is executed by any node in the blockchain network, the node having deployed user contracts and digital collection contracts, and the node having a state database; The user contract is used to store in the state database a first mapping relationship between the object identifier of the target object and the first object address of the target object on the first data storage platform, and a second mapping relationship between the object identifier and the second object address of the target object on the second data storage platform; The digital collectible contract is used to store digital collectible information and its corresponding holder address information in the status database. The device includes: A receiving module is configured to receive a first transaction request, wherein the first transaction request includes the object identifier; The determining module is configured to retrieve the first mapping relationship and the second mapping relationship based on the object identifier in the first transaction request, and determine the first object address and the second object address corresponding to the object identifier; The determining module is further configured to determine the target digital collection information owned by the target object based on the first object address, the second object address, and the digital collection information and its corresponding holder address information stored in the status database. The target digital collection information includes the first digital collection information owned by the target object on the first digital collection platform and the second digital collection information owned by the target object on the second digital collection platform. The receiving module is further configured to receive a second transaction request, the second transaction request including the first digital collectible information, the first object address, the second object address, and the contract name of the digital collectible contract; The determining module is further configured to determine, based on the first object address, the second object address, the first mapping relationship, and the second mapping relationship, that both the first object address and the second object address in the second transaction request correspond to the object identifier; The processing module is used to call the digital collectible contract according to the contract name of the digital collectible contract, and modify the holder address information of the first digital collectible information in the status database from the first object address to the second object address.
13. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the blockchain-based data processing method as described in any one of claims 1 to 11.
14. An electronic device, characterized in that, include: At least one processor; A storage device configured to store at least one program, which, when executed by the at least one processor, causes the at least one processor to implement the blockchain-based data processing method as described in any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the blockchain-based data processing method as described in any one of claims 1 to 11.