CN111202987A - Login control method and device for game application - Google Patents

Login control method and device for game application Download PDF

Info

Publication number
CN111202987A
CN111202987A CN202010009132.6A CN202010009132A CN111202987A CN 111202987 A CN111202987 A CN 111202987A CN 202010009132 A CN202010009132 A CN 202010009132A CN 111202987 A CN111202987 A CN 111202987A
Authority
CN
China
Prior art keywords
game
user
duration
client
record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010009132.6A
Other languages
Chinese (zh)
Inventor
刘龙坡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010009132.6A priority Critical patent/CN111202987A/en
Publication of CN111202987A publication Critical patent/CN111202987A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/73Authorising game programs or game devices, e.g. checking authenticity

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a login control method of a game application, which comprises the following steps: receiving a login request sent by a client, wherein the login request comprises a user identifier; acquiring corresponding registration information from the blockchain according to the user identifier, and determining the current game limited duration corresponding to the user identifier according to the current system time and age information included in the registration information; acquiring a corresponding game record from the blockchain according to the user identification, and calculating the accumulated game duration of the user identification within a set period through the game record, wherein the accumulated game duration comprises the game duration of the user indicated by the user identification on at least one game application accessed to the blockchain network; and if the accumulated game time length is not less than the current game limit time length, executing a first game control strategy, and limiting the user indicated by the user identification to log in the blockchain network by executing the first game control strategy. The method and the device realize effective limitation on the time length of the game played by the user.

Description

Login control method and device for game application
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a method and an apparatus for controlling login of a game application.
Background
The explosion of online games provides diversified entertainment for users, and also causes social problems, such as users being enthusiastic in games, especially teenager users. The long-time game of the user not only affects work or study, but also harms physical health.
Therefore, how to limit the time length of the user playing the game is an urgent technical problem to be solved in the prior art.
Disclosure of Invention
Embodiments of the present application provide a method and an apparatus for controlling login of a game application, so that a user can be controlled to log in the game application at least to a certain extent, and a game time of the user is prevented from being too long.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of the embodiments of the present application, there is provided a login control method for a game application, applied to a node in a blockchain network, including:
receiving a login request sent by a client, wherein the login request comprises a user identifier;
acquiring corresponding registration information from a block chain according to the user identifier, and determining the current game limited duration corresponding to the user identifier according to the current system time and age information included in the registration information; and
acquiring a corresponding game record from a blockchain according to the user identifier, and calculating the accumulated game duration of the user identifier within a set period through the game record, wherein the accumulated game duration comprises the game duration of the user indicated by the user identifier on at least one game application accessed to the blockchain network;
and if the accumulated game duration is not less than the current game limit duration, executing a first control strategy, and limiting the user indicated by the user identification to log in the blockchain network by executing the first game control strategy.
According to an aspect of the embodiments of the present application, there is provided a login control apparatus for a game application, applied to a node in a blockchain network, the apparatus including:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a login request sent by a client, and the login request comprises a user identifier;
the game limited duration determining module is used for acquiring corresponding registration information from the block chain according to the user identifier and determining the current game limited duration corresponding to the user identifier according to the current system time and age information included in the registration information; and
the accumulated game duration determining module is used for acquiring a corresponding game record from a block chain according to the user identifier, and calculating the accumulated game duration of the user identifier within a set period according to the game record, wherein the accumulated game duration comprises the game duration of a user indicated by the user identifier on at least one game application accessed to the block chain network;
and the login limiting module is used for executing a first game control strategy if the accumulated game time length is not less than the current game limit time length, and limiting the user indicated by the user identification to log in the blockchain network by executing the first game control strategy.
In the technical scheme provided by some embodiments of the application, a plurality of game applications are accessed through a blockchain network, so that the limitation of a user to log in the game applications through limiting the user to log in the blockchain network is realized; moreover, the user needs to log in the game application through the log-in block chain network, so that the game records of the user in each game application are conveniently recorded, and the accumulated game duration of the user is further calculated.
Further, the game record and the registration information of the user are written into the blockchain, so that nodes in the blockchain network can obtain accumulated game duration in a plurality of game applications based on calculation according to the game record and calculate current game limited duration of the user based on the registration information, and therefore when the accumulated game duration corresponding to the user identifier is not less than the corresponding current game limited duration, the user indicated by the user identifier is limited to log in to the blockchain network by executing a first control strategy, the game application indicated by the user identifier and used for logging in to the blockchain network is further limited, the phenomenon that the time for the user to play in each game application is too long can be effectively avoided, and the time for the user to play is effectively controlled.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a schematic diagram of a block chain network to which the technical solution of the embodiments of the present application can be applied;
FIG. 2 illustrates a schematic diagram of a blockchain shown in accordance with one embodiment;
FIG. 3 is a flow diagram illustrating a login control method for a gaming application, according to one embodiment;
FIG. 4 is a flow diagram illustrating a login control method of a gaming application according to another embodiment;
FIG. 5 is a flow diagram illustrating a login control method of a gaming application according to yet another embodiment;
FIG. 6 is a flow diagram of steps in one embodiment after step 310 of the corresponding embodiment of FIG. 3;
FIG. 7 is a flow diagram of steps in one embodiment after step 550 of the corresponding embodiment of FIG. 5;
FIG. 8 is a flow diagram of step 330 of the corresponding embodiment of FIG. 3 in one embodiment;
FIG. 9 is a flow diagram of steps in one embodiment after step 410 of the corresponding embodiment of FIG. 4;
FIG. 10 is a flow diagram of steps in one embodiment after step 930 of the corresponding embodiment of FIG. 9;
FIG. 11 is a flow diagram illustrating a login control method of a gaming application according to yet another embodiment;
FIG. 12 is a block diagram illustrating a login control device of a gaming application, according to one embodiment;
FIG. 13 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Referring to fig. 1, fig. 1 is an alternative structural diagram of a blockchain network 100 according to an embodiment of the present invention, where the blockchain network 100 includes a distributed system formed by connecting a plurality of nodes 110 in a network communication manner, where the nodes 110 may be any type of computing devices (e.g., servers, user terminals, etc.) in an access network.
The blockchain network 100 has access to a number of game applications, and specifically, nodes in the blockchain network can communicate with servers corresponding to the game applications.
The nodes 110 include at least the terminal where the game player is located so that the client in the user's game player's own terminal communicates with other nodes 110 in the blockchain network to log in a game application accessed to the blockchain network through the blockchain network 100.
In an embodiment, the node 110 may further include an operator node, where the operator node is a computer device where the operator is located, and the operator performs game application distribution after logging in to the blockchain network based on a client in the computer device where the operator is located, and the game application distribution in the blockchain network is that the game application is accessed to the blockchain network, so that the client where the user as the game player is located may log in the accessed game application after logging in to the blockchain network.
In an embodiment, the node 110 may also be a server of the game application, that is, the server of the game application on one hand controls the user to log in the game application as a node in the blockchain network, and on the other hand, can provide a service for the client after the user logs in the game application.
A Peer-To-Peer (P2P, Peer To Peer) network is formed among the nodes 110, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In the system, any machine such as a server and a terminal can be added to form a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer.
Referring to the functionality of each node in the blockchain network 100 shown in fig. 1, the functions involved include:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, wherein the recording data such as registration information of a user, game records of the user and the like are used for the other nodes to add the recording data to the block when the source and integrity of the recording data are verified successfully.
The service implemented by the application may include:
2.1) wallet, for providing the function of transaction of electronic money, including initiating transaction (i.e. sending the transaction record of current transaction to other nodes in the blockchain network, after the other nodes are successfully verified, storing the record data of transaction in the temporary block of the blockchain as the response of affirming the transaction is valid; of course, the wallet also supports the querying of the remaining electronic money in the electronic money address;
2.2) intelligent contracts, computerized agreements, which can execute the terms of a certain contract, are implemented by codes deployed on the shared ledger for execution when certain conditions are met, and are used to complete automated transactions according to actual business requirement codes, for example, after a login request of a client is received, the login request is rejected or the client is allowed to log in to the blockchain network according to the intelligent contracts; of course, the smart contract may also be a contract that performs processing on received information, and is not particularly limited herein.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks. The record data may be registration information for registering the user in the blockchain network, a game record in a game application accessed by the user in the blockchain network, and the like.
Referring to fig. 2, fig. 2 is an alternative schematic diagram of a block chain according to an embodiment of the present invention, where each block includes a hash value of a transaction record stored in the block (the hash value of the block) and a hash value of a previous block, and the blocks are connected by the hash value to form the block chain. The block may include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 3 shows a flowchart of a login control method of a game application applied to a node in a blockchain network according to one embodiment of the present application. Referring to fig. 3, the login control method for the game application at least includes steps 310 to 370, which are described in detail as follows:
step 310, receiving a login request sent by a client, where the login request includes a user identifier.
Step 330, acquiring corresponding registration information from the blockchain according to the user identifier, and determining the current game limited duration corresponding to the user identifier according to the current system time and age information included in the registration information.
A user in the blockchain network interacts with other nodes in the blockchain network through a client.
The user identification is used to identify the requested login user in the blockchain network. In order to implement the method of the present disclosure, a user needs to register in a blockchain network, and a node generates a user identifier for uniquely identifying the user in the blockchain network for the user on the one hand; on the other hand, registration information of the user is received, and the registration information is written into the block chain, so that the block chain is synchronized to other nodes in the block chain network. Therefore, the block chain network is convenient to manage and log in the user.
The blockchain network has access to a plurality of game applications, and if a game player needs to play a game in the game applications accessed in the blockchain network, the game player needs to log in the blockchain network first. Thus, the login request in step 310 is initiated for logging into the blockchain network.
In one embodiment, the user may select the desired gaming application (for ease of differentiation, the gaming application selected by the user to be accessed is referred to as the target gaming application) prior to initiating the login request, such that the login request indicates the target gaming application.
In another embodiment, the user may not select a game application before initiating the login request, but may select the game application to enter upon successfully logging into the blockchain network, such that the login request may not indicate the target game application.
In this embodiment, the registration information of the user at least includes age information of the user, where the age information may be information indicating the year, month, and day of birth of the user, or may be a registration age indicating when the user registers in the blockchain network, and is not particularly limited herein.
The game limited duration is used for limiting the total maximum game duration of all game applications accessed by the user in the blockchain network.
The current game defined length is a game defined length of time corresponding to the current system time of the user indicated by the user identifier, in other words, the current game defined length of time is related to the age information of the user indicated by the user identifier and the current system time for the user. The current system time indicates the current time of year, month and day, and can also be accurate to point.
In one embodiment, the game limit duration corresponds to a set period, such as a set daily game limit duration, a game limit duration every three days, a game limit duration every week, a game limit duration every month, and the like, and the set period may be set according to actual situations and is not limited herein. In the solution of the present disclosure, the game limited duration is related to the age, in other words, if the ages of the users are different, the game limited durations of the users are different, and therefore, the current game limited duration corresponding to the current system time calculated for the users is different for different years.
For the user, the age of the user changes with time, and therefore, the current age of the user needs to be calculated based on the current system time corresponding to the login request and the age information of the user, and then the current game limited time length corresponding to the current age of the user is determined according to the corresponding relationship between the age and the game limited time length.
And step 350, acquiring a corresponding game record from the blockchain according to the user identifier, and calculating the accumulated game duration of the user identifier within a set period through the game record, wherein the accumulated game duration comprises the game duration of the user indicated by the user identifier on at least one game application accessed to the blockchain network.
In the scheme of the disclosure, after a user exits any game application accessed to the blockchain network each time, the client generates a game record for the user correspondingly. Each game record at least comprises a game starting time when the user starts playing the game and a quitting time when the user quits the game.
And then, writing the game record into the blockchain and synchronizing the game record to other nodes in the blockchain network, so that any node can acquire the blockchain in which the game record of the user is written, and the node can conveniently perform game login control on the user.
The accumulated game duration is obtained by accumulating the game record running time of the user in each game application accessed to the blockchain network according to the user identification.
The accumulated game duration is obtained by counting the game records in the set duration. Of course, the set period is the same as the set period of the current game for the limited time period. For example, if the game limited duration is the longest game time of the limited user in a day, the accumulated game duration is the game record in a certain day.
The acquired game records of the user are all game records after the user indicated by the user identifier is registered in the blockchain network, so the game records corresponding to the set period are firstly filtered from the game records obtained in step 410. And then, accumulating the game duration according to the game starting time and the exit time in the game record in the set period to obtain the accumulated game duration corresponding to the set period by the user.
In a specific embodiment, whether a certain game record is within a set time limit may be determined according to a game start time, a game exit time, and the like in the game record, which is not specifically limited herein.
For example, if the game start time in the game record a is 2019-12-15-22:30, the game exit time is 2019-12-16-00:45, and the set period is in days, for example, from 00:00 to 24:00, if the game start time is determined to be within the set game period, the game record a is within the game period defined by the date of 12 and 15 days in 2019; if the game record is judged to be in the set game period according to the game release time, the game record A is in the game period limited by the date of 12, 16 and 2019.
Step 370, if the accumulated game duration is not less than the current game limit duration, executing a first game control strategy, and limiting the user indicated by the user identifier to log in the blockchain network by executing the first game control strategy.
In an embodiment, the first game control policy is to reject the login request, so that when the accumulated game duration corresponding to the user identifier is not less than the current game limit duration, the user cannot continue to play any game application accessed on the blockchain network until the user can continue to play the game in the next game duration accumulation period, thereby effectively avoiding the user's game duration from being too long.
In another embodiment, the first game control strategy is to place the login request sent by the client in a waiting area, and the node limits the client from logging in to the blockchain network by placing the login request in the waiting area. Further, after the login request is placed in the waiting area, the login request is taken out at a set time interval, and the login request is processed.
In another embodiment, the first game control strategy may also be to send a learning task to the client, such as a test question exercise, a course explanation video, a science video. After the user where the client is located finishes test question exercise or the course explanation video is played, the node controls the client to log in the block chain network. When the accumulated game time corresponding to the user identification is not less than the current game limit time, the learning task is sent to the client, which is equivalent to delaying the client from logging in the block chain network, so that the game time of the user can be effectively avoided from being too long.
In other embodiments, the first game control policy may also be other policies that prevent the user from logging into the blockchain network immediately, and is not limited herein.
In the prior art, the game applications are independent from each other, and because the information among the game platforms is not intercommunicated, after a user reaches the correspondingly limited game duration on one game platform, the user logs in other game platforms to continue playing the game, so the game control in the prior art is easy to bypass, and the game duration of the user can not be effectively limited.
In the scheme of the disclosure, the game application is accessed through the blockchain network, and the user logs in the game application through logging in the blockchain network, so that the user is limited to log in the game application by limiting the user to log in the blockchain network; moreover, the user needs to log in the game application through the log-in block chain network, so that the game records of the user in each game application are conveniently recorded, and the accumulated game duration of the user is further calculated.
Furthermore, the game record and the registration information of the user are written into the blockchain, so that the nodes in the blockchain network can obtain the accumulated game duration in the plurality of game applications based on the calculation according to the game record and calculate the game limit duration of the user based on the registration information, and then the client is allowed to log in the blockchain network only when the accumulated game duration of the user is less than the game limit duration, so that the overlong time for the user to play in each game application can be effectively avoided. Moreover, since whether to execute the first game control policy is controlled by the registration information and the game record of the user, the game login control is performed on the user in a targeted manner.
In one embodiment, as shown in fig. 4, the method further comprises:
and step 410, if the accumulated game duration is less than the current game limit duration, executing a second game control strategy, accessing the client to the blockchain network by executing the second game control strategy, and logging in a game application by accessing the blockchain network.
In one embodiment, the second game control policy may be to immediately access the client to a blockchain network, such that the client enters a game application accessed by the blockchain network based on the blockchain network.
In another embodiment, the second game control policy may be to increase the client's rating or credit on the blockchain network while logging the client onto the blockchain network. The ratings or points may assist the user in skill upgrades, equipment redemption, skin redemption, prop redemption, etc. in the gaming application.
Further, the increased level (or credit) may be made according to a difference between the current game play limit time period and the accumulated game play time period. For example, a plurality of difference ranges are preset, each difference range corresponds to a level added value, and therefore, the level added value is determined correspondingly through the difference between the current game limited time length corresponding to the user identifier and the accumulated game time length. A
In another embodiment, the second game control policy may also be to push clearance information to the client while logging the client in the blockchain network, so as to assist the user where the client is located to achieve game clearance through the clearance information.
After the client logs in to the blockchain network, the client can log in to the game application accessed by the blockchain network correspondingly.
If the login request indicates the target game application that the user wants to login, after logging in to the blockchain network, the client correspondingly logs in to the target game application, that is, the user can enter the game interface of the target game application based on the client.
If the login request does not indicate the target game application which the user wants to login, after the client logs in the blockchain network, the user can select a game in the client interface after logging in the blockchain network, and then the client enters the game interface of the target game application according to the target game application selected by the user.
In one embodiment, as shown in fig. 5, the method further comprises:
step 510, receiving a registration request sent by a client for a user to be registered.
Step 530, a private key is randomly generated for the user to be registered according to the registration request.
And 550, encrypting the private key through an elliptic curve encryption algorithm to obtain a public key.
Step 570, returning the generated private key and public key to the client, and logging in the blockchain network by the client through the public key and the private key.
As described above, if a user wants to log in a game application based on the blockchain network, the user needs to register in the blockchain network.
After the node generates a private key and a public key for the user, the client where the user is located logs in the blockchain network through the private key and the public key. For example, a user logs in with a public key as an account number and a private key as a password.
In one embodiment, the private key of the user in the blockchain network is not public and needs to be kept secret. Therefore, the public key of the user can be used as the user identification to acquire the registration information and the game record from the block chain.
The private key and the public key generated by the node for the user are corresponding. Specifically, if a private key is used to sign certain data, the signed data U can be decrypted only by using a public key; on the contrary, if a certain data is encrypted by the public key of the user, the encrypted data can be decrypted only by the private key of the user.
In an embodiment, the client may also be a client where the operator node is located. Thus, the user as the operator registers through step 510 and step 570 as above, and obtains the private key and the public key correspondingly.
Therefore, the user as the operator can log in the blockchain network axis through the own public key and private key, and can issue the game application.
In an embodiment, the login request indicates the private key and the public key of the login user, as shown in fig. 6, after step 310, the method further includes:
and step 610, performing matching verification on the private key and the public key indicated by the login request.
In a blockchain network, the private key of the user is not disclosed. Therefore, the private key of the login request indicated in the login request means that some data in the login request is obtained by the private key of the user. In other words, the private key of the login user indicated by the login request is not an explicit indication of the private key.
In an embodiment, the login request includes signature data (assumed as data B) obtained by signing an initial data (assumed as data a) with a private key of the login user and a public key of the login user, and the matching verification process in step 610 is:
decrypting the data B in the login request through the public key of the login user to obtain data C; comparing the data C with the data A, and if the data A is consistent with the data C, determining that the private key of the login user indicated by the login request is matched with the public key; otherwise, if the data A is inconsistent with the data C, the private key of the login user indicated by the login request is determined not to be matched with the public key.
If the verification determines that the private key indicated by the login request matches the public key, step 330 and step 350 are performed.
If the verification determines that the private key indicated by the login request does not match the public key, then step 630 is executed: the login request is denied.
In one embodiment, as shown in fig. 7, after step 550, the method further comprises:
and step 710, performing hash operation on the public key to obtain the wallet address of the user to be registered.
And step 730, writing the registration information of the user to be registered into the blockchain in association with the wallet address, and synchronizing the registration information to other nodes in the blockchain network.
The process of step 710 specifically includes: performing SHA-256 Hash calculation on the public key to obtain a first Hash value; RIPEMD-160 calculation is carried out on the first hash value to obtain a second hash value; performing SHA-256 hash calculation on the second hash value to obtain a third hash value; performing SHA-256 hash calculation on the third hash value again to obtain a fourth hash value; and adding a plurality of first bytes, for example, four bytes, of the third hash value to the back of the fourth hash value to obtain the wallet address of the user to be registered.
After the wallet address is generated for the user, the game record and the registration information of the user can be written into the blockchain in association with the wallet address, so that the registration information and the game record of the user are correspondingly acquired from the blockchain.
It should be noted that, based on the characteristics of the elliptic curve encryption algorithm and the hash algorithm, the process of generating the private key, the public key and the wallet address for the user by the node is irreversible, in other words, although the generation process is to randomly generate the private key-generate the public key according to the private key-generate the wallet address according to the public key, if the wallet address of the user is known, the public key of the user cannot be reversely calculated; similarly, knowing the public key of the user, the private key of the user cannot be calculated reversely.
Thus, for users in the blockchain network, the private key is not public, while the public key and wallet address may be public.
In one embodiment, the age information includes a registered age of the user, and the registration information further includes a registration time, as shown in fig. 8, and the step 330 determines a current game limit duration corresponding to the user identifier by using the current system time and the age information included in the registration information, including:
and 810, calculating to obtain a time difference according to the registration time and the current time.
And step 830, calculating the current age of the user according to the time difference and the registered age of the user.
And 850, determining a game limited time length corresponding to the current age according to the current age.
Up to this point, the current age of the user corresponding to the current time of the login request is calculated from the registration time in the registration information and the registration age of the user, whereby the game limited time period is determined by the determined current age.
In one embodiment, as shown in fig. 9, after step 410, the method further comprises:
step 910, receiving a game login request sent by a client, where the game login request indicates a target game application requesting to login.
Step 930, controlling the client to log in to the target game application according to the game login request.
In this embodiment, after the client logs in to the blockchain network, the user may select a game application in the corresponding interface, so that the node controls the client to log in to the target game application according to the target game application indicated by the game login request.
In one embodiment, as shown in fig. 10, after step 930, the method further includes:
step 1010, obtaining the game starting time and the game exiting time of the client in the target game application according to the game exiting instruction sent by the client.
After entering a game interface of a target game application in a client, the client correspondingly monitors the game, and if a user starts the game, the game starting time is correspondingly recorded; and if the client is monitored to quit the target game application, correspondingly recording the quit time.
Thus, after the client sends the game exit instruction to the node, the node can correspondingly acquire the game start time and the exit time from the client.
Step 1030, generating a game record according to the user identifier, the game start time and the exit time.
Step 1050, the generated game record is released to a record pool of the blockchain network to wait for the generated game record to be written into the blockchain.
In one embodiment, step 1050 further includes:
carrying out hash operation on the game record to obtain an abstract;
signing the abstract through a private key of the node to obtain signature data;
generating issuing data by using the game record, the signature data and the public key of the node;
and temporarily storing the release data into a record pool of the block chain network to wait for game records in the release data to be written into the block chain.
Through the above process, after acquiring the release data in the record pool from the record pool, the node may verify the game record based on the game record in the release data, the public key of the node, and the signature data to determine whether the game record in the release data is not tampered, and if the game record in the release data is tampered, the game record in the release data is not written into the blockchain, otherwise, if the game record in the release data is not tampered, the game record in the release data is written into the blockchain.
In one embodiment, as shown in fig. 11, the method further comprises:
step 1110, obtain the pending game record from the record pool of the blockchain network.
Step 1130, filtering the invalid game record in the game record to be processed to obtain the game record to be written into the block chain, wherein the invalid game record is the game record of which the time length of the single game is less than the set time length.
The set time period may be set according to actual needs, and is not specifically limited herein, for example, the set time period is 1 minute, 5 minutes, 10 minutes, and the like.
And filtering the invalid game record, so that the obtained game record to be written into the block chain is the game record of which the single game time length is not less than the set time length.
In step 1150, a tile is constructed from the game record to be written into the chain of tiles.
In step 1170, the blocks are linked to blockchains and synchronized in a blockchain network.
In an embodiment, the game record in the record pool exists on a carrier of release data, the release data comprising the game record, signature data corresponding to the game record and a public key of a data issuer to which the release data corresponds. Before step 1150, the method further comprises verifying the game record to be written to the blockchain by:
decrypting the signature data in the release data through a public key of a release party in the release data to obtain decrypted data; and
carrying out Hash operation on the game record in the release data to obtain first data;
comparing whether the first data is consistent with the decrypted data, if so, indicating that the game record in the issued data is not tampered, and executing step 1150;
otherwise, if the game records are inconsistent, the game records in the issued data are falsified, and the game records are discarded.
The game records written into the blockchain are all guaranteed to be the game records which are not tampered through the process.
In step 1150, the data in a tile may include a plurality of game records, and in one embodiment, the game record included in each tile may be determined according to the data size set for the tile.
The constructed block at least comprises the hash value of the previous block, the hash value of the block and the timestamp, so that the constructed block is linked into the block chain according to the timestamp of the block. After linking the constructed block to the blockchain, the blockchain is synchronized to other nodes in the blockchain network.
The process of writing the registration information of the user into the block chain refers to the process of writing the game record into the block chain, which is not described herein again.
Embodiments of the apparatus of the present application are described below, which may be used to perform the methods of the above-described embodiments of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method described above in the present application.
The present disclosure provides a login control apparatus 1200 for a game application, which is applied to a node in a blockchain network, as shown in fig. 12, and includes:
the receiving module 1210 is configured to receive a login request sent by a client, where the login request includes a user identifier.
And the game limited duration determining module 1230 is configured to obtain registration information of a corresponding user from the blockchain of the node according to the user identifier, and determine the current game limited duration corresponding to the user identifier according to the current system time and age information included in the registration information.
And a cumulative game duration determining module 1250 configured to obtain a corresponding game record from the blockchain according to the user identifier, and calculate a cumulative game duration of the user identifier within a set time limit according to the game record, where the cumulative game duration includes a game duration of a user indicated by the user identifier on at least one game application accessed to the blockchain network.
A login limiting module 1270, configured to execute a first game control policy if the accumulated game duration is not less than the current game limit duration, and limit, by executing the first game control policy, the user indicated by the user identifier to log in to the blockchain network.
In one embodiment, the apparatus further comprises:
and the login module is used for executing a second game control strategy if the accumulated game time is less than the current game limit time, accessing the client into the block chain network by executing the second game control strategy, and logging in the game application by accessing the block chain network.
In one embodiment, the game limit duration corresponds to a set period, and the accumulated game duration determining module 1250 includes:
the game record acquisition unit is used for acquiring the game record of the user from the block chain of the node according to the user identification;
and the game duration accumulating unit is used for accumulating the game duration within the set time limit according to the game record to obtain the accumulated game duration.
In one embodiment, the apparatus further comprises:
and the registration request receiving module is used for receiving a registration request sent by the client for the user to be registered.
And the private key generation module is used for randomly generating a private key for the user to be registered according to the registration request.
And the encryption module is used for encrypting the private key through an elliptic curve encryption algorithm to obtain a public key.
And the return module is used for returning the generated private key and the generated public key to the client, and the client logs in the block chain network through the public key and the private key.
In one embodiment, the login request indicates a private key and a public key of the login user, the apparatus further comprises:
and the matching verification module is used for performing matching verification on the private key and the public key indicated by the login request.
And the first jumping module is configured to jump to the game limited duration determining module 1230 and the accumulated game duration determining module 1250 if the verification determines that the private key in the login request matches the public key.
And the second skipping module is used for refusing the login request if the private key in the login request is verified and determined to be not matched with the public key.
In one embodiment, the apparatus further comprises:
and the wallet address generating module is used for carrying out hash operation on the public key to obtain the wallet address of the user to be registered.
And the writing module is used for writing the registration information of the user to be registered into the blockchain in association with the wallet address and synchronizing the registration information to other nodes in the blockchain network.
In one embodiment, the limited game duration determining module 1230 includes:
and the time difference calculating unit is used for calculating the time difference according to the registration time and the current system time.
And the current age calculating unit is used for calculating the current age of the user indicated by the user identification according to the time difference and the registered age of the user.
And the game limited duration determining unit is used for determining the current game limited duration corresponding to the current age according to the current age.
In one embodiment, the apparatus further comprises:
and the game login request receiving module is used for receiving a game login request sent by the client after the client accesses the block chain network, wherein the game login request indicates the target game application which requests to login.
And the application login module is used for controlling the client to log in the target game application according to the game login request.
In one embodiment, the apparatus further comprises:
and the game quitting instruction receiving module is used for acquiring the game starting time and the quitting time of the client in the target game application according to the game quitting instruction sent by the client.
And the game record generating module is used for generating game records according to the user identification, the game starting time and the exit time.
And the temporary storage module is used for issuing the generated game record to a record pool of the block chain network so as to wait for writing the generated game record into the block chain.
In one embodiment, the apparatus further comprises:
and the game record to be processed acquiring module is used for acquiring the game record to be processed from the record pool of the blockchain network.
And the filtering module is used for filtering invalid game records in the game records to be processed to obtain the game records to be written into the block chain, wherein the invalid game records are the game records with the time length of a single game lower than the set time length.
And the block building module is used for building blocks according to the game records to be written into the block chain.
A linking and synchronization module for linking tiles to a blockchain and synchronizing in a blockchain network.
The implementation process of the functions and actions of each module in the device is specifically described in the implementation process of the corresponding step in the login control method of the game application, and is not described herein again.
It is understood that these modules may be implemented in hardware, software, or a combination of both. When implemented in hardware, these modules may be implemented as one or more hardware modules, such as one or more application specific integrated circuits. When implemented in software, the modules may be implemented as one or more computer programs executing on one or more processors.
FIG. 13 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1300 of the electronic device shown in fig. 13 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 13, a computer system 1300 includes a Central Processing Unit (CPU)1301 that can perform various appropriate actions and processes, such as performing the methods in the above-described embodiments, according to a program stored in a Read-Only Memory (ROM) 1302 or a program loaded from a storage portion 1308 into a Random Access Memory (RAM) 1303. In the RAM 1303, various programs and data necessary for system operation are also stored. The CPU 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An Input/Output (I/O) interface 1305 is also connected to bus 1304.
The following components are connected to the I/O interface 1305: an input portion 1306 including a keyboard, a mouse, and the like; an output section 1307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage portion 1308 including a hard disk and the like; and a communication section 1309 including a network interface card such as a LAN (Local area network) card, a modem, or the like. The communication section 1309 performs communication processing via a network such as the internet. A drive 1310 is also connected to the I/O interface 1305 as needed. A removable medium 1311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1310 as necessary, so that a computer program read out therefrom is mounted into the storage portion 1308 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications component 1309 and/or installed from removable media 1311. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 1301.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A login control method of a game application is applied to a node in a block chain network, and is characterized by comprising the following steps:
receiving a login request sent by a client, wherein the login request comprises a user identifier;
acquiring corresponding registration information from a block chain according to the user identifier, and determining the current game limited duration corresponding to the user identifier according to the current system time and age information included in the registration information; and
acquiring a corresponding game record from a blockchain according to the user identifier, and calculating the accumulated game duration of the user identifier within a set period through the game record, wherein the accumulated game duration comprises the game duration of the user indicated by the user identifier on at least one game application accessed to the blockchain network;
and if the accumulated game duration is not less than the current game limit duration, executing a first game control strategy, and limiting the user indicated by the user identification to log in the blockchain network by executing the first game control strategy.
2. The method of claim 1, further comprising:
and if the accumulated game duration is less than the current game limit duration, executing a second game control strategy, accessing the client to the blockchain network by executing the second game control strategy, and accessing the client to a game application by accessing the blockchain network.
3. The method of claim 1, further comprising:
receiving a registration request sent by the client for a user to be registered;
randomly generating a private key for the user to be registered according to the registration request;
encrypting the private key through an elliptic curve encryption algorithm to obtain a public key;
and returning the generated private key and the generated public key to the client, and logging in the blockchain network by the client through the public key and the private key.
4. The method of claim 3, wherein the login request indicates a private key and a public key of a user requesting to login, and after receiving the login request sent by the client, the method further comprises:
matching and verifying a private key and a public key indicated by the login request;
if the verification determines that the private key indicated by the login request is matched with the public key, executing the step of acquiring corresponding registration information from the block chain according to the user identification;
and if the verification determines that the private key indicated by the login request is not matched with the public key, rejecting the login request.
5. The method of claim 3, wherein after the private key is encrypted by an elliptic curve cryptography algorithm to obtain a public key, the method further comprises:
carrying out Hash operation on the public key to obtain the wallet address of the user to be registered;
and writing the registration information of the user to be registered and the wallet address into the blockchain in an associated manner, and synchronizing the registration information and the wallet address to other nodes in the blockchain network.
6. The method of claim 1, wherein the age information includes a user registration age, the registration information further includes a registration time, and the determining a current game play limit duration corresponding to the user identifier from a current system time and the age information included in the registration information includes:
calculating to obtain a time difference according to the registration time and the current system time;
calculating the current age of the user indicated by the user identification according to the time difference and the registered age of the user;
and determining the current game limited duration corresponding to the current age according to the current age.
7. The method of claim 2, wherein after the executing the second game control strategy, the method further comprises:
after the client accesses the block chain network, receiving a game login request sent by the client, wherein the game login request indicates a target game application which requests to login;
and controlling the client to log in the target game application according to the game login request.
8. The method of claim 7, wherein after controlling the client to log into the target game application according to the game login request, the method further comprises:
obtaining the game starting time and the game exiting time of the client in the target game application according to the game exiting instruction sent by the client;
generating a game record according to the user identification, the game starting time and the quitting time;
temporarily storing the generated game record into a record pool of the block chain network to wait for the generated game record to be written into the block chain.
9. The method of claim 1, further comprising:
obtaining a game record to be processed from a record pool of the block chain network;
filtering invalid game records in the game records to be processed to obtain the game records to be written in the block chain, wherein the invalid game records are the game records with the time length of a single game lower than the set time length;
building blocks according to the game records of the block chain to be written;
the blocks are linked to the block chain and synchronized in the block chain network.
10. A login control device of a game application, which is applied to a node in a blockchain network, is characterized in that the device comprises:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a login request sent by a client, and the login request comprises a user identifier;
the game limited duration determining module is used for acquiring corresponding registration information from the block chain according to the user identifier and determining the current game limited duration corresponding to the user identifier according to the current system time and age information included in the registration information; and
the accumulated game duration determining module is used for acquiring a corresponding game record from a block chain according to the user identifier, and calculating the accumulated game duration of the user identifier within a set period according to the game record, wherein the accumulated game duration comprises the game duration of a user indicated by the user identifier on at least one game application accessed to the block chain network;
and the login limiting module is used for executing a first game control strategy if the accumulated game time length is not less than the current game limit time length, and limiting the user indicated by the user identification to log in the blockchain network by executing the first game control strategy.
CN202010009132.6A 2020-01-06 2020-01-06 Login control method and device for game application Pending CN111202987A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010009132.6A CN111202987A (en) 2020-01-06 2020-01-06 Login control method and device for game application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010009132.6A CN111202987A (en) 2020-01-06 2020-01-06 Login control method and device for game application

Publications (1)

Publication Number Publication Date
CN111202987A true CN111202987A (en) 2020-05-29

Family

ID=70780595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010009132.6A Pending CN111202987A (en) 2020-01-06 2020-01-06 Login control method and device for game application

Country Status (1)

Country Link
CN (1) CN111202987A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112354190A (en) * 2020-11-10 2021-02-12 网易(杭州)网络有限公司 Game login method and device and electronic equipment
CN114377403A (en) * 2022-01-12 2022-04-22 北京明朝万达科技股份有限公司 Game anti-addiction monitoring method and device, storage medium and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112354190A (en) * 2020-11-10 2021-02-12 网易(杭州)网络有限公司 Game login method and device and electronic equipment
CN114377403A (en) * 2022-01-12 2022-04-22 北京明朝万达科技股份有限公司 Game anti-addiction monitoring method and device, storage medium and equipment

Similar Documents

Publication Publication Date Title
CN112600841B (en) Credit record sharing method and device based on block chain and electronic equipment
CN108764870B (en) Transaction processing method and device based on block chain and electronic equipment
CN110380858B (en) Method and system for processing game consensus protocol of block chain
WO2020088108A1 (en) Blockchain-based data attestation method and apparatus, and electronic device
Miller et al. Permacoin: Repurposing bitcoin work for data preservation
JP7377312B2 (en) Systems and methods realized by blockchain
WO2020015635A1 (en) Distributed voting system, method and apparatus, and computer device and readable storage medium
JP2020522927A (en) Blockchain for general calculation
KR20180115779A (en) How to Implement a Block Chain for Controlling and Distributing Digital Content
KR20210008111A (en) Blockchain system with consensus algorithm based on proof-of -transaction and method there of
JP2019519137A (en) Distributed Transaction Propagation and Verification System
CN110489946B (en) Copyright authentication method, device, equipment and storage medium based on block chain
WO2015116998A2 (en) Electronic transfer and obligation enforcement system
CN110892674A (en) Transaction generation method and block verification method of block chain
JP2023076628A (en) Computer-implemented systems and methods relating to binary blockchain comprising one pair of coupled blockchains
CN108260015B (en) Voting data processing method and device and electronic equipment
JP2018101367A (en) Information processing system, information processing method, program and information processor
CN113221191B (en) Block chain-based data evidence storage method, device, equipment and storage medium
CN112418851A (en) Digital copyright registration, transaction and protection method and system
CN111202987A (en) Login control method and device for game application
JP2017023348A (en) Game system, score processing program, management device for game system and score processing method
KR102272511B1 (en) Project Management Platform
CN110278246B (en) Certificate storage service transfer method, device and equipment for alliance chain
JP7393343B2 (en) Control method, content management system, and program
JP2020047216A (en) Charge information generation program, charge information generation device and charge information generation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination