Game login method, device and electronic device
By saving game users' tokens on the blockchain and using private key signatures to verify identities, the reliability and security issues caused by existing game login methods relying on third-party services are solved, achieving a more efficient and secure game login experience. .
Patent Information
- Application Number
- CN202011219524.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-10
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-11-10
AI Technical Summary
Existing game login methods rely on third-party servers or accounts, resulting in poor reliability and security. When users change their mobile phone numbers or their accounts are stolen, login failure or account loss may occur.
The user's token is saved through the blockchain. Each token corresponds to a game character. The game server obtains the alternative token from the blockchain to log in. The user verifies the identity through the private key signature and selects the target token to log in, avoiding Rely on third-party services and reduce the risk of account loss or theft.
It improves the reliability and security of game login, avoids the problem of account loss or theft, and provides a convenient and safe login method that does not rely on third-party services.
Smart Images

Figure CN112354190B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain game technology, and in particular to a game login method, device and electronic device. Background Art
[0002] When accessing services such as games, applications or websites, most of them require logging in through an account in advance. The specific forms of accounts mainly include custom accounts, email accounts, third-party accounts, mobile phone accounts, etc. Among them, when logging in to a service through a third-party account, it is heavily dependent on the normal operation of the third-party server. If the third-party server crashes or stops the service, the user cannot log in to the current service; for email accounts and mobile phone accounts, if the user changes the mobile phone number, or the user's mobile phone number or email is stolen, it is easy to cause the user to be unable to log in, or even the account is stolen. In short, the reliability and security of logging in to the service through the above account forms are poor. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a game login method, device and electronic device to improve the reliability and security of the game login service.
[0004] In a first aspect, an embodiment of the present invention provides a game login method, which is applied to a game server; a first game is running on the game server; tokens owned by users are stored in a preset blockchain, and each token corresponds to a game character; the method includes: according to the identity information of the user to be logged in, obtaining an alternative token belonging to the first game from the tokens owned by the user to be logged in stored in the blockchain; providing the alternative token to the user to be logged in, and in response to a confirmation instruction of the user to be logged in for a target token in the alternative token, performing login processing on the user to be logged in based on the game character corresponding to the target token.
[0005] Furthermore, the game server stores the hash value of the token and the attribute information of each hash value; the attribute information includes one or more of game attributes, server attributes and character attributes; based on the game character corresponding to the target token, the step of performing login processing on the user to be logged in includes: obtaining the target attribute information corresponding to the hash value of the target token; associating the target attribute information with the game character corresponding to the target token to complete the login processing for the user to be logged in.
[0006] Furthermore, before the step of obtaining an alternative token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain according to the identity information of the user to be logged in, the method also includes: receiving the identity information sent by the user to be logged in; returning a random number to the user to be logged in, and receiving signature information of the user to be logged in on the random number; wherein the signature information is obtained by signing the random number with the private key of the user to be logged in; and verifying the signature information based on the public key corresponding to the identity information, and if the verification passes, the identity information of the user to be logged in is confirmed.
[0007] Furthermore, the method also includes: if a first game character newly created by a first user is received, obtaining a token to be bound, and binding the first game character to the token to be bound; in the blockchain, associating and saving the token to be bound, the first game character, and the identity information of the first user.
[0008] Furthermore, the method also includes: if an ownership change event for a first token sent by the blockchain is received, querying whether the current user to whom the first token belongs is logging in through the game character corresponding to the first token; if the current user is logging in through the game character corresponding to the first token, performing a kick operation on the current user to stop the current user from logging in through the game character corresponding to the first token.
[0009] Furthermore, the ownership change event is generated after the asset transaction for the first token is completed through the blockchain; during the asset transaction process, the first token is in a frozen state in the blockchain.
[0010] Further, tokens include non-fungible tokens.
[0011] In a second aspect, an embodiment of the present invention provides a game login device, which is arranged on a game server; a first game is run on the game server; tokens owned by users are stored in a preset blockchain, and each token corresponds to a game character; the device includes: an acquisition module, which is used to acquire an alternative token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain according to the identity information of the user to be logged in; a login module, which is used to provide the alternative token to the user to be logged in, and in response to the confirmation instruction of the user to be logged in for the target token in the alternative token, login processing is performed on the user to be logged in based on the game character corresponding to the target token.
[0012] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement any game login method of the first aspect.
[0013] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement any one of the game login methods of the first aspect.
[0014] The embodiments of the present invention bring the following beneficial effects:
[0015] The embodiment of the present invention provides a game login method, device and electronic device, wherein the game server obtains an alternative token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain according to the identity information of the user to be logged in; provides the alternative token to the user to be logged in, and in response to the confirmation instruction of the user to be logged in for the target token in the alternative token, performs login processing on the user to be logged in based on the game character corresponding to the target token. In this method, the tokens of each game character owned by the game user are saved through the blockchain. When logging in to the game, the game server obtains all tokens corresponding to the game from the blockchain, and logs in to the game through the target token selected by the user; this method of logging in to the game does not rely on third-party services, and also avoids the risk of account loss or theft, thereby improving the reliability and security of game login.
[0016] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A flowchart of a game login method provided by an embodiment of the present invention;
[0020] Figure 2 A flowchart of another game login method provided by an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of the structure of a blockchain system in a game login method provided by an embodiment of the present invention;
[0022] Figure 4 A flowchart of a game login method provided by an embodiment of the present invention;
[0023] Figure 5 A flowchart of another game login method provided by an embodiment of the present invention;
[0024] Figure 6 A schematic diagram of the structure of a game login device provided by an embodiment of the present invention;
[0025] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0027] At present, when accessing services such as games, applications or websites, most of them need to perform login operations through accounts in advance. The specific forms of accounts mainly include custom accounts, email accounts, third-party accounts, mobile phone accounts, etc. Among them, in the process of logging into the service through a third-party account, it is necessary to obtain user authorization, that is, to bind the third-party account to the account system of the application service provider itself. When it is found that the user's third-party account has been bound to a user ID (Identity Document) of the platform, the corresponding account is directly logged in to achieve one-click registration and one-click login. This type of login method is almost the standard configuration of all common applications. However, this third-party account system is heavily dependent on third-party services. If the third-party service crashes or stops service, resulting in the inability to provide services, users will not be able to log in to the current service. In addition, for email accounts and mobile phone accounts, if the user changes the phone, or the user's phone or email is stolen, it is easy to cause the user to be unable to log in, or even the account is stolen, which poses asset risks.
[0028] Based on this, an embodiment of the present invention provides a game login method, device and electronic device. The technology can be applied to a server, especially a server with a game login function.
[0029] To facilitate understanding of this embodiment, a game login method disclosed in an embodiment of the present invention is first introduced in detail. The method is applied to a game server; a first game is running on the game server; tokens owned by users are stored in a preset blockchain, and each token corresponds to a game character; wherein the first game may be various online games that require account login; the above-mentioned preset blockchain may be composed of blockchain technology, and may be a public chain, a consortium chain, etc.
[0030] like Figure 1 As shown, the method comprises the following steps:
[0031] Step S102, according to the identity information of the user to be logged in, obtaining a candidate token belonging to the first game from the tokens owned by the user to be logged in stored in the blockchain;
[0032] The above-mentioned identity information can be the user's ID number, the user's account name in the first game, account number and other identification information that can identify the user. The above-mentioned blockchain stores tokens owned by users, including homogeneous tokens, which can be expressed as tokens. They can be understood as a digital value carrier and also a proof of equity, such as Q coins, which can also be issued in a centralized system. They are not unique to the blockchain, but are owned by the user of the game account and stored in the blockchain. From a technical point of view, blockchain and tokens can be completely separated. However, when tokens are combined with blockchain, the authenticity and uniqueness of assets can be determined through encryption algorithms and distributed ledgers, and they can be circulated through consensus algorithms.
[0033] The above-mentioned tokens also include non-fungible tokens. Non-fungible tokens can be traded and transferred with homogeneous tokens; among them, non-fungible tokens can be represented as stokens. Homogeneous tokens can be generated by ERC20, and non-fungible tokens can be generated by ERC721; among them, non-fungible tokens generated by ERC721 have a unique mark on the entire blockchain, that is, each non-fungible token is unique, belongs to a blockchain account, and can be traded and transferred. Non-fungible tokens are generated and allocated by the first game, that is, non-fungible tokens have game attributes, server attributes, and character attributes at the beginning of their creation. In addition, each token corresponds to a game character, which can be created by the user on the game server.
[0034] Specifically, when a user wants to log in to a game, after receiving the identity information of the user to be logged in, the game server can obtain the first game that the user wants to log in based on the identity information of the user, and filter out the candidate tokens belonging to the first game, i.e., the account or character set of the first game, from the tokens owned by the user to be logged in saved in the blockchain based on the access interface of the game server. The candidate token is created by the user to be logged in in the first game, owned by the user and saved in the blockchain, and has the characteristics of being tradable.
[0035] Step S104, providing alternative tokens to the user to be logged in, and in response to the user to be logged in's confirmation instruction for the target token in the alternative tokens, performing login processing on the user to be logged in based on the game character corresponding to the target token.
[0036] Since each token corresponds to a game character, and the game characters corresponding to the candidate tokens all belong to the user to be logged in, the user to be logged in can be logged in based on the game character corresponding to the target token. Specifically, after the game server obtains the candidate token of the first game belonging to the user to be logged in from the blockchain, it can provide the user to be logged in with a list of candidate token information through a mobile phone, computer or other terminal device. The user to be logged in can select any one of the target tokens based on the provided candidate tokens, and obtain the relevant attributes of the first game based on the target token. According to the relevant attributes, the user to be logged in can be logged in for the first game.
[0037] See also Figure 2 The schematic diagram of the structure of the blockchain system in the game login method shown in the figure, where the bottom is the blockchain underlying system, which is composed of blockchain. The blockchain stores the tokens owned by the user, such as token A, token B, token C, and token D shown in the figure; each token corresponds to a game character, such as character 1, character 2, character 3, and character 4 shown in the figure. Token A and token B belong to game A, token C belongs to game B, and token D belongs to game C. Users are allowed to create game blockchain accounts on the blockchain, and the account is managed by the wallet DAPP (Decentralized Application).
[0038] A blockchain account can have three major elements: private key, public key, and address. Usually, the private key is generated by a random number, and then the public key and address are generated based on a cryptographic algorithm, and the process is one-way and irreversible. Among them, the private key can also be commonly understood as the password required to log in to a bank account. The blockchain account is managed by a password, but the password is called a "private key", which is more complicated than the login password required in a bank account. As we all know, computers store data in 0s and 1s, and private keys are composed of 0s and 1s with a length of 256. For the blockchain private key, if you want to crack the password, even if all the computers in the world are running, you can't calculate one billionth of it, so it is safe enough.
[0039] The public key is a supplement to the private key to verify the "signature" of the private key and is made public on the blockchain network. The specific process is simple to understand. It is equivalent to using the assets of user A's account. Then user A needs a "private key" to "sign" this behavior, and at the same time tell everyone the "public key" that can verify whether the signature is correct, so that others can verify the legitimacy and source of this behavior.
[0040] The address is generated by the public key and is also the identifier for system interaction. On the one hand, since the public key is too long, it is inconvenient to use in transactions. The address can be generated by encrypting the public key hash with SHA256, RIPEMD160, or Base58 algorithms. On the other hand, for transactions that have not been sent, you do not want to expose your public key, and the address is generated by a digest algorithm, which does not expose the true content of the public key.
[0041] It should be noted that a user can have a unique user account, which can be used to log in to multiple games. Since a blockchain account can have multiple tokens, the token is the login ID of the game. In addition, the game operator becomes the institution that builds the blockchain, and the entry or exit of the institution follows the constraints of the blockchain governance consensus.
[0042] The embodiment of the present invention provides a game login method, in which the game server obtains an alternative token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain according to the identity information of the user to be logged in; provides the alternative token to the user to be logged in, and in response to the confirmation instruction of the user to be logged in for the target token in the alternative token, performs login processing on the user to be logged in based on the game character corresponding to the target token. In this method, the tokens of each game character owned by the game user are saved through the blockchain. When logging in to the game, the game server obtains all tokens corresponding to the game from the blockchain, and logs in to the game through the target token selected by the user; this method of logging in to the game does not rely on third-party services, and also avoids the risk of account loss or theft, thereby improving the reliability and security of game login.
[0043] This embodiment also provides another game login method. This embodiment focuses on describing the specific implementation process of performing login processing on the user to be logged in based on the game character corresponding to the target token (implemented by steps S302-S306), and the specific implementation process of the previous step of obtaining the candidate token belonging to the first game from the token owned by the user to be logged in stored in the blockchain according to the identity information of the user to be logged in (implemented by steps S310-S312), such as Figure 3 As shown, the method comprises the following steps:
[0044] Step S302, receiving identity information sent by the user to be logged in;
[0045] See also Figure 4 The flowchart of the game login method shown is that first, the user can use a terminal device such as a mobile phone or a computer to send identity information to the game server, which can be the account ID of the user to be logged in in the first game, etc. The game server receives the identity information sent by the user to be logged in.
[0046] Step S304, returning a random number to the user to be logged in, and receiving signature information of the random number from the user to be logged in; wherein the signature information is obtained by signing the random number with the private key of the user to be logged in;
[0047] In order to verify whether the identity information of the user to be logged in is legal, after receiving the identity information sent by the user to be logged in, the game server will randomly generate a string of random numbers, and then send the random numbers to the terminal device. The user to be logged in uses the random number provided by the terminal device and signs the random number with a private key to obtain signature information, and sends the signature information to the game server. The game server receives the signature information of the random number from the user to be logged in.
[0048] Step S306, verifying the signature information based on the public key corresponding to the identity information, and if the verification is successful, confirming the identity information of the user to be logged in;
[0049] Since the public key is a supplement to the private key, it is mainly used to verify the "signature" of the private key and is made public on the entire network and blockchain. In order to verify whether the signature information of the user to be logged in is correct, the signature information can be verified using the public key corresponding to the identity information of the user to be logged in. If the verification is successful, the identity information of the user to be logged in is confirmed.
[0050] Step S308, obtaining a candidate token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain according to the identity information of the user to be logged in;
[0051] Step S310, providing the candidate tokens to the user to be logged in, and in response to the confirmation instruction of the user to be logged in for the target token in the candidate tokens, obtaining the target attribute information corresponding to the hash value of the target token;
[0052] See also Figure 4 As shown, after verifying the identity information of the user to be logged in, the game server can access the blockchain through the interface and obtain the candidate token of the first game belonging to the user to be logged in from the blockchain, such as Figure 4 The tokenA, tokenB, and tokenC in the game are combined, and the alternative tokens are provided to the user to be logged in through the terminal device. The user to be logged in can select any target token and confirm the target token through the confirmation button. The game server responds to the confirmation instruction of the user to be logged in for the target token in the alternative tokens, and obtains the target attribute information corresponding to the hash value of the target token in the game server through the finally confirmed target token, that is, the game and server of the target token.
[0053] The game server stores the hash value of the token and the attribute information of each hash value; the attribute information includes one or more of game attributes, server attributes and role attributes.
[0054] The hash value can be a mapping of a long piece of data into a shorter piece of data through a certain hash algorithm (typically MD5, SHA-1, etc.), and this piece of small data is the hash value of the big data. The hash value of each of the above tokens has certain attribute information, among which the game attribute can be the relevant ID of the game attribute, such as gameA id4589, the server attribute can be the relevant ID of the server attribute, such as server id2314, and the role attribute can be the relevant ID of the role attribute, such as roleid7543; the game server stores the hash value of the token and the attribute information of each hash value, in order to facilitate the association of the data confirmed on the blockchain, and the game server does not need to save the mapping relationship between the blockchain account and the relevant game attributes, but only needs to save the hash value of the token and the attribute information of each hash value.
[0055] Step S312, associating the target attribute information with the game character corresponding to the target token to complete the login processing for the user to be logged in.
[0056] The above target attribute information includes game attribute information and server attribute information; specifically, the game attribute information and server attribute information can be associated with the game character corresponding to the target token to complete the login processing for the logged-in user. In this method, the blockchain only needs to save the token created by the user in the game server, and the game attributes, server attributes, and character attributes corresponding to the token are saved in the game server.
[0057] In the above method, based on the preset blockchain, users can create game blockchain accounts on the blockchain. Game users obtain the corresponding target token in the blockchain through the game server, and associate it with the game character of the target token according to the attribute information of the saved token to log in to the game, providing a convenient and secure integrated account login system, and building a game account system in a decentralized manner, so that different games have shared account pool resources, reducing account security issues caused by other factors, reducing the problem of being unable to log in and account theft caused by performing login operations through accounts, and improving the reliability and security of game login services.
[0058] Under the existing account system, asset transactions between users rely on third-party customer service, which confirms the seller's game assets and manually connects the buyer and seller to transfer accounts and funds, charging a handling fee. However, a large number of transactions have seen platform fraud, buyer fraud, and seller fraud. The game asset trading industry is in a period of rapid growth, but the centralized trading model has brought about high fraud risks and long transaction cycles, which have restricted the development of the industry.
[0059] Based on this, this embodiment also provides another game login method, which mainly describes the tokens stored in the blockchain and the related binding relationships, as well as the asset transaction and issuance method for the first token in the game, such as Figure 5 As shown, the method comprises the following steps:
[0060] Step S502: if a first game character newly created by a first user is received, a token to be bound is obtained, and the first game character is bound to the token to be bound;
[0061] The token is created by the game server, and has game attributes, server attributes, and character attributes from the beginning of creation, and is allocated to the corresponding account in the blockchain. Specifically, the game server can create a game character by issuing a token, and the issuance time node can be when the user creates the game character, or it can be generated in advance by the game server. After the first user creates the first game character, in order to enable the game character to bind the token for game login, the token to be bound can be obtained from the blockchain, and the first game character can be bound to the token to be bound.
[0062] Since the token is unique, the game characters created by different users are also unique. If a user creates multiple game characters, the multiple game characters are also different. When a user creates multiple game characters, each game character corresponds to a token. At this time, the user's account will have multiple tokens.
[0063] Step S504, in the blockchain, the to-be-bound token, the first game character, and the identity information of the first user are associated and saved;
[0064] After binding the token to be bound, the first game character and the identity information of the first user in the game server, the token to be bound, the first game character and the identity information of the first user can be associated and saved in the blockchain. This association information allows the user to directly obtain the token owned by the user to be logged in and the game character corresponding to the token according to the identity information of the user to be logged in during the login process. For example, the first game issued the first token, 0×1111111; game attribute: gameB idwe4567, server attribute: server id5567, game character ID: role id3365.
[0065] The following steps mainly describe that after the game login is completed, the user can change the ownership of the token through the game blockchain. The token includes homogeneous tokens and non-homogeneous tokens, that is, the blockchain address or account can obtain the ownership of tokens and stokens through transactions.
[0066] Step S506: if an ownership change event for the first token sent by the blockchain is received, query whether the current user to whom the first token belongs is logging in through the game character corresponding to the first token;
[0067] If a user wants to trade the tokens they own, they can directly apply for a change of ownership of the first token on the blockchain. Users can directly use homogeneous tokens and non-homogeneous tokens to change the ownership of non-homogeneous tokens, that is, change the ownership of the token. If both parties to the ownership change agree to the change and double-sign on the blockchain using the private keys of both parties, the ownership change of the token can be completed. During the signing process, neither party can change the transferred asset information and can only revoke or continue until the change is completed.
[0068] For example, user A uses tokenA owned by him to transfer stokenB0x12323 owned by user B. Even if tokenA belongs to user B, stokenB 0x12323 belongs to user A. During the signing process between user A and user B, tokenA and stokenB 0x12323 are locked. After user A and user B complete the signing, the ownership change of tokenA and stokenB0x12323 is completed. At this time, the blockchain can send an ownership change event of the first token (such as stokenB0x12323) to the game server through the event mechanism. In order to prevent security issues caused by delayed game server information after the transaction right is changed, upon receiving the ownership change event for the first token sent by the blockchain, it can be queried whether the current user to whom the first token belongs is logging in through the game character corresponding to the first token.
[0069] It should be noted that the ownership of the first token can be freely exchanged, such as exchange between stokens, gifted, or exchanged with tokens. The token exchange process can actually be understood as an asset transaction on the blockchain, which requires both parties to double-sign and confirm the transaction assets when transferring from user A's account to user B's account. And the process of changing the ownership of the token is all completed by the blockchain. For example, the exchange price of tokens and stokens can be determined by contracts, such as 2 tokens for one stoken. It is equivalent to the way that stokens are commodities and tokens are currencies.
[0070] Step S508: If the current user is logging in through the game character corresponding to the first token, a kick-out operation is performed on the current user to stop the current user from logging in through the game character corresponding to the first token.
[0071] Since the ownership change event of the first token is an overall transaction, before it is completed, it can be a change in asset freezing or the original user's ownership. In order to ensure that the game character corresponding to the first token does not have double login, if the current user is logging in through the game character corresponding to the first token, the current user is kicked out to stop the current user from logging in through the game character corresponding to the first token. Among them, the kick operation means that the current user cannot control the game character corresponding to the first token. Once the kick operation is completed, the ownership change event transaction of the first token is finally successful, ensuring that there will be no double login. After the transaction is completed, only the ownership of the first token is changed, and other information remains unchanged.
[0072] In addition, if it is found that the current user has not logged in through the game character corresponding to the first token, a kick operation may be performed on the current user to stop the current user from logging in through the game character corresponding to the first token.
[0073] Among them, the above-mentioned ownership change event is generated after the asset transaction for the first token is completed through the blockchain; during the asset transaction process, the first token is in a frozen state in the blockchain.
[0074] Usually, in order to prevent the first token from belonging to two users during the transaction process, that is, before the kick operation is executed and after the transaction is completed, the first token is frozen in the blockchain when the ownership change of the first token is initiated.
[0075] It should be noted that the above-mentioned process of trading stokens and changing stoken ownership rights are all completed on the blockchain. The change process can be saved in the blockchain, and users can query and trace the corresponding change process.
[0076] In this method, based on the preset blockchain, users can create game blockchain accounts on the blockchain and create game characters on the game server; the user's identity information, game character and token-related information are associated and saved in the blockchain; the game user obtains the corresponding target token in the blockchain through the game server, and associates it with the game character of the target token based on the attribute information of the saved token to log in to the game; a convenient and secure integrated account login system is provided to break the heavy reliance on third-party account systems. Each game entity can apply to join the alliance and participate in the issuance, sharing and management of accounts, reducing the problem of being unable to log in and account theft caused by performing login operations through accounts, and improving the reliability and security of game login services.
[0077] At the same time, based on the game login system, a safe and universal account resource platform can be built using the blockchain account system, which can be traced, stored and traded. The game server can anchor the assets of the characters of each server of each game based on the game login account system. Therefore, when trading accounts or even props, real-time transactions can be carried out based on the smallest atomic unit, and a trust mechanism can be established without relying on a third party.
[0078] Corresponding to the above method embodiment, this embodiment further provides a game login device, which is arranged on a game server; a first game is running on the game server; a token owned by a user is stored in a preset blockchain, and each token corresponds to a game character; Figure 6 As shown, the device comprises:
[0079] The acquisition module 61 is used to acquire the candidate token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain according to the identity information of the user to be logged in;
[0080] The login module 62 is used to provide alternative tokens to the user to be logged in, and in response to the confirmation instruction of the user to be logged in on the target token among the alternative tokens, perform login processing on the user to be logged in based on the game character corresponding to the target token.
[0081] The embodiment of the present invention provides a game login device, wherein the game server obtains an alternative token belonging to a first game from the tokens owned by the user to be logged in and stored in the blockchain according to the identity information of the user to be logged in; provides the alternative token to the user to be logged in, and in response to the confirmation instruction of the user to be logged in for the target token in the alternative token, performs login processing on the user to be logged in based on the game character corresponding to the target token. In this method, the tokens of each game character owned by the game user are stored in the blockchain, and when logging in to the game, the game server obtains all tokens corresponding to the game from the blockchain, and logs in to the game through the target token selected by the user; this method of logging in to the game does not rely on third-party services, and also avoids the risk of account loss or theft, thereby improving the reliability and security of game login.
[0082] Furthermore, the game server stores the hash value of the token and the attribute information of each hash value; the attribute information includes one or more of game attributes, server attributes and character attributes; the login module is also used to: obtain the target attribute information corresponding to the hash value of the target token; associate the target attribute information with the game character corresponding to the target token to complete the login processing for the logged-in user.
[0083] Furthermore, the above-mentioned device also includes a verification module, which is used to receive identity information sent by the user to be logged in; return a random number to the user to be logged in, and receive signature information of the random number from the user to be logged in; wherein the signature information is obtained by signing the random number with the private key of the user to be logged in; based on the public key corresponding to the identity information, the signature information is verified, and if the verification is successful, the identity information of the user to be logged in is confirmed.
[0084] Furthermore, the above-mentioned device also includes an association module, which is used to obtain a token to be bound if a first game character newly created by a first user is received, and bind the first game character to the token to be bound; in the blockchain, the token to be bound, the first game character and the identity information of the first user are associated and saved.
[0085] Furthermore, the above-mentioned device also includes a transaction module, which is used to query whether the current user to whom the first token belongs is logging in through the game character corresponding to the first token if an ownership change event for the first token sent by the blockchain is received; if the current user is logging in through the game character corresponding to the first token, perform a kick operation on the current user to stop the current user from logging in through the game character corresponding to the first token.
[0086] Furthermore, the above-mentioned ownership change event is generated after the asset transaction for the first token is completed through the blockchain; during the asset transaction process, the first token is in a frozen state in the blockchain.
[0087] Furthermore, the above tokens include non-fungible tokens.
[0088] The game login device provided in the embodiment of the present invention has the same technical features as the game login method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0089] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned game login method.
[0090] See also Figure 7 As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the above-mentioned game login method.
[0091] Further, Figure 7 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .
[0092] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0093] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 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 gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.
[0094] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned game login method.
[0095] The computer program product of the game login method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0097] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0098] If the functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0099] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0100] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A game login method, characterized in that: The method is applied to a game server; A first game is running on the game server; The preset blockchain stores tokens owned by the user, each of which corresponds to a game character; the method includes: Receive identity information sent by the user to be logged in; return a random number to the user to be logged in, and receive signature information of the random number from the user to be logged in; wherein the signature information is obtained by signing the random number with the private key of the user to be logged in; verify the signature information based on the public key corresponding to the identity information, and if the verification is successful, confirm the identity information of the user to be logged in; According to the identity information of the user to be logged in, obtaining a candidate token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain; The alternative token is provided to the user to be logged in, and in response to a confirmation instruction of the user to be logged in for a target token among the alternative tokens, the user to be logged in is logged in based on a game character corresponding to the target token.
2. The method according to claim 1, characterized in that: The game server stores the hash value of the token and the attribute information of each hash value; the attribute information includes one or more of game attributes, server attributes and character attributes; The step of performing login processing on the user to be logged in based on the game character corresponding to the target token includes: Obtain target attribute information corresponding to the hash value of the target token; The target attribute information is associated with the game character corresponding to the target token to complete the login process for the user to be logged in.
3. The method according to claim 1, characterized in that The method further comprises: If a first game character newly created by a first user is received, a token to be bound is obtained, and the first game character is bound to the token to be bound; In the blockchain, the token to be bound, the first game character, and the identity information of the first user are associated and saved.
4. The method according to claim 1, characterized in that: The method further comprises: If an ownership change event for a first token sent by the blockchain is received, query whether the current user to whom the first token belongs is logging in through the game character corresponding to the first token; If the current user is logging in through the game character corresponding to the first token, a kick-out operation is performed on the current user to stop the current user from logging in through the game character corresponding to the first token.
5. The method according to claim 4, characterized in that The ownership change event is generated after an asset transaction is completed for the first token through the blockchain; During the asset transaction process, the first token is in a frozen state in the blockchain.
6. The method according to claim 1, characterized in that The tokens include non-fungible tokens.
7. A game login device, characterized in that: The device is arranged on a game server; A first game is running on the game server; The preset blockchain stores tokens owned by the user, each of which corresponds to a game character; the device includes: The verification module is used to receive the identity information sent by the user to be logged in; return a random number to the user to be logged in, and receive the signature information of the random number by the user to be logged in; wherein the signature information is obtained by signing the random number with the private key of the user to be logged in; based on the public key corresponding to the identity information, the signature information is verified, and if the verification is successful, the identity information of the user to be logged in is confirmed; An acquisition module, configured to acquire, according to the identity information of the user to be logged in, a candidate token belonging to the first game from the tokens owned by the user to be logged in and stored in the blockchain; The login module is used to provide the alternative tokens to the user to be logged in, and in response to the confirmation instruction of the user to be logged in on the target token among the alternative tokens, perform login processing on the user to be logged in based on the game character corresponding to the target token.
8. An electronic device, characterized in that: It includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the game login method described in any one of claims 1-6.
9. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the game login method described in any one of claims 1-6.
