Blockchain-based resource processing method and device, readable medium and electronic equipment

By combining blockchain technology with content addressing mechanisms, an architecture that separates resource indexing and storage is constructed, solving the problem of unreliable resource versions in centralized resource distribution, realizing decentralized and trustworthy resource access and management, and improving the system's security and automation level.

CN121614688BActive Publication Date: 2026-07-31LINGSHU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LINGSHU TECH CO LTD
Filing Date
2025-11-27
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The distribution and access to static resources in the existing Internet system rely on centralized services, which makes it impossible to guarantee the authenticity of resource versions, the certainty of the publisher's identity, and the reliability of historical versions. It is difficult to establish a trustworthy, traceable, and censorship-resistant resource distribution system without trusting third parties.

Method used

By combining blockchain technology with content addressing mechanisms, an innovative architecture is constructed that separates resource indexing from resource storage. Utilizing the immutability of the blockchain network, the content identifier is accurately parsed based on the logical name, publisher information, and target version to ensure the uniqueness and traceability of resource versions. The content identifier is used as an inherent derived identifier of the resource content to guarantee the integrity and tamper-proof nature of the resource, and the resource is obtained through distributed storage nodes.

Benefits of technology

It enables trusted resource access and efficient management in a decentralized environment, avoiding single points of failure and performance bottlenecks in traditional centralized systems, enhancing system security and reliability, and improving the level of automation and trust in resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121614688B_ABST
    Figure CN121614688B_ABST
Patent Text Reader

Abstract

This application discloses a blockchain-based resource processing method, apparatus, readable medium, and electronic device. The method, executed by a blockchain node, includes: responding to a resource access request received from a client, determining the logical name, publisher information, and target version of the resource to be accessed; based on the logical name, publisher information, and target version, invoking a resource indexing contract deployed on the blockchain network to process the resource access request, obtaining a content identifier corresponding to the target version; the content identifier is a unique identity identifier generated based on the resource content; and feeding back the content identifier corresponding to the target version to the client, so that the client can retrieve the resource to be accessed from a distributed storage node based on the content identifier corresponding to the target version. By implementing the technical solution provided in this application, uniqueness assurance, reliable traceability, and efficient retrieval of resource versions are achieved in a decentralized environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of blockchain and distributed computing technology, and in particular to a blockchain-based resource processing method, apparatus, readable medium, and electronic device. Background Technology

[0002] In the current internet ecosystem, static resources refer to files whose content is fixed and does not change dynamically based on user requests, such as images, JavaScript scripts, style sheets, and other basic web page components. These resources form the visual presentation and interactive foundation of modern websites and applications.

[0003] In the current internet ecosystem, the distribution and access to static resources primarily rely on centralized content delivery networks (CDNs) and object storage services. However, this architecture suffers from a fundamental flaw: the entire system's trustworthiness depends entirely on the integrity and security of the centralized service provider. Resource mapping relationships are controlled by a single authority, making it impossible to guarantee the authenticity of resource versions, the certainty of the publisher's identity, and the reliability of historical versions at the technical level. This systemic flaw makes it difficult for the existing architecture to establish a truly trustworthy, traceable, and censorship-resistant resource distribution system without requiring trust in third parties. Summary of the Invention

[0004] This application provides a blockchain-based resource processing method, apparatus, medium, and electronic device that can ensure the uniqueness of resource versions, reliable traceability, and efficient acquisition in a decentralized environment.

[0005] According to a first aspect of this application, a blockchain-based resource processing method is provided, executed by a blockchain node, the method comprising:

[0006] In response to receiving a resource access request from the client, determine the logical name of the resource to be accessed, the publisher information, and the target version to be accessed;

[0007] Based on the logical name, the publisher information, and the target version, a resource indexing contract deployed on the blockchain network is invoked to process the resource access request, thereby obtaining a content identifier corresponding to the target version; wherein, the content identifier is a unique identity identifier generated based on the resource content;

[0008] The content identifier corresponding to the target version is fed back to the client, so that the client can obtain the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version.

[0009] According to a second aspect of this application, a blockchain-based resource processing device is provided, configured on a blockchain node, the device comprising:

[0010] The resource description determination module is used to determine the logical name, publisher information, and target version of the resource to be accessed in response to a resource access request received from the client.

[0011] An access request processing module is used to process the resource access request by invoking a resource index contract deployed on the blockchain network based on the logical name, the publisher information, and the target version, and to obtain a content identifier corresponding to the target version; wherein, the content identifier is a unique identity identifier generated based on the resource content;

[0012] The content identifier feedback module is used to feed back the content identifier corresponding to the target version to the client, so that the client can obtain the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version.

[0013] According to a third aspect of the present invention, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the blockchain-based resource processing method as described in embodiments of this application.

[0014] According to a fourth aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the blockchain-based resource processing method as described in the embodiments of the present application.

[0015] According to a fifth aspect of this application, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the blockchain-based resource processing method as described in embodiments of this application.

[0016] This application's technical solution organically combines blockchain technology with content addressing mechanisms to construct an innovative architecture that separates resource indexing and resource storage, achieving decentralized, trustworthy, and efficient management of the resource access process. Specifically, leveraging the immutability of the blockchain network, the trustworthiness and persistence of resource mapping relationships are guaranteed; the resource indexing contract accurately parses content identifiers based on logical names, publisher information, and target versions, ensuring the uniqueness and traceability of resource versions; simultaneously, using content identifiers as inherent derived identifiers of resource content guarantees resource integrity and tamper-proof nature. Clients directly retrieve resources from distributed storage nodes based on the acquired content identifiers, fully utilizing the efficient content distribution capabilities of the distributed storage network while effectively avoiding single points of failure and performance bottlenecks in traditional centralized systems. Furthermore, the immutability of blockchain provides transparent and auditable log records for resource access, further enhancing system security and reliability, significantly improving the overall automation and trust level of resource management, and achieving trusted resource access and precise version control in a decentralized environment.

[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of a blockchain-based resource processing method provided in Embodiment 1;

[0020] Figure 2 This is a flowchart of a blockchain-based resource processing method provided in Embodiment 2;

[0021] Figure 3 This is a schematic diagram of the structure of the blockchain-based resource processing device provided in Embodiment 3 of this application;

[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first," "second," "target," and "candidate," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] To clearly illustrate the technical solution of the embodiments, a blockchain-based resource processing system is first introduced. This system includes a client, distributed storage nodes, a resource publisher, and a blockchain network. The client communicates with both the distributed storage nodes and the blockchain network, and the resource publisher also communicates with both. The resource publisher, as the owner or authorized entity of the static resource, uploads the static resource to the distributed storage node. The distributed storage node, an autonomous functional entity in the peer-to-peer network, performs hash calculations on the static resource content to obtain a content identifier. Based on this content identifier, the distributed storage node publishes, stores, retrieves, and routes the static resource. The distributed node returns the resource identifier to the resource publisher, who then stores it in the blockchain network through the blockchain node. The client queries the blockchain network for the static resource's content identifier through the blockchain node and retrieves the static resource from the distributed storage node based on the content identifier returned by the blockchain node.

[0026] Example 1

[0027] Figure 1This is a flowchart of a blockchain-based resource processing method provided in Embodiment 1. This embodiment is applicable to the distribution and access of static resources. The method can be executed by a blockchain node configured with a blockchain-based resource processing device. The blockchain-based resource processing device is implemented in hardware and / or software and can be integrated into an electronic device running this system.

[0028] like Figure 1 As shown, the method includes:

[0029] S110. In response to receiving a resource access request from the client, determine the logical name, publisher information, and target version of the resource to be accessed.

[0030] S120. Based on the logical name, the publisher information, and the target version, the resource index contract deployed on the blockchain network is invoked to process the resource access request and obtain the content identifier corresponding to the target version; wherein, the content identifier is a unique identity identifier generated based on the resource content.

[0031] S130. Feedback the content identifier corresponding to the target version to the client, so that the client can obtain the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version.

[0032] The resource to be accessed refers to the target digital resource requested by the client. Optionally, the resource to be accessed can be a static resource, which refers to files whose content is fixed and does not change dynamically with user requests. For example, the resource to be accessed can be static content such as JS, CSS files, images, and audio / video files. The client refers to the terminal software or application that initiates the resource access request.

[0033] A resource access request is a structured query command initiated by a client to a blockchain node. The request contains the location information of the resource to be accessed. In response, the blockchain node receives the resource access request from the client, parses it to obtain the logical name, publisher information, and target version of the resource to be accessed.

[0034] The logical names employ a hierarchical namespace system, consisting of "top-level naming rights identifier / second-level namespace / specific resource path". Top-level naming rights are issued by the chain operator (through purchase, renewal, or issuance, with proceeds used for system ecosystem development). Namespaces below the second level are managed autonomously by the top-level naming rights holder. In case of naming conflicts, arbitration is conducted according to the priority order of "first-to-register principle," "trademark priority principle," and "proof of actual use principle." Unused top-level naming rights identifiers are automatically cancelled after two years to prevent resource hoarding. This approach effectively resolves logical name conflicts while ensuring decentralization. Publisher information refers to the identity identifier of the resource publisher. The target version to be accessed refers to the resource version identifier that the client needs to access. This identifier uniquely identifies the specific state of the resource during the iteration process through version serial numbers or timestamps. The target version to be accessed can be explicitly specified by the client or determined based on default parameters; when determined based on default parameters, it generally refers to the latest version.

[0035] The logical name, publisher information, and target version are three key parameters that uniquely point to a specific content identifier within the blockchain network. Blockchain nodes invoke the resource index contract to query the content identifier determined by these three parameters, and then return this identifier, along with the target version, to the client.

[0036] The resource index contract refers to a smart contract program deployed on a blockchain network, which encodes the mapping rules and query logic between logical names, publisher information, version numbers, and content identifiers. The blockchain network is a decentralized ledger system composed of multiple blockchain nodes connected through a consensus mechanism, providing a trusted execution environment for smart contracts. The content identifier is a unique identity generated based on the resource content, strongly bound to the resource content with a strict one-to-one correspondence; any change to the resource content will result in a change to the content identifier. The content identifier is pre-stored in the blockchain network by the resource publisher through blockchain nodes. After the resource publisher uploads the resource to the distributed storage nodes, the distributed storage nodes generate the content identifier based on the resource content and feed it back to the resource publisher. The distributed storage nodes process the resource based on the content identifier.

[0037] Optionally, the content identifier is generated using the following standardized process: (1) standardizing the resource content through preprocessing, including unifying the encoding format, removing metadata interference, and standardizing the compression method; (2) using a cryptographic hash algorithm such as SHA3-256 to calculate the hash value of the resource content, thereby obtaining the content identifier corresponding to the resource content. It is worth noting that this standardized process is performed before storage on different distributed storage nodes to ensure that completely consistent content identifiers are generated for the same resource content, providing a reliable foundation for subsequent resource integrity verification.

[0038] The client retrieves the resources to be accessed from the distributed storage nodes based on the content identifiers fed back by the blockchain nodes.

[0039] This application's technical solution organically combines blockchain technology with content addressing mechanisms to construct an innovative architecture that separates resource indexing and resource storage, achieving decentralized, trustworthy, and efficient management of the resource access process. Specifically, leveraging the immutability of the blockchain network, the trustworthiness and persistence of resource mapping relationships are guaranteed; the resource indexing contract accurately parses content identifiers based on logical names, publisher information, and target versions, ensuring the uniqueness and traceability of resource versions; simultaneously, using content identifiers as inherent derived identifiers of resource content guarantees resource integrity and tamper-proof nature. Clients directly retrieve resources from distributed storage nodes based on the acquired content identifiers, fully utilizing the efficient content distribution capabilities of the distributed storage network while effectively avoiding single points of failure and performance bottlenecks in traditional centralized systems. Furthermore, the immutability of blockchain provides transparent and auditable log records for resource access, further enhancing system security and reliability, significantly improving the overall automation and trust level of resource management, and achieving trusted resource access and precise version control in a decentralized environment.

[0040] In an optional embodiment, the step of processing the resource access request by invoking a resource indexing contract deployed on the blockchain network based on the logical name, the publisher information, and the target version to obtain the content identifier corresponding to the target version includes: invoking the resource indexing contract based on the logical name and the publisher information to determine the resource version chain associated with the resource to be accessed; wherein the resource version chain consists of multiple version records linked sequentially by pointers; the version record includes at least: logical name, content identifier, version information, publisher information, and a pointer to the previous version; and determining the content identifier corresponding to the target version based on the target version and the version information, the pointer to the previous version, and the content identifier in the resource version chain.

[0041] The logical name and publisher information are used to uniquely point to a specific resource version chain. Blockchain nodes invoke the resource index contract to query the resource version chain that both the logical name and publisher information point to.

[0042] The resource version chain refers to a chain-like data structure formed by sequentially linking multiple version records through pointers, used to completely record the iteration history of a resource. A version record is the basic unit in the resource version chain, including at least a logical name, content identifier, version information, publisher information, and a pointer to the previous version. The pointer to the previous version is a reference within a version record that points to its direct predecessor version record, used to maintain the continuity of the version chain.

[0043] The resource version chain is essentially a unidirectional linked list structure built on a blockchain network. Each version record points to its direct predecessor record in the chain through its "previous version pointer," forming a verifiable chain tracing back from the latest version to the initial version. The "version information" in each version record is key metadata used to identify and distinguish different versions. The process of determining the content identifier corresponding to the target version follows a precise on-chain retrieval mechanism: First, starting with the latest version record in the resource version chain, the "target version" specified by the client is compared with the "version information" of each version record traversed in the chain. This traversal process is achieved by continuously tracking the "previous version pointer" in each version record, thus moving backward along the version chain. When a version record is located in the chain whose "version information" precisely matches the "target version" requested by the client, the "content identifier" contained in that specific version record is the final result to be determined.

[0044] The above technical solution, by introducing a resource version chain mechanism built on a blockchain, achieves trusted traceability and precise access to resource version management. It immutably binds user-friendly version identifiers with cryptographically reliable content identifiers: the resource version chain is determined by calling the resource index contract based on the logical name and publisher information; a verifiable chain structure is formed through the pointer to the previous version in each version record, ensuring the integrity and tamper-proof nature of the version history; based on the target version and version information in the version chain, the pointer to the previous version, and the content identifier, the content identifier corresponding to a specific version can be accurately located, effectively avoiding version confusion and unauthorized modification. Since the entire version chain and its associated data are stored on the blockchain, all query and parsing processes are transparent and verifiable, thus ensuring the authenticity and authority of the returned content identifier. While improving system reliability and transparency, it ensures that clients can obtain certified and accurate resource content, comprehensively enhancing the automation level and security trust of resource version control.

[0045] In an optional embodiment, after the client obtains the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version, the method further includes: performing a hash calculation on the resource content of the resource to be accessed by the client to obtain the actual identifier of the resource to be accessed; and comparing the actual identifier with the content identifier fed back by the blockchain node by the client to verify the resource content of the resource to be accessed.

[0046] After successfully retrieving resource content from the distributed storage node, the client does not immediately trust the content but initiates a local verification process. The client uses the same cryptographic hash algorithm pre-agreed with the distributed storage node to perform a hash operation on the received resource content data, generating a local digital fingerprint, or "actual identifier." Meanwhile, the "content identifier" previously returned by the blockchain node is an official credential confirmed by the blockchain consensus mechanism and recorded on an immutable ledger, representing the original state of the resource at the time of publication, which was recognized by the entire network.

[0047] The client compares the locally computed "actual identifier" with the "content identifier" recorded by the blockchain's official database, for example, by performing a strict string match. If the comparison result shows a perfect match, it proves that the resource content obtained by the client from the distributed storage node is exactly the same as the content originally submitted to the distributed storage node by the resource publisher. The client can be confident that the resource content to be accessed has not been tampered with, damaged, or replaced by any intermediate link, and can therefore use it with confidence. If the comparison result shows a difference, it indicates that the resource content obtained by the client has been tampered with or that an error occurred during transmission.

[0048] The aforementioned technical solution enables the client to generate an actual identifier by independently calculating the hash value of the resource content and comparing it with the consensus-confirmed content identifier returned by the blockchain node, thereby establishing a direct verification channel that does not rely on any intermediary. This not only ensures the integrity and authenticity of the resource content and effectively defends against content replacement attacks and man-in-the-middle tampering risks, but also eliminates the reliance on storage nodes and transmission channels through a cryptographic comparison mechanism. Furthermore, this verification process is entirely completed autonomously by the client, ensuring both the reliability of the verification results and the privacy of user operations. Overall, it constructs a transparent, self-verifiable, and attack-resistant resource verification system, significantly improving the security and trust level of decentralized resource access.

[0049] Example 2

[0050] Figure 2 This is a flowchart of a blockchain-based resource processing method provided in Embodiment 2. This embodiment is a further optimization based on the above embodiments.

[0051] like Figure 2 As shown, the method includes:

[0052] S210. In response to receiving a resource notarization request from the resource publisher, determine the resource metadata corresponding to the resource to be notarized; wherein, the resource metadata includes: content identifier, publisher information, logical name, resource type and publication time.

[0053] In this context, the resource publisher refers to the resource owner or authorized entity that initiates the resource notarization request; the resource notarization request is a structured instruction issued to a blockchain node, requesting the blockchain node to register and notarize a specific resource. The resource to be notarized refers to the static resource for which the resource publisher requests blockchain notarization. By parsing the resource notarization request, the blockchain node can obtain the resource metadata corresponding to the resource to be notarized. The resource metadata refers to a structured data set describing the attributes of the resource to be notarized. Resource metadata includes: content identifier, publisher information, logical name, resource type, and publication time. The resource type refers to a classification description of the resource content format; the publication time is the timestamp of the notarization operation.

[0054] S220. Based on the content identifier corresponding to the resource to be certified, call the resource index contract to query whether the resource to be certified already exists in the blockchain network.

[0055] Because content identifiers are digital fingerprints generated from resource content using cryptographic hash algorithms, they are unique and deterministic. Identical content will inevitably produce the same content identifier, and different content will inevitably produce different content identifiers. The resource index contract, as a smart contract program deployed on the blockchain network, maintains a mapping table between logical names, publisher information, and resource version chains across the entire network.

[0056] When a resource index contract is executed to perform a query, it searches the entire network to verify whether a version record containing the same content identifier already exists. This verification process ensures the reliability and immutability of the results through the consensus mechanism of the blockchain network.

[0057] S230. If the resource to be stored does not exist in the blockchain network, the resource storage contract deployed in the blockchain network is invoked to store the resource metadata of the resource to be stored in the blockchain network.

[0058] If the resource to be stored does not exist in the blockchain network, it means that the resource to be stored is appearing for the first time in the history of the blockchain network. Then, the resource storage contract is invoked to submit the resource metadata of the resource to be stored as a complete transaction data packet to the blockchain network.

[0059] S240. Based on the publisher information and logical name corresponding to the resource to be certified, the resource index contract is invoked to process the resource version chain of the resource to be certified.

[0060] In a blockchain network, there may be no resource to be notified; it could be an iteration of an already notified resource or the initial notification of a resource that has not yet been notified. Furthermore, it is necessary to distinguish between the resource to be notified by combining its content identifier, publisher information, and logical name.

[0061] If the resource index contract cannot find any existing resource version chain based on the logical name and publisher information, this is considered the initial proof of existence. A new resource version chain will be created for the resource to be proven, and the resource metadata of the resource to be proven will be used as the initial version of the resource version chain.

[0062] When the resource indexing contract finds an existing resource version chain based on the logical name and publisher information, it determines that this is a version iteration. The resource metadata successfully stored in the resource notarization contract is added as the new version to the resource version chain of the resource to be notarized, and linked to the previous version through a pointer.

[0063] The technical solution of this application embodiment involves a resource publisher sending a resource notarization request to a blockchain node, triggering the parsing and processing of the resource metadata to be notarized. Based on the uniqueness and determinism of the content identifier, the resource indexing contract performs a search and verification across the entire blockchain network, ensuring the reliability and immutability of the query results through the blockchain consensus mechanism. When it is confirmed that there is no resource to be notarized in the blockchain network, the resource notarization contract submits the complete resource metadata as a transaction data packet to the blockchain network for permanent storage. Furthermore, the resource indexing contract differentiates and processes data based on the content identifier, publisher information, and logical name. This approach prevents duplicate notarization of the same resource content while ensuring the complete construction and reliable iteration of the resource version chain, forming an immutable and traceable historical record of resource versions.

[0064] In an optional embodiment, the step of invoking the resource index contract to process the resource version chain of the resource to be certified based on the publisher information and logical name corresponding to the resource to be certified includes: invoking the resource index contract to query whether the resource version chain of the resource to be certified exists based on the publisher information and logical name corresponding to the resource to be certified; if the resource version chain of the resource to be certified does not exist, then determining that the current version of the resource to be certified is the initial version; and invoking the resource index contract to construct a resource version chain for the resource to be certified based on the logical name, content identifier, current version, and publisher information of the resource to be certified.

[0065] Based on the publisher information and logical name of the resource to be certified, a query index is formed. The resource index contract is invoked to query whether the corresponding resource version chain exists across the entire network. When the query confirms that the resource version chain does not exist, the current certification operation is determined to be the first certification of the resource to be certified, and the current version of the resource to be certified is determined to be the initial version.

[0066] The resource index contract is invoked to perform the construction operation of the resource version chain based on the logical name, content identifier, current version and publisher information of the resource to be certified, so as to create a resource version chain indexed by the logical name and publisher information in the blockchain network, and generate the initial record of the resource version chain using the logical name, content identifier, current version and publisher information of the resource to be certified.

[0067] The above technical solution verifies the existence of the resource version chain by using a query index composed of publisher information and logical names, ensuring the accuracy and necessity of version chain creation and effectively avoiding duplicate construction. When it is confirmed that the resource version chain does not exist, the current version is determined as the initial version, establishing a complete lifecycle management starting point for the resource to be certified. Finally, the resource version chain is constructed based on the logical name, content identifier, current version, and publisher information, and an initial record is generated, forming an immutable foundation for version management. This approach not only guarantees the authenticity and integrity of version history through the immutability of blockchain but also ensures the standardization and consistency of version chain construction through the automated execution of smart contracts. Furthermore, it provides a trusted traceability basis for subsequent version iterations, significantly improving the security and reliability of resource version management.

[0068] In an optional embodiment, the step of invoking the resource index contract to process the resource version chain of the resource to be certified based on the publisher information and logical name corresponding to the resource to be certified further includes: if the resource version chain of the resource to be certified exists, obtaining the resource version chain of the resource to be certified, and determining the current version of the resource to be certified based on the version information in the resource version chain; generating a previous version pointer pointing to the previous version for the current version of the resource to be certified based on the version record corresponding to the previous version in the resource version chain; determining the generation of the current version version of the resource to be certified based on the logical name, content identifier, version information, and publisher information of the resource to be certified; and updating the resource version chain of the resource to be certified based on the version record of the current version and the previous version pointer corresponding to the current version.

[0069] When it is detected that the resource version chain corresponding to the resource to be certified already exists, the resource version chain corresponding to the resource to be certified is obtained and the version information recorded in the latest version is parsed. Based on this, the correct position of the current resource to be certified in the version sequence is determined. Usually, an incremental version number or timestamp mechanism is used to ensure the strict continuity of the version order.

[0070] Based on the version record corresponding to the previous version in the resource version chain, a pointer to the previous version is generated for the resource to be certified in the current version. Optionally, a cryptographic hash algorithm is used to hash the version record corresponding to the previous version to generate a unique pointer to the previous version, thereby establishing a cryptographic link between the current version and the previous version.

[0071] Next, the logical name, content identifier, version information, and publisher information of the resource to be certified are integrated to generate the current version's version record. Finally, the newly generated version record is associated with its corresponding previous version pointer, and the new version record is added to the end of the resource version chain by calling the resource index contract, completing the chain structure expansion and update.

[0072] The above technical solution provides a practical resource version chain iterative update mechanism. It ensures the integrity and immutability of the version history through pointer links between version records, guarantees the continuity of version iteration by utilizing the sequential nature of version information, and maintains the authenticity and credibility of resource versions by binding content identifiers with publisher information. It provides complete audit and traceability capabilities for resource version management, and realizes the credible evolution and complete traceability of resource versions.

[0073] In an optional embodiment, the content identifier of the resource to be certified is obtained by hashing the resource content of the resource to be certified through the distributed storage node after the resource publisher uploads the resource to be certified to the distributed storage node; the distributed storage node is an autonomous functional entity in a peer-to-peer network, used to process the resource to be certified based on the content identifier of the resource to be certified.

[0074] Among them, autonomous functional entities refer to network nodes with autonomous decision-making and execution capabilities, while distributed storage nodes are network nodes in peer-to-peer networks that have autonomous decision-making and execution capabilities.

[0075] The resource publisher first uploads the resources to be notified to the distributed storage node, and then the distributed storage node performs hash calculation on the resource content to generate a content identifier, ensuring the objectivity and verifiability of the content identifier. At the same time, the distributed storage node, as an autonomous functional entity, stores and manages the resources based on the content identifier, providing a reliable content addressing basis for subsequent blockchain notarization, thus forming a complete resource processing closed loop.

[0076] The aforementioned technical solution achieves objectivity and verifiability of resource identifiers by placing the content identifier generation process on distributed storage nodes. After the resource publisher uploads the resource to be notified to the distributed storage nodes, the nodes perform hash calculations on the resource content to obtain the content identifier, ensuring the standardization and consistency of the identifier generation process. As an autonomous functional entity in the peer-to-peer network, the distributed storage nodes process the resource to be notified based on the content identifier, forming a complete resource storage and identifier binding mechanism. This design not only guarantees the immutability of the content identifier but also enhances the system's reliability through collaborative verification via the distributed network. Furthermore, it provides a trusted data foundation for subsequent blockchain notarization, effectively improving the security and robustness of the resource management system.

[0077] Example 3

[0078] Figure 3 This is a schematic diagram of the structure of the blockchain-based resource processing device provided in Embodiment 3 of this application. This embodiment can be applied to the distribution and access of static resources. The device can be implemented by software and / or hardware and configured on a blockchain node, and can be integrated into electronic devices such as smart terminals.

[0079] like Figure 3 As shown, the device may include:

[0080] Resource description determination module 310 is used to determine the logical name, publisher information and target version of the resource to be accessed in response to receiving a resource access request from the client.

[0081] The access request processing module 320 is used to process the resource access request by calling a resource index contract deployed on the blockchain network based on the logical name, the publisher information and the target version, and obtain the content identifier corresponding to the target version; wherein, the content identifier is a unique identity identifier generated based on the resource content;

[0082] The content identifier feedback module 330 is used to feed back the content identifier corresponding to the target version to the client, so that the client can obtain the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version.

[0083] This application's technical solution organically combines blockchain technology with content addressing mechanisms to construct an innovative architecture that separates resource indexing and resource storage, achieving decentralized, trustworthy, and efficient management of the resource access process. Specifically, leveraging the immutability of the blockchain network, the trustworthiness and persistence of resource mapping relationships are guaranteed; the resource indexing contract accurately parses content identifiers based on logical names, publisher information, and target versions, ensuring the uniqueness and traceability of resource versions; simultaneously, using content identifiers as inherent derived identifiers of resource content guarantees resource integrity and tamper-proof nature. Clients directly retrieve resources from distributed storage nodes based on the acquired content identifiers, fully utilizing the efficient content distribution capabilities of the distributed storage network while effectively avoiding single points of failure and performance bottlenecks in traditional centralized systems. Furthermore, the immutability of blockchain provides transparent and auditable log records for resource access, further enhancing system security and reliability, significantly improving the overall automation and trust level of resource management, and achieving trusted resource access and precise version control in a decentralized environment.

[0084] Optionally, the access request processing module 320 includes: an index contract invocation submodule, used to invoke the resource index contract based on the logical name and the publisher information to determine the resource version chain associated with the resource to be accessed; wherein the resource version chain consists of multiple version records linked sequentially by pointers; the version record includes at least: logical name, content identifier, version information, publisher information, and a pointer to the previous version; and a content identifier determination submodule, used to determine the content identifier corresponding to the target version based on the target version and the version information, the pointer to the previous version, and the content identifier in the resource version chain.

[0085] Optionally, the apparatus further includes: a metadata determination submodule, configured to determine the resource metadata corresponding to the resource to be certified in response to receiving a resource certification request from a resource publisher; wherein the resource metadata includes: content identifier, publisher information, logical name, resource type, and publication time; an existence determination module, configured to query whether the resource to be certified already exists in the blockchain network by calling the resource index contract based on the content identifier corresponding to the resource to be certified; a metadata storage module, configured to store the resource metadata of the resource to be certified in the blockchain network by calling the resource certification contract deployed in the blockchain network if the resource to be certified does not exist in the blockchain network; and a version chain construction module, configured to call the resource index contract to process the resource version chain of the resource to be certified based on the publisher information and logical name corresponding to the resource to be certified.

[0086] Optionally, the version chain construction module includes: a version chain query submodule, used to query whether the resource version chain of the resource to be certified exists by calling the resource index contract based on the publisher information and logical name corresponding to the resource to be certified; an initial version determination submodule, used to determine the current version of the resource to be certified as the initial version if the resource version chain of the resource to be certified does not exist; and a version chain construction submodule, used to call the resource index contract to construct a resource version chain for the resource to be certified based on the logical name, content identifier, current version, and publisher information of the resource to be certified.

[0087] Optionally, the version chain construction module further includes: a current version determination submodule, used to obtain the resource version chain of the resource to be certified if such a resource version chain exists, and determine the current version of the resource to be certified based on the version information in the resource version chain; a version pointer generation submodule, used to generate a pointer to the previous version of the current version of the resource to be certified based on the version record corresponding to the previous version in the resource version chain; a version record generation submodule, used to determine and generate a version record for the current version of the resource to be certified based on the logical name, content identifier, version information, and publisher information of the resource to be certified; and a version chain update submodule, used to update the resource version chain of the resource to be certified based on the version record of the current version and the pointer to the previous version corresponding to the current version.

[0088] Optionally, the device further includes: an actual identifier calculation module, used to perform hash calculation on the resource content of the resource to be accessed by the client after the client obtains the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version, to obtain the actual identifier of the resource to be accessed; and a content identifier comparison module, used to compare the actual identifier with the content identifier fed back by the blockchain node by the client to verify the resource content of the resource to be accessed.

[0089] Optionally, the content identifier of the resource to be certified is obtained by hashing the resource content of the resource to be certified through the distributed storage node after the resource publisher uploads the resource to be certified to the distributed storage node; the distributed storage node is an autonomous functional entity in the peer-to-peer network, used to process the resource to be certified based on the content identifier of the resource to be certified.

[0090] The blockchain-based resource processing apparatus provided in the embodiments of the invention can execute the blockchain-based resource processing method provided in any embodiment of this application, and has the corresponding performance modules and beneficial effects for executing the blockchain-based resource processing method.

[0091] In the technical solution of this application, the user data involved in the resource processing based on blockchain is information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.

[0092] Example 4

[0093] According to embodiments of this application, this application also provides an electronic device, a readable storage medium, and a computer program product.

[0094] Figure 4 A schematic diagram of an electronic device 410, which can be implemented using an embodiment, is shown. The electronic device 410 includes at least one processor 411 and a memory, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the ROM 412 or loaded from storage unit 418 into the RAM 413. The RAM 413 may also store various programs and data required for the operation of the electronic device 410. The processor 411, ROM 412, and RAM 413 are interconnected via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0095] Multiple components in electronic device 410 are connected to I / O interface 415, including: input unit 416, such as keyboard, mouse, etc.; output unit 417, such as various types of displays, speakers, etc.; storage unit 418, such as disk, optical disk, etc.; and communication unit 419, such as network card, modem, wireless transceiver, etc. Communication unit 419 allows electronic device 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0096] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as blockchain-based resource processing methods.

[0097] In some embodiments, the blockchain-based resource processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the blockchain-based resource processing method described above may be performed. Alternatively, in other embodiments, processor 411 may be configured to perform the blockchain-based resource processing method by any other suitable means (e.g., by means of firmware).

[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0099] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable blockchain-based resource processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may execute entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0100] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, 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 devices, magnetic storage devices, or any suitable combination of the foregoing.

[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0102] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a blockchain-based resource processing server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0103] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0104] This application also discloses a computer program product, which includes a computer program that, when executed by a processor, implements the blockchain-based resource processing method provided in any embodiment of this application. This program product shares the same inventive concept as the blockchain-based resource processing methods disclosed in the embodiments of this application, and therefore will not be described in detail here.

[0105] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

[0106] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A blockchain-based resource processing method, characterized in that, The method, executed by a blockchain node, includes: In response to receiving a resource access request from the client, determine the logical name of the resource to be accessed, the publisher information, and the target version to be accessed; Based on the logical name, the publisher information, and the target version, a resource indexing contract deployed on the blockchain network is invoked to process the resource access request, thereby obtaining a content identifier corresponding to the target version; wherein, the content identifier is a unique identity identifier generated based on the resource content; The content identifier corresponding to the target version is fed back to the client so that the client can obtain the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version; The step of processing the resource access request by invoking a resource index contract deployed on the blockchain network based on the logical name, the publisher information, and the target version to obtain the content identifier corresponding to the target version includes: invoking the resource index contract based on the logical name and the publisher information to determine the resource version chain associated with the resource to be accessed; wherein the resource version chain consists of multiple version records linked sequentially by pointers; the version record includes at least: logical name, content identifier, version information, publisher information, and a pointer to the previous version; and determining the content identifier corresponding to the target version based on the target version and the version information, the pointer to the previous version, and the content identifier in the resource version chain.

2. The method of claim 1, wherein, The method further includes: In response to receiving a resource notarization request from the resource publisher, the resource metadata corresponding to the resource to be notarized is determined; wherein, the resource metadata includes: content identifier, publisher information, logical name, resource type and publication time; Based on the content identifier corresponding to the resource to be certified, the resource index contract is invoked to query whether the resource to be certified already exists in the blockchain network; If the resource to be stored does not exist in the blockchain network, the resource storage contract deployed in the blockchain network is invoked to store the resource metadata of the resource to be stored in the blockchain network. Based on the publisher information and logical name corresponding to the resource to be certified, the resource index contract is invoked to process the resource version chain of the resource to be certified.

3. The method of claim 2, wherein, The step of invoking the resource index contract to process the resource version chain of the resource to be certified based on the publisher information and logical name corresponding to the resource to be certified includes: Based on the publisher information and logical name corresponding to the resource to be certified, the resource index contract is invoked to query whether the resource version chain of the resource to be certified exists; If the resource version chain of the resource to be certified does not exist, then the current version of the resource to be certified is determined to be the initial version; The resource index contract is invoked to construct a resource version chain for the resource to be certified based on the logical name, content identifier, current version, and publisher information of the resource to be certified.

4. The method of claim 3, wherein, The step of invoking the resource index contract to process the resource version chain of the resource to be certified based on the publisher information and logical name corresponding to the resource to be certified also includes: If a resource version chain for the resource to be certified exists, the resource version chain for the resource to be certified is obtained, and the current version of the resource to be certified is determined based on the version information in the resource version chain. Based on the version record corresponding to the previous version in the resource version chain, a pointer to the previous version is generated for the resource to be certified in the current version; Based on the logical name, content identifier, version information, and publisher information of the resource to be certified, a version record of the current version is generated for the resource to be certified. Based on the version record of the current version and the pointer to the previous version corresponding to the current version, the resource version chain of the resource to be certified is updated.

5. The method of claim 1, wherein, After the client obtains the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version, the method further includes: The client performs a hash calculation on the resource content of the resource to be accessed to obtain the actual identifier of the resource to be accessed; The client compares the actual identifier with the content identifier returned by the blockchain node to verify the resource content of the resource to be accessed.

6. The method of claim 2, wherein, The content identifier of the resource to be certified is obtained by hashing the resource content of the resource to be certified through the distributed storage node after the resource publisher uploads the resource to be certified to the distributed storage node; the distributed storage node is an autonomous functional entity in the peer-to-peer network, used to process the resource to be certified based on the content identifier of the resource to be certified.

7. A blockchain-based resource processing device, characterized in that, Configured on a blockchain node, the device includes: The resource description determination module is used to determine the logical name, publisher information and target version of the resource to be accessed in response to a resource access request received from the client. An access request processing module is used to process the resource access request by invoking a resource index contract deployed on the blockchain network based on the logical name, the publisher information, and the target version, and to obtain a content identifier corresponding to the target version; wherein, the content identifier is a unique identity identifier generated based on the resource content; The content identifier feedback module is used to feed back the content identifier corresponding to the target version to the client, so that the client can obtain the resource to be accessed from the distributed storage node based on the content identifier corresponding to the target version; The access request processing module includes: an index contract invocation submodule, used to invoke the resource index contract based on the logical name and the publisher information to determine the resource version chain associated with the resource to be accessed; wherein, the resource version chain consists of multiple version records linked sequentially by pointers; the version record includes at least: logical name, content identifier, version information, publisher information, and a pointer to the previous version; and a content identifier determination submodule, used to determine the content identifier corresponding to the target version based on the target version and the version information, the pointer to the previous version, and the content identifier in the resource version chain.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the blockchain-based resource processing method as described in any one of claims 1-6.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the blockchain-based resource processing method as described in any one of claims 1-6.