A data processing method, device, equipment and readable storage medium

By finding and managing digital resource identification in the resource inventory database, the omissions and failures caused by network errors in the digital resource allocation process are solved, the success rate of allocation of limited digital resources is improved, and the system stability and efficiency are achieved .

CN116775772BActive Publication Date: 2025-01-07TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210240730.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2025-01-07
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

The prior art is prone to network timeout and other errors in the digital resource allocation process, resulting in digital resource missed or allocation failures, and the rollback operation may lead to subsequent allocation failures, reducing the success rate of limited digital resources.

Method used

By looking for the target order identifier in the resource inventory database, generating allocable digital resource identifiers based on limited configuration parameters, writing to the database association relationship, generating digital resource allocation tasks, and transferring resource permissions to the target object. When the retry condition is triggered, the previously generated allocable digital resource identifiers are reused to avoid regeneration and reduce rollback operations.

Benefits of technology

It improves the success rate of the allocation of limited digital resources, avoids the missed issuance and allocation failure, and improves the stability and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775772B_ABST
    Figure CN116775772B_ABST
Patent Text Reader

Abstract

The present invention discloses a data processing method, device, equipment and readable storage medium, the method comprising: obtaining a digital resource allocation request including a target object identifier, a target order identifier and a resource series identifier; if the target order identifier cannot be found in a resource inventory database, then executing limited allocation processing for the target order identifier according to the resource inventory database, the target object identifier, the resource series identifier and the limited configuration parameters corresponding to the resource series identifier, obtaining an allocatable digital resource identifier, and recording the association relationship between the allocatable digital resource identifier and the target order identifier; when the digital resource allocation request triggers a request retry condition, if the target order identifier is found in the resource inventory database, then obtaining an allocatable digital resource identifier associated with the target order identifier, and generating a digital resource allocation task for the allocatable digital resource identifier. The present invention can improve the success rate of limited digital resource allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, equipment and readable storage medium. Background Art

[0002] The resource platform can generate a limited number of digital resource meta-items bound to digital resources based on media resources such as pictures, audio, video, and game equipment. Among them, digital resource meta-items refer to media data with unique digital resource identifiers. Digital resources are used to prove the ownership of the corresponding digital resource meta-items. When an ordinary object obtains a digital resource, it means that the digital resource meta-item corresponding to the digital resource belongs to the ordinary object.

[0003] At present, resource platforms usually issue digital resource series first, which contain limited digital resources. When ordinary objects apply for digital resources of the digital resource series, they need to first determine the amount of digital resources to be collected under the digital resource series, and then add one to the read amount. If it does not exceed the set threshold, the target digital resource identifier is generated according to the read amount, and the target digital resource corresponding to the target digital resource identifier is allocated to the ordinary object. However, errors such as network timeouts are prone to occur during the allocation process. At this time, the allocation of digital resources to the target object will be retried, and the amount of collection will be repeatedly added by one, resulting in the leakage of digital resources. When the rollback method is used to adjust the amount of collection, once the rollback occurs after the new digital resource allocation task, the subsequent digital resource identifiers will be allocated incorrectly, which will cause the subsequent digital resource allocation to fail. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, device and readable storage medium, which can improve the success rate of limited digital resource allocation.

[0005] On the one hand, an embodiment of the present application provides a data processing method, including:

[0006] Obtaining a digital resource allocation request initiated by a target object; the digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier;

[0007] Searching for the target order identifier in the resource inventory database, if the target order identifier cannot be found, executing limited allocation processing for the target order identifier according to the resource inventory database, the target object identifier, the resource series identifier and the limited configuration parameters corresponding to the resource series identifier, obtaining the allocatable digital resource identifier, and writing the association relationship between the allocatable digital resource identifier and the target order identifier into the resource inventory database;

[0008] When the digital resource allocation request triggers a request retry condition, the target order identifier in the retried digital resource allocation request is searched again in the resource inventory database;

[0009] If the target order identifier is found, the allocable digital resource identifier associated with the target order identifier is obtained from the resource inventory database, and a digital resource allocation task for the allocable digital resource identifier is generated; the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital identifier to the target object.

[0010] On the one hand, an embodiment of the present application provides a data processing device, including:

[0011] A request receiving module, used to obtain a digital resource allocation request initiated by a target object; the digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier;

[0012] An identification search module is used to search for a target order identification in a resource inventory database;

[0013] The identification generation module is used to perform limited allocation processing for the target order identification according to the resource inventory database, the target object identification, the resource series identification and the limited configuration parameters corresponding to the resource series identification if the target order identification cannot be found, so as to obtain the allocable digital resource identification;

[0014] An identification writing module, used for writing the association relationship between the allocable digital resource identification and the target order identification into the resource inventory database;

[0015] A retry search module, used for re-searching the target order identifier in the retried digital resource allocation request in the resource inventory database when the digital resource allocation request triggers a request retry condition;

[0016] The identification acquisition module is used to obtain the allocable digital resource identification associated with the target order identification in the resource inventory database if the target order identification is found;

[0017] The task generation module is used to generate a digital resource allocation task for the allocable digital resource identifier; the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital identifier to the target object.

[0018] The identification generation module includes:

[0019] A first acquisition unit is used to acquire a target object resource record table in a resource inventory database according to the target object identifier and the resource series identifier;

[0020] The limiting unit is used to determine the object resource limiting result according to the target object resource record table and the limiting configuration parameters;

[0021] A second acquisition unit is used to acquire a target resource series record table in a resource inventory database according to a resource series identifier if the target resource limitation result is an unlimited result;

[0022] The allocation unit is used to generate an allocatable digital resource identifier for associating with the target order identifier according to the target resource series record table and the limited configuration parameters.

[0023] Among them, the limited configuration parameter includes the object resource quantity threshold; the target object resource record table includes the historical order identifier;

[0024] Limited units, including:

[0025] The query subunit is used to query the resource record table of the target object and determine the number of historical order identifiers as the number of existing resources of the object;

[0026] A judgment subunit, used for determining that the object resource limitation result is an unlimited result if the existing resource quantity of the object is less than the object resource quantity threshold;

[0027] The judgment subunit is used to determine that the object resource limitation result is a limited result if the existing resource quantity of the object is equal to the object resource quantity threshold.

[0028] The target resource series record table includes one or more digital resource start identifiers and the number of digital resources that have been collected corresponding to each digital resource start identifier; the limited configuration parameter includes the resource collection quantity threshold corresponding to each digital resource start identifier; the resource attributes of digital resources corresponding to different digital resource start identifiers are different;

[0029] Distribution unit, comprising:

[0030] A random subunit, used to randomly select one or more digital resource start identifiers to obtain a target digital resource start identifier;

[0031] A processing subunit is used to determine the position number of the digital resource starting identifier in the kth round in the target resource series record table if the number of digital resources corresponding to the digital resource starting identifier in the kth round has been equal to the resource collection number threshold corresponding to the digital resource starting identifier in the kth round, and accumulate the position numbers to obtain the position number to be processed; k is a positive integer, and the digital resource starting identifier in the first round is the target digital resource starting identifier;

[0032] The processing subunit is further used to divide the position number to be processed by the total number of the one or more digital resource start identifiers, and use the remainder obtained as the target position number, and obtain the digital resource start identifier corresponding to the target position number in the target resource series record table as the digital resource start identifier in the k+1th round;

[0033] The processing subunit is further configured to add the number of digital resources already received corresponding to the digital resource starting identifier in the k+1th round and the digital resource starting identifier in the k+1th round to obtain an allocable digital resource identifier for associating with the target order identifier if the digital resource starting identifier in the k+1th round is not the target digital resource starting identifier and the number of digital resources already received corresponding to the digital resource starting identifier in the k+1th round is less than the resource receiving quantity threshold corresponding to the digital resource starting identifier in the k+1th round;

[0034] The processing subunit is further configured to use the invalid digital resource identifier as the allocatable digital resource identifier if the digital resource start identifier in the k+1th round is the target digital resource start identifier.

[0035] Wherein, the above-mentioned data processing device further includes:

[0036] The identification processing module is used for calling the identification writing module to write the association relationship between the allocable digital resource identification and the target order identification into the resource inventory database if the allocable digital resource identification is not an invalid digital resource identification;

[0037] The identification processing module is also used to determine the starting identification of the digital resource corresponding to the allocable digital resource identification as the starting identification of the digital resource to be processed, and to accumulate the number of digital resources corresponding to the starting identification of the digital resource to be processed to obtain the accumulated number of digital resources already received. In the target resource series record table, the number of digital resources already received corresponding to the starting identification of the digital resource to be processed is updated to the accumulated number of digital resources already received.

[0038] Among them, the task generation module includes:

[0039] An identification search unit, used to search a resource inventory database for a task identification associated with a target order identification;

[0040] The task generating unit is used to generate a digital resource allocation task according to the target object identifier and the allocable digital resource identifier if the task identifier associated with the target order identifier is not found;

[0041] The above data processing device further includes:

[0042] The task sending module is used to send the digital resource allocation task to the blockchain node in the blockchain network, so that the blockchain node generates a target digital resource allocation transaction with a first task identifier according to the digital resource allocation task, and the target digital resource allocation transaction is consensus-uploaded to the chain; after the target digital resource allocation transaction completes the consensus-uploaded to the chain, the unique ownership authority of the target digital resource is transferred to the target object; the first task identifier is used to associate with the target order identifier and write it into the resource inventory database.

[0043] The task generation unit includes:

[0044] The identification determination subunit is used to obtain the digital resource identification prefix corresponding to the resource series identification from the configuration library according to the resource series identification, use the allocable digital resource identification as the digital resource identification suffix, and concatenate the digital resource identification prefix and the digital resource identification suffix in a front-to-back order to obtain the target digital resource identification; the target digital resource identification is associated with the corresponding target digital resource in the blockchain network;

[0045] The identification search subunit is used to search for the target object identification in the object information record table of the resource inventory database; the object information record table is used to record the object identification of the object and the account information associated with the object identification;

[0046] The task generation subunit is used to obtain the target account information corresponding to the target object identifier if the target object identifier is found in the object information record table, and generate a digital resource allocation task including the target account information and the target digital resource identifier.

[0047] Wherein, the above-mentioned data processing device further includes:

[0048] A first task query module, used to receive a first task identifier sent by a blockchain node, and generate a first task query request carrying the first task identifier;

[0049] The first task query module is further used to send the first task query request to the blockchain node, so that the blockchain node queries the execution status of the target digital resource allocation transaction according to the first task identifier, and determines the first task query result according to the execution status of the target digital resource allocation transaction;

[0050] The first task query module is also used to receive the first task query result sent by the blockchain node;

[0051] A first result writing module is used to write the first task identifier, the target digital resource identifier and the first task query result into a database associated with the blockchain network to obtain a write result if the first task query result is a successful task execution result;

[0052] The first result processing module is further configured to write the association between the first task identifier and the target order identifier into the resource inventory database if the writing result is a successful writing result, and send a prompt message of successful resource allocation to the target terminal associated with the target object;

[0053] The first result processing module is further configured to determine a digital resource allocation request triggering request retry condition if the writing result is a writing failure result.

[0054] Wherein, the above-mentioned data processing device further includes:

[0055] The second result processing module is used to write the first task identifier, the target digital resource identifier and the first task query result into a database associated with the blockchain network if the first task query result is a task being executed result, and determine the digital resource allocation request trigger request retry condition.

[0056] Wherein, the above-mentioned data processing device further includes:

[0057] The third result processing module is used for sending a resource query request carrying the target digital resource identifier to the blockchain node if the first task query result is a task execution failure result, so that the blockchain node obtains the actual account information corresponding to the target digital resource identifier according to the resource query request as the account information to be verified; the object corresponding to the actual account information has the sole ownership authority of the target digital resource corresponding to the target digital resource identifier;

[0058] The third result processing module is further used to update the first task query result to a task execution success result if the account information to be verified is the same as the target account information;

[0059] The third result processing module is also used to write the first task identifier, the target digital resource identifier and the updated first task query result into a database associated with the blockchain network.

[0060] Wherein, the above-mentioned data processing device further includes:

[0061] A second task query module, configured to, if a task identifier associated with the target order identifier is found, determine the task identifier associated with the target order identifier as a second task identifier, and generate a second task query request carrying the second task identifier;

[0062] A second task query module is used to send a second task query request to a blockchain node, so that the blockchain node queries the execution status of the digital resource allocation transaction associated with the second task identifier, and determines the second task query result according to the execution status of the digital resource allocation transaction associated with the second task identifier;

[0063] The second task query module is used to receive the second task query result sent by the blockchain node;

[0064] A second result writing module is used to write the second task identifier, the target digital resource identifier and the second task query result into a database associated with the blockchain network to obtain a write result if the second task query result is a successful task execution result;

[0065] A fourth result processing module, configured to write the association relationship between the second task identifier and the target order identifier into a resource inventory database if the writing result is a successful writing result;

[0066] The fourth result processing module is used to determine a digital resource allocation request triggering request retry condition if the writing result is a writing failure result.

[0067] On the one hand, an embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface;

[0068] The above-mentioned processor is connected to the above-mentioned memory and the above-mentioned network interface, wherein the above-mentioned network interface is used to provide a data communication network element, the above-mentioned memory is used to store a computer program, and the above-mentioned processor is used to call the above-mentioned computer program to execute the method in the embodiment of the present application.

[0069] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the method in the embodiment of the present application.

[0070] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method in the embodiment of the present application.

[0071] In an embodiment of the present application, after receiving a digital resource allocation request initiated by a target object and including a target object identifier, a target order identifier and a resource series identifier, the target order identifier can be searched in a resource inventory database. If the target order identifier cannot be found, limited allocation processing is performed on the target order identifier based on the resource inventory database, the target object identifier, the resource series identifier and the limited configuration parameters corresponding to the resource series identifier to obtain an allocatable digital resource identifier, and the association between the allocatable digital resource identifier and the target order identifier is written into the resource inventory database; then a digital resource allocation task is generated based on the allocatable digital resource identifier, and the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocatable digital identifier to the target object. When a digital resource allocation task fails due to a retryable error and the digital resource allocation request is retried, the previously generated allocatable digital resource identifier can be obtained in the resource inventory data based on the target order identifier, without having to generate a new allocatable digital resource identifier for the retried digital resource allocation request to avoid missing digital resources. Similarly, there is no need to roll back the resource inventory database due to the failure of the digital resource allocation task corresponding to the digital resource allocation request, and there will be no situation where the allocation of the allocatable digital resource identifier fails due to the occurrence of a subsequent new digital resource allocation task before the rollback operation, thereby improving the success rate of limited digital resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0073] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;

[0074] Figure 2a This is a schematic diagram of a scenario of data processing based on blockchain provided in an embodiment of the present application;

[0075] Figure 2b This is a schematic diagram of a scenario of data processing based on blockchain provided in an embodiment of the present application;

[0076] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0077] Figure 4 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0078] Figure 5 This is a schematic diagram of the architecture of a digital resource meta-commodity provided in an embodiment of the present application;

[0079] Figure 6 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0080] Figure 7a This is a schematic diagram of the overall process of a digital resource security delivery solution provided by an embodiment of the present application;

[0081] Figure 7b It is a schematic diagram of the architecture of a digital resource allocation system provided in an embodiment of the present application;

[0082] Figure 7c This is a data interaction diagram for providing a secure delivery of digital resources in an embodiment of the present application;

[0083] Figure 8a It is a logic diagram for realizing a precise limited script provided in an embodiment of the present application;

[0084] Figure 8b It is a logical schematic diagram of a commodity limitation algorithm provided in an embodiment of the present application;

[0085] Fig. 9 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0086] Fig.10 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0088] Blockchain is the carrier and organizational method of running blockchain technology. Blockchain technology (BT), also known as distributed ledger technology, is an Internet database technology that is decentralized, open and transparent, allowing everyone to participate in database records. Blockchain technology is a distributed infrastructure and computing method that uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data.

[0089] For ease of understanding, the following will explain blockchain and its related concepts:

[0090] Blockchain: Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism and encryption algorithm. It is mainly used to organize data in chronological order and encrypt it into a ledger to make it impossible to be tampered with or forged. At the same time, it can verify, store and update data. Blockchain is essentially a decentralized database. Each node in the database stores an identical blockchain. The blockchain network can divide nodes into consensus nodes and business nodes, among which the consensus node is responsible for the consensus of the entire blockchain network. The process of transaction data being written into the ledger in the blockchain network can be as follows: the application client sends the transaction data to the business node, and then the transaction data is passed between the business nodes in the blockchain network in a relay manner until the consensus node receives the transaction data. The consensus node then packs the transaction data into a block and reaches consensus with other consensus nodes. After the consensus is passed, the block carrying the transaction data is written into the ledger.

[0091] Block: A data packet that carries transaction data (i.e., transaction business) on a blockchain network. It is a data structure marked with a timestamp and a hash value of the previous block. Blocks are verified by the network's consensus mechanism and the transactions in the block are confirmed.

[0092] Hash value: Also known as information characteristic value or characteristic value, hash value is generated by converting input data of any length into a password through a hash algorithm and making a fixed output. The original input data cannot be retrieved by decrypting the hash value. It is a one-way encryption function. In the blockchain, each block (except the initial block) contains the hash value of the previous block, which is called the parent block of the current block. Hash value is the potential core foundation and the most important aspect of blockchain technology. It preserves the authenticity of recorded and viewed data, as well as the integrity of the blockchain as a whole.

[0093] Transaction: It is an atomic ledger data status change on the blockchain and a record of its process and results.

[0094] Digital Resources: Unique cryptocurrency tokens used to represent media resources (also known as digital assets) that can be traded on the blockchain.

[0095] Account: A blockchain account with an account address. The account address is a unique address generated on the blockchain using a public-private key pair, which is used to identify the unique address of a blockchain account.

[0096] Digital resource blockchain: refers to a blockchain system that supports the issuance, transaction, circulation, and management of digital resource meta-commodities.

[0097] Digital resource meta-items: digital assets with unique identifiers that are generated and issued based on alliance blockchain technology, have passed content compliance review, and can only be owned by blockchain accounts that have passed real-name authentication.

[0098] Digital resource metadata: information used to describe the properties of digital resource meta-products, used to indicate the digital resource meta-product's identification, uniform resource identifier, author name, summary, signature, etc.

[0099] Assets: Rights and interests that can be issued, circulated, stored, and traded on the blockchain and used to complete payment and clearing business.

[0100] See also Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a terminal device 10 and a server 100. Figure 1 As shown, the number of terminal devices 10 can be at least one, and the number of servers 100 can be at least one, which is not limited in this application. The terminal device 10 and the server 100 can be data connected so that the terminal device can exchange data with the server 100 through the data connection.

[0101] Optionally, the server 100 may include a business node or a consensus node. When there are multiple servers, the multiple servers may include business nodes and consensus nodes. Business nodes and consensus nodes together constitute a blockchain network, and both consensus nodes and business nodes store the same blockchain. In a blockchain, before a block is put on the chain, the block must be agreed upon by the consensus nodes in the blockchain network, and the block can only be added to the blockchain after the consensus is passed. Although the business node does not participate in the consensus of the block, it will help spread the block and voting messages, as well as synchronize the status with each other. In addition, both consensus nodes and business nodes can be referred to as blockchain nodes. Among them, the terminal device 10 may also belong to a blockchain node.

[0102] It is understandable that transactions or block transfers can be carried out between blockchain nodes through the above data connection. The blockchain network can realize data connection between blockchain nodes based on node identification. Each blockchain node in the blockchain network has a corresponding node identification, and each of the above blockchain nodes can store the node identifications of other blockchain nodes that are connected to itself, so that the acquired data or generated blocks can be broadcast to other blockchain nodes based on the node identifications of other blockchain nodes. For example, a node identification list as shown in Table 1 can be maintained in blockchain node 1, and the node identification list stores the node names and node identifications of other blockchain nodes:

[0103] Table 1

[0104] Node Name Node ID Blockchain Node 1 117.114.151.174 Blockchain Node 2 117.116.189.145 Blockchain Node 3 117.117.125.169 … … Blockchain Node n 117.116.189.125

[0105] The node identifier can be an Internet Protocol (IP) address for interconnecting networks or any other information that can be used to identify a blockchain node in a blockchain network. Table 1 only uses the IP address as an example for illustration. For example, blockchain node 1 can send information (e.g., transaction data) to blockchain node 2 via node identifier 117.116.189.145, and blockchain node 2 can determine that the information is sent by blockchain node 1 via node identifier 117.114.151.174.

[0106] It is understandable that the above-mentioned data connection does not limit the connection method, and can be directly or indirectly connected through wired communication, directly or indirectly connected through wireless communication, or through other connection methods, which are not limited in this application.

[0107] It is understandable that the data processing method provided in the embodiments of the present application can be executed by a computer device, and the computer device includes but is not limited to the above-mentioned terminal device and server. The above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The above-mentioned terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart TV, a car terminal, etc., but is not limited to this.

[0108] It can be understood that the embodiments of the present application can be applied to various scenarios, including but not limited to blockchain, data security distribution, cloud technology, cloud gaming, artificial intelligence, smart transportation, assisted driving and other scenarios.

[0109] It is understandable that in the specific implementation of this application, the data related to common objects involved, when the following embodiments of this application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0110] like Figure 1As shown, the terminal device 10 may be installed with an application client. When the application client runs in the terminal device 10, it may interact with the server 100, so that the server 100 may receive business data from the terminal device 10. The application client may be a game application, a video editing application, a social application, an instant messaging application, a live broadcast application, a short video application, a video application, a music application, a shopping application, a novel application, a payment application, a browser, or other application clients that have the function of displaying data information such as text, images, audio, and video. The application client may be an independent client or an embedded sub-client integrated in a client (such as an instant messaging client, a social client, a video client, etc.), which is not limited here.

[0111] The terminal device 10 associated with the target object can obtain the digital resource meta-item through the application client, wherein the digital resource meta-item refers to a digital asset with a unique digital resource identifier, and the digital asset may include media data such as pictures, videos, music, and game equipment that can be associated with digital resources. Among them, the digital resource is used to represent the ownership of the corresponding digital resource meta-item, which can be understood as a certificate. When the target object has the sole ownership of a digital resource, it can be proved that the digital resource meta-item associated with the digital resource belongs to the target object. It can be understood that the issuance, circulation, storage, and transaction of digital resources can be carried out in the blockchain network, making the circulation process of digital resources open and transparent, while ensuring the security of data transmission and access.

[0112] The digital resources released by the resource platform corresponding to the application are usually limited, so as to attract the interest of ordinary objects. In order to improve the success rate of limited digital resource allocation, the embodiment of the present application provides a data processing method, that is, the terminal device 10 can obtain the digital resource allocation request initiated by the target object, and generate a digital resource allocation task for the target object according to the digital resource allocation request. The digital resource allocation task is used to transfer the unique ownership authority of the target digital resource released by the resource platform to the target object.

[0113] It is understandable that the resource platform can issue digital resources based on the blockchain network. At this time, the server 100 can include consensus nodes and business nodes for constituting the blockchain network. The terminal device 10 can send the digital resource allocation task to the server 100. The business node in the server 100 can asynchronously generate the target digital resource allocation transaction in the blockchain network based on the digital resource allocation task. After the target digital resource allocation transaction passes the consensus and is written into the blockchain, the unique ownership authority of the target digital resource in the blockchain network is transferred to the target object.

[0114] To facilitate understanding of the above digital resource allocation process, we will take the example of a resource platform issuing limited digital resources in the blockchain network and ordinary objects applying to obtain digital resource meta-products. Figure 2a , Figure 2a Schematic diagram of a data processing scenario based on blockchain provided by an embodiment of the present application. Figure 2a The terminal device 20 shown can be the above Figure 1 The terminal device 10 shown; Figure 2a The server 200 shown may be the above Figure 1 Server 100 is shown.

[0115] like Figure 2a As shown, the terminal device 20 has an association relationship with the object A. Assuming that the application client of the social application is installed in the terminal device 20, the resource platform corresponding to the social application can issue digital resource meta-commodities in the social application, and the digital resource meta-commodities include multiple digital resource meta-items. Each digital resource meta-item can correspond to a digital resource. If the object A has the unique ownership authority of a certain digital resource, it proves that the corresponding digital resource meta-item belongs to the object A. The digital resources associated with the digital resource meta-items belonging to the same digital resource meta-commodity constitute a digital resource series. When the object A applies to obtain the digital resource meta-commodity, it actually obtains the unique ownership authority of a certain digital resource from the digital resource series corresponding to the digital resource meta-commodity, thereby owning the digital resource meta-item corresponding to the digital resource. For example, the digital resource meta-item 1 includes the digital resource meta-item 11 and the digital resource meta-item 12. The digital resource meta-item 11 is associated with the digital resource a, and the digital resource meta-item 12 is associated with the digital resource b. The digital resource a and the digital resource b constitute the digital resource series Z corresponding to the digital resource meta-item 1. When object A applies for digital resource meta-item 1, a digital resource will actually be randomly selected from the digital resource series Z, such as digital resource b, and the unique ownership of digital resource b will be transferred to object A. At this time, object A will own digital resource meta-item 12, that is, object A has successfully applied for the digital resource meta-item.

[0116] like Figure 2a As shown, object A can apply for digital resource meta-goods through terminal device 20. In response to object A's operation, terminal device 20 can generate a digital resource allocation request, which is used to obtain a digital resource in the digital resource series corresponding to the digital resource meta-goods for object A. When object A obtains a digital resource, the ownership of the digital resource meta-goods corresponding to the digital resource in the social application belongs only to object A. Figure 2aAs shown, after the terminal device 20 responds to the application operation of the object A, it generates a digital resource allocation request 21, which includes an object identifier A1, an order identifier B1, and a resource series identifier C1, wherein the object identifier A1 is used to identify the object A, the order identifier B1 is used to identify the digital resource allocation request 21, and the resource series identifier C1 is used to identify the digital resource series. Then, the terminal device 20 can perform limited allocation processing for the order identifier B1 according to the object identifier A1, the resource series identifier C1, the limited configuration parameters corresponding to the resource series identifier C1, and the resource inventory database 22, and obtain the allocatable digital resource identifier 23. Among them, the value of the allocable digital resource identifier 23 can be from 1 to the total number of digital resources contained in the digital resource series. It can be understood that the digital resource associated with the allocable digital resource identifier 23 is the number of digital resources in the digital resource series. Therefore, the allocable digital resource identifier 23 can be determined according to the amount of digital resources in the digital resource series that have been collected, that is, the allocable digital resource identifier 23 is equal to the amount of digital resources that have been collected plus one. For example, if the number of digital resources in the digital resource series that have been collected is 253, then the allocable digital resource identifier 23 can be determined to be 254. Among them, the resource inventory database 22 is used to store the digital resource collection situation of object A and the digital resource collection situation under the digital resource series. Among them, the limited configuration parameter 24 is the upper limit threshold of collection set according to the limited collection rule of the digital resource series. For example, the limited configuration parameter 24 may include an object resource quantity threshold, which is used to characterize the maximum number of digital resources that a single object can apply for; or the limited configuration parameter 24 may include a series resource quantity threshold, which is used to characterize the number of digital resources that can be allocated in the digital resource series. Therefore, a feasible implementation process of limited allocation processing can be: the terminal device 20 can obtain the number of digital resources that have been collected for object A and the number of digital resources that have been collected for the digital resource series based on the resource inventory database 22, and then compare them with the object resource quantity threshold and the series resource quantity threshold in the limited configuration parameter 24 respectively. If the number of digital resources that have been collected for object A does not exceed the object resource quantity threshold, and the number of digital resources that have been collected for the digital resource series does not exceed the series resource quantity threshold, an allocatable digital resource identifier 23 can be allocated to the order identifier B1.

[0117] like Figure 2aAs shown, the resource inventory database 22 may store an object resource record table 221, which may have an association relationship with the object identifier A1 and the resource series identifier C1, and is used to record the historical order identifier associated with the object A and the historical allocatable digital resource identifier associated with the historical order identifier. The terminal device 20 may count the number of historical order identifiers in the object resource record table 221 as the number of digital resources received by the object A. After the terminal device 20 successfully allocates the allocatable digital resource identifier 23 to the order identifier B1, the terminal device 20 will write the association relationship between the order identifier B1 and the allocatable digital resource identifier 23 into the object resource record table 221 to obtain a new object resource record table 222. In order to avoid security risks caused by the digital resource identifier being too simple, the terminal device 20 can use the allocable digital resource identifier 23 as the digital resource identifier suffix, wherein the digital resources under the same digital resource series will have the corresponding digital resource identifier prefix preset in advance, and the corresponding digital resource identifier prefix can be obtained through the digital resource identifier suffix, and then the obtained digital resource identifier prefix and the digital resource identifier suffix are spliced ​​in a front-to-back order to obtain the target digital resource identifier. At this time, the target digital resource identifier can uniquely identify a digital resource. At this time, the terminal device 20 will generate a digital resource allocation task according to the target digital resource identifier. The storage and authority management of digital resources can be implemented through the server 200. Therefore, after the terminal device 20 generates the digital resource allocation task, it will send the digital resource allocation task to the server 200, and the server 200 will transfer the unique ownership authority of the target digital resource to the object A according to the target digital resource allocation task.

[0118] Optionally, when the server 200 includes business nodes and consensus nodes that can constitute a blockchain network, the issuance, circulation and storage of digital resources can be completed in the blockchain network. After the terminal device 20 sends the digital resource allocation task to the server 200, the business node in the server 200 can generate a target digital resource allocation transaction carrying the target digital resource identifier according to the digital resource allocation task. The target digital resource allocation transaction is used to transfer the unique ownership authority of the target digital resource corresponding to the target digital resource identifier in the blockchain network to object A. Among them, the digital resource allocation task belongs to the off-chain task, and the target digital resource allocation transaction belongs to the on-chain transaction, and the two are performed asynchronously.

[0119] It should be noted that if Figure 2aDuring the execution of the data processing flow shown, data loss may occur due to errors such as network delays, which may lead to the failure of the data resource allocation request 21. This failure caused by abnormal reasons is a retryable failure. The digital resource allocation request 21 meets the request retry conditions. At this time, the terminal device 20 can re-execute the digital resource allocation request 21. In order to save computing resources and avoid allocating multiple allocatable digital resource identifiers for the same digital resource allocation request, when responding to a digital resource allocation request, the terminal device 20 will first traverse the resource inventory database 22 according to the target order identifier carried by the digital resource allocation request to see whether the allocatable digital resource identifier has been associated with the target order identifier. For ease of understanding, please refer to Figure 2b , Figure 2b This is a schematic diagram of a scenario of data processing based on blockchain provided by an embodiment of the present application. Figure 2b As shown, after the digital resource allocation request 21 triggers the request retry condition, the terminal device 20 can first obtain the object resource record table associated with the object identifier A1 and the resource series identifier C1 in the resource inventory database 22, that is, the object resource record table 222, and the terminal device 20 can search for the order identifier B1 in the object resource record table 222. If the order identifier B1 is found, the allocatable digital resource identifier 23 associated with the order identifier B1 in the object resource record table 222 is used as the allocatable digital resource identifier of this retry request, and then a digital resource allocation task is directly generated according to the allocatable digital resource identifier 23, and then sent to the server 200. The server 200 will transfer the unique ownership authority of the target digital resource to object A according to the target digital resource allocation task.

[0120] For further information, see Figure 3 , Figure 3 is a flow chart of a data processing method provided by an embodiment of the present application. The method may be performed by a terminal device (for example, the above Figure 1 The terminal device 10 in the corresponding embodiment) or the server (for example, the above Figure 1 The method may be executed by the server 100 in the corresponding embodiment, or may be executed by the terminal device and the server together. The following will take the method executed by the terminal device as an example for explanation, wherein the data processing method may at least include the following steps S101-S104:

[0121] Step S101, obtaining a digital resource allocation request initiated by a target object; the digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier.

[0122] Specifically, the resource platform corresponding to the application can design limited media resources (such as pictures, audio, video, etc.) as digital resource meta-commodities, which can contain a limited number of digital resource meta-items. Among them, digital resource meta-items refer to media resources with unique digital resource IDs (Identity document). It can be understood that media resources with different digital resource IDs belong to different digital resource meta-items. For example, digital resource meta-item 1 is digital resource ID1+picture 1, and digital resource meta-item 2 is digital resource ID2+picture 1. Although digital resource meta-item 1 and digital resource meta-item 2 are both displayed based on the style of picture 1, digital resource meta-item 1 and digital resource meta-item 2 are 2 different digital resource meta-items. However, digital resource meta-item 1 and digital resource meta-item 2 can be said to belong to the same digital resource meta-work, because their corresponding media, that is, the media resources are the same, both of which are picture 1. In other words, a media resource can generate a limited number of digital resource meta-items, and digital resource meta-items generated based on the same media resource belong to the same digital resource meta-work, and a limited number of digital resource meta-works together constitute a digital resource meta-commodity.

[0123] Specifically, each digital resource meta-item is associated with a digital resource, and the digital resource has a mapping relationship with the digital resource ID of the digital resource meta-item. The digital resource can be understood as a certificate used to prove the ownership of the digital resource meta-item. When the target object has the sole ownership right of a digital resource, it can be proved that the digital resource meta-item associated with the digital resource belongs to the target object. The digital resources corresponding to the digital resource meta-items belonging to the same digital resource meta-commodity can constitute a digital resource series, which can be identified by the resource series ID.

[0124] Specifically, the digital resource ID can be composed of numbers and letters, and the length can be set according to actual conditions. However, the digital resource IDs corresponding to the digital resources in the same digital resource series should be continuous. For example, the digital resource IDs corresponding to the digital resources in the digital resource series A are abd678xy1, abd678xy2, and abd678xy3. Therefore, optionally, the digital resource ID can be divided into a digital resource identification prefix and a digital resource identification suffix. The digital resource identification prefixes corresponding to the digital resources in the same digital resource series can be the same. For example, the digital resource identification prefixes corresponding to the digital resources in the above digital resource series A are all abd678xy. The digital resource identification suffixes corresponding to the digital resources in the same digital resource series should constitute a continuous digital sequence. For example, the digital resource identification suffixes corresponding to the digital resources in the above digital resource series A are 1, 2, and 3 respectively. The number of digits of the digital resource identification suffix can be determined based on the number of digital resources.

[0125] Step S102: search for the target order identifier in the resource inventory database. If the target order identifier cannot be found, limited allocation processing is performed on the target order identifier based on the resource inventory database, the target object identifier, the resource series identifier, and the limited configuration parameters corresponding to the resource series identifier to obtain an allocatable digital resource identifier, and the association between the allocatable digital resource identifier and the target order identifier is written into the resource inventory database.

[0126] Specifically, the digital resources in the digital resource series are limited, so the number of digital resources that have been collected must not exceed the number of digital resources in the digital resource series. In addition, according to actual conditions, the maximum number of digital resources in the same digital resource series that a single object can collect can also be set, that is, when the digital resources that a single object has collected reaches the set maximum number, no new digital resources can be collected. The resource inventory database is used to record the collection of digital resources, and a record table can be established according to the limited collection rules. For example, the resource inventory database may include an object resource record table and a resource series record table, wherein the object resource record table may have a mapping relationship with the object identifier and the resource series identifier, and the object resource record table is used to record the resource collection of a certain object under the digital resource series corresponding to the resource series identifier. The object resource record table may include a historical order identifier related to the object corresponding to the object identifier and a historical allocable digital resource identifier associated with the historical order identifier. Among them, the resource series record table may have a mapping relationship with the resource series identifier, and is used to record the number of digital resources that have been collected in the digital resource series corresponding to the resource series identifier.

[0127] Specifically, according to the resource inventory database, the target object identifier, the resource series identifier, and the limited configuration parameters corresponding to the resource series identifier, a limited allocation process is performed for the target order identifier to obtain the allocable digital resource identifier, and the association relationship between the allocable digital resource identifier and the target order identifier is written into the resource inventory database. A feasible implementation process can be: the terminal device can find the target object resource record table associated with the target object according to the target object identifier and the resource series identifier, and then count the number of historical order identifiers in the target object resource record table, and use it as the target object resource collection quantity; then the terminal device can determine whether the target object resource collection quantity is equal to the maximum quantity that a single object can collect. If the target object resource collection quantity is equal to the maximum quantity that a single object can collect, it means that the target object no longer meets the digital resource allocation conditions, and the terminal device can determine that the digital resource allocation request has failed; if the target object resource collection quantity is less than the maximum quantity that a single object can collect, the terminal device can obtain the target resource series record table according to the resource series identifier. Then determine whether the number of digital resources recorded therein has been collected is equal to the number of digital resources of the digital resource series. If it is equal, the terminal device can determine that the digital resource allocation request has failed; if it is less, the terminal device can add one to the number of digital resources collected, and obtain the allocable digital resource identifier. After determining the allocable digital resource identifier, the terminal device will write the association between the allocable digital resource identifier and the target order identifier into the resource inventory database, that is, into the above-mentioned target object resource record table. In addition, the terminal device also needs to update the number of digital resources that have been collected recorded in the target resource series record table in the resource inventory database. It should be noted that the above-mentioned limited allocation processing and multiple operations of updating the relevant record tables in the resource inventory database should be encapsulated as an atomic operation. When the terminal device executes an atomic operation encapsulated with multiple operations, if any operation in the atomic operation fails, all operations in the atomic operation will be considered to have failed. In other words, the above-mentioned limited allocation processing and multiple operations for updating the relevant record tables in the resource inventory database are either all completed or not completed at all. It is impossible for partial completion to occur. For example, the terminal device determines the allocatable digital resource identifier 1 for the order identifier 1, but the terminal device makes an error when writing the order identifier 1 and the allocatable digital resource identifier 1 into the resource inventory database. The terminal device will determine that there was an error in determining the allocatable digital resource identifier for the order identifier 1, will determine that the response to the digital resource allocation request is abnormal, will determine that the digital resource allocation request satisfies the request retry condition, and then re-execute the digital resource allocation request.

[0128] Step S103: when the digital resource allocation request triggers a request retry condition, the target order identifier in the retried digital resource allocation request is searched again in the resource inventory database.

[0129] Specifically, when a retryable failure occurs during the process of the terminal device allocating digital resources to the target object according to the digital resource allocation request, the terminal device needs to re-execute the digital resource allocation request. Among them, the retryable failure refers to the failure of the request error due to abnormal reasons such as network anomalies and data loss. In order to avoid repeatedly determining the allocatable digital resource identifier when requesting the digital resource allocation request, each time the terminal device retries the digital resource allocation request, it can first search the target order identifier in the retried digital resource allocation request in the resource inventory database to determine whether the digital resource allocation request is associated with the allocatable digital resource identifier.

[0130] Step S104: If the target order identifier is found, the allocable digital resource identifier associated with the target order identifier is obtained in the resource inventory database, and a digital resource allocation task is generated for the allocable digital resource identifier; the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital resource identifier to the target object.

[0131] Specifically, no matter whether the allocatable digital resource identifier is generated for the first time or obtained from the resource inventory database, after the terminal device obtains the allocatable digital resource identifier, it can obtain the digital resource allocation task for the allocatable digital resource identifier. It can be understood that after determining the allocatable digital resource identifier, the target digital resource corresponding to the allocatable digital resource identifier can be obtained, and the purpose of the digital resource allocation task is to transfer the unique ownership authority of the target digital resource to the target object.

[0132] Specifically, since the allocable digital resource identifier can be a simple number generated based on the number of digital resources that have been collected, it would be too simple to use the allocable digital resource identifier to uniquely identify a digital resource. The terminal device can use the allocable digital resource identifier only as a suffix to the digital resource identifier, and then obtain the pre-configured digital resource identifier prefix in the configuration library, and then concatenate the digital resource identifier prefix and the allocable digital resource identifier in a front-to-back order to obtain the target digital resource identifier. Usually, the digital resources under the same digital resource series have the same digital resource identifier prefix, and the composition and length of the digital resource identifier prefix can be set according to actual conditions, and there is no restriction here. The terminal device can then find the target digital resource based on the target digital resource identifier, and then transfer the unique ownership authority of the target digital resource to the target object.

[0133] According to the method provided in the embodiment of the present application, after generating an allocatable digital resource identifier according to a digital resource allocation request, the allocatable digital resource identifier is associated with the target order identifier in the digital resource allocation request and written into the resource inventory database together. Afterwards, when the digital resource allocation request is retried, because the target order identifier it carries will not change, the allocatable digital resource identifier associated with the target order identifier can be directly obtained from the resource inventory database, and there is no need to generate a new allocatable digital resource identifier for the retried digital resource allocation request, thereby avoiding the leakage of digital resources. Similarly, there is no need to perform a rollback operation on the resource inventory database because the digital resource allocation task corresponding to the digital resource allocation request fails, and there will be no situation where the allocatable digital resource identifier allocation fails due to the subsequent new digital resource allocation task occurring before the rollback operation, thereby improving the success rate of limited digital resource allocation.

[0134] For further information, see Figure 4 , Figure 4 is a flow chart of a data processing method provided by an embodiment of the present application. The method may be performed by a terminal device (for example, the above Figure 1 The terminal device 10 in the corresponding embodiment) or the server (for example, the above Figure 1 The following will take the method executed by the terminal device as an example for explanation, wherein the data processing method may at least include the following steps S201-S205:

[0135] Step S201, obtaining a digital resource allocation request initiated by a target object; the digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier.

[0136] Specifically, the implementation process of step S201 may refer to the above step S101, which will not be described in detail here.

[0137] Step S202, searching for the target order identifier in the resource inventory database. If the target order identifier cannot be found, obtaining the target object resource record table in the resource inventory database according to the target object identifier and the resource series identifier, and determining the object resource limitation result according to the target object resource record table and the limitation configuration parameters.

[0138] Specifically, the limited configuration parameters may include a threshold value of the number of object resources, and the target object resource record table may include a historical order identifier. For example, Figure 2aThe object resource record table 221 shown. At this time, a feasible implementation process for determining the object resource limitation result according to the target object resource record table and the limitation configuration parameters can be: query the target object resource record table, determine the number of historical order identifiers, as the number of resources the object already has; if the number of resources the object already has is less than the object resource number threshold, determine the object resource limitation result as an unlimited result; if the number of resources the object already has is equal to the object resource number threshold, determine the object resource limitation result as a limited result. Among them, the unlimited result indicates that the number of digital resources owned by the target object has not yet equaled the upper limit of the number of digital resources that a single object can have, and new digital resources can be allocated to the target object; the limited result indicates that the number of digital resources owned by the target object has reached the upper limit of the number of digital resources that a single object can have, and no new digital resources can be allocated to the target object.

[0139] Step S203, if the object resource limitation result is an unlimited result, obtaining a target resource series record table in the resource inventory database according to the resource series identifier; generating an allocable digital resource identifier for associating with the target order identifier according to the target resource series record table and the limitation configuration parameters; and writing the association relationship between the allocable digital resource identifier and the target order identifier into the resource inventory database.

[0140] Specifically, the target resource series record table includes one or more digital resource start identifiers, and the number of digital resources that have been collected corresponding to each digital resource start identifier; the limited configuration parameter includes the resource collection quantity threshold corresponding to each digital resource start identifier; the resource attributes of digital resources corresponding to different digital resource start identifiers are different. As mentioned above, digital resource meta-products can be designed based on one or more media resources. The digital resource meta-items corresponding to the same media resource belong to the same digital resource meta-work. For ease of understanding, please refer to Figure 5 , Figure 5 Schematic diagram of the architecture of a digital resource meta-commodity provided in the embodiment of the present application. Figure 5As shown, it is assumed that the digital resource meta-commodity 50 contains 2000 digital resource meta-items, and the corresponding digital resource identification suffixes range from 1 to 2000. For example, the digital resource identification suffix of digital resource meta-item 51 is 1, the digital resource identification suffix of digital resource meta-item 52 is 1000, the digital resource identification suffix of digital resource meta-item 53 is 1001, and the digital resource identification suffix of digital resource meta-item 54 is 2000. Among them, the digital resource meta-items corresponding to the digital resources with digital resource identifications 1 to 1000 can be generated based on medium 1 (media resources), and the digital resource meta-items corresponding to the digital resources with digital resource identifications 1 to 1000 can belong to digital resource meta-work 1; the digital resource meta-items corresponding to the digital resources with digital resource identifications 1001 to 2000 can be generated based on medium 2, and the digital resource meta-items corresponding to the digital resources with digital resource identifications 1001 to 2000 belong to digital resource meta-work 2. Among them, medium 1 can be picture X, and medium 2 can be video Y. The digital resource identification prefixes of digital resource meta-items under the same digital resource meta-commodity can be the same, or can be based on the digital resource meta-work, that is, the digital resource identification prefixes of digital resource meta-items belonging to the same digital resource meta-work can be the same, and this application does not make any restrictions here.

[0141] In addition, in order to enhance the diversity of resource attributes of the digital resource meta-items acquired by the target object, when constructing the target resource series record table, the digital resource identifier suffix of the first digital resource meta-item in each digital resource meta-work can be recorded as the digital resource starting identifier, and then the number of digital resources received by the digital resource meta-items under the digital resource meta-work can be associated with the digital resource starting identifier.

[0142] At this time, according to the target resource series record table and the limited configuration parameters, a feasible implementation process for generating an allocatable digital resource identifier for associating with the target order identifier is as follows: randomly select one or more digital resource starting identifiers to obtain the target digital resource starting identifier; if the number of digital resources corresponding to the digital resource starting identifier in the kth round is equal to the resource collection quantity threshold corresponding to the digital resource starting identifier in the kth round, then determine the position number of the digital resource starting identifier in the kth round in the target resource series record table, accumulate the position numbers, and obtain the position number to be processed; k is a positive integer, and the digital resource starting identifier in the 1st round is the target digital resource starting identifier; the position number to be processed is added to the total number of identifiers of one or more digital resource starting identifiers. Divide, and use the remainder as the target position serial number, obtain the digital resource starting identifier corresponding to the target position serial number in the target resource series record table, and use it as the digital resource starting identifier in the k+1th round; if the digital resource starting identifier in the k+1th round is not the target digital resource starting identifier, and the number of digital resources corresponding to the digital resource starting identifier in the k+1th round that have been collected is less than the resource collection quantity threshold corresponding to the digital resource starting identifier in the k+1th round, then add the number of digital resources corresponding to the digital resource starting identifier in the k+1th round and the digital resource starting identifier in the k+1th round to obtain the allocable digital resource identifier; if the digital resource starting identifier in the k+1th round is the target digital resource starting identifier, then use the invalid digital resource identifier as the allocable digital resource identifier.

[0143] To facilitate understanding of the above process, it is assumed that the target resource series record table is as shown in Table 2, which records the starting identifier of the digital resource and the number of digital resources that have been collected:

[0144] Table 2

[0145] Digital resource start identifier Number of digital resources received 1 52 101 100 201 65

[0146] As can be seen from Table 2, the digital resource meta-product corresponding to the target resource series record table includes three digital resource meta-works. The digital resource start identifier "1" represents that the digital resource start identifier of the first digital resource meta-item in the corresponding digital resource meta-work is 1. From the number of digital resources received "52" associated with the digital resource start identifier "1", it can be seen that 52 digital resources corresponding to the digital resource meta-items in the corresponding digital resource meta-work have been received; the digital resource start identifier "101" represents the digital resource start identifier of the first digital resource meta-item in the corresponding digital resource meta-work. It is 101. It can be seen from the number of digital resources received "100" associated with the digital resource starting identifier "101" that the digital resources corresponding to 100 digital resource meta-items in the corresponding digital resource meta-work have been received; the digital resource starting identifier "201" represents that the digital resource starting identifier of the first digital resource meta-item in the corresponding digital resource meta-work is 201. It can be seen from the number of digital resources received "65" associated with the digital resource starting identifier "201" that the digital resources corresponding to 65 digital resource meta-items in the corresponding digital resource meta-work have been received. Assuming that the terminal device allocates an allocatable digital resource identifier to identifier A at this time, the terminal device will first randomly select a digital resource starting identifier. Assuming that the terminal device selects the digital resource starting identifier "101" through a random algorithm, and assuming that the resource claim quantity threshold corresponding to the digital resource starting identifier "101" is 100, the number of digital resources corresponding to the digital resource starting identifier "101" is also 100, which means that all digital resource meta-items in the digital resource meta-work corresponding to the digital resource starting identifier "101" have been claimed. The terminal device can sequentially obtain the next digital resource starting identifier of the digital resource starting identifier "101", that is, the digital resource starting identifier "201". Assuming that the resource claim quantity threshold corresponding to the digital resource starting identifier "201" is 100, it means that there are still unclaimed digital resource meta-items under the digital resource meta-work corresponding to the digital resource starting identifier "201". At this time, the terminal device adds the digital resource starting identifier "201" and the number of digital resources "65" associated with it to obtain the allocatable digital resource identifier 266. It should be noted that if all digital resource meta-items contained in all digital resource meta-works under the digital resource meta-product have been claimed, the terminal device can set the invalid digital resource identifier to the allocatable digital resource identifier, where the invalid digital resource identifier can be set to 0.

[0147] Optionally, if the allocable digital resource identifier is not an invalid digital resource identifier, the association relationship between the allocable digital resource identifier and the target order identifier is written into the resource inventory database; then the digital resource starting identifier corresponding to the allocable digital resource identifier is determined as the starting identifier of the digital resource to be processed, and the number of digital resources corresponding to the starting identifier of the digital resource to be processed is accumulated to obtain the accumulated number of digital resources already received, and in the target resource series record table, the number of digital resources already received corresponding to the starting identifier of the digital resource to be processed is updated to the accumulated number of digital resources already received. In this way, when a new digital resource allocation request is executed, the allocable digital resource identifier can be allocated to it according to the accumulated number of digital resources already received, thereby ensuring that different allocable digital resource identifiers are allocated to different digital resource allocation requests, and avoiding repeated allocation of digital resources.

[0148] Step S204: when the digital resource allocation request triggers a request retry condition, the target order identifier in the retried digital resource allocation request is searched again in the resource inventory database.

[0149] Step S205: If the target order identifier is found, the allocable digital resource identifier associated with the target order identifier is obtained in the resource inventory database, and a digital resource allocation task is generated for the allocable digital resource identifier; the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital resource identifier to the target object.

[0150] Specifically, the implementation process of step S204 and step S205 can refer to the above-mentioned step S103 and step S104, which will not be repeated here.

[0151] By adopting the method provided in the embodiment of the present application, after determining the allocatable digital resource identifier according to the digital resource allocation request, the allocatable digital resource identifier and the target order identifier in the digital resource allocation request are written into the target object resource record table. When the digital resource allocation request is retried, the allocatable digital resource identifier can be directly obtained according to the target order identifier, and there is no need to generate a new allocatable digital resource identifier according to the digital resource allocation request. This avoids the same digital resource allocation request occupying multiple allocatable digital resource identifiers, thereby avoiding the omission of digital resources.

[0152] For further information, see Figure 6 , Figure 6 is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. The method can be performed by a terminal device (for example, the above Figure 1 The terminal device 10 in the corresponding embodiment) or the server (for example, the above Figure 1The method may be executed by the server 100 in the corresponding embodiment, or may be executed by the terminal device and the server together. The following will take the method executed by the terminal device as an example for explanation, wherein the data processing method may at least include the following steps S301-S309:

[0153] Step S301, obtaining a digital resource allocation request initiated by a target object; the digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier.

[0154] Specifically, the implementation process of step S301 can refer to the above Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.

[0155] Step S302: searching the target order identifier in a resource inventory database. If the target order identifier is found, obtaining the allocable digital resource identifier associated with the target order identifier in the resource inventory database.

[0156] Specifically, the implementation process of step S302 can refer to the above Figure 3 The relevant descriptions of step S103 and step S104 in the corresponding embodiment will not be repeated here.

[0157] Step S303: searching the resource inventory database for a task identifier associated with the target order identifier.

[0158] Specifically, the task identifier associated with the target order identifier can be associated with the target digital resource allocation transaction in the blockchain network, wherein the target digital resource allocation transaction is used to transfer the unique ownership authority of the target digital resource from the resource platform to the target object in the blockchain network. Among them, the target digital resource allocation transaction is asynchronously generated by the blockchain node after receiving the digital resource allocation task. Among them, the digital resource allocation task is generated by the terminal device according to the digital resource allocation request. It should be understood that once the target digital resource allocation transaction in the blockchain node is created, its execution status will not be affected by the digital resource allocation task. Therefore, when the digital resource allocation request is retried, the target digital resource allocation transaction may be on the blockchain in the blockchain network. Therefore, when the digital resource allocation request is retried, the task identifier associated with the target order identifier is obtained, and the execution status of the target digital resource allocation transaction in the blockchain network can be directly queried according to the task identifier, without generating a new digital resource allocation task.

[0159] Step S304: if no task identifier associated with the target order identifier is found, a digital resource allocation task is generated according to the target object identifier and the allocatable digital resource identifier.

[0160] Specifically, if the terminal device does not find the task identifier associated with the target order identifier, it means that there is no target digital resource allocation transaction associated with the digital resource allocation request in the blockchain network. Therefore, it is necessary to generate a digital resource allocation task based on the target object identifier and the allocable digital resource identifier. A feasible implementation process can be: obtain the digital resource identifier prefix corresponding to the resource series identifier from the configuration library according to the resource series identifier, use the allocable digital resource identifier as the digital resource identifier suffix, and splice the digital resource identifier prefix and the digital resource identifier suffix in a front-to-back order to obtain the target digital resource identifier; the target digital resource identifier corresponds to the target digital resource in the blockchain network; search for the target object identifier in the object information record table of the resource inventory database; the object information record table is used to record the object identifier of the object and the account information associated with the object identifier; if the target object identifier is found in the object information record table, the target account information corresponding to the target object identifier is obtained, and a digital resource allocation task containing the target account information and the target digital resource identifier is generated. Among them, the account information refers to the account information of the target object in the blockchain network, which can include the account address, public and private keys, etc. of the target object in the blockchain network.

[0161] Step S305: Send the digital resource allocation task to the blockchain node in the blockchain network, so that the blockchain node generates a target digital resource allocation transaction with a first task identifier according to the digital resource allocation task, and reaches a consensus on the target digital resource allocation transaction.

[0162] Specifically, the terminal device can send the digital resource allocation task to the blockchain node in the blockchain network. The blockchain node can generate a target digital resource allocation transaction with a first task identifier based on the digital resource allocation task, and then reach a consensus on the target digital resource allocation transaction. Among them, the target digital resource allocation transaction is used to transfer the target digital resource corresponding to the target digital resource identifier to the account address of the target object. In other words, after the target digital resource allocation transaction completes the consensus chain, the unique ownership authority of the target digital resource is transferred to the target object. After the target digital resource allocation transaction is created, the blockchain node can return the first task identifier to the terminal device, and the terminal device can query the execution status of the target digital resource allocation transaction from the blockchain node at any time based on the first task identifier. The terminal device will associate the first task identifier with the target order identifier and write it into the resource inventory database. It should be understood that the digital resource allocation task is an off-chain task sent by the terminal device to the blockchain node, and the target digital resource allocation transaction is an on-chain transaction generated by the blockchain node based on the digital resource allocation task. The two are executed asynchronously. Although the success of the digital resource allocation task depends on whether the target digital resource allocation transaction is successfully executed, the blockchain node will not directly wait for the target digital resource allocation transaction to be completed before determining the return of the execution result of the digital resource allocation task. Instead, it will return the first task identifier to the terminal device, and the terminal device can subsequently query the result through the first task identifier.

[0163] Step S306, receiving the first task identifier sent by the blockchain node, generating a first task query request carrying the first task identifier; sending the first task query request to the blockchain node, so that the blockchain node queries the execution status of the target digital resource allocation transaction according to the first task identifier, and determines the first task query result according to the execution status of the target digital resource allocation transaction.

[0164] Specifically, after the terminal device receives the first task identifier, it can generate a first task query request carrying the first task identifier, and send the first task query request to the blockchain node. Then the blockchain node can query the execution status of the target digital resource allocation transaction according to the first task identifier, thereby determining the first task query result.

[0165] Step S307, receiving the first task query result sent by the blockchain node. If the first task query result is a successful task execution result, the first task identifier, the target digital resource identifier and the first task query result are written into the database associated with the blockchain network to obtain a write result.

[0166] Specifically, the first task query result can be a task execution success result, a task execution in progress result, or a task execution failure result, wherein the task execution success result indicates that the target digital resource allocation transaction is consensus-uploaded to the blockchain network and executed successfully, that is, the unique ownership authority of the target digital resource is successfully transferred to the target object; the task execution in progress result indicates that the target digital resource allocation transaction is still being executed, that is, it is still in the process of consensus-uploaded to the chain; the task execution failure result indicates that the target digital resource allocation transaction has failed to execute, for example, when the unique ownership authority of the target digital resource has been transferred to other objects (other objects are different from the target object), the target digital resource allocation transaction will fail to execute.

[0167] Specifically, if the first task query result is a successful task execution result, the first task identifier, the target digital resource identifier and the first task query result are written into the database associated with the blockchain network to obtain a write result.

[0168] Step S308: If the writing result is a successful writing result, the association relationship between the first task identifier and the target order identifier is written into the resource inventory database, and a prompt message indicating successful resource allocation is sent to the target terminal associated with the target object.

[0169] Specifically, when the write result is a write success result, it means that the terminal device records that the unique ownership authority of the target digital resource has been successfully transferred to the target object, and the digital resource allocation request is considered completed. If the write result is a write failure result, although the unique ownership authority of the target digital resource has been successfully transferred to the target object in the blockchain network, for the terminal device, there is no record to prove that the target digital resource has been successfully allocated. At this time, the terminal device will determine that the digital resource allocation request triggers the request retry condition.

[0170] Step S309: if the writing result is a writing failure result, determining a retry condition of the digital resource allocation request triggering request.

[0171] Optionally, if the above-mentioned first task query result is a result that the task is being executed, the first task identifier, the target digital resource identifier and the first task query result are written into a database associated with the blockchain network to determine the digital resource allocation request triggering request retry conditions.

[0172] Optionally, if the first task query result is a task execution failure result, the terminal device can send a resource query request carrying the target digital resource identifier to the blockchain node. The blockchain node can obtain the actual account information corresponding to the target digital resource identifier according to the resource query request as the account information to be verified, and then return it to the terminal device. Among them, the object corresponding to the actual account information has the unique ownership authority of the target digital resource corresponding to the target digital resource identifier. The terminal device can compare the account information to be verified and the target account information. If the account information to be verified and the target account information are the same, the first task query result is updated to a successful task execution result; the first task identifier, the target digital resource identifier, and the updated first task query result are written into the database associated with the blockchain network. It should be noted that the task execution failure result represents the failure of the target digital resource allocation transaction associated with the first task identifier. The reason for the execution failure may be that the unique ownership authority of the target digital resource has been transferred out. However, in the execution process before the digital resource allocation request, the first task query result may be a successful task execution result, but the relevant data may fail to be written into the database associated with the blockchain network. At this time, the terminal device will not write the association between the first task identifier and the target order identifier into the resource inventory database. Therefore, when the digital resource allocation request is retried, because the first task identifier cannot be found, a new digital resource allocation task will be created and sent to the blockchain node in the blockchain network. The blockchain node will generate a new target digital resource allocation transaction based on the new digital resource allocation task. At this time, the new target digital resource allocation transaction will fail to execute because the unique ownership authority of the target digital resource has been transferred to the target object. Therefore, when the first task query result is a task execution failure result, it can be verified to which object the unique ownership authority of the target digital resource belongs at this time. If it belongs to the target object, it means that the purpose of the digital resource allocation request has been completed and the target object has successfully applied for the target digital resource. Then, the first task query result can be modified to a successful task execution result.

[0173] Optionally, when step S303 is executed, if a task identifier associated with the target order identifier is found, the task identifier associated with the target order identifier is determined as the second task identifier, and a second task query request carrying the second task identifier is generated; the second task query request is sent to the blockchain node, and the blockchain node can query the execution status of the digital resource allocation transaction associated with the second task identifier, and determine the second task query result according to the execution status of the digital resource allocation transaction associated with the second task identifier; after the terminal device receives the second task query result sent by the blockchain node, if the second task query result is a successful task execution result, the second task identifier, the target digital resource identifier and the second task query result are written into the database associated with the blockchain network to obtain a write result; if the write result is a successful write result, the association between the second task identifier and the target order identifier is written into the resource inventory database; if the write result is a write failure result, the digital resource allocation request triggers a request retry condition.

[0174] By adopting the method provided in the embodiment of the present application, as long as the digital resource allocation task generated based on the digital resource allocation request is sent to the blockchain network, a target digital resource allocation transaction with a task identifier can be asynchronously generated in the blockchain network. When the digital resource allocation request is subsequently retried, there is no need to continue to generate the digital resource allocation task. The execution status of the target digital resource allocation transaction in the blockchain network can be directly queried through the previously saved task identifier, which can reduce the time consumption and error possibility of the request.

[0175] Furthermore, it can be seen from the above embodiments that a digital resource series can be issued in the blockchain network. The digital resource series is identified by a series ID. One digital resource meta-commodity corresponds to one digital resource series, and the same digital resource meta-commodity can contain multiple digital resource meta-works. Each digital resource meta-work can publish multiple digital resource meta-items, and the range of digital resource meta-items under the same digital resource meta-work can be specified. It should be noted that there is no concept of work ID, because a digital resource meta-work can actually be understood as a collection of all digital resource meta-items within a certain interval. Each digital resource meta-item can be identified using a digital resource ID. A digital resource ID uniquely identifies a digital resource on the blockchain, which is equivalent to identifying the digital resource meta-item corresponding to the digital resource. The digital resource identification prefixes of digital resource meta-items under the same digital resource series can be consistent, but the digital resource identification suffixes are different. The above process of allocating digital resources to ordinary objects can be called a digital resource delivery process. The method provided in the embodiments of the present application can ensure the safe delivery of digital resources. For ease of understanding, please refer to Figure 7a , Figure 7a Schematic diagram of the overall process of a digital resource security delivery solution provided by the embodiment of the present application. Figure 7aAs shown, the overall digital resource security delivery solution can be explained from two perspectives. From the perspective of the object level, the overall need to ensure reliable and secure delivery, starting from the completion of ordinary object payment (i.e., application for allocation of digital resources) to the end of the product on the chain (i.e., successful allocation of digital resources), all operations in between need to ensure idempotence. From the perspective of the product level, the increase of object assets, i.e., the acquisition of new digital resources by the object, needs to ensure single-object limit, that is, the number of digital resources that a single object can own has an upper limit, the locking and deduction of work inventory needs to ensure that the issuance of digital resource meta-items under a single digital resource meta-work does not exceed the actual number of digital resource meta-items contained in the digital resource meta-work, and the locking and deduction of product inventory needs to ensure that the issuance of digital resource meta-items under all digital resource meta-works under the digital resource meta-product does not exceed the actual number of digital resource meta-items contained in each digital resource meta-work. The specific implementation of this digital resource security delivery solution can be found in the following Figure 7c The corresponding embodiments will not be described in detail here.

[0176] A reasonable digital resource allocation system is required to achieve the above-mentioned process of safe delivery of digital resources. Figure 7b , Figure 7b Schematic diagram of the architecture of a digital resource allocation system provided in an embodiment of the present application. Figure 7b As shown, the system architecture diagram includes a terminal device 71, an application server 72, a delivery service 73, a reliable request queue 74, a configuration library 75, a resource inventory database 76, a blockchain database 77, and a blockchain 78. Among them, the terminal device 71 can be the above Figure 1 Any terminal device in the terminal device cluster 10 shown, such as the terminal device 10a. The application server 72 may be a background server corresponding to a small program, a native App (Application) or an H5 (Hyper Text Markup Language 5) page, for example, Figure 1 The server 100 in the corresponding embodiment can adopt C / S (Client / Server) or B / S (Browser / Server) mode in terms of architecture. The delivery service 73 is used to process the digital resource allocation request (such as for executing the above Figure 6 The delivery service 73 may include a delivery plug-in interface layer 731, a limited allocation module 732, a blockchain delivery module 733, and an asset status recording module 734, wherein the delivery plug-in interface layer 731 may be used to interact with the application server 72 or the reliable request queue 74 to obtain a digital resource allocation request (for example, for executing the above Figure 6In the embodiment shown in FIG. 1 , step S301 is used to execute the limited allocation processing for the target order identifier in the digital resource allocation request (for example, to execute the above-mentioned Figure 6 Step S302 in the embodiment shown); the blockchain delivery module 733 can be used to generate digital resource allocation tasks and interact with the blockchain network (for example, to perform the above Figure 6 In the embodiment shown in FIG. 1 , steps S303 to S306 are performed; the asset status recording module 734 is used to record the relevant data when the digital resource is allocated (for example, for executing the above Figure 6 Steps S307-S309 in the embodiment shown). Among them, the reliable request queue 74 is used for reliable retry formation, which is essentially a reliable message queue. When the delivery service 73 determines that the digital resource allocation request needs to be retried, it can be passed to the reliable request queue 74 to wait for retry. Among them, the configuration library 75 is used to store configuration information, such as digital resource meta-commodity configuration information, limited configuration parameters, etc. Among them, the resource inventory database 76 is used to record the allocation and inventory status of digital resources, and can be implemented using redis (Remote Dictionary Server, remote dictionary service). Redis is a log-type, Key-Value database that supports the network and can be based on memory or persistent. Optionally, the resource inventory database 76 can also be implemented using a DB (data base, a database structure) database. Among them, the blockchain database 77 is a DB database for storing data related to the blockchain network. Among them, the blockchain 78 is used to publish digital resources. The number of digital resource meta-items corresponding to the digital resources and the digital resource suffix identifier are strictly limited. In high-concurrency scenarios, objects need to be accurately limited when receiving digital resources, and the digital resource suffix identifiers (i.e., the above-mentioned Figure 3 It can be understood that the functions provided by the application server 72, the delivery service 73, and the reliable request queue 74 can all be implemented by the terminal device 71, and the configuration library 75, the resource inventory database 76, and the blockchain database 77 can also be stored in the terminal device 71. In this case, the system architecture is simpler, and you can refer to the above Figure 1 The network architecture shown.

[0177] Through Figure 7bThe system architecture shown can realize the safe delivery of digital resource meta-items corresponding to digital resources. After the target object registers the blockchain account on the blockchain network through the terminal device 71, it can apply for the digital resource meta-item through the terminal device 71. The application server 72 can respond to the application sent by the terminal device 71, generate a digital resource allocation request, and then transmit the digital resource allocation request to the delivery service 73. The delivery service 73 will first perform limited allocation processing on the digital resource allocation request. At the same time, the random process of the digital resource meta-work can also be integrated into the limited allocation processing process, and then the digital resource suffix identifier is obtained. After the delivery service 73 completes the limited allocation processing, it can call the interface provided by the blockchain network to ship, that is, the digital resource suffix identifier is synchronized to the blockchain network through the interface provided by the blockchain network. It should be noted that the blockchain 78 interface is an asynchronous process, so it needs to include two stages: generating tasks and determining task query results according to task identifiers. It is necessary to distinguish and process according to the task query results in the future, and land in the assets, that is, write into the blockchain database 77.

[0178] For easier understanding, please also refer to Figure 7c , Figure 7c This is a data interaction diagram for providing a secure delivery of digital resources according to an embodiment of the present application. Figure 7c As shown, after the application server 72 responds to the application of the terminal device 71, it generates a digital resource allocation request, which will be sent to the delivery service 73. If an error occurs in the delivery service 73 in the process of responding to the digital resource allocation request, the digital resource allocation request will be added to the reliable request queue 74 and wait for retry. The data interaction process of the entire system responding to the digital resource allocation request mainly includes three processes: limited allocation of digital resource suffix identification, blockchain on-chain and asset landing.

[0179] The implementation logic of the limited allocation of digital resource suffix identifiers can be as follows: the digital resource allocation request will contain the target order identifier, and the resource inventory database can be called according to the target order identifier. When the resource inventory database uses the redis database, the precise limit script can be executed to determine whether the digital resource allocation request exceeds the limit. If it exceeds the limit, a non-retryable business error is returned. If it does not exceed the limit but the precise limit script fails to execute, a retryable error is returned. If it does not exceed the limit and the precise limit script is executed successfully, the digital resource suffix identifier (that is, the above-mentioned Figure 3 The allocable digital resource identifier described in the corresponding embodiment). Optionally, when the resource inventory database is a DB database, the limited allocation of digital resource suffix identifiers can be implemented by operating the commodity table and the object order table through transactions. The data interaction process of the limited allocation of digital resource suffix identifiers can include the following steps S71-S77.

[0180] Step S71, the delivery service 73 receives a digital resource allocation request.

[0181] Specifically, the digital resource allocation request will carry the object identifier, the target order identifier and the resource series identifier. The digital resource allocation request can be a new digital resource allocation request sent by the application server 72 or a digital resource allocation request retried by the reliable request queue 74.

[0182] Step S72: If the target order identifier is not included in the resource inventory database 76, the delivery service 73 applies to the configuration library 75 for obtaining limited configuration parameters.

[0183] Specifically, the limited configuration parameters (i.e. the above Figure 4 The limit configuration parameter described in the corresponding embodiment refers to a limit threshold value related to a digital resource series corresponding to a resource series identifier that is set in advance.

[0184] Step S73 , the configuration library 75 returns the limited configuration parameters to the delivery service 73 .

[0185] Step S74: If the delivery service 73 cannot obtain the limited configuration parameters, a non-retryable error is returned.

[0186] Step S75, if the delivery service 73 obtains the limited configuration parameters, it calls the precise limited script to limit the relevant inventory data in the resource inventory database 76.

[0187] Specifically, the precise limit script is used to encapsulate operations such as product limit, account limit, and work randomization into an atomic operation, thereby ensuring data consistency under multiple operations. Because the resource inventory database is a redis database, the precise limit script can be implemented using a redis lua (a scripting language) script. Among them, for product limit, redis hash is used as the data structure in redis, key is associated with the resource series identifier, field is the starting point of the work, that is, the digital resource identifier suffix corresponding to the first digital resource meta-item under each digital resource meta-work, and value is the current number of digital resource meta-works received. By comparing the number of collections under the current field of each work with the set upper limit, it can be ensured that the work inventory is not exceeded. Among them, for account limit, that is, object limit, redis hash is used as the data result in redis, key is associated with the resource series identifier and object identifier, field is the order identifier, and value is the allocated digital resource suffix identifier (the current work collection amount is used as the digital resource suffix identifier). The limit idempotence is guaranteed by storing the order identifier, and the single account limit is guaranteed by comparing the currently saved number of orders with the set upper limit. Among them, for the randomness of works, the preset random function of redis lua can be used to implement it, pass in the system millisecond timestamp, and generate a random seed after reverse interception to ensure the difference of the random seed. In addition, because the order ID of the digital resource allocation request is recorded, for the retry of the digital resource allocation request under the same order, the digital resource suffix ID recorded at the time of the first request can always be read according to the order ID.

[0188] Step S76, if the precise limited script is executed successfully, the digital resource suffix identifier is returned; if the resource inventory database 76 stores a task identifier associated with the target order identifier, the task identifier is returned together.

[0189] Step S77: If the limit is exceeded, a non-retryable business error is returned; if the limit is not exceeded but the precise limit script execution fails, a retryable error is returned.

[0190] Among them, the blockchain includes two processes: first, the delivery service 73 generates a purchase task according to the new digital resource allocation request and assigns a task identifier. At this time, the blockchain 78 service will asynchronously generate a delivery task (i.e., the above Figure 6 The target digital resource allocation transaction described in the corresponding embodiment) is completed by its internal task management system. Second, after the delivery service 73 obtains the task identifier, it can query the execution status of the delivery task and obtain the task status (for example, the above Figure 6 The first task query result in the corresponding embodiment) and performs subsequent processing according to the task status. If the task status is a failure status (i.e., the above Figure 6The task execution failure result described in the corresponding embodiment) is usually not retriable and requires manual intervention. The delivery service 73 can directly return an error to the caller. Figure 6 If the task status is in the running state (i.e. the above Figure 6 The task in the corresponding embodiment is being executed (result), which usually means that the shipment transaction is still in the queue for processing, but it may also be an internal error, and it is continuously retrying, which may be retried for up to 1 day. Therefore, in a digital resource allocation request, the final result cannot be obtained. At this time, the shipment service 73 can return a retryable error to the reliable request queue 74, and the reliable request queue 74 will retry the digital resource allocation request. The data interaction process on the blockchain can include the following steps S78-S716.

[0191] Step S78, the delivery service 73 first generates a digital resource identifier based on the digital resource suffix identifier.

[0192] Step S79, the delivery service 73 queries the resource inventory database 76 for object information according to the target object identifier.

[0193] Specifically, the implementation process of step S78 and step S79 can refer to the above Figure 6 The corresponding step S304 in the embodiment.

[0194] Step S710: the resource inventory database 76 returns the account address and public and private keys associated with the target object identifier.

[0195] Step S711, if the target object identifier has no associated account address, a non-retryable error is returned; if the acquisition fails due to network delay or other reasons, a retryable error is returned.

[0196] Step S712: If the task identifier is not obtained in step S76, the delivery service 73 can generate a purchase task (i.e., the above-mentioned task identifier) ​​according to the digital resource identifier, account address, and public and private keys. Figure 6 The digital resource allocation task in the corresponding embodiment) sends the purchase task to the blockchain 78. If the task identifier is obtained in step S76, step S714 is executed.

[0197] Step S713, blockchain 78 asynchronously generates a delivery task with a task identifier according to the purchase task (i.e., the above Figure 6 The target digital resource allocation transaction in the corresponding embodiment) and then returns the task identifier to the delivery service 73.

[0198] Step S714, the delivery service 73 queries the blockchain 78 for the task status of the delivery task according to the task identifier (the task status refers to the transaction execution status of the delivery task in the blockchain 78).

[0199] Step S715, blockchain 78 returns the task status according to the execution status of the delivery task.

[0200] Step S716, if the task status is a failed status, the delivery service 73 can query the blockchain 78 for account information related to the digital resource identifier.

[0201] In step S717, the blockchain 78 may return the actual account address associated with the digital resource corresponding to the digital resource identifier. If the actual account address is the same as the account address associated with the target object identifier, the task status is updated to a successful status.

[0202] Specifically, because it is possible that the chain is successfully uploaded but the asset is not dropped, if the task identifier is not obtained during the retry, it will be considered a new request and the task identifier will be regenerated. Querying the task result based on the new task identifier will result in a non-retry error, but the actual digital resource meta-item has been successfully uploaded to the chain. Therefore, in the event of failure, the delivery service 73 should query the blockchain 78 for relevant information on the digital resource identifier for secondary confirmation, that is, compare the target object address information with the actual address information returned by the blockchain 78. If the two are the same, it is considered that the chain is successful, and the failure status can be corrected to the success status. Then continue to land the asset.

[0203] Among them, asset landing means that after the chain is successfully uploaded, the asset and its status need to be landed in the blockchain database 77, and the task identifier is stored in the limited redis, that is, the resource inventory database 76. In this way, if there is a failure due to timeout or other reasons, the retry request can obtain the generated task identifier from redis, so there is no need to regenerate the blockchain delivery task. The data interaction process of asset landing mainly includes the following steps S718-step S721:

[0204] Step S718, the delivery service 73 writes the digital resource identifier, task identifier and task status into the blockchain database 77.

[0205] Step S719, the blockchain database 77 returns the first write result to the shipping service 73.

[0206] Step S720 , if the delivery service 73 determines that the first writing result is a writing success result, the task identifier is written into the asset inventory database 76 .

[0207] Step S721 , the asset inventory database 76 returns the second write result to the delivery service 73 .

[0208] It should be noted that the execution process of the above steps S712 to S721 is non-atomic, that is, during the execution process, the required resources and data may be accessed and changed by other processes, resulting in the failure of the execution process. Therefore, it is usually necessary to lock the execution process of steps S712-S721 to ensure that the required resources and data are not accessed and changed by others, and wait until the execution process is completed before unlocking.

[0209] Furthermore, the number of digital resources and digital resource suffixes published on the blockchain are precisely limited. An important part of ensuring safe delivery is to achieve precise inventory limits. Figure 7c The precise limited script shown can complete the limitation of objects, works, commodities, and when multiple works are mounted under commodities, the digital resource meta-works can be randomly selected. Among them, the limitation of objects is to ensure that the digital resource meta-items issued by a single object do not exceed the set number. In implementation, the order identifier and the corresponding allocated digital resource suffix identifier can be recorded. The idempotence of digital resource allocation requests can be ensured by comparing the order identifier. By calculating the number of order identifiers, it can be ensured that the single account limit is not exceeded. Among them, the limitation of works is to ensure that the digital resource meta-works mounted under the digital resource meta-commodity do not exceed the actual number of releases. In implementation, the current number of digital resource meta-items received under each digital resource meta-work can be recorded, and then the actual release amount can be compared to ensure that the limit is not exceeded. Among them, the limitation of commodities is to ensure that the issuance of digital resource meta-commodities does not exceed the set limit and inventory. In implementation, because the digital resource meta-works are mounted under the digital resource meta-commodity, that is, the large collection of digital resource meta-commodities contains the small collection of digital resource meta-works, the limitation of works ensures that the small collection of each digital resource meta-work does not exceed the limit, so the large collection of digital resource meta-commodities will naturally not exceed the limit.

[0210] To understand the implementation logic of the precise limited script, please refer to Figure 8a , Figure 8a This is a schematic diagram of the implementation logic of a precise limited script provided in the embodiment of the present application. Figure 8a As shown, the implementation logic of the precise limited script includes the following steps S81-S87.

[0211] Step S81, the precise limited script determines whether the target order identifier in the digital resource allocation request exists. If so, it means that the digital resource allocation request is a retry request, and executes step S86; if not, it means that the digital resource allocation request is a new request, and executes step S82.

[0212] Step S82, the precise limit script determines whether the object limit is exceeded. If it does not exceed the object limit, execute step S83; if it exceeds the object limit, execute step S87.

[0213] Specifically, the object limit refers to the object single account limit. According to the goodsid (resource series identifier), offerid (target order identifier) ​​and vuid (target object identifier) ​​carried in the digital resource allocation request, the precise limit script will first query the offerKey (object limit, that is, the above Figure 4 The target object resource record table described in the corresponding embodiment), wherein the data structure of offerKey is a hash, and the format of key is "OFFER:{goodsid}:vuid", which is used to associate goodsid and vuid, field is the requested orderid, and value stores the last assigned digital resource suffix identifier. According to offerKey, it can be determined whether there is a field with the value of offerid. If it exists, it means that it is a retry request, and the value is directly returned, that is, the digital resource suffix identifier assigned during the first request. If it does not exist, it is the first request. At this time, the number of fields of offerKey is obtained, that is, the number of orders that have been saved, and compared with the set accLimit (the upper limit of the object single account, that is, the above Figure 4 The object resource quantity threshold described in the corresponding embodiment) is returned when the upper limit is reached, otherwise it means that the object limit has not been exceeded and the process can continue. After completing the subsequent limit judgment, the personal limit result is recorded and the order is saved to the personal limit key, that is, the offerid and nftidx of this request are saved in the offerKey, which is implemented using hset (an algorithm instruction).

[0214] Step S83, the precise limited script calls the product limited algorithm, returns the digital resource suffix identifier, and executes step S84.

[0215] Specifically, the precise limited script can first search for goodsKey in redis (goods limited, that is, the above Figure 4 The target resource series record table described in the corresponding embodiment), the goodsKey data structure is a hash, the key format is "GOODS:{goodsid}", which is used to associate goodsid, and field is the starting point of the work published on the blockchain (i.e. the above Figure 4 The digital resource start identifier described in the corresponding embodiment), value stores the current work claim amount of the current work branch (i.e., the above Figure 4The product limit algorithm includes two functions: random and limited. The overall process is: first randomly obtain the work branch, and then cyclically search for the smallest available digital resource suffix identifier. The cyclic search process can use the linear exploration method when hash conflicts occur. The precise limited script can obtain the digital resource suffix identifier through the product limit algorithm. Among them, the implementation logic of the product limit algorithm can be seen below Figure 8b The description in the corresponding embodiment.

[0216] Step S84, the precision limited script determines whether the digital resource suffix identifier is valid. If valid, execute step S85; if invalid, execute step S87.

[0217] Specifically, the precision limited script determines whether the digital resource suffix identifier is 0, which is a pre-set invalid value used to indicate that there is no available valid digital resource suffix identifier assigned to the target order identifier. If the digital resource suffix identifier is a non-zero value, the digital resource suffix identifier has an associated digital resource.

[0218] Step S85, the precise limit script adds one to the product limit, saves the target order identifier to the object limit, and executes step S86.

[0219] Step S86, the precise limited script returns a valid digital resource suffix identifier.

[0220] Step S87, the precise limited script returns an invalid digital resource suffix identifier.

[0221] To understand the implementation process of S83, please refer to Figure 8b , Figure 8b This is a logical diagram of a commodity limit algorithm provided in the embodiment of the present application. Figure 8b As shown, the specific logic of the commodity limit algorithm is as follows:

[0222] Step S831, the precise limited script randomly selects a work branch, and then executes step S832.

[0223] Specifically, a field in goodsKey is randomly selected as the first selected work branch.

[0224] Step S832, the precise limited script obtains the current amount of work received, and then executes step S833.

[0225] Specifically, the value corresponding to the selected field is obtained as the current work claim amount of the selected work branch.

[0226] Step S833, the precision limited script determines whether the current work collection quantity exceeds the set work upper limit. If not, it means that there is a surplus in the current work branch, and step S834 is executed; if it exceeds, it means that the current work branch exceeds the upper limit, and step S835 is executed. Among them, the work upper limit is a Lua script parameter, which is passed by the calling service.

[0227] Step S834, the precise limited script returns the digital resource suffix identifier = value + 1, that is, the current work collection quantity is increased by one, and step S838 is executed.

[0228] Step S835, the precise limited script determines whether there are more branches of the work and executes step S836.

[0229] Specifically, it is determined whether goodsKey has other fields that have not been queried. If yes, step S836 is executed; if no, it means that all work branches have no available digital resource suffix identifiers, and step S837 is executed.

[0230] Step S836, the precise limited script loop takes the next work branch, and then executes step S832.

[0231] Specifically, the order of the loops is consistent with the order of the interval parameters passed into the script.

[0232] Step S837, the precise limited script sets the invalid digital resource suffix identifier, agrees that 0 is an invalid value, and then executes step S838.

[0233] Step S838, the precise limited script returns the digital resource suffix identifier.

[0234] Specifically, through the above steps S831 to S838, the precise limited script can obtain the digital resource suffix identifier.

[0235] By adopting the method provided in the embodiment of this application, the overall delivery process takes into account the idempotence of each stage, including precise limiting and asynchronous processing schemes during the chaining process. Safe delivery is guaranteed at the user level. At the same time, the precise limiting algorithm provided in the embodiment of this application realizes the safe limiting on the technical side, which can ensure effectiveness and idempotence in unreliable network environments and high concurrency scenarios, and takes into account the random gameplay on the business side, making the distribution of digital resource meta-items more flexible and interesting.

[0236] See also Fig. 9 , Fig. 9: is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device may be a computer program (including program code) running on a computer device, for example, the data processing device is an application software; the device may be used to execute the corresponding steps in the data processing method provided in an embodiment of the present application. Fig. 9 As shown, the data processing device 1 may include: a request receiving module 101 , an identification searching module 102 , an identification generating module 103 , an identification writing module 104 , a retry searching module 105 , an identification acquiring module 106 and a task generating module 107 .

[0237] The request receiving module 101 is used to obtain a digital resource allocation request initiated by a target object; the digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier;

[0238] An identification search module 102 is used to search for a target order identification in a resource inventory database;

[0239] The identifier generation module 103 is used to perform limited allocation processing for the target order identifier according to the resource inventory database, the target object identifier, the resource series identifier and the limited configuration parameters corresponding to the resource series identifier to obtain the allocable digital resource identifier if the target order identifier cannot be found;

[0240] The identification writing module 104 is used to write the association relationship between the allocable digital resource identification and the target order identification into the resource inventory database;

[0241] A retry search module 105, configured to re-search the target order identifier in the retried digital resource allocation request in the resource inventory database when the digital resource allocation request triggers a request retry condition;

[0242] The identification acquisition module 106 is used to acquire the allocable digital resource identification associated with the target order identification in the resource inventory database if the target order identification is found;

[0243] The task generation module 107 is used to generate a digital resource allocation task for the allocatable digital resource identifier; the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocatable digital identifier to the target object.

[0244] The specific implementation of the request receiving module 101, the identification search module 102, the identification generation module 103, the identification writing module 104, the retry search module 105, the identification acquisition module 106 and the task generation module 107 can be referred to above. Figure 3 The description of step S101 to step S104 in the corresponding embodiment will not be repeated here.

[0245] The identification generation module 103 includes: a first acquisition unit 1031 , a limiting unit 1032 , a second acquisition unit 1033 and an allocation unit 1034 .

[0246] The first acquisition unit 1031 is used to acquire a target object resource record table in a resource inventory database according to the target object identifier and the resource series identifier;

[0247] The limiting unit 1032 is used to determine the object resource limiting result according to the target object resource record table and the limiting configuration parameters;

[0248] The second acquisition unit 1033 is used to acquire a target resource series record table in a resource inventory database according to the resource series identifier if the target resource limitation result is an unlimited result;

[0249] The allocating unit 1034 is used to generate an allocable digital resource identifier for associating with the target order identifier according to the target resource series record table and the limited configuration parameters.

[0250] The specific implementation of the first acquisition unit 1031, the limiting unit 1032, the second acquisition unit 1033 and the allocation unit 1034 can refer to the above Figure 4 The description of step S202 to step S203 in the corresponding embodiment will not be repeated here.

[0251] Among them, the limited configuration parameter includes the object resource quantity threshold; the target object resource record table includes the historical order identifier;

[0252] The limiting unit 1032 includes: a query subunit 10321 and a judgment subunit 10322 .

[0253] The query subunit 10321 is used to query the target object resource record table and determine the number of historical order identifiers as the number of existing resources of the object;

[0254] The judgment subunit 10322 is used to determine that the object resource limitation result is an unlimited result if the existing resource quantity of the object is less than the object resource quantity threshold;

[0255] The judgment subunit 10322 is used to determine that the object resource limitation result is a limited result if the existing resource quantity of the object is equal to the object resource quantity threshold.

[0256] The specific implementation of the query subunit 10321 and the judgment subunit 10322 can be found in the above Figure 4 The description of step S202 in the corresponding embodiment will not be repeated here.

[0257] The target resource series record table includes one or more digital resource start identifiers and the number of digital resources that have been collected corresponding to each digital resource start identifier; the limited configuration parameter includes the resource collection quantity threshold corresponding to each digital resource start identifier; the resource attributes of digital resources corresponding to different digital resource start identifiers are different;

[0258] The allocation unit 1034 includes: a random subunit 10341 and a processing subunit 10342 .

[0259] The random subunit 10341 is used to randomly select one or more digital resource start identifiers to obtain a target digital resource start identifier;

[0260] The processing subunit 10342 is used to determine the position number of the digital resource starting identifier in the kth round in the target resource series record table if the number of digital resources corresponding to the digital resource starting identifier in the kth round is equal to the resource collection number threshold corresponding to the digital resource starting identifier in the kth round, and accumulate the position numbers to obtain the position number to be processed; k is a positive integer, and the digital resource starting identifier in the first round is the target digital resource starting identifier;

[0261] The processing subunit 10342 is further configured to divide the position number to be processed by the total number of the one or more digital resource start identifiers, use the remainder obtained as the target position number, obtain the digital resource start identifier corresponding to the target position number in the target resource series record table, and use it as the digital resource start identifier in the k+1th round;

[0262] The processing subunit 10342 is further configured to add the number of digital resources already received corresponding to the digital resource starting identifier in the k+1th round and the digital resource starting identifier in the k+1th round to obtain an allocable digital resource identifier for associating with the target order identifier if the digital resource starting identifier in the k+1th round is not the target digital resource starting identifier and the number of digital resources already received corresponding to the digital resource starting identifier in the k+1th round is less than the resource receiving quantity threshold corresponding to the digital resource starting identifier in the k+1th round;

[0263] The processing subunit 10342 is further configured to use the invalid digital resource identifier as the allocatable digital resource identifier if the digital resource start identifier in the k+1th round is the target digital resource start identifier.

[0264] The specific implementation of the random subunit 10341 and the processing subunit 10342 can be found in the above Figure 4 The description of step S203 in the corresponding embodiment will not be repeated here.

[0265] The above data processing device 1 further includes: an identification processing module 108 .

[0266] The identification processing module 108 is used to call the identification writing module to write the association relationship between the allocable digital resource identification and the target order identification into the resource inventory database if the allocable digital resource identification is not an invalid digital resource identification;

[0267] The identification processing module 108 is also used to determine the starting identification of the digital resource corresponding to the allocable digital resource identification as the starting identification of the digital resource to be processed, and to accumulate the number of digital resources corresponding to the starting identification of the digital resource to be processed to obtain the accumulated number of digital resources already received. In the target resource series record table, the number of digital resources already received corresponding to the starting identification of the digital resource to be processed is updated to the accumulated number of digital resources already received.

[0268] The specific implementation of the identification processing module 108 can be found in the above Figure 4 The optional description of step S203 in the corresponding embodiment will not be repeated here.

[0269] The task generation module 107 includes: an identification search unit 1071 and a task generation unit 1072 .

[0270] The identification search unit 1071 is used to search the resource inventory database for a task identification associated with the target order identification;

[0271] The task generating unit 1072 is configured to generate a digital resource allocation task according to the target object identifier and the allocatable digital resource identifier if no task identifier associated with the target order identifier is found.

[0272] The specific implementation of the identification search unit 1071 and the task generation unit 1072 can be found in the above Figure 6 The description of steps S303-S304 in the corresponding embodiment will not be repeated here.

[0273] Wherein, the above-mentioned data processing device 1 further includes: a task sending module 109 .

[0274] The task sending module 109 is used to send the digital resource allocation task to the blockchain node in the blockchain network, so that the blockchain node generates a target digital resource allocation transaction with a first task identifier according to the digital resource allocation task, and reaches a consensus on the target digital resource allocation transaction. After the target digital resource allocation transaction is completed and reached consensus on the chain, the unique ownership authority of the target digital resource is transferred to the target object; the first task identifier is used to associate with the target order identifier and write it into the resource inventory database.

[0275] The specific implementation of the task sending module 109 can be found in the above Figure 6 The description of step S305 in the corresponding embodiment will not be repeated here.

[0276] The task generation unit 1072 includes: an identification determination subunit 10721 , an identification search subunit 10722 and a task generation subunit 10723 .

[0277] The identification determination subunit 10721 is used to obtain the digital resource identification prefix corresponding to the resource series identification from the configuration library according to the resource series identification, use the allocable digital resource identification as the digital resource identification suffix, and concatenate the digital resource identification prefix and the digital resource identification suffix in a front-to-back order to obtain the target digital resource identification; the target digital resource identification is associated with the corresponding target digital resource in the blockchain network;

[0278] The identification search subunit 10722 is used to search for the target object identification in the object information record table of the resource inventory database; the object information record table is used to record the object identification of the object and the account information associated with the object identification;

[0279] The task generation subunit 10723 is used to obtain the target account information corresponding to the target object identifier if the target object identifier is found in the object information record table, and generate a digital resource allocation task including the target account information and the target digital resource identifier.

[0280] The specific implementation of the identification subunit 10721, the identification search subunit 10722 and the task generation subunit 10723 can be found in the above Figure 6 The description of step S305 in the corresponding embodiment will not be repeated here.

[0281] The data processing device 1 further includes: a first task query module 110 , a first result writing module 111 and a first result processing module 112 .

[0282] The first task query module 110 is used to receive a first task identifier sent by a blockchain node and generate a first task query request carrying the first task identifier;

[0283] The first task query module 110 is further used to send the first task query request to the blockchain node, so that the blockchain node queries the execution status of the target digital resource allocation transaction according to the first task identifier, and determines the first task query result according to the execution status of the target digital resource allocation transaction;

[0284] The first task query module 110 is further used to receive the first task query result sent by the blockchain node;

[0285] The first result writing module 111 is used to write the first task identifier, the target digital resource identifier and the first task query result into a database associated with the blockchain network to obtain a write result if the first task query result is a successful task execution result;

[0286] The first result processing module 112 is further configured to write the association between the first task identifier and the target order identifier into the resource inventory database if the writing result is a successful writing result, and send a prompt message of successful resource allocation to the target terminal associated with the target object;

[0287] The first result processing module 112 is further configured to determine a digital resource allocation request triggering request retry condition if the writing result is a writing failure result.

[0288] The specific implementation of the first task query module 110, the first result writing module 111 and the first result processing module 112 can be referred to above. Figure 6 The description of steps S306 to S309 in the corresponding embodiment will not be repeated here.

[0289] Wherein, the above-mentioned data processing device 1 further includes: a second result processing module 113.

[0290] The second result processing module 113 is used to write the first task identifier, the target digital resource identifier and the first task query result into a database associated with the blockchain network if the first task query result is a task being executed result, and determine the digital resource allocation request trigger request retry condition.

[0291] The specific implementation of the second result processing module 113 can be found in the above Figure 6 The optional descriptions in the corresponding embodiments will not be repeated here.

[0292] Wherein, the above data processing device 1 further includes: a third result processing module 114.

[0293] The third result processing module 114 is used to send a resource query request carrying the target digital resource identifier to the blockchain node if the first task query result is a task execution failure result, so that the blockchain node obtains the actual account information corresponding to the target digital resource identifier according to the resource query request as the account information to be verified; the object corresponding to the actual account information has the sole ownership authority of the target digital resource corresponding to the target digital resource identifier;

[0294] The third result processing module 114 is further configured to update the first task query result to a task execution success result if the account information to be verified is the same as the target account information;

[0295] The third result processing module 114 is also used to write the first task identifier, the target digital resource identifier and the updated first task query result into a database associated with the blockchain network.

[0296] The specific implementation of the third result processing module 114 can be found in the above Figure 6 The optional descriptions in the corresponding embodiments will not be repeated here.

[0297] The data processing device 1 further includes: a second task query module 115 , a second result writing module 116 and a fourth result processing module 117 .

[0298] The second task query module 115 is used for determining the task identifier associated with the target order identifier as the second task identifier if a task identifier associated with the target order identifier is found, and generating a second task query request carrying the second task identifier;

[0299] The second task query module 115 is used to send the second task query request to the blockchain node, so that the blockchain node queries the execution status of the digital resource allocation transaction associated with the second task identifier, and determines the second task query result according to the execution status of the digital resource allocation transaction associated with the second task identifier;

[0300] The second task query module 115 is used to receive the second task query result sent by the blockchain node;

[0301] The second result writing module 116 is used to write the second task identifier, the target digital resource identifier and the second task query result into a database associated with the blockchain network to obtain a write result if the second task query result is a successful task execution result;

[0302] The fourth result processing module 117 is used to write the association relationship between the second task identifier and the target order identifier into the resource inventory database if the writing result is a successful writing result;

[0303] The fourth result processing module 117 is configured to determine a digital resource allocation request triggering request retry condition if the writing result is a writing failure result.

[0304] The specific implementation of the second task query module 115, the second result writing module 116 and the fourth result processing module 117 can be found in the above Figure 6 The optional descriptions in the corresponding embodiments will not be repeated here.

[0305] Through the device provided by the embodiment of the present application, after receiving the digital resource allocation request, the target order identifier in the digital resource allocation request can be searched in the resource inventory database. If the target order identifier cannot be found, the limited allocation processing for the target order identifier is executed to obtain the allocable digital resource identifier, and the association relationship between the allocable digital resource identifier and the target order identifier is written into the resource inventory database; then a digital resource allocation task is generated according to the allocable digital resource identifier, and the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital identifier to the target object. When the digital resource allocation task fails due to a retryable error and the digital resource allocation request is retried, the previously generated allocable digital resource identifier can be obtained in the resource inventory data according to the target order identifier, and a new allocable digital resource identifier does not need to be generated again for the retried digital resource allocation request to avoid missing digital resources. Similarly, there is no need to roll back the resource inventory database because the digital resource allocation task corresponding to the digital resource allocation request fails, and there will be no situation where the allocable digital resource identifier allocation fails due to the subsequent new digital resource allocation task occurring before the rollback operation, thereby improving the success rate of limited digital resource allocation.

[0306] See also Fig.10 , Fig.10 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.10 As shown, the computer device 1000 (for example, the above Figure 1 The terminal device 10 or server 100 in the corresponding embodiment may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, in some embodiments, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. Fig.10 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0307] In such Fig.10 In the computer device 1000 shown, the network interface 1004 can provide a network communication network element; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0308] Obtaining a digital resource allocation request initiated by a target object; the digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier;

[0309] Searching for the target order identifier in the resource inventory database, if the target order identifier cannot be found, executing limited allocation processing for the target order identifier according to the resource inventory database, the target object identifier, the resource series identifier and the limited configuration parameters corresponding to the resource series identifier, obtaining the allocatable digital resource identifier, and writing the association relationship between the allocatable digital resource identifier and the target order identifier into the resource inventory database;

[0310] When the digital resource allocation request triggers a request retry condition, the target order identifier in the retried digital resource allocation request is searched again in the resource inventory database;

[0311] If the target order identifier is found, the allocable digital resource identifier associated with the target order identifier is obtained from the resource inventory database, and a digital resource allocation task for the allocable digital resource identifier is generated; the digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital identifier to the target object.

[0312] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the description of the data processing method in any of the above embodiments, which will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated.

[0313] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the above-mentioned computer-readable storage medium stores a computer program, and the above-mentioned computer program includes program instructions. When the above-mentioned processor executes the above-mentioned program instructions, it can execute the description of the above-mentioned data processing method in any of the above-mentioned embodiments, so it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0314] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0315] In addition, it should be noted that: the embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in any of the above embodiments.

[0316] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.

[0317] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of network elements in the above description. Whether these network elements are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described network elements for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0318] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method, characterized in that: include: Obtain a digital resource allocation request initiated by a target object; The digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier; Searching for the target order identifier in the resource inventory database, if the target order identifier cannot be found, performing limited allocation processing for the target order identifier according to the resource inventory database, the target object identifier, the resource series identifier and the limited configuration parameters corresponding to the resource series identifier, obtaining an allocatable digital resource identifier, and writing the association between the allocatable digital resource identifier and the target order identifier into the resource inventory database; When the digital resource allocation request triggers a request retry condition, re-searching the target order identifier in the retried digital resource allocation request in the resource inventory database; If the target order identifier is found, the allocatable digital resource identifier associated with the target order identifier is obtained in the resource inventory database, and a digital resource allocation task for the allocatable digital resource identifier is generated; The digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital resource identifier to the target object; Sending the digital resource allocation task to a blockchain node in a blockchain network, so that the blockchain node generates a target digital resource allocation transaction with a first task identifier according to the digital resource allocation task, and consensus-uploading the target digital resource allocation transaction to the blockchain; Sending a first task query request carrying the first task identifier to the blockchain node, so that the blockchain node queries the execution status of the target digital resource allocation transaction according to the first task identifier, and determining the first task query result according to the execution status of the target digital resource allocation transaction; If the first task query result is a successful task execution result, the first task identifier, the target digital resource identifier and the first task query result are written into a database associated with the blockchain network to obtain a write result; If the writing result is a successful writing result, the association relationship between the first task identifier and the target order identifier is written into the resource inventory database, and a prompt message of successful resource allocation is sent to the target terminal associated with the target object.

2. The method according to claim 1, characterized in that The step of performing limited allocation processing for the target order identifier according to the resource inventory database, the target object identifier, the resource series identifier, and the limited configuration parameters corresponding to the resource series identifier to obtain an allocatable digital resource identifier includes: Acquire a target object resource record table in the resource inventory database according to the target object identifier and the resource series identifier; Determine the object resource limitation result according to the target object resource record table and the limitation configuration parameters; If the target resource limitation result is an unlimited result, obtaining a target resource series record table in the resource inventory database according to the resource series identifier; According to the target resource series record table and the limited configuration parameters, an allocatable digital resource identifier for associating with the target order identifier is generated.

3. The method according to claim 2, characterized in that The limit configuration parameter includes a threshold value of the object resource quantity; the target object resource record table includes a historical order identifier; The determining of the object resource limitation result according to the target object resource record table and the limitation configuration parameter includes: Query the target object resource record table to determine the number of historical order identifiers as the number of existing resources of the object; If the existing resource quantity of the object is less than the object resource quantity threshold, determining that the object resource limitation result is an unlimited result; If the existing resource quantity of the object is equal to the object resource quantity threshold, it is determined that the object resource limitation result is a limited result.

4. The method according to claim 2, characterized in that: The target resource series record table includes one or more digital resource start identifiers and the number of digital resources that have been collected corresponding to each digital resource start identifier; the limited configuration parameter includes a resource collection quantity threshold corresponding to each digital resource start identifier; and the digital resources corresponding to different digital resource start identifiers have different resource attributes; The step of generating, according to the target resource series record table and the limited configuration parameter, an allocatable digital resource identifier for associating with the target order identifier comprises: Randomly select the one or more digital resource start identifiers to obtain a target digital resource start identifier; If the number of digital resources corresponding to the digital resource starting identifier in the kth round that have been collected is equal to the resource collection quantity threshold corresponding to the digital resource starting identifier in the kth round, then determine the position number of the digital resource starting identifier in the kth round in the target resource series record table, accumulate the position numbers, and obtain the position number to be processed; k is a positive integer, and the digital resource starting identifier in the first round is the target digital resource starting identifier; Divide the to-be-processed position number by the total number of the one or more digital resource start identifiers, and use the remainder obtained as the target position number, and obtain the digital resource start identifier corresponding to the target position number in the target resource series record table as the digital resource start identifier in the k+1th round; If the digital resource starting identifier in the k+1th round is not the target digital resource starting identifier, and the number of digital resources that have been collected corresponding to the digital resource starting identifier in the k+1th round is less than the resource collection quantity threshold corresponding to the digital resource starting identifier in the k+1th round, then the number of digital resources that have been collected corresponding to the digital resource starting identifier in the k+1th round and the digital resource starting identifier in the k+1th round are added to obtain the allocable digital resource identifier for association with the target order identifier; If the digital resource start identifier in the k+1th round is the target digital resource start identifier, the invalid digital resource identifier is used as the allocatable digital resource identifier.

5. The method according to claim 4, characterized in that The method further comprises: If the allocable digital resource identifier is not the invalid digital resource identifier, then executing the step of writing the association relationship between the allocable digital resource identifier and the target order identifier into the resource inventory database; Determine the starting identifier of the digital resource corresponding to the allocable digital resource identifier as the starting identifier of the digital resource to be processed, accumulate the number of digital resources corresponding to the starting identifier of the digital resource to be processed, and obtain the accumulated number of digital resources already received. In the target resource series record table, update the number of digital resources already received corresponding to the starting identifier of the digital resource to be processed to the accumulated number of digital resources already received.

6. The method according to claim 1, characterized in that After the target digital resource allocation transaction is completed and uploaded to the chain, the unique ownership authority of the target digital resource is transferred to the target object; the first task identifier is used to be associated with the target order identifier and written into the resource inventory database; The generating of the digital resource allocation task for the allocatable digital resource identifier comprises: Searching the resource inventory database for a task identifier associated with the target order identifier; If the task identifier associated with the target order identifier is not found, a digital resource allocation task is generated according to the target object identifier and the allocatable digital resource identifier.

7. The method according to claim 6, characterized in that The step of generating a digital resource allocation task according to the target object identifier and the allocatable digital resource identifier comprises: According to the resource series identifier, a digital resource identifier prefix corresponding to the resource series identifier is obtained from the configuration library, the allocable digital resource identifier is used as a digital resource identifier suffix, and the digital resource identifier prefix and the digital resource identifier suffix are concatenated in a front-to-back order to obtain a target digital resource identifier; the target digital resource identifier is associated with a corresponding target digital resource in the blockchain network; Searching for the target object identifier in the object information record table of the resource inventory database; the object information record table is used to record the object identifier of the object and the account information associated with the object identifier; If the target object identifier is found in the object information record table, the target account information corresponding to the target object identifier is obtained, and a digital resource allocation task including the target account information and the target digital resource identifier is generated.

8. The method according to claim 1, characterized in that The method further comprises: If the write result is a write failure result, determining that the digital resource allocation request triggers a request retry condition.

9. The method according to claim 1, characterized in that: The method further comprises: If the first task query result is a result that the task is being executed, the first task identifier, the target digital resource identifier and the first task query result are written into a database associated with the blockchain network to determine a request retry condition for triggering the digital resource allocation request.

10. The method according to claim 1, characterized in that The method further comprises: If the first task query result is a task execution failure result, a resource query request carrying the target digital resource identifier is sent to the blockchain node, so that the blockchain node obtains the actual account information corresponding to the target digital resource identifier according to the resource query request as the account information to be verified; the object corresponding to the actual account information has the sole ownership authority of the target digital resource corresponding to the target digital resource identifier; If the to-be-verified account information is the same as the target account information, updating the first task query result to a task execution success result; The first task identifier, the target digital resource identifier, and the updated first task query result are written into a database associated with the blockchain network.

11. The method according to claim 6, characterized in that The method further comprises: If a task identifier associated with the target order identifier is found, the task identifier associated with the target order identifier is determined as a second task identifier, and a second task query request carrying the second task identifier is generated; Sending the second task query request to the blockchain node, so that the blockchain node queries the execution status of the digital resource allocation transaction associated with the second task identifier, and determining the second task query result according to the execution status of the digital resource allocation transaction associated with the second task identifier; Receiving the second task query result sent by the blockchain node; If the second task query result is a successful task execution result, the second task identifier, the target digital resource identifier and the second task query result are written into the database associated with the blockchain network to obtain a write result; If the writing result is a successful writing result, writing the association relationship between the second task identifier and the target order identifier into the resource inventory database; If the write result is a write failure result, determining that the digital resource allocation request triggers a request retry condition.

12. A data processing device, characterized in that: include: A request receiving module, used to obtain a digital resource allocation request initiated by a target object; The digital resource allocation request includes a target object identifier, a target order identifier, and a resource series identifier; An identification search module, used to search for the target order identification in a resource inventory database; An identification generation module, for executing limited allocation processing for the target order identification according to the resource inventory database, the target object identification, the resource series identification and the limited configuration parameters corresponding to the resource series identification, to obtain an allocatable digital resource identification, if the target order identification cannot be found; An identification writing module, used for writing the association relationship between the allocable digital resource identification and the target order identification into the resource inventory database; A retry search module, configured to re-search the target order identifier in the retried digital resource allocation request in the resource inventory database when the digital resource allocation request triggers a request retry condition; an identification acquisition module, configured to acquire, if the target order identification is found, the allocable digital resource identification associated with the target order identification in the resource inventory database; A task generation module, used for generating a digital resource allocation task for the allocatable digital resource identifier; The digital resource allocation task is used to transfer the unique ownership authority of the target digital resource corresponding to the allocable digital resource identifier to the target object; the digital resource allocation task is sent to the blockchain node in the blockchain network, so that the blockchain node generates a target digital resource allocation transaction with a first task identifier according to the digital resource allocation task, and the target digital resource allocation transaction is consensus-uploaded to the chain; Sending a first task query request carrying the first task identifier to the blockchain node, so that the blockchain node queries the execution status of the target digital resource allocation transaction according to the first task identifier, and determining the first task query result according to the execution status of the target digital resource allocation transaction; If the first task query result is a successful task execution result, the first task identifier, the target digital resource identifier and the first task query result are written into the database associated with the blockchain network to obtain a write result; if the write result is a successful write result, the association relationship between the first task identifier and the target order identifier is written into the resource inventory database, and a resource allocation success prompt message is sent to the target terminal associated with the target object.

13. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store a computer program, and the processor is used to call the computer program to execute the method described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 11 can be performed.

Citation Information

Patent Citations

  • Resource allocation method and related device

    CN110602249A

  • Resource processing method and device, electronic equipment and storage medium

    CN113469735A