Resource data processing methods, devices and servers

By deploying privacy resource contracts and Merkle tree contracts in the contract layer of a decentralized resource data processing system, and using privacy algorithms to generate and consume privacy resources, the problems of user data leakage and low processing efficiency are solved, and secure and efficient resource data processing is achieved.

CN114780970BActive Publication Date: 2026-04-03SHANGHAI MATRIXELEMENTS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing decentralized resource data processing systems, user data is easily leaked, processing efficiency is low, and liquidity issues are serious.

Method used

In the contract layer of the resource data processing system, privacy resource contracts, Merkle tree contracts, and privacy resource management contracts are deployed. Verification and data processing are carried out through privacy resource contracts, privacy algorithms are used to generate and consume privacy resources, and liquidity is improved by combining them with automated market maker algorithms.

Benefits of technology

It effectively protects user data security and prevents leakage, while improving the efficiency and fluidity of resource data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780970B_ABST
    Figure CN114780970B_ABST
Patent Text Reader

Abstract

This specification provides a resource data processing method, apparatus, and server. Based on this resource data processing method, before implementation, privacy resource contracts, Merkle tree contracts, and privacy resource management contracts can be pre-deployed in the contract layer of the resource data processing system. During implementation, a first user can generate and send a corresponding resource data processing request through a first user terminal; the resource data processing system can respond to the request and invoke the privacy resource contract for verification; if verification is successful, it invokes the privacy resource contract and other related contracts to convert the originally publicly used Class I resources into corresponding privacy resources for specific resource data processing. This effectively protects the data security of users participating in resource data processing and prevents user data leakage during the resource data processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual pertains to the field of Internet technology, and in particular relates to resource data processing methods, devices, and servers. Background Technology

[0002] Based on existing decentralized resource data processing systems (e.g., blockchain-based decentralized resource trading centers), the processing of resource data is often publicly disclosed, and third parties can trace the users involved in the resource data processing based on the processed resource data, which makes user data vulnerable to leakage.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This specification provides a resource data processing method, apparatus, and server that can effectively protect the data security of users participating in resource data processing and prevent the leakage of user data during the resource data processing process.

[0005] This specification provides a resource data processing method, applied to a resource data processing system, comprising:

[0006] Receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource generation request; the resource data processing request carries at least generation parameters;

[0007] In response to the resource data processing request, the privacy resource contract is invoked for the first verification;

[0008] If the first verification is successful, the privacy resource contract is invoked to generate the corresponding first privacy resource based on the generation parameters using a preset cryptographic algorithm; wherein, the privacy resource contract is deployed at the contract layer;

[0009] Data processing related to the first privacy resource is performed by invoking the privacy resource contract.

[0010] In one embodiment, the contract layer also deploys a Merkle tree contract and a privacy resource management contract.

[0011] In one embodiment, data processing related to a first privacy resource is performed by invoking a privacy resource contract, including:

[0012] The root hash value corresponding to the first privacy resource is generated and saved by calling the Merkle tree contract through the privacy resource contract;

[0013] By calling the privacy resource management contract through the privacy resource contract, the first type of resource corresponding to the first privacy resource is transferred from the first type of resource contract to the privacy resource management contract;

[0014] Invoke the privacy resource contract to update the privacy resource state set.

[0015] In one embodiment, the generation parameters include at least: a resource value for the first privacy resource to be generated, a public key for the resource corresponding to the first privacy resource, and commitment data for the public key.

[0016] In one embodiment, invoking the privacy resource contract for first verification includes:

[0017] The privacy resource contract is invoked to query the first type of resource contract based on the generated parameters to determine whether the resource value meets the requirements.

[0018] If the resource value meets the requirements, the first verification is deemed successful.

[0019] In one embodiment, invoking a privacy resource contract to update the privacy resource state set includes:

[0020] Invoke the privacy resource contract to add state data about the first privacy resource to the privacy resource state set; and set the state data of the first privacy resource to unconsumed.

[0021] In one embodiment, the preset cryptographic algorithm includes a hidden address algorithm.

[0022] This specification also provides a resource data processing method, applied to a resource data processing system, comprising:

[0023] Receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; the resource data processing request carries at least consumption parameters;

[0024] In response to the resource data processing request, the privacy resource contract is invoked for a second verification;

[0025] If the second verification is successful, the privacy resource contract is invoked to update the privacy resource state set; the privacy resource management contract is invoked through the privacy resource contract to transfer the corresponding first-class resources from the privacy resource management contract to the first-class resource contract.

[0026] In one embodiment, the consumption parameters include at least: the resource value of the second privacy resource to be consumed, the proof document, the random public key, and the processing signature.

[0027] In one embodiment, responding to the resource data processing request and performing a second verification includes:

[0028] Based on the consumption parameters, query the privacy resource status set of the privacy resource contract to determine whether the status data of the second privacy resource is unconsumed;

[0029] If it is determined that the state data of the second privacy resource is unconsumed, the Merkle tree contract is invoked to calculate the root hash value of the second privacy resource;

[0030] The privacy resource contract is invoked to determine whether the second privacy resource meets the requirements based on the root hash value of the second privacy resource;

[0031] If the second privacy resource meets the requirements, verify whether the processed signature meets the requirements.

[0032] If the signature processing meets the requirements, the second verification is deemed successful.

[0033] In one embodiment, invoking a privacy resource contract to update the privacy resource state set includes:

[0034] Invoke the privacy resource contract to set the state data of the second privacy resource in the privacy resource state set to consumed.

[0035] This specification also provides a resource data processing method, applied to a resource data processing system, comprising:

[0036] Receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated, and consumption parameters for a second privacy resource to be consumed;

[0037] In response to the resource data processing request, the privacy resource contract is invoked for third-party verification;

[0038] If the third verification is successful, the Merkle tree contract is called through the privacy resource contract to generate and save the root hash value corresponding to the first privacy resource;

[0039] Invoke the privacy resource contract to update the privacy resource state set.

[0040] In one embodiment, invoking a privacy resource contract for third-party verification includes:

[0041] The privacy resource contract is invoked to verify whether the resource value of the first privacy resource is the same as the resource value of the second privacy resource, based on the generation parameters and consumption parameters.

[0042] If the resource value of the first privacy resource is determined to be the same as that of the second privacy resource, the privacy resource status set of the privacy resource contract is queried according to the consumption parameter to determine whether the status data of the second privacy resource is unconsumed.

[0043] If the state data of the second privacy resource is determined to be unconsumed, the Merkle tree contract is invoked to calculate the root hash value of the second privacy resource, and the second privacy resource is determined to meet the requirements based on the root hash value of the second privacy resource.

[0044] If the second privacy resource meets the requirements, verify whether the processed signature meets the requirements.

[0045] If the signature processing meets the requirements, the third verification is deemed successful.

[0046] In one embodiment, invoking a privacy resource contract to update the privacy resource state set includes:

[0047] The privacy resource contract is invoked to set the status data of the second privacy resource in the privacy resource state set to consumed; and the privacy resource contract is invoked to add status data of the first privacy resource in the privacy resource state set; and the status data of the first privacy resource is set to unconsumed.

[0048] This specification also provides a resource data processing apparatus, including:

[0049] A receiving module is configured to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource generation request; and the resource data processing request carries at least generation parameters.

[0050] The first verification module is used to respond to the resource data processing request and call the privacy resource contract to perform the first verification.

[0051] The generation module is used to, upon confirming that the first verification has passed, invoke the privacy resource contract to generate the corresponding first privacy resource based on a preset cryptographic algorithm and generation parameters; wherein, the privacy resource contract is deployed at the contract layer;

[0052] The processing module is used to perform data processing related to the first privacy resource by calling the privacy resource contract.

[0053] This specification also provides a resource data processing apparatus, including:

[0054] A receiving module is configured to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; and the resource data processing request carries at least consumption parameters.

[0055] The second verification module is used to respond to the resource data processing request and call the privacy resource contract to perform a second verification.

[0056] The processing module is used to call the privacy resource contract to update the privacy resource state set when the second verification is successful; and to call the privacy resource management contract through the privacy resource contract to transfer the corresponding first type of resource from the privacy resource management contract to the first type of resource contract.

[0057] This specification also provides a resource data processing apparatus, including:

[0058] A receiving module is configured to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated, and consumption parameters for a second privacy resource to be consumed.

[0059] The third verification module is used to respond to the resource data processing request and call the privacy resource contract for third verification.

[0060] The generation module is used to generate and save the root hash value corresponding to the first privacy resource by calling the Merkle tree contract through the privacy resource contract, provided that the third verification is passed.

[0061] The update module is used to invoke the privacy resource contract to update the privacy resource state set.

[0062] This specification also provides a server, including a processor and a memory for storing processor-executable instructions, wherein the processor executes the instructions to implement the relevant steps of the resource data processing method.

[0063] This specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the relevant steps of the resource data processing method.

[0064] Based on the resource data processing method, apparatus, and server provided in this specification, privacy resource contracts, Merkle tree contracts, and privacy resource management contracts can be pre-deployed in the contract layer of the decentralized resource data processing system before implementation. During implementation, the first user can generate and send a corresponding resource data processing request through their terminal. The resource data processing system can respond to this request by calling the privacy resource contract for verification. If verification is successful, the system calls the privacy resource contract and other related contracts in the contract layer to convert the previously publicly used Class I resources into corresponding privacy resources for specific resource data processing. This effectively protects the data security of users participating in resource data processing, prevents the leakage of user data during the process, and efficiently and securely completes resource data processing tasks such as resource generation, resource consumption, and resource transactions. Attached Figure Description

[0065] To more clearly illustrate the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0066] Figure 1 This is a schematic diagram of an embodiment of the contract framework of a resource data processing system that applies the resource data processing method provided in the embodiments of this specification;

[0067] Figure 2 This is a schematic diagram of an embodiment of a privacy resource contract deployed in the contract layer;

[0068] Figure 3 This is a flowchart illustrating a resource data processing method provided in one embodiment of this specification;

[0069] Figure 4 This is a schematic diagram illustrating one embodiment of the resource data processing method provided in the embodiments of this specification, applied in a scenario example.

[0070] Figure 5 This is a flowchart illustrating a resource data processing method provided in one embodiment of this specification;

[0071] Figure 6 This is a schematic diagram illustrating one embodiment of the resource data processing method provided in the embodiments of this specification, applied in a scenario example.

[0072] Figure 7 This is a flowchart illustrating a resource data processing method provided in one embodiment of this specification;

[0073] Figure 8 This is a schematic diagram illustrating one embodiment of the resource data processing method provided in the embodiments of this specification, applied in a scenario example.

[0074] Figure 9 This is a schematic diagram of the structural composition of a server provided in one embodiment of this specification;

[0075] Figure 10 This is a schematic diagram of the structural composition of a resource data processing apparatus provided in one embodiment of this specification;

[0076] Figure 11 This is a schematic diagram of the structural composition of a resource data processing apparatus provided in one embodiment of this specification;

[0077] Figure 12This is a schematic diagram of the structural composition of a resource data processing device provided in one embodiment of this specification. Detailed Implementation

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

[0079] Given that resource data processing systems based on existing decentralized systems (e.g., decentralized exchanges) are often publicly accessible and recorded on the blockchain, third parties can use big data analytics to track users behind related accounts (e.g., e-wallets), making user privacy vulnerable to leaks.

[0080] In addition, most existing methods use an order book model for specific resource data processing, which is prone to liquidity problems. Resource data often has to wait for a long time before it can be processed, resulting in relatively long processing time and relatively low processing efficiency.

[0081] To address the root cause of the aforementioned problems, this specification suggests that, in practical implementation, privacy resource contracts (e.g., privacy token contracts), Merkle tree contracts, privacy resource management contracts, etc., can be pre-deployed in the contract layer of the resource data processing system.

[0082] Furthermore, the aforementioned privacy resource contract can also be a contract that supports automated market makers based on a privacy-preserving AMM algorithm; correspondingly, the aforementioned contract layer can also include a swap EVM contract, which can support the use of an automated market maker model to process resource data, incentivize liquidity providers to provide liquidity, improve the overall processing efficiency of resource data, and shorten processing time.

[0083] In practice, the first user can generate and send a corresponding resource data processing request through their terminal. The resource data processing system can respond to the request by first verifying the privacy resource contract. If the verification is successful, the system calls the privacy resource contract and other related contracts to convert the publicly available Type I resources into corresponding privacy resources for specific resource data processing. This effectively protects the data security of the first user participating in the resource data processing and prevents the leakage of the user's privacy during the process. It also improves the efficiency of resource data processing.

[0084] Based on the above approach, before implementation, an improved contract framework can be built for the resource data processing system by introducing and utilizing privacy resource contracts. See [reference needed]. Figure 1 As shown, the contract framework can include at least the following structures: application layer, contract layer, and base layer.

[0085] Specifically, the aforementioned application layer may include: front-end modules (e.g., swap front-end), resource port modules (e.g., Samurai wallet), and off-chain service modules.

[0086] The aforementioned contract layer deploys at least a privacy resource contract (e.g., a privacy token contract). Furthermore, it can also deploy related contracts such as Merkle tree contracts (e.g., a note Merkle tree contract) and privacy resource management contracts (e.g., a token manager contract). Additionally, the contract layer can deploy a privacy algorithm SDK module that interfaces with the privacy resource contract.

[0087] The aforementioned foundational layer may specifically include: a base network (e.g., an Alaya network or a PlatOn network) and the zk cryptographic algorithm, etc.

[0088] Specifically, the aforementioned privacy resource contract can be understood as a smart contract built based on a preset cryptographic algorithm, capable of generating, consuming, trading, and processing data related to privacy resources.

[0089] The aforementioned Merkle tree contract can be understood as a contract that provides calculation and query services for the relevant Merkle root hash during resource data processing.

[0090] The aforementioned privacy resource management contract can be specifically understood as a contract that matches the privacy resource contract and provides privacy resource management services during resource data processing. Specifically, the aforementioned privacy resource management contract can also be linked to the first type of resource contract, enabling corresponding data interaction with the first type of resource contract used for storing and processing the first type of resources. The aforementioned first type of resource contract is used to process and store first type of resources that do not possess privacy characteristics.

[0091] The aforementioned privacy algorithm SDK module (which can be abbreviated as privacy algorithm SDK) is connected to the privacy resource contract and can provide users with a calling interface for the privacy contract. It can be understood as a set of interfaces that match the privacy resource contract.

[0092] The aforementioned privacy swap frontend can be called by the user terminal to generate relevant parameter data (e.g., proof documents, commitment data, privacy addresses, etc.) for resource data processing.

[0093] The aforementioned off-chain services can be used to monitor the relevant operations of the Merkel tree contract and record complete information about the Merkel tree.

[0094] Specifically, the aforementioned privacy resource contract can be a privacy resource contract supporting automated market makers based on the AMM algorithm. Correspondingly, the aforementioned contract layer can also deploy a swap evm contract supporting automated market makers based on the AMM algorithm. The swap evm contract can then perform automated market maker operations by calling cryptographic algorithms and the privacy resource contract across contracts.

[0095] The aforementioned AMM algorithm, or Automated Market Maker algorithm, simulates price behavior in markets such as DeFi. Although different decentralized exchange (DEX) designs exist, AMM-based DEXs can achieve the highest liquidity and the highest average daily trading volume.

[0096] Based on the AMM algorithm, users can create initial trading pairs by deploying smart contracts. A liquidity provider selects a trading pair and deposits resource data. The liquidity provider can retrieve its stored resource data at any time. This resource data trading process is typically referred to as a swap operation in AMM-based DEXs, where users exchange type A resources in the trading pair pool for type B resources according to a specific resource value formula.

[0097] Furthermore, the aforementioned AMM algorithm can specifically include the following three types: Constant Sum Market Maker (CSMM), Constant Average Market Maker (CMMM), and Advanced Hybrid Constant Function Market Maker (CFMM).

[0098] Among them, the Constant Summons Market Maker (CSMM) algorithm adopts Uniswap's constant product algorithm as the basic resource value strategy.

[0099] Specifically, assuming that at time T0, the resource value balance of trading pair A / B is recorded as (A / B) = [x:y], and z = x•y. In one swap operation, a user can put Δx A-type resources into the liquidity pool to exchange for Δy B-type resources.

[0100] Assuming the transaction is completed at time T1, the resource value balance of the transaction pair A / B is updated as follows: (A / B) = [x':y'], where x' = x + Δx, y' = y - Δy. And we have: .

[0101] The aforementioned privacy resource contract can specifically be a privacy resource contract based on constant sum market maker (CSMM).

[0102] In practical implementation, based on the above contract framework, when a user needs to initiate resource data processing, they can call resource port modules such as the Samurai wallet through the privacy swap frontend of the application layer via the user terminal, and call the privacy resource contract of the contract layer through the privacy algorithm SDK module. The node server in the resource data processing system with the privacy resource contract deployed can, based on the base layer, coordinate other contracts in the contract layer to use privacy resources with privacy characteristics to replace the first type of resources that do not have privacy characteristics that are publicly disclosed, thereby completing the specific resource data processing.

[0103] In this embodiment, the node server may specifically include a distributed node server applied to one side of the resource data processing system, capable of data transmission, data processing, and other functions, responsible for data processing in the background. Specifically, the node server may be, for example, an electronic device with data computation, storage, and network interaction capabilities. Alternatively, the node server may be a software program running on the electronic device, providing support for data processing, storage, and network interaction. In this embodiment, the number of servers included in the node server is not specifically limited. The node server may be a single server, several servers, or a server cluster formed by several servers.

[0104] In this embodiment, the user terminal may specifically include a front-end applied to the user side, capable of data collection, data transmission, and other functions. Specifically, the user terminal may be an electronic device such as a desktop computer, tablet computer, laptop computer, or smartphone. Alternatively, the user terminal may also be a software application that can run on the aforementioned electronic device. For example, it may be an app running on a smartphone.

[0105] For details, please refer to Figure 2 As shown, taking the privacy token contract as an example of a privacy resource, the privacy token contract can also be connected to the following structures: Privacy Token, Registry, ACL, Validator, Storage, TokenManager, etc.

[0106] Based on the above resource data processing system, see [link / reference] Figure 3 As shown in the figure, this specification provides a resource data processing method. Specifically, this method is applied to a resource data processing system. In practice, the method may include the following:

[0107] S301: Receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource generation request; the resource data processing request carries at least generation parameters;

[0108] S302: In response to the resource data processing request, invoke the privacy resource contract for the first verification;

[0109] S303: If the first verification is successful, the privacy resource contract is invoked to generate the corresponding first privacy resource based on the preset cryptographic algorithm and the generation parameters; wherein, the privacy resource contract is deployed at the contract layer;

[0110] S304: Perform data processing related to the first privacy resource by invoking the privacy resource contract.

[0111] In some embodiments, the aforementioned first user terminal can be specifically understood as a user terminal deployed on the side of a first user. The first user can be specifically understood as the initiator of the resource data processing request.

[0112] The resources involved in the aforementioned resource data processing requests can be physical resources, such as natural gas, food, and oil; or virtual resources, such as virtual resources, thread resources, computing resources, and financial resources. It should be noted that the resources listed above are merely illustrative. In actual implementation, depending on the specific application scenario and processing requirements, the resources mentioned above may also include other types of resources. This specification does not limit this.

[0113] In some embodiments, the above-mentioned resource generation request can be specifically understood as a resource data processing request that requests the generation of corresponding privacy resources based on the first type of resources held, which belongs to a type of request among resource data processing requests.

[0114] Specifically, the aforementioned privacy resources can be understood as a first type of resource, distinct from publicly available resources that lack privacy features. This first type of resource is an encrypted resource that possesses privacy features, preventing third parties from tracking the privacy data of users associated with it. Conversely, the first type of resource can be understood as a publicly available resource that lacks privacy features and is easily tracked by third parties, allowing them to access the privacy data of users associated with it.

[0115] The aforementioned privacy resource can specifically be a resource obtained by processing a preset cryptographic algorithm. This preset cryptographic algorithm may specifically include covert address algorithms, etc.

[0116] In some embodiments, the resource data processing request described above carries at least generation parameters.

[0117] The aforementioned generation parameters may include at least: a resource value for the first privacy resource to be generated, a public key for the resource corresponding to the first privacy resource, and commitment data regarding the public key. Specifically, the first privacy resource may be the privacy resource to be generated. Furthermore, the aforementioned generation parameters may also include information such as the type and quantity of the first privacy resource.

[0118] Specifically, the aforementioned public key can be a public key generated by the first user terminal based on a preset cryptographic algorithm (or preset encryption rules) and corresponding to the first privacy resource. This public key is not associated with the first user. Consequently, subsequent third parties cannot trace the first user or other associated users based on the first privacy resource processed using this public key. The aforementioned commitment data can be commitment data used to commit that the public key is generated based on a preset cryptographic algorithm and corresponds one-to-one with the first privacy resource.

[0119] In some embodiments, the first user terminal may also generate a resource public key in the following manner:

[0120] S1: Obtain a random number as the first temporary private key for the first privacy resource; and generate the corresponding first temporary public key based on the first temporary private key;

[0121] S2: Based on the preset construction rules, intermediate data is constructed using the first user's first observation public key and first temporary private key;

[0122] S3: Construct the resource public key based on the intermediate data and the first user's first payment public key.

[0123] In some embodiments, specifically, for example, the first user terminal may first obtain a parameter set A random number is randomly selected from the data. This serves as a first temporary private key. Next, the first user terminal can generate the corresponding first temporary public key using the first temporary private key according to the following formula. : Where G is the base point on the elliptic curve group.

[0124] Then, the first user terminal can construct intermediate data according to the preset construction rules, using the first observation public key and the first temporary private key, according to the following formula. : Where H represents hash operation, The first user's public key is used to observe the first public key. This is the first temporary public key.

[0125] Finally, the first user terminal can construct the corresponding resource public key using the first temporary public key and the first user's first payment public key according to the following formula. : .in, This is the first payment public key for the first user.

[0126] In some embodiments, the above-mentioned invocation of the privacy resource contract, invocation of the privacy resource management contract, and invocation of the Merkle tree contract can be specifically understood as invoking the node server with the privacy resource contract deployed, the node server with the privacy resource contract deployed, and the node server with the Merkle tree contract deployed in the resource data processing system, respectively.

[0127] In some embodiments, the aforementioned privacy resource contract is deployed at the contract layer. This contract layer may also deploy related contracts such as Merkle tree contracts and privacy resource management contracts. Furthermore, the contract layer may also deploy privacy algorithm SDKs, swap EVM contracts, etc.

[0128] In some embodiments, as specifically implemented, refer to Figure 4 As shown, the first user terminal can initiate the above-mentioned resource data processing request to the resource data processing system (node ​​server) through the application layer and the privacy algorithm SDK in the contract layer, so as to call the privacy resource contract deployed in the contract layer to perform the first verification. If the first verification is successful, the specific resource data generation and processing will then be carried out.

[0129] Specifically, the first user terminal can initiate the aforementioned resource data processing request through the relevant interfaces of the privacy algorithm SDK, such as the Mint TX interface, to invoke the privacy resource contract to perform relevant processing of the resource data.

[0130] In some embodiments, see Figure 4 As shown, it can respond to resource data processing requests and invoke the privacy resource contract for the first verification.

[0131] The aforementioned invocation of the privacy resource contract for the first verification may, in practice, include: invoking the privacy resource contract to query the first type of resource contract based on the generated parameters to determine whether the resource value meets the requirements; and if the resource value meets the requirements, determining that the first verification has passed.

[0132] Specifically, the privacy resource contract can determine whether the resource value meets the requirements by querying whether the resource value of the first type of resource held by the first user stored in the first type of resource contract is greater than or equal to the resource value contained in the generation parameters.

[0133] If the resource value of the first type of resource held by the first user in the first type of resource contract is greater than or equal to the resource value in the generation parameters, the resource value is determined to meet the requirements. Thus, the first verification can be determined to be successful, triggering the privacy resource contract to generate and process subsequent resource data.

[0134] Conversely, if it is determined that the resource value of the first type of resource held by the first user in the first type of resource contract is less than the resource value in the generation parameters, it is determined that the resource value does not meet the requirements, and thus the first verification fails. At this time, the privacy resource contract is not triggered to generate subsequent resource data. Instead, a first type of error message is generated regarding the insufficient resource value of the first type of resource, and this first type of error message is fed back to the first user terminal to prompt the first user to re-initiate a resource data processing request that meets the requirements through the first user terminal.

[0135] In some embodiments, during the first verification process, if the resource value meets the requirements, the resource public key carried in the resource data processing request and the commitment data about the resource public key can also be verified; if the resource public key and commitment data are verified successfully, the first verification is finally determined to be successful.

[0136] In some embodiments, the above-described data processing related to the first privacy resource by invoking a privacy resource contract may include the following:

[0137] S1: Generate and save the root hash value corresponding to the first privacy resource by calling the Merkle tree contract through the privacy resource contract;

[0138] S2: By calling the privacy resource management contract through the privacy resource contract, the first type of resource corresponding to the first privacy resource is transferred from the first type of resource contract to the privacy resource management contract;

[0139] S3: Call the privacy resource contract to update the privacy resource state set.

[0140] Each of the aforementioned first privacy resources corresponds one-to-one with a root hash value.

[0141] In some embodiments, the Merkle tree contract may specifically include a storage list; correspondingly, after calculating the root hash value corresponding to the first privacy resource, the Merkle tree can record the root hash value in the storage list for storage.

[0142] In some embodiments, the privacy resource can be constructed by a privacy resource contract based on a preset cryptographic algorithm. Alternatively, instead of constructing a separate privacy resource, the root hash value corresponding to the privacy resource generated and stored by the Merkle tree can be used to represent the privacy resource.

[0143] In some embodiments, depending on the specific application scenario, the above storage list may be made public so that users can query and obtain the corresponding root hash value.

[0144] In some embodiments, when implemented, the privacy resource contract can call the privacy resource management contract through the deposit interface through the first type of resource contract through the transaction interface (e.g., the transfer interface) to transfer the first type of resource, which was originally stored in the first type of resource contract, from the first type of resource contract and store it in the privacy resource management contract.

[0145] In some embodiments, a privacy resource state set may be set within the privacy resource contract. This privacy resource state set may specifically store the state data of the privacy resources.

[0146] In some embodiments, the above-mentioned invocation of the privacy resource contract to update the privacy resource state set may specifically include: invoking the privacy resource contract to add state data about the first privacy resource to the privacy resource state set; and setting the state data of the first privacy resource to unconsumed.

[0147] Specifically, the privacy resource contract can use the serial number of the first privacy resource, for example, NO.0112, as the identifier corresponding to the first privacy resource; add a status data entry marked with the above identifier to the privacy resource status set; and set the data value of the status data to "unconsumed".

[0148] In some embodiments, off-chain services in the contract layer can continuously monitor the operations of the Merkle tree contract. After detecting that the Merkle tree contract has performed operations related to the calculation and storage of the root hash value, it can record the data in a timely manner, so that regulators can backtrack when needed to maintain the health and security of resource data processing on the resource data processing system.

[0149] In some embodiments, after the off-chain server detects that the Merkle tree contract has calculated and saved a new root hash value, it determines that the privacy resource contract has generated a new privacy resource; and then saves the privacy resource in the database connected to the off-chain service via the privacy resource management contract.

[0150] In some embodiments, the preset cryptographic algorithm may specifically include a hidden address algorithm, etc. Of course, in specific implementations, other suitable cryptographic algorithms may also be used as the preset cryptographic algorithm, depending on the specific circumstances.

[0151] In some embodiments, after the resource data generation and processing are completed as described above, the node server of the resource data processing system can also generate a hash value for the resource data processing request and feed the hash value back to the first user terminal to indicate that the resource data processing system has completed the resource data processing for the resource data processing request. For example, a privacy resource contract can generate and feed back the corresponding transaction hash value.

[0152] Based on the above embodiments, the first type of resources that the first user originally held and which are publicly available and do not have privacy features can be converted into corresponding first privacy resources and stored in the privacy resource management contract through the privacy resource contract. This avoids the leakage of the first user's privacy during the resource generation and storage process and protects the user's data security during the generation and storage of privacy resources.

[0153] Based on the above resource data processing system, see [link / reference] Figure 5 As shown in the figure, this specification provides a resource data processing method. Specifically, this method is applied to a resource data processing system. In practice, the method may include the following:

[0154] S501: Receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; the resource data processing request carries at least consumption parameters;

[0155] S502: In response to the resource data processing request, invoke the privacy resource contract for second verification;

[0156] S503: If the second verification is successful, call the privacy resource contract to update the privacy resource state set; call the privacy resource management contract through the privacy resource contract to transfer the corresponding first type of resource from the privacy resource management contract to the first type of resource contract.

[0157] In some embodiments, the aforementioned resource consumption request can be specifically understood as a resource data processing request that requests the consumption of corresponding privacy resources based on the held privacy resources, belonging to a type of resource data processing request. The aforementioned second privacy resource can be specifically understood as the privacy resource to be consumed.

[0158] In some embodiments, the resource data processing request described above carries at least a consumption parameter.

[0159] The aforementioned consumption parameters may include at least the resource value, proof document, random public key, and processing signature of the second privacy resource to be consumed. Furthermore, the consumption parameters may also include information such as the type, quantity, state data, and root hash value of the second privacy resource to be consumed.

[0160] In some embodiments, the aforementioned proof document is specifically used to prove that the first user holds privacy resources of a corresponding resource value. Specifically, the aforementioned proof document may be a zero-knowledge proof document generated by the first user terminal according to a zero-knowledge proof algorithm.

[0161] In some embodiments, when generating the resource consumption request, the first user terminal can first construct a resource private key for the second privacy resource based on the resource public key of the second privacy resource to be consumed; and then use the resource private key to sign the second privacy resource to obtain a resource signature for the second privacy resource, which serves as proof of consuming and using the second privacy resource. Next, the identifier of the second privacy resource to be consumed can be combined with the resource signature to obtain the resource consumption request.

[0162] Specifically, the aforementioned private key can be a private key generated by the first user terminal based on a preset cryptographic algorithm, corresponding to the second privacy resource. This private key is not associated with the first user. Consequently, third parties cannot subsequently trace the first user or other associated users based on the second privacy resource processed using this private key.

[0163] In some embodiments, when constructing a resource private key for a second privacy resource to be consumed, the following may be included: obtaining a resource public key for the second privacy resource; and constructing a resource private key for the second privacy resource using the resource public key, the first observation private key, and the first payment private key of the first user, according to a preset construction rule.

[0164] In some embodiments, in specific implementations, based on the relevant characteristics of preset construction rules, the second temporary public key of the second privacy resource, and the first observation private key and the first payment private key of the first user, can be used to construct the privacy private key of the second privacy resource in the following manner:

[0165]

[0166] in, The private key for the second privacy resource. For the second temporary public key corresponding to the second privacy resource, The first observation private key for the first user. This is the first payment private key for the first user.

[0167] In some embodiments, the first user terminal may generate a one-time random private key and a random public key for the current resource consumption request; and use the random private key to sign the resource data processing request to obtain the corresponding processing signature.

[0168] In some embodiments, as specifically implemented, refer to Figure 6As shown, the first user terminal can initiate the above-mentioned resource data processing request to the resource data processing system (node ​​server) through the application layer and the privacy algorithm SDK in the contract layer, so as to call the privacy resource contract deployed in the contract layer to perform the second verification first. If the second verification is successful, the specific resource data consumption processing will be carried out.

[0169] Specifically, the first user terminal can initiate the aforementioned resource data processing request through the relevant interfaces of the privacy algorithm SDK, such as the destroy tx interface, to invoke the privacy resource contract to perform relevant processing of the resource data.

[0170] In some embodiments, the second verification performed in response to the resource data processing request may include the following:

[0171] S1: Based on the consumption parameters, query the privacy resource status set of the privacy resource contract to determine whether the status data of the second privacy resource is unconsumed;

[0172] S2: If it is determined that the state data of the second privacy resource is unconsumed, call the Merkle tree contract to calculate the root hash value of the second privacy resource;

[0173] S3: Call the privacy resource contract to determine whether the second privacy resource meets the requirements based on the root hash value of the second privacy resource;

[0174] S4: If the second privacy resource meets the requirements, verify whether the processing signature meets the requirements;

[0175] S5: If the signature processing meets the requirements, confirm that the second verification is successful.

[0176] In some embodiments, the privacy resource contract can query the privacy resource state set based on the identifier of the second privacy resource to determine whether the state data of the second privacy resource to be consumed is unconsumed. If the query finds that the state data of the second privacy resource is consumed, subsequent data processing can be triggered.

[0177] Conversely, if the status data of the second privacy resource is found to be consumed, subsequent data processing will not be triggered. Furthermore, a second type of error message regarding the consumption of the second privacy resource can be generated and fed back to the first user terminal to prompt the first user to re-initiate a compliant resource data processing request through the first user terminal.

[0178] In some embodiments, when implemented, the privacy resource contract may invoke the Merkle tree contract to recalculate the root hash value for the second privacy resource based on the identifier of the second privacy resource.

[0179] In the specific calculation, the Merkle tree contract can query the hash value of the second privacy resource based on the identifier, as well as all hash values ​​and adjacent hash values ​​on the path from the second privacy resource to the Merkle tree root; and obtain the root hash value for the second privacy resource (which can be denoted as root hash value 1) through layer-by-layer calculation based on the above hash values; and then feed back the above root hash value 1 to the privacy resource contract.

[0180] In some embodiments, the privacy resource contract can obtain the hash value to be verified for the second privacy resource (which can be denoted as root hash value 2) through a resource data processing request; or, it can query the Merkle tree's data storage list to obtain root hash value 2. Further, the privacy resource contract can compare the aforementioned root hash value 1 and root hash value 2 to verify whether the two root hash values ​​are the same. If it is determined that the two root hash values ​​are the same, it can be determined that the second privacy resource meets the requirements, and subsequent data processing can proceed.

[0181] Conversely, if the two root hash values ​​are determined to be different, it can be determined that the second privacy resource does not meet the requirements and will not trigger subsequent data processing. Furthermore, a third type of error message regarding the second privacy resource not meeting the requirements can be generated and fed back to the first user terminal to prompt the first user to re-initiate a compliant resource data processing request through the first user terminal.

[0182] In some embodiments, off-chain services in the contract layer can continuously monitor the operations of the Merkle tree contract and record them in a timely manner.

[0183] In some embodiments, the privacy resource contract may use a random public key to verify the processing signature to verify whether the processing signature meets the requirements, and if the processing signature meets the requirements, the second verification is deemed successful.

[0184] In some embodiments, if the privacy resource contract determines that the processing signature meets the requirements, it may also use the resource public key of the second privacy resource to verify the resource signature contained in the resource data processing request. If the resource signature verification is successful, the second verification is finally determined to be successful.

[0185] In some embodiments, the second verification may further include verification of information such as supporting documents and the type of the second privacy resource.

[0186] In some embodiments, if the second verification is successful, the privacy resource contract privacy resource state set can be invoked to update accordingly.

[0187] Specifically, the above-mentioned call to the privacy resource contract to update the privacy resource state set may include: calling the privacy resource contract to set the state data of the second privacy resource in the privacy resource state set to "consumed".

[0188] In some embodiments, while invoking the privacy resource contract to update the privacy resource state set, the privacy resource contract can also be used to invoke the privacy resource management contract to transfer the corresponding first-type resource from the privacy resource management contract to the first-type resource contract.

[0189] In some embodiments, when implemented, the privacy resource contract can call the privacy resource management contract through the deposit interface and the first type of resource contract through the transaction interface (e.g., the transfer interface) to retrieve the first type of resource, which was originally stored in the privacy resource management contract, corresponding to the second privacy resource, from the privacy resource management contract and transfer it to the first type of resource contract.

[0190] In some embodiments, after the resource data consumption processing is completed in the manner described above, the node server of the resource data processing system can also generate a hash value for the resource data processing request and feed the hash value back to the first user terminal to indicate that the resource data processing system has completed the resource data processing for the resource data processing request. For example, a privacy resource contract can generate and feed back the corresponding transaction hash value.

[0191] Based on the above embodiments, the first type of resources originally stored in the privacy resource management contract can be retrieved by consuming the corresponding second privacy resources through the privacy resource contract, and then re-stored into the first type of resource contract. This avoids the leakage of the first user's privacy during the resource consumption and retrieval process, and protects the user's data security during the privacy resource consumption and retrieval process.

[0192] Based on the above resource data processing system, see [link / reference] Figure 7 As shown in the figure, this specification provides a resource data processing method. Specifically, this method is applied to a resource data processing system. In practice, the method may include the following:

[0193] S701: Receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated, and consumption parameters for a second privacy resource to be consumed.

[0194] S702: In response to the resource data processing request, invoke the privacy resource contract for third-party verification;

[0195] S703: If the third verification is successful, the Merkle tree contract is called through the privacy resource contract to generate and save the root hash value corresponding to the first privacy resource;

[0196] S704: Invoke the privacy resource contract to update the privacy resource state set.

[0197] In some embodiments, the aforementioned resource transaction request can be specifically understood as a resource data processing request that consumes the second privacy resource held by the first user and generates the first privacy resource provided to the second user, belonging to a type of resource data processing request. Furthermore, the aforementioned resource transaction request can also be understood as a combination of a resource generation request regarding the first privacy resource and a resource consumption request regarding the second privacy resource.

[0198] In some embodiments, the resource data processing request carries at least generation parameters for a first privacy resource and consumption parameters for a second privacy resource. The generation parameters may include at least: a resource value for the first privacy resource to be generated, a public key corresponding to the first privacy resource, and commitment data related to the public key, etc., related to the first privacy resource. The consumption parameters may include at least: a resource value for the second privacy resource to be consumed, a proof document, a random public key, and a processing signature, etc., related to the second privacy resource.

[0199] In some embodiments, see details. Figure 8 As shown, the above-mentioned invocation of the privacy resource contract for third-party verification may include the following in its specific implementation:

[0200] S1: Call the privacy resource contract to check whether the resource value of the first privacy resource is the same as the resource value of the second privacy resource based on the generation parameters and consumption parameters;

[0201] S2: If it is determined that the resource value of the first privacy resource is the same as the resource value of the second privacy resource, query the privacy resource status set of the privacy resource contract according to the consumption parameter to determine whether the status data of the second privacy resource is unconsumed;

[0202] S3: If it is determined that the state data of the second privacy resource is unconsumed, call the Merkle tree contract to calculate the root hash value of the second privacy resource, and determine whether the second privacy resource meets the requirements based on the root hash value of the second privacy resource;

[0203] S4: If the second privacy resource meets the requirements, verify whether the processing signature meets the requirements;

[0204] S5: If the signature processing meets the requirements, confirm that the third verification is successful.

[0205] In some embodiments, specifically, the resource values ​​of the first privacy resource and the second privacy resource can be compared to verify whether they are the same. If the two resource values ​​are determined to be the same, subsequent data processing can be triggered. Conversely, if the two resource values ​​are determined to be different, subsequent data processing will not be triggered. A fourth type of error message indicating a mismatch between the resource values ​​of the first and second privacy resources can then be generated and sent to the first user terminal, prompting the first user to re-initiate a compliant resource data processing request through the first user terminal.

[0206] In some embodiments, the above-mentioned invocation of the privacy resource contract to update the privacy resource state set may include the following: invoking the privacy resource contract to set the state data of the second privacy resource in the privacy resource state set to consumed; and invoking the privacy resource contract to add state data of the first privacy resource in the privacy resource state set; and setting the state data of the first privacy resource to unconsumed.

[0207] In some embodiments, after the transaction processing of resource data is completed in the manner described above, the first type of resource originally stored in the privacy resource management contract corresponding to the second privacy resource held by the first user is changed to correspond to the first privacy resource held by the second user.

[0208] When a second user needs to transact or consume the first privacy resource, they can use their second user terminal to construct a resource private key for the first privacy resource using the resource public key of the second privacy resource, the second user's second observation private key, and the second payment private key. They can then use this resource private key to sign and transact or consume the first privacy resource.

[0209] In some embodiments, the privacy resource management contract can modify the mapping relationship of the stored first type of resource from one corresponding to the second privacy resource to one corresponding to the first privacy resource.

[0210] In some embodiments, the off-chain service can also monitor the operations of the Merkle tree contract and record them in a timely manner.

[0211] In some embodiments, after completing the resource data transaction processing as described above, the node server of the resource data processing system can also generate a hash value for the resource data processing request and feed the hash value back to the first user terminal to indicate that the resource data processing system has completed the resource data processing for the request. For example, the corresponding transaction hash value can be generated and fed back by a privacy resource contract.

[0212] Based on the above embodiments, a privacy resource contract can be used to consume the second privacy resource of the first user and generate the second privacy resource of the second user, thereby transferring the privacy resource originally held by the first user to the second user. This avoids the leakage of the user privacy of the first user and the user privacy of the second user during the resource transaction transfer process, and protects the user's data security during the consumption and retrieval of privacy resources.

[0213] Based on the resource data processing method provided in this specification, privacy resource contracts, Merkle tree contracts, and privacy resource management contracts can be pre-deployed in the contract layer of a decentralized resource data processing system. Before implementation, the first user can generate and send a corresponding resource data processing request through their terminal. The resource data processing system can respond to this request by calling the privacy resource contract for verification. If the verification is successful, the system calls the privacy resource contract and other related contracts to convert the publicly available Type I resources into corresponding privacy resources for specific resource data processing. This effectively protects the data security of users participating in resource data processing, prevents the leakage of user privacy during the process, and efficiently and securely completes resource data processing tasks such as resource generation, resource consumption, and resource transactions.

[0214] This specification also provides a server, including a processor and a memory for storing processor-executable instructions. Specifically, the processor can perform the following steps according to the instructions: receiving a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource generation request; the resource data processing request carries at least generation parameters; responding to the resource data processing request, invoking a privacy resource contract for a first verification; if the first verification is successful, invoking the privacy resource contract to generate a corresponding first privacy resource based on a preset cryptographic algorithm and the generation parameters; wherein the privacy resource contract is deployed at the contract layer; and performing data processing related to the first privacy resource by invoking the privacy resource contract.

[0215] To execute the above instructions more accurately, please refer to... Figure 9 As shown in the embodiments of this specification, another specific server is also provided, wherein the server includes a network communication port 901, a processor 902, and a memory 903. The above structures are connected by internal cables so that the various structures can perform specific data interaction.

[0216] Specifically, the network communication port 901 can be used to receive resource data processing requests initiated by the first user terminal; wherein the resource data processing request includes a resource generation request; and the resource data processing request carries at least generation parameters.

[0217] The processor 902 can specifically be used to respond to the resource data processing request, call the privacy resource contract for first verification; if the first verification is successful, call the privacy resource contract to generate the corresponding first privacy resource based on the preset cryptographic algorithm and the generation parameters; wherein, the privacy resource contract is deployed at the contract layer; and perform data processing related to the first privacy resource by calling the privacy resource contract.

[0218] The memory 903 can be used to store the corresponding instruction program.

[0219] In this embodiment, the network communication port 901 can be a virtual port bound to different communication protocols, thereby enabling the sending or receiving of different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. Furthermore, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM or CDMA; it can also be a Wi-Fi chip; or it can be a Bluetooth chip.

[0220] In this embodiment, the processor 902 can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc. This specification is not limiting.

[0221] In this embodiment, the memory 903 may include multiple layers. In a digital system, anything that can store binary data can be a memory. In an integrated circuit, a circuit with storage function but no physical form is also called a memory, such as RAM, FIFO, etc. In a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0222] This specification also provides a server, including a processor and a memory for storing processor-executable instructions. Specifically, the processor can perform the following steps according to the instructions: receiving a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; the resource data processing request carries at least consumption parameters; responding to the resource data processing request, invoking a privacy resource contract for a second verification; if the second verification is successful, invoking the privacy resource contract to update the privacy resource state set; and invoking a privacy resource management contract through the privacy resource contract to transfer the corresponding first-type resources from the privacy resource management contract to the first-type resource contract.

[0223] This specification also provides a server, including a processor and a memory for storing processor-executable instructions. Specifically, the processor can perform the following steps according to the instructions: receiving a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated and consumption parameters for a second privacy resource to be consumed; responding to the resource data processing request by invoking a privacy resource contract for third verification; if the third verification is successful, generating and saving a root hash value corresponding to the first privacy resource by invoking a Merkle tree contract through the privacy resource contract; and updating the privacy resource state set by invoking the privacy resource contract.

[0224] This specification also provides a computer storage medium based on the above-described resource data processing method. The computer storage medium stores computer program instructions that, when executed, implement: receiving a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource generation request; the resource data processing request carries at least generation parameters; responding to the resource data processing request, invoking a privacy resource contract for a first verification; if the first verification is successful, invoking the privacy resource contract to generate a corresponding first privacy resource based on a preset cryptographic algorithm and the generation parameters; wherein the privacy resource contract is deployed at the contract layer; and performing data processing related to the first privacy resource by invoking the privacy resource contract.

[0225] This specification also provides a computer storage medium based on the above-described resource data processing method. The computer storage medium stores computer program instructions that, when executed, implement: receiving a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; the resource data processing request carries at least consumption parameters; responding to the resource data processing request, invoking a privacy resource contract for a second verification; if the second verification is successful, invoking the privacy resource contract to update the privacy resource state set; and invoking a privacy resource management contract through the privacy resource contract to transfer the corresponding first-type resources from the privacy resource management contract to the first-type resource contract.

[0226] This specification also provides a computer storage medium based on the above-described resource data processing method. The computer storage medium stores computer program instructions that, when executed, implement: receiving a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated and consumption parameters for a second privacy resource to be consumed; responding to the resource data processing request by invoking a privacy resource contract for third verification; if the third verification is successful, generating and saving a root hash value corresponding to the first privacy resource by invoking a Merkle tree contract through the privacy resource contract; and updating the privacy resource state set by invoking the privacy resource contract.

[0227] In this embodiment, the storage medium includes, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Cache, Hard Disk Drive (HDD), or Memory Card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured according to standards specified in the communication protocol for network connection communication.

[0228] In this embodiment, the specific functions and effects implemented by the program instructions stored in the computer storage medium can be explained in comparison with other implementation methods, and will not be repeated here.

[0229] See Figure 10 As shown, at the software level, this specification also provides a resource data processing apparatus, which may specifically include the following structural modules:

[0230] The receiving module 1001 is specifically used to receive a resource data processing request initiated by a first user terminal; wherein, the resource data processing request includes a resource generation request; the resource data processing request carries at least generation parameters;

[0231] The first verification module 1002 can be used to respond to the resource data processing request and call the privacy resource contract to perform the first verification.

[0232] The generation module 1003 can be specifically used to, upon confirming that the first verification has passed, invoke the privacy resource contract to generate the corresponding first privacy resource based on a preset cryptographic algorithm and generation parameters; wherein, the privacy resource contract is deployed at the contract layer;

[0233] The processing module 1004 can be used to process data related to the first privacy resource by calling the privacy resource contract.

[0234] In some embodiments, the contract layer may further deploy Merkle tree contracts and privacy resource management contracts.

[0235] In some embodiments, when the above-mentioned generation module 1003 is specifically implemented, it can perform data processing related to the first privacy resource by calling the privacy resource contract in the following manner: calling the Merkle tree contract through the privacy resource contract to generate and save the root hash value corresponding to the first privacy resource; calling the privacy resource management contract through the privacy resource contract to transfer the first type of resource corresponding to the first privacy resource from the first type of resource contract to the privacy resource management contract; and calling the privacy resource contract to update the privacy resource state set.

[0236] In some embodiments, the generation parameters may include at least: a resource value for the first privacy resource to be generated, a public key for the resource corresponding to the first privacy resource, and commitment data for the public key.

[0237] In some embodiments, when the first verification module 1002 is specifically implemented, it can call the privacy resource contract to perform the first verification in the following manner: call the privacy resource contract to query the first type of resource contract according to the generated parameters to determine whether the resource value meets the requirements; if the resource value meets the requirements, determine that the first verification is passed.

[0238] In some embodiments, when the above-mentioned generation module 1003 is specifically implemented, it can call the privacy resource contract to add status data about the first privacy resource to the privacy resource status set; and set the status data of the first privacy resource to unconsumed.

[0239] In some embodiments, the preset cryptographic algorithm may specifically include a hidden address algorithm, etc.

[0240] See Figure 11 As shown, at the software level, this specification also provides a resource data processing apparatus, which may specifically include the following structural modules:

[0241] The receiving module 1101 is specifically used to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; and the resource data processing request carries at least consumption parameters.

[0242] The second verification module 1102 can be used to respond to the resource data processing request and call the privacy resource contract to perform the second verification.

[0243] The processing module 1103 can be used to call the privacy resource contract to update the privacy resource state set when the second verification is confirmed to be passed; and to call the privacy resource management contract through the privacy resource contract to transfer the corresponding first type of resource from the privacy resource management contract to the first type of resource contract.

[0244] In some embodiments, the consumption parameters may include at least: the resource value of the second privacy resource to be consumed, proof documents, a random public key, and a processing signature.

[0245] In some embodiments, when the second verification module 1102 is specifically implemented, it may respond to the resource data processing request and perform the second verification in the following manner: according to the consumption parameters, query the privacy resource state set of the privacy resource contract to determine whether the state data of the second privacy resource is unconsumed; if the state data of the second privacy resource is determined to be unconsumed, call the Merkle tree contract to calculate the root hash value of the second privacy resource; call the privacy resource contract to determine whether the second privacy resource meets the requirements based on the root hash value of the second privacy resource; if the second privacy resource meets the requirements, verify whether the processing signature meets the requirements; if the processing signature meets the requirements, determine that the second verification is passed.

[0246] In some embodiments, when the above-mentioned processing module 1103 is specifically implemented, it can call the privacy resource contract to set the status data of the second privacy resource in the privacy resource status set to consumed.

[0247] See Figure 12 As shown, at the software level, this specification also provides a resource data processing apparatus, which may specifically include the following structural modules:

[0248] The receiving module 1201 is specifically used to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated, and consumption parameters for a second privacy resource to be consumed.

[0249] The third verification module 1202 can be used to respond to the resource data processing request and call the privacy resource contract for third verification.

[0250] The generation module 1203 can be used to generate and save the root hash value corresponding to the first privacy resource by calling the Merkle tree contract through the privacy resource contract, provided that the third verification is passed.

[0251] Update module 1204, call the privacy resource contract to update the privacy resource state set.

[0252] In some embodiments, the third verification module 1202 described above can, in specific implementation, invoke the privacy resource contract to perform the third verification in the following manner: Invoking the privacy resource contract to verify whether the resource value of the first privacy resource is the same as the resource value of the second privacy resource based on the generation parameters and consumption parameters; if the resource value of the first privacy resource is the same as the resource value of the second privacy resource, querying the privacy resource state set of the privacy resource contract based on the consumption parameters to determine whether the state data of the second privacy resource is unconsumed; if the state data of the second privacy resource is unconsumed, invoking the Merkle tree contract to calculate the root hash value of the second privacy resource, and determining whether the second privacy resource meets the requirements based on the root hash value of the second privacy resource; if the second privacy resource meets the requirements, verifying whether the processing signature meets the requirements; if the processing signature meets the requirements, determining that the third verification is passed.

[0253] In some embodiments, when the update module 1204 is specifically implemented, it can call the privacy resource contract to update the privacy resource state set in the following manner: call the privacy resource contract to set the state data of the second privacy resource in the privacy resource state set to consumed; call the privacy resource contract to add state data about the first privacy resource in the privacy resource state set; and set the state data of the first privacy resource to unconsumed.

[0254] It should be noted that the units, devices, or modules described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. For ease of description, the above devices are described by dividing them into various modules according to their functions. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection between the devices or units shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0255] As can be seen from the above, based on the resource data processing device provided in the embodiments of this specification, privacy resource contracts, Merkle tree contracts, privacy resource management contracts, etc., can be pre-deployed in the contract layer of the decentralized resource data processing system before specific implementation. In specific implementation, the first user can generate and send a corresponding resource data processing request through the first user terminal; the resource data processing system can respond to the resource data processing request and call the privacy resource contract for verification; if the verification is successful, the privacy resource contract and other related contracts are called to convert the originally publicly used first-type resources into corresponding privacy resources for specific resource data processing. This effectively protects the data security of the first user participating in resource data processing, avoids the leakage of the first user's privacy during resource data processing, and efficiently and securely completes the corresponding resource data processing.

[0256] While this specification provides the steps of operation for the methods described in the embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or client product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. The terms "first," "second," etc., are used to denote names and do not indicate any particular order.

[0257] Those skilled in the art will also know that, besides implementing the controller in the form of purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller take the form of logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.

[0258] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0259] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of this specification can essentially be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of this specification.

[0260] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. This specification can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.

[0261] Although this specification has been described by way of examples, those skilled in the art will recognize that many variations and modifications are possible without departing from the spirit of this specification, and it is intended that the appended claims cover such variations and modifications without departing from the spirit of this specification.

Claims

1. A resource data processing method, characterized in that, The improved contract framework is applied to a resource data processing system based on an improved contract framework, which includes at least an application layer, a contract layer, and a base layer. The application layer includes: a front-end module, a resource port module, and off-chain services; the method includes: The system receives a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource generation request; the resource data processing request carries at least generation parameters; the generation parameters include at least: a resource value for a first privacy resource to be generated, and a resource public key corresponding to the first privacy resource; the resource public key is a public key generated by the first user terminal based on a preset cryptographic algorithm, corresponding to the first privacy resource and not associated with the first user; the preset cryptographic algorithm includes a hidden address algorithm; the resource public key is generated in the following manner: obtaining a random number as a first temporary private key for the first privacy resource; generating a corresponding first temporary public key based on the first temporary private key; constructing intermediate data using the first user's first observation public key and the first temporary private key based on preset construction rules; and constructing the resource public key based on the intermediate data and the first user's first payment public key. In response to the resource data processing request, the privacy resource contract is invoked for the first verification; Upon successful verification, the privacy resource contract is invoked to generate the corresponding first privacy resource based on a preset cryptographic algorithm and generation parameters. The privacy resource contract is deployed at the contract layer. This contract layer also deploys a Merkle tree contract and a privacy resource management contract. The privacy resource management contract is connected to the first type of resource contract and, matching the privacy resource contract, is a contract that provides privacy resource management services during resource data processing. The privacy resource contract is a constant-sum, market-maker-based privacy resource contract and supports swap operations. Data processing related to the first privacy resource is performed by invoking the privacy resource contract, including: generating and saving the root hash value corresponding to the first privacy resource by invoking the Merkle tree contract through the privacy resource contract; transferring the first type of resource corresponding to the first privacy resource from the first type of resource contract to the privacy resource management contract through the privacy resource contract; updating the privacy resource state set by invoking the privacy resource contract; wherein, the off-chain service is used to monitor the operation of the Merkle tree contract, and after detecting that the Merkle tree contract has performed the operation of calculating and saving the root hash value, it makes corresponding records to facilitate the subsequent backtracking by the regulator when needed; and transferring the privacy resource to the database connected to the off-chain service for storage via the privacy resource management contract.

2. The method according to claim 1, characterized in that, The generated parameters also include: commitment data regarding the resource public key.

3. The method according to claim 2, characterized in that, The first verification is performed by invoking the privacy resource contract, including: The privacy resource contract is invoked to query the first type of resource contract based on the generated parameters to determine whether the resource value meets the requirements. If the resource value meets the requirements, the first verification is deemed successful.

4. The method according to claim 1, characterized in that, Invoke the privacy resource contract to update the privacy resource state set, including: Invoke the privacy resource contract to add state data about the first privacy resource to the privacy resource state set; and set the state data of the first privacy resource to unconsumed.

5. A resource data processing method, characterized in that, An improved contract framework is applied to a resource data processing system, wherein the improved contract framework includes at least an application layer, a contract layer, and a base layer; the application layer includes a front-end module, a resource port module, and off-chain services; the contract layer deploys a privacy resource contract, a Merkle tree contract, and a privacy resource management contract; the method includes: Receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; the resource data processing request carries at least consumption parameters; In response to the resource data processing request, the privacy resource contract is invoked for a second verification; If the second verification is successful, the privacy resource contract is invoked to update the privacy resource state set; the privacy resource management contract is invoked through the privacy resource contract to transfer the corresponding first-class resources from the privacy resource management contract to the first-class resource contract; The privacy resource corresponding to the first type of resource is generated in advance by calling the privacy resource contract based on a preset cryptographic algorithm and generation parameters. The generation parameters include at least: the resource value of the privacy resource to be generated and the resource public key corresponding to the privacy resource. The resource public key is a public key generated based on a preset cryptographic algorithm that corresponds to the privacy resource and is not associated with the user. The preset cryptographic algorithm includes a hidden address algorithm. The privacy resource is generated and saved in the following manner: the Merkle tree contract is called through the privacy resource contract to generate and save the root hash value corresponding to the privacy resource; the first type of resource corresponding to the privacy resource is transferred from the first type of resource contract to the privacy resource management contract through the privacy resource contract; the privacy resource state set is updated by calling the privacy resource contract; the off-chain service is used to monitor the operation of the Merkle tree contract. After detecting that the Merkle tree contract has performed the operation of calculating and saving the root hash value, it makes corresponding records to facilitate the subsequent backtracking by the regulator when needed; and the privacy resource is transferred to the database connected to the off-chain service for storage through the privacy resource management contract. The resource public key is generated as follows: a random number is obtained as a first temporary private key for the first privacy resource; a corresponding first temporary public key is generated based on the first temporary private key; intermediate data is constructed using the first user's first observation public key and the first temporary private key based on preset construction rules; the resource public key is constructed based on the intermediate data and the first user's first payment public key; the privacy resource management contract is connected to the first type of resource contract, and the contract that matches the privacy resource contract is the contract that provides privacy resource management services during resource data processing; the privacy resource contract is a privacy resource contract based on constant and market maker, and supports swap operations.

6. The method according to claim 5, characterized in that, The consumption parameters include at least: the resource value of the second privacy resource to be consumed, the proof document, the random public key, and the processing signature.

7. The method according to claim 6, characterized in that, In response to the resource data processing request, a second verification is performed, including: Based on the consumption parameters, query the privacy resource status set of the privacy resource contract to determine whether the status data of the second privacy resource is unconsumed; If it is determined that the state data of the second privacy resource is unconsumed, the Merkle tree contract is invoked to calculate the root hash value of the second privacy resource; The privacy resource contract is invoked to determine whether the second privacy resource meets the requirements based on the root hash value of the second privacy resource; If the second privacy resource meets the requirements, verify whether the processed signature meets the requirements. If the signature processing meets the requirements, the second verification is deemed successful.

8. The method according to claim 7, characterized in that, Invoke the privacy resource contract to update the privacy resource state set, including: Invoke the privacy resource contract to set the state data of the second privacy resource in the privacy resource state set to consumed.

9. A resource data processing method, characterized in that, An improved contract framework is applied to a resource data processing system, wherein the improved contract framework includes at least an application layer, a contract layer, and a base layer; the application layer includes a front-end module, a resource port module, and off-chain services; the contract layer deploys a privacy resource contract, a Merkle tree contract, and a privacy resource management contract; the method includes: The system receives a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated, and consumption parameters for a second privacy resource to be consumed; the generation parameters include at least: a resource value for the first privacy resource to be generated, and a public key corresponding to the first privacy resource; the public key is a public key generated by the first user terminal based on a preset cryptographic algorithm, corresponding to the first privacy resource and not associated with the first user; the preset cryptographic algorithm includes a hidden address algorithm; In response to the resource data processing request, the privacy resource contract is invoked for third-party verification; If the third verification is successful, the Merkle tree contract is called through the privacy resource contract to generate and save the root hash value corresponding to the first privacy resource; Invoke the privacy resource contract to update the privacy resource state set; After generating and saving the root hash value corresponding to the first privacy resource by calling the Merkle tree contract through the privacy resource contract, the method further includes: transferring the first type of resource corresponding to the privacy resource from the first type of resource contract to the privacy resource management contract by calling the privacy resource management contract through the privacy resource contract; and calling the privacy resource contract to update the privacy resource state set; wherein, the off-chain service is used to monitor the operation of the Merkle tree contract, and after detecting that the Merkle tree contract has performed the operation of calculating and saving the root hash value, it makes corresponding records to facilitate the subsequent backtracking by the regulator when needed; and transferring the privacy resource to the database connected to the off-chain service for storage via the privacy resource management contract; The resource public key is generated as follows: a random number is obtained as a first temporary private key for the first privacy resource; a corresponding first temporary public key is generated based on the first temporary private key; intermediate data is constructed using the first user's first observation public key and the first temporary private key based on preset construction rules; the resource public key is constructed based on the intermediate data and the first user's first payment public key; the privacy resource management contract is connected to the first type of resource contract, and the contract that matches the privacy resource contract is the contract that provides privacy resource management services during resource data processing; the privacy resource contract is a privacy resource contract based on constant and market maker, and supports swap operations.

10. The method according to claim 9, characterized in that, Invoking the privacy resource contract for third-party verification includes: The privacy resource contract is invoked to verify whether the resource value of the first privacy resource is the same as the resource value of the second privacy resource, based on the generation parameters and consumption parameters. If the resource value of the first privacy resource is determined to be the same as that of the second privacy resource, the privacy resource status set of the privacy resource contract is queried according to the consumption parameter to determine whether the status data of the second privacy resource is unconsumed. If the state data of the second privacy resource is determined to be unconsumed, the Merkle tree contract is invoked to calculate the root hash value of the second privacy resource, and the second privacy resource is determined to meet the requirements based on the root hash value of the second privacy resource. If the second privacy resource meets the requirements, verify whether the processed signature meets the requirements. If the signature processing meets the requirements, the third verification is deemed successful.

11. The method according to claim 9, characterized in that, Invoke the privacy resource contract to update the privacy resource state set, including: The privacy resource contract is invoked to set the status data of the second privacy resource in the privacy resource state set to consumed; and the privacy resource contract is invoked to add status data of the first privacy resource in the privacy resource state set; and the status data of the first privacy resource is set to unconsumed.

12. A resource data processing device, characterized in that, The improved contract framework is applied to a resource data processing system based on an improved contract framework, which includes at least an application layer, a contract layer, and a base layer. The application layer includes: a front-end module, a resource port module, and off-chain services, including: A receiving module is configured to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource generation request; the resource data processing request carries at least generation parameters; the generation parameters include at least: a resource value for a first privacy resource to be generated, and a resource public key corresponding to the first privacy resource; the resource public key is a public key generated by the first user terminal based on a preset cryptographic algorithm, corresponding to the first privacy resource and not associated with the first user; the preset cryptographic algorithm includes a hidden address algorithm; the resource public key is generated in the following manner: obtaining a random number as a first temporary private key for the first privacy resource; generating a corresponding first temporary public key based on the first temporary private key; constructing intermediate data using the first user's first observation public key and the first temporary private key based on preset construction rules; and constructing the resource public key based on the intermediate data and the first user's first payment public key. The first verification module is used to respond to the resource data processing request and call the privacy resource contract to perform the first verification. The generation module, upon successful verification, invokes a privacy resource contract to generate a corresponding first privacy resource based on a preset cryptographic algorithm and generation parameters. This privacy resource contract is deployed at the contract layer. The contract layer also deploys a Merkle tree contract and a privacy resource management contract. The privacy resource management contract is connected to the first type of resource contract and, matching the privacy resource contract, is a contract that provides privacy resource management services during resource data processing. The privacy resource contract is a constant-sum, market-maker-based privacy resource contract and supports swap operations. The processing module is used to perform data processing related to the first privacy resource by calling the privacy resource contract; The processing module is specifically used for: generating and saving the root hash value corresponding to the first privacy resource by calling the Merkle tree contract through the privacy resource contract; transferring the first type of resource corresponding to the first privacy resource from the first type of resource contract to the privacy resource management contract by calling the privacy resource management contract through the privacy resource contract; updating the privacy resource state set by calling the privacy resource contract; wherein, the off-chain service is used to monitor the operation of the Merkle tree contract, and after detecting that the Merkle tree contract has performed the operation of calculating and saving the root hash value, it makes corresponding records to facilitate the subsequent backtracking by the regulator when needed; and transferring the privacy resource to the database connected to the off-chain service for storage through the privacy resource management contract.

13. A resource data processing device, characterized in that, This is applied to a resource data processing system based on an improved contract framework, which includes at least an application layer, a contract layer, and a base layer. The application layer includes a front-end module, a resource port module, and off-chain services. The contract layer deploys privacy resource contracts, Merkle tree contracts, and privacy resource management contracts, including: A receiving module is configured to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource consumption request; and the resource data processing request carries at least consumption parameters. The second verification module is used to respond to the resource data processing request and call the privacy resource contract to perform a second verification. The processing module is used to, upon confirming that the second verification has passed, invoke the privacy resource contract to update the privacy resource state set; and invoke the privacy resource management contract through the privacy resource contract to transfer the corresponding first-type resources from the privacy resource management contract to the first-type resource contract; The privacy resource corresponding to the first type of resource is generated in advance by calling the privacy resource contract based on a preset cryptographic algorithm and generation parameters. The generation parameters include at least: the resource value of the privacy resource to be generated and the resource public key corresponding to the privacy resource. The resource public key is a public key generated based on a preset cryptographic algorithm that corresponds to the privacy resource and is not associated with the user. The preset cryptographic algorithm includes a hidden address algorithm. The privacy resource is generated and saved in the following manner: the Merkle tree contract is called through the privacy resource contract to generate and save the root hash value corresponding to the privacy resource; the first type of resource corresponding to the privacy resource is transferred from the first type of resource contract to the privacy resource management contract through the privacy resource contract; the privacy resource state set is updated by calling the privacy resource contract; the off-chain service is used to monitor the operation of the Merkle tree contract. After detecting that the Merkle tree contract has performed the operation of calculating and saving the root hash value, it makes corresponding records to facilitate the subsequent backtracking by the regulator when needed; and the privacy resource is transferred to the database connected to the off-chain service for storage through the privacy resource management contract. The resource public key is generated as follows: a random number is obtained as a first temporary private key for the first privacy resource; a corresponding first temporary public key is generated based on the first temporary private key; intermediate data is constructed using the first user's first observation public key and the first temporary private key based on preset construction rules; the resource public key is constructed based on the intermediate data and the first user's first payment public key; the privacy resource management contract is connected to the first type of resource contract, and the contract that matches the privacy resource contract is the contract that provides privacy resource management services during resource data processing; the privacy resource contract is a privacy resource contract based on constant and market maker, and supports swap operations.

14. A resource data processing device, characterized in that, This is applied to a resource data processing system based on an improved contract framework, which includes at least an application layer, a contract layer, and a base layer. The application layer includes a front-end module, a resource port module, and off-chain services. The contract layer deploys privacy resource contracts, Merkle tree contracts, and privacy resource management contracts, including: A receiving module is configured to receive a resource data processing request initiated by a first user terminal; wherein the resource data processing request includes a resource transaction request; the resource data processing request carries at least generation parameters for a first privacy resource to be generated, and consumption parameters for a second privacy resource to be consumed; the generation parameters include at least: a resource value for the first privacy resource to be generated, and a public key corresponding to the first privacy resource; the public key is a public key generated by the first user terminal based on a preset cryptographic algorithm, corresponding to the first privacy resource and not associated with the first user; the preset cryptographic algorithm includes a hidden address algorithm; The third verification module is used to respond to the resource data processing request and call the privacy resource contract for third verification. The generation module is used to generate and save the root hash value corresponding to the first privacy resource by calling the Merkle tree contract through the privacy resource contract, provided that the third verification is passed. The update module is used to invoke the privacy resource contract to update the privacy resource state set; After generating and saving the root hash value corresponding to the first privacy resource by calling the Merkle tree contract through the privacy resource contract, the device is further configured to: transfer the first type of resource corresponding to the privacy resource from the first type of resource contract to the privacy resource management contract by calling the privacy resource management contract through the privacy resource contract; update the privacy resource state set by calling the privacy resource contract; wherein, the off-chain service is used to monitor the operation of the Merkle tree contract, and after detecting that the Merkle tree contract has performed the operation of calculating and saving the root hash value, it makes corresponding records to facilitate the subsequent backtracking by the regulator when needed; and transfer the privacy resource to the database connected to the off-chain service for storage via the privacy resource management contract; The resource public key is generated as follows: a random number is obtained as a first temporary private key for the first privacy resource; a corresponding first temporary public key is generated based on the first temporary private key; intermediate data is constructed using the first user's first observation public key and the first temporary private key based on preset construction rules; the resource public key is constructed based on the intermediate data and the first user's first payment public key; the privacy resource management contract is connected to the first type of resource contract, and the contract that matches the privacy resource contract is the contract that provides privacy resource management services during resource data processing; the privacy resource contract is a privacy resource contract based on constant and market maker, and supports swap operations.

15. A server, characterized in that, It includes a processor and a memory for storing processor-executable instructions, wherein the processor, when executing the instructions, implements the steps of the method according to any one of claims 1 to 11.

16. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.