CN117474676A - Block chain-based data processing method, device, equipment and medium - Google Patents

Block chain-based data processing method, device, equipment and medium Download PDF

Info

Publication number
CN117474676A
CN117474676A CN202311460849.2A CN202311460849A CN117474676A CN 117474676 A CN117474676 A CN 117474676A CN 202311460849 A CN202311460849 A CN 202311460849A CN 117474676 A CN117474676 A CN 117474676A
Authority
CN
China
Prior art keywords
asset
transaction
holding
demand
transaction data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311460849.2A
Other languages
Chinese (zh)
Inventor
莫洋
蓝虎
秦波
梁作栋
黄桂鸿
张慧
卢江玮
陈自民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311460849.2A priority Critical patent/CN117474676A/en
Publication of CN117474676A publication Critical patent/CN117474676A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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

Abstract

The embodiment of the application provides a data processing method, device, equipment and medium based on a blockchain, wherein the method comprises the following steps: n asset holding objects determine asset transaction values for the resources to be transacted indicated by the asset transaction request; the asset demand object determines an asset transaction object according to asset transaction values returned by the N asset holding objects, signs an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and the asset transaction value, and sends initial transaction data obtained by the signature to the asset transaction object; the asset transaction object signs the initial transaction data to obtain transaction data to be uplink, and the transaction data to be uplink is uploaded to the blockchain node; and the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain. By implementing the embodiment of the application, the asset safety can be improved.

Description

Block chain-based data processing method, device, equipment and medium
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a blockchain-based data processing method, apparatus, device, and medium.
Background
In the current asset transaction scenario, transactions between an asset-holding object and an asset-demand object are performed based on a transaction platform, for example, the transaction platform displays the collected asset information of the asset-holding object to the asset-demand object, the asset-demand object determines whether to satisfy the own demand based on the asset information in the transaction platform, and if the own demand is satisfied, the asset transaction between the asset-demand object and the asset-holding object is completed in the transaction platform.
However, in the asset transaction manner based on the transaction platform, the transaction authority of the transaction platform is too large, and once the credibility of the transaction platform cannot be guaranteed, potential safety hazards may exist in asset transfer between an asset demand object and an asset holding object in the transaction process. Typically, asset transfer between the asset requirement object and the asset holding object is often performed through an account associated with the transaction platform; for example, the asset demand object needs to transfer the asset of the asset holding object to the account associated with the transaction platform, and then the transaction platform transfers the asset transferred by the asset demand object to the account of the asset holding object, when the transaction platform is not trusted, the number of the accounts transferred by the asset holding object may not be consistent with the number of the accounts actually transferred by the asset demand object to the transaction platform, so that the asset of the asset demand object and the asset transaction object is lost, and the security of the asset of both transaction parties is reduced.
Disclosure of Invention
The embodiment of the application provides a data processing method, device, equipment and medium based on a blockchain, which can improve the asset security in transactions.
An aspect of an embodiment of the present application provides a data processing method based on a blockchain, including:
the asset demand object sends asset transaction requests to the N asset holding objects so that the N asset holding objects determine asset transaction values for the resources to be transacted indicated by the asset transaction requests; one asset holding object corresponds to one asset transaction value; n is an integer greater than 1;
the asset demand object receives asset transaction values returned by the N asset holding objects, and determines asset transaction objects corresponding to the asset demand object from the N asset holding objects according to the asset transaction values returned by the N asset holding objects;
the asset demand object signs an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object through an object private key corresponding to the asset demand object to obtain initial transaction data, and sends the initial transaction data to the asset transaction object;
the method comprises the steps that an asset transaction object receives initial transaction data, and signs are carried out on the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uplink;
The asset transaction object uploads the transaction data to be uplinked to the blockchain node so that the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain.
An aspect of an embodiment of the present application provides a data processing method based on a blockchain, including:
the block chain link point receives the data to be uplink transaction sent by the asset transaction object;
the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain;
the method comprises the steps that transaction data to be uplink is obtained by signing initial transaction data according to an object private key corresponding to an asset transaction object; the initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset-holding objects, and the N asset-holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, wherein the asset transaction requests are initiated by asset demand objects.
An aspect of an embodiment of the present application provides a data processing method based on a blockchain, including:
the asset demand object sends asset transaction requests to the N asset holding objects so that the N asset holding objects determine asset transaction values for the resources to be transacted indicated by the asset transaction requests; one asset holding object corresponds to one asset transaction value; n is an integer greater than 1;
the asset demand object receives asset transaction values returned by the N asset holding objects, and determines asset transaction objects corresponding to the asset demand object from the N asset holding objects according to the asset transaction values returned by the N asset holding objects;
the asset demand object signs an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object through an object private key corresponding to the asset demand object to obtain initial transaction data;
the asset demand object sends initial transaction data to the asset transaction object so that the asset transaction object signs the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uplink; the transaction data to be uplinked is used for uploading to a blockchain node, and the blockchain node is used for calling a transaction settlement contract arranged in the blockchain and transferring the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object.
An aspect of an embodiment of the present application provides a data processing method based on a blockchain, including:
the method comprises the steps that an asset transaction object receives initial transaction data sent by an asset demand object, and signs the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uploaded;
the asset transaction object uploads the transaction data to be uplinked to the blockchain node so that the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain;
the initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset-holding objects, and the N asset-holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, wherein the asset transaction requests are initiated by asset demand objects.
An aspect of an embodiment of the present application provides a blockchain-based data processing apparatus, the apparatus being applied to an asset requirement object, the apparatus comprising:
The transaction request sending module is used for sending asset transaction requests to N asset holding objects so that the N asset holding objects can determine asset transaction values for resources to be transacted indicated by the asset transaction requests; one asset holding object corresponds to one asset transaction value; n is an integer greater than 1;
the transaction object determining module is used for receiving the asset transaction values returned by the N asset holding objects and determining asset transaction objects corresponding to the asset demand objects in the N asset holding objects according to the asset transaction values returned by the N asset holding objects;
the first transaction signature module is used for signing the on-chain address corresponding to the asset demand object, the on-chain address corresponding to the asset transaction object and the asset transaction value corresponding to the asset transaction object through the object private key corresponding to the asset demand object to obtain initial transaction data, and sending the initial transaction data to the asset transaction object;
the initial transaction data sending module is used for sending initial transaction data to the asset transaction object so that the asset transaction object signs the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uploaded; the transaction data to be uplinked is used for uploading to a blockchain node, and the blockchain node is used for calling a transaction settlement contract arranged in the blockchain and transferring the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object.
Wherein, the transaction request sending module includes:
an asset-holding object determining unit configured to send an asset transaction request to a content distribution platform, and determine N asset-holding objects holding resources to be transacted indicated by the asset transaction request through the content distribution platform;
and the transaction request forwarding unit is used for forwarding the asset transaction requests to the N asset holding objects through the content distribution platform.
Wherein the transaction object determination module comprises:
an object screening unit for adding an asset-holding object whose asset transaction value is less than or equal to a transaction threshold to the candidate object set; asset-holding objects in the candidate object set belong to N asset-holding objects;
the comprehensive evaluation value acquisition unit is used for acquiring the comprehensive evaluation value corresponding to the asset holding object in the candidate object set according to the transaction success rate and the credit evaluation value corresponding to the asset holding object in the candidate object set;
and the asset transaction object determining unit is used for determining the asset transaction object corresponding to the asset demand object in the candidate object set according to the comprehensive evaluation value corresponding to the asset holding object in the candidate object set.
Wherein the comprehensive evaluation value acquisition unit includes:
An evaluation index obtaining subunit, configured to obtain a transaction success rate and a credit evaluation value corresponding to the asset holding object i in the candidate object set;
an evaluation weight acquisition subunit, configured to acquire a first evaluation weight corresponding to a transaction success rate of the asset-holding object i, and acquire a second evaluation weight corresponding to a credit evaluation value of the asset-holding object i;
and the weighted summation subunit is used for determining the sum of the product between the transaction success rate of the asset-holding object i and the first evaluation weight and the product between the credit evaluation value of the asset-holding object i and the second evaluation weight as the comprehensive evaluation value corresponding to the asset-holding object i.
Wherein the asset transaction object determination unit includes:
the object sorting subunit is used for sorting the asset holding objects in the candidate object set in a descending order according to the comprehensive evaluation values corresponding to the asset holding objects in the candidate object set to obtain a sorted candidate object set;
a resource demand obtaining subunit, configured to obtain a resource demand corresponding to an asset demand object, and determine an asset holding object corresponding to a largest comprehensive evaluation value in the sorted candidate object set as a first holding object;
A first object determining subunit, configured to determine, if the resource holding amount corresponding to the first holding object is greater than or equal to the resource demand, the first holding object as an asset transaction object corresponding to the asset demand object;
a second object determining subunit, configured to determine the first holding object and the second holding object as asset transaction objects corresponding to the asset demand objects if the resource holding amount corresponding to the first holding object is less than the resource demand amount and the sum of the resource holding amounts of the resource holding amount corresponding to the first holding object and the resource holding amount corresponding to the second holding object is greater than or equal to the resource demand amount; the second holding object is an asset holding object adjacent to the first holding object in the ordered candidate object set.
In one aspect, a blockchain-based data processing device is provided, where the device is applied to an asset transaction object, and the device includes:
the second transaction signature module is used for receiving the initial transaction data sent by the asset demand object, and signing the initial transaction data through the object private key corresponding to the asset transaction object to obtain transaction data to be uplink;
the transaction data uploading module is used for uploading the transaction data to be uplinked to the blockchain node so that the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain;
The initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset-holding objects, and the N asset-holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, wherein the asset transaction requests are initiated by asset demand objects.
Wherein the second transaction signature module comprises:
a processing state acquisition unit for storing the initial transaction data into a transaction message queue in the asset transaction object, and updating the processing state of the initial transaction data according to the storage position of the initial transaction data in the transaction message queue;
the signature information acquisition unit is used for acquiring an execution time stamp corresponding to the initial transaction data and a transaction valid period corresponding to the initial transaction data if the asset transaction object detects that the processing state of the initial transaction data is updated to the execution state;
a prompt message sending unit, configured to clear initial transaction data if the execution timestamp does not belong to the transaction validity period, and send a transaction retransmission prompt message to the asset demand object;
And the transaction data signing unit is used for signing the initial transaction data through the object private key corresponding to the asset transaction object if the execution time stamp belongs to the transaction valid period, so as to obtain the transaction data to be uplink.
Wherein the transaction data signing unit comprises:
the reference transaction value determining subunit is configured to determine a reference transaction value for the resource to be transacted according to the transaction fluctuation rate corresponding to the resource to be transacted associated with the initial transaction data if the execution timestamp belongs to the transaction valid period;
the first prompt message sending subunit is used for clearing the initial transaction data and sending a transaction cancellation prompt message to the asset requirement object if the reference transaction value is larger than the asset transaction value in the initial transaction data;
and the transaction signature subunit is used for signing the initial transaction data through an object private key corresponding to the asset transaction object if the reference transaction value is smaller than or equal to the asset transaction value in the initial transaction data, so as to obtain the transaction data to be linked.
In one aspect, a data processing apparatus based on a blockchain is provided, where the apparatus is applied to a blockchain node, and the apparatus includes:
the transaction data receiving module is used for receiving the to-be-uplink transaction data sent by the asset transaction object;
The transaction settlement module is used for transferring the asset transaction value in the transaction data to be uplink from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain;
the method comprises the steps that transaction data to be uplink is obtained by signing initial transaction data according to an object private key corresponding to an asset transaction object; the initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset-holding objects, and the N asset-holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, wherein the asset transaction requests are initiated by asset demand objects.
Wherein, the transaction settlement module includes:
the validity verification unit is used for acquiring a first object public key corresponding to the asset requirement object and a second object public key corresponding to the asset transaction object, and verifying the validity of the to-be-uplink transaction data through the first object public key and the second object public key to obtain a transaction verification result;
The transaction settlement contract acquisition unit is used for acquiring a contract address carried by the transaction data to be uplink if the transaction verification result indicates that verification is passed, and determining an intelligent contract matched with the contract address in the blockchain as a transaction settlement contract corresponding to the transaction data to be uplink;
and the transaction settlement contract calling unit is used for acquiring an address white list corresponding to the transaction settlement contract, calling the transaction settlement contract and transferring the asset transaction value in the transaction data to be linked to the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object if the on-chain address corresponding to the asset demand object and the on-chain address corresponding to the asset transaction object belong to the address white list.
Wherein the validity verification unit includes:
the signature acquisition subunit is used for acquiring a first digital signature corresponding to the asset demand object carried by the transaction data to be uplink and a second digital signature corresponding to the asset transaction object;
the first decryption subunit is used for decrypting the first digital signature through the first object public key by the block link point to obtain first abstract information, and carrying out hash operation on the transaction data to be uplink according to a hash algorithm adopted by the asset demand object to obtain second abstract information;
The second decryption subunit is used for decrypting the second digital signature through the second object public key by the blockchain node to obtain third abstract information, and carrying out hash operation on the to-be-uplink transaction data according to a hash algorithm adopted by the asset transaction object to obtain fourth abstract information;
and the verification result acquisition subunit is used for determining that the transaction verification result indicates verification pass if the first abstract information is the same as the second abstract information and the third abstract information is the same as the fourth abstract information.
Wherein the transaction settlement contract invoking unit includes:
the asset acquisition subunit is used for acquiring the asset holding total amount of the on-chain address corresponding to the asset demand object if the on-chain address corresponding to the asset demand object and the on-chain address corresponding to the asset transaction object belong to an address white list;
the second prompt message sending subunit is used for sending a transaction failure prompt message to the asset requirement object if the total amount of the asset is smaller than the asset transaction value in the transaction data to be uplink;
and the asset transfer subunit is used for transferring the asset transaction value in the transaction data to be uplink from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain if the total asset holding amount is greater than or equal to the asset transaction value in the transaction data to be uplink.
An aspect of the embodiments of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program when executed by the processor causes the processor to perform the steps of the method in an aspect of the embodiments of the present application.
An aspect of the present embodiments provides a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, perform steps of a method as in an aspect of the embodiments of the present application.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in the various alternatives of the above aspect.
In the embodiment of the application, the to-be-uplink transaction data carries the digital signature of the two-shot asset requirement object and the asset transaction object, which means that the asset requirement object and the asset transaction object both recognize the transaction information in the to-be-uplink transaction data, so that the transaction matching can be completed under the blockchain. That is, in the embodiment of the present application, only the transaction that completes the matching needs to be uploaded to the blockchain, and the transaction that does not need to be uploaded to the blockchain, so that the storage pressure and the execution pressure of the blockchain can be reduced. In addition, as the asset demand object and the asset transaction object can be interacted point to point when the asset transaction is carried out, the transparency of transaction information can be improved, and the message barriers between the asset demand object and the asset transaction object can be reduced. Further, according to the embodiment of the application, the transaction settlement between the asset demand object and the asset transaction object is carried out on the blockchain without carrying out the transaction settlement through the third-party transaction platform, so that the asset of the asset demand object and the asset transaction object is prevented from being lost when the trust crisis of the third-party transaction platform, and further the asset security of both transaction parties can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a network architecture diagram provided in an embodiment of the present application;
FIG. 2 is a schematic illustration of a scenario of an asset transaction provided by an embodiment of the present application;
FIG. 3 is a timing diagram illustrating a block chain based data processing method according to an embodiment of the present application;
FIG. 4 is a timing diagram II of a data processing method based on a blockchain according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a distributed asset transaction request provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of determining an asset transaction object provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of generating transaction data to be uplinked according to an embodiment of the present application;
FIG. 8 is a schematic diagram of performing asset transfer provided by an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a block chain based data processing apparatus according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a block chain based data processing apparatus according to a second embodiment of the present disclosure;
FIG. 11 is a third schematic block chain-based data processing apparatus according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Embodiments of the present application relate to Blockchain technology (Blockchain). Blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain is essentially a decentralised database, which is a series of data blocks generated by cryptographic methods, each data block containing a batch of information of network transactions for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform may include processing modules for object management, basic services, smart contracts, and operations management. The object management module is responsible for identity information management of all blockchain participants, including maintenance of public and private key generation (account management), key management, maintenance of corresponding relation between real identities of users and blockchain addresses (authority management), etc., and under the condition of authorization, supervision and audit of transaction conditions of certain real identities, and provision of rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node devices, is used for verifying the validity of a service request, recording the service request on a storage after the effective request is identified, for a new service request, the basic service firstly analyzes interface adaptation and authenticates the interface adaptation, encrypts service information (identification management) through an identification algorithm, and transmits the encrypted service information to a shared account book (network communication) in a complete and consistent manner, and records and stores the service information; the intelligent contract module is responsible for registering and issuing contracts, triggering contracts and executing contracts, a developer can define contract logic through a certain programming language, issue the contract logic to a blockchain (contract registering), invoke keys or other event triggering execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide a function of registering contract upgrading; the operation management module is mainly responsible for deployment in the product release process, modification of configuration, contract setting, cloud adaptation and visual output of real-time states in product operation, for example: alarms, detecting network conditions, detecting node device health status, etc.
Intelligent contracts can be understood as computer programs running on a distributed ledger (i.e., blockchain) with preset rules, status, conditional responses, that can encapsulate, validate, perform distributed node complex actions, accomplish information exchange, value transfer, and asset management. Based on the distributed architecture of the blockchain, the consensus algorithm and the like, the intelligent contracts allow mutually untrusted objects to complete transactions without any third party trusted intermediaries or authorities, and meanwhile, the intelligent contracts in digital form can be flexibly embedded into various tangible or intangible assets, transactions and data to realize active or passive asset, information management and control and gradually construct programmable intelligent assets, systems and the like.
Referring to fig. 1, fig. 1 is a system architecture diagram provided in an embodiment of the present application. As shown in fig. 1, the network architecture may include an asset requirement object (e.g., asset requirement object 10 d), a plurality of asset holding objects (e.g., asset holding object 10a, asset holding object 10b, and asset holding object 10 c), a blockchain network. The embodiments of the present application do not limit the asset requirement object, asset holding object, and the number of blockchain nodes in the blockchain network. For ease of description, embodiments of the present application are illustrated with an architecture of one asset requirement object and multiple asset holding objects.
In the embodiment of the present application, the asset requirement object 10d and each asset-holding object may be in communication connection, so that the asset requirement object 10d may perform data interaction with each asset-holding object; each asset-holding object may also be communicatively coupled to a blockchain node in the blockchain network such that each asset-holding object interacts with the blockchain network. The connection mode between the devices is not limited, and may be directly or indirectly connected through a wired communication mode, may be directly or indirectly connected through a wireless communication mode, or may also be through other connection modes.
As shown in FIG. 1, the blockchain network may include blockchain nodes 20a, 20b, 20c, 20d, 20e, 20f, and so on. Wherein, each node in the block chain network is networked in a peer-to-peer network mode, and the nodes can communicate with each other according to a peer-to-peer network protocol. All nodes in the block chain network follow a broadcasting mechanism and a consensus mechanism together to ensure the non-falsifiability and non-falsifiability of data on the block chain together, and simultaneously realize the characteristics of decentralization, trust removal and the like of the block chain.
The asset requirement object 10d, each asset holding object, and the electronic devices associated with the blockchain nodes in the blockchain network may be referred to as a computer device, which may be a terminal device, or may be a server, or may be a system formed by the terminal device and the server, which is not limited in this embodiment of the present application.
The terminal device may include, but is not limited to: personal computers, smart phones, tablet computers, notebook computers, palm computers, mobile internet devices (mobile internet device, MID), wearable devices (e.g., smart watches, smart bracelets, etc.), intelligent voice interaction devices, intelligent home appliances (e.g., smart televisions, etc.), vehicle-mounted devices, aircrafts, etc., the types of the terminal devices are not limited in this embodiment.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), basic cloud computing services such as big data and artificial intelligent platforms, and the like.
For ease of understanding, the asset transaction process will be described in detail herein with respect to asset requirement object 10 d/asset holding object 10a, asset holding object 10b, asset holding object 10c, and blockchain node 20 a. Specifically, referring to fig. 2, fig. 2 is a schematic view of a scenario of an asset transaction according to an embodiment of the present application. As shown in fig. 2, when the asset demand object 10d has a trade demand for a resource to be traded, an asset trade request may be sent to the asset-holding object 10a, the asset-holding object 10b, and the asset-holding object 10c that hold the resource to be traded; after receiving the asset transaction request corresponding to the asset-holding object, each asset-holding object may determine an asset transaction value for the resource to be transacted indicated by the asset transaction request, and return the asset transaction value to the asset requirement object 10d.
After receiving the asset transaction value 1 corresponding to the asset-holding object 10a, the asset transaction value 2 corresponding to the asset-holding object 10b, and the asset transaction value 3 corresponding to the asset-holding object 10c, the asset-demand object 10d may determine the asset transaction object corresponding to the asset-demand object 10d according to the asset transaction values returned by the respective asset-holding objects. For example, the asset-holding object corresponding to the smallest asset trading value may be determined as the asset trading object corresponding to the asset requirement object 10d. Assuming that the asset trading value 3< the asset trading value 1< the asset trading value 2, the asset trading value 3 is the smallest asset trading value, then the asset holding object 10c may be determined to be the asset trading object corresponding to the asset demand object 10d.
After determining the asset transaction object (asset-holding object 10 c), the asset demand object 10d may generate transaction information from the on-chain address corresponding to the asset demand object 10d, the on-chain address corresponding to the asset-holding object 10c, and the asset transaction value corresponding to the asset-holding object 10 c. The transaction information may include information such as an on-chain address corresponding to the asset demand object 10d (e.g., on-chain address a), an on-chain address corresponding to the asset holding object 10c (e.g., on-chain address 3), an asset transaction value corresponding to the asset holding object 10c (e.g., asset transaction value 3), and so on; optionally, the transaction information may further include information such as a name of the resource to be transacted (for example, resource a), a resource demand corresponding to the asset demand object 10d, and the like. After the asset requirement object determines that the related information in the transaction information is correct, the transaction information may be signed by the object private key corresponding to the asset requirement object 10d to generate initial transaction data 21a. Accordingly, the digital signature (e.g., the first digital signature) corresponding to the asset requirement object 10d is carried in the initial transaction data 21a.
As shown in fig. 2, after obtaining the initial transaction data 21a, the asset demand object 10d may send the initial transaction data 21a to the asset holding object 10c, and after determining that the transaction information in the initial transaction data 21a is correct, the asset holding object 10c may sign the initial transaction data 21a by using the object private key corresponding to the asset holding object 10c, to obtain the transaction data 21b to be uplinked. At this time, the to-be-uplink transaction data 21b may include a digital signature (e.g., a first digital signature) corresponding to the asset requirement object 10d and a digital signature (e.g., a second digital signature) corresponding to the asset holding object 10c, which indicate that both parties to the transaction approve the transaction information in the to-be-uplink transaction data 21b, so that the transactions of both parties can be completed under the chain.
After the object to be uplinked transaction data 21b is obtained by the asset holding object 10c, the data to be uplinked transaction 21b may be uploaded to the blockchain node 20a, and accordingly, the blockchain node 20a receives the data to be uplinked transaction 21b, so as to perform signature verification on the digital signature corresponding to the object to be uplinked 10c and the digital signature corresponding to the object to be required by the asset 10d carried by the data to be uplinked transaction 21b, and a specific signature verification process will not be described herein. After the signature verification is passed, the blockchain node 20a may acquire a contract address (contract address a) carried by the transaction data 21b to be uplinked, search an intelligent contract matched with the contract address a from the intelligent contracts deployed by the blockchain, and determine the intelligent contract as a transaction settlement contract 22a corresponding to the transaction data 21b to be uplinked. Further, a transaction settlement contract 22a may be invoked to transfer the asset transaction value 3 in the to-be-uplinked transaction data 21b from the on-chain address a (on-chain address corresponding to the asset demand object 10 d) to the on-chain address 3 (on-chain address corresponding to the asset holding object 10 c), thereby completing the transaction settlement between the asset demand object 10d and the asset holding object 10 c. After settlement is completed, the transaction settlement contract 22a can generate asset settlement information, which can include information such as transaction time, transaction credentials (for querying asset settlement information), asset transfer amount, asset transfer-in address, and asset transfer-out address, as shown in fig. 2, with the asset demand object 10d and the asset holding object 10 c.
In the embodiment of the application, the transaction settlement between the asset demand object and the asset transaction object is carried out on the blockchain without carrying out the transaction settlement through a third party transaction platform, so that the asset of the asset demand object and the asset transaction object is prevented from being lost when the third party transaction platform has a trust crisis, and the asset security of both transaction parties can be improved.
The block chain based data processing method according to the embodiment of the present application is described in detail below. Specifically, referring to fig. 3, fig. 3 is a timing diagram of a data processing method based on a blockchain according to an embodiment of the present application. It will be appreciated that the blockchain-based data processing method may be performed by an asset requirement object, an asset transaction object, and a blockchain point interaction, wherein the asset requirement object may be an asset requirement object 10d, the asset transaction object may be an asset holding object 10a or an asset holding object 10c in the network architecture shown in fig. 1, and the blockchain node may be a blockchain node 20a in the network architecture shown in fig. 1. As shown in fig. 3, the blockchain-based data processing method may include the following steps S101 to S107:
Step S101: an asset transaction request is sent to the N asset-holding objects to cause the N asset-holding objects to determine an asset transaction value for the resource to be transacted indicated by the asset transaction request.
The resource to be traded refers to an asset that the asset demand object wishes to acquire from the asset holding object, and may include, but is not limited to: digital assets, real estate, mineral products, merchandise, shares, foreign exchange, copyright, gold, ancient games, and the like. Asset requirement objects refer to objects that require the asset to be traded (purchased or rented); asset-holding objects refer to objects that hold assets; for example, in a foreign exchange trading market, an asset requirement object may refer to a trader and an asset holding object may refer to a market maker. N is an integer greater than 1, and the specific value of N can be 2,3,4,5 and … ….
The asset transaction request may refer to a transaction inquiry instruction issued by an asset demand object to an asset holding object requesting a return of an asset transaction value for the resource to be transacted. The asset transaction value may refer to a transaction price of the asset holding object determined for the resource to be transacted, and may be a unit price or a total price, which may be specifically determined according to an actual situation. The asset transaction request may include information such as identification information of the asset requirement object, description information of the resource to be transacted (e.g., type, specification, quantity, etc. required for the resource to be transacted), an interval of quotes acceptable by the asset requirement object, a transaction style, a request generation time stamp, a request expiration date, etc.
Specifically, when an asset-holding object has a trade requirement of a resource to be traded, an asset trade request may be sent to N asset-holding objects holding the resource to be traded; after receiving the asset transaction request corresponding to the asset-holding object, each asset-holding object may acquire the to-be-transacted resource and the resource demand (the number required by the to-be-transacted resource) in the asset transaction request, further determine the asset transaction value corresponding to the to-be-transacted resource for the asset-demand object according to the historical transaction information (for example, the historical transaction amount, the historical transaction value, etc.) corresponding to the to-be-transacted resource and the resource demand, and return the asset transaction value to the asset-demand object. In embodiments of the present application, each asset-holding object may generate an asset transaction value, that is, one asset-holding object corresponds to one asset transaction value.
Step S102: and receiving the asset transaction values returned by the N asset-holding objects, and determining the asset transaction object corresponding to the asset demand object in the N asset-holding objects according to the asset transaction values returned by the N asset-holding objects.
The asset transaction object may refer to an asset-holding object for which the asset demand object wishes to ultimately conduct an asset transaction, and the number of asset transaction objects may be one or more, which is not limited in this embodiment of the application.
The asset transaction object may be determined from asset transaction values returned by the N asset-holding objects. For example, after the asset demand object receives the asset transaction values returned by the N asset holding objects, the N asset demand objects may be sorted in ascending order according to the N asset transaction values, and then the asset holding object corresponding to the smallest asset transaction value may be determined as the asset transaction object corresponding to the asset demand object.
Further, the asset-holding object may also be determined according to the resource demand amount corresponding to the asset demand object and the resource holding amount corresponding to each asset-holding object (the number of assets to be transacted held by the asset-holding object). For convenience of description, the asset-holding object corresponding to the smallest asset transaction value is referred to as a third-holding object, and the asset-holding object whose asset transaction value is next to the third-holding object is referred to as a fourth-holding object. The resource holding amount corresponding to the third holding object may be compared with the resource demand amount corresponding to the asset demand object, and if the resource holding amount corresponding to the third holding object is greater than or equal to the resource demand amount corresponding to the asset demand object, the third holding object is determined to be the asset transaction object corresponding to the asset demand object.
And if the resource holding amount corresponding to the third holding object is smaller than the resource demand amount corresponding to the asset demand object, comparing the resource holding sum of the resource holding amount corresponding to the third holding object and the resource holding amount corresponding to the fourth holding object with the resource demand amount corresponding to the asset demand object, and if the resource holding sum is greater than or equal to the resource demand amount, determining the third holding object and the fourth holding object as asset transaction objects corresponding to the asset demand object. If the resource holding sum is less than the resource demand, then continuing to determine a plurality of asset transaction objects from the N asset holding objects in the manner described above.
Step S103: and signing the on-chain address corresponding to the asset demand object, the on-chain address corresponding to the asset transaction object and the asset transaction value corresponding to the asset transaction object through the object private key corresponding to the asset demand object to obtain initial transaction data, and sending the initial transaction data to the asset transaction object.
The initial transaction data comprises an on-chain address corresponding to the asset requirement object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object. That is, in the asset transaction scenario of the embodiments of the present application, the asset requirement object may be designated as a acquirer (Maker), while the asset requirement object designates the asset transaction object as an acquirer (Maker) for transactions.
Specifically, after the asset demand object determines the asset transaction object, the on-chain address corresponding to the asset transaction object may be queried in the blockchain according to the identification information of the asset transaction object, and transaction information may be generated according to the on-chain address corresponding to the asset demand object, the on-chain address corresponding to the asset transaction object, and the asset transaction value corresponding to the asset transaction object. Optionally, the transaction information may further include information such as description information of the resource to be transacted, transaction mode, and transaction expiration date. After the asset requirement object determines that the related information in the transaction information is correct, the transaction information can be signed by an object private key corresponding to the asset requirement object, so that initial transaction data can be generated. It will be appreciated that the initial transaction data carries a digital signature of the asset requirement object, and thus, the initial transaction data is prevented from being tampered with during transmission, and the integrity of the initial transaction data is ensured.
Step S104: initial transaction data is sent.
The asset requirement object, after obtaining the initial transaction data, may send the initial transaction data to the asset transaction object, which in turn receives the initial transaction data.
Step S105: and receiving the initial transaction data, and signing the initial transaction data through an object private key corresponding to the asset transaction object to obtain the transaction data to be uplink.
After the asset transaction object receives the initial transaction data sent by the asset demand object, the initial transaction data can be checked by an object public key corresponding to the asset demand object, and if the check passes, the fact that the initial transaction data is not tampered in the transmission process is indicated. In this case, the initial transaction data may be signed by the object private key corresponding to the asset transaction object to obtain the transaction data to be linked up, thereby completing the under-link matching of the transaction. The specific signature verification process may refer to the description of step S212 in fig. 4, and will not be described herein.
Step S106: uploading transaction data to be uplinked.
After the asset transaction object obtains the transaction data to be uplink, the transaction data to be uplink can be uploaded to the blockchain node, and accordingly, the blockchain node receives the transaction data to be uplink.
In the embodiment of the application, the to-be-uplink transaction data carries the digital signature of the two-shot asset requirement object and the asset transaction object, which means that the asset requirement object and the asset transaction object both recognize the transaction information in the to-be-uplink transaction data, so that the transaction matching can be completed under the blockchain. That is, in the embodiment of the present application, only the transaction that completes the matching needs to be uploaded to the blockchain, and the transaction that does not need to be uploaded to the blockchain, so that the storage pressure and the execution pressure of the blockchain can be reduced.
Step S107: and transferring the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain.
The trade settlement contracts may refer to intelligent contracts deployed in blockchains for asset transfer for asset demand objects and asset trade objects. It will be appreciated that the invocation of the transaction settlement contract may be made after the transaction settlement contract is completed in the blockchain deployment.
In embodiments of the present application, the transaction settlement contract may be deployed by one or more of the N asset-holding objects. For example, the asset-holding object a of the N asset-holding objects may upload contract transaction data associated with the transaction settlement contract to the blockchain node, and the blockchain node may refer to the following description in the specific signature verification process of the contract transaction data, which is not described herein. Contract transaction data may include, but is not limited to, asset transfer execution logic, transaction style (single-pass or staged-pass), event notification parameters (which objects have access to transaction settlement results), contract addresses, and the like.
When the contract transaction data passes the signature verification, the contract transaction data is indicated to be not tampered in the transmission process. The blockchain node may then encapsulate the contract transaction data into a contract transaction block. Further, the contract transaction block may be broadcast, so that the contract transaction block may be received by all the consensus nodes in the blockchain network, and the received contract transaction block may be subjected to consensus processing by the consensus nodes in the blockchain network through a consensus algorithm. After the contract transaction block passes the consensus, the block height of the contract transaction block can be updated according to the maximum block height in the blockchain stored by the blockchain node, and the updated contract transaction block is stored in a local database of the blockchain node. At this time, the deployment process of the transaction settlement contract is completed in the blockchain, the status of the transaction settlement contract may be determined as the release success status, and the blockchain node may return the contract address corresponding to the transaction settlement contract to the asset holding object. Among other things, consensus algorithms may include, but are not limited to: the working of works (PoW) algorithm, the Proof of rights (PoS) algorithm, the DPoS algorithm, the practical bayer fault tolerance (Practical Byzantine Fault tolerance, PBFt) algorithm, and the like are consensus algorithms, and the embodiments of the present application are not limited thereto.
Specifically, after receiving the transaction data to be uplinked, the blockchain node may perform signature verification on a digital signature corresponding to the asset transaction object and a digital signature corresponding to the asset requirement object carried by the transaction data to be uplinked, and a specific signature verification process will be described below, which will not be described in detail herein. After the signature verification passes, a transaction settlement contract deployed in the blockchain can be called, the transaction settlement contract takes an on-chain address corresponding to an asset demand object in transaction data to be uplinked as an asset transfer-out address, takes the on-chain address corresponding to the asset transaction object in the transaction data to be uplinked as an asset transfer-in address, takes an asset transaction value in the transaction data to be uplinked as an asset transfer quantity, and transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object, so that asset transfer of the asset demand object and the asset transaction object is realized on the chain.
In the embodiment of the application, the to-be-uplink transaction data carries the digital signature of the two-shot asset requirement object and the asset transaction object, which means that the asset requirement object and the asset transaction object both recognize the transaction information in the to-be-uplink transaction data, so that the transaction matching can be completed under the blockchain. That is, in the embodiment of the present application, only the transaction that completes the matching needs to be uploaded to the blockchain, and the transaction that does not need to be uploaded to the blockchain, so that the storage pressure and the execution pressure of the blockchain can be reduced. In addition, as the asset demand object and the asset transaction object can be interacted point to point when the asset transaction is carried out, the transparency of transaction information can be improved, and the message barriers between the asset demand object and the asset transaction object can be reduced. Further, according to the embodiment of the application, the transaction settlement between the asset demand object and the asset transaction object is carried out on the blockchain without carrying out the transaction settlement through the third-party transaction platform, so that the asset of the asset demand object and the asset transaction object is prevented from being lost when the trust crisis of the third-party transaction platform, and further the asset security of both transaction parties can be improved.
Referring to fig. 4, fig. 4 is a timing diagram of a block chain-based data processing method according to an embodiment of the present application. It will be appreciated that the blockchain-based data processing method may be performed by an asset requirement object, an asset transaction object, and a blockchain point interaction, wherein the asset requirement object may be an asset requirement object 10d, the asset transaction object may be an asset holding object 10a or an asset holding object 10c in the network architecture shown in fig. 1, and the blockchain node may be a blockchain node 20a in the network architecture shown in fig. 1. As shown in fig. 4, the blockchain-based data processing method may include the following steps S201 to S214:
s201: an asset transaction request is sent to the N asset-holding objects to cause the N asset-holding objects to determine an asset transaction value for the resource to be transacted indicated by the asset transaction request.
It will be appreciated that, due to the existence of the information barrier, the asset-required objects may not be aware of which asset-holding objects hold the resource to be traded in particular, resulting in only a single point of contact with a small number of asset-holding objects to trade each time a trade requirement exists. Because the asset-holding objects that the asset-requiring objects interact with directly are limited, the asset-trading values that the asset-holding objects can provide are limited, and therefore, it may be difficult for the asset-requiring objects to screen out the final-trade asset-trading objects from the limited asset-holding objects according to the limited asset-trading values, thereby resulting in a decrease in the trade success rate.
In the embodiment of the application, the asset transaction request can be distributed to a sufficient number of asset holding objects through the content distribution platform, so that the transaction success rate can be improved. Specifically, referring to fig. 5, fig. 5 is a schematic diagram of a request for distributing an asset transaction according to an embodiment of the present application. As shown in fig. 5, the content distribution platform 10e may collect resource information for a plurality of asset-holding objects, be responsible for forwarding asset transaction requests for asset demand objects 10d, and collect asset transaction values returned by the plurality of asset-holding objects. The content distribution platform 10e may be a service platform independent of the asset requirement object 10d, or may be a service platform integrated in the asset requirement object 10d, which is not limited in the embodiment of the present application.
As shown in fig. 5, after generating the asset transaction request, the asset demand object 10d may send the asset transaction request to the content distribution platform 10e, and the content distribution platform 10e may quickly find N asset-holding objects (e.g., the asset-holding object 10a and the asset-holding object 10 c) holding the resource to be transacted indicated by the asset transaction request from among the plurality of asset-holding objects; and further, the asset transaction request is forwarded to the asset holding object 10a and the asset holding object 10c, so that enough asset holding objects can receive the asset transaction request of the asset demand object, and further, the transaction success rate can be improved.
Further, the asset-holding object 10a, after receiving the asset transaction request, may determine an asset transaction value (asset transaction value 1) for the resource to be transacted indicated by the asset transaction request, and send the asset transaction value 1 to the content distribution platform 10e; similarly, the asset-holding object 10c, upon receiving the asset transaction request, may send the asset transaction value 3 (the asset transaction value corresponding to the asset-holding object 10 c) to the content distribution platform 10e. Alternatively, the content distribution platform 10e may send the asset transaction value 1 and the on-chain address 1 (the on-chain address corresponding to the asset-holding object 10 a), and the asset transaction value 3 and the on-chain address 3 (the on-chain address corresponding to the asset-holding object 10 c), by the asset demand object 10d, to the content distribution platform 10e to determine the asset transaction object that is to be finally transacted.
In the embodiment of the present application, the content distribution platform 10e only plays roles of forwarding an asset transaction request and collecting an asset transaction value, does not sense a hanging party and a eating party, and does not participate in actual transaction matching, so that an asset demand object and an asset transaction object still interact point-to-point, no information difference exists between the two parties of the transaction, and the transparency of transaction information between the two parties of the transaction can still be ensured.
As shown in fig. 5, the content distribution platform 10e may also determine an asset transaction object for the asset demand object 10d based on the asset transaction values returned by the individual asset holding objects. The determination of the asset transaction object may be referred to in the foregoing and the following descriptions, and will not be described in detail herein. For example, the asset-holding object corresponding to the smallest asset trading value may be determined as the asset trading object corresponding to the asset requirement object 10d. Assuming that the asset trading value 3 is less than the asset trading value 1, at this time, the asset holding object 10c may be determined as the asset trading object corresponding to the asset demand object 10d, and the asset trading value 3 and the on-chain address 3 may be returned to the asset demand object 10d. When the asset demand object 10d confirms that the asset transaction value 3 satisfies the expected condition, the on-chain address, the asset transaction value 3, and the on-chain address 3 corresponding to the asset demand object 10d may be signed by the object private key corresponding to the asset demand object 10d, generating initial transaction data. In the embodiment of the present application, the asset requirement object 10d does not need to screen the asset-holding object from a plurality of asset-holding objects, and thus the data processing pressure of the asset requirement object 10d can be reduced.
Further, the asset requirement object 10d may send the initial transaction data to the asset holding object 10c (asset transaction object). The asset requirement object 10d may send the initial transaction data to the asset holding object 10c via the content distribution platform 10e, or may send the initial transaction data directly to the asset holding object 10 c. After determining that the transaction information in the initial transaction data is correct, the asset-holding object 10c may sign the initial transaction data by using an object private key corresponding to the asset-holding object 10c, generate transaction data to be uplink, and upload the transaction data to be uplink to the blockchain node 20a, where the blockchain node 20a completes transaction settlement between the asset demand object 10d and the asset-holding object 10 c.
Step S202: an asset-holding object having an asset transaction value less than or equal to a transaction threshold is added to the candidate set of objects.
After receiving the asset transaction values corresponding to the N asset-holding objects, the asset demand object may determine the asset transaction object according to the asset transaction values corresponding to the N asset-holding objects. Specifically, referring to fig. 6, fig. 6 is a schematic diagram of determining an asset transaction object according to an embodiment of the present application. As shown in fig. 6, N asset-holding objects are asset-holding object 1, asset-holding object 2, asset-holding object 3, and asset-holding object 4, respectively. Wherein, the asset transaction value corresponding to the asset holding object 1 is 820, the asset transaction value corresponding to the asset holding object 2 is 850, the asset transaction value corresponding to the asset holding object 3 is 800, and the asset transaction value corresponding to the asset holding object 2 is 900. The asset requirement object may add the asset holding object 1, the asset holding object 2, the asset holding object 3, and the asset holding object 4 to the initial object set 30a, and may further perform preliminary screening on each asset holding object according to the transaction threshold to obtain the candidate object set 30b.
The transaction threshold may refer to the highest asset transaction value that the asset requirement object is capable of accepting. For ease of description, the embodiments of the present application will be described with respect to a transaction threshold of 850. As shown in fig. 5, asset transaction values corresponding to asset-holding object 1, asset-holding object 2, and asset-holding object 3 are less than or equal to the transaction threshold, and thus asset-holding object 1, asset-holding object 2, and asset-holding object 3 may be added to candidate object set 30b. That is, the asset-holding objects in the candidate object set 30b are asset-holding objects having asset-holding values less than or equal to the transaction threshold value, among the asset-holding object 1, the asset-holding object 2, the asset-holding object 3, and the asset-holding object 4.
Step S203: and acquiring the comprehensive evaluation value corresponding to the asset holding object in the candidate object set according to the transaction success rate and the credit evaluation value corresponding to the asset holding object in the candidate object set.
In the embodiment of the application, the asset transaction object can be determined according to the comprehensive evaluation value corresponding to the asset holding object in the candidate object set. The comprehensive evaluation value can comprehensively evaluate the credit and the transaction rate of the asset holding object, and the comprehensive evaluation value can be determined according to the transaction success rate and the credit evaluation value; the transaction success rate refers to the proportion of the asset holding object to complete the asset transaction in a certain time; the higher the transaction success rate, the more approved the asset holding object is. The credit rating value is an evaluation of the reputation of the asset-holding object, and the higher the credit rating value, the higher the reputation of the asset-holding object. For convenience of description, the embodiment of the application will take the asset-holding object i in the candidate object set as an example, and describe the determination process of the comprehensive evaluation value. Alternatively, the transaction success rate and the credit evaluation value corresponding to the asset-holding object in the candidate object set may be obtained, and then the transaction success rate and the credit evaluation value are added to obtain the comprehensive evaluation value corresponding to the asset-holding object, for example, the transaction success rate corresponding to the asset-holding object i in the candidate object set is 90% (for facilitating the calculation, 90% is used for performing the calculation instead of 90%) and the credit evaluation value 90, and then the comprehensive evaluation value corresponding to the asset-holding object i may be 180.
Optionally, the transaction success rate and the credit evaluation value corresponding to the asset-holding object in the candidate object set may be weighted and summed to obtain a comprehensive evaluation value corresponding to the asset-holding object in the candidate object set. For example, the asset requirement object may obtain a transaction success rate and a credit assessment value corresponding to the asset-holding object i; acquiring a first evaluation weight corresponding to the transaction success rate of the asset holding object i and acquiring a second evaluation weight corresponding to the credit evaluation value of the asset holding object i; the first evaluation weight and the second evaluation weight are preset weight parameters, and specific values of the first evaluation weight and the second evaluation weight can be set according to actual conditions. Further, a sum of a product between the transaction success rate of the asset-holding object i and the first evaluation weight and a product between the credit evaluation value of the asset-holding object i and the second evaluation weight is determined as a comprehensive evaluation value corresponding to the asset-holding object i.
For example, the transaction success rate corresponding to the asset-holding object i is 90% (for the sake of calculation, 90 is used instead of 90%, the credit evaluation value corresponding to the asset-holding object i is 95, the first evaluation weight is 0.6, the second evaluation weight is 0.4, and the sum of the product between the transaction success rate and the first evaluation weight of the asset-holding object i and the product between the credit evaluation value and the second evaluation weight of the asset-holding object i is 92, so the overall evaluation value corresponding to the asset-holding object i may be 92.
As shown in fig. 6, by weighted summation of the transaction success rate and the credit evaluation value corresponding to the asset-holding object in the candidate object set 30b, it can be determined that the comprehensive evaluation value corresponding to the asset-holding object 1 in the candidate object set 30b is 95, the comprehensive evaluation value corresponding to the asset-holding object 2 is 90, and the comprehensive evaluation value corresponding to the asset-holding object 3 is 98.
Step S204: and determining an asset transaction object corresponding to the asset demand object in the candidate object set according to the comprehensive evaluation value corresponding to the asset holding object in the candidate object set.
As shown in fig. 6, the asset-holding objects in the candidate object set 30b may be sorted in a descending order according to the comprehensive evaluation values corresponding to the asset-holding objects in the candidate object set 30b, to obtain a sorted candidate object set 30c; the order of asset-holding objects in the ordered candidate set 30c is { asset-holding object 3, asset-holding object 1, asset-holding object 2}.
For convenience of description, the asset-holding object corresponding to the largest comprehensive evaluation value in the sorted candidate object set 30c may be determined as the first holding object, and the asset-holding object adjacent to the first holding object in the sorted candidate object set 30c may be determined as the second holding object, that is, the second holding object is the asset-holding object of which the comprehensive evaluation value in the sorted candidate object set 30c is next to the first holding object. As shown in fig. 6, the first holding object may be an asset holding object 3, and the second holding object may be an asset holding object 1.
Further, the resource demand corresponding to the asset demand object may be obtained, the resource holding amount corresponding to the asset holding object 3 may be compared with the resource demand corresponding to the asset demand object, and if the resource holding amount corresponding to the asset holding object 3 is greater than or equal to the resource demand, the asset holding object 3 is determined to be the asset transaction object corresponding to the asset demand object. For example, the resource demand corresponding to the asset demand object is 1000, the resource holding amount corresponding to the asset holding object 3 is 1200, and at this time, the asset holding object 3 may be determined as the asset transaction object corresponding to the asset demand object.
As shown in fig. 6, the resource demand corresponding to the asset demand object is 1000, the resource holding amount corresponding to the asset holding object 3 is 600, and the resource holding amount corresponding to the asset holding object 3 is smaller than the resource demand. In this case, the resource holding amount corresponding to the asset holding object 3 and the resource holding total amount of the resource holding amount corresponding to the asset holding object 1 may be compared with the resource demand amount corresponding to the asset demand object, and if the resource holding total amount of the two is equal to or greater than the resource demand amount, the asset holding object 3 and the asset holding object 2 may be determined as the asset transaction object corresponding to the asset demand object. As shown in fig. 6, the sum of the resource holding amounts corresponding to the asset-holding object 3 and the asset-holding amount corresponding to the asset-holding object 1 can be calculated as 1100; accordingly, the sum of the resource holding amounts of both is greater than or equal to the resource demand amount, and the asset-holding object 3 and the asset-holding object 2 can be determined as asset transaction objects corresponding to the asset demand objects.
Step S205: and signing the on-chain address corresponding to the asset demand object, the on-chain address corresponding to the asset transaction object and the asset transaction value corresponding to the asset transaction object through the object private key corresponding to the asset demand object to obtain initial transaction data, and sending the initial transaction data to the asset transaction object.
The specific implementation process of step S205 may refer to the description of step S103 shown in fig. 3, and will not be described herein.
Step S206: initial transaction data is sent.
Step S207: receiving the initial transaction data, storing the initial transaction data into a transaction message queue in the asset transaction object, and updating the processing state of the initial transaction data according to the storage position of the initial transaction data in the transaction message queue.
Referring to fig. 7, fig. 7 is a schematic diagram of generating transaction data to be uplink according to an embodiment of the present application. As shown in fig. 7, the asset requirement object 10d, after obtaining the initial transaction data 21a, may send the initial transaction data 21a to the asset transaction object 10c. After receiving the initial transaction data 21a, the asset transaction object 10c may store the initial transaction data 21a to a transaction message queue in the asset transaction object 10c. For example, the transaction message queue in the asset transaction object 10c includes 6 storage locations, 0, 1, 2, 3, 4, 5, respectively. The storage position corresponding to "5" is the end of the transaction message queue, the storage position corresponding to "0" is the head of the transaction message queue, the processing state of the transaction data corresponding to the storage position at "0" is the execution state, and when the processing state of the transaction data is updated to the execution state, the transaction data can be cleared from the transaction message queue (the process may also be referred to as dequeuing).
As shown in fig. 7, when the asset transaction object 10c receives the initial transaction data 21a, the initial transaction data 21a may be inserted into the end of the transaction message queue, i.e., the initial transaction data 21a is stored to the storage location corresponding to "5" in the transaction message queue. The asset transaction object 10c may sequentially process the transaction data contained in the transaction message queue and clear the transaction data whose processing status is updated to the execution status from the transaction message queue. Thus, the storage location of the initial transaction data 21a will move forward in the transaction message queue over time. The processing state of the initial transaction data 21a is the unexecuted state when the initial transaction data 21a is in a storage location other than "0", and the processing state of the initial transaction data 21a is the unexecuted state when the initial transaction data 21a is in a storage location of "0".
Step S208: if the asset transaction object detects that the processing state of the initial transaction data is updated to be the execution state, the execution time stamp corresponding to the initial transaction data and the transaction valid period corresponding to the initial transaction data are acquired.
Step S209: and if the execution time stamp does not belong to the transaction valid period, clearing the initial transaction data, and sending a transaction retransmission prompt message to the asset requirement object.
As shown in fig. 7, when the asset transaction object 10c detects that the processing state of the initial transaction data 21a is updated to the execution state, the execution time stamp corresponding to the initial transaction data 21a and the transaction expiration date corresponding to the initial transaction data 21a may be acquired. The execution time stamp corresponding to the initial transaction data 21a may refer to a time stamp when the processing state of the initial transaction data 21a is updated to the execution state; the transaction validity period corresponding to the initial transaction data 21a refers to a period of time during which the initial transaction data 21a remains valid and available.
The asset transaction object 10c may determine whether the execution time stamp corresponding to the initial transaction data 21a belongs to the transaction validity period corresponding to the initial transaction data 21a, and if the execution time stamp does not belong to the transaction validity period, clear the initial transaction data 21a from the asset transaction object 10c, and send a transaction retransmission prompt message to the asset demand object 10d to instruct the asset demand object 10d to retransmit the initial transaction data.
Step S210: and if the execution time stamp belongs to the transaction valid period, signing the initial transaction data through an object private key corresponding to the asset transaction object to obtain the transaction data to be uplink.
If the execution timestamp belongs to the transaction validity period, an object private key corresponding to the asset transaction object 10c may be obtained, and the initial transaction data 21a is signed by the object private key corresponding to the asset transaction object 10c, so as to obtain the transaction data to be linked.
Since the asset transaction object 10c has a time difference between transmitting the asset transaction value corresponding to the resource to be transacted to the asset demand object 10d and receiving the initial transaction data 21a, the asset transaction object 10c may have a difference in the asset transaction value determined for the resource to be transacted when receiving the initial transaction data 21 a. In this embodiment of the present application, if the execution timestamp belongs to the transaction validity period, a reference transaction value may be determined for the resource to be transacted according to the transaction fluctuation rate corresponding to the resource to be transacted associated with the initial transaction data 21a, and by comparing the reference transaction value with the asset transaction value in the initial transaction data, it is further determined whether to transact the asset with the asset demand object 10 d. The trade volatility can be an indicator of how fluctuating the asset trading value of the resource to be traded is. For example, the asset transaction value in the initial transaction data is 800 and the transaction volatility is 2%, then the reference transaction value may be 816; the asset trading value in the initial trading data is 800 and the trading volatility is-1%, then the reference trading value may be 792.
As shown in fig. 7, the asset transaction object 10c may determine whether the reference transaction value is greater than the asset transaction value in the initial transaction data, and if the reference transaction value is greater than the asset transaction value in the initial transaction data, it indicates that the asset transaction object 10c may transact at a higher asset transaction value, at which time the asset transaction object 10c may clear the initial transaction data and send a transaction cancellation prompt message to the asset demand object 10d to prompt the asset demand object 10d to cancel the transaction. If the reference transaction value is less than or equal to the asset transaction value in the initial transaction data, the asset transaction object 10c is indicated to be unable to transact with a higher asset transaction value, and at this time, the initial transaction data can be signed by the object private key corresponding to the asset transaction object to obtain the transaction data to be uplink, so as to complete the under-link matching of the transaction.
In the embodiment of the application, since the initial transaction data only includes the digital signature corresponding to the asset requirement object and does not include the digital signature corresponding to the asset transaction object, when the asset transaction object does not sign the initial transaction data, the transaction is still in an unmatched state. That is, in the embodiment of the present application, when the asset transaction object receives the initial transaction data, if it is determined that the asset transaction value in the initial transaction data does not satisfy the transaction condition (for example, the asset transaction value in the initial transaction data is smaller than the reference transaction value), the asset transaction with the asset demand object may be canceled, so that the business risk of the asset transaction object may be reduced.
Step S211: uploading transaction data to be uplinked.
Step S212: and receiving the transaction data to be uplinked, acquiring a first object public key corresponding to the asset requirement object and a second object public key corresponding to the asset transaction object, and carrying out validity verification on the transaction data to be uplinked through the first object public key and the second object public key to obtain a transaction verification result.
Referring to fig. 8, fig. 8 is a schematic diagram of performing asset transfer according to an embodiment of the present application. As shown in fig. 8, after generating the to-be-uplinked transaction data, the asset transaction object 10c may upload the to-be-uplinked transaction data to the blockchain node 20a, and accordingly, the blockchain node 20a receives the to-be-uplinked transaction data transmitted by the asset transaction object 10 c. After the blockchain node 20a receives the transaction data to be uplink, the validity of the transaction data to be uplink can be verified, and a transaction verification result is obtained.
In one possible implementation, the validation may include a verification process. Specifically, the blockchain node 20a may acquire a first object public key corresponding to the asset requirement object and a second object public key corresponding to the asset transaction object, so as to acquire a first digital signature corresponding to the asset requirement object and a second digital signature corresponding to the asset transaction object carried by the to-be-uplink transaction data; decrypting the first digital signature through the first object public key to obtain first abstract information, and carrying out hash operation on the transaction data to be uplinked according to a hash algorithm adopted by the asset demand object (which is consistent with the hash algorithm adopted when the first digital signature is generated) to obtain second abstract information. Similarly, the blockchain node 20a decrypts the second digital signature with the second object public key to obtain third digest information, and hashes the uplink transaction data according to a hash algorithm (consistent with a hash algorithm used when generating the second digital signature) used by the asset transaction object to obtain fourth digest information.
The hash algorithms adopted by the asset requirement object and the asset transaction object may be the same or different, which is not limited in the embodiment of the present application. The hash algorithm may specifically include, but is not limited to, SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.
Further, the first abstract information and the second abstract information can be compared, the third abstract information and the fourth abstract information can be compared, and a transaction verification result is determined according to the comparison result. For example, if the first summary information is the same as the second summary information and the third summary information is the same as the fourth summary information, it indicates that the digital signatures of both parties of the transaction carried in the data to be uplink transaction are valid, that is, the data to be uplink transaction is not tampered in the transmission process, and at this time, it can be determined that the transaction verification result corresponding to the data to be uplink transaction is verification passing.
If the first summary information is different from the second summary information or the third summary information is different from the fourth summary information, the digital signature of at least one party of the transaction double-sending in the to-be-uplink transaction data is invalid, and the to-be-uplink transaction data may be tampered in the transmission process, in this case, it may be determined that the transaction verification result corresponding to the to-be-uplink transaction data is verification failure. As shown in fig. 8, when the transaction verification result corresponding to the transaction data to be uplinked indicates that verification is not passed, the blockchain node 20a may send a transaction retransmission prompt message to the asset transaction object 10c to instruct the asset transaction object 10c to retransmit the transaction data to be uplinked.
Optionally, the random number and the random proof information can be verified through verification carried in the transaction data to be uplink, and validity verification is carried out on the transaction data to be uplink. Wherein the random verification information may be random data generated by an asset requirement object or an asset transaction object; the random attestation information may be random data generated by an asset requirement object or an asset transaction object to attest to the randomness of the verifiable random number.
Specifically, the transaction data to be uplink may further include verifiable random number 1 and random attestation information 1 corresponding to the asset requirement object, and verifiable random number 2 and random attestation information 2 corresponding to the asset transaction object. The asset transaction object and the asset requirement object may run a verifiable random function (Verifiable Random Function, VRF) with their own object private key as input, generating verifiable random numbers and random attestation information.
For example, the on-chain address (on-chain address a) corresponding to the asset requirement object and the object private key (object private key a) corresponding to the asset requirement object may be used as inputs of a verifiable random function, a verifiable random number 1 corresponding to the asset requirement object is generated through vrf_hash (object private key a, on-chain address a), and random Proof data 1 corresponding to the asset requirement object is generated through vrf_proof (object private key a, on-chain address a); similarly, the on-chain address (on-chain address 3) corresponding to the asset transaction object and the object private key (object private key 3) corresponding to the asset transaction object may be used as inputs of a verifiable random function, a verifiable random number 2 corresponding to the asset transaction object is generated through vrf_hash (object private key 3, on-chain address 3), and random Proof data 2 corresponding to the asset transaction object is generated through vrf_proof (object private key 3, on-chain address 3). Wherein vrf_hash () is used to represent a function for generating a verifiable random number in a verifiable random function, and vrf_proof () is used to represent a function for generating random Proof information in a verifiable random function.
After receiving the transaction data to be uplink, the blockchain node 20a may generate a result 1 to be verified corresponding to the random certification information 1 according to a hash algorithm, and generate a result 2 to be verified corresponding to the random certification information 2, and may also perform traversal query on blockchain data (i.e. blockchain) in the blockchain network according to an on-chain address (on-chain address a) corresponding to the asset requirement object and an on-chain address (on-chain address 3) corresponding to the asset transaction object, if the blockchain node detects that the result 1 to be verified is the same as the verifiable random number 1, the result 2 to be verified is the same as the verifiable random number 2, and the blockchain data includes the on-chain address a and the on-chain address 3, then the transaction verification result corresponding to the transaction data to be uplink is verification passing.
If the blockchain node 20a detects that the to-be-verified result 1 is different from the verifiable random number 1, the to-be-verified result 2 is different from the verifiable random number 2, or the blockchain data does not include the on-chain address a and the on-chain address 3, the transaction verification result corresponding to the to-be-uplink transaction data is that verification is failed. In other words, when the blockchain node 20a detects that the to-be-verified result 1 is the same as the verifiable random number 1, it means that the verifiable random number 1 is correct, that is, in the process that the blockchain node 20a performs correctness verification on the verifiable random number 1, the random verification information 1 can be generated by the address a on the chain, the verifiable random number 1 can be obtained by calculation through the random verification information 1, and further, it can be deduced that the verifiable random number 1 and the address a on the chain are mutually matched, so that the verification result of the verifiable random number 1 is determined to be correct. If the blockchain node 20a detects that the to-be-verified result 1 is different from the verifiable random number 1, the verifiable random number 1 cannot be obtained through calculation of the random certification information 1, which indicates that the verifiable random number 1 is wrong. Similarly, the same method may be employed to determine the correctness of the verifiable random number 2.
Step S213: if the transaction verification result indicates that verification is passed, a contract address carried by the transaction data to be uplinked is obtained, and an intelligent contract matched with the contract address in the blockchain is determined to be a transaction settlement contract corresponding to the transaction data to be uplinked.
As shown in fig. 8, when the transaction verification result indicates that the verification is passed, the blockchain node 20a may acquire a contract address (contract address a) carried by the transaction data to be uplinked, and the blockchain node 20a may search for an intelligent contract matching the contract address a from the intelligent contracts deployed by the blockchain and determine the intelligent contract as a transaction settlement contract 22a corresponding to the transaction data to be uplinked.
Step S214: and acquiring an address white list corresponding to the transaction settlement contract, and if the on-chain address corresponding to the asset demand object and the on-chain address corresponding to the asset transaction object belong to the address white list, calling the transaction settlement contract, and transferring the asset transaction value in the transaction data to be on-chain from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object.
As shown in fig. 8, it may be determined whether the on-chain address contained in the transaction data to be uplink is trusted by the address whitelist 22b in the transaction settlement contract 22a. Where address whitelist 22b may include a plurality of trusted on-chain addresses, e.g., on-chain address 1, on-chain address 2, on-chain address 3, and on-chain address 4, etc. In other words, in the practice of the present application, transaction settlement contract 22a may complete the transfer of assets for objects corresponding to the on-chain addresses in address whitelist 22 b. If the on-chain address corresponding to the asset requirement object or the on-chain address corresponding to the asset transaction object does not belong to the address whitelist 22b, a transaction failure prompt message may be sent to the asset requirement object and the asset transaction object.
If the on-chain address corresponding to the asset requirement object and the on-chain address corresponding to the asset transaction object belong to the address whitelist 22b, a transaction settlement contract 22a may be invoked to transfer the asset transaction value in the to-be-uplinked transaction data from the on-chain address corresponding to the asset requirement object to the on-chain address corresponding to the asset transaction object.
Further, when the on-chain address corresponding to the asset requirement object and the on-chain address corresponding to the asset transaction object belong to the address white list 22b, the blockchain node 20a may further obtain the asset holding total amount of the on-chain address corresponding to the asset requirement object; and comparing the asset holding total amount with the asset transaction value in the data to be uplinked, wherein if the asset holding total amount is smaller than the asset transaction value in the data to be uplinked, the asset holding total amount in the on-chain address corresponding to the asset demand object is insufficient to withhold the asset transaction value in the data to be uplinked, so that the asset transfer between the asset demand object and the asset holding object cannot be completed. In this case, blockchain node 20a may send a transaction failure hint message to the asset requirement object to hint that the asset requirement object transitions into a corresponding number of assets into the on-chain address to which the asset requirement object corresponds. If the total amount of the asset is greater than or equal to the asset transaction value in the data to be uplinked, the block chain node 20a may invoke the transaction settlement contract 22a to transfer the asset transaction value in the data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object.
In the embodiment of the application, the to-be-uplink transaction data carries the digital signature of the two-shot asset requirement object and the asset transaction object, which means that the asset requirement object and the asset transaction object both recognize the transaction information in the to-be-uplink transaction data, so that the transaction matching can be completed under the blockchain. That is, in the embodiment of the present application, only the transaction that completes the matching needs to be uploaded to the blockchain, and the transaction that does not need to be uploaded to the blockchain, so that the storage pressure and the execution pressure of the blockchain can be reduced. In addition, as the asset demand object and the asset transaction object can be interacted point to point when the asset transaction is carried out, the transparency of transaction information can be improved, and the message barriers between the asset demand object and the asset transaction object can be reduced. Further, according to the embodiment of the application, the transaction settlement between the asset demand object and the asset transaction object is carried out on the blockchain without carrying out the transaction settlement through the third-party transaction platform, so that the asset of the asset demand object and the asset transaction object is prevented from being lost when the trust crisis of the third-party transaction platform, and further the asset security of both transaction parties can be improved.
It will be appreciated that in particular embodiments of the present application, relevant information about a user (e.g., total amount of asset held, resource demand, amount of resource held, etc. by a user) may be relevant, and that when the above embodiments of the present application are applied to particular products or technologies, permissions or consents of the user need to be obtained, and the collection, use, and processing of relevant data need to comply with relevant laws and regulations and standards of the relevant country and region.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a blockchain-based data processing device according to an embodiment of the present application. It will be appreciated that the blockchain-based data processing device 1 may be applied to asset requirement objects. As shown in fig. 9, the blockchain-based data processing device 1 may include a transaction request transmitting module 11, a transaction object determining module 12, a first transaction signing module 13, and an initial transaction data transmitting module 14, wherein:
a transaction request sending module 11, configured to send an asset transaction request to N asset-holding objects, so that the N asset-holding objects determine an asset transaction value for a resource to be transacted indicated by the asset transaction request; one asset holding object corresponds to one asset transaction value; n is an integer greater than 1;
The transaction object determining module 12 is configured to receive asset transaction values returned by the N asset-holding objects, and determine an asset transaction object corresponding to the asset demand object from the N asset-holding objects according to the asset transaction values returned by the N asset-holding objects;
the first transaction signature module 13 is configured to sign, through an object private key corresponding to the asset requirement object, an on-chain address corresponding to the asset transaction object, and an asset transaction value corresponding to the asset transaction object, to obtain initial transaction data, and send the initial transaction data to the asset transaction object;
the initial transaction data sending module 14 is configured to send initial transaction data to an asset transaction object, so that the asset transaction object signs the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be linked; the transaction data to be uplinked is used for uploading to a blockchain node, and the blockchain node is used for calling a transaction settlement contract arranged in the blockchain and transferring the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object.
The specific functional implementation manners of the transaction request sending module 11, the transaction object determining module 12, the first transaction signing module 13, and the initial transaction data sending module 14 may refer to step S101 to step S104 in the embodiment corresponding to fig. 3, and will not be described herein.
In one possible implementation, the transaction request sending module 11 may include: an asset-holding object determination unit 111 and a transaction request forwarding unit 112, wherein:
an asset-holding object determining unit 111 configured to send an asset transaction request to a content distribution platform, and determine N asset-holding objects holding resources to be transacted indicated by the asset transaction request through the content distribution platform;
a transaction request forwarding unit 112, configured to forward the asset transaction request to the N asset-holding objects through the content distribution platform.
The specific functional implementation manner of the asset-holding object determining unit 111 and the transaction request forwarding unit 112 may refer to step S201 in the embodiment corresponding to fig. 4, and will not be described herein.
In one possible implementation, the transaction object determination module 12 may include: an object screening unit 121, an integrated evaluation value acquisition unit 122, and an asset transaction object determination unit 123, wherein:
An object screening unit 121 for adding an asset-holding object whose asset transaction value is less than or equal to a transaction threshold value to the candidate object set; asset-holding objects in the candidate object set belong to N asset-holding objects;
a comprehensive evaluation value obtaining unit 122, configured to obtain a comprehensive evaluation value corresponding to an asset-holding object in the candidate object set according to the transaction success rate and the credit evaluation value corresponding to the asset-holding object in the candidate object set;
an asset transaction object determining unit 123, configured to determine an asset transaction object corresponding to the asset demand object in the candidate object set according to the comprehensive evaluation value corresponding to the asset holding object in the candidate object set.
The specific functional implementation manners of the object screening unit 121, the comprehensive evaluation value obtaining unit 122, and the asset transaction object determining unit 123 may refer to steps S202 to S204 in the embodiment corresponding to fig. 4, and will not be described herein.
In one possible implementation, the integrated evaluation value acquisition unit 122 may include: an evaluation index acquisition subunit 1221, an evaluation weight acquisition subunit 1222, and a weighted summation subunit 1223, wherein:
an evaluation index obtaining subunit 1221, configured to obtain a transaction success rate and a credit evaluation value corresponding to the asset-holding object i in the candidate object set;
An evaluation weight acquisition subunit 1222 configured to acquire a first evaluation weight corresponding to the transaction success rate of the asset-holding object i, and acquire a second evaluation weight corresponding to the credit evaluation value of the asset-holding object i;
a weighted sum subunit 1223, configured to determine, as the comprehensive evaluation value corresponding to the asset-holding object i, a sum of a product between the transaction success rate of the asset-holding object i and the first evaluation weight and a product between the credit evaluation value of the asset-holding object i and the second evaluation weight.
The specific functional implementation manner of the evaluation index obtaining subunit 1221, the evaluation weight obtaining subunit 1222, and the weighted summation subunit 1223 may refer to step S203 in the embodiment corresponding to fig. 4, and will not be described herein.
In one possible implementation, the asset transaction object determination unit 123 may include: an object ordering subunit 1231, a resource demand acquisition subunit 1232, a first object determination subunit 1233, and a second object determination subunit 1234, wherein:
an object sorting subunit 1231, configured to sort the asset-holding objects in the candidate object set in a descending order according to the comprehensive evaluation values corresponding to the asset-holding objects in the candidate object set, to obtain a sorted candidate object set;
A resource demand acquiring subunit 1232, configured to acquire a resource demand corresponding to the asset demand object, and determine, as a first holding object, an asset holding object corresponding to the largest comprehensive evaluation value in the sorted candidate object set;
a first object determining subunit 1233, configured to determine the first holding object as an asset transaction object corresponding to the asset requirement object if the resource holding amount corresponding to the first holding object is greater than or equal to the resource requirement amount;
a second object determining subunit 1234, configured to determine the first holding object and the second holding object as asset transaction objects corresponding to the asset demand objects if the resource holding amount corresponding to the first holding object is less than the resource demand amount and the sum of the resource holding amounts of the resource holding amount corresponding to the first holding object and the resource holding amount corresponding to the second holding object is greater than or equal to the resource demand amount; the second holding object is an asset holding object adjacent to the first holding object in the ordered candidate object set.
The specific functional implementation manner of the object ordering subunit 1231, the resource demand acquiring subunit 1232, the first object determining subunit 1233, and the second object determining subunit 1234 may refer to step S204 in the embodiment corresponding to fig. 4, and will not be described herein.
In the embodiment of the application, the to-be-uplink transaction data carries the digital signature of the two-shot asset requirement object and the asset transaction object, which means that the asset requirement object and the asset transaction object both recognize the transaction information in the to-be-uplink transaction data, so that the transaction matching can be completed under the blockchain. That is, in the embodiment of the present application, only the transaction that completes the matching needs to be uploaded to the blockchain, and the transaction that does not need to be uploaded to the blockchain, so that the storage pressure and the execution pressure of the blockchain can be reduced. In addition, as the asset demand object and the asset transaction object can be interacted point to point when the asset transaction is carried out, the transparency of transaction information can be improved, and the message barriers between the asset demand object and the asset transaction object can be reduced. Further, according to the embodiment of the application, the transaction settlement between the asset demand object and the asset transaction object is carried out on the blockchain without carrying out the transaction settlement through the third-party transaction platform, so that the asset of the asset demand object and the asset transaction object is prevented from being lost when the trust crisis of the third-party transaction platform, and further the asset security of both transaction parties can be improved.
Referring to fig. 10, fig. 10 is a schematic diagram of a block chain-based data processing apparatus according to an embodiment of the present application. It will be appreciated that the blockchain-based data processing device 2 may be applied to asset transaction objects. As shown in fig. 10, the blockchain-based data processing device 2 may include a second transaction signature module 21 and a transaction data uploading module 22, wherein:
the second transaction signature module 21 is configured to receive initial transaction data sent by the asset requirement object, and sign the initial transaction data by using an object private key corresponding to the asset transaction object to obtain transaction data to be uplink;
the transaction data uploading module 22 is configured to upload the transaction data to be uplink to the blockchain node, so that the blockchain node transfers the asset transaction value in the transaction data to be uplink from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain;
the initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset-holding objects, and the N asset-holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, wherein the asset transaction requests are initiated by asset demand objects.
The specific functional implementation manner of the second transaction signature module 21 and the transaction data uploading module 22 may refer to step S105 and step S106 in the embodiment corresponding to fig. 3, and will not be described herein.
In one possible implementation, the second transaction signature module 21 may include: a processing state acquisition unit 211, a signature information acquisition unit 212, a hint message transmission unit 213, and a transaction data signing unit 214, wherein:
a processing state acquiring unit 211, configured to store the initial transaction data in a transaction message queue in the asset transaction object, and update the processing state of the initial transaction data according to the storage position of the initial transaction data in the transaction message queue;
a signature information obtaining unit 212, configured to obtain an execution time stamp corresponding to the initial transaction data and a transaction validity period corresponding to the initial transaction data if the asset transaction object detects that the processing state of the initial transaction data is updated to the execution state;
a prompt message sending unit 213, configured to clear the initial transaction data if the execution timestamp does not belong to the transaction validity period, and send a transaction retransmission prompt message to the asset requirement object;
and the transaction data signing unit 214 is configured to sign the initial transaction data by using the object private key corresponding to the asset transaction object if the execution timestamp belongs to the transaction validity period, so as to obtain the transaction data to be uploaded.
The specific functional implementation manners of the processing state obtaining unit 211, the signature information obtaining unit 212, the prompt message sending unit 213, and the transaction data signing unit 214 may refer to step S207 and step S210 in the embodiment corresponding to fig. 4, and will not be described herein.
In one possible implementation, the transaction data signing unit 214 may include: a reference transaction value determination subunit 2141, a first hint message sending subunit 2142, and a transaction signature subunit 2143, wherein:
a reference transaction value determining subunit 2141, configured to determine a reference transaction value for a resource to be transacted according to a transaction fluctuation rate corresponding to the resource to be transacted associated with the initial transaction data if the execution timestamp belongs to the transaction validity period;
a first prompting message sending subunit 2142, configured to clear the initial transaction data if the reference transaction value is greater than the asset transaction value in the initial transaction data, and send a transaction cancellation prompting message to the asset requirement object;
the transaction signature subunit 2143 is configured to sign the initial transaction data by the asset transaction object through the object private key corresponding to the asset transaction object if the reference transaction value is less than or equal to the asset transaction value in the initial transaction data, so as to obtain the transaction data to be uplink.
The specific function implementation manner of the reference transaction value determining subunit 2141, the first prompting message sending subunit 2142, and the transaction signature subunit 2143 may refer to step S210 in the corresponding embodiment of fig. 4, and will not be described herein.
In the embodiment of the application, the to-be-uplink transaction data carries the digital signature of the two-shot asset requirement object and the asset transaction object, which means that the asset requirement object and the asset transaction object both recognize the transaction information in the to-be-uplink transaction data, so that the transaction matching can be completed under the blockchain. That is, in the embodiment of the present application, only the transaction that completes the matching needs to be uploaded to the blockchain, and the transaction that does not need to be uploaded to the blockchain, so that the storage pressure and the execution pressure of the blockchain can be reduced. In addition, as the asset demand object and the asset transaction object can be interacted point to point when the asset transaction is carried out, the transparency of transaction information can be improved, and the message barriers between the asset demand object and the asset transaction object can be reduced. Further, according to the embodiment of the application, the transaction settlement between the asset demand object and the asset transaction object is carried out on the blockchain without carrying out the transaction settlement through the third-party transaction platform, so that the asset of the asset demand object and the asset transaction object is prevented from being lost when the trust crisis of the third-party transaction platform, and further the asset security of both transaction parties can be improved.
Referring to fig. 11, fig. 11 is a schematic diagram of a block chain-based data processing apparatus according to an embodiment of the present application. It will be appreciated that the blockchain-based data processing device 3 may be employed in a blockchain node. As shown in fig. 11, the blockchain-based data processing device 3 may include: a transaction data receiving module 31 and a transaction settlement module 32, wherein:
a transaction data receiving module 31, configured to receive to-be-uplink transaction data sent by an asset transaction object;
a transaction settlement module 32 for transferring the asset transaction value in the transaction data to be uplink from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through a transaction settlement contract deployed in the blockchain;
the method comprises the steps that transaction data to be uplink is obtained by signing initial transaction data according to an object private key corresponding to an asset transaction object; the initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset-holding objects, and the N asset-holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, wherein the asset transaction requests are initiated by asset demand objects.
The specific functional implementation manner of the transaction data receiving module 31 and the transaction settlement module 32 can be referred to step S106 and step S107 in the embodiment corresponding to fig. 3, and will not be described herein.
In one possible implementation, the transaction settlement module 32 may include: a validity verification unit 321, a transaction settlement contract acquisition unit 322, and a transaction settlement contract calling unit 323, wherein:
the validity verification unit 321 is configured to obtain a first object public key corresponding to the asset requirement object and a second object public key corresponding to the asset transaction object, and perform validity verification on the transaction data to be uplink through the first object public key and the second object public key, so as to obtain a transaction verification result;
a transaction settlement contract obtaining unit 322, configured to obtain a contract address carried by the transaction data to be uplink if the transaction verification result indicates that verification is passed, and determine an intelligent contract in the blockchain that matches the contract address as a transaction settlement contract corresponding to the transaction data to be uplink;
the transaction settlement contract calling unit 323 is configured to obtain an address whitelist corresponding to the transaction settlement contract, and if the on-chain address corresponding to the asset demand object and the on-chain address corresponding to the asset transaction object belong to the address whitelist, call the transaction settlement contract, and transfer the asset transaction value in the transaction data to be on-chain from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object.
The specific function implementation manners of the validity verification unit 321, the transaction settlement contract obtaining unit 322, and the transaction settlement contract invoking unit 323 can refer to step S212 to step S214 in the embodiment corresponding to fig. 4, and are not described herein again.
In one possible implementation, the validity verification unit 321 may include: a signature acquisition subunit 3211, a first decryption subunit 3212, a second decryption subunit 3213, and a verification result acquisition subunit 3214, wherein:
a signature obtaining subunit 3211, configured to obtain a first digital signature corresponding to an asset requirement object and a second digital signature corresponding to an asset transaction object carried by the to-be-uplink transaction data;
the first decryption subunit 3212 is configured to decrypt the first digital signature by using the first object public key through the block link point to obtain first digest information, and perform hash operation on the transaction data to be uplink according to a hash algorithm adopted by the asset requirement object to obtain second digest information;
a second decryption subunit 3213, configured to decrypt the second digital signature by the blockchain node through the second object public key to obtain third digest information, and perform hash operation on the to-be-uplink transaction data according to a hash algorithm adopted by the asset transaction object to obtain fourth digest information;
The verification result obtaining subunit 3214 is configured to determine that the transaction verification result indicates that verification is passed if the first digest information is identical to the second digest information and the third digest information is identical to the fourth digest information.
The specific functional implementation manner of the signature obtaining subunit 3211, the first decrypting subunit 3212, the second decrypting subunit 3213, and the verification result obtaining subunit 3214 may refer to step S212 in the embodiment corresponding to fig. 4, which is not described herein.
In one possible embodiment, the transaction settlement contract invoking unit 323 may include: an asset acquisition subunit 3231, a second hint message sending subunit 3232, and an asset transfer subunit 3233, wherein:
an asset acquisition subunit 3231, configured to acquire an asset holding total amount of the on-chain address corresponding to the asset demand object if the on-chain address corresponding to the asset demand object and the on-chain address corresponding to the asset transaction object belong to an address white list;
a second prompting message sending subunit 3232, configured to send a transaction failure prompting message to the asset requirement object if the total amount of asset holding is smaller than the asset transaction value in the transaction data to be uplink;
and an asset transfer subunit 3233, configured to transfer, if the total amount of asset holding is greater than or equal to the asset transaction value in the transaction data to be uplink, the asset transaction value in the transaction data to be uplink from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through a transaction settlement contract deployed in the blockchain.
The specific functional implementation manner of the asset acquisition subunit 3231, the second hint message sending subunit 3232, and the asset transfer subunit 3233 may refer to step S214 in the embodiment corresponding to fig. 4, and will not be described herein.
In the embodiment of the application, the to-be-uplink transaction data carries the digital signature of the two-shot asset requirement object and the asset transaction object, which means that the asset requirement object and the asset transaction object both recognize the transaction information in the to-be-uplink transaction data, so that the transaction matching can be completed under the blockchain. That is, in the embodiment of the present application, only the transaction that completes the matching needs to be uploaded to the blockchain, and the transaction that does not need to be uploaded to the blockchain, so that the storage pressure and the execution pressure of the blockchain can be reduced. In addition, as the asset demand object and the asset transaction object can be interacted point to point when the asset transaction is carried out, the transparency of transaction information can be improved, and the message barriers between the asset demand object and the asset transaction object can be reduced. Further, according to the embodiment of the application, the transaction settlement between the asset demand object and the asset transaction object is carried out on the blockchain without carrying out the transaction settlement through the third-party transaction platform, so that the asset of the asset demand object and the asset transaction object is prevented from being lost when the trust crisis of the third-party transaction platform, and further the asset security of both transaction parties can be improved.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 12, the computer device 1000 may be a terminal device or a server, which is not limited herein. For ease of understanding, the present application will be described with reference to a computer device as an example of a terminal device. The computer device 1000 may include: processor 1001, network interface 1004, and memory 1005, in addition, the computer device 1000 may further comprise: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and optionally, the user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 12, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 1005, which is one type of computer-readable storage medium.
In the computer device 1000 shown in fig. 12, the network interface 1004 may provide a network communication function; while user interface 1003 is primarily used as an interface for providing input to a user; and the processor 1001 may be used to invoke device control applications stored in the memory 1005.
It should be understood that the computer device 1000 described in the embodiments of the present application may perform the description of the blockchain-based data processing method in the embodiment corresponding to fig. 3 and 4, and may also perform the description of the blockchain-based data processing apparatus 1 in the embodiment corresponding to fig. 9, the description of the blockchain-based data processing apparatus 2 in the embodiment corresponding to fig. 10, and the description of the blockchain-based data processing apparatus 3 in the embodiment corresponding to fig. 11, which are not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiments of the present application further provide a computer readable storage medium, in which the aforementioned blockchain-based data processing apparatus 1, blockchain-based data processing apparatus 2, and computer program executed by the blockchain-based data processing apparatus 3 are stored, and the computer program includes program instructions, when executed by a processor, are capable of executing the description of the blockchain-based data processing method in any of the embodiments corresponding to fig. 3 and 4, and therefore, the description will not be repeated here. In addition, the description of the beneficial effects of the same method is omitted. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application. As an example, the program instructions may be deployed to be executed on one computer device or on multiple computer devices at one site or, alternatively, on multiple computer devices distributed across multiple sites and interconnected by a communication network, where the multiple computer devices distributed across multiple sites and interconnected by a communication network may constitute a blockchain system.
In addition, it should be noted that: embodiments of the present application also provide a computer program product or computer program that may include computer instructions that may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor can execute the computer instructions, so that the computer device performs the description of the blockchain-based data processing method in any of the foregoing embodiments corresponding to fig. 3 and 4, and thus, a detailed description thereof will not be provided herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the computer program product or the computer program embodiments related to the present application, please refer to the description of the method embodiments of the present application.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the described order of action, as some steps may take other order or be performed simultaneously according to the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The modules in the device of the embodiment of the application can be combined, divided and deleted according to actual needs.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed may comprise the steps 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 (Random Access Memory, RAM), or the like.
The foregoing disclosure is only illustrative of the preferred embodiments of the present application and is not intended to limit the scope of the claims herein, as the equivalent of the claims herein shall be construed to fall within the scope of the claims herein.

Claims (16)

1. A blockchain-based data processing method, comprising:
the method comprises the steps that an asset demand object sends asset transaction requests to N asset holding objects, so that the N asset holding objects determine asset transaction values for resources to be transacted indicated by the asset transaction requests; one asset holding object corresponds to one asset transaction value; n is an integer greater than 1;
The asset demand object receives the asset transaction values returned by the N asset holding objects, and determines the asset transaction object corresponding to the asset demand object from the N asset holding objects according to the asset transaction values returned by the N asset holding objects;
the asset demand object signs an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object through an object private key corresponding to the asset demand object to obtain initial transaction data, and sends the initial transaction data to the asset transaction object;
the asset transaction object receives the initial transaction data, and signs the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uplink;
and uploading the transaction data to be uplinked to a blockchain node by the asset transaction object so that the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through a transaction settlement contract deployed in a blockchain.
2. The method of claim 1, wherein the asset requirement object sends asset transaction requests to N asset-holding objects, comprising:
the method comprises the steps that an asset demand object sends an asset transaction request to a content distribution platform, and N asset holding objects for holding resources to be transacted indicated by the asset transaction request are determined through the content distribution platform;
the asset requirement object forwards the asset transaction request to the N asset-holding objects through the content distribution platform.
3. The method of claim 1, wherein determining the asset transaction object corresponding to the asset demand object among the N asset holding objects according to the asset transaction values returned by the N asset holding objects comprises:
the asset demand object adding an asset holding object having an asset transaction value less than or equal to a transaction threshold to a set of candidate objects; asset-holding objects in the candidate object set belong to the N asset-holding objects;
the asset demand object obtains a comprehensive evaluation value corresponding to the asset holding object in the candidate object set according to the transaction success rate and the credit evaluation value corresponding to the asset holding object in the candidate object set;
And the asset demand object determines an asset transaction object corresponding to the asset demand object in the candidate object set according to the comprehensive evaluation value corresponding to the asset holding object in the candidate object set.
4. The method of claim 3, wherein the asset requirement object obtains the comprehensive evaluation value corresponding to the asset-holding object in the candidate object set according to the transaction success rate and the credit evaluation value corresponding to the asset-holding object in the candidate object set, comprising:
the asset demand object obtains the transaction success rate and the credit evaluation value corresponding to the asset holding object i in the candidate object set;
the asset demand object obtains a first evaluation weight corresponding to the transaction success rate of the asset holding object i and obtains a second evaluation weight corresponding to the credit evaluation value of the asset holding object i;
the asset requirement object determines the sum of the product of the transaction success rate of the asset holding object i and the first evaluation weight and the product of the credit evaluation value of the asset holding object i and the second evaluation weight as a comprehensive evaluation value corresponding to the asset holding object i.
5. The method of claim 3, wherein the asset requirement object determining an asset transaction object corresponding to the asset requirement object in the candidate object set based on the comprehensive evaluation value corresponding to the asset-holding object in the candidate object set comprises:
the asset demand object performs descending order sorting on the asset holding objects in the candidate object set according to the comprehensive evaluation values corresponding to the asset holding objects in the candidate object set to obtain a sorted candidate object set;
the asset demand object obtains the resource demand corresponding to the asset demand object, and determines an asset holding object corresponding to the largest comprehensive evaluation value in the sequenced candidate object set as a first holding object;
if the resource holding amount corresponding to the first holding object is greater than or equal to the resource demand, determining the first holding object as an asset transaction object corresponding to the asset demand object;
if the resource holding amount corresponding to the first holding object is smaller than the resource demand amount, and the sum of the resource holding amounts of the resource holding amount corresponding to the first holding object and the resource holding amount corresponding to the second holding object is larger than or equal to the resource demand amount, determining the first holding object and the second holding object as asset transaction objects corresponding to the asset demand objects; the second holding object refers to an asset holding object in the ordered set of candidate objects that is adjacent to the first holding object.
6. The method of claim 1, wherein signing the initial transaction data with the object private key corresponding to the asset transaction object, to obtain transaction data to be uplink, comprises:
the asset transaction object stores the initial transaction data into a transaction message queue in the asset transaction object, and the processing state of the initial transaction data is updated according to the storage position of the initial transaction data in the transaction message queue;
if the asset transaction object detects that the processing state of the initial transaction data is updated to be the execution state, acquiring an execution time stamp corresponding to the initial transaction data and a transaction valid period corresponding to the initial transaction data;
if the execution time stamp does not belong to the transaction valid period, clearing the initial transaction data, and sending a transaction retransmission prompt message to the asset demand object;
and if the execution time stamp belongs to the transaction valid period, signing the initial transaction data through an object private key corresponding to the asset transaction object to obtain the transaction data to be linked.
7. The method of claim 6, wherein if the execution time stamp belongs to the transaction expiration date, signing the initial transaction data with an object private key corresponding to the asset transaction object to obtain transaction data to be uplinked, comprising:
If the execution time stamp belongs to the transaction valid period, the asset transaction object determines a reference transaction value for the to-be-transacted resource according to the transaction fluctuation rate corresponding to the to-be-transacted resource associated with the initial transaction data;
if the reference transaction value is larger than the asset transaction value in the initial transaction data, clearing the initial transaction data, and sending a transaction cancellation prompt message to the asset demand object;
and if the reference transaction value is smaller than or equal to the asset transaction value in the initial transaction data, signing the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uploaded.
8. A blockchain-based data processing method, comprising:
the block chain link point receives to-be-uplink transaction data sent by an asset transaction object;
the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through the transaction settlement contract deployed in the blockchain;
the to-be-uplink transaction data are obtained by signing initial transaction data according to an object private key corresponding to the asset transaction object; the initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset holding objects, the N asset holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, and the asset transaction requests are initiated by the asset demand objects.
9. The method of claim 8, wherein the blockchain node transferring asset transaction values in the to-be-uplinked transaction data from an on-chain address corresponding to the asset requirement object to an on-chain address corresponding to the asset transaction object through a transaction settlement contract deployed in a blockchain, comprising:
the blockchain node acquires a first object public key corresponding to the asset demand object and a second object public key corresponding to the asset transaction object, and performs validity verification on the transaction data to be uplink through the first object public key and the second object public key to obtain a transaction verification result;
if the transaction verification result indicates that verification is passed, acquiring a contract address carried by the transaction data to be uplink, and determining an intelligent contract matched with the contract address in a blockchain as a transaction settlement contract corresponding to the transaction data to be uplink;
and the block link point acquires an address white list corresponding to the transaction settlement contract, and if the on-chain address corresponding to the asset demand object and the on-chain address corresponding to the asset transaction object belong to the address white list, the transaction settlement contract is called, and the asset transaction value in the transaction data to be uplink is transferred from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object.
10. The method of claim 9, wherein the blockchain node obtains a first object public key corresponding to the asset requirement object and a second object public key corresponding to the asset transaction object, and performs validity verification on the transaction data to be uplink through the first object public key and the second object public key to obtain a transaction verification result, including:
the blockchain node acquires a first digital signature corresponding to the asset demand object and a second digital signature corresponding to the asset transaction object carried by the to-be-uplinked transaction data;
the blockchain node decrypts the first digital signature through the first object public key to obtain first abstract information, and performs hash operation on the transaction data to be uplink according to a hash algorithm adopted by the asset demand object to obtain second abstract information;
the blockchain node decrypts the second digital signature through the second object public key to obtain third abstract information, and performs hash operation on the transaction data to be uplink according to a hash algorithm adopted by the asset transaction object to obtain fourth abstract information;
If the first abstract information is the same as the second abstract information and the third abstract information is the same as the fourth abstract information, determining that the transaction verification result indicates that verification is passed.
11. The method of claim 9, wherein if the on-chain address corresponding to the asset requirement object and the on-chain address corresponding to the asset transaction object belong to the address whitelist, invoking the transaction settlement contract to transfer the asset transaction value in the to-be-uplink transaction data from the on-chain address corresponding to the asset requirement object to the on-chain address corresponding to the asset transaction object, comprising:
if the on-chain address corresponding to the asset demand object and the on-chain address corresponding to the asset transaction object belong to the address white list, acquiring the asset holding total amount of the on-chain address corresponding to the asset demand object;
if the total amount of the asset holding is smaller than the asset transaction value in the transaction data to be uplink, a transaction failure prompt message is sent to the asset demand object;
and if the total asset holding amount is greater than or equal to the asset transaction value in the transaction data to be uplink, transferring the asset transaction value in the transaction data to be uplink from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through a transaction settlement contract deployed in a blockchain.
12. A blockchain-based data processing method, comprising:
the method comprises the steps that an asset demand object sends asset transaction requests to N asset holding objects, so that the N asset holding objects determine asset transaction values for resources to be transacted indicated by the asset transaction requests; one asset holding object corresponds to one asset transaction value; n is an integer greater than 1;
the asset demand object receives the asset transaction values returned by the N asset holding objects, and determines the asset transaction object corresponding to the asset demand object from the N asset holding objects according to the asset transaction values returned by the N asset holding objects;
the asset demand object signs an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object through an object private key corresponding to the asset demand object to obtain initial transaction data;
the asset demand object sends the initial transaction data to the asset transaction object so that the asset transaction object signs the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uploaded; the transaction data to be uplinked is used for uploading to a blockchain node, and the blockchain node is used for calling a transaction settlement contract deployed in a blockchain and transferring an asset transaction value in the transaction data to be uplinked from an on-chain address corresponding to the asset demand object to an on-chain address corresponding to the asset transaction object.
13. A blockchain-based data processing method, comprising:
the method comprises the steps that an asset transaction object receives initial transaction data sent by an asset demand object, and signs the initial transaction data through an object private key corresponding to the asset transaction object to obtain transaction data to be uplink;
the asset transaction object uploads the transaction data to be uplinked to a blockchain node so that the blockchain node transfers the asset transaction value in the transaction data to be uplinked from the on-chain address corresponding to the asset demand object to the on-chain address corresponding to the asset transaction object through a transaction settlement contract deployed in a blockchain;
the initial transaction data is obtained by signing an on-chain address corresponding to the asset demand object, an on-chain address corresponding to the asset transaction object and an asset transaction value corresponding to the asset transaction object according to an object private key corresponding to the asset demand object; the asset transaction objects are determined from N asset holding objects, the N asset holding objects are used for providing asset transaction values corresponding to resources to be transacted indicated by asset transaction requests, and the asset transaction requests are initiated by the asset demand objects.
14. A computer device comprising a memory and a processor;
the memory is connected to the processor, the memory is used for storing a computer program, and the processor is used for calling the computer program to enable the computer device to execute the method of any one of claims 1 to 13.
15. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any of claims 1 to 13.
16. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of any of claims 1 to 13.
CN202311460849.2A 2023-11-03 2023-11-03 Block chain-based data processing method, device, equipment and medium Pending CN117474676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311460849.2A CN117474676A (en) 2023-11-03 2023-11-03 Block chain-based data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311460849.2A CN117474676A (en) 2023-11-03 2023-11-03 Block chain-based data processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117474676A true CN117474676A (en) 2024-01-30

Family

ID=89630805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311460849.2A Pending CN117474676A (en) 2023-11-03 2023-11-03 Block chain-based data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117474676A (en)

Similar Documents

Publication Publication Date Title
CN111737724B (en) Data processing method and device, intelligent equipment and storage medium
US11205172B2 (en) Factom protocol in blockchain environments
US11360963B2 (en) Tracking and verification of physical assets
US20210091960A1 (en) Tracking and verification of physical assets
CN113691597B (en) Block chain contract deployment method, device, equipment and storage medium
CN111445333B (en) Block generation method, device, computer equipment and storage medium
CN112132198B (en) Data processing method, device and system and server
Liu et al. Distributed ledger technology
CN112446785A (en) Cross-chain transaction method, system, device, equipment and storage medium
CN111427957A (en) Block chain voting information verification method, device, equipment and storage medium
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN111325581B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111465951A (en) Intelligent logistics management using blockchains
CN108615195B (en) Resource transfer information transmission method and device, storage medium and electronic device
CN110754072A (en) Managing housing scores using intelligent contracts in a blockchain network
CN111934870B (en) Method, apparatus, device and medium for updating root certificate in block chain network
CN111095863A (en) Block chain based system and method for communicating, storing and processing data over a block chain network
CN111488372A (en) Data processing method, device and storage medium
CN111292057A (en) Service processing method based on block chain
CN112613877A (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN112712452A (en) Approval information processing method and device based on block chain
Abubaker et al. Trustful data trading through monetizing IoT data using BlockChain based review system
CN111274597A (en) Data processing method and equipment
US11924348B2 (en) Honest behavior enforcement via blockchain
CN111049806B (en) Joint authority control method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication