Asset processing method and device of blockchain network, computer device and medium
By obtaining asset transfer requests in the blockchain network, calling contracts to determine the amount of assets to be received and generating a receiving identifier, the problem of low efficiency and uniformity in asset transfer in existing technologies is solved, and diversified asset allocation and efficient transfer are realized.
Patent Information
- Application Number
- CN202210810967.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-11
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-07-11
AI Technical Summary
Existing asset transfer methods in blockchain networks are inefficient and limited, failing to meet diverse asset transfer needs.
By obtaining asset transfer requests, invoking asset transfer contracts and asset management contracts, determining the amount of assets to be received by multiple receiving objects, and generating receiving identifiers, the allocation and transfer of assets are realized.
It enhances the richness and efficiency of asset transfer in blockchain networks, supports asset allocation to multiple objects, and is suitable for asset transfer scenarios in blockchain networks.
Smart Images

Figure CN117422464B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to an asset processing method, apparatus, computer equipment, and medium for a blockchain network. Background Technology
[0002] Blockchain technology, with its inherent characteristics of immutability and transparency, can effectively ensure the security of asset transfers and promote on-chain asset flow and industry development.
[0003] Typically, when object A transfers on-chain assets to object B, the transfer is mainly carried out through a predefined generic interface. This method of asset transfer based on a generic interface is inefficient and limited by the transfer methods defined by the generic interface, resulting in a single asset transfer method. Summary of the Invention
[0004] This application provides an asset processing method, apparatus, computer equipment, and medium for a blockchain network, which can improve the richness and efficiency of asset transfer in a blockchain network.
[0005] This application provides a method for asset processing in a blockchain network, the method comprising: Obtain the asset transfer request initiated by the first object; the asset transfer request includes the amount of assets to be transferred by the first object and N second objects for receiving the assets transferred by the first object, where N is a positive integer. The asset transfer request also includes the asset receiving strategies of the N second objects for the assets transferred by the first object. Invoke the asset transfer contract to obtain the target asset of the first object from the asset management contract; the target asset refers to the asset indicated by the asset transfer amount; The asset transfer contract is invoked to determine the N asset receiving quantities for the target asset for N second objects, based on the asset receiving strategy and the asset transfer quantity. Generate a receiving identifier for the target asset, enabling N second objects to request the asset transfer contract to receive the target asset based on the receiving identifier. The asset transfer contract is used to transfer assets to the N second objects according to the requests of the N second objects and the N asset receiving amounts.
[0006] This application provides an asset processing apparatus, which includes: The acquisition module is used to acquire the asset transfer request initiated by the first object. The asset transfer request includes the amount of assets to be transferred by the first object and N second objects for receiving the assets transferred by the first object, where N is a positive integer. The asset transfer request also includes the asset receiving strategies of the N second objects for the assets transferred by the first object. The processing module is used to invoke the asset transfer contract to obtain the target asset of the first object from the asset management contract; the target asset refers to the asset indicated by the asset transfer amount. The processing module is also used to call the asset transfer contract to determine the N asset receiving quantities for the target asset for N second objects based on the asset receiving strategy and the asset transfer quantity; The processing module is also used to generate a receiving identifier for the target asset, enabling N second objects to request the asset transfer contract to receive the target asset based on the receiving identifier. The asset transfer contract is used to transfer assets to the N second objects according to the requests of the N second objects and the N asset receiving amounts.
[0007] This application provides a computer device, including a processor, a memory, and a network interface. The processor is connected to the memory and the network interface. The network interface is used to provide network communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs to implement the method described in the above-mentioned aspect.
[0008] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the above-mentioned aspect.
[0009] According to one aspect of this application, a computer program product is provided, comprising a computer program, which includes program instructions stored in a computer-readable storage medium. A processor of a computer device reads the program instructions from the computer-readable storage medium and executes the program instructions, causing the computer device to perform the method described in the preceding aspect.
[0010] This application can obtain an asset transfer request initiated by a first object. The asset transfer request includes the asset transfer amount of the first object, N second objects for receiving the assets transferred by the first object, and the asset receiving strategy of the N second objects for the assets transferred by the first object, where N is a positive integer. It calls an asset transfer contract to obtain the target asset of the first object from an asset management contract. The target asset refers to the asset indicated by the asset transfer amount. Based on the asset receiving strategy and the asset transfer amount, it determines the N asset receiving amounts for the target asset for the N second objects. It generates a receiving identifier for the target asset, enabling the N second objects to request to receive the target asset from the asset transfer contract based on the receiving identifier. The asset transfer contract is used to transfer assets to the N second objects according to the requests and the N asset receiving amounts. Therefore, this application can realize asset transfer from a first object to one second object, or simultaneously to multiple second objects. Furthermore, when transferring assets, the asset receiving amounts for the N second objects can be determined first, and then the assets can be allocated and transferred based on the asset receiving amounts, improving the richness of asset transfer in the blockchain network. Moreover, the asset transfer process of the first object is implemented by the asset transfer contract and the asset management contract, improving the efficiency of asset transfer. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application; Figure 2 This is a flowchart illustrating an asset processing method for a blockchain network provided in an embodiment of this application; Figure 3 This is a schematic diagram of a client page provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating a scenario of asset allocation provided in an embodiment of this application; Figure 5 This is a flowchart illustrating another asset processing method for a blockchain network provided in this application embodiment; Figure 6 This is a schematic diagram of another client page provided in an embodiment of this application; Figure 7 This is a schematic diagram of an asset processing scenario provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an asset processing device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0014] First, it should be noted that this application may display a prompt interface or pop-up window before and during the initiation of an asset transfer request or asset receipt request. This prompt interface or pop-up window is used to inform the recipient that data related to the request needs to be obtained or collected when initiating the aforementioned request. This application will only begin executing the steps related to obtaining the relevant data after receiving confirmation from the recipient regarding the prompt interface or pop-up window; otherwise (i.e., without receiving confirmation from the recipient), the initiation of the request will be terminated. In other words, all request-related data collected in this application is collected with the recipient's consent and authorization, and the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0015] This application provides an asset processing method for a blockchain network, which involves blockchain-related technologies. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A smart contract is a computer protocol designed to disseminate, verify, or execute contracts in an informational manner, allowing for trusted transactions without a third party. These transactions are traceable and irreversible. Of course, smart contracts not only refer to contracts that execute transactions but can also refer to contracts that process received information. Smart contracts can be implemented through program code deployed on the blockchain. Based on actual transaction needs, the program code is automatically executed on the blockchain to complete the transaction, and each transaction is permanently stored on the blockchain after execution, possessing immutability and authenticity. In this application, smart contracts (including asset transfer contracts and asset management contracts) can be used to implement asset processing functions on the asset blockchain network (such as asset custody or locking in asset transfer, verification of asset receiving qualifications, asset transfer, etc.) to ensure the immutability of each asset processing.
[0016] The architecture of the communication system according to an embodiment of this application is described below. Please refer to... Figure 1 , Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. Figure 1As shown, the communication system includes a blockchain network 100, at least one object (e.g., object 301 and object 302), and at least one client associated with the object (e.g., client 201 associated with object 301 and client 202 associated with object 302). The blockchain network 100 includes at least one blockchain node, such as blockchain node 101, blockchain node 102, and blockchain node 103. Each blockchain node can integrate a smart contract, which can automate business transactions (e.g., asset transfers) by running the smart contract. Furthermore, the blockchain nodes are interconnected, enabling real-time operation or synchronization of transaction data on the blockchain network. At least one client can interact with any blockchain node to complete business transactions between two or more clients through any blockchain node.
[0017] Specifically, if object 301 needs to initiate an asset transfer to multiple other objects, it can construct an asset transfer request through client 201 and send it to blockchain node 101. This asset transfer request includes one or more objects receiving the transferred assets, the total amount of assets to be transferred, and an asset receiving strategy for allocating the transferred assets to one or more objects. When blockchain node 101 receives this asset transfer request, it can first invoke the asset transfer contract to obtain the assets corresponding to the asset transfer request from the asset management contract and determine the amount of one or more assets to be received based on the asset receiving strategy. Then, blockchain node 101 generates a receiving identifier to identify the asset and uploads it to the blockchain network. When client 202 associated with object 302 obtains this receiving identifier, it can construct an asset receiving request through this identifier and send it to blockchain node 101. Blockchain node 101 can verify object 302's eligibility to receive assets from multiple dimensions (for example, object 302's identifier, the time the receiving request was initiated, etc.). After verification, blockchain node 101 selects one asset receiving amount from the above one or more asset receiving amounts as the target asset receiving amount corresponding to object 302, and calls the asset transfer contract to transfer the asset corresponding to the target asset receiving amount in the asset to object 302.
[0018] Optionally, both client 201 and client 202 can integrate an asset transfer application (or asset transfer program). When the asset transfer application runs in client 201 and client 202, the process of constructing and sending asset transfer requests or asset receipt requests described above can be implemented.
[0019] Optionally, objects 301 and 302 mentioned above each have an object identifier used to identify their identity in the asset transfer application. The object identifier can be included in the asset transfer request and the asset receipt request. The object identifier can be a communication number, client hardware identifier, on-chain asset address, etc., and this application does not impose any restrictions on this.
[0020] It should be noted that all the aforementioned clients can be terminal devices, and all the aforementioned blockchain nodes can be terminal devices or servers. For example, terminal devices can be mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), vehicles, roadside devices, aircraft, wearable devices, etc., and this application does not impose any restrictions on this. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Furthermore, the communication connections between the aforementioned clients and blockchain nodes, and between the various blockchain nodes, can be wireless or wired communication connections, etc.
[0021] This application's embodiments can be applied to asset transfer scenarios on blockchain networks, enabling asset transfers to one or more objects, such as distributing red envelopes, thus enhancing the richness of asset transfers on blockchain networks. Furthermore, the entire asset transfer process is implemented through asset transfer contracts and asset management contracts, improving the efficiency of asset transfers.
[0022] Please see Figure 2 , Figure 2 This is a flowchart illustrating an asset processing method for a blockchain network provided in an embodiment of this application. The method includes steps S201 to S203, which can be derived from the above... Figure 1 Executed by any of the blockchain nodes shown (e.g., blockchain node 101). Wherein: S201. Obtain the asset transfer request initiated by the first object; the asset transfer request includes the amount of assets to be transferred by the first object and N second objects for receiving the assets transferred by the first object, where N is a positive integer. The asset transfer request also includes the asset receiving strategies of the N second objects for the assets transferred by the first object.
[0023] The assets involved in this application include, but are not limited to, data assets, digital collectibles, digital products, or virtual assets. The asset transfer amount is the total number of assets that the first object needs to transfer to N second objects. The asset receiving strategy refers to how to allocate the transferred assets to each second object and determine how many assets each second object receives. For example, randomly allocating the transferred assets to the N second objects (a random receiving strategy) ensures that each second object receives a random number of assets from the asset transfer amount; or, uniformly allocating the transferred assets to the second objects (a uniform receiving strategy) ensures that each second object receives the same number of assets from the asset transfer amount.
[0024] In one possible implementation, the aforementioned N second objects are objects selected by the first object in the asset transfer procedure. The asset transfer request may include object identifiers of the first object and the N second objects in the asset transfer procedure. The inclusion of object identifiers of the N second objects in the asset transfer request can be understood as the asset transfer request containing N second objects.
[0025] Specifically, the asset transfer procedure here refers to the process running on the client associated with the first object and each of the N second objects (e.g., it can run on the aforementioned...). Figure 1 The client (201) can be used as an application to initiate the aforementioned asset transfer request or asset receipt request to the blockchain node. When the asset transfer program runs on the client associated with the first object, the client can display groups related to the first object. Each group contains multiple related objects and selection controls for these objects. The first object can select N second objects by manipulating these selection controls. In other words, the N second objects can be the objects selected by the first object from the groups in the asset transfer program.
[0026] Please see Figure 3 , Figure 3 This is a schematic diagram of a client page provided in an embodiment of this application. For example... Figure 3 As shown, the page displays Group 1 and Group 2 related to the first object. Group 1 includes object A, object B, object C, and object D, while Group 2 includes object E, object F, and object G. The first object can select these four objects as the N second objects that can receive assets by clicking, touching, or performing other operations on the selection controls for object B, object C, object E, and object F in these two groups. In this case, N equals 4.
[0027] Optionally, the objects displayed on this page may also include objects that have not established a group relationship with the first object, but have had data transaction relationships (such as asset transfers) with the first object during a historical period, and these objects (and related information such as identifiers) are pre-stored on the blockchain and can be obtained by the asset transfer procedure.
[0028] Optionally, for objects that have not established a group relationship with the first object and have no data transaction relationship with the first object, the first object may also obtain the above N objects (and their related identification information) through other means, and input these objects (and their related identification information) on the client running the asset transfer program, and use these objects as the second objects for subsequent asset transfer.
[0029] It should be noted that the relevant identification information of the aforementioned objects may be the object's communication number, the object's object identifier in the asset transfer process, or the object's on-chain asset address in the blockchain network, etc., and this application does not limit this.
[0030] S202. Invoke the asset transfer contract to obtain the target asset of the first object from the asset management contract; the target asset refers to the asset indicated by the asset transfer amount.
[0031] Among them, an asset management contract can refer to a smart contract used to manage the assets on the blockchain, and an asset transfer contract can refer to a smart contract used to custody or lock the assets managed in the asset management contract.
[0032] In one possible implementation, the invocation of the asset transfer contract to obtain the target asset of the first object from the asset management contract specifically includes: extracting the object identifier of the first object from the asset transfer request, and obtaining the target asset associated with the extracted object identifier from the asset management contract.
[0033] Optionally, the assets in this application can be various types of assets such as data assets, digital collectibles, digital products, or virtual assets. The first object can store one or more of the above-mentioned types of assets (including the target asset) on the blockchain network, and different types of assets can be stored at the same or different on-chain asset addresses of the first object. The asset type of the target asset can be any of these multiple types. Therefore, the above-mentioned asset transfer request can also include an asset type identifier, which is used to indicate the type of asset that the first object needs to transfer.
[0034] Furthermore, when the blockchain node extracts the object identifier of the first object from the asset transfer request, it can also extract the aforementioned asset type identifier. This allows the asset management contract to determine the on-chain asset address of the target asset in the blockchain network based on the object identifier and asset type identifier of the first object. The contract then retrieves the target asset meeting the transfer amount from this on-chain asset address and sends it to the asset transfer contract, which then holds or locks the target asset. For example, this holding or locking can be understood as encrypting the target asset using a digital encryption algorithm, ensuring that no object can receive the asset until the holding or locking is released, thus guaranteeing asset security.
[0035] S203. Invoke the asset transfer contract to determine the N asset receiving quantities for the target asset for N second objects based on the asset receiving strategy and asset transfer quantity.
[0036] In this scenario, if the first object transfers assets to multiple second objects, where N is a positive integer greater than 1, the asset transfer contract can determine the N asset receiving amounts based on the asset receiving strategy and the asset transfer amount. The asset receiving strategy here can be either a random receiving strategy for the target asset by the N second objects or a uniform receiving strategy for the target asset by the N second objects.
[0037] In one possible implementation, if the asset receiving strategy is a random receiving strategy, the specific process of the blockchain node executing this step includes: randomly determining N-1 dividing points in the numerical range corresponding to the asset transfer amount; the numerical range is composed of the target value and the asset transfer amount, where the target value is less than the asset transfer amount; dividing the numerical range into N sub-ranges according to the N-1 dividing points; and determining N asset receiving amounts according to the N sub-ranges.
[0038] The numerical range corresponding to the aforementioned asset transfer amount can be understood as [target value, asset transfer amount]. The target value can be 0 or any other value less than the asset transfer amount; this application does not impose any restrictions on this. After randomly determining N-1 dividing points within the numerical range corresponding to the asset transfer amount, the numerical range is further divided into N sub-ranges based on these N-1 dividing points. The numerical values corresponding to the N sub-ranges are then used as the N asset receiving amounts. This possible implementation method can be used to subsequently allocate assets with random quantities to multiple objects, and can be applied to scenarios where red envelopes are randomly distributed in a blockchain network, ensuring the randomness of red envelope distribution.
[0039] For example, Figure 4 This is a schematic diagram illustrating a scenario of asset allocation provided in an embodiment of this application. Figure 4 In the example, the target value can be 0, the asset transfer amount of the target asset can be 500, and N can be 5. Therefore, within the numerical range, it can be determined that... Figure 4The four dividing points are shown. Based on these four dividing points, five sub-intervals can be determined: [0, 80], [80, 200], [200, 300], [300, 375], and [375, 500]. The asset receiving amounts for each sub-interval are 80, 120, 100, 75, and 125, respectively.
[0040] In one possible implementation, if the asset receiving strategy is a uniform receiving strategy, the blockchain node executes this step by using the ratio of the asset transfer amount to N as the value of the N asset receiving amounts. For example, the asset transfer amount can be 500, and N can be 5, resulting in 5 asset receiving amounts of 100 each. This possible implementation allows the blockchain node to allocate the same amount of assets to multiple objects in subsequent processes, which can be applied to scenarios where red envelopes are distributed uniformly in a blockchain network to ensure the fairness of red envelope distribution.
[0041] Alternatively, the resource transfer strategy may specifically include the asset receiving amount set by the first object for each of the N second objects, and the sum of the asset receiving amounts of each object is equal to the asset transfer amount. Therefore, the N asset receiving amounts of the N second objects for the target asset determined by calling the asset transfer contract may include the asset receiving amounts corresponding to each of the second objects in the asset transfer strategy.
[0042] It should be noted that if the first object transfers assets to a second object, and N is 1, then the value of the asset receiving amount determined by the blockchain node in this step is the same as the value of the asset transfer amount.
[0043] Based on step S203, the blockchain node can call the asset transfer contract to predetermine one or more asset receiving amounts, so that when the blockchain node subsequently transfers assets to the second object, it can determine the asset receiving amount corresponding to the second object from the one or more asset receiving amounts, and transfer the assets indicated by the asset receiving amount corresponding to the second object to the second object.
[0044] S204. Generate a receiving identifier for the target asset, enabling N second objects to request the asset transfer contract to receive the target asset based on the receiving identifier. The asset transfer contract is used to transfer assets to the N second objects according to the requests of the N second objects and the N asset receiving amounts.
[0045] Here, the receiving identifier refers to the identifier used to establish a transaction and transfer assets between objects. Specifically, when objects other than the first object (including N second objects) receive the target asset, they need to construct an asset receiving request based on the receiving identifier and send it to the asset transfer contract. This allows the asset transfer contract to first determine, through the receiving identifier, which asset (such as the target asset) the receiving request is for, and then perform the asset transfer based on the asset receiving request and the N asset receiving amounts determined in step S203.
[0046] In one possible implementation, any one of the N second objects is represented as the target object. The process of transferring assets based on the target object's asset transfer request and the N asset receiving quantities specifically includes: if an asset receiving request initiated by the target object based on the receiving identifier is obtained, then the target asset receiving quantity corresponding to the target object is selected from the N asset receiving quantities; and the asset transfer contract is invoked to transfer the asset indicated by the target asset receiving quantity to the target object.
[0047] For example, regarding the random reception strategy mentioned above... Figure 4 For example, if the five determined asset receiving amounts are 80, 120, 100, 75, and 125, then when a blockchain node transfers assets to a target object, it can first randomly select one of these five unselected asset receiving amounts as the target asset receiving amount for the target object (in this example, the target asset receiving amount could be 125), so that when the asset transfer contract transfers assets to the target object, the transferred asset quantity equals 125. Alternatively, for the example corresponding to the above uniform receiving strategy, if the determined asset receiving amount for each object is 100, then when a blockchain node transfers assets to the target object, the target object can receive an asset quantity equal to 100.
[0048] It should be noted that the asset indicated by the target asset receiving amount in the above-mentioned call to the asset transfer contract to the target object refers to transferring the asset indicated by the target asset receiving amount to the target object's on-chain asset address in the blockchain network.
[0049] Optionally, the above asset receiving request may also include receiving qualification verification. Before transferring assets based on the asset receiving request and the N asset receiving amounts determined in step S203, the blockchain node may also verify the receiving qualification of objects other than the first object (including N second objects) based on the asset receiving request. After the verification is passed, the assets corresponding to the object are unlocked or put into custody, and the corresponding assets are transferred to the object.
[0050] It should be noted that the receiving identifier can be stored in correspondence with the content included in the asset transfer request. This allows the asset transfer contract to determine the identifiers of the corresponding N second objects, the content of the receiving qualification verification, and the N asset receiving quantities, etc., based on the received identifier, and to perform asset transfer on the objects receiving the assets based on the determined content. For example, the process of verifying the receiving qualification of the objects based on the determined receiving qualification verification content can be seen in the following... Figure 5 Corresponding implementation examples.
[0051] Optionally, when determining the N asset receiving quantities in step S203 above, this application can further divide the N asset receiving quantities into multiple asset receiving sub-quantities. These asset receiving sub-quantities can be used by the second object to receive the corresponding asset receiving quantity multiple times in a time-sharing manner.
[0052] For example, the asset receiving quantity corresponding to a second object can be 100. In step S203, the asset receiving quantity corresponding to the second object can be further divided into 10 parts, each part containing 10. Then, the second object can receive the first part containing 10 assets when receiving the first transferred asset, and receive the second part containing 10 assets when receiving the second transferred asset, with the second transfer occurring after the first transfer, and so on.
[0053] It should be noted that the N asset receiving quantities in this application can be further divided according to other division rules, etc. (for example, allocating a certain number of assets according to the degree to which the receiving qualification verification content is met; if all the verification content is met, the assets corresponding to the asset receiving quantity are transferred; if the verification content is partially met, the assets corresponding to a portion of the asset receiving quantity are transferred). The above division rule based on receiving time is only an example.
[0054] It should be noted that, in this embodiment of the application, the asset transfer contract can implement steps S201 to S203 through an asset transfer function defined in the contract. This asset transfer function includes one or more fields such as the object identifier of the first object, object identifiers of multiple second objects, asset transfer quantity, asset type identifier, and asset receiving strategy. When the first object initiates an asset transfer request, it can include the content corresponding to one or more of the above fields and the asset transfer function, so that the asset transfer contract can call the asset transfer function to process the content corresponding to one or more of the above fields, thereby realizing the asset transfer on the blockchain.
[0055] For example, the asset transfer function can be MultiTransfer(address from, address[] to, int256 num, int256 tokenID, int256 value, int32 strategy). Here, address from corresponds to the object identifier of the first object in the asset transfer request, address[] to corresponds to the object identifier of at least one second object in the asset transfer request, num corresponds to the quantity of the second objects, tokenID corresponds to the asset type identifier, value corresponds to the asset transfer amount, and strategy corresponds to the asset receiving strategy.
[0056] based on Figure 2 The described embodiments of this application support setting one or more second objects to receive assets when a first object transfers assets on the blockchain. This is applicable to various scenarios such as distributing asset-based bonuses on the blockchain, enhancing the richness of asset transfers. Simultaneously, the asset transfer process is implemented by asset transfer contracts and asset management contracts, improving the efficiency of asset transfers.
[0057] The following is through Figure 5 The corresponding implementation example illustrates whether the object of the asset transfer contract is qualified to receive the transferred assets. When verifying eligibility, one or more of the following can be verified: object identifier, block height, and target conditions.
[0058] Please see Figure 5 , Figure 5 This is a flowchart illustrating another asset processing method for a blockchain network provided in this application embodiment. The method includes steps S501 to S502, which can be derived from the above... Figure 1 Executed by any of the blockchain nodes shown (e.g., blockchain node 101). Wherein: S501. Obtain the asset acceptance request initiated by the third object based on the asset transfer procedure; the asset acceptance request initiated by the third object contains the object identifier of the third object in the asset transfer procedure.
[0059] Specifically, the asset transfer procedure here can run on a client associated with a third object. When the client associated with the third object runs the asset transfer procedure, it displays information about one or more assets that can be received (or claimed) in the blockchain network at the current moment, as well as a receiving control for whether to receive these assets.
[0060] Optionally, information related to various assets may include one or more of the following: the asset's receiving identifier, the asset's origin, and the number of recipients of the asset. For example, Figure 6 This is a schematic diagram of another client page provided in an embodiment of this application. For example... Figure 6 As shown, this page displays two pending assets on the blockchain network at the current moment. From the information displayed on the page, we know that: Pending asset 1 originates from object A, and the maximum number of objects that can receive Pending asset 1 is 5; the receiving identifier for Pending asset 1 is 12345. Pending asset 2 originates from object B, and the maximum number of objects that can receive Pending asset 2 is 3; the receiving identifier for Pending asset 2 is 67890. If a third object wishes to receive Pending asset 1 transferred from object A, it can operate the receiving control for Pending asset 1 to construct and initiate an asset receiving request based on the receiving identifier "12345".
[0061] The aforementioned asset receiving request constructed based on the receiving identifier can be understood as the asset receiving request containing the receiving identifier or carrying a digital signature encrypted based on the receiving identifier; this application does not impose any restrictions on this. Furthermore, the asset receiving request carries the object identifier of a third object.
[0062] S502. If the object identifiers of N second objects include the object identifier of a third object, then the third object is determined to belong to the N second objects, and the asset transfer contract is invoked to transfer assets to the third object based on the N asset receiving amounts.
[0063] Specifically, from the above Figure 2 As shown in step S203 of the corresponding embodiment, after generating the receiving identifier, the blockchain node can store the receiving identifier in correspondence with the object identifiers of N second objects. Therefore, when the blockchain node receives an asset receiving request initiated by a third object, it can first extract the receiving identifier from the asset receiving request, and then look up the object identifiers of the N second objects corresponding to the receiving identifier. If the object identifiers of the N second objects include the object identifier of the third object (that is, when the third object is any one of the N second objects), then the asset transfer contract can be invoked to transfer the asset corresponding to the third object to the third object.
[0064] It should be noted that the assets corresponding to the third object here can be based on the above. Figure 2 The N asset receiving amounts in the corresponding embodiment are used to determine the asset receiving amount, for example, randomly selecting one asset receiving amount as the asset receiving amount corresponding to the third object. Furthermore, calling the asset transfer contract here to transfer the assets corresponding to the third object to the third object can refer to transferring the assets indicated by the asset receiving amount corresponding to the third object to the on-chain asset address corresponding to the third object.
[0065] Optionally, after the object identifier of the third object is verified as above (i.e., the object identifiers of the N second objects include the object identifier of the third object), this application may further verify other relevant information of the third object based on the block height and target conditions. If the verification is successful, the third object is eligible to receive the asset, and the blockchain node can transfer the asset to the third object; otherwise, the third object is not eligible to receive the asset, and a notification message of failure to receive the asset is sent to the third object. The target conditions here may include the relevant rules set by the first object for the second object to receive the target asset.
[0066] In one possible implementation, any one of the N second objects is represented as the target object; the method further includes: obtaining the block height in the blockchain network at a first moment; the first moment refers to the moment when the receiving identifier is generated; if an asset receiving request initiated by the target object based on the receiving identifier is obtained, then obtaining the block height in the blockchain network at a second moment; the second moment refers to the moment when the asset receiving request initiated by the target object is received; if the difference between the block height at the first moment and the block height at the second moment is within the target range, then invoking the asset transfer contract to transfer assets to the target object based on the N asset receiving amounts.
[0067] Specifically, the target range here indicates the time frame corresponding to a given block height within which the target asset can be received. This target range can include only the lower limit (minimum) and upper limit (maximum), or both. The lower limit indicates that after generating the receive identifier for the target asset, the block height corresponding to the lower limit must be reached before the target asset can be received. The lower limit can be used to delay asset delivery. The upper limit indicates that after generating the receive identifier, the asset receive request must be initiated before the block height corresponding to the lower limit. The lower limit can limit the maximum time for receiving the target asset. Therefore, if the difference in block height between the first and second moments is within the target range, the target object is eligible to receive the target asset; otherwise, the target object is not eligible.
[0068] For example, the target interval is [100, 200], where 100 is the lower limit of the target interval and 200 is the upper limit. If the block height difference between the first and second time points is 120, it indicates that the target object is eligible to receive the asset; if the block height difference between the first and second time points is 80, it indicates that the target object has not yet reached the receiving time when it initiated the asset receiving request, and the target object is not eligible to receive the asset; if the block height difference between the first and second time points is 220, it indicates that the target object has exceeded the receiving time when it initiated the asset receiving request, and the target object is not eligible to receive the asset.
[0069] It should be noted that, without considering the processing latency of blockchain nodes, the "first moment" could also be the moment the asset transfer request initiated by the first object is received, and so on. This application does not impose any restrictions on this. Furthermore, the target range is included in the asset transfer request initiated by the first object. If the asset transfer request does not include the target range, the target asset can be received at any time without block height restrictions, through an asset reception request, until the target asset is completely received.
[0070] Optionally, if there are still unaccepted assets within the target asset after exceeding the upper limit of the target range, this application can also adopt the method of returning the assets to ensure that the unaccepted assets can be managed again by the first object. This optional method specifically includes: obtaining the block height in the blockchain network at a first moment; the first moment refers to the moment when the receiving identifier is generated; obtaining the current block height in the blockchain network; if the difference between the current block height and the block height at the first moment is greater than a difference threshold, then invoking the asset transfer contract to return N unaccepted assets from the target asset to the asset management contract.
[0071] The difference threshold here is also the upper limit of the target range mentioned above. When the difference between the block height at the current moment and the block height at the first moment is greater than the difference threshold, the asset transfer contract will unlock or release the unreceived assets in the target assets and return them to the asset management contract (that is, return them to the first object).
[0072] In practice, this optional method can be triggered in real time, periodically, or each time an asset receiving request is received. If the optional method is triggered in real time, the current time refers to any time after the first time; if the optional method is triggered periodically, the current time refers to the time after the first time at each preset period; if the optional method is triggered each time an asset receiving request is received, the first time is also the aforementioned second time.
[0073] In one possible implementation, any one of the N second objects is represented as the target object; the asset transfer request includes the target conditions for the N second objects to request the transfer of the target asset; the above method further includes: if an asset receiving request initiated by the target object based on the receiving identifier is obtained, and the asset receiving request is detected to meet the target conditions, then the asset transfer contract is invoked to transfer the asset to the target object based on the N asset receiving amounts.
[0074] The target conditions here include, but are not limited to, the target object's behavioral data over a historical period and the target object's object information. For example, the behavioral data here may refer to the total amount of assets transferred from the target object to the first object, the number of transfers, etc., and the object information here may refer to the object's credit rating, asset transfer rating, etc., which are not limited in this application.
[0075] Specifically, if the total amount of assets transferred from the target object to the first object during a historical period reaches a quantity threshold (e.g., the cumulative consumption amount exceeds the threshold), the target object is considered to meet the target condition. Alternatively, if the asset transfers of the target object exceed the level threshold (e.g., the object's consumption level exceeds the threshold), the target object is considered to meet the target condition.
[0076] It should be noted that the above target conditions are included in the asset transfer request. When the target object initiates an asset receiving request, it can include the information that needs to be verified in the target conditions in the asset receiving request, or the blockchain node can obtain the information that needs to be verified in the target conditions on the blockchain network based on the target object's object identifier.
[0077] It should be noted that, in the embodiments of this application, when the asset transfer contract implements the above steps S501 to S502 and the specific implementation thereof, it can be implemented by the asset transfer function defined in the asset transfer contract. The asset transfer function includes one or more fields such as the object identifier of the first object, the object identifiers of multiple second objects, the asset transfer quantity, the asset type identifier, the asset receiving strategy, the target range, and the target conditions.
[0078] based on Figure 5 In the described embodiments, this application supports the verification of the receiving qualifications of the second object based on one or more of the above dimensions (e.g., object identifier, block height, target conditions, etc.) when the first object transfers assets to one or more second objects, which improves the security of asset transfer.
[0079] Based on the above Figure 2 and Figure 5 According to the corresponding embodiments, the complete asset processing flow proposed in this application can be summarized as follows: ① The blockchain node obtains the asset transfer request initiated by the first object. The asset transfer request includes the amount of the target asset that the first object needs to transfer from the blockchain network, the N second objects that will receive the target asset, and the asset receiving strategies of the N second objects for the target asset, where N is a positive integer.
[0080] Among them, the asset acquisition strategy can be Figure 2 The corresponding implementation examples include a random reception strategy or a uniform reception strategy.
[0081] Optionally, the asset transfer request may also include an asset type identifier, which identifies the asset type of the target asset. There may be a correspondence between the asset type and the address where the asset is stored on the blockchain network.
[0082] Optionally, the asset transfer request may also include one or more of the following: object identifier, block height, and target conditions, so that the blockchain node can verify the eligibility of the object (including a second object) to receive the target asset in subsequent processes based on one or more of the following: object identifier, block height, and target conditions.
[0083] ② The blockchain node calls the asset transfer contract to the asset management contract to obtain the target asset of the first object indicated by the asset transfer amount.
[0084] Optionally, when acquiring the target asset, it can be done from the corresponding on-chain asset address based on the above asset type identifier.
[0085] ③ The blockchain node invokes the asset transfer contract to determine the N asset receiving amounts for the target asset for N second objects based on the asset receiving strategy and asset transfer amount.
[0086] ④ The blockchain node generates a receiving identifier and uploads the correspondence between the receiving identifier and the content contained in the asset request to the blockchain (if an asset receiving strategy is included, the N asset receiving quantities corresponding to the N second objects are also uploaded).
[0087] ⑤ The blockchain node receives the asset receiving request initiated by the third party based on the receiving identifier, and verifies the third party's receiving qualification based on the asset receiving request.
[0088] When a blockchain node verifies the eligibility of a third object to receive it, it can first obtain one or more of the following: object identifier, block height, and target conditions, based on the correspondence between the receiving identifier and the content contained in the asset request. Then, it can verify the object identifier, block height, and target conditions in the asset transfer request.
[0089] ⑥ If the verification is successful, the blockchain node will transfer the assets indicated by the asset receiving amount corresponding to the third object to the on-chain asset address of the third object.
[0090] The asset receiving amount corresponding to the third object here refers to the asset receiving amount pre-determined according to the allocation strategy in ③.
[0091] After steps ① to ⑥, assets that have not been received and exceed the upper limit of the target range can be returned to the asset management contract so that the first object can regain control and management of the returned assets.
[0092] The following is through Figure 7 The corresponding embodiments illustrate the complete asset processing process described above. Please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram of an asset processing scenario provided by an embodiment of this application, including steps S701 to S703, which can be achieved by the above... Figure 1 Executed by any of the blockchain nodes shown (e.g., blockchain node 101). Wherein: S701, the sender specifies the transfer of on-chain assets through the asset management contract and the asset transfer contract.
[0093] Step S701 can be achieved by the sender initiating an asset transfer request. This request is constructed through the asset transfer program associated with the sender and sent to the asset transfer contract. For example, the asset transfer request can define fields such as a set of recipient addresses, the quantity of assets to be transferred, the target range for asset reception, target conditions, and asset reception strategy.
[0094] For example, the sender needs to transfer 200 assets. The communication addresses of the recipients who can receive these 200 assets are from 192.168.1.1 to 192.168.1.10, and their historical asset transfer volume with the sender exceeds 1000. For these 10 recipients, the sender defines a random asset receiving strategy, and these 10 recipients can only successfully receive a random number of assets if the block height is within the range of [100, 200].
[0095] Furthermore, upon receiving an asset transfer request containing the aforementioned fields, the asset transfer contract can either escrow or lock the 200 assets obtained from the sender's assets managed by the asset management contract. In practice, the asset transfer contract generates a receiving identifier for the 200 assets to be transferred in the request, and stores the receiving identifier in correspondence with the aforementioned fields and the obtained 200 assets.
[0096] Furthermore, since the asset transfer request defines a random asset receiving strategy, the asset transfer contract, after acquiring these 200 assets, can proceed according to the aforementioned... Figure 4 The corresponding principle determines 10 asset receiving quantities (examples are 10, 5, 5, 20, 10, 18, 12, 10, 5, 5), which are then randomly allocated to various recipients.
[0097] S702, the recipient with communication address 192.168.1.3 receives the allocated assets on the blockchain.
[0098] Step S702 can be implemented by the recipient by initiating an asset receipt request. This asset receipt request is constructed through the asset transfer procedure associated with the recipient and carries the aforementioned receipt identifier or a digital signature encrypted with the aforementioned receipt identifier.
[0099] Furthermore, when the asset transfer contract receives the asset receiving request, it first extracts the receiving identifier and determines the corresponding set of receiving addresses, the amount of assets transferred, the asset receiving block range, the target conditions, and the asset receiving strategy based on the receiving identifier. The asset transfer contract determines that the communication address 192.168.1.3 of the receiving party corresponding to the asset receiving request is one of the addresses in the aforementioned set of receiving addresses 192.168.1.1-192.1681.1.10 (192.168.1.3 is also included in the asset receiving request). At the same time, the asset transfer contract obtains from the blockchain network the block height (70 in the example) corresponding to when the receiving party initiated the asset receiving request, and the amount of assets transferred by the sender in the historical time period (1200 in the example), and determines based on this that the block height corresponding to when the receiving party initiated the asset receiving request is in the block range [0,100], and meets the condition that the historical asset transfer amount exceeds 1000.
[0100] Finally, the asset transfer contract randomly selects one asset receiving volume from the 10 unreceived asset receiving volumes mentioned above as the asset receiving volume corresponding to the recipient with communication address 192.168.1.3 (18 in the example), and sends the release of custody and lock status of the 18 assets to the recipient.
[0101] S703, Assets not fully received beyond block height 100 are returned.
[0102] Specifically, if the asset transfer contract determines that the current block height has exceeded the maximum block height of 100 in the asset receiving block range, then the assets that have not been fully received will be returned to the asset management contract.
[0103] For example, if the block height corresponding to the above-mentioned recipient's asset receiving request is 110, which exceeds 100, and the assets corresponding to 10, 5, and 5 out of the above 10 asset receiving quantities are not received, then these 20 unreceived assets will be returned to the asset management contract.
[0104] It should be noted that step S703 can be triggered at any time, periodically, or after step S702 (i.e., triggered once every time an asset receiving request is received), and this application does not impose any restrictions on this. Furthermore, after step S703 is triggered, the aforementioned receiving identifier and the corresponding relationships between the fields in each asset transfer request are deleted.
[0105] It should be noted that, Figure 7 The corresponding process is merely one example in the above method embodiments. Other possible scenarios can be found in the possible implementations of the above method embodiments, and will not be described further here. Figure 7 The corresponding beneficial effects are the same as those of the above-described method embodiments.
[0106] Please see Figure 8 , Figure 8 This is a schematic diagram of an asset processing device provided in an embodiment of this application. The asset processing device 80 includes an acquisition module 801 and a processing module 802. Wherein: The acquisition module 801 is used to acquire the asset transfer request initiated by the first object. The asset transfer request includes the amount of assets to be transferred by the first object and N second objects for receiving the assets transferred by the first object, where N is a positive integer. The asset transfer request also includes the asset receiving strategies of the N second objects for the assets transferred by the first object. Processing module 802 is used to invoke the asset transfer contract to obtain the target asset of the first object from the asset management contract; the target asset refers to the asset indicated by the asset transfer amount; The processing module 802 is also used to call the asset transfer contract to determine the N asset receiving quantities for the target asset for N second objects based on the asset receiving strategy and the asset transfer quantity.
[0107] The processing module 802 is also used to generate a receiving identifier for the target asset, so that N second objects request to receive the target asset from the asset transfer contract based on the receiving identifier. The asset transfer contract is used to transfer assets to N second objects according to the requests of N second objects and the amount of assets received.
[0108] In one possible implementation, the processing module 802, when determining the N asset receiving quantities for the target asset based on the asset receiving strategy and the asset transfer quantity by invoking the asset transfer contract, specifically includes: N-1 dividing points are randomly determined within the numerical range corresponding to the asset transfer amount; the numerical range consists of the target value and the asset transfer amount, and the target value is less than the asset transfer amount; the asset receiving strategy is a random receiving strategy for the target asset by N second objects. Divide the numerical interval into N sub-intervals based on N-1 dividing points; N asset reception volumes are determined based on N sub-intervals.
[0109] In one possible implementation, any one of the N second objects is represented as the target object; if the acquisition module 801 is further configured to acquire an asset receiving request initiated by the target object based on the receiving identifier, then the processing module 802 is further configured to: select the target asset receiving amount corresponding to the target object from the N asset receiving amounts; and call the asset transfer contract to transfer the asset indicated by the target asset receiving amount in the target assets to the target object.
[0110] In one possible implementation, the processing module 802, when invoking the asset transfer contract to transfer the asset indicated by the target asset receiving amount to the target object, specifically includes: Invoke the asset transfer contract to transfer the assets indicated by the target asset receiving amount in the target asset to the target object's on-chain asset address in the blockchain network.
[0111] In one possible implementation, any one of the N second objects is represented as the target object; the acquisition module 801 is further configured to: acquire the block height of the blockchain network at a first moment; the first moment refers to the moment when the receiving identifier is generated; if an asset receiving request initiated by the target object based on the receiving identifier is acquired, then the block height of the blockchain network at a second moment is acquired; the second moment refers to the moment when the asset receiving request initiated by the target object is received. The processing module 802 is also used to: if the difference between the block height at the first moment and the block height at the second moment is within the target range, then invoke the asset transfer contract to transfer assets to the target object based on N asset receiving amounts.
[0112] In one possible implementation, the acquisition module 801 is further configured to: acquire the block height at a first moment in the blockchain network; the first moment refers to the moment when the receiving identifier is generated; and acquire the current block height in the blockchain network. The processing module 802 is also used to: if the difference between the current block height and the block height at the first moment is greater than the difference threshold, call the asset transfer contract to return the N assets that the second object in the target asset has not received to the asset management contract.
[0113] In one possible implementation, any one of the N second objects is represented as the target object; the asset transfer request includes the target conditions of the N second objects requesting the transfer of the target asset; if the acquisition module 801 is further configured to acquire the asset receiving request initiated by the target object based on the receiving identifier, and detect that the asset receiving request meets the target conditions, then the processing module 802 is further configured to call the asset transfer contract to transfer the asset to the target object based on the N asset receiving amounts.
[0114] In one possible implementation, the N second objects are objects selected by the first object in the asset transfer procedure; the asset transfer request includes object identifiers of the first object and the N second objects in the asset transfer procedure; the processing module 802, when invoking the asset transfer contract to obtain the target asset of the first object from the asset management contract, specifically includes: Extract the object identifier of the first object from the asset transfer request, and obtain the target asset associated with the extracted object identifier from the asset management contract; The acquisition module 801 is also used to: acquire an asset receiving request initiated by a third object based on the asset transfer procedure; the asset receiving request initiated by the third object includes the object identifier of the third object in the asset transfer procedure; The processing module 802 is also used to: if the object identifiers of N second objects contain the object identifiers of a third object, then determine that the third object belongs to the N second objects, and call the asset transfer contract to transfer assets to the third object based on the N asset receiving amounts.
[0115] It should be noted that the functions of each functional module of the asset processing device in this application embodiment can be specifically implemented according to the methods in the above method embodiments. The specific implementation process and beneficial effects can be referred to the relevant descriptions in the above method embodiments, and will not be repeated here.
[0116] Please see Figure 9 , Figure 9 This is a schematic diagram of a computer device provided in an embodiment of this application. The computer device includes a processor 901, a storage device 902, and a network interface 903. The processor 901, storage device 902, and network interface 903 can interact with each other. The storage device 902 may include volatile memory, such as random-access memory (RAM); it may also include non-volatile memory, such as flash memory, solid-state drive (SSD), etc.; or it may include a combination of the above types of memory. The processor 901 may be a central processing unit (CPU), and the storage device 902 is used to store program instructions. The processor 901 can call these program instructions to perform the following operations: Obtain the asset transfer request initiated by the first object; the asset transfer request includes the amount of assets to be transferred by the first object and N second objects for receiving the assets transferred by the first object, where N is a positive integer. The asset transfer request also includes the asset receiving strategies of the N second objects for the assets transferred by the first object. Invoke the asset transfer contract to obtain the target asset of the first object from the asset management contract; the target asset refers to the asset indicated by the asset transfer amount; The asset transfer contract is invoked to determine the N asset receiving quantities for the target asset for N second objects, based on the asset receiving strategy and the asset transfer quantity. Generate a receiving identifier for the target asset, enabling N second objects to request the asset transfer contract to receive the target asset based on the receiving identifier. The asset transfer contract is used to transfer assets to the N second objects according to the requests of the N second objects and the N asset receiving amounts.
[0117] In one possible implementation, when the processor 901 determines the N asset receiving amounts for the target asset based on the asset receiving strategy and the asset transfer amount by invoking the asset transfer contract, it specifically includes: N-1 dividing points are randomly determined within the numerical range corresponding to the asset transfer amount; the numerical range consists of the target value and the asset transfer amount, and the target value is less than the asset transfer amount; the asset receiving strategy is a random receiving strategy for the target asset by N second objects. Divide the numerical interval into N sub-intervals based on N-1 dividing points; N asset reception volumes are determined based on N sub-intervals.
[0118] In one possible implementation, any one of the N second objects is represented as the target object; processor 901 is further configured to: If an asset receiving request initiated by the target object based on the receiving identifier is obtained, the target asset receiving quantity corresponding to the target object is selected from N asset receiving quantities; the asset transfer contract is invoked to transfer the asset indicated by the target asset receiving quantity to the target object.
[0119] In one possible implementation, when the processor 901 invokes the asset transfer contract to transfer the asset indicated by the amount of the target asset received to the target object, it specifically includes: Invoke the asset transfer contract to transfer the assets indicated by the target asset receiving amount in the target asset to the target object's on-chain asset address in the blockchain network.
[0120] In one possible implementation, any one of the N second objects is represented as the target object; the processor 901 is further configured to: obtain the block height in the blockchain network at a first moment; the first moment refers to the moment when the receiving identifier is generated; if an asset receiving request initiated by the target object based on the receiving identifier is obtained, then obtain the block height in the blockchain network at a second moment; the second moment refers to the moment when the asset receiving request initiated by the target object is received. If the difference between the block height at the first moment and the block height at the second moment is within the target range, then the asset transfer contract is invoked to transfer assets to the target object based on N asset receiving amounts.
[0121] In one possible implementation, the processor 901 is further configured to: obtain the block height at a first moment in the blockchain network; the first moment refers to the moment when the receive identifier is generated; and obtain the current block height in the blockchain network. If the difference between the current block height and the block height at the first moment is greater than the difference threshold, the asset transfer contract is invoked to return the N assets that the second object in the target asset has not received to the asset management contract.
[0122] In one possible implementation, any one of the N second objects is represented as the target object; the asset transfer request includes the target condition that the N second objects request the transfer of the target asset; if the processor 901 is further configured to: If an asset receiving request initiated by the target object based on the receiving identifier is obtained, and the asset receiving request is detected to meet the target conditions, then the asset transfer contract is invoked to transfer assets to the target object based on N asset receiving amounts.
[0123] In one possible implementation, the N second objects are objects selected by the first object in the asset transfer procedure; the asset transfer request includes object identifiers of the first object and the N second objects in the asset transfer procedure; the processor 901, when invoking the asset transfer contract to obtain the target asset of the first object from the asset management contract, specifically includes: Extract the object identifier of the first object from the asset transfer request, and obtain the target asset associated with the extracted object identifier from the asset management contract; Processor 901 is also used to: obtain an asset acceptance request initiated by a third object based on an asset transfer procedure; the asset acceptance request initiated by the third object contains the object identifier of the third object in the asset transfer procedure; If the object identifiers of N second objects contain the object identifier of a third object, then the third object is determined to belong to the N second objects, and the asset transfer contract is invoked to transfer assets to the third object based on the N asset receiving amounts.
[0124] It should be noted that the operational functions performed by each processor in the computer device of this application embodiment can be specifically implemented according to the methods in the above method embodiments. The specific implementation process and beneficial effects can be referred to the relevant descriptions in the above method embodiments, and will not be repeated here.
[0125] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium storing a computer program executed by the asset processing device mentioned above. This computer program includes program instructions, which, when executed by a processor, can execute the aforementioned asset processing device. Figure 2 , Figure 5 , Figure 7The methods described in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same methods will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed across multiple locations and interconnected via a communication network. These multiple computer devices distributed across multiple locations and interconnected via a communication network can constitute a blockchain system.
[0126] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned... Figure 2 , Figure 5 , Figure 7 The methods described in the corresponding embodiments are therefore not repeated here.
[0127] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0128] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0129] The methods and related apparatus provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.
[0130] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for asset processing in a blockchain network, characterized in that, The method includes: Obtain an asset transfer request initiated by a first object; the asset transfer request includes the amount of assets to be transferred by the first object and N second objects for receiving the assets transferred by the first object, where N is a positive integer, and the asset transfer request also includes the asset receiving strategies of the N second objects for the assets transferred by the first object; Invoke the asset transfer contract to obtain the target asset of the first object from the asset management contract; the target asset refers to the asset indicated by the asset transfer amount; The asset transfer contract is invoked to determine the N asset receiving amounts for the target asset for the N second objects, based on the asset receiving strategy and the asset transfer amount. A receiving identifier is generated for the target asset, and the N second objects request to receive the target asset from the asset transfer contract based on the receiving identifier. The asset transfer contract is used to transfer assets to the N second objects according to the requests of the N second objects and the N asset receiving amounts.
2. The method according to claim 1, characterized in that, The invocation of the asset transfer contract, based on the asset receiving strategy and the asset transfer amount, determines the N asset receiving amounts for the target asset for the N second objects, including: N-1 dividing points are randomly determined within the numerical range corresponding to the asset transfer amount; the numerical range is composed of the target value and the asset transfer amount, wherein the target value is less than the asset transfer amount; the asset receiving strategy is a random receiving strategy of the N second objects for the target asset. The numerical interval is divided into N sub-intervals based on the N-1 dividing points; The N asset reception volumes are determined based on the N sub-intervals.
3. The method according to claim 1, characterized in that, Any one of the N second objects is represented as the target object; the method further includes: If an asset receiving request initiated by the target object based on the receiving identifier is obtained, then the target asset receiving quantity corresponding to the target object is selected from the N asset receiving quantities; Invoke the asset transfer contract to transfer the assets indicated by the target asset receiving amount from the target assets to the target object.
4. The method according to claim 3, characterized in that, The step of invoking the asset transfer contract to transfer the asset indicated by the target asset receiving amount to the target object includes: The asset transfer contract is invoked to transfer the assets indicated by the target asset receiving amount in the target assets to the on-chain asset address of the target object in the blockchain network.
5. The method according to claim 1, characterized in that, Any one of the N second objects is represented as the target object; the method further includes: Obtain the block height in the blockchain network at the first moment; the first moment refers to the moment when the receiving identifier is generated; If an asset receiving request initiated by the target object based on the receiving identifier is obtained, then the block height at the second moment in the blockchain network is obtained; the second moment refers to the moment when the asset receiving request initiated by the target object is received. If the difference between the block height at the first moment and the block height at the second moment is within the target range, then the asset transfer contract is invoked to transfer assets to the target object based on the N asset receiving amounts.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the block height in the blockchain network at the first moment; the first moment refers to the moment when the receiving identifier is generated; Obtain the current block height in the blockchain network; If the difference between the current block height and the block height at the first moment is greater than the difference threshold, then the asset transfer contract is invoked to return the N unreceived assets of the target assets to the asset management contract.
7. The method according to claim 1, characterized in that, Any one of the N second objects is represented as the target object; the asset transfer request includes the target conditions for the N second objects to request the transfer of the target asset; The method further includes: If an asset receiving request initiated by the target object based on the receiving identifier is obtained, and it is detected that the asset receiving request meets the target condition, then the asset transfer contract is invoked to transfer assets to the target object based on the N asset receiving amounts.
8. The method according to claim 1, characterized in that, The N second objects are objects selected by the first object in the asset transfer procedure; the asset transfer request includes the object identifiers of the first object and the N second objects in the asset transfer procedure; The step of invoking the asset transfer contract to obtain the target asset of the first object from the asset management contract includes: Extract the object identifier of the first object from the asset transfer request, and obtain the target asset associated with the extracted object identifier from the asset management contract; The method further includes: Obtain an asset receiving request initiated by a third object based on the asset transfer procedure; the asset receiving request initiated by the third object includes the object identifier of the third object in the asset transfer procedure; If the object identifiers of the N second objects include the object identifier of the third object, then the third object is determined to belong to the N second objects, and the asset transfer contract is invoked to transfer assets to the third object based on the N asset receiving volumes.
9. An asset processing device, characterized in that, include: The acquisition module is used to acquire asset transfer requests initiated by the first object; The asset transfer request includes the amount of assets transferred by the first object and N second objects for receiving the assets transferred by the first object, where N is a positive integer. The asset transfer request also includes the asset receiving strategies of the N second objects for the assets transferred by the first object. The processing module is used to invoke the asset transfer contract to obtain the target asset of the first object from the asset management contract; the target asset refers to the asset indicated by the asset transfer amount; The processing module is also used to call the asset transfer contract to determine the N asset receiving amounts of the N second objects for the target asset based on the asset receiving strategy and the asset transfer amount; The processing module is further configured to generate a receiving identifier for the target asset, enabling the N second objects to request the asset transfer contract to receive the target asset based on the receiving identifier. The asset transfer contract is configured to transfer assets to the N second objects according to the requests of the N second objects and the amount of assets received.
10. A computer device, characterized in that, The computer device includes a processor, a memory, and a network interface, wherein the processor is connected to the memory and the network interface; the network interface is used to provide network communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs to implement the method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.
12. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the method of any one of claims 1-8.
Citation Information
Patent Citations
Asset transfer method and device, electronic equipment and storage medium
CN111028081A
Transaction processing method, device and apparatus based on block chain
CN111028084A