CN111198922B - Game resource management method and device based on block chain - Google Patents
Game resource management method and device based on block chain Download PDFInfo
- Publication number
- CN111198922B CN111198922B CN202010003003.6A CN202010003003A CN111198922B CN 111198922 B CN111198922 B CN 111198922B CN 202010003003 A CN202010003003 A CN 202010003003A CN 111198922 B CN111198922 B CN 111198922B
- Authority
- CN
- China
- Prior art keywords
- transaction
- game
- account
- resource
- address
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/70—Game security or game management aspects
- A63F13/79—Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
- A63F13/792—Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories for payment purposes, e.g. monthly subscriptions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/04—Payment circuits
- G06Q20/06—Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
- G06Q20/065—Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Theoretical Computer Science (AREA)
- General Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Technology Law (AREA)
- Computing Systems (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application discloses a game resource management method and device based on a block chain, and belongs to the technical field of networks. The method comprises the following steps: receiving transaction parameters which are sent by a game client and encrypted by adopting an asymmetric encryption algorithm; decrypting the transaction parameters by adopting an asymmetric decryption algorithm to obtain the address of the game resource account, the transaction resource value and the transaction type; generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value; broadcasting the target transaction record to other nodes in the blockchain network; and responding to a verification success instruction aiming at the target transaction record sent by other nodes, and adjusting the resource value of the game resource account number indicated by the address according to the transaction type and the transaction resource value. According to the method and the system, the resources of the game resource account number indicated by the address of the game resource account number can be directly managed through the transaction type and the transaction resource value by means of the blockchain technology, so that the transaction cost is reduced.
Description
Technical Field
The present disclosure relates to the field of network technologies, and in particular, to a method and an apparatus for managing game resources based on a block chain.
Background
At present, with the rapid development of the game industry, users can recharge their game account numbers through a third-party game transaction platform. However, in the process of recharging through the third-party game transaction platform, the user needs to pay extra transaction cost to the third-party game transaction platform, which results in higher transaction cost.
Disclosure of Invention
The embodiment of the disclosure provides a game resource management method and device based on a block chain, which can solve the problem that in the related art, a user needs to pay extra transaction cost to a third-party game transaction platform, so that the transaction cost is high. The technical scheme is as follows:
in one aspect, a method for managing game resources based on a blockchain is provided, and is applied to a target node in a blockchain network, and the method includes:
receiving transaction parameters which are sent by a game client and encrypted by adopting an asymmetric encryption algorithm, wherein the transaction parameters comprise: the address of the game resource account, the transaction resource value and the transaction type, wherein the transaction type comprises recharging, purchasing or cashing;
decrypting the transaction parameters by adopting an asymmetric decryption algorithm to obtain the address of the game resource account, the transaction resource value and the transaction type;
generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value;
broadcasting the target transaction record to other nodes in the blockchain network;
and responding to a verification success instruction aiming at the target transaction record sent by the other node, and adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value.
In another aspect, an apparatus for managing game resources based on a blockchain is provided, where the apparatus is applied to a target node in a blockchain network, and the apparatus includes:
the first receiving module is used for receiving transaction parameters which are sent by a game client and encrypted by adopting an asymmetric encryption algorithm, and the transaction parameters comprise: the address of the game resource account, the transaction resource value and the transaction type, wherein the transaction type comprises recharging, purchasing or cashing;
the decryption module is used for decrypting the transaction parameters by adopting an asymmetric decryption algorithm to obtain the address of the game resource account, the transaction resource value and the transaction type;
the first generation module is used for generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value;
a broadcasting module, configured to broadcast the target transaction record to other nodes in the blockchain network;
and the adjusting module is used for responding to a verification success instruction aiming at the target transaction record sent by the other nodes and adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value.
In yet another aspect, there is provided a blockchain based game resource management apparatus, the apparatus comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the blockchain based game resource management method of the above aspect.
In yet another aspect, a storage medium is provided, where at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the method for managing game resources based on blockchain according to the above aspect.
The beneficial effects brought by the technical scheme provided by the embodiment of the disclosure at least comprise:
the embodiment of the disclosure provides a game resource management method and device based on a block chain. And then generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value. And then broadcasting the target transaction record to other nodes in the blockchain network, and adjusting the resource value of the game resource account number indicated by the address according to the transaction type and the transaction resource value in response to a verification success instruction aiming at the target transaction record and sent by the other nodes. The method can directly manage the resources of the game resource account indicated by the address of the game resource account through the transaction type and the transaction resource value by means of the blockchain technology, and the process does not need to use a third-party game transaction platform for transaction, so that the transaction cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is apparent that the drawings in the description below are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings may be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment related to a method for managing game resources based on a blockchain according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for managing game resources based on a blockchain according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of another method for managing game resources based on a blockchain according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of a device for block chain-based game resource management according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of another game resource management device based on a blockchain according to an embodiment of the disclosure;
fig. 6 is a schematic structural diagram of a game resource management device based on a block chain according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of another game resource management device based on a block chain according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment related to a method for managing game resources based on a blockchain according to an embodiment of the present disclosure. As shown in FIG. 1, the implementation environment may include: a terminal 110 and a blockchain network 120. The terminals 110 may include, among other things, user terminals 111 and game developer terminals 112. The terminal 110 may be a personal computer, a notebook computer, a tablet computer, or a mobile phone, etc. which is equipped with a game client. The blockchain network 120 includes a plurality of nodes, each of which may be a server. The server may be a server, a server cluster composed of several servers, or a cloud computing service center. Referring to fig. 1, the blockchain network 120 may include three nodes, which are node 121, node 122, and node 123, respectively. The terminal 110 and any node in the blockchain network 120 can establish a connection through a wired network or a wireless network.
In the embodiment of the present disclosure, in order to ensure information intercommunication of the blockchain network 120, communication connections may be established between nodes in the blockchain network 120 through a wired network or a wireless network, that is, the communication connections between the nodes are wireless connections or wired connections, and information transmission may be performed between the nodes through the communication connections. Wherein the wireless connection may include: a wireless fidelity (wifi) connection, a data connection, a bluetooth connection, or an infrared connection, etc., which may include: a universal serial bus (usb) connection.
Optionally, for each node, it may further have a node identifier corresponding to the node, and node identifiers of other nodes in the blockchain network 120 except the node may be stored, so that each node may reliably broadcast the received data to other nodes through the communication connection according to the node identifiers of other nodes.
For example, referring to table 1, a node identification list maintained in each node is shown, which may include: node name and node identification. The node identifier may be an Internet Protocol (IP) address and any other information that can be used to identify the node, and table 1 only illustrates an IP address as an example. For example, referring to table 1, the node identifier corresponding to the node name node 1 is: 117.17.151.174.
TABLE 1
Node name | Node identification |
Node 1 | 117.17.151.174 |
Node 2 | 117.116.189.75 |
… | … |
Node N | 119.123.789.258 |
To ensure consistency of the data stored by the various nodes, the node receiving the data may send the data to any node in the blockchain network 120. After receiving the data, the any node can perform consensus processing on the data through a consensus algorithm and then broadcast the data to the block chain platform again, and continuously execute the consensus processing until the data stored in each node are consistent, so that the consistency of the data stored in each node can be ensured.
For example, in this embodiment of the disclosure, after the target node is based on the registration request, the public key, and the address of the game resource account sent by the game client, the target node may send the public key and the address of the game resource account to each node in the blockchain network, and after any node receives the public key and the address of the game resource account, the public key and the address of the game resource account may be subjected to consensus processing by using a consensus algorithm and then broadcast to the blockchain network again, and the consensus processing is continuously performed until the public key stored in each node and the address of the game resource account are consistent, so that consistency between the public key stored in each node and the address of the game resource account may be ensured.
It should be noted that, in the embodiment of the present disclosure, the blockchain network 120 may be a decentralized network system platform, i.e., the transaction records may be managed by the blockchain network 120 in a decentralized technology. Decentralization refers to: there is no concept of a central node in the blockchain network 120, the positions of the nodes in the blockchain network 120 are equal, and each node may store the same information.
Fig. 2 is a flowchart of a method for managing game resources based on a blockchain according to an embodiment of the present disclosure. The game resource management method may be applied to a target node in the blockchain network 120 shown in fig. 1. The target node may be any node in the blockchain network 120, for example the target node may be node 121. As shown in fig. 2, the method may include:
The transaction parameters may include an address of the game resource account, a transaction resource value, and a transaction type, and the transaction type may include a recharge, a purchase, a cash withdrawal, or the like. Alternatively, the transaction resource value may be a virtual value.
Wherein the asymmetric decryption algorithm corresponds to an asymmetric encryption algorithm.
And step 203, generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value.
The generated target transaction record may include at least an address of the game resource account number, a transaction type, and a transaction resource value.
After the target transaction record is generated by the target node, the target transaction record can be broadcast to other nodes of the blockchain network, after each node in the other nodes receives the target transaction record sent by the target node, the target transaction record can be verified by adopting a consensus algorithm, and after the target transaction record is successfully verified, a verification success instruction is sent to the target node, and meanwhile, the target transaction record is stored.
And step 205, responding to the verification success instruction aiming at the target transaction record sent by other nodes, and adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value.
To sum up, the embodiment of the present disclosure provides a game resource management method based on a block chain, which obtains an address of a game resource account, a transaction resource value, and a transaction type after decrypting a transaction parameter sent by a game client by using an asymmetric decryption algorithm. And then generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value. And then broadcasting the target transaction record to other nodes in the blockchain network, and adjusting the resource value of the game resource account number indicated by the address according to the transaction type and the transaction resource value in response to a verification success instruction aiming at the target transaction record and sent by the other nodes. The method can directly manage the resources of the game resource account indicated by the address of the game resource account through the transaction type and the transaction resource value by means of the blockchain technology, and the process does not need to use a third-party game transaction platform for transaction, so that the transaction cost is reduced.
Fig. 3 is a flowchart of a method for managing game resources based on a blockchain according to an embodiment of the present disclosure. The game resource management method can be applied to the target node in the blockchain network 120 shown in fig. 1 and the game client installed in the terminal 110. Alternatively, the target node may be any node in the blockchain network 120. For example, the target node may be node 121. As shown in fig. 3, the method may include:
step 301, the game client sends a registration request to the target node.
In the disclosed embodiment, the game client may send a registration request to the target node when detecting a user-triggered registration instruction.
Optionally, an account registration button may be disposed in a user interface of the game client, and the game client may generate a registration request and send the registration request to the target node when detecting a click operation of a user on the account registration button.
Step 302, the target node generates a key pair in response to the registration request.
After receiving the registration request sent by the game client, the target node may generate a unique key pair for the target node. Wherein the key pair may include a public key and a private key.
For example, the target node may randomly generate a private key in response to the registration request, and encrypt the private key using an encryption algorithm to obtain a public key. The public key is the game resource account of the game client, and the private key is the password for logging in the game resource account. Wherein the encryption algorithm may be an elliptic curve encryption algorithm.
Step 303, the target node generates an address of the game resource account based on the key pair.
After the target node generates the key pair, the public key in the key pair may be processed (for example, by using a hash algorithm) to obtain the address of the game resource account. The game resource account may be referred to as a wallet, and the address of the game resource account is also the address of the wallet.
And step 304, the target node sends the key pair and the address of the game resource account to the game client.
In this disclosure, after obtaining the addresses of the key pair and the game resource account, the target node may send the addresses of the key pair and the game resource account to the game client. Correspondingly, after receiving the addresses of the key pair and the game resource account, the game client can display the addresses of the key pair and the game resource account, so that the user can save the addresses of the key pair and the game resource account. The subsequent user can use the public key as a game resource account and use the private key as a password to log in the blockchain network. Meanwhile, the game client can store the address of the key pair and the game resource account.
Optionally, after sending the addresses of the key pair and the game resource account to the game client, the target node may send the public key in the key pair and the address of the game resource account to each node in the blockchain network, and after receiving the addresses of the public key and the game resource account, any node may perform consensus processing on the public key and the address of the game resource account through a consensus algorithm, and then broadcast the public key and the address of the game resource account to the blockchain network again, and continuously execute the consensus processing until the public key stored in each node and the address of the game resource account are consistent, so that consistency of the public key stored in each node and the address of the game resource account can be ensured.
It should be noted that the game client of the game developer may also send a registration request to the target node by executing step 301, and after receiving the registration request, the target node obtains the game developer account (i.e., the public key of the game developer), the password for logging in the game developer account (i.e., the private key of the game developer), and the address of the game developer account (i.e., the address of the game developer wallet) by executing steps 302 to 303. Optionally, the game developer may package the game developer account and the address of the game developer account into an installation package of the game client. Or the game developer account and the address of the game developer account may be added to the primary interface of the game client.
And 305, the game client sends the transaction parameters encrypted by the asymmetric encryption algorithm to the target node.
In the embodiment of the disclosure, the game client may obtain the transaction parameters first, and then obtain the game developer account (i.e., the public key of the game developer) and the pre-stored private key (i.e., the password of the account for logging in the game resource). And then, firstly encrypting the transaction parameters by adopting the account number of the game developer for the first time, and then encrypting the transaction parameters after the first encryption by adopting the private key for the second time to obtain the transaction parameters encrypted by adopting an asymmetric encryption algorithm.
The game client may then send the transaction parameters encrypted using the asymmetric encryption algorithm to the target node. Correspondingly, the target node can receive the transaction parameters which are sent by the game client and encrypted by adopting the asymmetric encryption algorithm. The transaction parameters may include an address of the game resource account, a transaction resource value, and a transaction type. The transaction type may include a load, a purchase, or a cash-out. Alternatively, the trading resource value may be a virtual value.
Optionally, the game client may obtain the game developer account directly from its installation package. Alternatively, the game client may be provided with an information acquisition interface of the game developer, and the information acquisition interface may include an account input box. The user can obtain the game developer account from the main interface of the game client, and input the game developer account in the account input box, and correspondingly, the game client can obtain the game developer account input by the user from the account input box.
In the embodiment of the present disclosure, in the process of obtaining the transaction parameters, if the transaction type is a recharge type, a recharge interface is provided in the game client, and the recharge interface may include a selection button and a fixed recharge button of a plurality of resource values. After detecting a selection instruction of the user for a target resource value in the plurality of resource values, the game client may determine the target resource value as a trading resource value. And after detecting the selection instruction of the user for the determined recharging button, acquiring the address of the prestored game resource account, and determining recharging as the transaction type.
Optionally, if the transaction type is a purchase, the transaction parameters may also include an address of the game developer account. The game client is provided with a purchase interface, the purchase interface is provided with a plurality of icons of the game props, and the icon of each game prop corresponds to one purchase button and one purchase quantity acquisition button. The game client side can obtain the purchase quantity selected by the user after detecting the selection instruction of the user for the purchase quantity obtaining button, and determines the product of the resource value of the game item and the purchase quantity as a transaction resource value after detecting the selection instruction of the user for the purchase button corresponding to the icon of the target game item. And then the game client can detect whether the resource value of the game resource account is smaller than the transaction resource value, and if the resource value of the game resource account is smaller than the transaction resource value, the balance of the game resource account is insufficient, prompt information can be displayed. For example, the prompt message may be "account balance is insufficient, please add value".
If the resource value of the game resource account is greater than or equal to the transaction resource value, the game client can directly acquire the address of the game developer account from the installation package of the game client. Alternatively, the game client may display the information acquisition interface of the game developer. The information acquisition interface also comprises an address input box, a user can acquire the address of the game developer account from the main interface of the game client and input the address of the game developer account into the address input box, and correspondingly, the game client can acquire the game developer account address input by the user from the address input box. The game client may then retrieve the address of the pre-stored game resource account number and determine the purchase as a transaction type.
Optionally, if the transaction type is cash withdrawal, the transaction parameters may further include a cash collection account number, a cash withdrawal interface is arranged in the game client, and the cash withdrawal interface includes a cash withdrawal resource value input box, a cash collection account number input box, and a cash withdrawal button. The game client can acquire the resource value input by the user in the cash-out resource value input box and the collection account number input by the user in the collection account number input box, and determine the acquired resource value as the transaction resource value. And then after detecting a selection instruction of the user for the cash-out button, acquiring the address of the pre-stored game resource account, and determining the cash-out as the transaction type.
And step 306, the target node decrypts the transaction parameters by adopting the password of the account number of the login game developer and the public key to obtain the address of the game resource account number, the transaction resource value and the transaction type.
In the embodiment of the disclosure, after receiving the transaction parameter encrypted by the asymmetric encryption algorithm and sent by the game client, the target node may decrypt the transaction parameter by the asymmetric decryption algorithm, so as to obtain the address of the game resource account, the transaction resource value, and the transaction type. Wherein the asymmetric decryption algorithm corresponds to the asymmetric encryption algorithm.
Optionally, the target node may decrypt the transaction parameter for the first time by using a password (i.e., a private key of the game developer) of the account number of the login game developer, and then decrypt the transaction parameter decrypted for the second time by using a public key (i.e., the game resource account number), so as to obtain the address, the transaction resource value, and the transaction type of the game resource account number.
And 307, the target node generates a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value.
After obtaining the address, the transaction resource value and the transaction type of the game resource account, the target node can generate a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value, and store the target transaction record into a transaction pool of the blockchain network.
Optionally, if the transaction type is recharging, the target transaction record may include an address of the game resource account, the transaction type, a transaction resource value, and a first adjustment type for the resource value of the game resource account. Optionally, the first adjustment type may be to increase the resource value of the game resource account by a transaction amount value.
For example, if the resource value of the game resource account is X, the transaction resource value is Y, and the address of the game resource account is D1MgJH, the target transaction record may be: d1MgJH- -sink into Y.
Optionally, if the transaction type is cash withdrawal, the target transaction record may include an address of the game resource account, the transaction type, a transaction resource value, a collection account number, and a second adjustment type for the resource value of the game resource account. Optionally, the second adjustment type is to reduce the resource value of the game resource account by the transaction resource value.
For example, if the resource value of the game resource account is X, the transaction resource value is Y, and the address of the game resource account is D1MgJH, the target transaction record may be: d1MgJH- -to obtain Y.
Alternatively, if the transaction type is a purchase, the target transaction record may include two sub-records. Wherein a sub-record may include an address of the game resource account, a transaction type, a transaction resource value, and a second adjustment type to the resource value of the game resource account. Another sub-record may include the address of the game developer account, the transaction type, the transaction resource value, and a third adjustment type to the resource value of the game developer account. Optionally, the third adjustment type is to increase the resource value of the game developer account by a transaction resource value.
For example, if the resource value of the game resource account is X, the transaction resource value is Y, the resource value of the game developer account is Z, the address of the game resource account is D1MgJH, and the address of the game developer account is D2gzzMQ, the target transaction record may include two sub-records. One of the children is recorded as D1MgJH- -confluent Y. Another child record may be D2 gzMQ- -confluent Y.
And 308, broadcasting the target transaction record to other nodes of the block chain network by the target node when the time between the current time and the last time of broadcasting the transaction record reaches the broadcasting time.
In the embodiment of the present disclosure, after generating a target transaction record of an address of a game resource account, a target node may detect whether a duration between a current time and a time of a last broadcast transaction record reaches a broadcast duration, and if the duration between the current time and the time of the last broadcast transaction record reaches the broadcast duration, broadcast the target transaction record to other nodes in a blockchain network. And if the time length between the current time and the time of broadcasting the transaction record last time does not reach the broadcasting time length, not broadcasting the target transaction record to other nodes. The broadcast time length is a fixed time length pre-stored in the target node.
Optionally, after determining that the time duration between the current time and the time of the last broadcast transaction record reaches the broadcast time duration, the target node may obtain the right to create the new block through a workload certification mechanism. After the right to create a new tile is obtained, all transaction records received within the broadcast duration from the time of the last broadcast of the transaction record are obtained from the transaction pool of the tile chain network. And creating a new block based on all the transaction records, namely packaging all the transaction records into a block structure. The target node may then broadcast the new block containing all transaction records to other nodes.
Step 309, the target node receives the verification success instruction for the target transaction record sent by other nodes.
After each of the other nodes receives the target transaction record sent by the target node, the target transaction record can be verified by adopting a consensus algorithm, and after the target transaction record is successfully verified, a verification success instruction is sent to the target node, and the target transaction record is stored.
And step 310, the target node responds to the verification success instruction and adjusts the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value.
After receiving the verification success instruction sent by the other node, the target node can respond to the verification success instruction and adjust the resource value of the game resource account indicated by the address of the game resource account according to the transaction type and the transaction resource value, thereby realizing synchronization and consensus on the target transaction record.
Optionally, if the transaction type is recharging, the target node may increase the resource value of the game resource account by the transaction resource value.
For example, if the resource value of the game resource account is X and the transaction resource value is Y, the resource value of the adjusted game resource account is X + Y, that is, Y is remitted in the game account.
Optionally, if the transaction type is cash withdrawal, the transaction parameters may further include a collection account number. The target node may decrement the resource value of the game resource account by the transaction resource value.
For example, if the resource value of the game resource account is X and the transaction resource value is Y, the resource value of the adjusted game resource account is X-Y, i.e. Y is remitted from the game resource account.
Optionally, if the transaction type is a purchase, the transaction parameters may also include an address of the game developer account. The target node may decrease the resource value of the game resource account by the transactional resource value and increase the resource value of the game developer account by the transactional resource value.
For example, if the resource value of the game resource account is X, the transaction resource value is Y, and the resource value of the game developer account is Z, the resource value of the adjusted game resource account is X-Y, and the resource value of the adjusted game developer account is Z + Y.
It should be noted that, the sequence of the steps of the game resource management method based on the block chain provided by the embodiment of the present disclosure may be appropriately adjusted, and the steps may also be deleted according to the situation. For example, steps 301 to 304 may be deleted as appropriate. Any method that can be easily conceived by those skilled in the art within the technical scope of the present disclosure is covered by the protection scope of the present disclosure, and thus, the detailed description thereof is omitted.
To sum up, the embodiment of the present disclosure provides a game resource management method based on a block chain, which obtains an address of a game resource account, a transaction resource value, and a transaction type after decrypting a transaction parameter encrypted by an asymmetric encryption algorithm, which is sent by a game client, by using an asymmetric decryption algorithm. And then generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value. And then broadcasting the target transaction record to other nodes in the block chain network, and adjusting the resource value of the game resource account number indicated by the address according to the transaction type and the transaction resource value in response to a verification success instruction aiming at the target transaction record and sent by the other nodes. The method can directly manage the resources of the game resource account indicated by the address of the game resource account through the transaction type and the transaction resource value by means of the blockchain technology, and the process does not need to use a third-party game transaction platform for transaction, so that the transaction cost is reduced.
Fig. 4 is a block diagram 40 of a game resource management device based on a block chain according to an embodiment of the present disclosure. The apparatus may be applied in a target node in the blockchain network 120 shown in fig. 1. The target node may be any node in the blockchain network 120, for example the target node may be node 121. As shown in fig. 4, the apparatus may include:
the first receiving module 401 is configured to receive a transaction parameter encrypted by using an asymmetric encryption algorithm and sent by a game client, where the transaction parameter includes: the address of the game resource account number, the transaction resource value and the transaction type, wherein the transaction type comprises a recharge, a purchase or a cash withdrawal.
And the decryption module 402 is configured to decrypt the transaction parameter by using an asymmetric decryption algorithm to obtain the address of the game resource account, the transaction resource value, and the transaction type.
A first generating module 403, configured to generate a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value.
A broadcast module 404 for broadcasting the target transaction record to other nodes in the blockchain network.
And the adjusting module 405 is configured to adjust, in response to a verification success instruction for the target transaction record sent by another node, a resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value.
To sum up, the embodiment of the present disclosure provides a game resource management device based on a block chain, which obtains an address of a game resource account, a transaction resource value, and a transaction type after decrypting a transaction parameter sent by a game client by using an asymmetric decryption algorithm. And then generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value. And then broadcasting the target transaction record to other nodes in the blockchain network, and adjusting the resource value of the game resource account number indicated by the address according to the transaction type and the transaction resource value in response to a verification success instruction aiming at the target transaction record and sent by the other nodes. The device can directly manage the resources of the game resource account indicated by the address of the game resource account through the transaction type and the transaction resource value by means of the blockchain technology, and the process does not need to use a third-party game transaction platform for transaction, so that the transaction cost is reduced.
Optionally, the transaction type is top-up; the adjusting module 405 is configured to:
and increasing the resource value of the game resource account number by the transaction resource value.
The target transaction record includes: the address of the game resource account, the transaction type and the transaction resource value.
Optionally, the transaction type is cash withdrawal; the transaction parameters further include: a collection account number;
the adjusting module 405 is configured to: and reducing the resource value of the game resource account number by the transaction resource value.
The target transaction record includes: address of game resource account number, transaction type, transaction resource value and collection account number.
Optionally, the transaction type is purchase, and the transaction parameters further include: the address of the game developer account;
the adjusting module 405 is configured to: reducing the resource value of the game resource account number by the transaction resource value;
referring to FIG. 5, the apparatus may further include an increment module 406 for incrementing the resource value of the game developer account by a transactional resource value.
The target transaction record includes: the address of the game resource account, the address of the game developer account, the transaction type, and the transaction resource value.
Optionally, the broadcasting module 404 is configured to:
and if the time length between the current time and the time of broadcasting the transaction record last time reaches the broadcasting time length, broadcasting the target transaction record to other nodes of the block chain network.
Optionally, referring to fig. 5, the apparatus may further include:
the second receiving module 407 is configured to receive a registration request sent by the game client before receiving the transaction parameter encrypted by using the asymmetric encryption algorithm and sent by the game client.
A second generating module 408 is configured to generate a key pair in response to the registration request, the key pair including a public key and a private key.
A third generating module 409 for generating an address of the game resource account based on the key pair.
The sending module 410 is configured to send the address of the key pair and the game resource account to the game client, where the key pair is used for the game client to log in the blockchain network by using the public key as the game resource account and using the private key as the password.
Optionally, the transaction parameters are obtained by encrypting the game developer account and the private key.
A decryption module 402 for:
and decrypting the transaction parameters by adopting the password for logging in the game developer account and the public key to obtain the address of the game resource account, the transaction resource value and the transaction type.
To sum up, the embodiment of the present disclosure provides a game resource management device based on a block chain, which obtains an address, a transaction resource value, and a transaction type of a game resource account after decrypting a transaction parameter sent by a game client by using an asymmetric decryption algorithm. And then generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value. And then broadcasting the target transaction record to other nodes in the block chain network, and adjusting the resource value of the game resource account number indicated by the address according to the transaction type and the transaction resource value in response to a verification success instruction aiming at the target transaction record and sent by the other nodes. The device can directly manage the resources of the game resource account indicated by the address of the game resource account through the transaction type and the transaction resource value by means of the blockchain technology, and the process does not need to use a third-party game transaction platform for transaction, so that the transaction cost is reduced.
Fig. 6 is a schematic structural diagram of a game resource management device 700 based on a block chain according to an embodiment of the present application, where the data sharing device 700 based on a block chain may be a server. Illustratively, as shown in FIG. 6, the apparatus 700 includes a processor. The processor may be a central processing unit (cpu) 701, a system memory 704 including a random access memory (ram) 702 and a read-only memory (rom) 703, and a system bus 705 connecting the system memory 704 and the cpu 701. The apparatus 700 also includes a basic input/output (i/o) system 706 for facilitating information transfer between devices within the computer, and a mass storage device 707 for storing an operating system 713, application programs 714, and other program modules 715.
The basic input/output system 706 includes a display 708 for displaying information and an input device 709, such as a mouse, keyboard, etc., for a user to input information. Wherein the display 708 and the input device 709 are connected to the central processing unit 701 through an input-output controller 710 connected to the system bus 705. The basic input/output system 706 may also include an input/output controller 710 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, an input/output controller 710 may also provide output to a display screen, a printer, or other type of output device.
The mass storage device 707 is connected to the central processing unit 701 through a mass storage controller (not shown) connected to the system bus 705. The mass storage device 707 and its associated computer-readable media provide non-volatile storage for the apparatus 700. That is, the mass storage device 707 may include a computer-readable medium (not shown) such as a hard disk or a compact-read-only-memory (cd-rom) drive.
Without loss of generality, computer-readable storage media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes ram, rom, erasable programmable read-only memory (eprom), electrically erasable programmable read-only memory (eeprom), flash memory or other solid state memory technology, cd-rom, digital versatile disks (dvd), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage, or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 704 and mass storage device 707 described above may collectively be referred to as memory.
According to various embodiments of the present application, the apparatus 700 may also operate as a remote computer connected to a network via a network, such as the Internet. That is, the apparatus 700 may be connected to the network 712 through a network interface unit 711 coupled to the system bus 705, or may be connected to other types of networks or remote computer systems (not shown) using the network interface unit 711.
The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the processor to implement the method provided by the embodiment of the present application.
Fig. 7 is a schematic structural diagram of a block chain-based game resource management device 800 according to an embodiment of the present disclosure. The apparatus 800 may be: a smart phone, a tablet computer, a moving picture experts group audio layer III (MP 3) player, an MP4 player, a notebook computer, a desktop computer, or other terminals. Device 800 may also be referred to by other names such as user equipment, portable terminals, laptop terminals, desktop terminals, and the like.
In general, the apparatus 800 includes: a processor 801 and a memory 802.
The processor 801 may include one or more processing cores, such as a 4-core processor, a 12-core processor, and so forth. The processor 801 may be implemented in hardware using at least one of digital signal processing (dsp), field-programmable gate array (fpga), and programmable logic array (pla). The processor 801 may also include a main processor and a coprocessor, where the main processor is a processor, also called cpu, for processing data in an awake state; a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with an image processing unit (gpu) for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 801 may also include an artificial intelligence (ai) processor for processing computational operations related to machine learning.
In some embodiments, the apparatus 800 may further optionally include: a peripheral interface 803 and at least one peripheral. The processor 801, memory 802 and peripheral interface 803 may be connected by bus or signal lines. Various peripheral devices may be connected to peripheral interface 803 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a touch screen display 805, a camera 806, an audio circuit 807, and a power supply 809.
A peripheral interface 803 may be used to connect at least one i/o-related peripheral to the processor 801 and the memory 802. In some embodiments, the processor 801, memory 802, and peripheral interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral interface 803 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The radio frequency circuit 804 is used for receiving and transmitting radio frequency (rf) signals, also called electromagnetic signals. The radio frequency circuitry 804 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 804 converts an electrical signal into an electromagnetic signal to be transmitted, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 804 includes: an antenna system, an rf transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 804 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or wifi networks. In some embodiments, the rf circuit 804 may further include a near field communication (nfc) related circuit, which is not limited in this application.
The display screen 805 is used to display a user interface (ui). The ui may include graphics, text, icons, video, and any combination thereof. When the display 805 is a touch display, the display 805 also has the ability to capture touch signals on or above the surface of the display 805. The touch signal may be input to the processor 801 as a control signal for processing. At this point, the display 805 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 805 may be one, providing the front panel of the device 800; in other embodiments, the display screens 805 may be at least two, respectively disposed on different surfaces of the device 800 or in a folded design; in still other embodiments, the display 805 may be a flexible display, disposed on a curved surface or on a folded surface of the device 800. Even further, the display 805 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 805 may be made of lcd (liquid crystal display), oled (organic light-emitting diode) and other materials.
The camera assembly 806 is used to capture images or video. Optionally, camera assembly 806 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each of the rear cameras is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to implement a background blurring function, the main camera and the wide-angle camera are fused to implement panoramic shooting and a vr (virtual reality) shooting function or other fusion shooting functions. In some embodiments, camera assembly 806 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp and can be used for light compensation under different color temperatures.
The audio circuit 807 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 801 for processing or inputting the electric signals to the radio frequency circuit 804 to realize voice communication. The microphones may be multiple and placed at different locations of the device 800 for stereo sound acquisition or noise reduction purposes. The microphone may also be an array microphone or an omni-directional acquisition microphone. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 807 may also include a headphone jack.
A power supply 809 is used to supply power to the various components in the device 800. The power supply 809 can be ac, dc, disposable or rechargeable. When the power source 809 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. Rechargeable batteries may also be used to support fast charge technologies.
In some embodiments, the device 800 also includes one or more sensors 810. The one or more sensors 810 include, but are not limited to: acceleration sensor 811, gyro sensor 812, pressure sensor 813, optical sensor 815, and proximity sensor 816.
The acceleration sensor 811 may detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the apparatus 800. For example, the acceleration sensor 811 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 801 may control the touch screen 805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 812 may detect a body direction and a rotation angle of the device 800, and the gyro sensor 812 may cooperate with the acceleration sensor 811 to acquire a 3D motion of the user with respect to the device 800. From the data collected by the gyro sensor 812, the processor 801 may implement the following functions: motion sensing (e.g., changing ui according to a user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
Pressure sensors 813 may be disposed on the side bezel of device 800 and/or underneath touch display 805. When the pressure sensor 813 is arranged on the side frame of the device 800, the holding signal of the user to the device 800 can be detected, and the processor 801 performs left-right hand identification or shortcut operation according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed at the lower layer of the touch display screen 805, the processor 801 controls the operability control on the ui interface according to the pressure operation of the user on the touch display screen 805. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The optical sensor 815 is used to collect the ambient light intensity. In one embodiment, the processor 801 may control the display brightness of the touch screen 805 based on the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 805 is increased; when the ambient light intensity is low, the display brightness of the touch display 805 is turned down. In another embodiment, the processor 801 may also dynamically adjust the shooting parameters of the camera assembly 806 based on the ambient light intensity collected by the optical sensor 815.
A proximity sensor 816, also known as a distance sensor, is typically provided on the front panel of the device 800. The proximity sensor 816 is used to capture the distance between the user and the front of the device 800. In one embodiment, the processor 801 controls the touch display 805 to switch from a bright screen state to a dark screen state when the proximity sensor 816 detects that the distance between the user and the front surface of the device 800 is gradually reduced; when the proximity sensor 816 detects that the distance between the user and the front of the device 800 is gradually increasing, the touch display 805 is controlled by the processor 801 to switch from a rest screen state to a light screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 7 does not constitute a limitation of the apparatus 800, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
The disclosed embodiments provide a storage medium having at least one instruction, at least one program, set of codes, or set of instructions stored therein, which is loaded and executed by a processor to implement the method shown in fig. 2 or fig. 3.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk.
In this application, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The above description is intended only to illustrate the preferred embodiments of the present disclosure, and should not be taken as limiting the disclosure, as any modifications, equivalents, improvements and the like which are within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.
Claims (14)
1. A game resource management method based on a block chain is applied to a target node in a block chain network, and the method comprises the following steps:
receiving a registration request sent by a game client, wherein an information acquisition interface of a game developer is arranged in the game client, and the information acquisition interface comprises an account input box;
generating a key pair in response to the registration request, the key pair comprising a public key and a private key;
processing the public key in the key pair to obtain the address of the game resource account;
sending the key pair and the address of the game resource account to the game client, wherein the key pair is used for allowing the game client to log in the blockchain network by taking the public key as the game resource account and taking the private key as a password, the address of a game developer account and the address of the game developer account are added to a main interface of the game client, the game developer account is a game resource account corresponding to the game developer, and the address of the game developer account is the address of the wallet of the game developer;
receiving transaction parameters which are sent by the game client and encrypted by adopting an asymmetric encryption algorithm, wherein the transaction parameters comprise: the game system comprises an address of a game resource account, a transaction resource value and a transaction type, wherein the transaction type comprises recharging, purchasing or cashing, and the game client is used for acquiring the game developer account according to the content input in the account input box; after the acquired transaction parameters are encrypted for the first time by adopting the game developer account, encrypting the transaction parameters encrypted for the first time for the second time by adopting a prestored private key to obtain the transaction parameters encrypted by adopting an asymmetric encryption algorithm;
decrypting the transaction parameters encrypted by the asymmetric encryption algorithm by using an asymmetric decryption algorithm to obtain the address of the game resource account, the transaction resource value and the transaction type;
generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value;
broadcasting the target transaction record to other nodes in the blockchain network;
and responding to a verification success instruction aiming at the target transaction record sent by the other node, and adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value.
2. The method of claim 1, wherein the transaction type is top-up;
the adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value comprises:
increasing the resource value of the game resource account number by the transaction resource value;
the target transaction record includes: the address of the game resource account, the transaction type, and the transaction resource value.
3. The method of claim 1, wherein the transaction type is cash-out; the transaction parameters further include: a collection account number;
the adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value comprises:
reducing the resource value of the game resource account number by the transaction resource value;
the target transaction record includes: the address of the game resource account, the transaction type, the transaction resource value, and the collection account.
4. The method of claim 1, wherein the transaction type is a purchase, and wherein the transaction parameters further comprise: the address of the game developer account;
the adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value comprises:
reducing the resource value of the game resource account number by the transaction resource value;
the method further comprises the following steps:
increasing the resource value of the game developer account by the transaction resource value;
the target transaction record includes: the address of the game resource account, the address of the game developer account, the transaction type, and the transaction resource value.
5. The method of claim 1, wherein the broadcasting the target transaction record to other nodes in the blockchain network comprises:
and if the time length between the current time and the last time of broadcasting the transaction record reaches the broadcasting time length, broadcasting the target transaction record to other nodes of the block chain network.
6. The method of claim 1, wherein decrypting the transaction parameters encrypted with the asymmetric encryption algorithm using the asymmetric decryption algorithm to obtain the address of the game resource account, the transaction resource value, and the transaction type comprises:
and decrypting the transaction parameters by adopting the password for logging in the game developer account and the public key to obtain the address of the game resource account, the transaction resource value and the transaction type.
7. A blockchain-based game resource management apparatus applied to a target node in a blockchain network, the apparatus comprising:
the second receiving module is used for receiving a registration request sent by a game client, wherein an information acquisition interface of a game developer is arranged in the game client, and the information acquisition interface comprises an account number input box;
a second generation module, configured to generate a key pair in response to the registration request, where the key pair includes a public key and a private key;
the third generation module is used for processing the public key in the key pair to obtain the address of the game resource account;
a sending module, configured to send the key pair and the address of the game resource account to the game client, where the key pair is used for the game client to log in the blockchain network by using the public key as the game resource account and using the private key as a password, a game developer account and an address of the game developer account are added to a primary interface of the game client, the game developer account is a game resource account corresponding to the game developer, and the address of the game developer account is an address of a wallet of the game developer;
a first receiving module, configured to receive a transaction parameter encrypted by using an asymmetric encryption algorithm and sent by the game client, where the transaction parameter includes: the game system comprises an address of a game resource account, a transaction resource value and a transaction type, wherein the transaction type comprises recharging, purchasing or cashing, and the game client is used for acquiring the game developer account according to the content input in the account input box; after the acquired transaction parameters are encrypted for the first time by adopting the game developer account, encrypting the transaction parameters encrypted for the first time for the second time by adopting a prestored private key to obtain the transaction parameters encrypted by adopting an asymmetric encryption algorithm;
the decryption module is used for decrypting the transaction parameters encrypted by the asymmetric encryption algorithm by adopting an asymmetric decryption algorithm to obtain the address of the game resource account, the transaction resource value and the transaction type;
the first generation module is used for generating a target transaction record of the address of the game resource account according to the transaction type and the transaction resource value;
a broadcasting module, configured to broadcast the target transaction record to other nodes in the blockchain network;
and the adjusting module is used for responding to a verification success instruction aiming at the target transaction record sent by the other nodes and adjusting the resource value of the game resource account indicated by the address according to the transaction type and the transaction resource value.
8. The apparatus of claim 7, wherein the transaction type is top-up;
the adjusting module is used for increasing the resource value of the game resource account number by the transaction resource value;
the target transaction record includes: the address of the game resource account, the transaction type, and the transaction resource value.
9. The apparatus of claim 7, wherein the transaction type is cash-out; the transaction parameters further include: a collection account number;
the adjusting module is used for reducing the resource value of the game resource account number by the transaction resource value;
the target transaction record includes: the address of the game resource account, the transaction type, the transaction resource value, and the collection account.
10. The apparatus of claim 7, wherein the transaction type is a purchase, and wherein the transaction parameters further comprise: the address of the game developer account;
the adjusting module is used for reducing the resource value of the game resource account number by the transaction resource value;
the device also comprises an increasing module, a transaction processing module and a processing module, wherein the increasing module is used for increasing the resource value of the game developer account by the transaction resource value;
the target transaction record includes: the address of the game resource account, the address of the game developer account, the transaction type, and the transaction resource value.
11. The apparatus of claim 7, wherein the broadcasting module is configured to broadcast the target transaction record to other nodes of the blockchain network if a time duration between a current time and a time of a last transaction record broadcast reaches a broadcast time duration.
12. The apparatus of claim 7, wherein the decryption module is configured to decrypt the transaction parameter using a password logged into the game developer account and the public key to obtain an address of the game resource account, the transaction resource value, and the transaction type.
13. An apparatus for blockchain based game resource management, the apparatus comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the method for blockchain based game resource management according to any one of claims 1 to 6.
14. A storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method for block chain based game resource management of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010003003.6A CN111198922B (en) | 2020-01-02 | 2020-01-02 | Game resource management method and device based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010003003.6A CN111198922B (en) | 2020-01-02 | 2020-01-02 | Game resource management method and device based on block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111198922A CN111198922A (en) | 2020-05-26 |
CN111198922B true CN111198922B (en) | 2023-04-18 |
Family
ID=70744513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010003003.6A Active CN111198922B (en) | 2020-01-02 | 2020-01-02 | Game resource management method and device based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111198922B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111784319B (en) * | 2020-07-02 | 2021-07-27 | 财智云享(杭州)数据信息技术有限公司 | Communication data processing method based on block chain payment network and big data server |
CN112354190B (en) * | 2020-11-10 | 2024-09-10 | 网易(杭州)网络有限公司 | Game login method and device and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106682520A (en) * | 2016-11-17 | 2017-05-17 | 精硕科技(北京)股份有限公司 | Data exchange method and system |
CN108292402A (en) * | 2016-02-23 | 2018-07-17 | 恩链控股有限公司 | The determination of the public secret of secure exchange for information and level certainty key |
WO2019051822A1 (en) * | 2017-09-18 | 2019-03-21 | 腾讯科技(深圳)有限公司 | Resource transaction method, node, apparatus, and storage medium |
CN109614767A (en) * | 2018-11-19 | 2019-04-12 | 中国地质大学(武汉) | A kind of logical card exchange method and apparatus of the O2O resource of decentralization |
CN109919604A (en) * | 2017-12-13 | 2019-06-21 | 万事达卡国际公司 | Method and system for the transaction for using the consumer of crypto token to initiate |
CN110201400A (en) * | 2019-05-21 | 2019-09-06 | 深圳创维-Rgb电子有限公司 | Game item method of commerce, transaction terminal and storage medium based on block chain |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170213210A1 (en) * | 2016-01-22 | 2017-07-27 | International Business Machines Corporation | Asset transfers using a multi-tenant transaction database |
CN107563761B (en) * | 2017-08-26 | 2021-01-26 | 复旦大学 | Game account management method based on block chain |
CN110400136B (en) * | 2018-04-27 | 2021-05-14 | 腾讯科技(深圳)有限公司 | Account management method, device, server and storage medium based on block chain |
CN108694668B (en) * | 2018-06-15 | 2023-07-14 | 腾讯科技(深圳)有限公司 | Digital asset transaction method, device, medium and equipment |
-
2020
- 2020-01-02 CN CN202010003003.6A patent/CN111198922B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108292402A (en) * | 2016-02-23 | 2018-07-17 | 恩链控股有限公司 | The determination of the public secret of secure exchange for information and level certainty key |
CN106682520A (en) * | 2016-11-17 | 2017-05-17 | 精硕科技(北京)股份有限公司 | Data exchange method and system |
WO2019051822A1 (en) * | 2017-09-18 | 2019-03-21 | 腾讯科技(深圳)有限公司 | Resource transaction method, node, apparatus, and storage medium |
CN109919604A (en) * | 2017-12-13 | 2019-06-21 | 万事达卡国际公司 | Method and system for the transaction for using the consumer of crypto token to initiate |
CN109614767A (en) * | 2018-11-19 | 2019-04-12 | 中国地质大学(武汉) | A kind of logical card exchange method and apparatus of the O2O resource of decentralization |
CN110201400A (en) * | 2019-05-21 | 2019-09-06 | 深圳创维-Rgb电子有限公司 | Game item method of commerce, transaction terminal and storage medium based on block chain |
Non-Patent Citations (2)
Title |
---|
Yi Liu等.An efficient method to enhance bitcoin wallet security.《2017 11th IEEE international conference on anticounterfeiting,security,and identification》.2018,1-17. * |
王子钰等.基于聚合签名与加密交易的全匿名区块链.《计算机研究与发展》.2018,第55卷(第10期),2185-2198. * |
Also Published As
Publication number | Publication date |
---|---|
CN111198922A (en) | 2020-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110687821B (en) | Intelligent home control system and method based on block chain | |
CN110674022B (en) | Behavior data acquisition method and device and storage medium | |
CN108833607B (en) | Physical address acquisition method, device and readable medium | |
CN110278464B (en) | Method and device for displaying list | |
CN108805560B (en) | Numerical value integration method and device, electronic equipment and computer readable storage medium | |
CN110826103B (en) | Method, device, equipment and storage medium for processing document authority based on blockchain | |
CN110602206A (en) | Data sharing method and device based on block chain and storage medium | |
CN109302385A (en) | Multimedia resource sharing method, device and storage medium | |
CN110597924B (en) | Block chain-based user identification processing method, device, equipment and storage medium | |
CN107896337B (en) | Information popularization method and device and storage medium | |
CN111901283B (en) | Resource transfer method, device, terminal and storage medium | |
CN111290896A (en) | Server pressure testing method, device, equipment and medium | |
CN110677262B (en) | Information notarization method, device and system based on blockchain | |
CN111198922B (en) | Game resource management method and device based on block chain | |
CN110290191B (en) | Resource transfer result processing method, device, server, terminal and storage medium | |
CN111062725A (en) | Face payment method, device and system and computer readable storage medium | |
CN111145034A (en) | Block chain-based social security management method, device and system and storage medium | |
CN113852459A (en) | Key agreement method, device and computer readable storage medium | |
CN111064657B (en) | Method, device and system for grouping concerned accounts | |
CN110597840B (en) | Partner relationship establishment method, device, equipment and storage medium based on blockchain | |
CN111881423A (en) | Method, device and system for limiting function use authorization | |
CN112995587B (en) | Electronic equipment monitoring method, system, computer equipment and storage medium | |
CN110971692B (en) | Method and device for opening service and computer storage medium | |
CN111131619B (en) | Account switching processing method, device and system | |
CN108683684B (en) | Method, device and system for logging in target instant messaging application |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |