CN111292074A - Consumption method and device based on block chain network - Google Patents

Consumption method and device based on block chain network Download PDF

Info

Publication number
CN111292074A
CN111292074A CN202010064758.7A CN202010064758A CN111292074A CN 111292074 A CN111292074 A CN 111292074A CN 202010064758 A CN202010064758 A CN 202010064758A CN 111292074 A CN111292074 A CN 111292074A
Authority
CN
China
Prior art keywords
user
block chain
consumption
blockchain
merchant
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
CN202010064758.7A
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 CN202010064758.7A priority Critical patent/CN111292074A/en
Publication of CN111292074A publication Critical patent/CN111292074A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/102Bill distribution or payments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4012Verifying personal identification numbers [PIN]

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a consumption method and device based on a block chain network. The method comprises the following steps: acquiring a sign-in instruction of a user entering a merchant, wherein the sign-in instruction comprises a user identification code; acquiring the residual consumption times of the user from the block chain according to the user identification code; and if the residual consumption times are more than or equal to 1, transferring a set value from the intermediate block chain account of the user to the block chain account of the merchant to consume. The user initiates the instruction of registering when the trade company enjoys the service, registers once and transfers once to trade company block chain account, compares with prestoring the expense to trade company block chain account in advance, can avoid user's fund to suffer loss.

Description

Consumption method and device based on block chain network
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a consumption method and apparatus based on a block chain network.
Background
At present, the consumption form of the membership system is very popular, a consumer pays a large amount of fee to a merchant at one time in the process of becoming a member, the consumer purchases a plurality of services of the merchant in advance, and the merchant can use the consumption amount of the consumer in advance for operation.
However, for the consumer, the consumer is inconvenient to record the consumption times of the consumer, and in addition, the merchant may have a risk of being closed upside down, so that the unconsumed amount of the user cannot be found back, which is very disadvantageous for the consumer.
Disclosure of Invention
The application aims to provide a consumption method and device based on a block chain network, a merchant can receive the consumption amount paid by a consumer only when the consumer enjoys service in a shop, and the fund loss of the consumer is avoided.
According to an aspect of an embodiment of the present application, there is provided a consumption method based on a blockchain network, including: acquiring a sign-in instruction of a user entering the merchant, wherein the sign-in instruction comprises a user identification code; acquiring the residual consumption times of the user from a block chain according to the user identification code; and if the residual consumption times are more than or equal to 1, transferring a set value from the middle blockchain account of the user to the block chain account of the merchant for consumption.
According to an aspect of an embodiment of the present application, there is provided a block chain network-based consumption device, including: the acquisition module is used for acquiring a sign-in instruction of a user entering the merchant, wherein the sign-in instruction comprises a user identification code, and the remaining consumption times of the user are acquired from a block chain according to the user identification code; and the consumption module is used for transferring a set value from the middle block chain account of the user to the block chain account of the merchant to consume if the residual consumption times are more than or equal to 1.
In some embodiments of the present application, based on the foregoing solution, the obtaining module is configured to: acquiring the check-in time of a user; and acquiring the remaining consumption times corresponding to the time closest to the check-in time before the check-in time.
In some embodiments of the present application, based on the foregoing solution, the blockchain network-based consumption device further includes a recording module configured to: subtracting 1 from the residual consumption times of the user to obtain the residual consumption times corresponding to the check-in time; and storing the remaining consumption times corresponding to the check-in time and the check-in time in the block chain correspondingly.
In some embodiments of the present application, based on the foregoing solution, the recording module is further configured to: acquiring a middle blockchain account identifier of the user and acquiring a merchant blockchain account identifier; and generating a store consumption record according to the intermediate block chain account identifier, the merchant block chain account identifier and the set value.
In some embodiments of the present application, based on the foregoing, the transfer module is further configured to: if the residual consumption times are 0, transferring the set value from the user block chain account of the user to the merchant block chain account for consumption; the recording module is further configured to: acquiring a user block chain account identifier of the user and acquiring a merchant block chain account identifier; and generating a store consumption record according to the user blockchain account identifier, the merchant blockchain account identifier and the set value.
In some embodiments of the present application, based on the foregoing, the transfer module is further configured to: acquiring a member recharging instruction, wherein the member recharging instruction comprises a recharging amount, a user block chain account identifier of a user and a middle block chain account identifier of the user; transferring the recharge amount from the user blockchain account of the user to the intermediate blockchain account of the user according to the member recharge instruction; the recording module is further configured to: and if the transfer is successful, generating a member recharging record according to the recharging amount, the user block chain account identification and the middle block chain account identification.
In some embodiments of the present application, based on the foregoing, the transfer module is further configured to: acquiring a member cash withdrawal instruction, wherein the member cash withdrawal instruction comprises a cash withdrawal amount, a user block chain account identifier of a user and a middle block chain account identifier of the user; transferring the withdrawal amount from the user's intermediate blockchain account to the user's blockchain account according to the member withdrawal instruction; the recording module is further configured to: and if the transfer is successful, generating a member cash withdrawal record according to the cash withdrawal amount, the user block chain account identification and the middle block chain account identification.
In some embodiments of the present application, based on the foregoing solution, the recording module is further configured to: after the node generates a transaction record, carrying out hash operation on the generated transaction record to obtain summary data, wherein the transaction record comprises any one of store consumption records, member recharging records and member cash withdrawal records; signing the summary data through a private key of the node to obtain signature data; generating release data according to the public key of the node, the transaction record and the signature data; and issuing the issuing data to a record pool of the blockchain system to wait for the transaction record to be written into the blockchain.
In some embodiments of the present application, based on the foregoing solution, the recording module is further configured to: acquiring release data in a record pool of the blockchain system, wherein the release data comprises transaction records, signature data and public keys of issuers corresponding to the release data, the signature data is obtained by signing summary data through private keys of the issuers, and the summary data is obtained by carrying out hash operation on the transaction records; decrypting the signature data in the release data through a public key of a release party corresponding to the release data to obtain first decrypted data; performing hash operation on the transaction record in the release data to obtain first data; if the first data is consistent with the first decryption data, constructing a block according to the consumption record in the release data; the blocks are linked to the block chain and synchronized in the block chain system.
According to an aspect of embodiments of the present application, there is provided a computer-readable program medium storing computer program instructions which, when executed by a computer, cause the computer to perform the method of any one of the above.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: a processor; a memory having computer readable instructions stored thereon which, when executed by the processor, implement the method of any of the above.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the technical scheme provided by some embodiments of the application, the sign-in instruction of the user entering the merchant is obtained and comprises a user identification code, and the identity of the user can be identified according to the user identification code. And acquiring the residual consumption times of the user from the block chain according to the user identification code, wherein the residual consumption times are generated by purchasing multiple services of a merchant in advance when the user transacts the member. And if the residual consumption times are more than or equal to 1, transferring a set value from the intermediate block chain account of the user to the block chain account of the merchant to consume. Because the user just transfers accounts to the merchant when the store enjoys the service of the merchant, and the user signs in once and transfers accounts to the block chain account of the merchant once, compared with the method that the cost is prestored to the block chain account of the merchant in advance, the loss caused by the fact that the merchant does not provide service for the user after receiving money can be avoided. Meanwhile, as the user transfers the pre-stored funds into the intermediate blockchain account, the user can be restrained so as to protect the benefits of the merchant.
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.
FIG. 1A shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
fig. 1B is a schematic diagram showing a data sharing system to which the technical solution of one embodiment of the present application can be applied;
FIG. 1C illustrates a block chain diagram to which one embodiment of the present application may be applied;
FIG. 1D is a diagram illustrating the generation of new tiles in a blockchain to which one embodiment of the present application may be applied;
fig. 2 schematically shows a flow chart of a block chain network based consumption method according to an embodiment of the present application;
fig. 3 schematically shows a flow chart of a block chain network based consumption method according to an embodiment of the present application;
FIG. 4 schematically illustrates a flow chart of a process of transferring first settings to a merchant blockchain account for consumption according to one embodiment of the present application;
fig. 5 schematically shows a block diagram of a consumption device based on a blockchain network according to an embodiment of the present application;
FIG. 6 is a hardware diagram illustrating an electronic device according to an example embodiment.
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.
Fig. 1A shows a schematic diagram of an exemplary system architecture 100 to which the technical solutions of the embodiments of the present application can be applied.
As shown in fig. 1A, the system architecture 100A may include a terminal device 101A (which may be one or more of a smartphone, a tablet, a laptop, a desktop computer), a network 102A, and a server 103A. Network 102A serves as a medium to provide a communication link between terminal device 101A and server 103A. Network 102A may include various connection types, such as wired communication links, wireless communication links, and so forth.
It should be understood that the number of terminal devices 101A, networks 102A, and servers 103A in fig. 1A is merely illustrative. There may be any number of terminal devices 101A, networks 102A, and servers 103A, as desired for implementation. For example, the server 103A may be a server cluster composed of a plurality of servers.
In an embodiment of the application, the server 103A obtains a sign-in instruction of a user entering a merchant, where the sign-in instruction includes a user identification code, and the identity of the user can be identified according to the user identification code. And acquiring the residual consumption times of the user from the blockchain according to the user identification code, wherein the residual consumption times are generated by purchasing multiple services of a merchant in advance when the user transacts the member and correspond to funds in an intermediate blockchain account of the user. And if the residual consumption times are more than or equal to 1, transferring a set value from the intermediate block chain account of the user to the block chain account of the merchant to consume. Because the user just transfers accounts to the merchant when the store enjoys the service of the merchant, and the user signs in once and transfers accounts to the block chain account of the merchant once, compared with the method that the cost is prestored to the block chain account of the merchant in advance, the loss caused by the fact that the merchant does not provide service for the user after receiving money can be avoided. Meanwhile, as the user transfers the pre-stored funds into the intermediate blockchain account, the user can be restrained so as to protect the merchant blockchain account of the benefit merchant blockchain account merchant.
It should be noted that the consumption method based on the blockchain network provided by the embodiment of the present application is generally executed by the server 103A, and accordingly, the consumption device based on the blockchain network is generally disposed in the server 103A. However, in other embodiments of the present application, the terminal device 101A may also have a similar function as the server 103A, so as to execute the consumption method based on the blockchain network provided in the embodiments of the present application.
Fig. 1B shows a schematic diagram of an exemplary data sharing system 100B to which the technical solution of the embodiment of the present invention can be applied.
Referring to the data sharing system 100B shown in fig. 1B, the data sharing system 100B refers to a system for performing data sharing between nodes. Each node 101B may receive input information during normal operation and maintain shared data within the data sharing system 100B based on the received input information. In order to ensure information interworking in the data sharing system 100B, an information connection may exist between each node 101B in the data sharing system 100B, and information transmission may be performed between the nodes 101B through the information connection. For example, when any node 101B in the data sharing system 100B receives the input information, the other nodes 101B in the data sharing system 100B acquire the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes 101B in the data sharing system 100B are consistent.
Each node 101B in the data sharing system 100B has a node identifier corresponding thereto, and each node 101B in the data sharing system 100B may store the node identifiers of other nodes 101B in the data sharing system 100B, so that the generated block is broadcast to other nodes 101B in the data sharing system 100B according to the node identifiers of other nodes 101B. Each node 101B may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
TABLE 1
FIG. 1C shows a schematic diagram of a blockchain to which one embodiment of the present application may be applied.
Each node in the data sharing system 100B stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 1C, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
Fig. 1D shows a schematic diagram of new block generation in a blockchain to which an embodiment of the present application may be applied.
When each block in the block chain is generated, referring to fig. 1D, when a node where the block chain is located receives input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. Subsequently, the node where the block chain is located sends the newly generated blocks to other nodes 101B in the data sharing system 100B where the newly generated blocks are located respectively according to the node identifiers of the other nodes 101B in the data sharing system 100B, the newly generated blocks are checked by the other nodes 101B, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the check is completed.
In an embodiment of the present application, the input information stored in the data sharing system 100B may include one or more of a user identification code, a remaining consumption number of the user, an account balance of a middle blockchain account of the user, an account balance of a user blockchain account of the user, an account balance of a merchant blockchain account, a store consumption record, a member charge record, and a member cash-up record.
In one embodiment of the present application, the user identification code, the remaining number of consumption times of the user, the account balance of the user's middle blockchain account, and the account balance of the user's user blockchain account may be stored in the data sharing system 100B in association with each other.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 2 schematically shows a flowchart of a consumption method based on a blockchain network according to an embodiment of the present application, where an execution subject of the consumption method based on the blockchain network may be a server, such as the server 103A shown in fig. 1A.
Referring to fig. 2, the consumption method based on the blockchain network may be applied to a node in the blockchain system, and the consumption method based on the blockchain network at least includes steps S210 to S230, which are described in detail as follows:
in step S210, a check-in instruction of a user entering a merchant is obtained, where the check-in instruction includes a user identification code.
In one embodiment of the application, a user can check in a user terminal, the terminal used by the user can be used as the user terminal, and the user terminal can be arranged in a shop of a merchant.
In one embodiment of the present application, the check-in command may be triggered by the user clicking a check-in button in a terminal within the merchant.
In one embodiment of the present application, the user's check-in command may be triggered by the user opening a door when entering the merchant. For example, an identity recognition device may be installed at a store entrance of a merchant, a user opens a door through the identity recognition device to enter the merchant, and when the identity recognition device recognizes the user, the user may confirm that the sign-in instruction of the user terminal is obtained.
In one embodiment of the present application, the identification device may be a fingerprint recognizer, a face recognizer, a password door opener, or the like.
In one embodiment of the present application, when the identification device is a password door opener, a password may be assigned to each user, and entering a personal password by the user into the merchant is equivalent to triggering a sign-in instruction of the user.
In one embodiment of the present application, the user identification code may be a user identity ID, user fingerprint information, user facial information, user DNA information, user blockchain identification, and the like.
In one embodiment of the present application, the user blockchain identification may include a user public key of the user, a user private key of the user, a user blockchain account address of the user, an intermediate public key of the user, an intermediate private key of the user, and an intermediate blockchain account address of the user.
In an embodiment of the application, a first registration request initiated by a user to a blockchain may be obtained, a user private key of the user is generated based on the first registration request of the user, the user private key of the user is encrypted through an elliptic curve encryption algorithm to obtain a user public key of the user, and a hash operation is performed on the user public key to obtain a user blockchain account address of the user.
In an embodiment of the application, a second registration request initiated by a user to a blockchain through an intermediate platform may be acquired, an intermediate private key of the user is generated based on the second registration request of the user, the intermediate private key is encrypted by an elliptic curve encryption algorithm to obtain an intermediate public key of the user, and a hash operation is performed on the intermediate public key to obtain an intermediate blockchain account address of the user.
In an embodiment of the application, a user may use a user public key of the user as a user account, and a user private key of the user as a user password login terminal as a sign-in instruction of the user.
In an embodiment of the application, a user may use an intermediate public key of the user as a user account, and a user private key as a user password login terminal as a sign-in instruction of the user.
In an embodiment of the application, after the sign-in instruction of the user is obtained, the used service times and the remaining service times of the user can be prompted to the user, so that the user can clearly know the consumption condition of the user.
In one embodiment of the present application, the user identity may be identified based on the user identification code. The identities of the users can be classified according to the user identification codes, the identities of the users can be classified into members and non-members, and the identities of the users can be classified into old customers and new customers. Differentiating the identity of the user may allow the merchant to better service the customer.
In one embodiment of the application, the user identification code may be stored in a blockchain in association with the consumption information of the user, so that the merchant can acquire the consumption information of the user based on the user identification code to provide services for the user.
In one embodiment of the present application, the consumption information of the user may include the total number of times of service signed by the user, the number of times of service used by the user, the number of times of service left by the user, past service data of the user, and the like.
In one embodiment of the application, the consumption information of the user can be different for different types of merchants, so that different merchants can specifically serve the user.
In one embodiment of the present application, the merchant may be a gym and the consumption information of the user may include body data such as the user's height, weight, age, triage data, body health index, user DNA information, the user's disease history, and the like. The user past service data can comprise physical data change conditions of the user, personal education courses which the user has been on, evaluation of past courses by the user and the like.
In one embodiment of the present application, the merchant may be a beauty shop, and the consumption information of the user may include skin data such as age, skin type, skin problems, user DNA information, and the like of the user. The user past service data can comprise the skin data change condition of the user, the items which the user has done, and the evaluation of the items which the user has done.
In an embodiment of the present application, the merchant may also be a yoga, a bath center, a physiotherapy center, a hotel, a restaurant, a laundry, a car wash, a salon, etc. that can be billed according to the number of times of service.
With continued reference to fig. 2, in step S220, the remaining consumption times of the user are obtained from the block chain according to the user identification code.
In an embodiment of the application, the user identification code may be stored in the blockchain in association with the remaining consumption times of the user, so that the remaining consumption times of the user may be conveniently obtained according to the user identification code.
In one embodiment of the present application, the remaining number of consumption of the user is recorded at each change, so that the remaining number of consumption stored in the blockchain is the latest remaining number of consumption.
In one embodiment of the application, the check-in time of a user can be obtained; and acquiring the residual consumption times corresponding to the time closest to the check-in time before the check-in time, so that the user can conveniently find the latest residual consumption times while not changing the recorded residual consumption times, and consume according to the latest residual consumption times.
In an embodiment of the application, the remaining consumption times of the user can be reduced by 1 to obtain the remaining consumption times corresponding to the check-in time; and correspondingly storing the remaining consumption times corresponding to the check-in time and the check-in time in a block chain so as to facilitate the next consumption of the user.
In step S230, if the remaining consumption number is greater than or equal to 1, transferring the setting value from the user' S middle blockchain account to the merchant blockchain account for consumption.
In one embodiment of the present application, the user's accounts may include the user's blockchain account and the user's intermediate blockchain account. The user's intermediate blockchain account may be in a third party other than the user and the merchant, the third party being used to vouch for transactions between the user and the merchant. A third party may be used to vouch for transactions between one user and multiple merchants.
In an embodiment of the application, the remaining consumption times of the user correspond to an account balance of an intermediate blockchain account of the user, and the account balance of the intermediate blockchain account just can satisfy that the user finishes using the remaining consumption times.
In an embodiment of the present application, the account balance of the intermediate blockchain of the user may be obtained from the blockchain according to the user identification code.
In an embodiment of the application, whether the user is a target user or not may be determined according to the user identification code, and if the user is the target user, the block chain transfer is performed from the intermediate block chain account balance of the user to the block chain of the merchant for consumption. When the user becomes the target user, an intermediate blockchain account can be established for the user, and funds in the intermediate blockchain account can be agreed in a member agreement of the user and the merchant. The intermediate blockchain account enables constraints on the user such that the user can proceed to merchant consumption in compliance with the membership agreement.
In an embodiment of the present application, if the remaining consumption number is equal to 0, the merchant blockchain account prompts that the user fails to consume, and cannot consume.
In an embodiment of the application, when the user is prompted to fail to consume, the user can be prompted to recharge, so that the user can conveniently purchase the service.
In an embodiment of the application, if the remaining consumption number is equal to 0, a setting value may be transferred from the user blockchain account of the user to the merchant blockchain account for consumption, without hindering the user consumption.
In an embodiment of the application, if it is determined that the user is not the target user according to the user identification code, the user block chain account of the user may transfer the setting value to the merchant block chain account for consumption, without hindering the user consumption. In an embodiment of the application, if the user is not the target user, the set value for transferring from the user blockchain account of the user to the merchant blockchain account may be larger than the set value for transferring to the merchant blockchain account when the user is the target user, and the secondary consumption price of the user with pre-stored funds is distinguished from the consumption price of the user without pre-stored funds, so as to attract the user to pre-store funds at a lower price.
Merchant blockchain account in one embodiment of the present application, the set value may be a fee that the merchant charges for each service. The amount charged by the merchant for each service may be determined by dividing the amount spent by the merchant purchasing multiple services by the number of times the merchant purchased the service.
In one embodiment of the present application, the setting value may be varied according to the number of times of consumption purchased by the user. It may be that the more the number of consumption the user purchases, the smaller the setting value, the more the user is attracted to purchase the service.
In one embodiment of the application, if the account balance of the user blockchain account is greater than the set value, the set value is transferred from the user blockchain account to the merchant blockchain account for consumption. Only when the account amount in the user block chain account is enough, the service is provided for the user, the user arrearage is avoided, and the benefit of a merchant is protected.
In an embodiment of the present application, the user blockchain account balance of the user may be acquired from the blockchain according to the user identification code.
In one embodiment of the application, if the account balance of the intermediate blockchain account is not less than the target balance, transferring a setting value from the user blockchain account to the merchant blockchain account for consumption, wherein the target balance is a user deposit. After the user signs an agreement with a merchant for purchasing a plurality of times of services, in order to restrict the user, a transfer deposit can be transferred from the user blockchain account to the intermediate blockchain account, and the user still transfers accounts from the user blockchain account to the merchant blockchain account in the subsequent consumption process, so that the subsequent consumption to the merchant of the user is ensured, and the benefits of both the user and the merchant can be simultaneously protected.
Merchant blockchain accounts in one embodiment of the present application, transfers may be made to merchant blockchain accounts by way of smart contracts.
In an embodiment of the application, a member recharging instruction can be obtained, wherein the member recharging instruction includes a recharging amount, a user blockchain account identifier of a user and a middle blockchain account identifier of the user; and transferring the recharging amount from the user blockchain account of the user to the middle blockchain account of the user according to the member recharging instruction so that the user can recharge money in the middle blockchain account for consumption.
In an embodiment of the application, a member cash withdrawal instruction can be obtained, wherein the member cash withdrawal instruction comprises a cash withdrawal amount, a user block chain account identifier of a user and an intermediate block chain account identifier of the user; and transferring the cash-out amount from the middle block chain account of the user to the user block chain account of the user according to the member cash-out instruction so that the user cash out from the user block chain account to protect personal funds.
In one embodiment of the application, the presentation can be carried out only when the merchant violates or the agreement between the user and the merchant is terminated, so that the benefits of both the user and the merchant are protected.
In one embodiment of the application, if the user does not default for personal reasons or the agreement between the user and the merchant is terminated, the user part of the default money can be deducted if the user initiates a cash withdrawal instruction. A portion of the intermediate blockchain accounts may be transferred to the merchant blockchain account as a default and the cash-out amount may be transferred from the remaining portion of the intermediate blockchain accounts to the user blockchain account. The amount of the default money can be determined according to the withdrawal amount of the user, and the more the withdrawal amount, the more the default money.
In the embodiment of fig. 2, by obtaining a check-in instruction for a user to enter a merchant, the check-in instruction includes a user identification code from which the identity of the user may be identified. And acquiring the residual consumption times of the user from the block chain according to the user identification code, wherein the residual consumption times are generated by purchasing multiple services of a merchant in advance when the user transacts the member. And if the residual consumption times are more than or equal to 1, transferring a set value from the intermediate block chain account of the user to the block chain account of the merchant to consume. Because the user just transfers accounts to the merchant when the store enjoys the service of the merchant, and the user signs in once and transfers accounts to the block chain account of the merchant once, compared with the method that the cost is prestored to the block chain account of the merchant in advance, the loss caused by the fact that the merchant does not provide service for the user after receiving money can be avoided. Because the user transfers the pre-stored funds into the intermediate blockchain account, the user can be restricted to protect the merchant blockchain account of the benefit merchant blockchain account of the merchant.
Fig. 3 schematically shows a flowchart of a consumption method based on a blockchain network according to an embodiment of the present application, where an execution subject of the consumption method based on the blockchain network may be a server, such as the server 103A shown in fig. 1A.
The consumption method based on the blockchain network may include steps S310 to S380, which are described in detail as follows:
in step S310, a sign-in instruction of a user entering a merchant is obtained, where the sign-in instruction includes a user identification code;
in step S320, determining whether the user is a target user according to the user identification code;
in step S330, if the user is the target user, acquiring the balance of the intermediate blockchain account of the user from the blockchain according to the user identification code, and determining whether the balance of the intermediate blockchain account of the user is greater than a first set value;
in step S340, if the balance of the user' S intermediate blockchain account is greater than a first setting value, transferring the first setting value from the intermediate blockchain account to the merchant blockchain account for consumption;
in step S350, if the balance of the middle blockchain account of the user is not greater than the first set value, the user is prompted to fail to consume;
in step S360, if the user is the target user, acquiring the user block chain account balance of the user from the block chain according to the user identification code, and determining whether the user block chain account balance of the user is greater than a second set value;
in step S370, if the user' S user blockchain account balance is greater than a second setting value, transferring the second setting value to the merchant blockchain account for consumption;
in step S380, if the user block chain account balance of the user is not greater than the second setting value, the user is prompted to fail the consumption.
The embodiment of fig. 3 divides the users into target users and non-target users, so that both the target users and the non-target users can purchase merchant services, and merchants can service the users in a targeted manner.
In one embodiment of the block chain network based consumption method of fig. 3, the first setting value may be the same as the second setting value, and the first setting value and the second setting value may be set as needed.
In one embodiment of the application, the first setting value may be different from the second setting value, the target user may add value to the intermediate blockchain account, and the first setting value may be smaller than the second setting value, so that the user may be attracted to add value to the intermediate blockchain account, so as to form a long-term consumption cooperative relationship between the user and the merchant.
In one embodiment of the present application, in step S230 in fig. 2, the step of transferring the setting value from the user' S middle blockchain account to the merchant blockchain account for consuming the merchant blockchain account may include steps S410 to S420 as shown in fig. 4, and the steps in fig. 4 may be applied to a node in the blockchain system, which are described in detail as follows:
in step S410, a consumption record is generated that transfers the setting value to the merchant blockchain account;
in step S420, the consumption record is issued to the transaction pool, so that the balance of the merchant blockchain account is updated according to the consumption record.
In an embodiment of the application, if a set value is transferred from the user's middle blockchain account to the merchant blockchain account, the user's middle blockchain account identifier may be obtained, the merchant blockchain account identifier may be obtained, and a store consumption record may be generated according to the middle blockchain account identifier, the merchant blockchain account identifier, and the set value, so that the merchant blockchain account may conveniently know a fund source.
In an embodiment of the application, if a set value is transferred from a user blockchain account of a user to a merchant blockchain account, a user blockchain account identifier of the user may be obtained, a merchant blockchain account identifier may be obtained, and a store consumption record may be generated according to the user blockchain account identifier, the merchant blockchain account identifier, and the set value, so that the merchant blockchain account may conveniently know a fund source.
In an embodiment of the application, if the transfer operation indicated by the charging instruction is successful, a member charging record is generated according to the charging amount, the user block chain account identifier and the middle block chain account identifier, so that the account balance of the user middle block chain account stored in the block chain is conveniently updated according to the member charging record.
In an embodiment of the application, if the transfer operation indicated by the cash withdrawal instruction is successful, a member cash withdrawal record is generated according to the cash withdrawal amount, the user block chain account identifier and the middle block chain account identifier, so that the account balance of the user block chain account of the user stored in the block chain is conveniently updated according to the member cash withdrawal record.
In an embodiment of the application, after the node generates a transaction record, performing hash operation on the generated transaction record to obtain summary data, wherein the transaction record comprises any one of store consumption records, member recharging records and member cash withdrawal records; signing the abstract data through a private key of the node to obtain signed data; generating release data according to the public key of the node, the transaction record and the signature data; and issuing the issue data to a record pool of the blockchain system to wait for the transaction record to be written into the blockchain.
In an embodiment of the application, release data in a record pool of a blockchain system can be obtained, wherein the release data includes a transaction record, signature data and a public key of a publisher corresponding to the release data, the signature data is obtained by signing summary data through a private key of the publisher, and the summary data is obtained by performing hash operation on the transaction record; decrypting the signature data in the release data through a public key of a release party corresponding to the release data to obtain first decrypted data; performing hash operation on the transaction record in the release data to obtain first data; if the first data is consistent with the first decryption data, constructing a block according to the consumption record in the release data; blocks are linked to a blockchain and synchronized in the blockchain system.
In this embodiment, if the first data is consistent with the first decryption data, it indicates that the transaction record in the issue data has not been tampered with; otherwise, if the first data is inconsistent with the first decryption data, the transaction record in the release data is tampered, and the transaction record is discarded.
Through the steps, the verification of the transaction record in the release data is realized through the node, and when the verification determines that the transaction record is not tampered, the transaction record which is not tampered in the release data is written into the block chain, so that the accuracy and the effectiveness of the data written into the block chain are ensured.
Merchant blockchain account in one embodiment of the present application, after a transaction record is issued to a transaction pool, a node in a platform for executing a blockchain network-based consumption method may collect unsent consumption records in the transaction pool at intervals, package a recharge record into a blockchain structure, and synchronize to each node of the platform. The platform node can obtain the right of creating a new block through a workload certification mechanism, the information of the new block can be synchronized to the whole network, and the consumption operation of a user is completed after other nodes of the platform confirm the validity of the block.
Merchant block chain account in one embodiment of the application, a merchant block chain account may periodically obtain a transaction consumption record from a transaction pool, and update a user block chain account of a user, a middle block chain account of the user, and a merchant block chain account of the merchant block chain account.
Merchant blockchain account embodiments of the apparatus of the present application are described below, which may be used to perform a blockchain network-based consumption method in the above-described embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the consumption method based on the blockchain network described above in the present application.
Fig. 5 schematically shows a block diagram of a consumption device based on a blockchain network according to an embodiment of the present application.
Referring to fig. 5, a consumption apparatus 500 based on a blockchain network according to an embodiment of the present application includes an obtaining module 501 and a consuming module 502.
In some embodiments of the present application, based on the foregoing scheme, the obtaining module 501 is configured to obtain a sign-in instruction of a user entering a merchant, where the sign-in instruction includes a user identification code, and obtain, from a block chain, a remaining consumption number of the user according to the user identification code; the consumption module 502 is configured to transfer a setting value from the user's middle blockchain account to the merchant blockchain account for consumption if the remaining consumption number is greater than or equal to 1.
In some embodiments of the present application, based on the foregoing solution, the obtaining module 501 is configured to: acquiring the check-in time of a user; and acquiring the remaining consumption times corresponding to the time closest to the check-in time before the check-in time.
In some embodiments of the present application, based on the foregoing solution, the consumption device based on the blockchain network further includes a recording module 503, where the recording module 503 is configured to: subtracting 1 from the residual consumption times of the user to obtain the residual consumption times corresponding to the sign-in time; and storing the residual consumption times corresponding to the check-in time and the check-in time in the blockchain.
In some embodiments of the present application, based on the foregoing solution, the recording module 503 is further configured to: acquiring a middle blockchain account identifier of a user and acquiring a merchant blockchain account identifier; and generating a store consumption record according to the intermediate block chain account identifier, the merchant block chain account identifier and the set value.
In some embodiments of the present application, based on the foregoing, the transfer module 501 is further configured to: if the residual consumption times are 0, transferring a set value from the user blockchain account of the user to the merchant blockchain account to consume; the recording module 503 is further configured to: acquiring a user block chain account identifier of a user, and acquiring a merchant block chain account identifier; and generating a store consumption record according to the user blockchain account identifier, the merchant blockchain account identifier and the set value.
In some embodiments of the present application, based on the foregoing, the transfer module 501 is further configured to: acquiring a member recharging instruction, wherein the member recharging instruction comprises a recharging amount, a user block chain account identifier of a user and a middle block chain account identifier of the user; transferring the recharging amount from the user blockchain account of the user to the middle blockchain account of the user according to the member recharging instruction; the recording module 503 is further configured to: and if the transfer is successful, generating a member recharging record according to the recharging amount, the user block chain account identification and the middle block chain account identification.
In some embodiments of the present application, based on the foregoing, the transfer module 501 is further configured to: acquiring a member cash withdrawal instruction, wherein the member cash withdrawal instruction comprises a cash withdrawal amount, a user block chain account identifier of a user and a middle block chain account identifier of the user; transferring the cash-out amount from the middle block chain account of the user to the user block chain account of the user according to the member cash-out instruction; the recording module 503 is further configured to: and if the transfer is successful, generating a member cash withdrawal record according to the cash withdrawal amount, the user block chain account identification and the middle block chain account identification.
In some embodiments of the present application, based on the foregoing solution, the recording module 503 is further configured to: after the node generates a transaction record, carrying out hash operation on the generated transaction record to obtain summary data, wherein the transaction record comprises any one of store consumption records, member recharging records and member cash withdrawal records; signing the abstract data through a private key of the node to obtain signed data; generating release data according to the public key of the node, the transaction record and the signature data; and issuing the issue data to a record pool of the blockchain system to wait for the transaction record to be written into the blockchain.
In some embodiments of the present application, based on the foregoing solution, the recording module 503 is further configured to: acquiring release data in a record pool of a blockchain system, wherein the release data comprises transaction records, signature data and public keys of issuers corresponding to the release data, the signature data is obtained by signing summary data through private keys of the issuers, and the summary data is obtained by carrying out hash operation on the transaction records; decrypting the signature data in the release data through a public key of a release party corresponding to the release data to obtain first decrypted data; performing hash operation on the transaction record in the release data to obtain first data; if the first data is consistent with the first decryption data, constructing a block according to the consumption record in the release data; blocks are linked to a blockchain and synchronized in the blockchain system.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 60 according to this embodiment of the present application is described below with reference to fig. 6. The electronic device 60 shown in fig. 6 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. 6, the electronic device 60 is in the form of a general purpose computing device. The components of the electronic device 60 may include, but are not limited to: the at least one processing unit 61, the at least one memory unit 62, a bus 63 connecting different system components (including the memory unit 62 and the processing unit 61), and a display unit 64.
Wherein the storage unit stores program code executable by the processing unit 61 to cause the processing unit 61 to perform the steps according to various exemplary embodiments of the present application described in the section "example methods" above in this specification.
The storage unit 62 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)621 and/or a cache memory unit 622, and may further include a read only memory unit (ROM) 623.
The storage unit 62 may also include a program/utility 624 having a set (at least one) of program modules 625, such program modules 625 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 63 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 60 may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 60, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 60 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 65. Also, the electronic device 60 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 66. As shown, network adapter 66 communicates with the other modules of electronic device 60 via bus 63. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 60, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
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 make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present application.
There is also provided, in accordance with an embodiment of the present application, a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, various aspects of the present application may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present application described in the "exemplary methods" section above of this specification, when the program product is run on the terminal device.
In some embodiments of the present application, a program product for implementing the above method of embodiments of the present application is provided, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or 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.
A computer readable signal medium may include a propagated data signal with 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 readable signal medium may also be any readable medium that is not a 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 readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present application, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
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 consumption method based on a blockchain network, applied to a node in a blockchain system, the method comprising:
acquiring a sign-in instruction of a user entering the merchant, wherein the sign-in instruction comprises a user identification code;
acquiring the residual consumption times of the user from a block chain according to the user identification code;
and if the residual consumption times are more than or equal to 1, transferring a set value from the middle blockchain account of the user to the block chain account of the merchant for consumption.
2. The consumption method based on the blockchain network according to claim 1,
the obtaining the remaining consumption times of the user from the block chain according to the user identification code includes:
acquiring the check-in time of a user;
and acquiring the remaining consumption times corresponding to the time closest to the check-in time before the check-in time.
3. The consumption method based on the blockchain network according to claim 2,
after transferring a setting value from the intermediate blockchain account of the user to the block chain account of the merchant for consumption if the remaining consumption number is greater than or equal to 1, the method comprises the following steps:
subtracting 1 from the residual consumption times of the user to obtain the residual consumption times corresponding to the check-in time;
and storing the remaining consumption times corresponding to the check-in time and the check-in time in the block chain correspondingly.
4. The consumption method based on the blockchain network according to claim 1,
after the transferring a setting value from the user's middle blockchain account to the merchant blockchain account for consumption if the remaining consumption number is greater than or equal to 1, the method further includes:
acquiring a middle blockchain account identifier of the user and acquiring a merchant blockchain account identifier;
and generating a store consumption record according to the intermediate block chain account identifier, the merchant block chain account identifier and the set value.
5. The consumption method based on the blockchain network according to claim 1,
if the residual consumption times are 0, transferring the set value from the user block chain account of the user to the merchant block chain account for consumption;
acquiring a user block chain account identifier of the user and acquiring a merchant block chain account identifier;
and generating a store consumption record according to the user blockchain account identifier, the merchant blockchain account identifier and the set value.
6. The method for blockchain network based consumption according to claim 1, wherein the method further comprises:
acquiring a member recharging instruction, wherein the member recharging instruction comprises a recharging amount, a user block chain account identifier of a user and a middle block chain account identifier of the user;
transferring the recharge amount from the user blockchain account of the user to the intermediate blockchain account of the user according to the member recharge instruction;
and if the transfer is successful, generating a member recharging record according to the recharging amount, the user block chain account identification and the middle block chain account identification.
7. The method for blockchain network based consumption according to claim 1, wherein the method further comprises:
acquiring a member cash withdrawal instruction, wherein the member cash withdrawal instruction comprises a cash withdrawal amount, a user block chain account identifier of a user and a middle block chain account identifier of the user;
transferring the withdrawal amount from the user's intermediate blockchain account to the user's blockchain account according to the member withdrawal instruction;
and if the transfer is successful, generating a member cash withdrawal record according to the cash withdrawal amount, the user block chain account identification and the middle block chain account identification. Merchant block chain account.
8. The blockchain network based consumption method according to any one of claims 4 to 7, wherein the merchant blockchain account method further comprises:
after the node generates a transaction record, carrying out hash operation on the generated transaction record to obtain summary data, wherein the transaction record comprises any one of store consumption records, member recharging records and member cash withdrawal records;
signing the summary data through a private key of the node to obtain signature data;
generating release data according to the public key of the node, the transaction record and the signature data;
and issuing the issuing data to a record pool of the blockchain system to wait for the transaction record to be written into the blockchain.
9. The method of claim 1, further comprising:
acquiring release data in a record pool of the blockchain system, wherein the release data comprises transaction records, signature data and public keys of issuers corresponding to the release data, the signature data is obtained by signing summary data through private keys of the issuers, and the summary data is obtained by carrying out hash operation on the transaction records;
decrypting the signature data in the release data through a public key of a release party corresponding to the release data to obtain first decrypted data; and
performing hash operation on the transaction record in the release data to obtain first data;
if the first data is consistent with the first decryption data, constructing a block according to the consumption record in the release data;
the blocks are linked to the block chain and synchronized in the block chain system. Merchant blockchain account a merchant blockchain account.
10. A consumption device based on a blockchain network, applied to a node in a blockchain system, the device comprising:
the acquisition module is used for acquiring a sign-in instruction of a user entering the merchant, wherein the sign-in instruction comprises a user identification code, and the remaining consumption times of the user are acquired from a block chain according to the user identification code;
and the consumption module is used for transferring a set value from the middle block chain account of the user to the block chain account of the merchant to consume if the residual consumption times are more than or equal to 1.
CN202010064758.7A 2020-01-20 2020-01-20 Consumption method and device based on block chain network Pending CN111292074A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010064758.7A CN111292074A (en) 2020-01-20 2020-01-20 Consumption method and device based on block chain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010064758.7A CN111292074A (en) 2020-01-20 2020-01-20 Consumption method and device based on block chain network

Publications (1)

Publication Number Publication Date
CN111292074A true CN111292074A (en) 2020-06-16

Family

ID=71025489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010064758.7A Pending CN111292074A (en) 2020-01-20 2020-01-20 Consumption method and device based on block chain network

Country Status (1)

Country Link
CN (1) CN111292074A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112613880A (en) * 2020-12-28 2021-04-06 青岛海链数字科技有限公司 Block chain-based consumption processing system, method, apparatus, device, and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112613880A (en) * 2020-12-28 2021-04-06 青岛海链数字科技有限公司 Block chain-based consumption processing system, method, apparatus, device, and medium

Similar Documents

Publication Publication Date Title
US11004101B2 (en) Coupon system and methods using a blockchain
CN109711858B (en) Method and system for preventing fraudulent gift cards via blockchain
KR102111368B1 (en) System and method for trading virtual currency
US20170372417A1 (en) Digital asset account management
US20110238570A1 (en) System of Online Trading Through Intermediary Platform and Methods Thereof
US20170004482A1 (en) Multi-Factor Identity Authentication
KR20120041038A (en) Method and system of payment using mac address information
US20190244202A1 (en) Real-time processing of requests related to facilitating use of an account
US20240005328A1 (en) Systems and methods for use in biometric-enabled network interactions
EP4358000A1 (en) Digital currency-based payment method, platform, terminal, and payment system
US20160232525A1 (en) Online form fill for tokenized credentials
KR102333811B1 (en) System and method for processing card payment based on block-chain
US20150206145A1 (en) Id management device, id management method, and id management program
KR20190084923A (en) Method for paying based on blockchain and payment server using the same
WO2017184305A1 (en) System and method of device profiling for transaction scoring and loyalty promotion
WO2012046576A1 (en) Sales support system
CN111292074A (en) Consumption method and device based on block chain network
CN112347344A (en) Management method and device for multi-period additional resource certificate and electronic equipment
EP3459035A1 (en) Method and system for voice authenticated distribution of payment credentials
KR101735287B1 (en) The method, server and system for providing application funding service
WO2023097101A1 (en) Validating transactions electronically using proof of reception validation protocol
US11587082B1 (en) Systems and methods for reconciling electronic transactions facilitated by a commerce platform
CN111260415A (en) Advertisement recommendation method and device
JP2018045446A (en) Settlement system, method and program
TW202025067A (en) Order checkout device, recording medium and order checkout method capable of simplifying order checkout and improving user convenience

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024155

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination