CN111199486A - Data processing method and device based on block chain network and storage medium - Google Patents

Data processing method and device based on block chain network and storage medium Download PDF

Info

Publication number
CN111199486A
CN111199486A CN202010004818.6A CN202010004818A CN111199486A CN 111199486 A CN111199486 A CN 111199486A CN 202010004818 A CN202010004818 A CN 202010004818A CN 111199486 A CN111199486 A CN 111199486A
Authority
CN
China
Prior art keywords
user
publisher
blockchain
transaction
account address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010004818.6A
Other languages
Chinese (zh)
Other versions
CN111199486B (en
Inventor
刘龙坡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010004818.6A priority Critical patent/CN111199486B/en
Publication of CN111199486A publication Critical patent/CN111199486A/en
Application granted granted Critical
Publication of CN111199486B publication Critical patent/CN111199486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

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

Abstract

The embodiment of the invention discloses a data processing method, a device and a readable storage medium based on a block chain network, wherein the method comprises the following steps: obtaining the appreciation behavior data of the user on the target resource; encrypting the appreciation behavior data by using a public key of a publisher and a private key of a user, which are included in the target resource, so as to generate transaction data to be processed; and sending the transaction data to be processed to a node of the blockchain network, so that the node adjusts the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount included in the reward behavior data after decrypting the transaction data to be processed to obtain the reward behavior data. By the implementation mode, the intermediate platform can be prevented from collecting favorable intermediate fees, and the safety and the reliability of the user assets are improved.

Description

Data processing method and device based on block chain network and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a data processing method and device based on a block chain network and a storage medium.
Background
With the development of computer technology, various application platforms are increasing, users can publish resources (such as articles, videos, audios and the like) through a platform server, and users watching the resources through the platform server can appreciate the published resources such as the articles, the videos and the like. Currently, when the resources of the platform server are rewarded, money is rewarded through some intermediate platforms, and the intermediate platforms need to deduct platform division and/or channel cost; secondly, the amount of appreciation of each resource by the user is stored in the platform server, and when the platform server fails, the amount of appreciation may be lost, so that the user assets cannot be guaranteed.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a device and a storage medium based on a blockchain network, which adjust assets in a blockchain account of a publisher and assets in a blockchain account of a user through the blockchain network, avoid charging fees by an intermediate platform, realize the protection of the user assets, avoid the loss of the user assets caused by the reasons of the platform closing and the like, and improve the safety of the user assets.
In a first aspect, an embodiment of the present invention provides a data processing method based on a blockchain network, where the method includes:
obtaining reward behavior data of a user on a target resource, wherein the reward behavior data comprises a block chain account address of a publisher of the target resource, the block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher;
encrypting the appreciation behavior data by using the public key of the publisher and the private key of the user to generate transaction data to be processed;
sending the transaction data to be processed to a node of the blockchain network, so that the node adjusts assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount after decrypting the transaction data to be processed to obtain the appreciation behavior data, generates an adjustment record, and writes the transaction data to be processed and the adjustment record into a blockchain after jointly identifying and verifying the transaction data to be processed and the adjustment record with other nodes of the blockchain network.
In a second aspect, an embodiment of the present invention provides another data processing method based on a blockchain network, where the method includes:
receiving to-be-processed transaction data sent by a resource management platform, wherein the to-be-processed transaction data is obtained by encrypting appreciation behavior data by the resource management platform by using a public key of a publisher of a target resource and a private key of a user, and the appreciation behavior data comprises a block chain account address of the publisher, a block chain account address of the user and a transaction amount;
decrypting the transaction data to be processed according to the public key of the user and the private key of the publisher to obtain the appreciation behavior data;
adjusting the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount, generating an adjustment record, and writing the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network is passed.
In a third aspect, an embodiment of the present invention provides a data processing apparatus, where the apparatus includes:
the system comprises an acquisition module, a transaction module and a processing module, wherein the acquisition module is used for acquiring reward behavior data of a target resource by a user, the reward behavior data comprises a block chain account address of a publisher of the target resource, the block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher;
the encryption module is used for encrypting the appreciation behavior data by utilizing the public key of the publisher and the private key of the user so as to generate transaction data to be processed;
a sending module, configured to send the transaction data to be processed to a node of the blockchain network, so that after the transaction data to be processed is decrypted to obtain the reward behavior data, the node adjusts assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user, and the transaction amount, generates an adjustment record, and writes the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network passes.
In a fourth aspect, an embodiment of the present invention provides a data processing apparatus, where the apparatus includes:
the resource management platform is used for encrypting reward behavior data by using a public key of a publisher of a target resource and a private key of a user, wherein the reward behavior data comprises a block chain account address of the publisher, a block chain account address of the user and a transaction amount;
the decryption module is used for decrypting the transaction data to be processed according to the public key of the user and the private key of the publisher to obtain the appreciation behavior data;
and the adjusting module is used for adjusting the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount, generating an adjusting record, and writing the transaction data to be processed and the adjusting record into a blockchain after the co-recognition verification of the transaction data to be processed and the adjusting record with other nodes of the blockchain network passes.
In a fifth aspect, an embodiment of the present invention provides a platform server, where the platform server includes: a processor and a memory, the processor to perform:
obtaining reward behavior data of a user on a target resource, wherein the reward behavior data comprises a block chain account address of a publisher of the target resource, the block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher;
encrypting the appreciation behavior data by using the public key of the publisher and the private key of the user to generate transaction data to be processed;
sending the transaction data to be processed to a node of the blockchain network, so that the node adjusts assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount after decrypting the transaction data to be processed to obtain the appreciation behavior data, generates an adjustment record, and writes the transaction data to be processed and the adjustment record into a blockchain after jointly identifying and verifying the transaction data to be processed and the adjustment record with other nodes of the blockchain network.
In a sixth aspect, an embodiment of the present invention provides a node, where the node includes: a processor and a memory, the processor to perform:
receiving to-be-processed transaction data sent by a resource management platform, wherein the to-be-processed transaction data is obtained by encrypting appreciation behavior data by the resource management platform by using a public key of a publisher of a target resource and a private key of a user, and the appreciation behavior data comprises a block chain account address of the publisher, a block chain account address of the user and a transaction amount;
decrypting the transaction data to be processed according to the public key of the user and the private key of the publisher to obtain the appreciation behavior data;
adjusting the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount, generating an adjustment record, and writing the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network is passed.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where program instructions are stored in the computer-readable storage medium, and when the program instructions are executed, the computer-readable storage medium is configured to implement the method in the first aspect.
The method and the device for processing the transaction data can encrypt the reward behavior data of the target resource according to the public key of the publisher carried by the acquired target resource to generate transaction data to be processed, send the transaction data to be processed to the nodes of the block chain network, enable the nodes to adjust assets in the block chain account of the publisher and assets in the block chain account of the user according to the block chain account address and the transaction amount of the user of the block chain account address of the publisher included in the reward behavior data after decrypting the transaction data to be processed to obtain the reward behavior data, generate an adjustment record, and write the transaction data to be processed and the adjustment record into the block chain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the block chain network is passed. Through the implementation mode, the charging of the intermediate platform can be avoided, the protection of the user assets is realized, the loss of the user assets caused by the reasons of the platform closing and the like is avoided, the safety of the user assets is improved, and the reliability of the appreciating behavior data is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is a block diagram of a data processing system according to an embodiment of the present invention;
fig. 1b is a schematic structural diagram of a block chain according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of a process for generating a new block according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a data processing system according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a data processing method based on a blockchain network according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another data processing method based on a blockchain network according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a data processing interaction method based on a blockchain network according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 7 is a block diagram of another data processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a platform server according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a node according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a data processing method based on a blockchain network, which is characterized in that a user carries out the reward operation on resources released on a platform server by means of a blockchain technology, so that the amount of reward of the user can directly reach a blockchain account of a publisher, the charge of the intermediate platform is avoided, the publisher does not need to pay for the charges, the protection of user assets is realized, and the safety of the user assets is improved.
The data processing method based on the blockchain network provided by the embodiment of the invention can be applied to a data processing system, and in some embodiments, the data processing system comprises a platform server, the blockchain network, a user terminal device and a publisher terminal device. In some embodiments, the platform server may establish a communication connection with the blockchain network, the end device of the user, and the end device of the publisher. In some embodiments, the blockchain network may establish a communication connection with a terminal device of a user and a terminal device of a publisher. In some embodiments, the manner of the Communication connection may include, but is not limited to, Wi-Fi, Bluetooth, Near Field Communication (NFC), and the like.
A data processing system according to an embodiment of the present invention is schematically illustrated with reference to fig. 1 a-1 c.
Referring to fig. 1a, fig. 1a is a schematic structural diagram of a data processing system according to an embodiment of the present invention. The data processing system includes: a blockchain network 11, a terminal device 12 of a user, a platform server 13, a terminal device 14 of a publisher. In some embodiments, the blockchain network 11 and the platform server 13 may establish a communication connection through a wireless communication connection; in some scenarios, the blockchain network 11 and the platform server 13 may also establish a communication connection through a wired communication connection. In some embodiments, the platform server 13 may establish a communication connection with the terminal device 12 of the user and the terminal device 14 of the publisher through a wired or wireless communication connection. In some embodiments, the user's terminal device 12 may establish a communication connection with the blockchain network 11, and in some embodiments, the publisher's terminal device 14 may establish a communication connection with the blockchain network 11. In some embodiments, the user's terminal device 12 and the publisher's terminal device 14 may include, but are not limited to, smart terminal devices such as smart phones, tablets, laptops, desktops, vehicle-mounted smart terminals, smart watches, and the like. In some embodiments, the platform server 13 includes, but is not limited to, a resource management platform for the publisher to publish the resource, for the user to appreciate the published resource, and the like.
In one embodiment, the blockchain network 11 refers to a network for performing data sharing between nodes, and the blockchain network may include a plurality of nodes 111. Each node 111 may receive input information and maintain shared data (i.e., blockchains) within the blockchain network based on the received input information while operating normally. In order To ensure information intercommunication in the blockchain network, each node may have information connection, and any two nodes may implement Peer-To-Peer (P2P) communication, and specifically may perform P2P communication through a wired communication link or a wireless communication link. For example, when any node in the blockchain network receives input information, other nodes acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain network are consistent.
The platform server 13 has access to the blockchain network 11 and can communicate with nodes in the blockchain network 11. It should be noted that the number of nodes shown in fig. 1a is only illustrative, and any number of nodes may be deployed according to actual needs.
Each node in the blockchain network 11 has a corresponding node identifier, and each node in the blockchain network 11 may store node identifiers of other nodes in the blockchain network, so that the generated block is broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an Internet Protocol (IP) address or any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
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 network stores one identical blockchain. The block chain is composed of a plurality of blocks, and referring to fig. 1b, fig. 1b is a schematic structural diagram of a block chain according to an embodiment of the present invention. The block chain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When generating each block in the block chain, referring to fig. 1c, fig. 1c is a schematic diagram of a process for generating a new block according to an embodiment of the present invention. When the node where the block chain is located receives input information, verifying the input information, storing the input information into a memory pool after the verification is completed, and updating a hash tree for recording the input information; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the block chain network where the newly generated blocks are located according to the node identifications of the other nodes in the block chain network, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
Specifically, the data processing system provided by the embodiment of the present invention may be described with reference to fig. 1a and fig. 2, and fig. 2 is a flowchart of the data processing system provided by the embodiment of the present invention, and as shown in fig. 2, the platform server 13 may obtain reward behavior data that a user performs on a target resource in the resource management platform of the platform server 13 through the terminal device 12 of the user, encrypt the reward behavior data by using a public key of a publisher and a private key of the user that are carried in the target resource to generate transaction data to be processed, and send the transaction data to be processed to a node of the blockchain network 11, so that the node of the blockchain network 11 decrypts the transaction data to be processed to obtain the reward behavior data, and then performs a process on assets in a blockchain account of the publisher and resource accounts in a blockchain account of the user according to a blockchain account address of the publisher, a blockchain account address of the user, and a transaction amount that are included in the reward behavior data to be processed The yield is adjusted.
In one embodiment, the publisher may access the platform server 13 through the publisher's terminal device 14, and when the platform server 13 detects that the publisher accesses the platform server through the publisher's terminal device 14, the platform server 13 may generate a private key of the publisher for the publisher, and calculate a public key of the publisher through a specified encryption algorithm (e.g., an elliptic curve encryption algorithm). The platform server 13 may process the public key of the publisher to obtain the blockchain account address of the publisher, and when the publisher accesses the platform server 13, the publisher may log in with the public key of the publisher as a login account and with the private key of the publisher as a password.
In one embodiment, the publisher may publish the resource on the platform server 13 after accessing the platform server 13, and in some embodiments, the platform server 13 includes a resource management platform, and the publisher may publish the resource on the resource management platform of the platform server 13. In certain embodiments, the resources include, but are not limited to, articles, pictures, audio, video, and the like. In one embodiment, the resource published by the publisher on the platform server 13 may carry a public key of the publisher, so that the user may perform a reward operation on the resource published by the publisher according to the public key of the publisher.
In one embodiment, the user may access the platform server 13 through the terminal device 12 of the user to view the resource published on the platform server 13, and if the platform server 13 does not acquire the historical approval behavior data, the user does not log in the resource management platform of the platform server 13. If the platform server 13 detects that the user operates the resource in the platform server 13 for the first time in a favorable manner, the platform server 13 may automatically generate the private key of the user for the user, generate the public key of the user by using an elliptic curve encryption algorithm and the like according to the private key of the user, and process the public key of the user to generate the block chain account address of the user. The platform server 13 may send the public key and the private key of the user to the terminal device 12 of the user, so that the user logs in the resource management platform of the platform server 13 with the public key as a login account and the private key as a password.
In an embodiment, when detecting a reward behavior operation of a user on a resource issued on the platform server 13, the platform server 13 may obtain a transaction amount corresponding to the reward behavior operation, and query an asset balance of the blockchain account of the user from a node of the blockchain network 11 according to the blockchain account address of the user, and if the asset balance of the blockchain account of the user is less than the transaction amount, the platform server 13 may send a recharge notification message to the terminal device 12 of the user to notify the user to recharge the blockchain account of the user, and write a recharge record produced according to the blockchain account address of the user and the recharge amount into the blockchain. In some embodiments, the user's blockchain account address and recharge amount are included in a recharge record that indicates that the owner of the asset is the user's blockchain account. By writing the recharging records into the block chain, each node in the block chain can synchronize and identify the recharging records at intervals, thereby ensuring the legality, reliability and safety of the recharging records.
In one embodiment, the node in the blockchain network 11 collects the recharge transaction records in the blockchain at intervals, the node in the blockchain network 11 can obtain the right to create a new block, package the recharge transaction records into a new block, synchronize the new block to other nodes in the blockchain network 11, after confirming the validity of the block by other nodes, the recharge operation of the user is completed, and the amount in the blockchain account address of the user is modified, for example, if the amount in the blockchain account address of the user originally corresponds to the amount X, if the amount in the blockchain account address of the user corresponds to the recharge operation is Y, the amount in the blockchain account of the user is X + Y after the recharge operation is completed.
In an embodiment, a user may perform a reward operation on a resource issued on the platform server 13 through the platform server 13, and when obtaining reward behavior data of the user on the resource issued on the platform server 13, the platform server 13 may encrypt a block chain account address of a publisher and a block chain account address of the user according to a public key of the publisher carried in the resource, and encrypt a transaction amount included in the reward behavior data by using a private key of the user to generate transaction data to be processed. In one embodiment, the platform server 13 may send the transaction data to be processed to the blockchain network for storage, so that the blockchain network 11 may perform synchronization and consensus operation on the transaction data to be processed, so as to synchronize the transaction data to be processed to each node in the blockchain network 11, thereby ensuring the validity and security of the transaction data to be processed. For example, assuming that the transaction amount in the blockchain account corresponding to the blockchain account address of the user is X, the transaction amount X in the blockchain account of the user may be transferred to the blockchain account of the publisher according to the blockchain account address of the publisher.
In one embodiment, the publisher may perform cash-up on the assets in the blockchain account of the publisher according to the blockchain account address of the publisher, and in the embodying process, the publisher may send a cash-up request to the blockchain network 11 through the terminal device 14 of the publisher, or the publisher may directly send a cash-up request to the blockchain network 11, which is not limited herein. In some embodiments, the cash-out transaction record includes a blockchain account address of the publisher, an assigned receiving account address, and a cash-out amount, the blockchain network 11 may generate the transaction-embodying record according to the blockchain account address of the publisher, the assigned receiving account address, and the cash-out amount carried in the obtained cash-out request, and write the cash-out transaction record into the blockchain network 11 after the other nodes of the blockchain network 11 verify the consensus of the cash-out transaction record. In some embodiments, the designated receiving account address may include, but is not limited to, a bank account address, and in some embodiments, the withdrawal amount includes, but is not limited to, bitcoin, and may be other currencies, which are not specifically limited herein.
The following describes schematically a data processing method based on a blockchain network according to an embodiment of the present invention with reference to the accompanying drawings.
Referring to fig. 3 specifically, fig. 3 is a schematic flow chart of a data processing method based on a blockchain network according to an embodiment of the present invention, where the data processing method based on a blockchain network according to the embodiment of the present invention may be executed by a data processing apparatus, where the data processing apparatus is disposed in a platform server, and the platform server includes a resource management platform, and the resource management platform is used for a publisher to publish a resource and a co-user to appreciate the published resource. Specifically, the method of the embodiment of the present invention includes the following steps.
S301: obtaining reward behavior data of a user on a target resource, wherein the reward behavior data comprises a block chain account address of a publisher of the target resource, the block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher.
In the embodiment of the invention, a platform server can acquire reward behavior data of a user on a target resource in a resource management platform, wherein the reward behavior data comprises a block chain account address of a publisher of the target resource, a block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher. In certain embodiments, the target resources include, but are not limited to, articles, pictures, video, audio, and the like.
In an embodiment, before obtaining the reward behavior data of the user for the target resource, the platform server may detect whether the user has historical reward behavior data on the resource management platform, and if the detection result is negative, may generate a private key of the user, generate a public key of the user according to the private key of the user, and send the public key and the private key of the user to the terminal device corresponding to the user, so that the user logs in the resource management platform with the public key as a login account and the private key as a password. In some embodiments, the platform server may randomly generate the private key of the user, and in other embodiments, the platform server may also generate the private key of the user in other manners, which is not limited herein.
In an embodiment, when the platform server generates the public key of the user according to the private key of the user, the platform server may calculate the private key of the user according to an elliptic curve cryptography algorithm to generate the public key of the user. In some embodiments, the elliptic curve cryptography algorithm is an existing cryptography algorithm and is not specifically set forth herein. In some embodiments, the platform server may also generate the public key of the user by using the private key of the user through other manners, which is not limited herein.
For example, when it is assumed that a platform server detects that a user approves a target resource in a resource management platform, if it is detected that historical approval behavior data does not exist on the resource management platform for the user, the user can be determined to log in the resource management platform for the first time, so that a private key of the user can be randomly generated, a public key of the user is generated by calculating the private key of the user according to an elliptic curve encryption algorithm, and the public key and the private key of the user are sent to a terminal device corresponding to the user, so that the user logs in the resource management platform with the public key as a login account and the private key as a password.
In an embodiment, before obtaining the reward behavior data of the user for the target resource, the platform server may detect whether the publisher logs in the resource management platform for the first time, and if the detection result is yes, may generate a private key of the publisher, generate a public key of the publisher according to the private key of the publisher, and send the public key and the private key of the publisher to the terminal device corresponding to the publisher, so that the publisher logs in the resource management platform with the public key as a login account and the private key as a password. In some embodiments, the platform server may randomly generate the private key of the publisher, and in other embodiments, the platform server may also generate the private key of the publisher in other manners, which is not limited herein.
In an embodiment, when the platform server generates the public key of the publisher according to the private key of the publisher, the platform server may calculate the private key of the publisher according to an elliptic curve cryptography algorithm to generate the public key of the publisher. In some embodiments, the elliptic curve cryptography algorithm is an existing cryptography algorithm and is not specifically set forth herein. In some embodiments, the platform server may also generate the public key of the publisher by using the private key of the publisher in other manners, which is not limited herein. The example of the specific embodiment is similar to the foregoing example of generating the public key of the user according to the private key of the user, and is not described herein again.
In an embodiment, before obtaining the reward behavior data of the user for the target resource, the platform server may further obtain, when detecting the reward behavior operation of the user for the target resource, a transaction amount corresponding to the reward behavior operation, query an asset balance of a blockchain account of the user from a node of the blockchain network according to a blockchain account address of the user, detect whether the asset balance is greater than or equal to the transaction amount, and if the detection result is negative, send a recharge notification message to a terminal device corresponding to the user, where the recharge notification message is used to notify the user to recharge the blockchain account of the user. In some embodiments, the recharge notification message may carry a recharge amount, where the recharge amount is used to notify the user of a minimum recharge amount for performing a reward action operation on the target resource. In some embodiments, the favorable behavior operation may be a selection operation of a favorable icon on an interactive interface with the platform server in the terminal device corresponding to the user by the user, and in other embodiments, the favorable behavior operation may also be another operation on an interactive interface with the platform server in the terminal device corresponding to the user, which is not specifically limited herein.
For example, assuming that a platform server obtains a transaction amount corresponding to a reward behavior operation when detecting the reward behavior operation of the user on the target resource, if the platform server queries, according to a blockchain account address of the user, that an asset balance of a blockchain account of the user is Y from a node of the blockchain network, and detects that the asset balance Y is less than the transaction amount X, the platform server may send a recharge notification message to a terminal device corresponding to the user to notify the user to recharge the blockchain account of the user.
By the implementation mode, the problem that the target resource issued on the resource management platform on the platform server cannot be appreciated due to insufficient balance in the block chain account of the user can be avoided, and the effectiveness of the user in appreciating the resource is improved.
In one embodiment, after the user recharges the user's blockchain account, the platform server may generate a recharge record according to the user's blockchain account address, recharge amount, and asset balance, and send the recharge record to the blockchain network to synchronize the recharge record in each node of the blockchain network. By the implementation, the reliability and the safety of recharging the user's blockchain account by the user can be ensured.
S302: and encrypting the appreciation behavior data by utilizing the public key of the publisher and the private key of the user to generate transaction data to be processed.
In the embodiment of the present invention, the platform server may encrypt the reward behavior data by using the public key of the publisher and the private key of the user, so as to generate the transaction data to be processed.
In one embodiment, when the platform server encrypts the reward behavior data by using the public key of the publisher and the private key of the user to generate the transaction data to be processed, the platform server may encrypt the blockchain account address of the publisher and the blockchain account address of the user by using the public key of the publisher and encrypt the transaction amount by using the private key of the user, so as to generate the transaction data to be processed according to the encrypted blockchain account address of the publisher, the encrypted blockchain account address of the user, and the encrypted transaction amount.
The public key of the publisher is used for encrypting the blockchain account address of the publisher and the blockchain account address of the user, and the private key of the user is used for encrypting the transaction amount, so that the security of the transaction data to be processed can be improved.
S303: and sending the transaction data to be processed to a node of the blockchain network, so that after the node decrypts the transaction data to be processed to obtain the appreciation behavior data, the assets in the blockchain account of the publisher and the assets in the blockchain account of the user are adjusted according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount.
In this embodiment of the present invention, the platform server may send the transaction data to be processed to a node of the blockchain network, so that after the node decrypts the transaction data to be processed to obtain the reward behavior data, the node adjusts the asset in the blockchain account of the publisher and the asset in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user, and the transaction amount, generates an adjustment record, and writes the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network passes. In some embodiments, the adjustment record includes change information for assets in the publisher's blockchain account, as well as change information for assets in the user's blockchain account. In one example, the adjustment record includes that the change information of the balance in the blockchain account of the publisher is changed from balance x to x + y, and the change information of the balance in the blockchain account of the subscriber is changed from balance z to z-y.
Therefore, the to-be-processed transaction data are sent to the nodes of the block chain network, so that the safety and reliability of the to-be-processed transaction data are ensured.
In the embodiment of the invention, the platform server can encrypt the obtained approval behavior data of the target resource of the user according to the public key of the publisher carried by the target resource in the resource management platform, to generate pending transaction data and to send the pending transaction data to a node of the blockchain network, so that after the node decrypts the transaction data to be processed to obtain the favorable behavior data, adjusting assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher and the transaction amount included in the reward behavior data, generating an adjustment record, and after the common identification verification of the transaction data to be processed and the adjustment record is passed by other nodes of the block chain network, writing the transaction data to be processed and the adjustment record into a block chain. Through the implementation mode, the condition that the intermediate platform charges share cost or channel cost when the user approves the resources of the publisher can be avoided, the user assets are protected, the user assets are prevented from being lost due to the fact that the platform is closed upside down and the like, the safety of the user assets is improved, and the reliability of approval behavior data is ensured.
Referring to fig. 4 specifically, fig. 4 is a schematic flowchart of another data processing method based on a blockchain network according to an embodiment of the present invention, where the data processing method based on a blockchain network according to an embodiment of the present invention may be executed by a data processing device, where the data processing device is disposed in a node of the blockchain network, and the node is specifically explained as described above. Specifically, the method of the embodiment of the present invention includes the following steps.
S401: receiving to-be-processed transaction data sent by a resource management platform, wherein the to-be-processed transaction data is obtained by encrypting appreciation behavior data by the resource management platform by using a public key of a publisher of a target resource and a private key of a user, and the appreciation behavior data comprises a block chain account address of the publisher, a block chain account address of the user and a transaction amount.
In the embodiment of the present invention, a node may receive to-be-processed transaction data sent by a resource management platform, where the to-be-processed transaction data is obtained by encrypting, by the resource management platform, reward behavior data by using a public key of a publisher of a target resource and a private key of a user, and the reward behavior data includes a block chain account address of the publisher, a block chain account address of the user, and a transaction amount.
In one embodiment, the pending transaction data is obtained by encrypting the blockchain account address of the publisher and the blockchain account address of the user by using a public key of the publisher of the target resource and encrypting the transaction amount by using a private key of the user by using a resource management platform of the platform server.
S402: and decrypting the transaction data to be processed according to the public key of the user and the private key of the publisher to obtain the appreciation behavior data.
In the embodiment of the present invention, the node may decrypt the transaction data to be processed according to the public key of the user and the private key of the issuer, so as to obtain the reward behavior data.
In an embodiment, when the node decrypts the transaction data to be processed according to the public key of the user and the private key of the issuer to obtain the reward behavior data, the node may decrypt the transaction data to be processed by using the public key of the user to obtain the blockchain account address of the issuer and the blockchain account address of the user, and decrypt the transaction data to be processed by using the private key of the issuer to obtain the transaction amount.
S403: adjusting the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount, generating an adjustment record, and writing the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network is passed.
In this embodiment of the present invention, a node may adjust assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user, and the transaction amount, generate an adjustment record, and write the transaction data to be processed and the adjustment record into a blockchain after the to-be-processed transaction data and the adjustment record are identified and verified with other nodes of the blockchain network. In some embodiments, the adjustment record includes change information for assets in the publisher's blockchain account, as well as change information for assets in the user's blockchain account. The specific embodiments are as described above, and are not described herein again.
In one embodiment, when adjusting assets in the publisher's blockchain account and assets in the user's blockchain account according to the publisher's blockchain account address, the user's blockchain account address, and the transaction amount, a node may transfer assets corresponding to the transaction amount from the user's blockchain account to the publisher's blockchain account according to the publisher's blockchain account address and the user's blockchain account address.
For example, assuming that the transaction amount included in the reward behavior data obtained by the node decryption is X, the user's blockchain account address is a, and the publisher's blockchain account address is B, the node may transfer the asset corresponding to the transaction amount X from the user's blockchain account corresponding to the user's blockchain account address a to the publisher's blockchain account corresponding to the publisher's blockchain account address B according to the publisher's blockchain account address B and the user's blockchain account address a.
In an embodiment, the node may further receive a cash-out request submitted by the publisher through a corresponding terminal device, where the cash-out request carries a blockchain account address, an assigned receiving account address, and a cash-out amount of the publisher, and transfers an asset corresponding to the cash-out amount from the blockchain account of the publisher to an assigned receiving account according to the blockchain account address of the publisher and the assigned receiving account address, and generates a cash-out transaction record according to the blockchain account address of the publisher, the assigned receiving account address, and the cash-out amount, and writes the cash-out transaction record into a blockchain after other nodes of the blockchain network verify that the cash-out transaction record is commonly identified. In an embodiment, the publisher may also submit the cash-out request to the platform server through the corresponding terminal device, so as to submit the cash-out request to the node through the platform server, which is not specifically limited herein.
For example, suppose that a node receives a cash withdrawal request submitted by a publisher through a corresponding terminal device, the cash withdrawal request carries a blockchain account address a, a specified receiving account address M and a cash withdrawal amount Z of the publisher, the node may transfer the asset corresponding to the cash-out amount Z from the blockchain account of the publisher corresponding to the blockchain account address a of the publisher to the designated receiving account corresponding to the designated receiving account address M according to the blockchain account address a of the publisher and the designated receiving account address M, and generating a cash-out transaction record according to the blockchain account address A of the publisher, the designated receiving account address M and the cash-out amount Z, and writing the withdrawal transaction record into the blockchain after the other nodes of the blockchain network pass the consensus verification of the withdrawal transaction record.
Through the implementation mode, the publisher can extract the assets in the blockchain account of the publisher without the intermediate platform, the intermediate platform is prevented from collecting cash withdrawal cost, the rights and interests of the publisher are guaranteed, and the legality and the safety of the cash withdrawal transaction record are favorably ensured by writing the cash withdrawal transaction record into the blockchain network.
In one embodiment, the node may further receive a cash-out request submitted by a user through a corresponding terminal device, where the cash-out request carries a blockchain account address, an appointed receiving account address, and a cash-out amount of the user, transfer an asset corresponding to the cash-out amount from the blockchain account of the user to an appointed receiving account according to the blockchain account address of the user and the appointed receiving account address, generate a cash-out transaction record according to the blockchain account address of the user, the appointed receiving account address, and the cash-out amount, and write the cash-out transaction record into a blockchain after other nodes of the blockchain network verify the co-identification of the cash-out transaction record. Detailed description of the exemplary embodimentsthe foregoing embodiments, which are provided by publishers, are similar and will not be described further herein.
Through the implementation mode, the user can extract the assets in the blockchain account of the user without the intermediate platform, the intermediate platform is prevented from collecting cash withdrawal cost, the user rights and interests are guaranteed, and the legitimacy and the safety of the cash withdrawal transaction records are favorably ensured by writing the cash withdrawal transaction records into the blockchain network.
In the embodiment of the invention, the nodes of the block chain network can receive the transaction data to be processed sent by the resource management platform, the transaction data to be processed is obtained by encrypting the favorable behavior data by the resource management platform by using the public key of the publisher of the target resource and the private key of the user, and decrypts the transaction data to be processed according to the public key of the user and the private key of the publisher included in the approval behavior data to obtain the approval behavior data, and adjusting assets in the publisher's blockchain account and assets in the user's blockchain account according to the publisher's blockchain account address, the user's blockchain account address, and the transaction amount, and generating an adjustment record, and after the common identification verification of the transaction data to be processed and the adjustment record is passed by other nodes of the block chain network, writing the transaction data to be processed and the adjustment record into a block chain. Through the implementation mode, the condition that the intermediate platform charges share cost or channel cost when the user approves the resources of the publisher can be avoided, the user assets are protected, the user assets are prevented from being lost due to the fact that the platform is closed upside down and the like, the safety of the user assets is improved, and the reliability of approval behavior data is ensured.
Referring to fig. 5 in detail, fig. 5 is a schematic flowchart of a data processing interaction method based on a blockchain network according to an embodiment of the present invention, where the data processing interaction method based on a blockchain network according to an embodiment of the present invention may be executed by a data processing system, where the data processing system includes a blockchain network, a terminal device of a user, a platform server, and a terminal device of a publisher. Specifically, the method of the embodiment of the present invention includes the following steps.
S501: the terminal device of the publisher sends a login request to the platform server.
In the embodiment of the invention, the publisher can send the login request to the platform server through the terminal equipment of the publisher. In some embodiments, the login request may carry a user identifier, and in some embodiments, the user identifier includes, but is not limited to, characters such as numbers, words, letters, and the like.
S502: when a platform server receives a login request of terminal equipment of a publisher, if the platform server detects that the publisher logs in a resource management platform for the first time, a private key of the publisher is generated, and a public key of the publisher is generated according to the private key of the publisher.
In the embodiment of the invention, when a platform server receives a login request of terminal equipment of a publisher, whether the publisher logs in a resource management platform for the first time or not can be detected according to a user identifier carried by the login request, if the fact that the publisher logs in the resource management platform for the first time is detected, a private key of the publisher can be generated, and a public key of the publisher can be generated according to the private key of the publisher. The specific embodiments are as described above and will not be described herein.
S503: and the platform server sends the public key and the private key of the publisher to the terminal equipment of the publisher.
In the embodiment of the present invention, the platform server may send the public key and the private key of the publisher to the terminal device of the publisher.
S504: and the terminal equipment of the publisher logs in the platform server by taking the public key as a login account and taking the private key as a password.
In the embodiment of the invention, the terminal equipment of the publisher logs in the platform server by taking the public key as a login account and taking the private key as a password.
S505: and the terminal equipment of the user carries out the reward behavior operation on the target resource released on the resource management platform through the platform server.
In the embodiment of the invention, the terminal equipment of the user can perform the reward behavior operation on the target resource released on the resource management platform through the platform server.
S506: and if the platform server detects that the historical appreciation behavior data does not exist on the resource management platform, generating a public key and a private key of the user.
In the embodiment of the invention, when the platform server detects the reward behavior operation, if the platform server detects that no historical reward behavior data exists on the resource management platform, the public key and the private key of the user can be generated.
S507: and the platform server sends the public key and the private key of the user to the terminal equipment of the user.
In the embodiment of the present invention, the platform server may send the public key and the private key of the user to the terminal device of the user.
S508: and the terminal equipment of the user logs in the resource management platform of the platform server by taking the public key as a login account and taking the private key as a password.
In the embodiment of the invention, the terminal equipment of the user can take the public key as a login account and take the private key as a password to log in the resource management platform of the platform server.
S509: the platform server acquires the reward behavior data of the user on the target resource, and encrypts the reward behavior data by using the public key of the publisher and the private key of the user to generate transaction data to be processed.
In the embodiment of the invention, the platform server can acquire the reward behavior data of the user on the target resource in the resource management platform, and encrypt the reward behavior data by using the public key of the publisher and the private key of the user to generate the transaction data to be processed. The specific embodiments and examples are as described above and will not be described herein again.
S510: and the platform server sends the transaction data to be processed to a node of the block chain network.
In the embodiment of the present invention, the platform server may send the transaction data to be processed to a node of the blockchain network.
S511: the node of the blockchain network decrypts the received to-be-processed transaction data according to the public key of the user and the private key of the publisher to obtain the reward behavior data, adjusts the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount which are included in the reward behavior data, generates an adjustment record, and writes the to-be-processed transaction data and the adjustment record into the blockchain after the to-be-processed transaction data and the adjustment record are identified and verified with other nodes of the blockchain network.
In the embodiment of the present invention, a node of a blockchain network may decrypt received to-be-processed transaction data according to a public key of a user and a private key of a publisher to obtain reward behavior data, adjust assets in a blockchain account of the publisher and assets in a blockchain account of the user according to a blockchain account address of the publisher, a blockchain account address of the user, and a transaction amount included in the reward behavior data, generate an adjustment record, and write the to-be-processed transaction data and the adjustment record into a blockchain after passing through a consensus verification of the to-be-processed transaction data and the adjustment record with other nodes of the blockchain network. The specific embodiments and examples are as described above and will not be described herein again.
In the embodiment of the invention, the platform server can encrypt the obtained approval behavior data of the target resource of the user according to the public key of the publisher carried by the target resource in the resource management platform, to generate pending transaction data and to send the pending transaction data to a node of the blockchain network, so that after the node decrypts the transaction data to be processed to obtain the favorable behavior data, adjusting assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher and the transaction amount included in the reward behavior data, generating an adjustment record, and after the common identification verification of the transaction data to be processed and the adjustment record is passed by other nodes of the block chain network, writing the transaction data to be processed and the adjustment record into a block chain. Through the implementation mode, the condition that the middle platform charges the fee when the user approves the resources of the publisher can be avoided, the user assets are protected, the user assets are prevented from being lost due to the fact that the platform is closed upside down and the like, the safety of the user assets is improved, and the reliability of the approval behavior data is ensured.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention. Specifically, the apparatus is disposed in a platform server, the platform server includes a resource management platform, and the apparatus includes: an acquisition module 601, an encryption module 602, and a sending module 603;
an obtaining module 601, configured to obtain reward behavior data of a user for a target resource, where the reward behavior data includes a block chain account address of a publisher of the target resource, a block chain account address of the user, and a transaction amount, and the target resource carries a public key of the publisher;
an encryption module 602, configured to encrypt the reward behavior data by using the public key of the publisher and the private key of the user to generate to-be-processed transaction data;
a sending module 603, configured to send the transaction data to be processed to a node of the blockchain network, so that after the node decrypts the transaction data to be processed to obtain the reward behavior data, the asset in the blockchain account of the publisher and the asset in the blockchain account of the user are adjusted according to the blockchain account address of the publisher, the blockchain account address of the user, and the transaction amount, and an adjustment record is generated, and after the verification that the transaction data to be processed and the adjustment record are commonly recognized by other nodes of the blockchain network, the transaction data to be processed and the adjustment record are written into a blockchain.
Further, the encrypting module 602 encrypts the favorable behavior data by using the public key of the publisher and the private key of the user to generate to-be-processed transaction data, and is specifically configured to:
encrypting the blockchain account address of the publisher and the blockchain account address of the user by using the public key of the publisher;
encrypting the transaction amount with a private key of the user;
and generating the transaction data to be processed according to the encrypted blockchain account address of the publisher, the encrypted blockchain account address of the user and the encrypted transaction amount.
Further, before the obtaining module 601 obtains the reward behavior data of the user on the target resource, the obtaining module is further configured to:
detecting whether the user has historical appreciation behavior data on a resource management platform;
if the detection result is negative, generating a private key of the user, and generating a public key of the user according to the private key of the user;
and sending the public key and the private key of the user to terminal equipment corresponding to the user, so that the user logs in the resource management platform by taking the public key as a login account and taking the private key as a password.
Further, before the obtaining module 601 obtains the reward behavior data of the user on the target resource, the obtaining module is further configured to:
detecting whether the publisher logs in a resource management platform for the first time;
if the detection result is yes, generating a private key of the publisher, and generating a public key of the publisher according to the private key of the publisher;
and sending the public key and the private key of the publisher to a terminal device corresponding to the publisher, so that the publisher logs in the resource management platform by taking the public key as a login account and taking the private key as a password.
Further, before the obtaining module 601 obtains the reward behavior data of the user on the target resource, the obtaining module is further configured to:
when the reward behavior operation of the user on the target resource is detected, acquiring a transaction amount corresponding to the reward behavior operation;
querying an asset balance of the user's blockchain account from a node of the blockchain network according to the user's blockchain account address;
detecting whether the asset balance is greater than or equal to the transaction amount;
and if the detection result is negative, sending a recharging notification message to the terminal equipment corresponding to the user, wherein the recharging notification message is used for notifying the user to recharge the blockchain account of the user.
The embodiment of the invention can encrypt the obtained approval behavior data of the target resource of the user according to the public key of the publisher carried by the target resource in the resource management platform, to generate pending transaction data and to send the pending transaction data to a node of the blockchain network, so that after the node decrypts the transaction data to be processed to obtain the favorable behavior data, adjusting assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher and the transaction amount included in the reward behavior data, generating an adjustment record, and after the common identification verification of the transaction data to be processed and the adjustment record is passed by other nodes of the block chain network, writing the transaction data to be processed and the adjustment record into a block chain. Through the implementation mode, the condition that the intermediate platform charges share cost or channel cost when the user approves the resources of the publisher can be avoided, the user assets are protected, the user assets are prevented from being lost due to the fact that the platform is closed upside down and the like, the safety of the user assets is improved, and the reliability of approval behavior data is ensured.
Referring to fig. 7, fig. 7 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention. Specifically, the apparatus is provided in a server, and includes: a receiving module 701, a decryption module 702, and an adjusting module 703;
a receiving module 701, configured to receive to-be-processed transaction data sent by a resource management platform, where the to-be-processed transaction data is obtained by encrypting, by the resource management platform, reward behavior data by using a public key of a publisher of a target resource and a private key of a user, and the reward behavior data includes a block chain account address of the publisher, a block chain account address of the user, and a transaction amount;
a decryption module 702, configured to decrypt the transaction data to be processed according to the public key of the user and the private key of the issuer, so as to obtain the reward behavior data;
an adjusting module 703, configured to adjust the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user, and the transaction amount, generate an adjustment record, and write the transaction data to be processed and the adjustment record into a blockchain after the verification that the transaction data to be processed and the adjustment record are identified with other nodes of the blockchain network together passes.
Further, when the adjusting module 703 adjusts the assets in the publisher's blockchain account and the assets in the user's blockchain account according to the publisher's blockchain account address, the user's blockchain account address, and the transaction amount, it is specifically configured to:
and transferring the assets corresponding to the transaction amount from the blockchain account of the user to the blockchain account of the publisher according to the blockchain account address of the publisher and the blockchain account address of the user.
Further, the apparatus further includes a cash-out module, and the cash-out module 703 is specifically configured to:
receiving a cash withdrawal request submitted by the publisher through corresponding terminal equipment, wherein the cash withdrawal request carries a block chain account address, an appointed receiving account address and cash withdrawal amount of the publisher;
according to the blockchain account address of the publisher and the appointed receiving account address, transferring the assets corresponding to the cash withdrawal amount from the blockchain account of the publisher into the appointed receiving account;
generating a cash withdrawal transaction record according to the blockchain account address of the publisher, the appointed receiving account address and the cash withdrawal amount;
and writing the withdrawal transaction record into the blockchain after the other nodes of the blockchain network pass the consensus verification of the withdrawal transaction record.
The embodiment of the invention can receive the transaction data to be processed sent by the resource management platform, the transaction data to be processed is obtained by encrypting the favorable behavior data by the resource management platform by using the public key of the publisher of the target resource and the private key of the user, and decrypts the transaction data to be processed according to the public key of the user and the private key of the publisher included in the approval behavior data to obtain the approval behavior data, and adjusting assets in the publisher's blockchain account and assets in the user's blockchain account according to the publisher's blockchain account address, the user's blockchain account address, and the transaction amount, and generating an adjustment record, and after the common identification verification of the transaction data to be processed and the adjustment record is passed by other nodes of the block chain network, writing the transaction data to be processed and the adjustment record into a block chain. Through the implementation mode, the condition that the intermediate platform charges share cost or channel cost when the user approves the resources of the publisher can be avoided, the user assets are protected, the user assets are prevented from being lost due to the fact that the platform is closed upside down and the like, the safety of the user assets is improved, and the reliability of the approval behavior data is ensured
Referring to fig. 8, fig. 8 is a schematic structural diagram of a platform server according to an embodiment of the present invention. Specifically, the platform server includes: memory 801, processor 802.
In one embodiment, the platform server further comprises a data interface 803, and the data interface 803 is used for transmitting data information between the platform server and other terminal devices.
The memory 801 may include a volatile memory (volatile memory); the memory 801 may also include a non-volatile memory (non-volatile memory); the memory 801 may also comprise a combination of memories of the kind described above. The processor 802 may be a Central Processing Unit (CPU). The processor 802 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
The memory 801 is used for storing programs, and the processor 802 can call the programs stored in the memory 801 for executing the following steps:
obtaining reward behavior data of a user on a target resource, wherein the reward behavior data comprises a block chain account address of a publisher of the target resource, the block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher;
encrypting the appreciation behavior data by using the public key of the publisher and the private key of the user to generate transaction data to be processed;
sending the transaction data to be processed to a node of the blockchain network, so that the node adjusts assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount after decrypting the transaction data to be processed to obtain the appreciation behavior data, generates an adjustment record, and writes the transaction data to be processed and the adjustment record into a blockchain after jointly identifying and verifying the transaction data to be processed and the adjustment record with other nodes of the blockchain network.
Further, when the processor 802 encrypts the favorable behavior data by using the public key of the publisher and the private key of the user to generate to-be-processed transaction data, the to-be-processed transaction data is specifically configured to:
encrypting the blockchain account address of the publisher and the blockchain account address of the user by using the public key of the publisher;
encrypting the transaction amount with a private key of the user;
and generating the transaction data to be processed according to the encrypted blockchain account address of the publisher, the encrypted blockchain account address of the user and the encrypted transaction amount.
Further, before the processor 802 obtains the reward behavior data of the user on the target resource, it is further configured to:
detecting whether the user has historical appreciation behavior data on a resource management platform;
if the detection result is negative, generating a private key of the user, and generating a public key of the user according to the private key of the user;
and sending the public key and the private key of the user to terminal equipment corresponding to the user, so that the user logs in the resource management platform by taking the public key as a login account and taking the private key as a password.
Further, before the processor 802 obtains the reward behavior data of the user on the target resource, it is further configured to:
detecting whether the publisher logs in a resource management platform for the first time;
if the detection result is yes, generating a private key of the publisher, and generating a public key of the publisher according to the private key of the publisher;
and sending the public key and the private key of the publisher to a terminal device corresponding to the publisher, so that the publisher logs in the resource management platform by taking the public key as a login account and taking the private key as a password.
Further, before the processor 802 obtains the reward behavior data of the user on the target resource, it is further configured to:
when the reward behavior operation of the user on the target resource is detected, acquiring a transaction amount corresponding to the reward behavior operation;
querying an asset balance of the user's blockchain account from a node of the blockchain network according to the user's blockchain account address;
detecting whether the asset balance is greater than or equal to the transaction amount;
and if the detection result is negative, sending a recharging notification message to the terminal equipment corresponding to the user, wherein the recharging notification message is used for notifying the user to recharge the blockchain account of the user.
In the embodiment of the invention, the platform server can encrypt the obtained approval behavior data of the target resource of the user according to the public key of the publisher carried by the target resource in the resource management platform, to generate pending transaction data and to send the pending transaction data to a node of the blockchain network, so that after the node decrypts the transaction data to be processed to obtain the favorable behavior data, adjusting assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher and the transaction amount included in the reward behavior data, generating an adjustment record, and after the common identification verification of the transaction data to be processed and the adjustment record is passed by other nodes of the block chain network, writing the transaction data to be processed and the adjustment record into a block chain. Through the implementation mode, the condition that the intermediate platform charges share cost or channel cost when the user approves the resources of the publisher can be avoided, the user assets are protected, the user assets are prevented from being lost due to the fact that the platform is closed upside down and the like, the safety of the user assets is improved, and the reliability of approval behavior data is ensured.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a node according to an embodiment of the present invention. Specifically, the node includes: memory 901, processor 902.
In one embodiment, the node further comprises a data interface 903, and the data interface 903 is used for transmitting data information between the node and other terminal devices.
The memory 901 may include a volatile memory (volatile memory); memory 901 may also include non-volatile memory (non-volatile memory); the memory 901 may also comprise a combination of the above-mentioned kinds of memories. The processor 902 may be a Central Processing Unit (CPU). The processor 902 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
The memory 901 is used for storing programs, and the processor 902 can call the programs stored in the memory 901 to execute the following steps:
receiving to-be-processed transaction data sent by a resource management platform, wherein the to-be-processed transaction data is obtained by encrypting appreciation behavior data by the resource management platform by using a public key of a publisher of a target resource and a private key of a user, and the appreciation behavior data comprises a block chain account address of the publisher, a block chain account address of the user and a transaction amount;
decrypting the transaction data to be processed according to the public key of the user and the private key of the publisher to obtain the appreciation behavior data;
adjusting the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount, generating an adjustment record, and writing the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network is passed.
Further, when the processor 902 adjusts the assets in the publisher's blockchain account and the assets in the user's blockchain account according to the publisher's blockchain account address, the user's blockchain account address, and the transaction amount, it is specifically configured to:
and transferring the assets corresponding to the transaction amount from the blockchain account of the user to the blockchain account of the publisher according to the blockchain account address of the publisher and the blockchain account address of the user.
Further, the processor 902 is further configured to:
receiving a cash withdrawal request submitted by the publisher through corresponding terminal equipment, wherein the cash withdrawal request carries a block chain account address, an appointed receiving account address and cash withdrawal amount of the publisher;
according to the blockchain account address of the publisher and the appointed receiving account address, transferring the assets corresponding to the cash withdrawal amount from the blockchain account of the publisher into the appointed receiving account;
generating a cash withdrawal transaction record according to the blockchain account address of the publisher, the appointed receiving account address and the cash withdrawal amount;
and writing the withdrawal transaction record into the blockchain after the other nodes of the blockchain network pass the consensus verification of the withdrawal transaction record.
In the embodiment of the invention, the nodes of the block chain network can receive the transaction data to be processed sent by the resource management platform, the transaction data to be processed is obtained by encrypting the favorable behavior data by the resource management platform by using the public key of the publisher of the target resource and the private key of the user, and decrypts the transaction data to be processed according to the public key of the user and the private key of the publisher included in the approval behavior data to obtain the approval behavior data, and adjusting assets in the publisher's blockchain account and assets in the user's blockchain account according to the publisher's blockchain account address, the user's blockchain account address, and the transaction amount, and generating an adjustment record, and after the common identification verification of the transaction data to be processed and the adjustment record is passed by other nodes of the block chain network, writing the transaction data to be processed and the adjustment record into a block chain. Through the implementation mode, the condition that the intermediate platform charges share cost or channel cost when the user approves the resources of the publisher can be avoided, the user assets are protected, the user assets are prevented from being lost due to the fact that the platform is closed upside down and the like, the safety of the user assets is improved, and the reliability of approval behavior data is ensured.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method described in the embodiment corresponding to fig. 3, fig. 4, or fig. 5 of the present invention, and may also implement the apparatus in the embodiment corresponding to the present invention described in fig. 6 or fig. 7, which is not described herein again.
The computer readable storage medium may be an internal storage unit of the device according to any of the foregoing embodiments, for example, a hard disk or a memory of the device. The computer readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the apparatus. The computer-readable storage medium is used for storing the computer program and other programs and data required by the server. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a number of embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A data processing method based on a block chain network is characterized by comprising the following steps:
obtaining reward behavior data of a user on a target resource, wherein the reward behavior data comprises a block chain account address of a publisher of the target resource, the block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher;
encrypting the appreciation behavior data by using the public key of the publisher and the private key of the user to generate transaction data to be processed;
sending the transaction data to be processed to a node of the blockchain network, so that the node adjusts assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount after decrypting the transaction data to be processed to obtain the appreciation behavior data, generates an adjustment record, and writes the transaction data to be processed and the adjustment record into a blockchain after jointly identifying and verifying the transaction data to be processed and the adjustment record with other nodes of the blockchain network.
2. The method of claim 1, wherein encrypting the reward behavior data using the public key of the publisher and the private key of the user to generate pending transaction data comprises:
encrypting the blockchain account address of the publisher and the blockchain account address of the user by using the public key of the publisher;
encrypting the transaction amount with a private key of the user;
and generating the transaction data to be processed according to the encrypted blockchain account address of the publisher, the encrypted blockchain account address of the user and the encrypted transaction amount.
3. The method according to claim 1 or 2, wherein before the obtaining of the user's reward behavior data for the target resource, the method further comprises:
detecting whether the user has historical appreciation behavior data on a resource management platform;
if the detection result is negative, generating a private key of the user, and generating a public key of the user according to the private key of the user;
and sending the public key and the private key of the user to terminal equipment corresponding to the user, so that the user logs in the resource management platform by taking the public key as a login account and taking the private key as a password.
4. The method according to claim 1 or 2, wherein before the obtaining of the user's reward behavior data for the target resource, the method further comprises:
detecting whether the publisher logs in a resource management platform for the first time;
if the detection result is yes, generating a private key of the publisher, and generating a public key of the publisher according to the private key of the publisher;
and sending the public key and the private key of the publisher to a terminal device corresponding to the publisher, so that the publisher logs in the resource management platform by taking the public key as a login account and taking the private key as a password.
5. The method of claim 1, wherein before obtaining the user's reward behavior data for the target resource, the method further comprises:
when the reward behavior operation of the user on the target resource is detected, acquiring a transaction amount corresponding to the reward behavior operation;
querying an asset balance of the user's blockchain account from a node of the blockchain network according to the user's blockchain account address;
detecting whether the asset balance is greater than or equal to the transaction amount;
and if the detection result is negative, sending a recharging notification message to the terminal equipment corresponding to the user, wherein the recharging notification message is used for notifying the user to recharge the blockchain account of the user.
6. A data processing method based on a block chain network is characterized by comprising the following steps:
receiving to-be-processed transaction data sent by a resource management platform, wherein the to-be-processed transaction data is obtained by encrypting appreciation behavior data by the resource management platform by using a public key of a publisher of a target resource and a private key of a user, and the appreciation behavior data comprises a block chain account address of the publisher, a block chain account address of the user and a transaction amount;
decrypting the transaction data to be processed according to the public key of the user and the private key of the publisher to obtain the appreciation behavior data;
adjusting the assets in the blockchain account of the publisher and the assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user and the transaction amount, generating an adjustment record, and writing the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network is passed.
7. The method of claim 6, wherein adjusting the assets in the publisher's blockchain account and the assets in the user's blockchain account according to the publisher's blockchain account address, the user's blockchain account address, and the transaction amount comprises:
and transferring the assets corresponding to the transaction amount from the blockchain account of the user to the blockchain account of the publisher according to the blockchain account address of the publisher and the blockchain account address of the user.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
receiving a cash withdrawal request submitted by the publisher through corresponding terminal equipment, wherein the cash withdrawal request carries a block chain account address, an appointed receiving account address and cash withdrawal amount of the publisher;
according to the blockchain account address of the publisher and the appointed receiving account address, transferring the assets corresponding to the cash withdrawal amount from the blockchain account of the publisher into the appointed receiving account;
generating a cash withdrawal transaction record according to the blockchain account address of the publisher, the appointed receiving account address and the cash withdrawal amount;
and writing the withdrawal transaction record into the blockchain after the other nodes of the blockchain network pass the consensus verification of the withdrawal transaction record.
9. A data processing apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition module, a transaction module and a processing module, wherein the acquisition module is used for acquiring reward behavior data of a target resource by a user, the reward behavior data comprises a block chain account address of a publisher of the target resource, the block chain account address of the user and a transaction amount, and the target resource carries a public key of the publisher;
the encryption module is used for encrypting the appreciation behavior data by utilizing the public key of the publisher and the private key of the user so as to generate transaction data to be processed;
a sending module, configured to send the transaction data to be processed to a node of the blockchain network, so that after the transaction data to be processed is decrypted to obtain the reward behavior data, the node adjusts assets in the blockchain account of the publisher and assets in the blockchain account of the user according to the blockchain account address of the publisher, the blockchain account address of the user, and the transaction amount, generates an adjustment record, and writes the transaction data to be processed and the adjustment record into a blockchain after the common identification verification of the transaction data to be processed and the adjustment record with other nodes of the blockchain network passes.
10. A computer-readable storage medium, having stored thereon program instructions for implementing the method of any one of claims 1-8 when executed.
CN202010004818.6A 2020-01-02 2020-01-02 Data processing method, device and storage medium based on blockchain network Active CN111199486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010004818.6A CN111199486B (en) 2020-01-02 2020-01-02 Data processing method, device and storage medium based on blockchain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010004818.6A CN111199486B (en) 2020-01-02 2020-01-02 Data processing method, device and storage medium based on blockchain network

Publications (2)

Publication Number Publication Date
CN111199486A true CN111199486A (en) 2020-05-26
CN111199486B CN111199486B (en) 2024-05-14

Family

ID=70746734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010004818.6A Active CN111199486B (en) 2020-01-02 2020-01-02 Data processing method, device and storage medium based on blockchain network

Country Status (1)

Country Link
CN (1) CN111199486B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111815395A (en) * 2020-06-02 2020-10-23 郑州博雅讯科技有限公司 Management method and management device of digital resources and computer equipment
CN112733127A (en) * 2021-01-13 2021-04-30 杭州甘道智能科技有限公司 Bidirectional authentication method and system based on block chain
CN114445074A (en) * 2021-11-01 2022-05-06 上海能链众合科技有限公司 Account computer cash withdrawal method for block chain privacy

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118185A (en) * 2018-07-12 2019-01-01 腾讯音乐娱乐科技(深圳)有限公司 Numeric value transfer and device
WO2019061630A1 (en) * 2017-09-26 2019-04-04 武汉斗鱼网络科技有限公司 Transaction accounting method, and client
US20190213584A1 (en) * 2018-01-11 2019-07-11 Mastercard International Incorporated Method and system for tokenized replacement of crypto currency addresses
CN110599349A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Data processing method based on block chain network, related equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019061630A1 (en) * 2017-09-26 2019-04-04 武汉斗鱼网络科技有限公司 Transaction accounting method, and client
US20190213584A1 (en) * 2018-01-11 2019-07-11 Mastercard International Incorporated Method and system for tokenized replacement of crypto currency addresses
CN109118185A (en) * 2018-07-12 2019-01-01 腾讯音乐娱乐科技(深圳)有限公司 Numeric value transfer and device
CN110599349A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Data processing method based on block chain network, related equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111815395A (en) * 2020-06-02 2020-10-23 郑州博雅讯科技有限公司 Management method and management device of digital resources and computer equipment
CN112733127A (en) * 2021-01-13 2021-04-30 杭州甘道智能科技有限公司 Bidirectional authentication method and system based on block chain
CN112733127B (en) * 2021-01-13 2024-02-20 杭州甘道智能科技有限公司 Bidirectional authentication method and system based on blockchain
CN114445074A (en) * 2021-11-01 2022-05-06 上海能链众合科技有限公司 Account computer cash withdrawal method for block chain privacy
CN114445074B (en) * 2021-11-01 2024-06-18 上海零数众合信息科技有限公司 Account computer rendering method for blockchain privacy

Also Published As

Publication number Publication date
CN111199486B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
AU2020203360B2 (en) Synchronization and verification groups among related devices
KR102337170B1 (en) Blockchain-based transaction processing method and apparatus, and electronic device
EP3280090B1 (en) User authentication method and device
KR102205654B1 (en) Authentication method in a distributed circumstance
CN109729041B (en) Method and device for issuing and acquiring encrypted content
CN111199486B (en) Data processing method, device and storage medium based on blockchain network
US20150372813A1 (en) System and method for generating a random number
CN110599342B (en) Block chain-based identity information authorization method and device
US20140351583A1 (en) Method of implementing a right over a content
CN111460400B (en) Data processing method, device and computer readable storage medium
CN110336779B (en) Block chain construction method and device and electronic equipment
CN109754226B (en) Data management method, device and storage medium
CN113261024A (en) Method for routing to mesh network content using block chaining techniques
CN113169866A (en) Techniques to prevent collusion using simultaneous key distribution
US11943210B2 (en) System and method for distributed, keyless electronic transactions with authentication
CN111680013A (en) Data sharing method based on block chain, electronic equipment and device
CN107332833B (en) Verification method and device
CN114095277A (en) Power distribution network secure communication method, secure access device and readable storage medium
CN113868713A (en) Data verification method and device, electronic equipment and storage medium
CN112423302A (en) Wireless network access method, terminal and wireless access equipment
CN116366289B (en) Safety supervision method and device for remote sensing data of unmanned aerial vehicle
CN112418850A (en) Transaction method and device based on block chain and electronic equipment
CN110839067A (en) Information providing method and device
US11991294B2 (en) Peer-to-peer secure conditional transfer of cryptographic data
KR20200134187A (en) Authentication method in a distributed circumstance

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