CN112101919B - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112101919B
CN112101919B CN202010977021.4A CN202010977021A CN112101919B CN 112101919 B CN112101919 B CN 112101919B CN 202010977021 A CN202010977021 A CN 202010977021A CN 112101919 B CN112101919 B CN 112101919B
Authority
CN
China
Prior art keywords
data
transaction
account
blockchain
amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010977021.4A
Other languages
Chinese (zh)
Other versions
CN112101919A (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.)
Tenpay Payment Technology Co Ltd
Original Assignee
Tenpay Payment Technology 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 Tenpay Payment Technology Co Ltd filed Critical Tenpay Payment Technology Co Ltd
Priority to CN202010977021.4A priority Critical patent/CN112101919B/en
Publication of CN112101919A publication Critical patent/CN112101919A/en
Application granted granted Critical
Publication of CN112101919B publication Critical patent/CN112101919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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/12Payment architectures specially adapted for electronic shopping systems
    • G06Q20/123Shopping for digital content
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the application provides a data processing method, a data processing device and electronic equipment. The method comprises the following steps: acquiring object release data of a first user; storing object release data to a blockchain, wherein the object release data represents resource data deducted by the same amount of the first pre-paid resource amount in a first account; acquiring transaction data of a second user aiming at a target business object; storing transaction data to the blockchain, wherein the transaction data represents resource data deducted by the same amount of second pre-paid resources in the second account; when a transaction completion request for transaction data is received, the transaction completion data is stored to the blockchain according to the transaction completion request, the transaction completion data comprises a first total amount and a second total amount, and the transaction completion data represents that the first account is added with the same amount of resource data as the first total amount and the second account is added with the same amount of resource data as the second total amount. By the method and the device, the reliability of transaction and the efficiency of the transaction of the buyer and the seller can be improved.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a data processing method, a data processing device, an electronic device, and a storage medium.
Background
Cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
With the rapid development of internet technology and the acceleration of social life pace, people are increasingly favored for online shopping in daily life. The existing shopping platform is aggregated on a centralized transaction platform, a user performs transaction actions on the centralized transaction platform, and under the closed transaction mode, the transaction between the two transaction parties is not sufficiently transparent, so that the reliability of the transaction can be reduced.
Disclosure of Invention
Cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The embodiment of the application provides a data processing method, a data processing device, electronic equipment and a storage medium, which can improve the reliability of transaction between buyers and sellers and the efficiency of the transaction.
An aspect of an embodiment of the present application provides a data processing method, where the method specifically includes:
Acquiring object release data of a first user, wherein the object release data comprises a first pre-paid resource amount of a target business object;
storing the object release data to a blockchain, wherein the object release data stored on the blockchain represents resource data deducted by the same amount of the first pre-paid resource amount from a first account of the first user;
acquiring transaction data of a second user aiming at the target business object, wherein the transaction data comprises a second pre-payment resource amount which is larger than the target resource amount of the target business object;
storing the transaction data to the blockchain, wherein the transaction data stored to the blockchain represents resource data deducted by the same amount of the second pre-paid resource in a second account of the second user;
when a transaction completion request for the transaction data is received, storing transaction completion data to the blockchain according to the transaction completion request, wherein the transaction completion data comprises a first total amount and a second total amount, the first total amount is the sum of the first pre-paid resource amount and the target resource amount, the second total amount is the difference between the second pre-paid resource amount and the target resource amount, and the transaction completion data stored to the blockchain represents that the first account is added with the same amount of resource data as the first total amount and the second account is added with the same amount of resource data as the second total amount.
An aspect of the embodiments of the present application provides a data processing apparatus, where the apparatus has a function of implementing the above-mentioned data processing method. The functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes:
the acquisition module is used for acquiring object release data of a first user, wherein the object release data comprises a first pre-paid resource amount of a target business object;
the storage module is used for storing the object release data to a blockchain, wherein the object release data stored on the blockchain represents resource data deducted by the same amount of the first prepayment resource amount from a first account of the first user;
the acquisition module is further used for acquiring transaction data of a second user aiming at the target business object, wherein the transaction data comprises a second pre-payment resource amount, and the second pre-payment resource amount is larger than the target resource amount of the target business object;
the storage module is further used for storing the transaction data to the blockchain, wherein the transaction data stored on the blockchain represents the resource data deducted by the same amount of the second prepayment resource in the second account of the second user;
And the processing module is used for storing transaction completion data to the blockchain according to the transaction completion request when the transaction completion request aiming at the transaction data is received, wherein the transaction completion data stored on the blockchain represents the resource data added in the first account by the same amount as a first total amount and the resource data added in the second account by the same amount as a second total amount, the first total amount is the sum of the first pre-paid resource amount and the target resource amount, and the second total amount is the difference between the second pre-paid resource amount and the target resource amount.
In one aspect, an electronic device is provided, where the electronic device includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is configured to store a computer program, and the computer program includes program instructions, and the processor is configured to invoke the program instructions to perform operations related to the data processing method.
In one aspect, the embodiments of the present application provide a computer readable storage medium storing computer program instructions for use with an electronic device, including a program for executing the above-described data processing method.
The transaction process is executed on the blockchain, and the transparency and fairness of the transaction process can be ensured by means of the data disclosure attribute and the non-tamperable attribute of the blockchain, so that the reliability of the transaction is improved; further, the first user transfers out the resource data when uploading the business object, and the second user transfers out the resource data when trading the business object, so that both trading parties can be driven to finish trading as soon as possible, and the trading efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1A is a schematic diagram of a block chain data sharing system according to an embodiment of the present disclosure;
FIG. 1B is a block chain architecture diagram according to one embodiment of the present application;
FIG. 1C is a block generation flow chart according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a data processing system according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a data processing method according to an embodiment of the present application;
fig. 4A is an interface schematic diagram of an operation interface of a first client according to an embodiment of the present application;
FIG. 4B is a schematic diagram of an interface of a transaction completion request of a second client according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope herein. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
It should be noted that, in order to facilitate better understanding of the embodiments of the present application, related terms and techniques of blockchain and cloud technology are first described in detail below.
Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
Cloud technology (Cloud technology) is based on the general terms of network technology, information technology, integration technology, management platform technology, application technology and the like applied by Cloud computing business models, and can form a resource pool, so that the Cloud computing business model is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Cloud storage (cloud storage) is a new concept that extends and develops in the concept of cloud computing, and a distributed cloud storage system (hereinafter referred to as a storage system for short) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of various types in a network to work cooperatively through application software or application interfaces through functions such as cluster application, grid technology, and a distributed storage file system, so as to provide data storage and service access functions for the outside.
Because a large amount of data calculation and data storage services are involved in the blockchain, a large amount of computer operation cost is required for the large amount of data calculation and data storage services, object release data, transaction data and transaction completion data in the blockchain involved in the application can be realized by cloud storage technology in cloud technology. That is, when the object release data, the transaction data and the transaction completion data are required to be stored in the blockchain, the data can be uploaded into the blockchain on the cloud through the cloud storage technology, and when the data are required to be read, the data can be read from the blockchain on the cloud at any time, so that the storage requirement on terminal equipment can be reduced, and the application range of the blockchain is expanded.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of a blockchain data sharing system provided in an embodiment of the present application, where a data sharing system 100 refers to a system for sharing data between nodes, and the data sharing system may include a plurality of nodes 101, and the plurality of nodes 101 may be respective clients in the data sharing system. Each node 101 may receive input information (e.g., object release data, transaction data, and transaction completion data) while performing normal operations and maintain shared data within the data sharing system based on the received input information. In order to ensure the information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and the nodes can transmit information through the information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
The nodes in the data sharing system can be independent physical servers, a server cluster or a distributed system formed by a plurality of physical servers, and cloud servers for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms and the like. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
Each node in the data sharing system has a node identifier corresponding to the node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated block can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the node, and the IP address is only illustrated in table 1.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
Each node in the blockchain data sharing system stores one and the same blockchain. Referring to fig. 1B, fig. 1B is a schematic structural diagram of a blockchain provided in an embodiment of the present application, where the blockchain is composed of a plurality of blocks, and an initiation block includes a block header and a block body, the block header stores an input information feature value, a version number, a timestamp and a difficulty value, and the block body stores input information; the next block of the starting block takes the starting block as a father 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 father 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 are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
In generating each block in the blockchain, please refer to fig. 1C, fig. 1C is a flowchart illustrating a new block generation process according to an embodiment of the present application. When receiving input information, a node where the blockchain is located checks the input information, stores the input information into a memory pool after the check is completed, and updates a hash tree used for recording the input information; then, updating the update time stamp to the time of receiving the input information, and trying different random numbers, and performing characteristic value calculation for a plurality of times, so that the calculated characteristic value can meet the following formula (1):
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x)(1)
in equation (1), the secure hash algorithm256 (Secure Hash Algorithm, SHA 256) is a eigenvalue algorithm used to calculate eigenvalues; version (version number) is version information of the related block protocol in the block chain; the prev_hash is the block header characteristic value of the parent block of the current block; the merkle_root is a characteristic value of input information; ntime is the update time of the update timestamp; the nbits is the current difficulty, is a fixed value in a period of time, and is determined again after exceeding a fixed period of time; x is a random number; TARGET is a eigenvalue threshold that can be determined from nbits.
Thus, when the random number meeting the formula is calculated, the information can be correspondingly stored to generate the block head and the block main body, and the current block is obtained. And then, the node where the blockchain is located sends the newly generated block to other nodes in the blockchain data sharing system where the node is located according to the node identification of other nodes in the blockchain data sharing system, the other nodes verify the newly generated block, and the newly generated block is added into the blockchain stored in the block chain after the verification is completed.
Based on the above analysis, the embodiment of the application provides a data processing method, which specifically includes: acquiring object release data of a first user, wherein the object release data comprises a first pre-paid resource amount of a target business object; storing the object release data to a blockchain, wherein the object release data stored on the blockchain represents resource data deducted by the same amount of the first pre-paid resource amount from a first account of the first user; acquiring transaction data of a second user aiming at the target business object, wherein the transaction data comprises a second pre-payment resource amount which is larger than the target resource amount of the target business object; storing the transaction data to the blockchain, wherein the transaction data stored to the blockchain represents resource data deducted by the same amount of the second pre-paid resource in a second account of the second user; when a transaction completion request for the transaction data is received, storing transaction completion data to the blockchain according to the transaction completion request, wherein the transaction completion data stored on the blockchain represents that the first account is added with the same amount of resource data as a first total amount and the second account is added with the same amount of resource data as a second total amount, the first total amount is the sum of the first pre-paid resource amount and the target resource amount, and the second total amount is the difference between the second pre-paid resource amount and the target resource amount. The method can be executed by the block chain link point equipment so as to improve the fairness and the safety of the transaction between the buyer and the seller and promote the success of the transaction between the buyer and the seller.
According to the data processing method provided by the embodiment of the application, the block chain link point equipment is used for executing the transaction process between the buyers and the sellers on the block chain, so that data generated by the buyers and the sellers in the transaction process are stored on the block chain, tamper resistance and reliability of the data can be ensured, transaction data can be traced, fairness and safety of the transaction between the buyers and the sellers are improved, and success of the transaction between the buyers and the sellers is promoted.
With reference to FIG. 2, FIG. 2 is a schematic diagram illustrating an architecture of a data processing system according to an embodiment of the present application. The system architecture diagram comprises: a first client 210, a second client 220, a chunk generating node device 230, and at least one node device 240. The first client 210 and the second client 220 are respectively connected to the block generating node device 230, that is, the first client 210 and the block generating node device 230 may communicate with each other, and the second client 220 and the block generating node device 230 may communicate with each other.
The first client 210 may be a first client, and the second client 220 may be a second client. The first client 210, the second client 220, the block generating node device 230 and the 2 node devices 240 form a blockchain network, the first client 210 and the second client 220 belong to lightweight nodes in the blockchain network and are only responsible for issuing data, for example, the first client 210 issues object issuing data, and the second client 220 issues transaction data; the block generating node device 230 and the node device 240 belong to all nodes in the blockchain network and are responsible for participating in services such as publishing data, storing data, performing blockchain consensus on the data, and the like. It should be noted that, the number of the node devices in the blockchain network provided in the embodiments of the present application is not limited, that is, the blockchain network may also be composed of one block generating node device 230 and three node devices 240, which is not limited in this application.
In one possible implementation, the first client 210 sends the object published data to the node device in the blockchain network that is the best in communication quality or closest to the first client 210, assuming the block generating node device 230, i.e., the first client 210 sends the object published data to the block generating node device 230. Similarly, the second client 220 sends the transaction data and the transaction completion data to the node device with the best communication quality or closest communication quality to the second client 220 in the blockchain network, and it is assumed that the block generating node device 230 is the second client 220 sends the transaction data and the transaction completion data to the block generating node device 230. For example, the block generating node device 230 packages and assembles several transaction lists into a block structure and broadcasts to other node devices 240; after receiving the block, the other node device 240 verifies the transaction in the block and broadcasts voting information; after consensus is achieved for the block, the block is submitted to a blockchain storage layer, and the next round of election and consensus begins.
In one possible implementation, the block generating node device 230 receives the object release data sent by the first client 210 and the transaction data sent by the second client 220, verifies the data, and when the data verification is passed, the block generating node device 230 sends the data to other node devices in the blockchain network, so that the other node devices perform blockchain consensus on the data, and when the blockchain consensus is passed, the block generating node device 230 stores the data on the blockchain.
In one possible implementation, the block generating node device 230 is selected by all node devices in the blockchain network through a consensus algorithm, each node device stores an intelligent contract thereon, and the first client 210 may send data to the block generating node device 230, and the block generating node device 230 broadcasts a transaction to other node devices 240 through the P2P network. The node devices in the blockchain network can be either clients or servers, i.e., each computer in the blockchain network can serve as a requester of a network service and respond to requests of other computers to provide resources, services and contents. Among them, consensus algorithms include, but are not limited to, proof of Work (PoW) algorithms, proof of equity (PoS) algorithms, proof of equity (Delegated Proof of Stake, DPoS) algorithms, practical bayer fault tolerance (Practical Byzantine Fault Tolerance, PBFT) algorithms, and the like.
It may be understood that, the program testing system described in the embodiments of the present application is for more clearly describing the technical solution of the embodiments of the present application, and is not limited to the technical solution provided in the embodiments of the present application, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
Referring to fig. 3, fig. 3 is a flowchart of a data processing method according to an embodiment of the present application. The method includes the steps of executing the operation steps by the blockchain node device, wherein the blockchain node device can be any node device in the blockchain network, or can be a node device selected by a consensus mechanism from all node devices in the blockchain network, and the method includes, but is not limited to, the following steps S310 to S350:
step S310: object release data of a first user is obtained, wherein the object release data comprises a first pre-paid resource amount of a target business object.
It should be noted that, in the present application, the first user may be a first user, and the second user may be a second user.
In one possible implementation manner, after the first client of the first user displays the operation interface, the operation interface responds to the operation of the first user, for example, the first user may fill in object information of the target service object, where the object information may specifically include what type of commodity the target service object is, such as clothes, trousers, bags, etc., fill in inventory information of the target service object, detailed parameter information of commodity, such as pictures of the target service object, fill in price of the target service object, etc. After the first user completes the filling operation, the first user clicks a 'confirm' button, and then the first client sends the object information input by the first user on the operation interface to the blockchain node device, and then the blockchain node device can call the intelligent contract according to the object information to generate object release data of the first user, wherein the object release data comprises the object information of the target business object input by the first user. For another example, the object publishing data may be generated by the first client invoking the smart contract after responding to the operation of the first user, and then the first client sends the generated object publishing data to the block link point device. As shown in fig. 4A, fig. 4A is an interface schematic diagram of an operation interface of a first client provided in an embodiment of the present application, where the interface schematic diagram may include a target service object, detailed parameter information of the target service object, and price, inventory, etc. of the target service object, which may be used by a second user to purchase a desired target service object, such as clothes, trousers, bags, etc. The first prepayment resource amount and the target resource amount of the target business object are in a linear relation, and specifically, the ratio of the first prepayment resource amount to the target digital resource amount is 1:1, for example, the price of the target business object (target commodity) is 100 yuan, and then the resource data corresponding to the first prepayment resource quantity is also 100 yuan. The first pre-paid resource amount may also be preset by the block link point device by a value, which is not limited in the embodiment of the present application. In this way, the first user may be enabled to ship as early as possible to expedite the transaction between the buyer and the seller to complete as soon as possible.
In one possible implementation manner, the block link point device obtains object release data sent by the first client, where the object release data includes a first pre-paid resource amount of the target service object, the object release data further includes a first account, an intelligent contract account, and object information of the target service object, the first account is a transfer-out account, the intelligent contract account is a transfer-in account, that is, the object release data stored on the block chain indicates that resource data equivalent to the first pre-paid resource amount is transferred from the first account to the intelligent contract account. In popular terms, the first client sends the first amount of resources equal to the first amount of resources to the smart contract, and assuming that the first amount of resources is 100, the first client sends 100 to the smart contract. Specifically, the first client sends 100 to the intelligent contract account corresponding to the intelligent contract through the first account address corresponding to the first client.
Step S320: and storing the object release data to a blockchain, wherein the object release data stored on the blockchain represents the resource data deducted by the same amount of the first pre-paid resource amount in the first account of the first user.
In one possible implementation, the blockchain link point device stores object release data to the blockchain, which may specifically include: the block chain link point equipment checks the object release data, and when the object release data passes the check, the object release data is sent to a plurality of consensus node equipment in a block chain network corresponding to the block chain, so that each consensus node equipment performs block chain consensus on the object release data; when the blockchain consensus is passed, the blockchain node equipment acquires a block corresponding to the object release data and stores the block into the blockchain. It should be noted that, the block corresponding to the object publishing data may be generated by the block link point device, or the block may be generated by other consensus node devices in the block chain network and then sent to the block chain node device.
In one possible implementation, the object issuance data includes a qualification certificate of the first user; the block chain link point device performs verification on the object release data specifically comprises the following steps: the block chain node equipment acquires a qualification certificate of the first user; traversing the block chain, and if the block chain comprises a qualification certificate of the first target service, determining that the object issues data verification passes.
In one possible implementation manner, before the block link point device obtains the object release data of the first user, the block link point device receives the qualification certificate sent by the first client, and the block link point device performs uplink processing on the qualification certificate. The block chain node device performs uplink processing on the qualification certificate, and specifically includes: the block chain node equipment acquires an authorization certificate of the first user from the certificate authority, and compares the qualification certificate with the authorization certificate; if the block chain link point equipment judges that the qualification certificate is the same as the authorization certificate, the block chain node equipment sends the qualification certificate to a plurality of consensus node equipment in a block chain network where the block chain is located, the block chain node equipment receives the consensus results sent by the consensus node equipment, and when the number of the consensus node equipment with successful consensus as the consensus result is larger than a preset number threshold value, the block chain link point equipment determines that the block chain consensus passes, and the block chain node equipment generates the qualification certificate to the block chain node equipment and issues the block to the block chain network where the block chain node equipment is located.
The representation form of the preset quantity threshold value can be a percentage or a positive integer. For example, assuming that the preset number threshold is 16, the number of node devices in the blockchain network is 20, if the blockchain node devices receive 18 pieces of consensus node devices with successful consensus as the check result, the blockchain link point devices compare the 18 pieces of consensus node devices with the preset number threshold 16, and the 18 pieces of consensus node devices with successful consensus are greater than the preset number threshold 16, the blockchain node devices determine that the blockchain consensus passes, and trigger the blockchain link point devices to perform the step of uplink processing on the qualification certificate. If the number of the block chain node devices receiving the check result is 15 and the number of the common node devices with successful common is 15, the block chain node devices compare the number 15 of the common node devices with successful common with a preset number threshold 16, if the number 15 of the common node devices with successful common is smaller than the preset number threshold 16, the block chain node devices determine that the block chain common is not passed, and the block chain node devices do not execute the step of uplink processing on the qualification certificate.
In one possible implementation, the block link point device generates the intelligent contract according to the object release data generation function, the transaction completion data generation function, and the business object carrier registration method. And the blockchain node equipment issues the intelligent contract to a blockchain network corresponding to the blockchain, so that a first client side where a first user is located calls the intelligent contract to generate the object issuing data, and a second client side where a second user is located calls the intelligent contract to generate transaction data. The object issuing data generating function can be used for generating object issuing data, the transaction data generating function can be used for generating transaction data, the transaction completion data generating function can be used for generating transaction completion data, and the transaction completion data are generated when the block link point device receives a transaction completion request of a second user for the transaction data.
In one possible implementation, the smart contract may be deployed in a blockchain platform. Each user corresponds to a unique address in the blockchain platform, and the address can be used as a user account in the intelligent contract during registration. When a first user opens a store, intelligent contracts are required to be deployed on the blockchain platform, one intelligent contract corresponds to one store, namely, deploying one intelligent contract by the user is equivalent to registering one store by the user. The intelligent contract comprises an object release data generation function, a transaction data generation function and a transaction data generation function, wherein the object release data generation function can be specifically a commodity uploading method and a stock setting method under the scene that a first user opens a store, the transaction data generation function can be specifically a payment order generation method of a second user, and the transaction completion data generation function can be specifically a receiving confirmation method of the second user.
In one possible implementation, the object release data generation function, the transaction data generation function, and the transaction completion data generation function are compiled into the smart contract by a compiler; and generating an intelligent contract account, and establishing a binding relationship between the intelligent contract account and the intelligent contract. For example, intelligent contracts are deployed on blockchain platforms, primarily using the solubility language. The intelligent contract source code written by the solution is firstly compiled into byte codes (Bytecodes) by a compiler, and binary interface specifications (Application Binary Interface, ABI for short) of the intelligent contract are simultaneously generated in the compiling process; the bytecode is deployed to the blockchain platform network in a Transaction (Transaction) mode, and each successful deployment can generate an intelligent contract account corresponding to the intelligent contract.
In one possible implementation, a smart contract may correspond to any store, in which case the smart contract includes business object carrier registration methods in addition to the object publication data generation function, the transaction data generation function, and the transaction data generation function described above. In contrast to the above solution, the user shop is required to register by deploying the intelligent contract, and the user shop is required to register by calling the business object carrier of the intelligent contract. The service object carrier registration method can be specifically used for registering the service object carrier corresponding to the target service object, and in colloquial terms, the service object carrier registration method is referred to as a "shop-opening" method. Specifically, when the first user needs to register the service object carrier, the first user may call the service object carrier registration method in the intelligent contract, and after the intelligent contract is called successfully, the first user opens a store successfully, and then the first user has the first service object carrier corresponding to the first user, where the service object carrier may be represented by a service object carrier id identifier, for example, the first service object carrier may be specifically represented by the first id identifier. Similarly, when the second user needs to register the service object carrier, the second user can call the service object carrier registration method in the intelligent contract, and after the intelligent contract is called successfully, the second user opens a store successfully, and then the second user owns the second service object carrier corresponding to the second user, for example, the second service object carrier can be specifically represented by a second id identifier. The user and the service object carrier id identifier may be associated, for example, the service object carrier corresponding to the user may be found by the identity information of the user.
In one possible implementation, if only one smart contract is deployed, when the first client corresponding to the first user registers the first account, the smart contract account transfers the initial resource amount to the first account of the first user; and transferring the initial resource amount to the second account of the second user by the intelligent contract account when the second client corresponding to the second user registers the second account.
For example, when a first account is registered by a first client corresponding to a first user, the intelligent sum is about the first user to set the resource data equivalent to the initial resource amount, i.e. the intelligent sum is about the first user to set the initial point value. Assuming that the initial resource amount is 1000, when the first client registers the first account, the first client intelligently sums up the initial value of the points set by the first user to 1000 integrated values. Similarly, when the second client corresponding to the second user registers the second account, the intelligent sum is about the second user to set the resource data equal to the initial resource amount, namely the intelligent sum is about the second user to set the initial point value. Assuming that the initial resource amount is 1000, when the second client registers the second account, the intelligent sum is about 1000 integral values set by the second user. By setting the initial value of the credit, more users may be enticed to participate in the de-centralization (Decentralization application, dapp) transaction at an early stage.
In one possible implementation, when the first client corresponding to the first user registers the first account and when the second client corresponding to the second user registers the second account, the smart contract account may not transfer the initial resource amount to the first account and the second account, and the first user and the second user may obtain the resource data by recharging through the blockchain platform, and then conduct the transaction.
By the method, only one intelligent contract is required to be deployed, so that the processing efficiency is saved, the points in the intelligent contract can flow among different business object carriers, and the user can transact in the different business object carriers through the points in the intelligent contract, so that the flow of the points is enlarged, and meanwhile, the transaction efficiency among the users is also improved.
Step S330: and acquiring transaction data of a second user aiming at the target business object, wherein the transaction data comprises a second pre-payment resource amount, and the second pre-payment resource amount is larger than the target resource amount of the target business object.
In one possible implementation manner, the second client may display an operation interface generated by the first client according to information such as a target service object operation, and after the second client receives a target operation of the second user for the operation interface, the second client invokes the intelligent contract to generate transaction data, specifically, the transaction data may include a target service object selected by the second user, such as a package, and a second pre-paid resource amount, where the second pre-paid resource amount is greater than the target resource amount of the target service object, and then the second client sends the transaction data to the block link point device.
In one possible implementation manner, the block link point device obtains transaction data of a second user aiming at a target service object, the transaction data comprises a second pre-paid resource amount, the transaction data further comprises a second account and an intelligent contract account, the second account is a transfer-out account, the intelligent contract account is a transfer-in account, namely, the transaction data stored on the block chain represents that resource data equivalent to the second pre-paid resource amount is transferred from the second account to the intelligent contract account, and the second pre-paid resource amount is larger than the target resource amount of the target service object. For example, the second user needs to pay an amount of resources greater than the price of the target commodity at the time of payment, and specifically, if the target amount of resources of the target commodity is 100, the second user needs to pay an amount of 150. In this way, the second user may be motivated to confirm receipt as early as possible when receiving the target commodity to expedite the transaction between the buyer and the seller to be completed as soon as possible.
In one possible implementation manner, the blockchain link node device may further obtain an identity of the second user, and the blockchain node device verifies the identity of the second user, and when the blockchain node device verifies the identity of the second user, the blockchain node device stores transaction data of the second user for the target business object to the blockchain. By checking the identity of the user, the situation that the customer maliciously purchases to cause the follow-up needs to participate in negotiation through a third-party platform can be prevented, and the safety and the success of the transaction between the buyer and the seller are improved.
Step S340: and storing the transaction data to the blockchain, wherein the transaction data stored on the blockchain represents the resource data which is deducted by the same amount of the second pre-paid resource in a second account of the second user.
In one possible implementation, the blockchain link point device stores transaction data to the blockchain, which may specifically include: the block chain link point equipment checks the transaction data, and when the transaction data passes the check, the transaction data is sent to a plurality of consensus node equipment in a block chain network corresponding to the block chain, so that each consensus node equipment performs block chain consensus on the transaction data; when the blockchain consensus passes, the blockchain node equipment acquires a block corresponding to the transaction data and stores the block into the blockchain. It should be noted that, the block corresponding to the transaction may be generated by the block link point device, or the block may be generated by other common node devices in the block chain network and then sent to the block chain node device.
Step S350: when a transaction completion request for the transaction data is received, storing transaction completion data to the blockchain according to the transaction completion request, wherein the transaction completion data comprises a first total amount and a second total amount, the first total amount is the sum of the first pre-paid resource amount and the target resource amount, the second total amount is the difference between the second pre-paid resource amount and the target resource amount, and the transaction completion data stored to the blockchain represents that the first account is added with the same amount of resource data as the first total amount and the second account is added with the same amount of resource data as the second total amount.
In one possible implementation, the transaction completion data includes a second account, a first account, and a smart contract account, the smart contract account being a transfer-out account, the second account and the first account being transfer-in accounts, i.e., the transaction completion data stored onto the blockchain indicates that an equal amount of resource data as a first total amount is transferred from the smart contract account to the first account, and an equal amount of resource data as a second total amount is transferred from the smart contract account to the second account.
As shown in fig. 4B, fig. 4B is an interface schematic diagram of a transaction completion request of a second client provided in this embodiment of the present application, where the interface schematic diagram may include recipient information (such as name, address, contact phone of the second user, etc.), first information (such as shop name, address, phone of the first user, etc.), a target service object, order information related to the target service object, "return goods" and "confirm goods receiving", etc., and the intelligent contract generated according to the transaction completion data generating function may be used by the second user to perform after-sales processing operation after receiving the target commodity (such as package), for example, the second user may perform corresponding processing in a "return goods" manner to maintain personal interests of the second user in case of dissatisfying with the target commodity, or the second user may timely complete the transaction between the first user and the second user by clicking the "confirm goods receiving" button, so that the first user can timely receive the target resource amount corresponding to the target commodity and the first pre-paid resource amount.
In one possible implementation, the block link point device receives a transaction completion request for the transaction data sent by the second client, where the transaction completion request is generated by the second client in response to a transaction completion operation of the second user, e.g., the second user clicks a "confirm receipt" button, and the second client generates the transaction completion request in response to a click operation of the second user. For another example, after the second client generates a transaction completion request in response to a transaction completion operation of the second user, the second client invokes the intelligent contract to generate transaction completion data, and the second client sends the transaction completion data to the block link point device.
In one possible implementation, a starting time stamp of transaction data stored in a blockchain is acquired, transaction duration is counted according to the starting time stamp, and if the transaction duration reaches a duration threshold, a transaction completion request for the transaction data is generated. For example, the starting timestamp of the transaction data of the second user for the target commodity is obtained, and is assumed to be 8 months 1 number 12:00, until the duration threshold is passed, and is assumed to be 7 days, then a period of time from 8 months 1 day 12:00 to 8 months 8 day 12:00 is elapsed, and if the transaction completion request of the second user for the transaction data is not obtained, the block link point device automatically generates the transaction completion request.
By the data processing method provided by the embodiment of the application, the transaction process between the buyer and the seller is carried out on the blockchain, and in this way, the natural decentralization characteristic of the blockchain is used, so that the transaction payment between the first user and the second user is not required to be based on the trust of a third party, and the safety of the payment process of the two parties is improved; the first user pays the 'guarantee deposit' when uploading the target business object, and the second user pays the amount larger than the target resource amount corresponding to the target business object; when the second user confirms the goods receiving, the intelligent closing date returns the two parts of money to the first user and the second user respectively, and the first user can be driven to deliver goods as early as possible, the second user confirms the goods receiving as early as possible, so that the buyer and the seller can smoothly carry out without intervention of a third party, and the success of the transaction between the buyer and the seller is promoted; and the identity of the second user is checked, so that the situation that the customer maliciously purchases to cause the follow-up needs to participate in negotiation and solution through a third-party platform can be prevented, and the safety and the success of the transaction between the buyer and the seller are improved.
The embodiment of the application can be applied to a game scene. The target service object related to the application is a game prop, the first prepayment resource amount and the second prepayment resource amount are game coins, the first user is a game operation platform, the second user is a game player, and the specific description is carried out below in combination with a game scene.
In one possible implementation manner, the block link point device obtains game release data of the game operation platform, where the game release data may include information such as a property id of the game property, a target game currency resource amount corresponding to the game property, a specific application scenario of the game property, a platform account of the game operation platform, and an intelligent contract account, and then the platform account of the game operation platform is a transfer account, and the intelligent contract account is a transfer account, that is, the game release data stored on the block chain indicates that resource data equivalent to the first pre-paid game currency resource amount is deducted from the platform account of the game operation platform. And, the game operation platform needs to upload the first pre-paid game coin resource amount when uploading the game release data, and the first pre-paid game coin resource amount and the target game coin resource amount corresponding to the game prop are in a linear relationship, for example, the first pre-paid game coin resource amount and the target game coin resource amount are in an equal corresponding relationship.
In one possible implementation, the block link point device obtains game transaction data of the game player for the game prop, where the game transaction data includes a prop id of the game prop, a target game currency resource amount corresponding to the game prop, a second prepayment game currency resource amount, and a player account of the game player and an intelligent contract account, and then the player account of the game player is a transfer account, the intelligent contract account is a transfer account, and the game transaction data stored on the block link indicates that resource data equivalent to the second prepayment resource amount is deducted from the player account of the game player. The player account of the game player may be a login account in which the game player logs in by using a third party account, or may be a newly generated player account when the game operation platform registers the identity information of the game player. Wherein, the second prepayment game coin resource amount is greater than the corresponding target game coin resource amount of the game props. Because the amount of the game coin resources charged by the game player is more than the amount of the target game coin resources corresponding to the game props, the use degree of the game player on the game operation platform can be improved, and the game operation platform can be provided with continuous return customers.
At this time, the operation platform delivers goods. The operation platform adjusts the authority of the second user to have the property id corresponding to the game property in the operation platform. Subsequently, the second user may play a game based on the play object.
In one possible implementation, when the block link point device receives a transaction completion request for game transaction data, the game completion data is stored to the block chain according to the game transaction completion request, and the game completion data may further include a player account, a platform account, a smart contract account, a first total amount and a second total amount, the smart contract account is a transfer-out account, the player account and the platform account are transfer-in accounts, the game completion data includes the first total amount and the second total amount, the first total amount is a sum of the first pre-paid game piece resource amount and the target game piece resource amount, and the second total amount is a difference between the second pre-paid game piece resource amount and the target game piece resource amount, that is, the game completion data stored to the block chain indicates that resource data equivalent to the first total amount is transferred from the smart contract account to the platform account, and resource data equivalent to the second total amount is transferred from the smart contract account to the player account.
According to the embodiment of the application, the blockchain technology is combined with the game scene, so that game transaction between a game player and a game operation platform is not required to be based on trust of a third party, and fairness in the game process of the two parties is improved; before the game starts, the game operation platform needs to recharge the game coins, and for the game operation platform, the utilization rate of the game props can be increased; the game player needs to recharge more than the game money resource amount of the game prop when buying the game prop, and the game experience of the game player can be enhanced for the game player.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 5, the data processing apparatus may be applied to the block chain node device in the method embodiment corresponding to fig. 3 to fig. 4B, and specifically, the data processing apparatus may be a computer program (including program code) running in a computer device, for example, the data processing apparatus is an application software; the data processing device may be used to perform the corresponding steps in the methods provided by the embodiments of the present application. The data processing apparatus may include:
an obtaining module 510, configured to obtain object release data of a first user, where the object release data includes a first amount of pre-paid resources of a target service object;
The storage module 520 is configured to store the object release data to a blockchain, where the object release data stored to the blockchain indicates that the first account of the first user is deducted by the resource data equivalent to the first amount of pre-paid resources;
the obtaining module 510 is further configured to obtain transaction data of the second user for the target service object, where the transaction data includes a second amount of pre-paid resources, and the second amount of pre-paid resources is greater than the target amount of resources of the target service object;
the storage module 520 is further configured to store the transaction data to the blockchain, where the transaction data stored to the blockchain indicates that the second account of the second user is deducted with the resource data equivalent to the second amount of the pre-paid resource;
and a processing module 530, configured to, when a transaction completion request for the transaction data is received, store transaction completion data to the blockchain according to the transaction completion request, where the transaction completion data stored to the blockchain indicates that the first account is added with the same amount of resource data as a first total amount and the second account is added with the same amount of resource data as a second total amount, where the first total amount is a sum of the first amount of pre-paid resources and the target amount of resources, and the second total amount is a difference between the second amount of pre-paid resources and the target amount of resources.
In one possible implementation, the data processing apparatus further includes: a generation module 540, a release module 550.
A generating module 540, configured to generate an intelligent contract according to the object publishing data generating function, the transaction completion data generating function, and the business object carrier registration method;
and the publishing module 550 is configured to publish the intelligent contract to a blockchain network corresponding to the blockchain, so that a first client where the first user is located invokes the intelligent contract to generate the object publishing data and send the object publishing data to the blockchain node device, and a second client where the second user is located invokes the intelligent contract to generate the transaction data and send the transaction data to the blockchain node device.
In one possible implementation, the generating module 540 generates the smart contract according to the object release data generating function, the transaction completion data generating function, and the business object carrier registration method, including:
compiling the object release data generation function, the transaction completion data generation function and the business object carrier registration method into the intelligent contract through a compiler;
The method further comprises the steps of:
and generating an intelligent contract account, and establishing a binding relationship between the intelligent contract account and the intelligent contract.
In one possible implementation, the data processing apparatus further includes: a transfer module 560.
A transfer module 560 for invoking the smart contract to transfer resource data equivalent to an initial amount of resources to a first account of the first user when registering the first account on the blockchain;
the transferring module 560 is further configured to invoke the smart contract to transfer resource data equivalent to the initial amount of resources to a second account of the second user when registering the second account on the blockchain.
In one possible implementation, the object issuance data further includes the first account and the smart contract account, the object issuance data stored onto the blockchain representing a transfer of resource data equivalent to the first pre-paid resource amount from the first account to the smart contract account;
the transaction data further includes the second account and the smart contract account, the transaction data stored onto the blockchain representing a transfer of resource data equivalent to the second amount of pre-paid resources from the second account to the smart contract account;
The transaction completion data further includes the second account, the first account, and the smart contract account, and the transaction completion data stored onto the blockchain indicates that an equal amount of resource data as a first total amount is transferred from the smart contract account to the first account and an equal amount of resource data as a second total amount is transferred from the smart contract account to the second account.
In one possible implementation, the data processing apparatus further includes: a receiving module 570.
A receiving module 570, configured to, before receiving a transaction completion request for the transaction data, receive a transaction completion request for the transaction data sent by a second client, where the transaction completion request is generated by the second client in response to a transaction completion operation of the second user; or,
the processing module 530 obtains a start time stamp of the transaction data stored in the blockchain, counts a transaction duration according to the start time stamp, and generates a transaction completion request for the transaction data if the transaction duration reaches a duration threshold.
In one possible implementation, the storage module 520 stores the object release data to a blockchain, including:
Checking the object release data, and when the object release data passes the check, transmitting the object release data to a plurality of consensus node devices in a blockchain network corresponding to the blockchain so that each consensus node device performs blockchain consensus on the object release data;
and when the block chain consensus is passed, acquiring a block corresponding to the object release data, and storing the block into the block chain.
By the data processing device provided by the embodiment of the application, the transaction process between the buyer and the seller is carried out on the blockchain, and in this way, the natural decentralization characteristic of the blockchain is used, so that the transaction payment between the first user and the second user is not required to be based on the trust of a third party, and the safety of the payment process of the two parties is improved; the first user pays the 'guarantee deposit' when uploading the target business object, and the second user pays the amount larger than the target resource amount corresponding to the target business object; when the second user confirms the goods receiving, the intelligent closing date returns the two parts of money to the first user and the second user respectively, and the first user can be driven to deliver goods as early as possible, the second user confirms the goods receiving as early as possible, so that the buyer and the seller can smoothly carry out without intervention of a third party, and the success of the transaction between the buyer and the seller is promoted; and the identity of the second user is checked, so that the situation that the customer maliciously purchases to cause the follow-up needs to participate in negotiation and solution through a third-party platform can be prevented, and the safety and the success of the transaction between the buyer and the seller are improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, where the electronic device may be a block link point device in the method embodiment corresponding to fig. 3 to fig. 4B. The electronic device includes: one or more processors 610; one or more input devices 620, one or more output devices 630, and a memory 640. The processor 610, input device 620, output device 630, and memory 640 are connected by a bus 650. The memory 620 is used for storing a computer program comprising program instructions, and the processor 610 is used for executing the program instructions stored in the memory 640, performing the following operations:
acquiring object release data of a first user, wherein the object release data comprises a first pre-paid resource amount of a target business object;
storing the object release data to a blockchain, wherein the object release data stored on the blockchain represents resource data deducted by the same amount of the first pre-paid resource amount from a first account of the first user;
acquiring transaction data of a second user aiming at the target business object, wherein the transaction data comprises a second pre-payment resource amount which is larger than the target resource amount of the target business object;
Storing the transaction data to the blockchain, wherein the transaction data stored to the blockchain represents resource data deducted by the same amount of the second pre-paid resource in a second account of the second user;
when a transaction completion request for the transaction data is received, storing transaction completion data to the blockchain according to the transaction completion request, wherein the transaction completion data comprises a first total amount and a second total amount, the first total amount is the sum of the first pre-paid resource amount and the target resource amount, the second total amount is the difference between the second pre-paid resource amount and the target resource amount, and the transaction completion data stored to the blockchain represents that the first account is added with the same amount of resource data as the first total amount and the second account is added with the same amount of resource data as the second total amount.
In one possible implementation, the processor 610 is further configured to:
generating an intelligent contract according to the object release data generating function, the transaction completion data generating function and the business object carrier registering method;
and issuing the intelligent contract to a blockchain network corresponding to the blockchain, so that a first client side where the first user is located calls the intelligent contract to generate the object issuing data and sends the object issuing data to the blockchain node equipment, and a second client side where the second user is located calls the intelligent contract to generate the transaction data and sends the transaction data to the blockchain node equipment.
In one possible implementation, the processor 610 generates a smart contract according to an object release data generation function, a transaction completion data generation function, and a business object carrier registration method, including:
compiling the object release data generation function, the transaction completion data generation function and the business object carrier registration method into the intelligent contract through a compiler;
and generating an intelligent contract account, and establishing a binding relationship between the intelligent contract account and the intelligent contract.
In one possible implementation, the processor 610 is further configured to:
when a first account of the first user is registered on the blockchain, invoking the smart contract to transfer resource data equivalent to an initial amount of resources to the first account;
when a second account of the second user is registered on the blockchain, invoking the smart contract to transfer resource data to the second account equivalent to the initial amount of resources.
In one possible implementation, the object issuance data further includes the first account and the smart contract account, the object issuance data stored onto the blockchain representing a transfer of resource data equivalent to the first pre-paid resource amount from the first account to the smart contract account;
The transaction data further includes the second account and the smart contract account, the transaction data stored onto the blockchain representing a transfer of resource data equivalent to the second amount of pre-paid resources from the second account to the smart contract account;
the transaction completion data further includes the second account, the first account, and the smart contract account, and the transaction completion data stored onto the blockchain indicates that an equal amount of resource data as a first total amount is transferred from the smart contract account to the first account and an equal amount of resource data as a second total amount is transferred from the smart contract account to the second account.
In one possible implementation, the processor 610 is further configured to, prior to receiving a transaction completion request for the transaction data:
the blockchain node equipment receives a transaction completion request for the transaction data sent by a second client, wherein the transaction completion request is generated by the second client in response to a transaction completion operation of the second user; or,
and acquiring a starting time stamp of the transaction data stored in the blockchain, counting the transaction duration according to the starting time stamp, and generating a transaction completion request aiming at the transaction data if the transaction duration reaches a duration threshold.
In one possible implementation, the processor 610 stores the object release data to a blockchain, including:
checking the object release data, and when the object release data passes the check, transmitting the object release data to a plurality of consensus node devices in a blockchain network corresponding to the blockchain so that each consensus node device performs blockchain consensus on the object release data;
and when the block chain consensus is passed, acquiring a block corresponding to the object release data, and storing the block into the block chain.
Through the electronic equipment provided by the embodiment of the application, the transaction process between the buyer and the seller is carried out on the blockchain, and in this way, the natural decentralization characteristic of the blockchain is used, so that the transaction payment between the first user and the second user is not required to be based on the trust of a third party, and the safety of the payment process of the two parties is improved; the first user pays the 'guarantee deposit' when uploading the target business object, and the second user pays the amount larger than the target resource amount corresponding to the target business object; when the second user confirms the goods receiving, the intelligent closing date returns the two parts of money to the first user and the second user respectively, and the first user can be driven to deliver goods as early as possible, the second user confirms the goods receiving as early as possible, so that the buyer and the seller can smoothly carry out without intervention of a third party, and the success of the transaction between the buyer and the seller is promoted; and the identity of the second user is checked, so that the situation that the customer maliciously purchases to cause the follow-up needs to participate in negotiation and solution through a third-party platform can be prevented, and the safety and the success of the transaction between the buyer and the seller are improved.
According to an aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the operations related to the data processing method described above.
Those skilled in the art will appreciate that implementing all or part of the above-described embodiment methods may be accomplished by computer programs stored on a computer readable storage medium, which when executed, may include embodiments of the above-described data processing methods. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The above disclosure is only a few examples of the present invention, and it is not intended to limit the scope of the present invention, but it is understood by those skilled in the art that all or a part of the above embodiments may be implemented and equivalents thereof may be modified according to the scope of the present invention.

Claims (9)

1. A method of data processing, the method comprising:
acquiring object release data of a first user, wherein the object release data comprises a first pre-paid resource amount of a target business object;
storing the object release data to a blockchain, wherein the object release data stored on the blockchain represents that resource data equivalent to the first prepayment resource amount is transferred from a first account of the first user to an intelligent contract account;
acquiring transaction data of a second user aiming at the target business object, wherein the transaction data comprises a second pre-payment resource amount which is larger than the target resource amount of the target business object;
storing the transaction data to the blockchain, wherein the transaction data stored on the blockchain represents that the resource data equivalent to the second prepayment resource amount is transferred from a second account of the second user to the intelligent contract account;
transferring a first amount of resource data from the smart contract account to the first account and transferring a second amount of resource data from the smart contract account to the second account upon receiving a transaction completion request for the transaction data;
Wherein the first total amount is a sum of the first amount of pre-paid resources and the target amount of resources, and the second total amount is a difference between the second amount of pre-paid resources and the target amount of resources.
2. The method of claim 1, wherein transaction completion data is generated in the blockchain after transferring a first total amount of resource data from the smart contract account into the first account and transferring a second total amount of resource data from the smart contract account into the second account;
the method is performed by a blockchain node device; the method further comprises the steps of:
generating an intelligent contract according to the object release data generating function, the transaction completion data generating function and the business object carrier registering method;
and releasing the intelligent contract to a blockchain network corresponding to the blockchain, so that a first client side where the first user is located calls the intelligent contract to generate the object release data and sends the object release data to the blockchain link point device, and a second client side where the second user is located calls the intelligent contract to generate the transaction data and sends the transaction data to the blockchain node device.
3. The method of claim 2, wherein generating the smart contract based on the object publication data generation function, the transaction completion data generation function, and the business object carrier registration method comprises:
compiling the object release data generation function, the transaction completion data generation function and the business object carrier registration method into the intelligent contract through a compiler;
the method further comprises the steps of:
and generating an intelligent contract account, and establishing a binding relationship between the intelligent contract account and the intelligent contract.
4. The method according to claim 2, wherein the method further comprises:
when a first account of the first user is registered on the blockchain, invoking the smart contract account to transfer resource data equivalent to an initial amount of resources to the first account;
when a second account of the second user is registered on the blockchain, the smart contract account is invoked to transfer resource data equivalent to an initial amount of resources to the second account.
5. The method of claim 1, wherein when a transaction completion request for the transaction data is received, comprising:
Receiving a transaction completion request for the transaction data sent by a second client, wherein the transaction completion request is generated by the second client in response to a transaction completion operation of the second user; or,
and acquiring a starting time stamp of the transaction data stored in the blockchain, counting the transaction duration according to the starting time stamp, and generating a transaction completion request aiming at the transaction data if the transaction duration reaches a duration threshold.
6. The method of claim 1, wherein storing the object publication data to a blockchain comprises:
checking the object release data, and when the object release data passes the check, transmitting the object release data to a plurality of consensus node devices in a blockchain network corresponding to the blockchain so that each consensus node device performs blockchain consensus on the object release data;
and when the block chain consensus is passed, acquiring a block corresponding to the object release data, and storing the block into the block chain.
7. A data processing apparatus, comprising:
the acquisition module is used for acquiring object release data of a first user, wherein the object release data comprises a first pre-paid resource amount of a target business object;
The storage module is used for storing the object release data to a blockchain, and the object release data stored on the blockchain represents that the resource data equivalent to the first pre-paid resource amount is transferred from a first account of the first user to an intelligent contract account;
the acquisition module is further used for acquiring transaction data of a second user aiming at the target business object, wherein the transaction data comprises a second pre-payment resource amount, and the second pre-payment resource amount is larger than the target resource amount of the target business object;
the storage module is further used for storing the transaction data to the blockchain, and the transaction data stored on the blockchain represents that the resource data equivalent to the second pre-paid resource amount is transferred from the second account of the second user to the intelligent contract account;
a processing module for transferring a first amount of resource data from the smart contract account to the first account and transferring a second amount of resource data from the smart contract account to the second account when a transaction completion request for the transaction data is received;
wherein the first total amount is a sum of the first amount of pre-paid resources and the target amount of resources, and the second total amount is a difference between the second amount of pre-paid resources and the target amount of resources.
8. An electronic device comprising a memory storing a set of program code and a processor invoking the program code stored in the memory for performing the method of any of claims 1-6.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-6.
CN202010977021.4A 2020-09-16 2020-09-16 Data processing method and device, electronic equipment and storage medium Active CN112101919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010977021.4A CN112101919B (en) 2020-09-16 2020-09-16 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010977021.4A CN112101919B (en) 2020-09-16 2020-09-16 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112101919A CN112101919A (en) 2020-12-18
CN112101919B true CN112101919B (en) 2024-04-12

Family

ID=73758682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010977021.4A Active CN112101919B (en) 2020-09-16 2020-09-16 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112101919B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114331397B (en) * 2021-12-28 2024-02-13 北京百度网讯科技有限公司 Information processing method, apparatus, electronic device and storage medium
CN114529412A (en) * 2022-02-23 2022-05-24 支付宝(杭州)信息技术有限公司 Resource processing method and device based on block chain
CN117057807B (en) * 2023-10-11 2024-02-09 腾讯科技(深圳)有限公司 Resource processing method based on block chain architecture and related equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017162035A1 (en) * 2016-03-23 2017-09-28 ***股份有限公司 Method and system for transferring money between ic card electronic cash accounts
CN107464112A (en) * 2017-07-20 2017-12-12 捷德(中国)信息科技有限公司 Exchange management method and system based on block chain
WO2017216672A1 (en) * 2016-06-14 2017-12-21 Danske Bank A/S Method of providing a financial transaction
CN109934696A (en) * 2019-03-15 2019-06-25 北京爱蜂科技有限公司 It is a kind of to make an inventory the assets storage system of function with assets keeping, acceptance clearance and storage
CN110264365A (en) * 2019-05-13 2019-09-20 阿里巴巴集团控股有限公司 A kind of transaction data processing method and device
CN110276620A (en) * 2019-06-28 2019-09-24 深圳前海微众银行股份有限公司 It is a kind of to determine the method and device traded extremely
WO2019237750A1 (en) * 2018-06-13 2019-12-19 阿里巴巴集团控股有限公司 Blockchain-based exchange method and apparatus for available resource quotas
CN110599182A (en) * 2019-09-27 2019-12-20 腾讯科技(深圳)有限公司 Resource management method and device
CN110992007A (en) * 2019-11-22 2020-04-10 肖光昱 Asset digital voucher payment clearing method, device and medium based on block chain
CN111178899A (en) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 Resource processing method and device and transaction processing method and device
CN111260475A (en) * 2020-02-18 2020-06-09 腾讯科技(深圳)有限公司 Data processing method, block chain node point equipment and storage medium
CN111553672A (en) * 2020-04-29 2020-08-18 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190172130A1 (en) * 2017-12-04 2019-06-06 Michael H Gurin Community Value Creating Local Digital Currency System
US10785168B2 (en) * 2019-07-15 2020-09-22 Alibaba Group Holding Limited Allocating virtual resource based on block chain

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017162035A1 (en) * 2016-03-23 2017-09-28 ***股份有限公司 Method and system for transferring money between ic card electronic cash accounts
WO2017216672A1 (en) * 2016-06-14 2017-12-21 Danske Bank A/S Method of providing a financial transaction
CN107464112A (en) * 2017-07-20 2017-12-12 捷德(中国)信息科技有限公司 Exchange management method and system based on block chain
WO2019237750A1 (en) * 2018-06-13 2019-12-19 阿里巴巴集团控股有限公司 Blockchain-based exchange method and apparatus for available resource quotas
CN109934696A (en) * 2019-03-15 2019-06-25 北京爱蜂科技有限公司 It is a kind of to make an inventory the assets storage system of function with assets keeping, acceptance clearance and storage
CN110264365A (en) * 2019-05-13 2019-09-20 阿里巴巴集团控股有限公司 A kind of transaction data processing method and device
CN110276620A (en) * 2019-06-28 2019-09-24 深圳前海微众银行股份有限公司 It is a kind of to determine the method and device traded extremely
CN110599182A (en) * 2019-09-27 2019-12-20 腾讯科技(深圳)有限公司 Resource management method and device
CN110992007A (en) * 2019-11-22 2020-04-10 肖光昱 Asset digital voucher payment clearing method, device and medium based on block chain
CN111260475A (en) * 2020-02-18 2020-06-09 腾讯科技(深圳)有限公司 Data processing method, block chain node point equipment and storage medium
CN111178899A (en) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 Resource processing method and device and transaction processing method and device
CN111553672A (en) * 2020-04-29 2020-08-18 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
中宁县水权交易的实践与启示;刘晓辉;;陕西水利(第01期);全文 *
发展我国个人电子商务交易认证体系;杨文明;中国***;20021231(第04期);全文 *
能源互联网中基于区块链的电力交易和阻塞管理方法;邰雪;孙宏斌;郭庆来;;电网技术;20161231;第40卷(第12期);全文 *

Also Published As

Publication number Publication date
CN112101919A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US11880809B2 (en) Blockchain cross-chain non-fungible token exchange
CN112101919B (en) Data processing method and device, electronic equipment and storage medium
EP3852047A1 (en) Blockchain-based content sharing and creation server, content distribution server, and system including same
CN112200571B (en) Resource distribution method and device based on block chain and electronic equipment
US20210082033A1 (en) System and method for improving security of smart contract on blockchain
EP3574464B1 (en) Computer implemented method and system
CN110659906B (en) Bill information processing method, related device and medium
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
US11443307B2 (en) Cross-border resource transfer authenticity verification method, device and electronic equipment
CN110992020A (en) Data processing method based on intelligent contract, related node and storage medium
CN112883109B (en) Block chain-based digital commodity transaction method and device
CN112766854B (en) Block chain-based digital commodity transaction method and device
CN113283990B (en) Data sharing processing method and device
CN112915548A (en) Data processing method, device and equipment of multimedia playing platform and storage medium
CN112200572A (en) Resource distribution method and device based on block chain and electronic equipment
CN112200568A (en) Block chain based account creation method and device and electronic equipment
CN111242591A (en) Block chain transaction processing method, system and storage medium based on joint signature
CN113762940A (en) Asset management method and device based on block chain and electronic equipment
CN117422553A (en) Transaction processing method, device, equipment, medium and product of blockchain network
AU2019101593A4 (en) System and method for improving security of smart contract on blockchain
CN111222885B (en) Data processing request endorsement method and device, computer equipment and storage medium
CN108876339B (en) E-pet transaction method and device based on certificate
US11790353B2 (en) System and method for online/offline payment with virtual currency for nodes included in mobile-based blockchain distributed network
CN111882436B (en) Data processing method, device and equipment based on block chain
CN111523917A (en) House property sales management method, cloud server and storage medium

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