Digital collection processing method and device applied to block chain platform
Through layered storage and dynamic processing of information, the problem of increasing demand for blockchain storage is solved, the processing efficiency and data integrity of digital collections are improved, and the storage cost and failure risk are reduced.
Patent Information
- Application Number
- CN202510606439.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-12
AI Technical Summary
The immutability and decentralization of blockchain require each node to store a copy of the complete data, resulting in accelerated wear of the computer's flash memory unit and increased storage demand.
Processing digital collections through hierarchical storage, including on-chain storage data and off-chain storage data, setting processing time interval thresholds and cumulative processing times, dynamically collecting processing information, and repairing and updating off-chain storage indexes to embedding distributed ledgers.
It improves the processing efficiency of digital collections, optimizes storage methods, reduces storage space requirements, ensures data integrity and robustness, and reduces the risk of single point failure.
Smart Images

Figure CN120474680A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and more particularly to a method, device, electronic device, and computer-readable medium for processing digital collections applied to a blockchain platform. Background Art
[0002] In recent years, digital collectibles, as an emerging form of digital assets, have received increasing attention and application, especially in the fields of art, music, video, virtual land, etc. These digital collectibles are usually in the form of non-fungible tokens (NFTs), and their uniqueness, ownership, and related processing security are ensured by blockchain technology.
[0003] However, despite the significant advantages of digital collection technology in ensuring uniqueness, ownership, and data transparency, the following technical problems often arise with the booming digital collection market:
[0004] The immutability and decentralization of blockchain require each node to store a copy of the complete data, which increases the demand for storage and causes the computer's flash memory cells to wear out faster.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the Invention
[0006] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] Some embodiments of the present disclosure propose digital collection processing methods, devices, electronic devices, and computer-readable media applied to a blockchain platform to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a digital collection processing method applied to a blockchain platform, comprising: obtaining a processing request for a target digital collection initiated by a target user on the blockchain platform, wherein the target digital collection is stored in a hierarchical storage manner, including: on-chain storage data and off-chain storage data; in response to the target user being a first type of user, determining whether the time interval between the time corresponding to the processing request and the last processing time corresponding to the target digital collection reaches a preset threshold; in response to the time interval reaching the preset threshold and the cumulative number of processing times corresponding to the target digital collection being less than a preset maximum number, determining processing receipt information for processing the target digital collection based on the cumulative number of processing times; adding the processing receipt information to the address corresponding to the target digital collection to obtain first updated on-chain storage data, wherein the first updated on-chain storage data includes an off-chain storage index corresponding to the target digital collection; in response to the off-chain storage data corresponding to the off-chain storage index being incomplete, repairing the off-chain storage data and updating the off-chain storage index to obtain second updated on-chain storage data; and embedding the second updated on-chain storage data into a distributed ledger to obtain an updated target digital collection.
[0009] In a second aspect, some embodiments of the present disclosure provide a digital collection processing device applied to a blockchain platform, comprising: an acquisition unit, configured to acquire a processing request for a target digital collection initiated by a target user on the blockchain platform, wherein the target digital collection is stored in a hierarchical storage manner, including: on-chain storage data and off-chain storage data; a determination unit, configured to determine, in response to the target user being a first type of user, whether the time interval between the time corresponding to the processing request and the last processing time corresponding to the target digital collection reaches a preset threshold; a processing collection unit, configured to determine, in response to the time interval reaching the preset threshold and the cumulative number of processing times corresponding to the target digital collection being less than The preset maximum number of times, based on the above-mentioned cumulative processing times, determines the processing collection information for processing the above-mentioned target digital collection; the first update unit is configured to add the above-mentioned processing collection information to the address corresponding to the above-mentioned target digital collection, and obtain the first updated on-chain storage data, wherein the above-mentioned first updated on-chain storage data includes the off-chain storage index corresponding to the above-mentioned target digital collection; the second update unit is configured to repair the above-mentioned off-chain storage data and update the above-mentioned off-chain storage index in response to the off-chain storage data corresponding to the above-mentioned off-chain storage index being incomplete, and obtain the second updated on-chain storage data; the third update unit is configured to embed the above-mentioned second updated on-chain storage data into the distributed ledger, and obtain the updated target digital collection.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0012] The aforementioned embodiments of the present disclosure have the following beneficial effects: The digital collection processing methods applied to blockchain platforms, as provided by some embodiments of the present disclosure, effectively improve the processing efficiency of digital collections while optimizing storage methods. Specifically, the aforementioned technical issues arise from the fact that the immutability and decentralized nature of blockchains require each node to store a complete copy of data, which increases storage requirements and accelerates the wear of a computer's flash memory cells. Based on this, the digital collection processing methods applied to blockchain platforms in some embodiments of the present disclosure first obtain a processing request for a target digital collection initiated by a target user on the blockchain platform. The target digital collection is stored in a tiered storage format, including on-chain and off-chain data. Lightweight processing of the on-chain data eliminates the need to transfer actual files, significantly reducing storage space. Then, in response to the target user being a first-type user, the process determines whether the time interval between the time corresponding to the processing request and the time of the last processing of the target digital collection reaches a preset threshold. By setting this preset threshold, the processing efficiency of the digital collection can be effectively improved. Then, in response to the time interval reaching a preset threshold and the cumulative number of processing times corresponding to the target digital artifact being less than a preset maximum number, processing receipt information for the target digital artifact is determined based on the cumulative number of processing times. Dynamically collecting processing information can incentivize users to conduct reasonable transactions. Secondly, the processing receipt information is added to the address corresponding to the target digital artifact to obtain first updated on-chain storage data, where the first updated on-chain storage data includes the off-chain storage index corresponding to the target digital artifact. Collecting processing information on-chain can improve the efficiency of processing digital artifacts. Thirdly, in response to the off-chain storage data corresponding to the off-chain storage index being incomplete, the off-chain storage data is repaired and the off-chain storage index is updated to obtain second updated on-chain storage data. Repairing the off-chain storage data ensures data integrity. Updating the off-chain storage index improves query efficiency. Finally, the second updated on-chain storage data is embedded in the distributed ledger to obtain an updated target digital artifact. Layered storage can reduce the risk of single points of failure, the repair mechanism can improve the robustness of the processing platform, and the synchronization of on-chain and off-chain data can ensure data integrity. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1is a flowchart of some embodiments of a method for processing digital collections applied to a blockchain platform according to the present disclosure;
[0015] Figure 2 Schematic diagram of the structure of some embodiments of the digital collection processing device applied to the blockchain platform according to the present disclosure;
[0016] Figure 3 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
[0019] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] refer to Figure 1 , shows a process 100 of some embodiments of the digital collection processing method applied to the blockchain platform according to the present disclosure. The digital collection processing method applied to the blockchain platform includes the following steps:
[0024] Step 101: Obtain a processing request for a target digital collection initiated by a target user on a blockchain platform.
[0025] In some embodiments, the execution entity for the digital collection processing applied to the blockchain platform can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as multiple software programs or software modules to provide distributed services, or as a single software program or software module. This is not specifically limited here.
[0026] In other embodiments, the execution entity may obtain a processing request for a target digital collectible initiated by a target user on the blockchain platform. The target digital collectible is stored in a layered storage format, including on-chain and off-chain data. The target user is a specific entity interacting with the digital collectible on the blockchain platform and may be the subject of digital collectible processing. In a digital collectible transaction scenario, the target user may be the purchaser or creator of the digital collectible. The blockchain platform may be a distributed ledger system that supports the full lifecycle management of digital collectibles. The processing request may be a specific operation instruction initiated by a user on the blockchain platform for the digital collectible. In practice, a processing request in a digital collectible transaction scenario may be a purchaser clicking a "Buy Now" button on the transaction platform, or a creator clicking a "Set" button to set metadata for the digital collectible. The target digital collectible may be a unique digital asset issued on the blockchain platform. In practice, the target digital collectible may be a music album, streaming video, digital painting, or game item. The on-chain stored data includes metadata corresponding to the target digital collectible and a complete transfer history. This metadata may include a unique identifier, creator information, and issuance details. The complete transfer record can include the time of each ownership change. The above-mentioned off-chain storage data can be the actual target digital collection.
[0027] Step 102: In response to the target user being a first type of user, determining whether the time interval between the time corresponding to the processing request and the last processing time corresponding to the target digital collection reaches a preset threshold.
[0028] In some embodiments, the execution entity may determine whether the time interval between the time corresponding to the processing request and the last processing time corresponding to the target digital collection reaches a preset threshold in response to the target user being a first type user. The first type may be a user category with a specific identity or authority, for example, ordinary users and new users may belong to the first type. In practice, the first type of user may be a music album purchaser. The time corresponding to the processing request may be the processing time for request processing of the target digital collection. In practice, the time corresponding to the processing request may be the time when the music album purchaser clicks the "Buy Now" button. The last processing time may be the timestamp when the target digital collection is last processed on the blockchain. For example, if user A transfers a digital collection at 10:00 on May 1, the time will be recorded as the "last processing time" by the smart contract.
[0029] In some optional implementations of some embodiments, the execution entity may, in response to the target user being a first type of user, determine whether the time interval between the time corresponding to the processing request and the time when the target digital artifact was last processed reaches a preset threshold, which may include the following steps:
[0030] The first step is to obtain the basic parameters pre-set in the smart contract corresponding to the target digital collectible. The basic parameters include: a reasonable processing time interval, a maximum number of processing times within a predetermined time period, and a time expansion factor. The reasonable time interval can be the valid time range preset in the smart contract that allows users to perform processing operations. The maximum number of processing times within the predetermined time period can be the maximum frequency limit set in the smart contract that allows users to perform specific operations within a fixed period (such as 24 hours). The time expansion factor can be a variable parameter used by the smart contract to dynamically adjust the processing waiting time.
[0031] In a second step, in response to the actual number of processing times corresponding to the target digital artifact being greater than the maximum number of processing times within the predetermined time period, a preset threshold is determined based on the reasonable processing time interval and the time expansion factor. The actual number of processing times corresponding to the target digital artifact can be obtained through real-time tracking by the processing platform.
[0032] In practice, the above preset threshold can be determined by the following formula:
[0033] When p>t2, t4=t1(1+t3),
[0034] Where p is the actual number of processing times corresponding to the target digital artifact. t2 is the maximum number of processing times within a predetermined time period. t4 is the preset threshold for the time interval. t1 is the reasonable processing time interval. t3 is the time expansion coefficient.
[0035] In some optional implementations of some embodiments, the execution entity may further display a message rejecting the processing request to the target user via the blockchain platform in response to the time interval not reaching the preset threshold. For example, if the preset threshold for a certain digital collectible is 24 hours, and the user sends a processing request after 18 hours, the execution entity may display a message rejecting the processing request to the user via the front-end page of the multi-blockchain platform.
[0036] Step 103: In response to the time interval reaching a preset threshold and the cumulative number of processing times corresponding to the target digital collection being less than a preset maximum number, determine the processing collection information for processing the target digital collection based on the cumulative number of processing times.
[0037] In some embodiments, the execution entity may determine processing fee information for the target digital artifact based on the cumulative processing times, in response to the time interval reaching a preset threshold and the cumulative number of processing times corresponding to the target digital artifact being less than a preset maximum number. The cumulative processing times may be the recorded number of transfers of a specific digital artifact, stored in the smart contract and updated as the number of transfers increases. For example, if a digital artifact has been transferred eight times since its creation, the cumulative processing times would be eight. The processing fee information may be information that automatically triggers resource allocation during the processing of the digital artifact. In digital artifact transaction scenarios, when a user conducts a transaction, the system writes this dynamic fee information to the on-chain storage data, generating updated on-chain storage data. The addresses added to the target digital artifact may include the address of the target digital artifact creator and the address of the processing platform in the smart contract. For example, the digital artifact creator and the processing platform may share the profits according to a pre-set ratio.
[0038] In some optional implementations of some embodiments, the execution entity may determine, in response to the time interval reaching a preset threshold and the cumulative number of processing times corresponding to the target digital artifact being less than a preset maximum number, processing information collected for processing the target digital artifact based on the cumulative number of processing times, which may include the following steps:
[0039] In the first step, in response to the time interval reaching a preset threshold, it is determined whether the cumulative number of processing times is less than a preset maximum number of times. The preset maximum number of times is the maximum number of times the creator of the target digital collectible can process the target digital collectible. For example, the creator of a game item may have set the maximum number of times for the corresponding game item to 50.
[0040] In the second step, in response to the cumulative number of processing times being less than a preset maximum number, the processing receipt information for the target digital artifact is determined based on the receipt information corresponding to the target digital artifact, the dynamic receipt information ratio, and the cumulative number of processing times. The receipt information corresponding to the target digital artifact and the dynamic receipt information ratio are pre-set in the smart contract by the creator of the target digital artifact. The cumulative number of processing times corresponding to the target digital artifact is obtained from the smart contract.
[0041] In practice, the above processing and collection information can be obtained through the following formula:
[0042] e=a×(1+d) b
[0043] Where, e is the processing and collection information. a is the collection information corresponding to the target digital collection. d is the dynamic collection information ratio. b is the cumulative number of processing times.
[0044] In the third step, in response to the time interval reaching the preset threshold and the cumulative number of processing times being no less than the preset maximum number, the target digital collectible is destroyed. Destruction refers to marking the corresponding target digital collectible as unavailable, thereby prohibiting its trading, i.e., destroying the validity of the collectible, making it no longer eligible for trading. This destruction operation can be performed not only within the digital collectible trading market, but also by destroying related records on the blockchain.
[0045] Step 104: Add the processed collection information to the address corresponding to the target digital collection to obtain the first updated on-chain storage data.
[0046] In some embodiments, the above-mentioned execution entity may add the above-mentioned processed collection information to the address corresponding to the above-mentioned target digital collection to obtain the first updated on-chain storage data, wherein the above-mentioned first updated on-chain storage data includes the off-chain storage index corresponding to the above-mentioned target digital collection.
[0047] Step 105: In response to the off-chain storage data corresponding to the off-chain storage index being incomplete, the off-chain storage data is repaired and the off-chain storage index is updated to obtain second updated on-chain storage data.
[0048] In some embodiments, the execution entity may, in response to the incompleteness of the off-chain storage data corresponding to the off-chain storage index, repair the off-chain storage data and update the off-chain storage index to obtain the second updated on-chain storage data. In practice, when the off-chain storage data (such as an IPFS file) is incomplete due to a transmission error or version conflict, the system can detect the data inconsistency through a hash check (such as SHA-256) and automatically trigger a repair process: re-upload the complete file to IPFS to generate a new off-chain storage index and update the on-chain storage data.
[0049] In some optional implementations of some embodiments, the execution entity may, in response to the incompleteness of the off-chain storage data corresponding to the off-chain storage index, repair the off-chain storage data and update the off-chain storage index to obtain second updated on-chain storage data. This may include the following steps:
[0050] The first step is to generate the off-chain storage index and off-chain storage data:
[0051] Sub-step 1: Obtain the storage proof corresponding to the target digital collection from the target oracle. This storage proof is a cryptographic verification mechanism between the blockchain and off-chain data storage, ensuring that the processing platform has fully preserved the user data. In practice, this target oracle can be either Chainlink or Filecoin.
[0052] Sub-step 2: Based on the above storage proof, the target oracle is used to generate the hash value corresponding to the off-chain storage data. First, the target oracle is used to obtain the off-chain storage data through the storage proof, and then the hash value of the off-chain storage data is determined.
[0053] Sub-step three: Determine whether the off-chain data corresponding to the off-chain storage index is complete by comparing the hash value corresponding to the off-chain data with the hash value corresponding to the on-chain data. Compare the hash value corresponding to the off-chain data with the hash value corresponding to the on-chain data to obtain a comparison result. If the comparison results are the same, the off-chain data is complete. If the comparison results are different, the off-chain data is incomplete.
[0054] Sub-step 4: In response to determining that the off-chain stored data is complete, determining the on-chain stored data as the second updated on-chain stored data. The second updated on-chain stored data includes metadata and processing records corresponding to the target digital artifact. The metadata includes the updated off-chain storage index.
[0055] In the second step, in response to determining that the off-chain stored data is incomplete, the off-chain stored data corresponding to the target digital artifact is re-uploaded from the backup node corresponding to the target digital artifact, thereby obtaining repaired off-chain stored data and an updated off-chain storage index, wherein the address list corresponding to the backup node is stored in the smart contract corresponding to the target digital artifact. Uploading the complete off-chain stored data corresponding to the target digital artifact from the backup node can overwrite the damaged data to generate repaired off-chain stored data.
[0056] In the third step, the updated off-chain storage index is used as the off-chain storage index, and the repaired off-chain storage data is used as the off-chain storage data, and the above generation steps are continued.
[0057] The above-mentioned step 105 and its related contents serve as an inventive point of an embodiment of the present disclosure, and solve the above-mentioned technical problem that "the immutability and decentralization characteristics of the blockchain require each node to store a copy of the complete data, which increases the demand for storage and causes the computer's flash memory unit to wear out faster." However, the repair of off-chain stored data in the above-mentioned technical solution relies on re-uploading the data from the backup node, which is often suitable for storing small files. However, for large file storage, it often leads to high redundancy costs and limited repair efficiency. The technical problem faced in repairing off-chain stored data is how to reduce the redundancy cost of off-chain storage and improve the repair efficiency. Therefore, it can be decided to adopt the following solution.
[0058] Optionally, the execution entity may repair the off-chain stored data, which may include the following steps:
[0059] The first step is to obtain a sharded dataset corresponding to the off-chain stored data. The sharded dataset contains a unique hash value corresponding to each shard. The sharded data includes a first target number of data shards into which the off-chain stored data is partitioned, and a second target number of parity shards generated using a target algorithm. For example, the off-chain stored data can be partitioned into m shards, and n parity shards can be generated using a target algorithm. In practice, the target algorithm can be a Reed-Solomon algorithm or a Locally Repairable Code algorithm.
[0060] The second step is to distribute the sharded datasets across the target network nodes and generate a shard index table. This table represents the correspondence between the hash values of each shard and the target network nodes. For example, the hash QmA1 of shard 1 is stored on node X, and the hash QmA2 of shard 2 is stored on node Y.
[0061] The third step is to periodically scan the node status of the target network using the target oracle. This regularly scans the node status of the target network to ensure that off-chain data has not been tampered with or lost. The target oracle can be a status monitoring oracle or a data verification oracle.
[0062] Step 4: In response to the node failure or shard inaccessibility, the node is marked as a shard to be repaired. A node failure may be caused by a target oracle detecting a node unresponsiveness or timeout. A shard inaccessibility may be caused by a shard hash check failure.
[0063] The fifth step is to obtain an available shard set according to the shard index table, wherein the available shard set includes a subset of the shard data set excluding the shard to be repaired and the verification shard set.
[0064] Step 6: Use the target decoding algorithm to reconstruct the shard to be repaired using the available shard set, obtaining the repaired shard data. For example, if the off-chain data stored is a high-definition movie, with 10 data shards and 5 parity shards, and one of the data shards is lost due to a node going offline, the target algorithm is used to reconstruct the lost data shard using the remaining 9 data shards and 5 parity shards. In practice, the target decoding algorithm can be a Reed-Solomon algorithm or an XOR parity check algorithm.
[0065] In step 7, in response to the hash value of the repaired shard data being consistent with the hash value of the original shard corresponding to the shard to be repaired, the repaired shard data is used to replace the shard to be repaired and the shard index table is updated to obtain an updated shard index table. The shard index table is also updated synchronously to record the storage location and hash value of the new shard for subsequent access.
[0066] The above optional steps and their related contents serve as an inventive point of an embodiment of the present disclosure, and solve the above technical problem of "how to reduce the redundant cost of off-chain storage and improve the repair efficiency". The factors that lead to the above technical problems are often as follows: a complete copy of the off-chain storage data needs to be stored, and the off-chain storage space occupancy increases linearly with the size of the file. When repairing files with large storage volumes, the bandwidth of the backup node may become a bottleneck. Solving the above factors can ensure that the redundant cost of off-chain storage is reduced and the repair efficiency is improved. First, obtain the sharded data set corresponding to the above-mentioned off-chain storage data, wherein the above-mentioned sharded data set includes a check shard, which allows data to be reconstructed even if some data shards fail. Sharded storage can reduce redundancy costs. In addition, only the shards to be repaired are repaired, which improves the repair efficiency.
[0067] When using the above solution to repair off-chain stored data, if the target digital collection is a streaming video, the following technical issue often arises: "How to ensure the visual coherence of the repaired content?" Factors that often contribute to this technical issue include: The use of mathematical repair methods lacks a semantic understanding of the data content. Therefore, the following solution can be used:
[0068] Optionally, the execution entity may repair the off-chain stored data, which may include the following steps:
[0069] The first step is to obtain the sharded data set corresponding to the off-chain storage data. The sharded data set contains the unique hash value corresponding to each shard data.
[0070] The second step is to periodically scan the node status of the target network through the target oracle. In practice, the target oracle can be a status monitoring oracle or a data verification oracle.
[0071] Step 3: In response to the node failure or shard inaccessibility, the node is marked as a shard to be repaired. A node failure may be detected as unresponsive or timed out by the target oracle. A shard inaccessibility may be caused by a shard hash check failure.
[0072] The fourth step is to obtain adjacent slices of the slice to be repaired from the sliced dataset as undamaged slice data and obtain an initial repair model. The initial repair model includes an encoder and a decoder. For example, the encoder may include a convolutional layer, a batch normalization layer, a ReLU loss function, and a max pooling layer; the decoder may include a transposed convolutional layer, a convolutional layer, a skip connection, and a final convolutional layer. The encoder compresses the slice into a latent space representation, and the decoder reconstructs the slice from the latent space.
[0073] In the fifth step, the fragments to be repaired, their corresponding metadata, and the undamaged data are preprocessed to obtain preprocessed data. The preprocessed data includes the preprocessed fragments to be repaired, their corresponding metadata, and the undamaged data. By normalizing and denoising this data, numerical discrepancies can be prevented from affecting model training. For example, the pixel values of the fragments can be uniformly scaled to [0, 1].
[0074] In the sixth step, the preprocessed data is randomly masked to generate an augmented dataset. This random masking simulates damage and generates adversarial examples to enhance the robustness of the model. For example, a binary mask can be generated based on the mask ratio. For example, a mask ratio of 0.2 could indicate that 20% of the data is masked.
[0075] In the seventh step, the initial restoration model is trained using the preprocessed data and the augmented dataset to obtain a trained restoration model. First, the fragment to be restored and the metadata corresponding to the fragment to be restored in the preprocessed data are input into the encoder to obtain the encoder-reconstructed fragment. Then, the encoder and decoder parameters are updated using the target loss function based on the preprocessed undamaged data and the encoder-reconstructed fragment. Finally, a trained restoration model is obtained. In practice, the target loss function can be the MSE loss function or the SSIM loss function.
[0076] Step 8: Use the trained repair model to repair the shard to be repaired, and obtain the repaired shard. The trained repair model can be directly used to repair the damaged shard.
[0077] In step 9, in response to the hash value of the repaired shard being consistent with the hash value of the original shard corresponding to the shard to be repaired, the repaired shard data is replaced with the shard to be repaired and the corresponding hash value and the off-chain storage index are updated. The off-chain storage index is synchronized and the hash value of the repaired shard is recorded for subsequent access.
[0078] The above optional steps and their related content, as an inventive feature of the embodiments of this disclosure, address the aforementioned technical problem of "ensuring visual coherence of restored content." Factors contributing to this technical problem are often as follows: Mathematical restoration methods lack a semantic understanding of the data content. However, this invention significantly improves visual coherence by learning data distribution and semantic associations. Through adversarial training, both local details and global consistency can be optimized simultaneously.
[0079] In some optional implementations of some embodiments, the above execution entity may further perform the following steps:
[0080] In the first step, in response to the user being a second type user, processing information for processing the target digital collection is determined based on the cumulative number of processing times corresponding to the target digital collection. The specific implementation method is similar to the implementation method corresponding to the first type user and will not be repeated here.
[0081] The second step is to add the above-mentioned processed information to the address corresponding to the above-mentioned target digital collection to obtain the first updated on-chain storage data, wherein the above-mentioned first updated on-chain storage data includes the off-chain storage index corresponding to the above-mentioned target digital collection. The specific implementation method is referred to the implementation method corresponding to the first type of user and will not be repeated here.
[0082] In the third step, in response to the incomplete off-chain storage data corresponding to the off-chain storage index, the off-chain storage data is repaired and the off-chain storage index is updated to obtain the second updated on-chain storage data. The specific implementation method is referred to the implementation method corresponding to the first type of user, and will not be repeated here.
[0083] The fourth step is to embed the second updated on-chain storage data into the distributed ledger to obtain the updated target digital collection.
[0084] In the fifth step, in response to the user being identified as a Type 3 user, the smart contract corresponding to the target digital collectible is used to manage global permissions. This smart contract inherits from ERC721, a blockchain-based standard for non-fungible tokens, ensuring the uniqueness of each digital collectible and recording transaction history. The smart contract also integrates AccessControl to manage permissions for users with different roles. Global permissions can be managed by assigning different addresses to different users, thereby granting them corresponding permissions.
[0085] In step 6, in response to the user being a fourth type user, metadata corresponding to the target digital collection is set via a smart contract. The metadata corresponding to the target digital collection includes: name, description, off-chain storage index, hash value, and copyright and legal information.
[0086] The aforementioned embodiments of the present disclosure have the following beneficial effects: The digital collectible processing methods applied to blockchain platforms, as provided by some embodiments of the present disclosure, enable more standardized and orderly operation, providing users with a more stable and secure trading environment while also addressing the high file storage costs of blockchain platforms. Specifically, the aforementioned technical issues arise from the lack of effective constraints on various behaviors during digital collectible transactions, and the immutability and decentralized nature of blockchains require each node to store a complete copy of the data, resulting in increased storage requirements. Based on this, the digital collectible processing methods applied to blockchain platforms in some embodiments of the present disclosure first obtain a processing request for a target digital collectible initiated by a target user on the blockchain platform. The target digital collectible is stored in a tiered storage system, including on-chain and off-chain data. Lightweight processing of the on-chain data eliminates the need to transmit actual files, significantly reducing storage space. By setting a processing time interval threshold and dynamically collecting processing information, the aforementioned method can effectively reduce the risk of speculation associated with high-frequency trading and encourage users to trade rationally, by setting the preset threshold. By collecting processing information on-chain, the process is transparent and open, improving processing efficiency. Secondly, in response to the incompleteness of the off-chain storage data corresponding to the off-chain storage index, the off-chain storage data is repaired and the off-chain storage index is updated, resulting in second, updated on-chain storage data. Repairing the off-chain storage data ensures data integrity. Updating the off-chain storage index optimizes query efficiency. Finally, the second, updated on-chain storage data is embedded in the distributed ledger, resulting in an updated target digital collectible. Layered storage reduces the risk of single points of failure, the repair mechanism improves the robustness of the processing platform, and the synchronization of on-chain and off-chain data ensures data integrity.
[0087] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a digital collection processing device applied to a blockchain platform. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the digital collection processing device applied to the blockchain platform can be specifically applied to various electronic devices.
[0088] like Figure 2As shown, a digital collection processing device 200 applied to a blockchain platform includes: an acquisition unit 201, a determination unit 202, a processing and receiving unit 203, a first update unit 204, a second update unit 205 and a third update unit 206. The acquisition unit 201 is configured to acquire a processing request for a target digital collection initiated by a target user on the blockchain platform, wherein the target digital collection is stored in a layered storage manner, including: on-chain storage data and off-chain storage data; the determination unit 202 is configured to, in response to the target user being a first type of user, determine whether the time interval between the time corresponding to the processing request and the last processing time corresponding to the target digital collection reaches a preset threshold; the processing and receiving unit 203 is configured to, in response to the time interval reaching the preset threshold and the cumulative number of processing times corresponding to the target digital collection being less than the preset maximum number, determine based on the cumulative number of processing times. The processing collection information of the above-mentioned target digital collection is determined; the first update unit 204 is configured to add the above-mentioned processing collection information to the address corresponding to the above-mentioned target digital collection, and obtain the first updated on-chain storage data, wherein the above-mentioned first updated on-chain storage data includes the off-chain storage index corresponding to the above-mentioned target digital collection; the second update unit 205 is configured to repair the above-mentioned off-chain storage data and update the above-mentioned off-chain storage index in response to the off-chain storage data corresponding to the above-mentioned off-chain storage index being incomplete, and obtain the second updated on-chain storage data; the third update unit 206 is configured to embed the above-mentioned second updated on-chain storage data into the distributed ledger, and obtain the updated target digital collection.
[0089] It is understandable that the various units recorded in the digital collection processing device 200 applied to the blockchain platform are similar to the reference Figure 1 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method are also applicable to the digital collection processing device 200 applied to the blockchain platform and the units contained therein, and will not be repeated here.
[0090] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, an electronic device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0091] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. Various programs and data required for the operation of the electronic device 300 are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0092] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as needed.
[0093] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.
[0094] It should be noted that in some embodiments of the present disclosure, the computer-readable medium mentioned above may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the 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, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0095] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0096] The computer-readable medium may be included in the electronic device, or may exist independently and not incorporated into the electronic device. The computer-readable medium carries one or more programs. When executed by the electronic device, the one or more programs cause the electronic device to: obtain a processing request initiated by a target user on a blockchain platform for a target digital collectible; in response to the target user being a first-type user, determine whether the time interval between the time corresponding to the processing request and the time of the last processing of the target digital collectible reaches a preset threshold; in response to the time interval reaching the preset threshold and the cumulative number of processing times corresponding to the target digital collectible being less than a preset maximum number, determine processing receipt information for processing the target digital collectible based on the cumulative number of processing times; add the processing receipt information to the address corresponding to the target digital collectible to obtain first updated on-chain storage data; in response to the off-chain storage data corresponding to the off-chain storage index being incomplete, repair the off-chain storage data and update the off-chain storage index to obtain second updated on-chain storage data; and embed the second updated on-chain storage data into the distributed ledger to obtain an updated target digital collectible.
[0097] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0098] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0099] The units described in some embodiments of the present disclosure may be implemented in software or hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes an acquisition unit, a determination unit, a processing and collection unit, a first update unit, a second update unit, and a third update unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the acquisition unit may also be described as a "unit for acquiring a processing request for a target digital collection initiated by a target user on the above-mentioned blockchain platform."
[0100] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0101] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A method for processing digital collections on a blockchain platform, comprising: Obtaining a processing request for a target digital collectible initiated by a target user on the blockchain platform, wherein the target digital collectible is stored in a layered storage manner, including: on-chain storage data and off-chain storage data; In response to the target user being a first type of user, determining whether a time interval between a time corresponding to the processing request and a time corresponding to the last processing of the target digital artifact reaches a preset threshold; In response to the time interval reaching a preset threshold and the cumulative number of processing times corresponding to the target digital artifact being processed being less than a preset maximum number, determining processing collection information for processing the target digital artifact based on the cumulative number of processing times; Adding the processed receipt information to the address corresponding to the target digital collectible to obtain first updated on-chain storage data, wherein the first updated on-chain storage data includes the off-chain storage index corresponding to the target digital collectible; In response to the off-chain storage data corresponding to the off-chain storage index being incomplete, repairing the off-chain storage data and updating the off-chain storage index to obtain second updated on-chain storage data; The second updated on-chain storage data is embedded in the distributed ledger to obtain an updated target digital collection.
2. The method according to claim 1, wherein Before determining, in response to the target user being a first type user, whether the time interval between the time corresponding to the processing request and the time of the last processing of the target digital artifact reaches a preset threshold, the method further includes: Obtaining basic parameters pre-set in the smart contract corresponding to the target digital collectible, wherein the basic parameters include: a reasonable processing time interval, a maximum number of processing times within a predetermined time period, and a time expansion coefficient; In response to the actual number of processing times corresponding to the target digital artifact being greater than the maximum number of processing times within the predetermined time period, a preset threshold is determined based on the reasonable processing time interval and the time expansion coefficient.
3. The method according to claim 1, wherein The method further comprises: In response to the time interval not reaching the preset threshold, a message rejecting the processing request is displayed to the target user through the blockchain platform.
4. The method according to claim 1, wherein In response to the time interval reaching a preset threshold and the cumulative number of processing times corresponding to the target digital artifact being processed being less than a preset maximum number, determining processing collection information for processing the target digital artifact based on the cumulative number of processing times includes: In response to the time interval reaching a preset threshold, determining whether the cumulative number of processing times is less than a preset maximum number, wherein the cumulative number of processing times is preset by a creator corresponding to the target digital collection; In response to the cumulative number of processing times being less than a preset maximum number, determining processing collection information for processing the target digital collection according to the collection information corresponding to the target digital collection, the dynamic collection information ratio, and the cumulative number of processing times; In response to the time interval reaching the preset threshold and the cumulative number of processing times being not less than a preset maximum number, a destruction operation is performed on the target digital collection.
5. The method according to claim 1, wherein In response to the off-chain storage data corresponding to the off-chain storage index being incomplete, repairing the off-chain storage data and updating the off-chain storage index to obtain second updated on-chain storage data, including: For off-chain storage index and off-chain storage data, perform the generation steps: Obtain the storage certificate corresponding to the target digital collection through the target oracle; Generate a hash value corresponding to the off-chain storage data using the target oracle based on the storage proof; Determine whether the off-chain storage data corresponding to the off-chain storage index is complete by using the hash value corresponding to the off-chain storage data and the hash value corresponding to the on-chain storage data; In response to determining that the off-chain stored data is complete, determining the on-chain stored data as second updated on-chain stored data; In response to determining that the off-chain storage data is incomplete, re-uploading the off-chain storage data corresponding to the target digital collectible from the backup node corresponding to the target digital collectible to obtain repaired off-chain storage data and an updated off-chain storage index, wherein the address list corresponding to the backup node is stored in the smart contract corresponding to the target digital collectible; The updated off-chain storage index is used as the off-chain storage index, and the repaired off-chain storage data is used as the off-chain storage data, and the generation step is continued.
6. The method according to claim 1, wherein The method further comprises: In response to the user being a second type of user, determining processing receipt information for processing the target digital collectible based on the cumulative number of times the target digital collectible is processed; Adding the processed receipt information to the address corresponding to the target digital collectible to obtain first updated on-chain storage data, wherein the first updated on-chain storage data includes the off-chain storage index corresponding to the target digital collectible; In response to the off-chain storage data corresponding to the off-chain storage index being incomplete, repairing the off-chain storage data and updating the off-chain storage index to obtain second updated on-chain storage data; Embed the second updated on-chain storage data into the distributed ledger to obtain an updated target digital collectible; In response to the user being a third type of user, managing global permissions using the smart contract corresponding to the target digital collectible; In response to the user being a fourth type of user, metadata corresponding to the target digital collection is set through a smart contract.
7. A digital collection processing device applied to a blockchain platform, comprising: an acquisition unit configured to acquire a processing request for a target digital collectible initiated by a target user on the blockchain platform, wherein the target digital collectible is stored in a layered storage manner, including: on-chain storage data and off-chain storage data; A determining unit is configured to, in response to the target user being a first type of user, determine whether a time interval between a time corresponding to the processing request and a time of last processing corresponding to the target digital artifact reaches a preset threshold; a processing and receiving unit configured to, in response to the time interval reaching a preset threshold and the cumulative number of processing times corresponding to the target digital artifact being less than a preset maximum number, determine processing and receiving information for processing the target digital artifact based on the cumulative number of processing times; A first updating unit is configured to add the processed receipt information to the address corresponding to the target digital collectible to obtain first updated on-chain storage data, wherein the first updated on-chain storage data includes an off-chain storage index corresponding to the target digital collectible; a second updating unit, configured to, in response to the off-chain storage data corresponding to the off-chain storage index being incomplete, repair the off-chain storage data and update the off-chain storage index to obtain second updated on-chain storage data; The third updating unit is configured to embed the second updated on-chain storage data into the distributed ledger to obtain an updated target digital collectible.
8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Data processing method and device, equipment, storage medium and program product
CN120763161A