Method, device and server for transferring virtual assets in a blockchain game
By introducing player agent accounts and player wallet accounts into blockchain games, and determining signature authorization based on game status, the problem of players being unable to immediately use and transfer virtual assets is solved, thus achieving secure transfer of virtual assets and improving the gaming experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2022-12-14
- Publication Date
- 2026-05-01
AI Technical Summary
In blockchain games, new players cannot immediately use the virtual assets transferred by existing players, resulting in a poor gaming experience.
By designing player agent accounts and player wallet accounts, the system receives virtual asset withdrawal requests and determines signature authorization based on the current game status, transferring virtual assets from the player agent account to the player wallet account only upon authorization.
It effectively prevents the transfer of virtual assets currently being used in the game, ensuring that new players can immediately use the transferred virtual assets and improving the gaming experience.
Smart Images

Figure CN115779450B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game technology, and in particular to a method, apparatus and server for transferring virtual assets in blockchain games. Background Technology
[0002] Currently, during the gameplay of blockchain games, virtual assets (such as virtual characters) used in the game can be transferred from the original player to the new player's wallet account by calling contract functions. However, because the original player is already using these virtual assets in the game, although the new player's wallet account now contains the virtual assets, the new player still cannot use them in the game, resulting in a poor gaming experience. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, apparatus and server for transferring virtual assets in blockchain games. During the process of blockchain games, the transfer of virtual assets participating in the blockchain game can be prevented, thereby avoiding the situation where players cannot use virtual assets transferred by other players in the blockchain game, and thus effectively improving the player's gaming experience.
[0004] In a first aspect, embodiments of the present invention provide a method for transferring virtual assets in a blockchain game. The blockchain game deploys player agent accounts and player wallet accounts. The player agent accounts are used to store virtual assets required to participate in the blockchain game. The method includes: receiving a request to extract a first target virtual asset from the virtual assets; determining, based on the current game state of the first target virtual asset, whether to provide a signature authorization corresponding to the first target virtual asset; if so, based on the signature authorization, extracting the first target virtual asset from the player agent account to the player wallet account, so as to provide an asset transfer function for the first target virtual asset in the player wallet account.
[0005] Secondly, embodiments of the present invention also provide a device for transferring virtual assets in a blockchain game. The blockchain game deploys player agent accounts and player wallet accounts. The player agent accounts are used to store virtual assets required to participate in the blockchain game. The device includes: an extraction request receiving module, used to receive an extraction request for a first target virtual asset among the virtual assets; a judgment module, used to determine whether to provide signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset; and an asset extraction module, used to extract the first target virtual asset from the player agent account to the player wallet account based on the signature authorization when the judgment result of the judgment module is yes, so as to provide an asset transfer function for the first target virtual asset in the player wallet account.
[0006] Thirdly, embodiments of the present invention also provide a server, including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method described in any of the first aspects.
[0007] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method described in any of the first aspects.
[0008] This invention provides a method, apparatus, and server for transferring virtual assets in a blockchain game. The blockchain game deploys player agent accounts and player wallet accounts. The player agent accounts are used to store virtual assets required to participate in the blockchain game. If a request to extract a first target virtual asset is received, the system determines whether to provide a signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset. If the determination result is yes, the first target virtual asset is extracted from the player agent account to the player wallet account based on the signature authorization, so as to provide an asset transfer function for the first target virtual asset in the player wallet account. The above method stores the virtual assets required to participate in blockchain games through player agent accounts. Players can only use the virtual assets stored in their player agent accounts to participate in blockchain games. Moreover, when retrieving the first target virtual asset, it is necessary to determine whether to provide signature authorization based on the current game status. Only when signature authorization is available can the first target virtual asset be transferred from the player agent account to the player wallet account. This prevents the transfer of virtual assets that are being used in the blockchain game. When virtual assets that are not being used in the blockchain game are retrieved to the player wallet account, an asset transfer function can be provided in the player wallet account. This avoids situations where players cannot use virtual assets transferred by other players in the blockchain game, thereby effectively improving the player's gaming experience.
[0009] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0010] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0011] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating a method for transferring virtual assets in a blockchain game, provided as an embodiment of the present invention;
[0013] Figure 2 A flowchart illustrating another method for transferring virtual assets in a blockchain game, provided as an embodiment of the present invention;
[0014] Figure 3 A schematic diagram of the structure of a virtual asset transfer device in a blockchain game provided by an embodiment of the present invention;
[0015] Figure 4 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Currently, existing technologies can transfer virtual assets used in blockchain games to other players' wallet accounts, but the transferred virtual assets cannot be used in the blockchain game, resulting in a poor gaming experience. Based on this, the present invention provides a method, device, and server for transferring virtual assets in blockchain games. During the blockchain game, the transfer of virtual assets used in the blockchain game can be prevented, thereby avoiding the situation where players cannot use virtual assets transferred by other players in the blockchain game, and thus effectively improving the player's gaming experience.
[0018] To facilitate understanding of this embodiment, a method for transferring virtual assets in a blockchain game, as disclosed in this embodiment, will first be described in detail. The blockchain game deploys player agent accounts and player wallet accounts. The player agent account is used to store the virtual assets required to participate in the blockchain game. Virtual assets include virtual characters and other game assets, such as virtual equipment and virtual items. (See [link to relevant documentation]). Figure 1 The diagram shows a flowchart of a method for transferring virtual assets in a blockchain game. The method mainly includes the following steps S102 to S106:
[0019] Step S102: Receive a withdrawal request for a first target virtual asset among the virtual assets. The first target virtual asset is the virtual asset to be withdrawn from the player's agent account to the player's wallet account. The withdrawal request may carry the asset identifier of the virtual asset to be withdrawn, in order to identify the first target virtual asset from the virtual assets stored in the player's agent account. The withdrawal request instructs the withdrawal of the first target virtual asset from the player's agent account to the player's wallet account. The player's wallet account is used to provide asset transfer functionality for players, which involves transferring virtual assets from one player's wallet account to another.
[0020] In practical applications, players can only participate in blockchain games using the virtual assets stored in their player agent accounts. The terminal's graphical user interface can display the virtual assets that players own in the blockchain game, as well as their corresponding operation controls (such as extraction controls). When the terminal responds to a trigger operation for the extraction control, it can generate an extraction request for the corresponding virtual asset. The blockchain game backend (i.e., the server) will receive the extraction request sent by the terminal.
[0021] Step S104: Based on the current game state of the first target virtual asset, determine whether to provide signature authorization corresponding to the first target virtual asset. The current game state indicates whether the player is using the first target virtual asset to participate in the blockchain game, and the signature authorization grants the player the permission to withdraw the first target virtual asset. In one implementation, if the current game state indicates that the player is using the first target virtual asset to participate in the blockchain game, then it is determined that signature authorization will not be provided to the player's terminal; if the current game state indicates that the player is not using the first target virtual asset to participate in the blockchain game, then it is determined that signature authorization will be provided to the player's terminal.
[0022] Step S106: If yes, based on signature authorization, the first target virtual asset is extracted from the player's agent account to the player's wallet account to provide asset transfer functionality for the first target virtual asset within the player's wallet account. The signature authorization includes random number constraints and / or time constraints, which are used to prevent replay attacks. In one implementation, the validity of the signature authorization can be determined based on the random number constraints and time constraints. If the signature authorization is valid, the first target virtual asset is extracted from the player's agent account to the player's wallet account. The player can then transfer the first target virtual asset from their player wallet account to another player's player wallet account, thereby realizing the virtual asset transaction.
[0023] The method for transferring virtual assets in blockchain games provided in this invention involves storing the virtual assets required for participating in the blockchain game through a player agent account. Players can only use the virtual assets stored in the player agent account to participate in the blockchain game. Moreover, when extracting the first target virtual asset, it is necessary to determine whether to provide signature authorization based on its current game status. Only when signature authorization is available can the first target virtual asset be transferred from the player agent account to the player wallet account. This prevents the transfer of virtual assets that are currently being used in the blockchain game. When virtual assets that are not being used in the blockchain game are extracted to the player wallet account, an asset transfer function can be provided in the player wallet account, thereby avoiding situations where players cannot use virtual assets transferred by other players in the blockchain game, and thus effectively improving the player's gaming experience.
[0024] In practical applications, upon receiving a contract deployment request, a holder contract (i.e., a Holder contract) corresponding to each player is deployed in the blockchain game, and this holder contract serves as the player's agent account. In one implementation, a Holder contract is deployed on the blockchain for each player, acting as their agent account in the blockchain game. Optionally, the project team can guide users to trigger transactions at a specific entry point in the blockchain game and deploy the Holder contract within the transaction; alternatively, the game developer can deploy the Holder contract for each player after registration.
[0025] In one implementation, a transfer request for a second target virtual asset in a player's wallet account can be received, and the second target virtual asset can be transferred from the player's wallet account to the player's agent account. The second target virtual asset is the virtual asset to be transferred from the player's wallet account to the player's agent account. In practical applications, virtual assets acquired by players through purchases, gifts, etc., are stored in the player's wallet account. If a player needs to use this virtual asset to participate in a blockchain game, they must transfer it from their wallet account to their agent account before using it in the game. Specifically, the graphical user interface of the terminal can display the virtual assets stored in the player's wallet account, respond to a selection operation to determine the second target virtual asset, and then respond to a transfer operation for that second target virtual asset, generating a corresponding transfer request. The blockchain game backend will receive the transfer request. Since the player's agent account is a regular address, the second target virtual asset can be directly transferred to that address within an NFT (Non-Fungible Token) contract, thus completing the asset transfer operation.
[0026] In one implementation, before the blockchain game begins, it is necessary to check whether the player's agent account contains virtual assets that meet the requirements. The player can only participate in the game if the player's agent account contains virtual assets that meet the requirements. For specific implementation, see (1) to (3) below:
[0027] (1) Receive a participation request for a blockchain game. The participation request carries a player identifier, which can be a game ID (Identity document), account, password, etc. For example, the participation request can be received when the player performs the operation of logging into the blockchain game, or when the player clicks to enter a game match. (2) Detect whether the player agent account corresponding to the player identifier contains virtual resources of the blockchain game. (3) If so, determine that the participation conditions of the blockchain game are met, and participate in the blockchain game based on the virtual resources stored in the player agent account, wherein the participation condition is that the player agent account contains virtual resources of the blockchain game.
[0028] Based on the foregoing embodiments, this embodiment of the invention further provides an implementation of step S104. When executing the step of determining whether to provide a signature authorization corresponding to the first target virtual asset based on its current game state, it can be determined whether the current game state of the first target virtual asset is "in progress"; if so, providing a signature authorization corresponding to the first target virtual asset is prohibited; if not, providing a signature authorization corresponding to the first target virtual asset is allowed. The signature authorization includes a nonce constraint and / or a time constraint. The nonce constraint is used to prevent the same random value from being used multiple times, and the time constraint is used to limit the extraction time. In specific implementation, if it is determined that the current game state of the first target virtual asset is "in progress," meaning the player is using the first target virtual asset to participate in a battle or competition, the player will be prohibited from extracting the first target virtual asset, and therefore no signature authorization will be provided to the player; otherwise, the player will be allowed to extract the first target virtual asset, and a signature authorization will be provided to the player.
[0029] After allowing the provision of signature authorization corresponding to the first target virtual asset, this embodiment of the invention also provides an implementation method for generating signature authorization corresponding to the first target virtual asset. This method involves obtaining a random value from the holder contract and generating a random number constraint based on the random value, as well as obtaining a time value from the holder contract and generating a time constraint based on the time value. Finally, the signature authorization corresponding to the first target virtual asset is generated based on the random number constraint and / or the time constraint. In practical applications, the signature authorization should include a nonce value and a time value obtained from the Holder contract, thereby generating the signature authorization based on the nonce value and the time value. By setting a nonce constraint in the signature authorization, the signature authorization can be used only once, thus preventing replay attacks. Furthermore, by setting a time constraint in the signature authorization, players can be prevented from exceeding the time limit for withdrawing the first target virtual asset, thereby further improving the security of asset withdrawal.
[0030] Based on the signature authorization provided in the foregoing embodiments, this embodiment of the invention also provides an implementation of step S106. When performing the step of extracting the first target virtual asset from the player agent account to the player wallet account based on signature authorization, the following steps 1 to 3 can be referred to:
[0031] Step 1: Call the preset contract function to verify the validity of the signature authorization. In the specific implementation, if the random number constraint's random value is marked as used, or if the current time carried in the extraction request exceeds the time constraint's time value, the validity verification fails. If the random number constraint's random value is not marked as used, and if the current time carried in the extraction request does not exceed the time constraint's time value, the validity verification passes. In practical applications, if the nonce value has already been obtained once in the Holder contract, the nonce value will be modified (e.g., +1), effectively marking the original nonce value as used, so that subsequent verification attempts using the nonce value will fail. If the nonce value has not been obtained in the Holder contract, i.e., this is the player's first verification attempt using the nonce value, verification will succeed. Furthermore, if the current time exceeds the time constraint's time value, verification will also fail; conversely, if the current time does not exceed the time constraint's time value, verification will succeed.
[0032] Step 2: If the legality verification fails, the withdrawal of the first target virtual asset from the player agent account to the player wallet account is prohibited.
[0033] Step 3: If the legality verification passes, the first target virtual asset will be transferred from the player's agent account to the player's wallet account. In practice, the asset withdrawal operation is also implemented by the player by calling a contract function. When calling the contract function, the parameters passed include the game's private key signature (i.e., the aforementioned signature authorization). Calling the contract initiates a transaction.
[0034] To facilitate understanding of the above embodiments, this invention also provides an application example of a method for transferring virtual assets in a blockchain game, taking a virtual character as an example. (See attached image.) Figure 2 The diagram shows another method for transferring virtual assets in a blockchain game, which includes the following steps S202 to S206:
[0035] Step S202: Deploy a player agent account for each player.
[0036] Step S204: Transfer the virtual character stored in the player's wallet account to the player's agent account.
[0037] Step S206: If the virtual character is not currently participating in the game, provide a signature authorization and, if the signature authorization is valid, transfer the virtual character from the player agent account to the player wallet account.
[0038] The method for transferring virtual assets in a blockchain game provided in this embodiment of the invention requires player A to stop playing the game before withdrawing the virtual character from player agent account A1 to player wallet account A2. Then, the virtual character is transferred from player wallet A2 to another player B's player wallet account B2. This player then transfers the virtual character from player wallet account B2 to their player agent account B1, and can immediately use the virtual character to participate in the game. This embodiment of the invention effectively improves the player's gaming experience by restricting the transfer of virtual characters to other players during the game and allowing players to immediately use the transferred virtual characters.
[0039] Regarding the method for transferring virtual assets in blockchain games provided in the foregoing embodiments, this invention provides a device for transferring virtual assets in blockchain games. The blockchain game deploys player agent accounts and player wallet accounts. The player agent accounts are used to store the virtual assets required to participate in the blockchain game. See [link to documentation]. Figure 3 The diagram shows the structure of a virtual asset transfer device in a blockchain game. The device mainly includes the following parts:
[0040] Extraction request receiving module 302 is used to receive extraction requests for the first target virtual asset in the virtual assets;
[0041] The judgment module 304 is used to determine whether to provide a signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset.
[0042] The asset extraction module 306 is used to extract the first target virtual asset from the player agent account to the player wallet account based on signature authorization when the judgment result of the judgment module is yes, so as to provide asset transfer function for the first target virtual asset in the player wallet account.
[0043] The virtual asset transfer device for blockchain games provided in this invention stores the virtual assets required for participating in the blockchain game through a player agent account. Players can only use the virtual assets stored in the player agent account to participate in the blockchain game. Moreover, when extracting the first target virtual asset, it is necessary to determine whether to provide signature authorization based on its current game status. Only when signature authorization is available can the first target virtual asset be transferred from the player agent account to the player wallet account. This prevents the transfer of virtual assets that are currently being used in the blockchain game. When virtual assets that are not being used in the blockchain game are extracted to the player wallet account, an asset transfer function can be provided in the player wallet account, thereby avoiding situations where players cannot use virtual assets transferred by other players in the blockchain game, and thus effectively improving the player's gaming experience.
[0044] In one implementation, the judgment module 304 is further configured to: determine whether the current game state of the first target virtual asset is in progress; if so, prohibit providing signature authorization corresponding to the first target virtual asset; if not, allow providing signature authorization corresponding to the first target virtual asset.
[0045] In one implementation, signature authorization includes random number constraints and / or time constraints.
[0046] In one embodiment, the above-mentioned device further includes an account deployment module, configured to: if a contract deployment request is received, deploy a holder contract corresponding to each player in the blockchain game, and use the holder contract as the player's corresponding player agent account.
[0047] In one embodiment, the above-mentioned apparatus further includes a signature generation module, configured to: obtain a random value from the holder contract and generate a random number constraint based on the random value; obtain a time value from the holder contract and generate a time constraint based on the time value; and generate a signature authorization corresponding to the first target virtual asset based on the random number constraint and / or the time constraint.
[0048] In one implementation, the asset extraction module 306 is further configured to: call a preset contract function to verify the legality of the signature authorization; if the legality verification fails, prohibit the extraction of the first target virtual asset from the player agent account to the player wallet account; if the legality verification passes, determine that the first target virtual asset will be extracted from the player agent account to the player wallet account.
[0049] In one implementation, the asset extraction module 306 is further configured to: determine that the legality verification fails if the random value of the random number constraint is marked as used, or if the current time carried in the extraction request exceeds the time value of the time constraint; and determine that the legality verification passes if the random value of the random number constraint is not marked as used, and if the current time carried in the extraction request does not exceed the time value of the time constraint.
[0050] In one embodiment, the above-mentioned device further includes a game participation module, configured to: receive a participation request for a blockchain game; wherein the participation request carries a player identifier; detect whether the player agent account corresponding to the player identifier contains virtual resources of the blockchain game; if so, determine that the participation conditions of the blockchain game are met, and participate in the blockchain game based on the virtual resources stored in the player agent account.
[0051] In one embodiment, the device further includes an asset transfer module, configured to: receive a transfer request for a second target virtual asset in a player's wallet account; and transfer the second target virtual asset from the player's wallet account to the player's agent account.
[0052] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0053] This invention provides a server, specifically, the server includes a processor and a storage device; the storage device stores a computer program, which is executed by the processor when it runs:
[0054] A method for transferring virtual assets in a blockchain game, wherein the blockchain game deploys player agent accounts and player wallet accounts, the player agent accounts are used to store virtual assets required to participate in the blockchain game, the method includes: receiving a request to extract a first target virtual asset; determining whether to provide signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset; if so, extracting the first target virtual asset from the player agent account to the player wallet account based on the signature authorization, so as to provide asset transfer function for the first target virtual asset in the player wallet account.
[0055] In one implementation, the step of determining whether to provide signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset includes: determining whether the current game state of the first target virtual asset is in progress; if so, prohibiting the provision of signature authorization corresponding to the first target virtual asset; if not, allowing the provision of signature authorization corresponding to the first target virtual asset.
[0056] In one implementation, signature authorization includes random number constraints and / or time constraints.
[0057] In one implementation, the method includes: if a contract deployment request is received, deploying a holder contract corresponding to each player in the blockchain game, and using the holder contract as the player's corresponding player agent account.
[0058] In one implementation, after the step of allowing the provision of signature authorization corresponding to the first target virtual asset, the method further includes: obtaining a random value from the holder contract and generating a random number constraint based on the random value; obtaining a time value from the holder contract and generating a time constraint based on the time value; and generating a signature authorization corresponding to the first target virtual asset based on the random number constraint and / or the time constraint.
[0059] In one implementation, the step of extracting a first target virtual asset from a player agent account to a player wallet account based on signature authorization includes: calling a preset contract function to verify the legality of the signature authorization; if the legality verification fails, prohibiting the extraction of the first target virtual asset from the player agent account to the player wallet account; and if the legality verification passes, confirming the extraction of the first target virtual asset from the player agent account to the player wallet account.
[0060] In one implementation, the step of validating the signature authorization includes: determining that the validity verification fails if the random value of the random number constraint is marked as used, or if the current time carried in the extraction request exceeds the time value of the time constraint; and determining that the validity verification passes if the random value of the random number constraint is not marked as used, and if the current time carried in the extraction request does not exceed the time value of the time constraint.
[0061] In one implementation, the method further includes: receiving a participation request for a blockchain game; wherein the participation request carries a player identifier; detecting whether the player agent account corresponding to the player identifier contains virtual resources of the blockchain game; if so, determining that the participation conditions of the blockchain game are met, and participating in the blockchain game based on the virtual resources stored in the player agent account.
[0062] In one implementation, the method further includes: receiving a transfer request for a second target virtual asset in a player's wallet account; and transferring the second target virtual asset from the player's wallet account to the player's agent account.
[0063] The server provided in this embodiment of the invention stores virtual assets required for participating in blockchain games through player agent accounts. Players can only use the virtual assets stored in their player agent accounts to participate in blockchain games. Moreover, when retrieving the first target virtual asset, it is necessary to determine whether to provide signature authorization based on the current game status. Only when signature authorization is available can the first target virtual asset be transferred from the player agent account to the player wallet account. This prevents the transfer of virtual assets that are currently being used in the blockchain game. When virtual assets that are not being used in the blockchain game are retrieved to the player wallet account, an asset transfer function can be provided in the player wallet account. This avoids situations where players cannot use virtual assets transferred by other players in the blockchain game, thereby effectively improving the player's gaming experience.
[0064] Figure 4 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention. The server 100 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43. The processor 40, the communication interface 43 and the memory 41 are connected through the bus 42. The processor 40 is used to execute executable modules, such as computer programs, stored in the memory 41.
[0065] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0066] Bus 42 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0067] The memory 41 is used to store programs. After receiving an execution instruction, the processor 40 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 40 or implemented by the processor 40.
[0068] Processor 40 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 40 or by instructions in software form. Processor 40 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 41. The processor 40 reads the information in memory 41 and, in conjunction with its hardware, completes the steps of the above method.
[0069] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code, wherein the program code includes instructions that can be executed:
[0070] A method for transferring virtual assets in a blockchain game, wherein the blockchain game deploys player agent accounts and player wallet accounts, and the participation condition of the blockchain game includes at least that the player agent account stores virtual assets of the blockchain game, the method comprising: receiving a request to extract a first target virtual asset; determining whether to provide a signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset; if so, extracting the first target virtual asset from the player agent account to the player wallet account based on the signature authorization, so as to provide an asset transfer function for the first target virtual asset in the player wallet account.
[0071] In one implementation, the step of determining whether to provide signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset includes: determining whether the current game state of the first target virtual asset is in progress; if so, prohibiting the provision of signature authorization corresponding to the first target virtual asset; if not, allowing the provision of signature authorization corresponding to the first target virtual asset.
[0072] In one implementation, signature authorization includes random number constraints and / or time constraints.
[0073] In one implementation, the method includes: if a contract deployment request is received, deploying a holder contract corresponding to each player in the blockchain game, and using the holder contract as the player's corresponding player agent account.
[0074] In one implementation, after the step of allowing the provision of signature authorization corresponding to the first target virtual asset, the method further includes: obtaining a random value from the holder contract and generating a random number constraint based on the random value; obtaining a time value from the holder contract and generating a time constraint based on the time value; and generating a signature authorization corresponding to the first target virtual asset based on the random number constraint and / or the time constraint.
[0075] In one implementation, the step of extracting a first target virtual asset from a player agent account to a player wallet account based on signature authorization includes: calling a preset contract function to verify the legality of the signature authorization; if the legality verification fails, prohibiting the extraction of the first target virtual asset from the player agent account to the player wallet account; and if the legality verification passes, confirming the extraction of the first target virtual asset from the player agent account to the player wallet account.
[0076] In one implementation, the step of validating the signature authorization includes: determining that the validity verification fails if the random value of the random number constraint is marked as used, or if the current time carried in the extraction request exceeds the time value of the time constraint; and determining that the validity verification passes if the random value of the random number constraint is not marked as used, and if the current time carried in the extraction request does not exceed the time value of the time constraint.
[0077] In one implementation, the method further includes: receiving a participation request for a blockchain game; wherein the participation request carries a player identifier; detecting whether the player agent account corresponding to the player identifier contains virtual resources of the blockchain game; if so, determining that the participation conditions of the blockchain game are met, and participating in the blockchain game based on the virtual resources stored in the player agent account.
[0078] In one implementation, the method further includes: receiving a transfer request for a second target virtual asset in a player's wallet account; and transferring the second target virtual asset from the player's wallet account to the player's agent account.
[0079] The readable storage medium provided in this invention stores virtual assets required for participating in blockchain games through player agent accounts. Players can only use the virtual assets stored in their player agent accounts to participate in blockchain games. Moreover, when retrieving the first target virtual asset, it is necessary to determine whether to provide signature authorization based on its current game status. Only when signature authorization is available can the first target virtual asset be transferred from the player agent account to the player wallet account. This prevents the transfer of virtual assets that are currently being used in the blockchain game. When virtual assets that are not being used in the blockchain game are retrieved to the player wallet account, an asset transfer function can be provided in the player wallet account. This avoids situations where players cannot use virtual assets transferred by other players in the blockchain game, thereby effectively improving the player's gaming experience.
[0080] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM, read-only disk), and various other media capable of storing program code.
[0081] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for transferring virtual assets in a blockchain game, characterized in that, The blockchain game deploys player agent accounts and player wallet accounts. The player agent accounts are used to store virtual assets required to participate in the blockchain game. A holder contract serves as the player agent account corresponding to each player. Players can only use the virtual assets stored in their player agent accounts to participate in the blockchain game. The method includes: Receive a request to extract the first target virtual asset from the virtual assets; Based on the current game state of the first target virtual asset, determine whether to provide a signature authorization corresponding to the first target virtual asset; If so, based on the signature authorization, the first target virtual asset is extracted from the player agent account to the player wallet account, so as to provide asset transfer function for the first target virtual asset in the player wallet account; The method further includes: receiving a transfer request for a second target virtual asset in the player's wallet account; and transferring the second target virtual asset from the player's wallet account to the player's agent account.
2. The method according to claim 1, characterized in that, The step of determining whether to provide signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset includes: Determine whether the current game state of the first target virtual asset is in progress; If so, providing signature authorization corresponding to the first target virtual asset is prohibited; If not, the signature authorization corresponding to the first target virtual asset is permitted.
3. The method according to claim 1, characterized in that, The signature authorization includes random number constraints and / or time constraints.
4. The method according to any one of claims 1-3, characterized in that, The method includes: If a contract deployment request is received, deploy the holder contract corresponding to each player in the blockchain game, and use the holder contract as the player agent account corresponding to the player.
5. The method according to claim 4, characterized in that, After the step of allowing the provision of the signature authorization corresponding to the first target virtual asset, the method further includes: Obtain a random value from the holder contract and generate a random number constraint based on the random value; and obtain a time value from the holder contract and generate a time constraint based on the time value. Generate a signature authorization corresponding to the first target virtual asset based on the random number constraint and / or the time constraint.
6. The method according to claim 5, characterized in that, Based on the signature authorization, the step of retrieving the first target virtual asset from the player agent account to the player wallet account includes: Invoke a preset contract function to verify the validity of the signature authorization; If the legality verification fails, the first target virtual asset is prohibited from being withdrawn from the player agent account to the player wallet account; If the legality verification is successful, the first target virtual asset will be transferred from the player agent account to the player wallet account.
7. The method according to claim 6, characterized in that, The step of verifying the legitimacy of the signature authorization includes: If the random number constraint is marked as used, or if the current time carried by the extraction request exceeds the time value of the time constraint, the validity verification is determined to have failed. If the random value of the random number constraint is not marked as used, and if the current time carried in the extraction request does not exceed the time value of the time constraint, the validity verification is deemed to have passed.
8. The method according to claim 1, characterized in that, The method further includes: Receive a participation request for the blockchain game; wherein the participation request carries a player identifier; Detect whether the player agent account corresponding to the player identifier contains virtual resources of the blockchain game; If so, determine that the participation conditions of the blockchain game are met, and participate in the blockchain game based on the virtual resources stored in the player agent account.
9. A device for transferring virtual assets in a blockchain game, characterized in that, The blockchain game deploys player agent accounts and player wallet accounts. The player agent account is used to store virtual assets required to participate in the blockchain game. The player agent account is a holder contract corresponding to the player. The player can only use the virtual assets stored in the player agent account to participate in the blockchain game. The device includes: Extraction request receiving module, used to receive extraction requests for the first target virtual asset among the virtual assets; The judgment module is used to determine whether to provide a signature authorization corresponding to the first target virtual asset based on the current game state of the first target virtual asset. The asset extraction module is used to extract the first target virtual asset from the player agent account to the player wallet account based on the signature authorization when the judgment result of the judgment module is yes, so as to provide an asset transfer function for the first target virtual asset in the player wallet account; The asset extraction module is also used to: receive a transfer request for a second target virtual asset in the player's wallet account; and transfer the second target virtual asset from the player's wallet account to the player's agent account.
10. A server, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Virtual pet commodity transaction method, system, device and storage medium
CN110428307A
Identity management, smart contract generator, and blockchain mediating system, and related methods
US20220084013A1