CN111028059A - Block chain-based article exchange method, device, equipment and storage medium - Google Patents

Block chain-based article exchange method, device, equipment and storage medium Download PDF

Info

Publication number
CN111028059A
CN111028059A CN201911268211.2A CN201911268211A CN111028059A CN 111028059 A CN111028059 A CN 111028059A CN 201911268211 A CN201911268211 A CN 201911268211A CN 111028059 A CN111028059 A CN 111028059A
Authority
CN
China
Prior art keywords
user
commodity
exchange
contract
information
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.)
Granted
Application number
CN201911268211.2A
Other languages
Chinese (zh)
Other versions
CN111028059B (en
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 CN201911268211.2A priority Critical patent/CN111028059B/en
Publication of CN111028059A publication Critical patent/CN111028059A/en
Application granted granted Critical
Publication of CN111028059B publication Critical patent/CN111028059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/16Real estate

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Tourism & Hospitality (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application discloses a block chain-based article exchange method, device, equipment and storage medium, and belongs to the technical field of block chains. The method comprises the following steps: acquiring a commodity exchange contract in an incomplete state from a blockchain of the blockchain system, wherein the commodity exchange contract is used for executing a commodity exchange process between a first user and a second user; acquiring the property ownership information of the first user corresponding to the property exchange contract and the property ownership information of the second user corresponding to the property exchange contract from the blockchain; executing the commodity exchange contract when the first user and the second user are determined to meet the commodity exchange qualification according to the commodity ownership information of the first user and the commodity ownership information of the second user. According to the method and the device, a third party is not needed, the trust problem in the related technology is solved, and the reliability of commodity exchange is improved.

Description

Block chain-based article exchange method, device, equipment and storage medium
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a method, an apparatus, a device, and a storage medium for exchanging articles based on a block chain.
Background
The commodity exchange is the behavior of mutually exchanging the ownership of commodities by adopting an equivalent or complementary price mode on the basis of mutual equality and voluntary among commodity owners. For example, the commodity exchange may be a house property exchange, and under the condition that the government has limited purchasing a set of houses, the user a and the user B, each having a set of houses, may improve the house condition by means of the house property exchange.
At present, for example of house property exchange, a user a and a user B want to exchange house properties and make up for a price difference, and at this time, the user a and the user B cannot buy and sell at first, and need to perform the following transaction modes through an intermediary party C and an intermediary party D: the user A sells the property 1 to the middle party C, the user B sells the property 2 to the middle party D, the user A purchases the property 2 from the middle party D, and the user B purchases the property 1 from the middle party C.
When the technology is used for exchanging articles, a third party is needed, so that the trust problem exists, all the participants cannot be guaranteed to execute according to the contract, unnecessary loss can be caused, and the reliability of article exchange is poor.
Disclosure of Invention
The embodiment of the application provides a block chain-based article exchange method, a block chain-based article exchange device, a block chain-based article exchange equipment and a storage medium, and can solve the problem of poor reliability of article exchange in related technologies. The technical scheme is as follows:
in one aspect, a block chain-based item exchange method is provided, the method including:
acquiring a commodity exchange contract in an incomplete state from a blockchain of the blockchain system, wherein the commodity exchange contract is used for executing a commodity exchange process between a first user and a second user;
acquiring the property ownership information of the first user corresponding to the property exchange contract and the property ownership information of the second user corresponding to the property exchange contract from the blockchain;
executing the commodity exchange contract when the first user and the second user are determined to meet the commodity exchange qualification according to the commodity ownership information of the first user and the commodity ownership information of the second user.
In one possible implementation, the item exchange condition further includes that the first user and the second user have applied for loan eligibility.
In one possible implementation manner, before the acquiring, from the blockchain, the item ownership information of the first user corresponding to the item exchange contract and the item ownership information of the second user corresponding to the item exchange contract, the method further includes:
storing the item ownership information of the first user and the item ownership information of the second user into the blockchain.
In one possible implementation, the obtaining, from a blockchain of the blockchain system, a commodity exchange contract in an incomplete state includes:
and acquiring the article exchange contract in an incomplete state from the block chain at regular time.
In one possible implementation, after the executing the commodity exchange contract, the method further comprises:
generating article exchange completion information;
and storing the commodity exchange completion information into the block chain.
In one possible implementation, the obtaining, from a blockchain of the blockchain system, a commodity exchange contract in an incomplete state includes:
and acquiring the commodity exchange contract of which the state is marked as the incomplete state from the blockchain of the blockchain system.
In one possible implementation, after the executing the commodity exchange contract, the method further comprises:
modifying a status flag of the commodity exchange contract from an incomplete status to a completed status.
In one aspect, there is provided a block chain-based item exchange device, the device comprising:
an obtaining module, configured to obtain a commodity exchange contract in an incomplete state from a blockchain of the blockchain system, where the commodity exchange contract is used to perform a commodity exchange process between a first user and a second user;
the acquiring module is further configured to acquire, from the blockchain, item ownership information of the first user corresponding to the item exchange contract and item ownership information of the second user corresponding to the item exchange contract;
and the execution module is used for executing the commodity exchange contract when the first user and the second user meet the commodity exchange qualification according to the commodity ownership information of the first user and the commodity ownership information of the second user.
In one possible implementation, the execution module is configured to:
when the number of the ownership of the article corresponding to the first user after the article exchange process is finished is determined to meet a number condition and the number of the ownership of the article corresponding to the second user meets the number condition according to the ownership information of the article of the first user and the ownership information of the article of the second user, executing the article exchange contract;
wherein the ownership of the item corresponding to the first user comprises ownership of the item of the first user and ownership of the family member of the first user, and the ownership of the item of the second user comprises ownership of the item of the second user and ownership of the family member of the second user.
In one possible implementation, the commodity exchange contract includes the following information:
the commodity exchange requirement information of the first user is used for indicating that a first commodity of the first user is used for exchanging a second commodity of the second user;
the commodity exchange requirement information of the second user is used for indicating that the first commodity of the first user is exchanged by the second commodity of the second user.
In a possible implementation manner, the commodity exchange requirement information of the first user is further used for indicating that the first user obtains target funds, and the commodity exchange requirement information of the second user is further used for indicating that the second user pays the target funds;
the commodity exchange contract further includes a commodity exchange condition that includes that the second user has deposited target funds into a target account of the blockchain.
In one possible implementation, the obtaining module is configured to:
and when the article exchange condition is determined to be met, acquiring the article ownership information of the first user and the article ownership information of the second user from the block chain.
In one possible implementation, the item exchange condition further includes that the first user and the second user have applied for loan eligibility.
In one possible implementation, the apparatus further includes:
a receiving module, configured to receive an item exchange request, where the item exchange request carries item exchange requirement information of the first user and item exchange requirement information of the second user;
a generating module, configured to generate the commodity exchange contract based on the commodity exchange demand information of the first user and the commodity exchange demand information of the second user that are carried in the commodity exchange request;
and the storage module is used for storing the signed commodity exchange contract into the block chain after the commodity exchange contract is signed by using the private key of the first user and the private key of the second user.
In one possible implementation, the obtaining module is configured to:
and acquiring the article exchange contract in an incomplete state from the block chain at regular time.
In one possible implementation, the apparatus further includes:
a storage module, configured to store the item ownership information of the first user and the item ownership information of the second user in the block chain.
In one possible implementation, the apparatus further includes:
the generating module is used for generating article exchange completion information;
and the storage module is used for storing the article exchange completion information into the block chain.
In one possible implementation, the obtaining module is configured to:
and acquiring the commodity exchange contract of which the state is marked as the incomplete state from the blockchain of the blockchain system.
In one possible implementation, the apparatus further includes:
a modification module to modify the status label of the commodity exchange contract from an incomplete status to a completed status.
In one aspect, a computer device is provided and includes a processor and a memory, where at least one program code is stored in the memory and loaded into and executed by the processor to implement the operations performed by the above block chain based commodity exchange.
In one aspect, a computer-readable storage medium having at least one program code stored therein is provided, which is loaded and executed by a processor to implement the operations performed by the blockchain based commodity exchange as described above.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
by acquiring unfinished commodity exchange contracts from a block chain of a block chain system and then acquiring commodity ownership information of two exchange parties corresponding to the commodity exchange contracts, when the two exchange parties are determined to meet commodity exchange qualification, the commodity exchange process is automatically finished without a third party, the trust problem in the related technology is solved, and the reliability of commodity exchange is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a blockchain system according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a blockchain system according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a blockchain according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a process for generating a block according to an embodiment of the present application;
fig. 5 is a flowchart of an article exchange method based on a block chain according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an article exchange device based on a block chain according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal 700 according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a server 800 according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
For convenience of understanding, terms referred to in the embodiments of the present application are explained below:
blockchain (Blockchain): the method is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. The block chain, which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. Each tile contains a timestamp and a link to the previous tile. In a narrow sense, a blockchain is a distributed ledger of data blocks assembled in a sequential manner into a chain data structure in chronological order and cryptographically secured as non-falsifiable and non-forgeable, i.e. the data in the blockchain will be irreversible once recorded.
Consensus mechanism (Consensus mechanism): the block chain system is a mathematical algorithm for establishing trust and obtaining rights and interests among different nodes. In the block chain system, the verification and confirmation of the transaction can be completed in a short time through the voting of special nodes, and if a plurality of nodes with irrelevant benefits can achieve consensus on a transaction, all the nodes in the system can also achieve consensus on the transaction.
Smart contract (Smart contract): is a computer protocol intended to propagate, validate or execute contracts in an informational manner. Each node in the blockchain system can automatically execute a contract program according to a specific condition, can operate data stored in the chain, and is an important way for a user to interact with the blockchain and realize business logic by using the blockchain. The goal of smart contracts is to provide a secure method over traditional contracts and to reduce other transaction costs associated with the contracts, which allows for trusted transactions that are traceable and irreversible without third parties.
Public Key (Public Key) and Private Key (Private Key): the key pair (namely a public key and a private key) is obtained through an algorithm, the public key is a public part of the key pair, confidentiality is not required, and a decryptor can obtain the key pair through various channels; the private key is an undisclosed part, and only the key held by the encryption party needs to be kept secret. Public keys are typically used to encrypt data, verify digital signatures, and the like. By means of such an algorithm it is ensured that the resulting pair of keys is unique, which pair of keys, if one of the keys is used to encrypt a piece of data, must be decrypted with the other key, e.g. encrypting data with a public key, must be decrypted with the corresponding private key, if encrypted with a private key, must also be decrypted with the corresponding public key, otherwise the decryption will not succeed.
Fig. 1 is a schematic diagram of a blockchain system according to an embodiment of the present disclosure, and as shown in fig. 1, the blockchain system 100 may include a plurality of node devices 101, where the plurality of node devices 101 are configured with a same blockchain, and any one node device 101 in the blockchain system may perform one or more steps in the blockchain-based item exchange method according to the embodiment of the present disclosure. The plurality of node apparatuses 101 may belong to different organizations or individual users. For example, at least one node apparatus 101 of the plurality of node apparatuses 101 belongs to an individual user, at least one node apparatus 101 belongs to an article ownership authority, at least one node apparatus belongs to a bank, at least one node apparatus 101 belongs to a public security agency, and at least one node apparatus 101 belongs to a civil agency. Of course, there may be at least one node apparatus 101 belonging to other organizations. The plurality of node devices 101 may be servers or terminals, which is not specifically limited in this embodiment of the present application.
Taking an article as a house property as an example, as shown in fig. 2, the plurality of node devices in the blockchain system may include a node device corresponding to a housing administration, a node device corresponding to a civil institution, a node device corresponding to a public security institution, and a node device corresponding to a loan bank. The node equipment corresponding to the housing administration is used for carrying out property right inquiry and transaction; the node equipment corresponding to the civil institution and the node equipment corresponding to the public security institution are used for inquiring users and family household registers and inquiring purchasing conditions of the limited-purchasing users through the house administration; the node equipment corresponding to the loan bank is used for issuing house loans, interest settlement and the like. As shown in fig. 2, the plurality of node devices in the blockchain system may further include node devices corresponding to different users. Of course, besides the node devices shown in fig. 2, the blockchain system may further include other node devices, such as a transaction node device, which is not specifically limited in this embodiment of the present application.
These entities or users in fig. 2 may register as blockchain users, with unique user identifications and private keys. The user identifier may be a user public key, which is used to uniquely identify a user or an organization in the blockchain system. Intelligent contracts may be entered between these entities or users, for example, the intelligent contracts may be commodity exchange contracts that contract the flow of commodity exchanges.
Data sharing can be carried out between node equipment in the blockchain system, each node equipment can receive input information when carrying out normal work, and shared data in the blockchain system is maintained based on the received input information. In order to ensure information intercommunication in the blockchain system, information connection can exist between each node device in the blockchain system, and information transmission can be carried out between the node devices through the information connection. For example, when any node device in the blockchain system receives input information, other node devices in the blockchain system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored in all the node devices in the blockchain system are consistent.
Each node device in the blockchain system has a corresponding node identifier, and each node device in the blockchain system can store the node identifiers of other node devices in the blockchain system, so that the generated block can be broadcast to other node devices in the blockchain system according to the node identifiers of other node devices. Each node device may maintain a node identifier list as shown in the following table, and store the node device 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 device, and table 1 only illustrates the IP address as an example.
TABLE 1
Node device name Node identification
Node device
1 117.114.151.174
Node device 2 117.116.189.145
Node device N 119.123.789.258
Each node device in the blockchain system stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 3, 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.
When each block in the block chain is generated, referring to fig. 4, when the node device 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. And then, the node equipment where the block chain is located respectively sends the newly generated blocks to other node equipment in the block chain system where the newly generated blocks are located according to the node identifiers of the other node equipment in the block chain system, the newly generated blocks are verified by the other node equipment, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
Fig. 5 is a flowchart of an article exchange method based on a block chain according to an embodiment of the present application. The method may be applied to a node device in a blockchain system, and referring to fig. 5, the method may include:
501. the first node equipment receives an article exchange request, wherein the article exchange request carries article exchange requirement information of a first user and article exchange requirement information of a second user.
The first node device may be any node device in the blockchain system, and the item exchange request is used to request item exchange between the first user and the second user. For example, the item may be a house property or other type of item.
For the item exchange requirement information, in a possible implementation manner, the item exchange requirement information of the first user is used to indicate that the second item of the second user is exchanged with the first item of the first user; the commodity exchange requirement information of the second user is used for indicating that the first commodity of the first user is exchanged by using the second commodity of the second user.
The commodity exchange requirement information of the first user can also be used for indicating that the first user obtains target funds, and the commodity exchange requirement information of the second user can also be used for indicating that the second user pays the target funds.
Since a certain spread exists between the first item of the first user and the second item of the second user, a target fund can be agreed when exchanging items, one party pays the target fund, and the other party obtains the target fund.
Taking the article as a house property as an example, the article exchange requirement information of the first user may be: selling the property X, buying the property Y and obtaining the fund Z; the commodity exchange requirement information of the second user may be: sell property Y, buy property X, and pay out fund Z.
The first node device receiving the commodity exchange request may adopt any one of the following possible implementation manners:
in a first manner, the first user may initiate the item exchange request on a first device, which is the first node device.
The first user and the second user can determine respective commodity exchange requirements together, the first user initiates a commodity exchange request on the first device, the commodity exchange request carries the commodity exchange requirement information of the first user and the commodity exchange requirement information of the second user, the first device is the first node device, and therefore the first node device can receive the commodity exchange request carrying the commodity exchange requirement information of the first user and the commodity exchange requirement information of the second user.
In a second manner, the second user may initiate the item exchange request on a second device, which is the second node device.
The first user and the second user can determine respective commodity exchange requirements together, the second user initiates a commodity exchange request on the second device, the commodity exchange request carries the commodity exchange requirement information of the first user and the commodity exchange requirement information of the second user, the second device is the first node device, and therefore the first node device can receive the commodity exchange request carrying the commodity exchange requirement information of the first user and the commodity exchange requirement information of the second user.
In a third mode, a first user can initiate a first commodity exchange request on first equipment, the first commodity exchange request carries commodity exchange requirement information of the first user, and the first equipment sends the first commodity exchange request to third equipment; the second user may initiate a second article exchange request on the second device, where the second article exchange request carries article exchange requirement information of the second user, and the second device sends the second article exchange request to the third device. The third device is the first node device.
The first user and the second user can determine respective commodity exchange requirements together, the first user initiates a first commodity exchange request on the second device and sends the first commodity exchange request to the third device, the first user initiates a second commodity exchange request on the second device and sends the second commodity exchange request to the third device, and the third device is the first node device, so that the first node device can receive the commodity exchange request carrying the commodity exchange requirement information of the first user and the commodity exchange requirement information of the second user.
In one possible implementation, the commodity exchange request may carry a transaction type and commodity exchange conditions (transaction conditions) in addition to the commodity exchange requirement information of the first user and the commodity exchange requirement information of the second user, wherein the transaction type may be a serial transaction (interchange transaction), and the commodity exchange conditions may include that the second user has deposited target funds into the target account of the block chain and may also include that the first user and the second user have applied for loan eligibility.
The target account may be a designated common guarantee account of the blockchain, and after the fund is deposited, a contract ID (Identification) corresponding to the fund use needs to be indicated. The first user and the second user can apply for loan qualification to node equipment corresponding to a bank in the block chain system, the node equipment can carry out loan settlement and approval operation of the loan qualification according to the conditions and application information of the two parties, and the approval result is stored in the block chain, namely, the approval result is synchronized to the block chain.
502. And the first node equipment generates a commodity exchange contract based on the commodity exchange demand information of the first user and the commodity exchange demand information of the second user, which are carried by the commodity exchange request.
The first node device may obtain the item demand information of the first user and the item exchange demand information of the second user from the item exchange request received in step 501, and for a case that the item exchange request also carries a transaction type and an item exchange condition, the first node device may also obtain the transaction type and the item exchange condition from the item exchange request.
The first node device may generate a commodity exchange contract based on the information carried in the commodity exchange request, where the commodity exchange contract may include commodity exchange demand information of the first user and commodity exchange demand information of the second user. The commodity exchange contract may further include a transaction type and a commodity exchange condition for a case where the commodity exchange request also carries the transaction type and the commodity exchange condition. The commodity exchange contract may correspond to a contract ID for uniquely identifying the commodity exchange contract.
503. The first node device signs the commodity exchange contract by using the private key of the first user and the private key of the second user, and then stores the commodity exchange contract into the block chain.
The commodity exchange contract is stored in the blockchain, i.e. the commodity exchange contract is synchronized to the blockchain, which may also be referred to as the uplink.
The first node device may store the commodity exchange contract including the private key signature into the blockchain of the blockchain system after signing the commodity exchange contract using the private key of the first user and the private key of the second user. When acquiring the commodity exchange contract including the private key signature, any node device in the blockchain system may verify the private key signature of the commodity exchange contract, for example, public keys of the first user and the second user are acquired from the blockchain of the blockchain system, and the private key signature is verified by using the public key of the first user and the public key of the second user. The authenticity of the commodity exchange contract can be ensured by signing and exchanging in an intelligent contract mode.
The first node device may store the commodity exchange contract into the blockchain based on a consensus mechanism, so that any node device in the blockchain system may obtain the commodity exchange contract. The first node device may generate a target block based on the commodity exchange contract, the target block is identified by the blockchain system, and after the target block passes the identification, the target block may be added to the blockchain, so that the commodity exchange contract in the target block is stored in the blockchain. For details of generating the target block and adding the target block to the block chain by the first node device, reference may be made to the corresponding descriptions in fig. 3 and fig. 4, which are not described herein again.
Steps 501 to 503 are procedures for a node device in the blockchain system to store an item exchange contract into the blockchain. The steps 501 to 503 are optional steps, and are not required to be executed each time the commodity exchange is performed, as long as it is ensured that the commodity exchange contract is stored on the block chain when the commodity exchange is performed.
The commodity exchange contract stored in the blockchain system may be added with a status flag for marking that the commodity exchange contract is in a completed state or an incomplete state.
504. The second node device obtains a commodity exchange contract in an unfinished state from a blockchain of the blockchain system, wherein the commodity exchange contract is used for executing a commodity exchange process between the first user and the second user.
The second node device may be any node device in the blockchain system, and the second node device may be the same as or different from the first node device.
In a possible implementation manner, the second node device may obtain the commodity exchange contract whose state is marked as the incomplete state from the block chain of the block chain system, and according to the commodity exchange contract, may learn that the commodity exchange is performed between the first user and the second user.
Each commodity exchange contract stored in the block chain system is added with a state mark, and the second node device can query the state marks of the commodity exchange contracts and acquire the commodity exchange contracts of which the state marks are incomplete.
In one possible implementation, the second node device may periodically obtain the commodity exchange contract in the incomplete state from the block chain with respect to the timing of obtaining the commodity exchange contract in the incomplete state by the second node device.
The second node device may periodically (periodically) query the status flag of each commodity exchange contract in the block chain, and obtain the commodity exchange contract whose status flag is in an incomplete state. By timing acquisition of incomplete commodity exchange contracts in the blockchain, these contracts can be processed in time.
505. When the commodity exchange condition is determined to be met, the second node device acquires the commodity ownership information of the first user corresponding to the commodity exchange contract and the commodity ownership information of the second user corresponding to the commodity exchange contract from the block chain.
The commodity exchange condition is a commodity exchange condition corresponding to the commodity exchange contract, that is, a commodity exchange condition included in the commodity exchange contract. The item ownership information of the first user is used to indicate the ownership status of the first user, i.e., which items the first user has ownership of, and the item ownership information of the second user is used to indicate the ownership status of the second user, i.e., which items the second user has ownership of.
When the second node device acquires the commodity exchange contract, it may determine whether a commodity exchange condition corresponding to the commodity exchange contract is currently satisfied. Taking the article exchange condition as that the second user has deposited the target funds into the target account of the block chain and the first user and the second user have applied for obtaining the loan qualification, the second node device may query whether the target funds exist in the target account, specifically, the second node device may query whether a contract ID corresponding to the fund usage exists in the target account and is the target funds of the contract ID of the article exchange contract, and if so, may determine that the target funds have been deposited into the target account by the second user. The second node device may query the blockchain for approval results of the first user and the second user for loan eligibility, and determine whether the first user and the second user have obtained loan eligibility based on the approval results. If the second node device determines that the second user has deposited the target funds into the target account of the block chain and that the first user and the second user have applied for loan eligibility, then it may be determined that the conditions for the interchange of items are currently satisfied.
It will be appreciated that if it is determined that the commodity exchange condition is not satisfied, the second node device may temporarily leave the commodity exchange contract unprocessed and wait until the next time the incomplete commodity exchange contract is retrieved from the blockchain.
The second node device may learn, according to the commodity exchange contract, the first user and the second user to be subjected to commodity exchange, and further acquire, from the blockchain, the stored commodity ownership information of the first user and the stored commodity ownership information of the second user.
In a possible implementation manner, before the second node device performs step 505, the first user and the second user may authorize the second node device to query the commodity exchange qualification of both parties, that is, authorize the second node device to query the commodity ownership information of the first user and the second user, and determine whether the first user and the second user satisfy the commodity exchange qualification according to the commodity ownership information. Accordingly, the second node device may be a node device authorized to query the first user and the second user for item exchange eligibility.
In this step 505, the second node device may initiate a query request for the item exchange qualification of the first user and the second user, and other node devices in the blockchain system may determine whether the first user and the second user authorize the second node device to query the item exchange qualification of the first user and the second user. For example, the first user and the second user may upload authorization information to the blockchain system in advance, where the authorization information is used to indicate that the second node device in the blockchain system is authorized to query the first user and the second user for the commodity exchange qualification. In this way, when receiving the query request, the other node devices in the blockchain system may query the authorization information of the first user and the second user, and determine whether the first user and the second user authorize the second node device to query the item exchange qualification of the first user and the second user according to the query result. Specifically, if the authorization information is queried, it may be determined that the first user and the second user authorize the second node device to query the first user and the second user for item exchange qualification, and if the authorization information is not queried, it may be determined that the first user and the second user do not authorize the second node device to query the first user and the second user for item exchange qualification. In addition, the first user and the second user can also authorize the node equipment corresponding to the bank to automatically complete the loan settlement and loan application, and the authorization mode is the same as the authorization mode of the second node equipment to inquire the commodity exchange qualification of the first user and the second user, and is not described any more.
In one possible implementation, before acquiring the item ownership information of the first user and the item ownership information of the second user from the blockchain, the method further includes: and storing the item ownership information of the first user and the item ownership information of the second user into the block chain.
The article ownership information of the first user and the article ownership information of the second user may be pre-stored in the blockchain by the second node device, or may be pre-stored in the blockchain by a node device other than the second node device. The property ownership information of each of the first user and the second user may be stored in the blockchain by the node device corresponding to the property ownership management authority, and taking the property as an example, the property information of each of the first user and the second user may be stored in the blockchain by the node device corresponding to the housing authority.
The way in which the node device stores the item ownership information of the first user and the item ownership information of the second user in the block chain is the same as the way in which the item exchange contract is stored in the block chain in step 503, and specific details refer to the description corresponding to fig. 3 and fig. 4, and are not described here again.
Step 505 is one possible implementation of obtaining the item ownership information of the first user and the item ownership information of the second user from the blockchain. By querying the commodity exchange qualification of the first user and the second user when the condition is met, the commodity exchange process can be ensured to be completed smoothly.
506. And executing the commodity exchange contract when the second node device determines that the first user and the second user meet the commodity exchange qualification according to the commodity ownership information of the first user and the commodity ownership information of the second user.
The second node device can know the ownership of which items the first user owns according to the item ownership information of the first user, know the ownership of which items the second user owns according to the item ownership information of the second user, and determine whether the first user and the second user satisfy the item exchange qualification based on the information. If the commodity exchange qualification is not satisfied, the commodity exchange contract is not executed, and if the commodity exchange qualification is satisfied, the commodity exchange process between the first user and the second user is automatically completed.
In one possible implementation, this step 506 may include: and executing the commodity exchange contract when the quantity of the commodity ownership corresponding to the first user meets a quantity condition after the commodity exchange process is finished is determined according to the commodity ownership information of the first user and the commodity ownership information of the second user, and the quantity of the commodity ownership corresponding to the second user meets the quantity condition.
The item ownership corresponding to the first user comprises the item ownership of the first user and the item ownership of the family member of the first user, and the item ownership of the second user comprises the item ownership of the second user and the item ownership of the family member of the second user.
For the ownership of the item of the family member of the first user, the second node device may acquire the ownership information of the family member of the first user from the blockchain, so as to know which items the family member of the first user owns. Specifically, the second node device may first acquire the family member information of the first user from the blockchain, know which family members of the first user have, and then acquire the item ownership information of the family members from the blockchain. The family member information of the first user may be stored in the blockchain by the node devices corresponding to the civil and public authorities, the item ownership information of the family member of the first user may be stored in the blockchain by the node devices corresponding to the item ownership management authority, and taking an item as a house property as an example, the item ownership information of the family member of the first user may be stored in the blockchain by the node devices corresponding to the housing management authority.
The first user and the second user satisfying the commodity exchange qualification may mean that after the first user and the second user complete the commodity exchange process, both the quantity of the commodity ownership corresponding to the first user and the quantity of the commodity ownership corresponding to the second user satisfy a quantity condition, and the quantity condition may be that the quantity condition is smaller than a quantity threshold. Taking the article as a house property as an example, the first user and the second user satisfy the article exchange qualification, that is, the first user and the second user satisfy the existing limited purchasing rule.
If the first user and the second user are determined to satisfy the commodity exchange qualification, the second node device may execute the commodity exchange contract and automatically complete the commodity exchange process between the first user and the second user agreed in the commodity exchange contract.
507. And the second node equipment generates article exchange completion information and stores the article exchange completion information into the block chain.
Wherein the article exchange completion information is used to indicate that the article exchange process between the first user and the second user is completed.
After the second node device completes the commodity exchange process between the first user and the second user, commodity exchange completion information can be generated and synchronized to the blockchain, so that other node devices in the blockchain system can receive the commodity exchange completion information and complete corresponding operations as required. Taking an article as a house as an example, after receiving the article exchange completion information, the node equipment corresponding to the bank can complete loan settlement and loan application, and after receiving the article completion information, the node equipment corresponding to the housing administration can complete house passing operation of the house. The manner in which the second node device stores the commodity exchange completion information in the block chain is the same as the manner in which the first node device stores the commodity exchange contract in the block chain in step 503, and details refer to the description corresponding to fig. 3 and fig. 4, and are not described here again.
In one possible implementation, the second node device may also modify the status flag of the commodity exchange contract from an incomplete state to a completed state. By modifying the status flag of a commodity exchange contract after the completion of the commodity exchange contract, the node device is made aware that the commodity exchange contract in the block chain has been completed.
It should be noted that step 507 is an optional step, for example, if the second node device performs the commodity exchange contract in step 506 and an exception occurs, which results in that the commodity exchange process between the first user and the second user is not completed, the second node device may retry or prompt an error without performing step 507.
According to the technical scheme, the ownership information and the personal information of the articles of the user are stored through the block chain and the intelligent contract, and are signed and exchanged in an intelligent contract mode, and the transaction is automatically completed under the condition of meeting the conditions through the multi-party intelligent contract, so that the trust problem in the transaction is solved; the transaction time is reduced, the transaction is automatically completed after the conditions are met, the participation of a third party is not needed, and the problems of trust, difficulty in operation and the like in the article exchange process in the related technology are solved.
According to the method provided by the embodiment of the application, the unfinished commodity exchange contract is obtained from the block chain of the block chain system, then the commodity ownership information of the two exchange sides corresponding to the commodity exchange contract is obtained, when the two exchange sides meet the commodity exchange qualification, the commodity exchange process is automatically completed, a third party is not needed, the trust problem in the related technology is solved, and the reliability of commodity exchange is improved.
Fig. 6 is a schematic structural diagram of an article exchange device based on a block chain according to an embodiment of the present application.
Referring to fig. 6, the apparatus includes:
an obtaining module 601, configured to obtain a commodity exchange contract in an incomplete state from a blockchain of the blockchain system, where the commodity exchange contract is used to perform a commodity exchange process between a first user and a second user;
the obtaining module 601 is further configured to obtain, from the block chain, the article ownership information of the first user corresponding to the article exchange contract and the article ownership information of the second user corresponding to the article exchange contract;
an executing module 602, configured to execute the commodity exchange contract when it is determined that the first user and the second user satisfy the commodity exchange qualification according to the commodity ownership information of the first user and the commodity ownership information of the second user.
In one possible implementation, the execution module 602 is configured to:
when the number of the ownership of the article corresponding to the first user after the article exchange process is finished is determined to meet a number condition according to the ownership information of the article of the first user and the ownership information of the article of the second user, and the number of the ownership of the article corresponding to the second user meets the number condition, executing the article exchange contract;
the item ownership corresponding to the first user comprises the item ownership of the first user and the item ownership of the family member of the first user, and the item ownership of the second user comprises the item ownership of the second user and the item ownership of the family member of the second user.
In one possible implementation, the commodity exchange contract includes the following information:
the commodity exchange requirement information of the first user is used for indicating that a first commodity of the first user is used for exchanging a second commodity of the second user;
the commodity exchange requirement information of the second user is used for indicating that the second commodity of the second user is used for exchanging the first commodity of the first user.
In a possible implementation manner, the commodity exchange requirement information of the first user is further used for indicating that the first user obtains target funds, and the commodity exchange requirement information of the second user is further used for indicating that the second user pays the target funds;
the commodity exchange contract further includes a commodity exchange condition that includes that the second user has deposited a target fund into a target account of the blockchain.
In one possible implementation, the obtaining module 601 is configured to:
and when the article exchange condition is determined to be met, acquiring the article ownership information of the first user and the article ownership information of the second user from the block chain.
In one possible implementation, the item exchange condition further includes that the first user and the second user have applied for loan eligibility.
In one possible implementation, the apparatus further includes:
a receiving module, configured to receive an item exchange request, where the item exchange request carries item exchange requirement information of the first user and item exchange requirement information of the second user;
a generating module, configured to generate the commodity exchange contract based on the commodity exchange demand information of the first user and the commodity exchange demand information of the second user that are carried in the commodity exchange request;
and the storage module is used for storing the signed commodity exchange contract into the block chain after signing the commodity exchange contract by using the private key of the first user and the private key of the second user.
In one possible implementation, the obtaining module 601 is configured to:
and acquiring the article exchange contract in an incomplete state from the block chain at regular time.
In one possible implementation, the apparatus further includes:
the storage module is used for storing the item ownership information of the first user and the item ownership information of the second user into the block chain.
In one possible implementation, the apparatus further includes:
the generating module is used for generating article exchange completion information;
and the storage module is used for storing the commodity exchange completion information into the block chain.
In one possible implementation, the obtaining module 601 is configured to:
and acquiring the commodity exchange contract of which the state is marked as the incomplete state from the blockchain of the blockchain system.
In one possible implementation, the apparatus further includes:
a modification module for modifying the status label of the commodity exchange contract from an incomplete status to a completed status.
It should be noted that: in the article exchange device based on the block chain according to the above embodiment, when article exchange is performed, only the division of the above function modules is illustrated, and in practical applications, the function distribution may be completed by different function modules according to needs, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above. In addition, the block chain based article exchange device provided in the above embodiments and the block chain based article exchange method embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The node device provided by the above technical solution can be implemented as a terminal or a server, and a schematic structural diagram of the terminal is shown in fig. 7, and a schematic structural diagram of the server is shown in fig. 8.
Fig. 7 is a schematic structural diagram of a terminal 700 according to an embodiment of the present application. The terminal 700 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 700 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so on.
In general, terminal 700 includes: one or more processors 701 and one or more memories 702.
The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 701 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 701 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. Memory 702 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 is used to store at least one instruction for execution by processor 701 to implement the blockchain based commodity exchange method provided by the method embodiments herein.
In some embodiments, the terminal 700 may further optionally include: a peripheral interface 703 and at least one peripheral. The processor 701, the memory 702, and the peripheral interface 703 may be connected by buses or signal lines. Various peripheral devices may be connected to peripheral interface 703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704, a display screen 705, a camera assembly 706, an audio circuit 707, a positioning component 708, and a power source 709.
The peripheral interface 703 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 701 and the memory 702. In some embodiments, processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 704 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 704 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 704 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 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 circuitry 704 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 (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 704 may also include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 705 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to capture touch signals on or over the surface of the display screen 705. The touch signal may be input to the processor 701 as a control signal for processing. At this point, the display 705 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 705 may be one, providing the front panel of the terminal 700; in other embodiments, the display 705 can be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; in still other embodiments, the display 705 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 700. Even more, the display 705 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display 705 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 706 is used to capture images or video. Optionally, camera assembly 706 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 rear camera 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 realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 706 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 at different color temperatures.
The audio circuitry 707 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 701 for processing or inputting the electric signals to the radio frequency circuit 704 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 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 707 may also include a headphone jack.
The positioning component 708 is used to locate the current geographic position of the terminal 700 to implement navigation or LBS (location based Service). The positioning component 708 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 709 is provided to supply power to various components of terminal 700. The power source 709 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When power source 709 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 700 also includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyro sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the terminal 700. For example, the acceleration sensor 711 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 701 may control the display screen 705 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 712 may detect a body direction and a rotation angle of the terminal 700, and the gyro sensor 712 may cooperate with the acceleration sensor 711 to acquire a 3D motion of the terminal 700 by the user. From the data collected by the gyro sensor 712, the processor 701 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 713 may be disposed on a side frame of terminal 700 and/or underneath display 705. When the pressure sensor 713 is disposed on a side frame of the terminal 700, a user's grip signal on the terminal 700 may be detected, and the processor 701 performs right-left hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at a lower layer of the display screen 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 705. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 714 is used for collecting a fingerprint of a user, and the processor 701 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user according to the collected fingerprint. When the user identity is identified as a trusted identity, the processor 701 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 714 may be disposed on the front, back, or side of the terminal 700. When a physical button or a vendor Logo is provided on the terminal 700, the fingerprint sensor 714 may be integrated with the physical button or the vendor Logo.
The optical sensor 715 is used to collect the ambient light intensity. In one embodiment, the processor 701 may control the display brightness of the display screen 705 based on the ambient light intensity collected by the optical sensor 715. Specifically, when the ambient light intensity is high, the display brightness of the display screen 705 is increased; when the ambient light intensity is low, the display brightness of the display screen 705 is adjusted down. In another embodiment, processor 701 may also dynamically adjust the shooting parameters of camera assembly 706 based on the ambient light intensity collected by optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is typically disposed on a front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front surface of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually decreases, the processor 701 controls the display 705 to switch from the bright screen state to the dark screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 is gradually increased, the processor 701 controls the display 705 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not intended to be limiting of terminal 700 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 8 is a schematic structural diagram of a server 800 according to an embodiment of the present application, where the server 800 may generate a relatively large difference due to a difference in configuration or performance, and may include one or more processors (CPUs) 801 and one or more memories 802, where the memory 802 stores at least one program code, and the at least one program code is loaded and executed by the processors 801 to implement the methods provided by the foregoing method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, a computer readable storage medium, such as a memory, storing at least one program code, which is loaded and executed by a processor, to implement the block chain based commodity exchange method in the above embodiments, is also provided. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
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, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The present application is intended to cover various modifications, alternatives, and equivalents, which may be included within the spirit and scope of the present application.

Claims (10)

1. A block chain-based commodity exchange method is applied to a node device in a block chain system, and the method comprises the following steps:
acquiring a commodity exchange contract in an incomplete state from a blockchain of the blockchain system, wherein the commodity exchange contract is used for executing a commodity exchange process between a first user and a second user;
acquiring the property ownership information of the first user corresponding to the property exchange contract and the property ownership information of the second user corresponding to the property exchange contract from the blockchain;
executing the commodity exchange contract when the first user and the second user are determined to meet the commodity exchange qualification according to the commodity ownership information of the first user and the commodity ownership information of the second user.
2. The method of claim 1, wherein executing the commodity exchange contract when the first user and the second user are determined to satisfy the commodity exchange eligibility based on the commodity ownership information of the first user and the commodity ownership information of the second user comprises:
when the number of the ownership of the article corresponding to the first user after the article exchange process is finished is determined to meet a number condition and the number of the ownership of the article corresponding to the second user meets the number condition according to the ownership information of the article of the first user and the ownership information of the article of the second user, executing the article exchange contract;
wherein the ownership of the item corresponding to the first user comprises ownership of the item of the first user and ownership of the family member of the first user, and the ownership of the item of the second user comprises ownership of the item of the second user and ownership of the family member of the second user.
3. The method of claim 1, wherein the commodity exchange contract comprises the following information:
the commodity exchange requirement information of the first user is used for indicating that a first commodity of the first user is used for exchanging a second commodity of the second user;
the commodity exchange requirement information of the second user is used for indicating that the first commodity of the first user is exchanged by the second commodity of the second user.
4. The method of claim 3, wherein the commodity exchange requirement information of the first user is further used for indicating that the first user obtains target funds, and the commodity exchange requirement information of the second user is further used for indicating that the second user pays the target funds;
the commodity exchange contract further includes a commodity exchange condition that includes that the second user has deposited target funds into a target account of the blockchain.
5. The method of claim 4, wherein the obtaining, from the blockchain, the property ownership information of the first user corresponding to the property exchange contract and the property ownership information of the second user corresponding to the property exchange contract comprises:
and when the article exchange condition is determined to be met, acquiring the article ownership information of the first user and the article ownership information of the second user from the block chain.
6. The method of claim 1, wherein prior to obtaining the commodity exchange contract in an incomplete state from the blockchain of the blockchain system, the method further comprises:
receiving an article exchange request, wherein the article exchange request carries article exchange requirement information of the first user and article exchange requirement information of the second user;
generating the commodity exchange contract based on the commodity exchange demand information of the first user and the commodity exchange demand information of the second user carried by the commodity exchange request;
and after the item exchange contract is signed by using the private key of the first user and the private key of the second user, storing the signed item exchange contract into the block chain.
7. The method of claim 1, wherein after the executing the commodity exchange contract, the method further comprises:
modifying a status flag of the commodity exchange contract from an incomplete status to a completed status.
8. A block chain based item exchange device, the device comprising:
an obtaining module, configured to obtain a commodity exchange contract in an incomplete state from a blockchain of the blockchain system, where the commodity exchange contract is used to perform a commodity exchange process between a first user and a second user;
the acquiring module is further configured to acquire, from the blockchain, item ownership information of the first user corresponding to the item exchange contract and item ownership information of the second user corresponding to the item exchange contract;
and the execution module is used for executing the commodity exchange contract when the first user and the second user meet the commodity exchange qualification according to the commodity ownership information of the first user and the commodity ownership information of the second user.
9. A computer device comprising a processor and a memory, the memory having stored therein at least one program code, the at least one program code being loaded and executed by the processor to implement the block chain based item exchange method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored therein at least one program code, the at least one program code being loaded and executed by a processor, to implement the blockchain based commodity exchange method of any one of claims 1 to 7.
CN201911268211.2A 2019-12-11 2019-12-11 Article exchange method, device, equipment and storage medium based on blockchain Active CN111028059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911268211.2A CN111028059B (en) 2019-12-11 2019-12-11 Article exchange method, device, equipment and storage medium based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911268211.2A CN111028059B (en) 2019-12-11 2019-12-11 Article exchange method, device, equipment and storage medium based on blockchain

Publications (2)

Publication Number Publication Date
CN111028059A true CN111028059A (en) 2020-04-17
CN111028059B CN111028059B (en) 2023-09-15

Family

ID=70205871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911268211.2A Active CN111028059B (en) 2019-12-11 2019-12-11 Article exchange method, device, equipment and storage medium based on blockchain

Country Status (1)

Country Link
CN (1) CN111028059B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170200147A1 (en) * 2016-01-08 2017-07-13 Akbar Ali Ansari System and the computer methods of issuing, transferring and manipulating value or gift cards using blockchain technology
US20170372391A1 (en) * 2016-06-24 2017-12-28 Raise Marketplace Inc. Determining exchange item compliance in an exchange item marketplace network
TW201805871A (en) * 2016-08-03 2018-02-16 碩網資訊股份有限公司 A barter system using block chain technology and method thereof
WO2018090331A1 (en) * 2016-11-18 2018-05-24 深圳前海达闼云端智能科技有限公司 Blockchain network, article transaction method and apparatus, and node device
CN109074580A (en) * 2016-02-23 2018-12-21 区块链控股有限公司 Method and system for secure transfer of entities over a blockchain
CN109155035A (en) * 2016-02-23 2019-01-04 区块链控股有限公司 Method and system for efficient transfer of entities on a point-to-point distributed book using blockchains
CN109829824A (en) * 2019-03-05 2019-05-31 河钢国际科技(北京)有限公司 A kind of commodity transaction information sharing method based on block chain technology
CN110264226A (en) * 2019-06-28 2019-09-20 江苏物联网研究发展中心 It is a kind of based on block chain article retrospect and exchange contract system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170200147A1 (en) * 2016-01-08 2017-07-13 Akbar Ali Ansari System and the computer methods of issuing, transferring and manipulating value or gift cards using blockchain technology
CN109074580A (en) * 2016-02-23 2018-12-21 区块链控股有限公司 Method and system for secure transfer of entities over a blockchain
CN109155035A (en) * 2016-02-23 2019-01-04 区块链控股有限公司 Method and system for efficient transfer of entities on a point-to-point distributed book using blockchains
US20170372391A1 (en) * 2016-06-24 2017-12-28 Raise Marketplace Inc. Determining exchange item compliance in an exchange item marketplace network
TW201805871A (en) * 2016-08-03 2018-02-16 碩網資訊股份有限公司 A barter system using block chain technology and method thereof
WO2018090331A1 (en) * 2016-11-18 2018-05-24 深圳前海达闼云端智能科技有限公司 Blockchain network, article transaction method and apparatus, and node device
CN109829824A (en) * 2019-03-05 2019-05-31 河钢国际科技(北京)有限公司 A kind of commodity transaction information sharing method based on block chain technology
CN110264226A (en) * 2019-06-28 2019-09-20 江苏物联网研究发展中心 It is a kind of based on block chain article retrospect and exchange contract system

Also Published As

Publication number Publication date
CN111028059B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
CN110602089B (en) Block chain-based medical data storage method, device, equipment and storage medium
CN108614878B (en) Protocol data management method, device, storage medium and system
CN111008839B (en) Resource transfer data management method, device and storage medium
CN109615516B (en) Resource transfer method, device, electronic equipment and storage medium
CN109615515B (en) Credit right certificate transfer method, device, electronic equipment and storage medium
CN110889772B (en) Policy processing method and device, computer equipment and storage medium
CN111080443B (en) Block chain-based service processing method, device, equipment and storage medium
CN110598482A (en) Block chain-based digital certificate management method, device, equipment and storage medium
CN111401867A (en) Resource transfer method and device based on block chain, node equipment and storage medium
CN111339086B (en) Block processing method, and data query method and device based on block chain
CN110597924B (en) Block chain-based user identification processing method, device, equipment and storage medium
CN111245745A (en) Message sending method, device, node equipment and storage medium
CN110555780B (en) Insurance data processing method, device and equipment based on block chain and storage medium
CN110933113B (en) Block chain-based interactive behavior detection method, device, equipment and storage medium
CN111340482A (en) Conflict detection method, device, node equipment and storage medium
CN111260347A (en) Resource processing method, device and equipment based on block chain and storage medium
CN111667371B (en) Resource aggregation method, system, device and storage medium based on block chain
CN111212074B (en) Blockchain-based qualification identification method, device, equipment and storage medium
CN110826103A (en) Block chain-based document authority processing method, device, equipment and storage medium
CN110597906A (en) Block chain-based entrance integral generation method, device, equipment and storage medium
CN110599328B (en) Block chain based risk user determination method, device, equipment and storage medium
CN111145034A (en) Block chain-based social security management method, device and system and storage medium
CN110599210A (en) Information management method and device of block chain
CN110677262A (en) Block chain-based information notarization method, device and system
CN110597868B (en) Information query method, device, terminal and storage medium based on block chain

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