Blockchain game control method and device, server, and storage medium
By receiving lock requests and executing lock operations with feedback signature information in blockchain games, the problem of users being unable to immediately use transferred NFT characters is solved, timely synchronization of attribute values is achieved, user experience is improved, and the healthy development of blockchain games is promoted.
Patent Information
- Application Number
- CN202211623696.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-12-16
AI Technical Summary
In competitive blockchain games, the recipient cannot immediately use an NFT character after the user transfers it, resulting in a poor user experience. Furthermore, changes in the attribute values of NFT characters in the game cannot be synchronized to the blockchain in a timely manner.
By receiving a lock request from the terminal, the system sends back signature information to perform the lock operation, preventing the transfer of virtual characters. After the lock operation is completed, the game is started, attribute value changes are monitored, and the data is synchronized to the blockchain when the game ends.
This effectively reduces the number of times virtual characters become unusable during competitions, improves the user experience, and promptly synchronizes changes in game attribute values, thus promoting the healthy development of blockchain games.
Smart Images

Figure CN115779404B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of games, and in particular to a blockchain game control method and device, a server and a storage medium. BACKGROUND
[0002] At present, in a blockchain game of a battle type, a user can transfer an NFT (Non-Fungible Token) character in a competition to another user during game playing, but the user receiving the transferred NFT character cannot immediately use the NFT character to participate in the game, resulting in poor user experience. SUMMARY
[0003] Therefore, the present application aims to provide a blockchain game control method and device, a server and a storage medium, which can prohibit the transfer of a virtual character during game playing, thereby effectively reducing the situation that a user receiving a virtual character cannot immediately use the virtual character due to the transfer of the virtual character during a competition, and thus significantly improving the user's game experience.
[0004] In a first aspect, an embodiment of the present application provides a blockchain game control method, comprising: receiving a locking request of a terminal for a virtual character in a blockchain game; feeding back first signature information to the terminal, so that the terminal performs a locking operation on the virtual character based on the first signature information; wherein the locking operation is used to prohibit a transfer operation for the virtual character; and if it is monitored that the locking operation is completed, determining to start the blockchain game.
[0005] In a second aspect, an embodiment of the present application further provides a blockchain game control device, comprising: a request receiving module configured to receive a locking request of a terminal for a virtual character in a blockchain game; a locking module configured to feed back first signature information to the terminal, so that the terminal performs a locking operation on the virtual character based on the first signature information; wherein the locking operation is used to prohibit a transfer operation for the virtual character; and a game starting module configured to, if it is monitored that the locking operation is completed, determine to start the blockchain game.
[0006] In a third aspect, an embodiment of the present application further provides a server, comprising a processor and a memory, wherein the memory stores computer executable instructions capable of being executed by the processor, and the processor executes the computer executable instructions to implement the method of any one of the first aspect.
[0007] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions, when invoked and executed by a processor, cause the processor to implement the method according to any one of the first aspect.
[0008] The method, device, server and storage medium provided by the embodiments of the present application can receive a locking request for a virtual role in a blockchain game from a terminal, feed back first signature information to the terminal, and make the terminal execute a locking operation on the virtual role based on the first signature information, so as to prohibit a transfer operation on the virtual role. If it is detected that the locking operation is completed, the blockchain game can be started. The above method needs to feed back the first signature information to the terminal according to the received locking request before the game is started, so that the terminal executes the locking operation of prohibiting the transfer of the virtual role based on the first signature information, and the blockchain game is started after it is determined that the locking operation is completed. Therefore, the transfer of the virtual role can be prohibited during the game, and the situation that a user who receives the virtual role cannot use the virtual role immediately due to the transfer of the virtual role during the participation process can be effectively reduced, thereby significantly improving the game experience of the user.
[0009] Other features and advantages of the present application will be set forth in the descriptions below, and in part will become apparent to those skilled in the art upon examination of the following or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and attained by the structure particularly pointed out in the description, claims and drawings.
[0010] In order to make the above-mentioned objects, features and advantages of the present application more apparent, the following will specifically describe preferred embodiments, and the accompanying drawings will be described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0012] Figure 1 A flowchart of a blockchain game control method provided by the embodiments of the present application is shown in the figure;
[0013] Figure 2 A timing diagram of a blockchain game control method provided by the embodiments of the present application is shown in the figure;
[0014] Figure 3A structural schematic diagram of a control device of a blockchain game provided by an embodiment of the present application is shown in FIG. 1.
[0015] Figure 4 A structural schematic diagram of a server provided by an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the embodiments. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of the present application.
[0017] At present, there are two significant problems in the war-type blockchain game: (1) during the game, the NFT character participating in the game can be transferred to other users; (2) if the attribute value of the NFT character changes due to the game, the user cannot synchronize the change of the attribute value to the blockchain in time, and only the game background can chain the change of the attribute value and pay the relevant fee, which will be not conducive to the benign development of the blockchain game. Based on this, the present application provides a control method, device, server, and storage medium for a blockchain game, which can prohibit the transfer of virtual characters during the game, thereby effectively reducing the situation that the user receiving the virtual character cannot use the virtual character immediately due to the transfer of the virtual character during the game, and further significantly improving the user's game experience.
[0018] To facilitate the understanding of the present embodiment, first, a control method for a blockchain game disclosed by the present embodiment will be described in detail, referring to a flowchart of a control method for a blockchain game shown in FIG. 2. The method mainly includes the following steps S102 to S106: Figure 1
[0019] Step S102, receiving a locking request of a terminal for a virtual character in a blockchain game. The virtual character (i.e., NFT character) can be a token of a blockchain contract applied by the blockchain game. The token is a numerical value in the blockchain contract, and the token includes an owner corresponding to the token and an object represented by the token in the blockchain contract, such as a virtual character being a token of an ERC721 contract or a virtual character being a token of an ERC1155 contract. The locking request is used to request the first signature information required for the locking operation.
[0020] In an implementation, when receiving a game starting request of a user, it can be detected whether the virtual character is in a locked state, and if not, a prompt information is sent to the terminal to prompt the user to perform a locking operation on the virtual character, and the user is guided to operate the terminal to make the terminal generate a locking request, so as to receive the locking request sent by the terminal.
[0021] In step S104, the first signature information is fed back to the terminal, so that the terminal performs a locking operation on the virtual character based on the first signature information. The locking operation is used to prohibit a transfer operation on the virtual character, and the transfer operation is to transfer the virtual character from an account of a current user to an account of another user. The first signature information is obtained by signing a token value corresponding to the virtual character (i.e., a token value), a first random value obtained from a blockchain contract, and a value of a lock marker of the virtual character. The value of the lock marker is used to indicate whether the virtual character can be transferred. The first marker value indicates that the virtual character can be transferred, and the second marker value indicates that the virtual character cannot be transferred.
[0022] In an implementation, the token value, the first random value, and the value of the lock marker can be signed based on a private key of the user to obtain the first signature information. The first signature information is sent to the terminal. The user can operate the terminal to initiate a first lock marker modification transaction to modify the value of the lock marker in the blockchain contract from the first marker value to the second marker value, i.e., to set the virtual character to a state in which it cannot be transferred (referred to as a locked state), so as to complete the locking operation.
[0023] In step S106, if it is detected that the locking operation is completed, it is determined that the blockchain game is started. In an implementation, after the value of the lock marker in the blockchain contract is modified to the second marker value, it is determined that the locking operation is completed, and then it is determined that the blockchain game is started.
[0024] The control method of the blockchain game provided by the embodiments of the present application needs to feed back the first signature information to the terminal according to the received locking request before starting the game, so that the terminal performs the locking operation of prohibiting the transfer of the virtual character based on the first signature information, and the blockchain game is started after it is determined that the locking operation is completed. Therefore, the transfer of the virtual character can be prohibited during the game, which effectively reduces the situation that the user receiving the virtual character cannot use the virtual character immediately due to the transfer of the virtual character during the game process, and thus the game experience of the user is significantly improved.
[0025] In an embodiment, an airlock mark (also referred to as an airlock tag) corresponding to the virtual role is added to a blockchain contract applied by the blockchain game. For example, an airlock tag is added to a token of an ERC721 contract. If the value of the airlock tag is a second tag value (such as true or 1), a transfer operation on the token is prohibited. If the value of the airlock tag is a first tag value (such as false or 0), a transfer operation on the token is allowed.
[0026] On this basis, an embodiment of the present application provides an embodiment of generating first signature information. A first random value corresponding to the virtual role is read from a blockchain contract. A token value corresponding to the virtual role, the first random value, and a first tag value of a lock tag are signed based on a private key carried in a lock request to obtain the first signature information. The first tag value is used to allow a transfer operation on the virtual role. In an embodiment, when receiving the lock request, a game backend (also referred to as a server) reads a current nonce value of an airlock tag corresponding to a token in the blockchain contract. The current nonce value is the first random value. Then, a signature is generated using the private key. The signed content includes a token value (also referred to as the token value), a current value of the airlock tag corresponding to the token (the first tag value), and a current nonce value of the airlock tag corresponding to the token (the first random value). Thus, the first signature information is obtained.
[0027] After the first signature information is generated, the first signature information can be sent to the terminal to enable the terminal to perform a locking operation on the virtual character based on the first signature information. Specifically, the terminal can initiate a first lock marker modification transaction based on the first signature information to perform a locking operation on the virtual character using the first lock marker modification transaction. The first lock marker modification transaction is used to verify the first signature information, modify the first random number value, and modify the lock marker from the first marker value to the second marker value. The second marker value is used to prohibit a transfer operation on the virtual character. In a specific implementation, the player can operate the terminal to access the blockchain contract by calling a wallet signature transaction (as the first lock marker modification transaction) to modify the value of the airlock marker corresponding to the token in the blockchain. The blockchain contract verifies the token value, the value of the airlock marker, and the current nonce value to verify whether the first signature information is legal. When the first signature information is legal, the value of the airlock marker corresponding to the token is modified from false to true, and the current nonce value of the airlock marker corresponding to the token is incremented by 1 to prevent the current nonce value from being used multiple times, thereby preventing a replay attack.
[0028] When the game backend monitors that the value of the airlock marker corresponding to the token is set to the second marker value (such as true), the blockchain game can be started. Further, in the game process, the attribute value change information of the virtual character can also be listened to, and when the blockchain game ends, the attribute value change information is uploaded to the blockchain to which the blockchain game belongs. Exemplarily, the attribute value can be that the virtual character obtains a virtual equipment, the honor value of the virtual character increases by 100, the revival times of the virtual character decrease by 1, and the like. The actual situation of the blockchain game can be set, and the embodiments of the present application do not limit this. In the embodiments of the present application, the attribute value change information of the token is recorded in the game backend, and after the game ends, the attribute value change information is synchronized to the blockchain, which can to some extent avoid the loss of the game party due to the attribute value change information not being uploaded in time.
[0029] In an embodiment, if the user has a transaction or other needs, a locking operation needs to be performed on the virtual character to allow a transfer operation on the virtual character. In an embodiment, steps a to d can be referred to as follows:
[0030] Step a, in the case where the blockchain game ends, receiving a locking request of the terminal for the virtual character. In an embodiment, the user can apply to the game backend to unlock the virtual character by operating the terminal. Exemplarily, a locking control is provided through the graphical user interface of the terminal, and the game backend can receive the locking request sent by the terminal in response to the triggering operation of the locking control.
[0031] Step b, reading the second random value corresponding to the virtual role from the blockchain contract. In an implementation, the game backend will read the current nonce value of the token corresponding airlock flag in the blockchain contract when receiving the unlocking request, which is the second random value mentioned above. It should be noted that the blockchain contract has modified the current nonce value in the blockchain contract (such as +1) after verifying the legality of the first signature information, therefore, the current nonce value read from the blockchain contract in the unlocking process is different from the current nonce value read in the previous locking process.
[0032] Step c, based on the private key carried by the unlocking request, signing the token value corresponding to the virtual role, the second random value, the second flag value of the lock flag, and the attribute value change information to obtain the second signature information. In an implementation, the private key is then used to generate a signature, and the signed content includes the token value, the current value of the token corresponding airlock flag (which is the second flag value), the current nonce value of the token corresponding airlock flag (which is the second random value), and the attribute value change information, which can obtain the second signature information.
[0033] Step d, feeding back the second signature information based on the attribute value change information to the terminal, so that the terminal executes the unlocking operation on the virtual role in the blockchain game based on the second signature information. Wherein, the unlocking operation is used to allow the transfer operation for the virtual role.
[0034] In an implementation, by feeding back the second signature information to the terminal, the terminal can initiate a second lock flag modification transaction based on the second signature information to execute the unlocking operation on the virtual role using the second lock flag modification transaction. Wherein, the second lock flag modification transaction is used to verify the second signature information, modify the second random value, modify the lock flag from the second flag value to the first flag value, and modify the attribute value of the virtual role based on the attribute value change information. In specific implementation, the player can operate the terminal to access the blockchain contract again by calling the wallet signature transaction (which is the first lock flag modification transaction) to modify the value of the token corresponding airlock flag in the blockchain, and the blockchain contract verifies the token value, the value of the airlock flag, the current nonce value, and the attribute value change information to verify the legality of the second signature information, and modifies the value of the token corresponding airlock flag from true to false when the second signature information is legal, and increments the current nonce value of the token corresponding airlock flag by 1, and modifies the attribute value of the token according to the attribute value change information.
[0035] In an implementation, based on the attribute value change information and the unlocking operation, a payment instruction corresponding to the virtual role can be generated and sent to the terminal to enable the terminal to perform a payment operation. For example, when it is detected that the unlocking operation is completed, the cost information generated by the blockchain when changing the attribute value can be obtained, and a corresponding payment instruction can be generated based on the cost information and sent to the terminal to display a payment interface through the graphical user interface of the terminal, and the user can complete the payment on the payment interface. According to the embodiment of the application, by binding the token attribute synchronization and the token unlocking operation together, the gas cost generated when the attribute value is synchronized can be distributed to the corresponding user for payment, thereby saving the project expenditure of the game party and promoting the benign development of the blockchain game.
[0036] In an implementation, if it is detected that the unlocking operation is completed, a transfer request for the virtual role can be received to transfer the virtual role to a target account corresponding to an account identifier based on the account identifier carried in the transfer request. In actual application, since the virtual role is in a state allowing the transfer operation (i.e., the unlocked state), when the transfer request is received, the virtual role can be transferred from the current account to the target account, thereby realizing the sale of the virtual role.
[0037] To facilitate the understanding of the above embodiments, the embodiment of the application further provides an application example of a control method of a blockchain game, which is shown in a time sequence diagram of a control method of a blockchain game. Figure 2
[0038] (1) In the locking phase:
[0039] Step 1: The user terminal (i.e., the terminal) applies to the game backend for the first signature information of the airlock marker. In actual application, if the user terminal plans to start the game, since the token needs to be locked, the user terminal needs to apply to the game backend for the first signature information of the airlock marker.
[0040] Step 2: The game backend reads the current nonce value of the airlock marker corresponding to the token in the blockchain contract (such as an ERC721 contract or an ERC1155 contract).
[0041] Step 3: The blockchain contract returns the current nonce value.
[0042] Step 4: The game backend generates the first signature information using the private key. The signed content includes the token value, the current value of the airlock marker corresponding to the token, and the current nonce value of the airlock marker corresponding to the token.
[0043] Step 5, the game backend returns the first signature information to the user end.
[0044] Step 6, the user end calls the wallet signature transaction. In practical applications, by calling the wallet signature transaction, the blockchain contract can be accessed, and then the value of the airlock mark corresponding to the token in the blockchain contract can be modified.
[0045] Step 7, the blockchain contract verifies the first signature information, modifies the value of the airlock mark corresponding to the token to true, and adds 1 to the current nonce value of the airlock mark corresponding to the token.
[0046] Step 8, the blockchain contract calls the contract to return.
[0047] (2) In the unlocking phase:
[0048] Step 1, the user end applies to the game backend for the second signature information of the airlock mark. In practical applications, if the user end plans to unlock the token for other purposes (such as selling), it needs to apply to the game backend for the second signature information of the airlock mark at this time.
[0049] Step 2, the game backend reads the current nonce value of the airlock mark corresponding to the token in the blockchain contract.
[0050] Step 3, the blockchain contract returns the current nonce value.
[0051] Step 4, the game backend generates the second signature information using the private key. The signed content includes the token value, the current value of the airlock mark corresponding to the token, the current nonce value of the airlock mark corresponding to the token, and the attribute value change information of the token.
[0052] Step 5, the game backend returns the second signature information and the attribute value change information to the user end.
[0053] Step 6, the user end calls the wallet signature transaction. In practical applications, by calling the wallet signature transaction, the blockchain contract can be accessed, and then the value of the airlock mark corresponding to the token in the blockchain contract can be modified.
[0054] Step 7, the blockchain contract verifies the second signature information, modifies the value of the airlock mark corresponding to the token to false, adds 1 to the current nonce value of the airlock mark corresponding to the token, and modifies the attribute value change information of the token.
[0055] Step 8, the blockchain contract calls the contract to return.
[0056] In summary, the embodiment of the present application can prevent the user from transferring the virtual character being used in the game process, and can synchronize the attribute change of the virtual character in the game to the chain in a manner beneficial to all, thereby promoting the benign development of the chain game project.
[0057] For the control method of the blockchain game provided by the foregoing embodiment, the embodiment of the present application provides a control device of a blockchain game, which refers to Figure 3 The control device of the blockchain game mainly includes the following parts:
[0058] The request receiving module 302 is configured to receive a locking request of a terminal for a virtual character in a blockchain game.
[0059] The locking module 304 is configured to feed back first signature information to the terminal, so that the terminal performs a locking operation on the virtual character based on the first signature information; wherein the locking operation is configured to prohibit a transfer operation on the virtual character.
[0060] The game starting module 306 is configured to determine to start the blockchain game if it is monitored that the locking operation is completed.
[0061] The control device of the blockchain game provided by the embodiment of the present application needs to feed back the first signature information to the terminal according to the received locking request before starting the game, so that the terminal performs the locking operation of prohibiting the transfer of the virtual character based on the first signature information, and starts the blockchain game after determining that the locking operation is completed, thereby prohibiting the transfer of the virtual character in the game process, effectively reducing the situation that the user receiving the virtual character cannot use the virtual character immediately due to the transfer of the virtual character in the game process, and further significantly improving the game experience of the user.
[0062] In an implementation manner, a locking mark corresponding to the virtual character is added in a blockchain contract applied by the blockchain game; the device further includes a first signature generation module configured to: read a first random value corresponding to the virtual character from the blockchain contract; and sign a token value corresponding to the virtual character, the first random value and a first mark value of the locking mark based on a private key carried by the locking request, to obtain the first signature information; wherein the first mark value is configured to allow the transfer operation on the virtual character.
[0063] In an implementation manner, the locking module 304 is further configured to: feed back the first signature information to the terminal, so that the terminal initiates a first locking mark modification transaction based on the first signature information, to perform the locking operation on the virtual character by using the first locking mark modification transaction; wherein the first locking mark modification transaction is configured to verify the first signature information, modify the first random value, and modify the locking mark from the first mark value to a second mark value, the second mark value being configured to prohibit the transfer operation on the virtual character.
[0064] In an implementation, the apparatus further includes an attribute value monitoring module configured to monitor attribute value change information of the virtual role, and upload the attribute value change information to a blockchain to which the blockchain game belongs when the blockchain game ends.
[0065] In an implementation, the apparatus further includes an unlocking module configured to receive an unlocking request for the virtual role from the terminal when the blockchain game ends, and feed back second signature information to the terminal based on the attribute value change information, so that the terminal performs an unlocking operation on the virtual role in the blockchain game based on the second signature information, wherein the unlocking operation is configured to allow a transfer operation on the virtual role.
[0066] In an implementation, the apparatus further includes a second signature generation module configured to read a second random value corresponding to the virtual role from the blockchain contract, and sign the token value corresponding to the virtual role, the second random value, the second mark value of the lock mark, and the attribute value change information based on a private key carried in the unlocking request to obtain the second signature information.
[0067] In an implementation, the unlocking module is further configured to feed back the second signature information to the terminal, so that the terminal initiates a second lock mark modification transaction based on the second signature information, and performs the unlocking operation on the virtual role by using the second lock mark modification transaction, wherein the second lock mark modification transaction is configured to verify the second signature information, modify the second random value, modify the lock mark from the second mark value to the first mark value, and modify the attribute value of the virtual role based on the attribute value change information.
[0068] In an implementation, the apparatus further includes a payment module configured to generate a payment instruction corresponding to the virtual role based on the attribute value change information and the unlocking operation, and send the payment instruction to the terminal to make the terminal perform a payment operation.
[0069] In an implementation, the apparatus further includes a role transfer module configured to receive a transfer request for the virtual role if it is monitored that the unlocking operation is completed, and transfer the virtual role to a target account corresponding to an account identifier based on the account identifier carried in the transfer request.
[0070] The device provided by the embodiments of the present application has the same implementation principle and technical effects as the foregoing method embodiments, and for brevity, the part not mentioned in the device embodiment part can be referred to the corresponding content in the foregoing method embodiments.
[0071] The server provided by the embodiments of the present application includes a processor and a storage device, and the storage device stores a computer program, and the computer program performs the following when being run by the processor:
[0072] A control method of a blockchain game, comprising: receiving a locking request of a terminal for a virtual role in the blockchain game; feeding back first signature information to the terminal, so that the terminal performs a locking operation on the virtual role based on the first signature information; wherein the locking operation is used to prohibit a transfer operation on the virtual role; and if it is monitored that the locking operation is completed, determining to start the blockchain game.
[0073] In an implementation, a locking mark corresponding to the virtual role is added in a blockchain contract applied by the blockchain game; before the step of feeding back the first signature information to the terminal, so that the terminal performs the locking operation on the virtual role based on the first signature information, the method further comprises: reading a first random value corresponding to the virtual role from the blockchain contract; signing the token value corresponding to the virtual role, the first random value and a first mark value of the locking mark based on a private key carried in the locking request, to obtain the first signature information; wherein the first mark value is used to allow the transfer operation on the virtual role.
[0074] In an implementation, the step of feeding back the first signature information to the terminal, so that the terminal performs the locking operation on the virtual role based on the first signature information, comprises: feeding back the first signature information to the terminal, so that the terminal initiates a first locking mark modification transaction based on the first signature information, to perform the locking operation on the virtual role by using the first locking mark modification transaction; wherein the first locking mark modification transaction is used to verify the first signature information, modify the first random value, and modify the locking mark from the first mark value to a second mark value, the second mark value is used to prohibit the transfer operation on the virtual role.
[0075] In an implementation, after the step of determining to start the blockchain game, the method further comprises: monitoring attribute value change information of the virtual role; and when the blockchain game ends, uploading the attribute value change information to a blockchain to which the blockchain game belongs.
[0076] In an implementation, the method further comprises: in the case that the blockchain game ends, receiving an unlocking request of the terminal for the virtual role; feeding back second signature information to the terminal based on the attribute value change information, so that the terminal performs an unlocking operation on the virtual role in the blockchain game based on the second signature information; wherein the unlocking operation is used to allow the transfer operation on the virtual role.
[0077] In an implementation, before the step of feeding back the second signature information to the terminal based on the attribute value change information, so that the terminal performs the unlocking operation on the virtual role in the blockchain game based on the second signature information, the method further comprises: reading a second random value corresponding to the virtual role from the blockchain contract; signing the token value corresponding to the virtual role, the second random value, a second mark value of the locking mark and the attribute value change information based on a private key carried in the unlocking request, to obtain the second signature information.
[0078] In an implementation, the step of feeding back the second signature information to the terminal based on the attribute value change information, so that the terminal performs the unlocking operation on the virtual character in the blockchain game based on the second signature information, comprises: feeding back the second signature information to the terminal, so that the terminal initiates a second lock marker modification transaction based on the second signature information, to perform the unlocking operation on the virtual character by using the second lock marker modification transaction; wherein the second lock marker modification transaction is used to verify the second signature information, modify the second random number value, modify the lock marker from the second marker value to the first marker value, and modify the attribute value of the virtual character based on the attribute value change information.
[0079] In an implementation, the method further comprises: based on the attribute value change information and the unlocking operation, generating a payment instruction corresponding to the virtual character, and sending the payment instruction to the terminal to make the terminal perform a payment operation.
[0080] In an implementation, the method further comprises: if it is listened that the unlocking operation is completed, receiving a transfer request for the virtual character; based on the account identifier carried by the transfer request, transferring the virtual character to a target account corresponding to the account identifier.
[0081] The server provided by the embodiments of the present application needs to feed back the first signature information to the terminal according to the received locking request before the game is started, so that the terminal performs the locking operation of prohibiting the transfer of the virtual character based on the first signature information, and the blockchain game is started after it is determined that the locking operation is completed, so that the transfer of the virtual character can be prohibited during the game process, effectively reducing the situation that the user who receives the virtual character cannot use the virtual character immediately due to the transfer of the virtual character during the participation process, and further significantly improving the game experience of the user.
[0082] Figure 4 A structural diagram of a server provided by the embodiments of the present application is shown in the figure. The server 100 comprises a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42; the processor 40 is used to execute the executable modules stored in the memory 41, such as computer programs.
[0083] The memory 41 may contain a high-speed random access memory (RAM, Random Access Memory) and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which can be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used.
[0084] The bus 42 can be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 4 Only one bidirectional arrow is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0085] The memory 41 is configured to store a program, and the processor 40 executes the program after receiving an execution instruction. The method executed by the device for defining the flow process disclosed in any of the embodiments of the application can be applied to the processor 40 or implemented by the processor 40.
[0086] The processor 40 can be an integrated circuit chip with a processing capability of signals. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 40 or an instruction in the form of software. The processor 40 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), and the like; or can be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory 41, and the processor 40 reads the information in the memory 41 and combines the hardware to complete the steps of the above method.
[0087] The computer program product of the readable storage medium provided by the embodiments of the application includes a computer readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the following steps:
[0088] A control method of a blockchain game, comprising: receiving a locking request of a terminal for a virtual role in the blockchain game; feeding back first signature information to the terminal, so that the terminal performs a locking operation on the virtual role based on the first signature information; wherein the locking operation is used to prohibit a transfer operation on the virtual role; and if it is monitored that the locking operation is completed, determining to start the blockchain game.
[0089] In an implementation, a locking mark corresponding to the virtual role is added in a blockchain contract applied by the blockchain game; before the step of feeding back the first signature information to the terminal, so that the terminal performs the locking operation on the virtual role based on the first signature information, the method further comprises: reading a first random value corresponding to the virtual role from the blockchain contract; signing the token value corresponding to the virtual role, the first random value and a first mark value of the locking mark based on a private key carried in the locking request, to obtain the first signature information; wherein the first mark value is used to allow the transfer operation on the virtual role.
[0090] In an implementation, the step of feeding back the first signature information to the terminal, so that the terminal performs the locking operation on the virtual role based on the first signature information, comprises: feeding back the first signature information to the terminal, so that the terminal initiates a first locking mark modification transaction based on the first signature information, to perform the locking operation on the virtual role by using the first locking mark modification transaction; wherein the first locking mark modification transaction is used to verify the first signature information, modify the first random value, and modify the locking mark from the first mark value to a second mark value, the second mark value is used to prohibit the transfer operation on the virtual role.
[0091] In an implementation, after the step of determining to start the blockchain game, the method further comprises: monitoring attribute value change information of the virtual role; and when the blockchain game ends, uploading the attribute value change information to a blockchain to which the blockchain game belongs.
[0092] In an implementation, the method further comprises: in the case that the blockchain game ends, receiving an unlocking request of the terminal for the virtual role; feeding back second signature information to the terminal based on the attribute value change information, so that the terminal performs an unlocking operation on the virtual role in the blockchain game based on the second signature information; wherein the unlocking operation is used to allow the transfer operation on the virtual role.
[0093] In an implementation, before the step of feeding back the second signature information to the terminal based on the attribute value change information, so that the terminal performs the unlocking operation on the virtual role in the blockchain game based on the second signature information, the method further comprises: reading a second random value corresponding to the virtual role from the blockchain contract; signing the token value corresponding to the virtual role, the second random value, a second mark value of the locking mark and the attribute value change information based on a private key carried in the unlocking request, to obtain the second signature information.
[0094] In an implementation, the step of feeding back the second signature information to the terminal based on the attribute value change information, so that the terminal performs the unlocking operation on the virtual character in the blockchain game based on the second signature information, comprises: feeding back the second signature information to the terminal, so that the terminal initiates a second lock marker modification transaction based on the second signature information, to perform the unlocking operation on the virtual character by using the second lock marker modification transaction; wherein the second lock marker modification transaction is used to verify the second signature information, modify the second random number value, modify the lock marker from the second marker value to the first marker value, and modify the attribute value of the virtual character based on the attribute value change information.
[0095] In an implementation, the method further comprises: based on the attribute value change information and the unlocking operation, generating a payment instruction corresponding to the virtual character, and sending the payment instruction to the terminal to make the terminal perform a payment operation.
[0096] In an implementation, the method further comprises: if it is listened that the unlocking operation is completed, receiving a transfer request for the virtual character; based on the account identifier carried by the transfer request, transferring the virtual character to a target account corresponding to the account identifier.
[0097] The readable storage medium provided by the embodiment of the application needs to feed back the first signature information to the terminal according to the received locking request before the game is started, so that the terminal performs the locking operation of prohibiting the transfer of the virtual character based on the first signature information, and the blockchain game is started after it is determined that the locking operation is completed, so that the transfer of the virtual character can be prohibited during the game process, the situation that a user who receives the virtual character cannot use the virtual character immediately due to the transfer of the virtual character during the participation process is effectively reduced, and the game experience of the user is significantly improved.
[0098] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the application or parts of the technical solutions that essentially contribute to the prior art can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0099] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any person skilled in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A control method of a blockchain game, characterized by, The method comprises: receiving a locking request for a virtual role in a blockchain game from a terminal; feeding back first signature information to the terminal, so that the terminal performs a locking operation on the virtual role based on the first signature information; wherein the locking operation is used to prohibit a transfer operation on the virtual role, and the first signature information is obtained by signing a token value corresponding to the virtual role, a first random value obtained from a blockchain contract, and a value of a lock marker of the virtual role; the value of the lock marker is used to mark whether the virtual role can be transferred; if it is determined that the locking operation is completed, starting the blockchain game.
2. The method of claim 1, wherein, The blockchain contract applied by the blockchain game adds a lock marker corresponding to the virtual role; before the step of feeding back the first signature information to the terminal, so that the terminal performs a locking operation on the virtual role based on the first signature information, the method further comprises: reading a first random value corresponding to the virtual role from the blockchain contract; based on a private key carried in the locking request, signing a token value corresponding to the virtual role, the first random value, and a first marker value of the lock marker to obtain first signature information; wherein the first marker value is used to allow a transfer operation on the virtual role.
3. The method of claim 2, wherein, The step of feeding back the first signature information to the terminal, so that the terminal performs a locking operation on the virtual role based on the first signature information, comprises: feeding back the first signature information to the terminal, so that the terminal initiates a first lock marker modification transaction based on the first signature information, to perform a locking operation on the virtual role by using the first lock marker modification transaction; wherein the first lock marker modification transaction is used to verify the first signature information, modify the first random value, and modify the lock marker from the first marker value to a second marker value, the second marker value is used to prohibit a transfer operation on the virtual role.
4. The method of claim 1, wherein, After the step of determining to start the blockchain game, the method further comprises: listening to attribute value change information of the virtual role; when the blockchain game ends, uploading the attribute value change information to a blockchain to which the blockchain game belongs.
5. The method of claim 4, wherein, The method further comprises: in the case that the blockchain game ends, receiving an unlocking request for the virtual role from the terminal; feeding back second signature information to the terminal based on the attribute value change information, so that the terminal performs an unlocking operation on the virtual role in the blockchain game based on the second signature information; wherein the unlocking operation is used to allow a transfer operation on the virtual role.
6. The method of claim 5, wherein, Before the step of feeding back the second signature information to the terminal based on the attribute value change information, so that the terminal performs an unlocking operation on the virtual role in the blockchain game based on the second signature information, the method further comprises: reading a second random value corresponding to the virtual role from the blockchain contract; Based on the private key carried by the unlocking request, the token value corresponding to the virtual character, the second random value, the second mark value of the lock mark, and the attribute value change information are signed to obtain second signature information.
7. The method of claim 6, wherein, Based on the attribute value change information, the second signature information is fed back to the terminal, so that the terminal performs the step of executing the unlocking operation on the virtual character in the blockchain game based on the second signature information, including: The second signature information is fed back to the terminal, so that the terminal initiates a second lock mark modification transaction based on the second signature information, to execute the unlocking operation on the virtual character by using the second lock mark modification transaction; The second lock mark modification transaction is used to verify the second signature information, modify the second random value, modify the lock mark from the second mark value to the first mark value, and modify the attribute value of the virtual character based on the attribute value change information.
8. The method of claim 5, wherein, The method further includes: Based on the attribute value change information and the unlocking operation, a payment instruction corresponding to the virtual character is generated, and the payment instruction is sent to the terminal to make the terminal perform a payment operation.
9. The method of claim 5, wherein, The method further includes: If it is listened that the unlocking operation is executed, a transfer request for the virtual character is received; Based on the account identifier carried by the transfer request, the virtual character is transferred to a target account corresponding to the account identifier. 10.A control apparatus of a blockchain game, characterized by, It includes: The request receiving module is configured to receive a locking request of a terminal for a virtual character in a blockchain game; The locking module is configured to feed back first signature information to the terminal, so that the terminal executes a locking operation on the virtual character based on the first signature information; wherein the locking operation is used to prohibit a transfer operation for the virtual character, and the first signature information is obtained by signing a token value corresponding to the virtual character, a first random value obtained from a blockchain contract, and a value of a lock mark of the virtual character; the value of the lock mark is used to mark whether the virtual character can be transferred; The game starting module is configured to determine to start the blockchain game if it is listened that the locking operation is executed.
11. A server, characterized by The computer readable storage medium stores computer executable instructions, and the computer executable instructions, when called and executed by the processor, cause the processor to implement the method of any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, and the computer executable instructions, when called and executed by the processor, cause the processor to implement the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Blockchain interoperability
CN110084592A
Virtual pet commodity transaction method, system, device and storage medium
CN110428307A
Cross-chain method and system between blockchains
CN111222991A