CN117406930A - Block chain-based service processing method, device, equipment, medium and product - Google Patents

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

Info

Publication number
CN117406930A
CN117406930A CN202311528919.3A CN202311528919A CN117406930A CN 117406930 A CN117406930 A CN 117406930A CN 202311528919 A CN202311528919 A CN 202311528919A CN 117406930 A CN117406930 A CN 117406930A
Authority
CN
China
Prior art keywords
service
digital asset
order
uplink
asset
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
CN202311528919.3A
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 CN202311528919.3A priority Critical patent/CN117406930A/en
Publication of CN117406930A publication Critical patent/CN117406930A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • G06F21/645Protecting data integrity, e.g. using checksums, certificates or signatures using a third party
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a business processing method, a business processing device, business processing equipment, business processing media and business processing products based on a block chain. The method is applied to a first client where a first object is located, and comprises the following steps: acquiring a target service order in a service system; signing the target service order by adopting a private key of the first object to generate a service to be uplink; generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object. The method and the system can realize business matching between the first object and the second object based on the business system under the blockchain, and settle accounts of the execution business on the blockchain, so that the safety and the reliability of business processing can be improved, and the storage burden of the blockchain node can be reduced.

Description

Block chain-based service processing method, device, equipment, medium and product
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a blockchain-based service processing method, a blockchain-based service processing apparatus, a computer device, a computer readable storage medium, and a computer program product.
Background
With the rapid development of blockchain technology, there are endless business layers executing on blockchains, so there are typically many business orders stored on blockchains, such as business orders for asset replacement, business orders for asset transactions, and business orders for game transactions, etc. These service orders are all required to be stored in the blockchain nodes to execute the corresponding service, but in some cases, the success rate of the service orders in the blockchain may not be high, which may cause more service orders to be stored redundantly in the blockchain nodes, and bring about a great storage pressure for the blockchain nodes.
Disclosure of Invention
The embodiment of the application provides a business processing method, a device, equipment, a medium and a product based on a block chain, which can realize business matching between a first object and a second object based on a business system under the block chain, and perform business settlement on the block chain, so that the safety and reliability of business processing can be improved, and the storage burden of block chain nodes can be reduced.
In one aspect, the present application provides a method for processing a block chain-based service, which is applied to a first client where a first object is located, where the method includes:
acquiring a target service order in a service system; the target service order is used for requesting replacement processing of the first digital asset held by the second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively displaying business orders submitted from one or more objects; the target service order refers to any one of the service orders in the service system;
signing the target service order by adopting a private key of the first object to generate a service to be uplink; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object.
In one aspect, the present application provides a method for processing a service based on a blockchain, applied to a blockchain node, where the method includes:
receiving a service processing request sent by a first client; the service processing request is used for requesting to process a service to be uplink, the service to be uplink is generated after signing a target service order, and the target service order is acquired from a service system by a first client; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
carrying out data analysis on the service to be uplink to obtain first signature information of a second object and second signature information of the first object;
verifying the second object based on the first signature information of the second object; the method comprises the steps of,
verifying the first object based on the second signature information of the first object;
and if the second object and the first object pass the verification, calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset.
In one aspect, the present application provides a blockchain-based service processing device, applied to a first client where a first object is located, where the device includes:
The acquisition unit is used for acquiring a target service order in the service system; the target service order is used for requesting replacement processing of the first digital asset held by the second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively displaying business orders submitted from one or more objects; the target service order refers to any one of the service orders in the service system;
the processing unit is used for signing the target service order by adopting the private key of the first object to generate a service to be uplink; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
the sending unit is used for generating a service processing request based on the service to be uplink and sending the service processing request to the block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object.
In one possible implementation, K service orders are displayed in the service system, and any service order carries the identification and the asset quantity of the digital asset to be replaced; the acquisition unit acquires a target service order in the service system and is used for executing the following operations:
determining the identification of a first digital asset to be replaced, and determining M service orders to be selected from K service orders according to the identification of the first digital asset, wherein M is a positive integer and M is less than or equal to K;
acquiring the resource yield of each service order in M service orders to be selected;
and determining the service order with the lowest asset quantity in the M service orders to be selected as a target service order.
In one possible implementation, K service orders in the service system are displayed in a sequence according to a sequence rule; wherein the ordering rule is used to specify any one of the following:
if the digital assets to be replaced in the K service orders are the same identification, sequencing and displaying the K service orders according to the sequence of low to high resource output;
if the digital assets to be replaced in the K service orders are different identifications, sequencing and displaying the K service orders according to the order hanging time from the near to the far; the order hanging time refers to the time when a service order is uploaded to a service system;
And sequencing and displaying the K business orders according to the priority of the asset types of the digital assets.
In one possible implementation, the processing unit is further configured to perform the following operations:
acquiring a first type of the first digital asset and acquiring a second type of the second digital asset;
if the first type or the second type is the preset type, encrypting the service data of the service to be uplink to obtain encrypted service data;
and generating a service processing request according to the encrypted service data.
In one possible implementation, the target service order carries an identification of the first digital asset to be replaced by the second object and a first asset yield; the service data in the service to be uplink is stored according to the field, wherein the field comprises: a first signature field, a second signature field, and a data field; the processing unit is also configured to perform the following operations:
acquiring the identification of a second digital asset to be replaced by the first object and a second asset yield;
adding the identification and the first resource yield of the first digital asset to be replaced by the second object and the identification and the second resource yield of the second digital asset to be replaced by the first object to a data field of a service to be uplink;
Wherein the first signature information of the second object is recorded in the first signature field and the second signature information of the first object is recorded in the second signature field.
In one aspect, the present application provides a blockchain-based service processing device, applied to a blockchain node, including:
the receiving unit is used for receiving the service processing request sent by the first client; the service processing request is used for requesting to process a service to be uplink, the service to be uplink is generated after signing a target service order, and the target service order is acquired from a service system by a first client; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
the processing unit is used for carrying out data analysis on the service to be uplink to obtain first signature information of the second object and second signature information of the first object;
the processing unit is further used for verifying the second object based on the first signature information of the second object; and verifying the first object based on the second signature information of the first object;
And the processing unit is also used for calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset if the second object and the first object pass verification.
In one possible implementation manner, after receiving the service processing request sent by the first client, the processing unit is further configured to perform the following operations:
acquiring identity information of a first object;
according to the identity information of the first object, performing verification processing on the first object; wherein the verification process includes: any one or more of authority verification, identity verification, security verification and validity verification;
and if the verification processing of the first object is passed, triggering and executing the step of carrying out data analysis on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object.
In one possible implementation manner, service data in a service to be uplink is stored according to fields, wherein the fields comprise a first signature field and a second signature field; the processing unit analyzes the data of the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object, and the processing unit is used for executing the following operations:
Data analysis is carried out on a first signature field in the service to be uplink so as to obtain first signature information of a second object from the first signature field;
and carrying out data analysis on the second signature field in the service to be uplink so as to acquire second signature information of the first object from the second signature field.
In one possible implementation, the fields corresponding to the service to be uplink further include a data field, where the data field is used to store the resource yield of the digital asset to be replaced; the processing unit invokes the asset replacement contract to perform replacement processing on the first digital asset and the second digital asset for performing the following operations:
analyzing the data field of the service to be uplink to obtain a first resource yield of the first digital asset to be replaced by the second object and a second resource yield of the second digital asset to be replaced by the first object;
invoking an asset replacement contract to transfer a first digital asset held by the second object to an account address of the first object according to the first asset yield; the method comprises the steps of,
and transferring the second digital asset held by the first object to the account address of the second object according to the second asset yield.
In one aspect, embodiments of the present application provide a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program, and where the computer program when executed by the processor causes the processor to perform the above-mentioned blockchain-based service processing method.
In one aspect, embodiments of the present application provide a computer readable storage medium storing a computer program that, when read and executed by a processor of a computer device, causes the computer device to perform the above-described blockchain-based service processing method.
In one aspect, embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the computer device to perform the blockchain-based business processing method described above.
In this embodiment of the present application, a first client where a first object is located may obtain a target service order from a service system, where the target service order is used to request replacement processing for a first digital asset held by a second object, where the target service order includes first signature information of the second object; the business system is a system outside the blockchain, and is used for intensively displaying business orders submitted by one or more objects, wherein the target business orders refer to any business order in the business system; signature processing is carried out on the target service order by adopting a private key of the first object, a service to be uplink is generated, and the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object; generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object. Therefore, in the method, the first object and the second object can be matched based on the service system under the blockchain, the service system only needs to be responsible for collecting and centralizing display of the service orders and does not participate in a specific service processing process, the reliability of service processing between the first object and the second object can be ensured, meanwhile, the specific settlement process of the service orders is executed on the blockchain, and the reliability and the safety of the service execution process can be further ensured; in addition, redundant service orders are not required to be stored in the blockchain, and the service orders sent to the blockchain are orders with the service intention already achieved, so that the storage burden of the blockchain nodes can be reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for the person skilled in the art.
Fig. 1 is a schematic diagram of a block chain-based service processing scheme according to an embodiment of the present application;
FIG. 2a is a block chain system architecture diagram according to one embodiment of the present application;
FIG. 2b is a block chain architecture diagram according to one embodiment of the present application;
FIG. 3 is a schematic block chain-based service processing system according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a block chain-based service processing method according to an embodiment of the present application;
FIG. 5a is a schematic diagram of an interface for displaying a business order according to an embodiment of the present application;
FIG. 5b is a schematic diagram of another interface for displaying a business order according to an embodiment of the present application;
FIG. 5c is a schematic diagram of another interface for displaying a business order according to an embodiment of the present application;
FIG. 6 is a flowchart of another method for processing a blockchain-based service according to an embodiment of the present application;
fig. 7 is a schematic diagram of a scenario for acquiring identity information according to an embodiment of the present application;
FIG. 8 is an interactive flowchart of a method for processing a blockchain-based service according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a block chain-based service processing device according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of another block chain based service processing apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The application provides a business processing scheme based on a blockchain, which is suitable for a digital asset replacement scene among a plurality of objects, can perform business matching between a first object and a second object based on a business system (namely a business matching platform) under the blockchain, and execute digital asset replacement processing between the first object and the second object on the blockchain, thereby not only improving the reliability and the safety of business processing, but also reducing the storage burden of a blockchain node. Referring to fig. 1, fig. 1 is a schematic diagram of a block chain-based service processing scheme according to an embodiment of the present application. As shown in fig. 1, the general principle of the present solution is as follows:
1) The drafter (i.e., the second object) sets the drafter information and performs signature processing to generate a service order, and sends the service order to a service matching platform under the blockchain (i.e., a service system outside the blockchain). Wherein, the service order may include: identification of the first digital asset to be replaced (e.g., token B), asset yield, etc.
2) The business matching platform is responsible for collecting business orders sent by a plurality of objects and displaying the business orders in a centralized manner.
3) The bill taker (i.e. the first object) can select a target service order (such as a service order with the lowest quotation) to be traded from the service matching platform, sign the target service order to generate a service to be uplink, generate a service processing request based on the service to be uplink, and send the service processing request to the blockchain.
4) After the blockchain receives the business process request, an asset replacement contract may be invoked to transfer a first digital asset (e.g., token B) held by the second object into the account of the first object and to transfer a second digital asset (e.g., token a) held by the first object into the account of the second object.
On the one hand, the business matching can be performed on the first object and the second object based on the business system under the blockchain, and the business system is only responsible for collecting and centralizing the business orders and does not participate in a specific business processing process, so that the reliability of business processing between the first object and the second object can be ensured; on the other hand, the specific settlement process of the business order is executed on the blockchain, so that the reliability and the safety of the business execution process can be further ensured; in yet another aspect, there is no need to store redundant service orders in the blockchain, and the service orders sent to the blockchain are those for which a service intent has been achieved, thereby reducing the storage burden on the blockchain nodes.
The following describes in detail the key technical terms involved in the present application.
1. Service order and service system.
A service order refers to an order or credential that implements a certain service with respect to a digital asset, and may be any type of data structure, such as: tables, fields, linked lists, etc. The traffic here may include: asset replacement transactions, gaming transactions, electronic invoice transactions, etc., e.g., asset replacement transactions refer to transactions that replace a first digital asset with a second digital asset; as another example, gaming services refer to services that process gaming assets; also, as the electronic invoice service, a service for performing processing on the electronic invoice is referred to. When the service is a game service, the game asset related to the game service can be any asset in a cloud game scene, the cloud game can be any game in an artificial intelligence scene, so-called artificial intelligence (Artificial Intelligence, AI) service, and the artificial intelligence is a comprehensive discipline, and the technology of the cloud game is wide in field, and has a hardware level technology and a software level technology. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, cloud gaming, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The service system refers to a system outside the blockchain, the service system is associated with a first client and a second client, the first client is responsible for acquiring a target service order to be processed from the service system, and the second client is responsible for providing the service order for the service system. The business system can collect business orders submitted by a plurality of objects and can display the orders in a centralized way. That is, the service system is a service platform for information collection and display.
2. And waiting for the service to be uplink.
The service to be uplink refers to a resource replacement service generated based on the target service order, and specifically, the process of generating the service to be uplink includes: the second object submits a service order to the service system-a target service order from a plurality of service orders is selected by the first object-the first object signs the service order-generating the service to be uplink. Wherein, the service to be uplink is used for indicating: the first digital asset held by the second object involved in the target business order is replaced on a blockchain with the second digital asset held by the first object.
3. A first digital asset and a second digital asset.
The digital assets are referred to as digital representations of value, which may be used as payment means, and may be transferred, stored or exchanged for value in electronic form, as previously described, the digital assets are subject to transactions, i.e. digital assets are involved in the transaction process, and in particular, the processing of digital assets. The digital asset is any type of virtual asset, and the virtual asset may be an asset on a blockchain or an asset under the blockchain. For example, the digital asset may include: any type of asset, such as digital collections, electronic invoices, game assets, token, ETH, etc., is not specifically limited in this application.
The first digital asset and the second digital asset may be any type of digital asset and the type of the first digital asset is different from the type of the second digital asset, for example, the first digital asset may be a USDT asset and the second digital asset may be a DOGE asset.
4. Blockchain techniques.
Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. The Block chain is essentially a decentralised database, and is a series of data blocks which are generated by correlation using a cryptography method, and each data Block contains information of a batch of network transactions and is used for verifying the validity (anti-counterfeiting) of the information and generating a next Block. Related concepts of blockchain systems, blockchain nodes, and blockstructures are described below.
(1) A blockchain system.
Referring to fig. 2a, fig. 2a is a schematic structural diagram of a blockchain system according to an embodiment of the present application. As shown in fig. 2a, the blockchain system may be a data sharing system, where the data sharing system refers to a system for performing data sharing between node devices, and the data sharing system 200 may include a plurality of node devices 201, where the plurality of node devices 201 may be respective computer devices in the data sharing system, and the computer devices may be, for example, terminal devices or servers. The device types of different node devices 201 may be the same or different, for example, one node device 201 may be a terminal device, and another node device 201 may be a server.
In the blockchain system shown in fig. 2a, each node device 201 may receive input information during normal operation and maintain shared data within the data sharing system based on the received input information. For example, when any node device 201 in the blockchain system receives a service processing request, the node device 201 may parse the service processing request to obtain service data of the service to be uplinked, and then may send the service data to other blockchain nodes in the blockchain, so that each blockchain node performs blockchain consensus on the current service, if the consensus passes, the service data may be written into the blockchain, so as to complete the uplink processing of the service, so that each blockchain node on the blockchain commonly maintains the service data (i.e. shared data) of the service in the blockchain.
(2) Blockchain nodes:
(1) node function:
i. the application functions are as follows: for deployment in a blockchain, implementing a particular service according to actual service requirements, recording data related to implementing service functions to form recorded data (e.g., service data), where the service functions implemented on the blockchain by the service data may include, for example: resource transfer functions, game service functions, etc. In one implementation, a digital signature (e.g., a digital signature generated by signing service data with a private key of an uplink object) may be carried in a uplink request of service data to indicate a source of the service data, and the service data may be sent to other nodes in the blockchain system, so that when the source and integrity of the service data are verified by the other nodes, the service data is added to the temporary block, and the uplink processing of the service data may be completed.
Contract function: any block link point in a block chain system has the function of calling and executing a corresponding intelligent contract, namely the intelligent contract (which can be abbreviated as contract): the intelligent contract has three major elements of commitment, agreement and digital form, so that the application range of the blockchain can be expanded to all links of transaction, payment, settlement and clearing in the financial industry. A smart contract refers to the fact that when a pre-compiled condition is triggered, the smart contract immediately executes the corresponding contract terms, the working principle of which is similar to an if-then statement of a computer program. Wherein, the blockchain node is operated with an intelligent contract virtual machine (which is a virtual machine capable of executing intelligent contracts), and the intelligent contract virtual machine can understand and execute the codes to realize the functions of the intelligent contracts. In the application, based on the contract function of the block link point, at least one decentralised exchange contract can be deployed for the block link node, and when the block link node receives a resource transaction (such as a transaction for transferring a target digital asset or a transaction for exchanging the target digital asset), the deployed decentralised exchange contract can be invoked to execute a corresponding contract transaction.
(2) And (3) node identification:
for each node in the blockchain system, the node identification corresponding to the node identification is provided, and each node in the blockchain system can store the node identifications of other nodes in the blockchain system so as to broadcast the generated blocks to other nodes in the blockchain system according to the node identifications of other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list.
The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the node, and the IP address is only illustrated in table 1.
TABLE 1 node identification list
In the embodiments of the present application, different types of asset transaction scenarios, such as a digital collection type asset transaction scenario, an electronic invoice type asset transaction scenario, and the like, are involved, where the above-mentioned different types of asset transaction scenarios often involve consensus processing of asset transactions by each blockchain node (e.g., a consensus node). The consensus processing of the asset transaction generally involves data interaction among the consensus nodes, and in the data interaction process, any one of the consensus nodes can carry own node identification, so that other consensus nodes can perform authentication processing of the nodes based on the corresponding node identification before performing the consensus processing, and the data security and reliability in the blockchain consensus processing process are improved.
(3) Block structure:
referring to fig. 2b, fig. 2b is a schematic block chain structure according to an embodiment of the present application. As shown in fig. 2b, the blockchain is composed of a plurality of blocks, and each blockchain includes an initiation block, which is the first block, the initial block, as the name implies. The starting block comprises a block head and a block body, wherein the block head stores an input information characteristic value, a version number, a time stamp and a difficulty value, and the block body stores input information; the next block of the starting block takes the starting block as a father block, the next block also comprises a block head and a block body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the father block, the version number, the timestamp and the difficulty value, and the like, so that the service data stored in each block in the block chain is associated with the service data stored in the father block, and the safety of the service data in the block is ensured.
In the embodiment of the application, the digital asset transactions mainly relate to different types of digital asset transactions, wherein the digital asset transactions comprise service data, specifically, after the service data is subjected to uplink processing, the service data can be added into a block body of a current block in a block chain, according to the structure of the block, the safety and reliability of the service data stored on the chain can be ensured, and the risk of tampering of the service data can be avoided.
5. Cloud technology.
In the service processing scheme based on the blockchain, more data computing services and data storage services are involved in the blockchain, so that a great deal of computer operation cost is required. Then, the service processing scheme provided by the application relates to a cloud technology, and the cloud technology can be adopted to provide a data computing service and a data storage service, and specifically, the data analysis can be performed on the service to be uplink based on the data computing service to obtain the first signature information of the second object and the second signature information of the first object; and, business data for the business to be processed may be written into the asset replacement contract based on the data storage service. The Cloud technology (Cloud technology) is based on the general terms of network technology, information technology, integration technology, management platform technology, application technology and the like applied by a Cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. The cloud technology may include cloud storage technology, so called cloud storage (cloud storage) is a new concept that extends and develops in the concept of cloud computing, and the distributed cloud storage system (hereinafter referred to as a storage system for short) refers to a storage system that provides data storage and service access functions together by integrating a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or application interfaces through functions such as cluster application, grid technology, and distributed storage file system.
It should be specifically noted that, related data in the processing of a blockchain-based service referred to in this application, for example: a target business order, a first digital asset, a second digital asset, and so on. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and related data collection, use and processing processes need to comply with related laws and regulations and standards of countries and regions, comply with legal, legal and necessary principles, and do not relate to obtaining data types prohibited or limited by laws and regulations. In some alternative embodiments, the related data related to the embodiments of the present application is obtained after the object is individually authorized, and in addition, the purpose of the related data related to the object needs to be indicated to the object when the object is obtained for individual authorization.
Architecture diagrams of the blockchain-based service processing system provided in the present application are specifically described below.
Referring to fig. 3, fig. 3 is a schematic architecture diagram of a block chain-based service processing system according to an embodiment of the present application. As shown in fig. 3, the architecture diagram of the blockchain-based service processing system may at least include: a first client 301, a second client 302, a business system 303, and at least one blockchain node 304. The number of blockchain nodes 304 is not specifically limited, and the number of nodes can be flexibly changed according to different types of service scenarios. In addition, the service system 303 may be directly or indirectly connected to the first client 301 and the second client 302 through wired or wireless communication; and, the blockchain node 304 may be directly or indirectly connected to the first client 301, the second client 302, and the service system 303 through wired or wireless communication.
Any of the computer devices (first client 301, second client 302, business system 303, or blockchain node 304) in the business processing system provided herein may be a cell phone, tablet, notebook, palmtop, mobile internet device (MID, mobile internet device), vehicle-mounted device, roadside device, aircraft, wearable device, smart device such as smart watch, smart bracelet, pedometer, etc., virtual reality device.
Any of the computer devices (first client 301, second client 302, business system 303, or blockchain node 304) in the business processing system provided herein may also be a server. Specifically, 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, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like.
It may be appreciated that the types of the respective computer devices in the service processing system of the present application may be the same or different, for example, the first client 301 and the second client 302 may be mobile phones, the service system 303 may be a notebook computer, and the blockchain node 304 may be a server; for another example, the first client 301, the second client 302 may be a mobile phone, and the service system 303 and the blockchain node 304 may be servers. The present application is not limited in number and type based on the individual computer devices in the business processing system.
(1) The function of each computer device in the service processing system is briefly described below.
(1) First client 301: is responsible for acquiring a target service order from the service system 303 and signing the target service order to initiate a service to be uplink to the blockchain, wherein the selected target service order may be the lowest priced service order.
(2) Second client 302: is responsible for providing the business order to be processed to the business system 303, wherein the business order may include: identification of the first digital asset to be replaced and asset yield.
(3) Business system 303: is responsible for collecting a plurality of business orders provided from the second client 302 and for centrally exposing (e.g., ordering) the plurality of business orders. Where business system 303 is typically some more authoritative and trusted institution or system, such as a CA institution.
(4) Blockchain node 304: is responsible for receiving a transaction request sent by the first client 301 and performing an asset replacement transaction in the blockchain, such as invoking an asset replacement contract in the blockchain to transfer a first digital asset held by the second object into an account of the first object and transferring a second digital asset held by the first object into an account of the second object.
(2) The data interaction between the various computer devices in the business processing system is described below.
(1) The second client 302 may generate a service order to be processed and send the service order to the service system 303 after signing the service order. Wherein, the service order may include: identification of the first digital asset to be replaced and asset yield.
(2) The business system 303 gathers business orders provided by a plurality of objects and centrally exposes the business orders.
(3) The first client 301 obtains the service order with the lowest price from the service system 303 as a target service order, and signs the target service order to generate a service to be uplink. Wherein, the service to be uplink is used for indicating: the first digital asset held by the second object involved in the target business order is replaced on the blockchain with the second digital asset held by the first object.
(4) The first client 301 generates a service handling request based on the service to be uplink and sends the service handling request to any blockchain node 304.
(5) The blockchain node 304 may invoke an asset replacement contract to transfer a first digital asset held by the second object to an account of the first object and to transfer a second digital asset held by the first object to an account of the second object after signature verification of the first object and the second object passes.
According to the block chain-based business processing system, a first client where a first object is located can acquire a target business order from a business system, wherein the target business order is used for requesting replacement processing of a first digital asset held by a second object, and the target business order comprises first signature information of the second object; the business system is a system outside the blockchain, and is used for intensively displaying business orders submitted by one or more objects, wherein the target business orders refer to any business order in the business system; signature processing is carried out on the target service order by adopting a private key of the first object, a service to be uplink is generated, and the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object; generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object. Therefore, in the method, the first object and the second object can be matched based on the service system under the blockchain, the service system only needs to be responsible for collecting and centralizing display of the service orders and does not participate in a specific service processing process, the reliability of service processing between the first object and the second object can be ensured, meanwhile, the specific settlement process of the service orders is executed on the blockchain, and the reliability and the safety of the service execution process can be further ensured; in addition, redundant service orders are not required to be stored in the blockchain, and the service orders sent to the blockchain are orders with the service intention already achieved, so that the storage burden of the blockchain nodes can be reduced.
It can be understood that the blockchain-based service processing system described in the embodiments of the present application is for more clearly describing the technical solution of the embodiments of the present application, and is not limited to the technical solution provided in the embodiments of the present application, and as a general technical object in the art can know, with evolution of a system architecture and occurrence of a new service scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
Specific embodiments related to a blockchain-based business processing scheme are described below with reference to the accompanying drawings.
Referring to fig. 4, fig. 4 is a flowchart of a block chain-based service processing method according to an embodiment of the present application. The method may be performed by a first client in the blockchain-based business processing system shown in fig. 3. As shown in fig. 4, the blockchain-based service processing method mainly includes, but is not limited to, the following steps S401 to S403:
s401: acquiring a target service order in a service system; the target service order is used for requesting replacement processing of the first digital asset held by the second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively displaying business orders submitted by one or more objects; the target service order refers to any one of the service orders in the service system.
In one possible implementation, K business orders are presented in the business system, with the identification of the digital asset to be replaced and the asset yield in any one business order. The first client obtains a target service order in the service system, which specifically includes the following steps: firstly, determining the identification of a first digital asset to be replaced, and determining M service orders to be selected from K service orders according to the identification of the first digital asset, wherein M is a positive integer and M is less than or equal to K; wherein the identification of the first digital asset is included in any of the service orders to be selected. Then, acquiring the resource output of each service order in M service orders to be selected; and finally, determining the service order with the lowest asset quantity in the M service orders to be selected as a target service order. It follows that the present application is able to collect service orders provided by a plurality of objects based on the service system, so that the first client can select the service order with the lowest resource yield (i.e. lowest price) from the service system.
The following describes a service system as to a manner of ordering service orders with reference to the accompanying drawings.
In one possible implementation, K service orders in the service system are displayed in order according to an ordering rule. Wherein the ordering rule is used to specify any one of the following:
1) And if the digital assets to be replaced in the K service orders are the same identification, sequencing and displaying the K service orders according to the sequence of low to high resource output. In particular, individual business orders may be displayed in order of low to high price of the asset for the same type of digital asset. Referring to fig. 5a, fig. 5a is a schematic diagram of an interface for displaying a service order provided in an embodiment of the present application, for example, a first digital asset is an ETH asset, a service system collects service orders related to the ETH asset, including an order 1, an order 2, and an order 3, where the prices of the assets provided by the three orders are respectively: 100. 110, 90, the business system may follow: the order 1, order 3, order 2 order ordering shows these three different orders.
2) If the digital assets to be replaced in the K service orders are different identifications, sequencing and displaying the K service orders according to the order hanging time from the near to the far; the order-hanging time refers to the time when the service order is uploaded to the service system. Referring to fig. 5b, fig. 5b is a schematic diagram of another interface for displaying a service order according to an embodiment of the present application, where as shown in fig. 5b, a service hanging list currently collected by a service system includes: order 1 for an ETH asset, order 2 for an ATOM asset, and order 3 for a Token asset; the order 1 has a time earlier than the order 2, and the order 2 has a time earlier than the order 3, the business system may follow: the order 3, order 2, order 1 order ordering shows these three different orders.
3) And sequencing and displaying the K business orders according to the priority of the asset types of the digital assets. Referring to fig. 5c, fig. 5c is another interface schematic diagram for displaying a service order according to an embodiment of the present application, where as shown in fig. 5c, a service hanging list currently collected by a service system includes: order 1 for an ETH asset, order 2 for an ATOM asset, and order 3 for a Token asset; the orders may be presented in a prioritized order of preset asset types, such as: the priority of the ATOM asset is higher than the ETH asset and the priority of the ETH asset is higher than the Token asset, the business system may follow: the order 2, order 1, order 3 order ordering shows these three different orders.
Based on the above modes 1) -3), the service system can sort the collected service orders according to a certain sorting rule, so that centralized display of the service orders is facilitated, and meanwhile, the object can acquire the corresponding service orders from the service system as required, thereby being more convenient and quicker.
S402: signing the target service order by adopting a private key of the first object to generate a service to be uplink; the service to be uplink is used for indicating: the first digital asset held by the second object involved in the target business order is replaced on the blockchain with the second digital asset held by the first object.
In one possible implementation manner, since the target service order includes the first signature information of the second object, after the first client obtains the target service order from the service system, the first client may obtain the public key of the second object, verify the first signature information by using the public key of the second object, and if the verification is passed, trigger to execute the step of signing the target service order by using the private key of the first object, so as to generate the service to be linked. Under the implementation mode, the obtained target service order can be checked, the risk that the service order is leaked or tampered is avoided, and the data security of service processing is improved.
In one possible implementation manner, after the first client signs the target service order with the private key of the first object, service data may be obtained, and a service to be processed may be generated according to the service data. Wherein the traffic data herein may include any one or more of the following: the first signature information of the second object, the second signature information of the first object, the identification and first asset yield of the first digital asset to be replaced by the second object, and the identification and second asset yield of the second digital asset to be replaced by the first object.
In one possible implementation, the target service order carries an identification of the first digital asset to be replaced by the second object and a first asset yield; the service data in the service to be uplink is stored according to the field, wherein the field comprises: a first signature field, a second signature field, and a data field; then the first client may also perform the following operations: acquiring the identification of a second digital asset to be replaced by the first object and a second asset yield; adding the identification and the first resource yield of the first digital asset to be replaced by the second object and the identification and the second resource yield of the second digital asset to be replaced by the first object to a data field of a service to be uplink; wherein the first signature information of the second object is recorded in the first signature field and the second signature information of the first object is recorded in the second signature field. For example, the storage format of the service data in the service to be uplink may be as shown in table 2 below:
TABLE 2 storage format of service data for the service to be uplink
Field name Data content
Sign1 First signature information
Sign2 Second signature information
Data id1、x1;id2、x2
... ...
The service data table shown in table 2 above has a plurality of fields recorded therein, including, for example: fields such as Sign1 (i.e., a first signature field), sign2 (i.e., a second signature field), data (i.e., a Data field), etc., where each field is used to store corresponding Data, e.g., first signature information in the first signature field is used to store a second object; the second signature field is used for storing second signature information of the first object, and the data field is used for storing: the identification of the first digital asset (e.g., id 1) and the first asset yield (e.g., x 1), and the identification of the second digital asset (e.g., id 2) and the second asset yield (e.g., x 2). In the implementation mode, the service data of the service to be processed can be stored according to the fields, so that the data formats are more standard and unified, subsequent data analysis and other processes are facilitated, and the data processing efficiency is improved.
S403: generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object.
In one possible implementation, after signing the target service order with the private key of the first object and generating the service to be uplink, the first client may further acquire a first type of the first digital asset and acquire a second type of the second digital asset; if the first type or the second type is a preset type (such as a digital collection type), encrypting the service data of the service to be linked to obtain encrypted service data; finally, a service processing request can be generated according to the encrypted service data. In this implementation, for a specific type of digital asset, such as a digital collection, the first client may perform encryption processing when assembling the business data, so that the security and reliability of the digital asset may be protected, and data leakage may be avoided.
In one possible implementation, after the first client generates the service processing request based on the service to be uplink, the service processing request may be sent to any one of the blockchain nodes, or the service processing request may be sent to a specified blockchain node (such as an accounting node or a consensus node) in the blockchain, which is not limited in this application.
In this embodiment of the present application, a first client where a first object is located may obtain a target service order from a service system, where the target service order is used to request replacement processing for a first digital asset held by a second object, where the target service order includes first signature information of the second object; the business system is a system outside the blockchain, and is used for intensively displaying business orders submitted by one or more objects, wherein the target business orders refer to any business order in the business system; signature processing is carried out on the target service order by adopting a private key of the first object, a service to be uplink is generated, and the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object; generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object. Therefore, in the method, the first object and the second object can be matched based on the service system under the blockchain, the service system only needs to be responsible for collecting and centralizing display of the service orders and does not participate in a specific service processing process, the reliability of service processing between the first object and the second object can be ensured, meanwhile, the specific settlement process of the service orders is executed on the blockchain, and the reliability and the safety of the service execution process can be further ensured; in addition, redundant service orders are not required to be stored in the blockchain, and the service orders sent to the blockchain are orders with the service intention already achieved, so that the storage burden of the blockchain nodes can be reduced.
Referring to fig. 6, fig. 6 is a flowchart of another block chain-based service processing method according to an embodiment of the present application. The method may be performed by a blockchain node in the blockchain-based business processing system shown in fig. 3. As shown in fig. 6, the blockchain-based service processing method mainly includes, but is not limited to, the following steps S601 to S606:
s601: and receiving a service processing request sent by the first client.
The service processing request is used for requesting to process a service to be uplink, the service to be uplink is generated after signing a target service order, and the target service order is acquired from a service system by a first client; the service to be uplink is used for indicating: the first digital asset held by the second object involved in the target business order is replaced on the blockchain with the second digital asset held by the first object. It should be noted that, the detailed process of how to generate the service to be processed may refer to the relevant steps in the embodiment of fig. 4, and the embodiment of the present application will not be described herein again.
In one possible implementation manner, after the block link point receives the service processing request sent by the first client, the block link point is further configured to perform the following operations: acquiring identity information of a first object; according to the identity information of the first object, performing verification processing on the first object; wherein the verification process includes: any one or more of authority verification, identity verification, security verification and validity verification; and if the verification processing of the first object is passed, triggering and executing the step of carrying out data analysis on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object. In specific implementation, it is assumed that an object authority list is configured in the blockchain node, and the object authority list may be recorded in the object authority list: the identifier (such as name, ID, etc.) of each object having the service request authority, if the identifier of the first object is included in the object authority list, the blockchain node may determine that the authority verification of the first object passes; if the object rights list does not contain an identification of the first object, the blockchain node may determine that rights verification for the first object is not passed. In the implementation mode, the blockchain node can carry out authentication processing on the first object initiating the service processing request, and can avoid the risk of data leakage or tampering, thereby ensuring the data security.
In one possible implementation manner, when the blockchain node obtains the identity information of the first object, please refer to fig. 7, fig. 7 is a schematic diagram of a scenario for obtaining the identity information according to an embodiment of the present application. As shown in fig. 7, before acquiring the identity information of the first object, the blockchain node needs to send an authorization request to the first object, where the authorization request is used to request authorization of the first object, and after the first object agrees to the authorization, the blockchain node can acquire the identity information of the first object. For example, after acquiring the authorization request sent by the blockchain node, the terminal device used by the first object may display an interface S700 in the terminal device, where the interface S700 displays prompt information, where the prompt information is used to prompt whether the first object performs authorization of identity information, and a confirmation control 701 and a rejection control 702 are provided, where if the first object clicks the confirmation control 701, the first object agrees with authorization, and if the first object clicks the rejection control 702, the first object rejects authorization. By the method, the authorization of the first object can be requested when the identity information of the first object is acquired, so that the safety of the identity information of the first object is improved, and data leakage is avoided.
S602: and carrying out data analysis on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object.
In one possible implementation, the service data in the service to be uplink is stored according to fields, where the fields may include a first signature field and a second signature field. The block link point performs data analysis on the service to be uplink to obtain first signature information of a second object and second signature information of the first object, and mainly comprises the following steps: data analysis can be performed on a first signature field in the service to be uplink so as to acquire first signature information of the second object from the first signature field; the second signature field in the service to be uplink can be subjected to data analysis so as to acquire the second signature information of the first object from the second signature field. For example, the storage format of the service data of the service to be uplink may be as shown in table 2 in the above embodiment, and then the blockchain node may parse the first signature information of the second object from the first signature field (i.e. Sign1 field) and parse the second signature information of the first object from the second signature field (i.e. Sign2 field).
S603: verifying the second object based on the first signature information of the second object; and verifying the first object based on the second signature information of the first object.
In particular, the first signature information is generated by signing based on the private key of the second object, and the second signature information is generated by signing based on the private key of the first object. Then, the blockchain node can acquire the public key of the second object, and adopts the public key of the second object to carry out signature verification processing on the first signature information, if the signature verification of the first signature information is passed, the verification of the second object is passed; otherwise, the verification of the second object is not passed. Similarly, the blockchain node can acquire the public key of the first object, and adopts the public key of the first object to carry out signature verification processing on the second signature information, if the second signature information passes the signature verification, the verification of the first object passes, otherwise, the verification of the first object does not pass.
If the verification of the first object by the blockchain node is not passed or the verification of the second object by the blockchain node is not passed, the blockchain node can delete the service processing request, namely, the asset replacement service is not executed; if the blockchain node passes the verification of the first object and the verification of the second object by the blockchain node also passes, the blockchain node may perform the following step S604.
S604: and if the second object and the first object pass the verification, calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset.
In one possible implementation, the fields corresponding to the service to be uplink further include a data field, where the data field is used to store the asset yield of the digital asset to be permuted. The block link point invokes an asset replacement contract to perform replacement processing on the first digital asset and the second digital asset, and mainly comprises the following steps: firstly, analyzing a data field of a to-be-uplink service to obtain a first resource yield of a first digital asset to be replaced by a second object and a second resource yield of a second digital asset to be replaced by the first object; then, invoking an asset replacement contract, and transferring the first digital asset held by the second object to the account address of the first object according to the first asset yield; and transferring the second digital asset held by the first object to the account address of the second object in accordance with the second asset yield.
In this embodiment of the present application, the blockchain node may receive a service processing request of the first client, where the service processing request is used to request execution of a service to be uplink, where the service to be uplink is generated after signature processing is performed on a target service order, and the target service order is obtained by the first client from a service system; the service to be uplink is used for indicating: the first digital asset held by the second object involved in the target business order is replaced on the blockchain with the second digital asset held by the first object. Then, the data analysis can be carried out on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object; verifying the second object based on the first signature information of the second object; and verifying the first object based on the second signature information of the first object; and if the second object and the first object pass the verification, calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset. Therefore, the block chain node in the method can execute the replacement of the first digital asset and the second digital asset on the block chain, so that the reliability and the safety of the asset replacement process can be ensured; in addition, the asset replacement process between the first object and the second object is based on the business matching realized by the business system under the blockchain, so that the business system is related to the business matching but not to the specific asset replacement process, and the situation that the business system is wrote or falsifies data and the like can be avoided, thereby comprehensively improving the reliability and the safety of the business processing based on the modes of under-chain matching and on-chain settlement; finally, the service of the uplink processing is the service achieving the purpose between the first object and the second object, redundant service orders are not needed to be stored in the blockchain node, and the storage burden of the node can be reduced.
Referring to fig. 8, fig. 8 is an interaction flow chart of a block chain-based service processing method according to an embodiment of the present application. The interactive flow of the business processing method comprises the following steps: the first client, the second client, the business system, and the blockchain node execute together. As shown in fig. 8, the interaction flow of the service processing method mainly includes the following steps S801 to S809:
s801: and the second client acquires the hanging order data and generates a service order.
In a specific implementation, the second object may generate, based on the second client, coupon data, where the coupon data may include: identification of the second digital asset to be replaced (e.g., ETH) and the amount of the asset (e.g., 100 w). Then, signature processing is carried out on the hanging data by adopting the private key of the second object to obtain first signature information of the second object, and a service order is generated based on the first signature information, the identification of the second digital asset to be replaced and the asset quantity.
S802: the second client sends the service order to the service system.
In one possible implementation, during the data interaction between the second client and the service system, an information interaction rule may be set, where the information interaction rule may be used to define: whether the second object has operational rights to submit a service order (e.g., an poorly trusted object does not have a hanging right), the maximum number of service orders submitted by the second object (e.g., one object allows the maximum number of service orders submitted to be 100), and the hanging level of the second object (e.g., a level 1 object allows uploading a type 1 service order; and a level 2 object allows uploading a type 2 service order, where types 1 and 2 may be the types of digital assets indicated by the service order), etc. Based on the information interaction rule, the data interaction between the second client and the service system can be authenticated, and the threshold and the reliability of the data interaction process can be improved.
S803: the business system collects the business orders and displays them in a centralized way.
In particular, the business system gathers business orders uploaded from various objects and centrally displays the business orders. Optionally, the collected service orders may be displayed in a sequence in the service system, where taking the service system collects K service orders as an example (K is a positive integer), the sequence display between the K service orders includes the following three manners:
in the first mode, if the digital assets to be replaced in the K service orders are the same identifier, the K service orders are respectively displayed in sequence from low to high in resource yield. In particular, individual business orders may be displayed in order of low to high price of the asset for the same type of digital asset. Referring to fig. 5a, fig. 5a is a schematic diagram of an interface for displaying a service order provided in an embodiment of the present application, for example, a first digital asset is an ETH asset, a service system collects service orders related to the ETH asset, including an order 1, an order 2, and an order 3, where the prices of the assets provided by the three orders are respectively: 100. 110, 90, the business system may follow: the order 1, order 3, order 2 order ordering shows these three different orders.
If the digital assets to be replaced in the K service orders are different identifications, sequencing and displaying the K service orders according to the order hanging time from the near to the far; the order-hanging time refers to the time when the service order is uploaded to the service system. Referring to fig. 5b, fig. 5b is a schematic diagram of another interface for displaying a service order according to an embodiment of the present application, where as shown in fig. 5b, a service hanging list currently collected by a service system includes: order 1 for an ETH asset, order 2 for an ATOM asset, and order 3 for a Token asset; the order 1 has a time earlier than the order 2, and the order 2 has a time earlier than the order 3, the business system may follow: the order 3, order 2, order 1 order ordering shows these three different orders.
And thirdly, sequencing and displaying the K business orders according to the priority of the asset types of the digital assets. Referring to fig. 5c, fig. 5c is another interface schematic diagram for displaying a service order according to an embodiment of the present application, where as shown in fig. 5c, a service hanging list currently collected by a service system includes: order 1 for an ETH asset, order 2 for an ATOM asset, and order 3 for a Token asset; the orders may be presented in a prioritized order of preset asset types, such as: the priority of the ATOM asset is higher than the ETH asset and the priority of the ETH asset is higher than the Token asset, the business system may follow: the order 2, order 1, order 3 order ordering shows these three different orders.
Based on the three sorting modes, the service system can sort the collected service orders according to a certain sorting rule, so that centralized display of the service orders is facilitated, and meanwhile, objects can acquire corresponding service orders from the service system as required, and the service system is more convenient and quicker.
S804: the first client obtains a target service order from the service system.
The target service order is used for requesting replacement processing of the first digital asset held by the second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively displaying business orders submitted by one or more objects; the target service order refers to any one of the service orders in the service system.
In one possible implementation, K business orders are presented in the business system, with the identification of the digital asset to be replaced and the asset yield in any one business order. The first client obtains a target service order in the service system, which specifically includes the following steps: firstly, determining the identification of a first digital asset to be replaced, and determining M service orders to be selected from K service orders according to the identification of the first digital asset, wherein M is a positive integer and M is less than or equal to K; wherein the identification of the first digital asset is included in any of the service orders to be selected. Then, acquiring the resource output of each service order in M service orders to be selected; and finally, determining the service order with the lowest asset quantity in the M service orders to be selected as a target service order. It follows that the present application is able to collect service orders provided by a plurality of objects based on the service system, so that the first client can select the service order with the lowest resource yield (i.e. lowest price) from the service system.
S805: the first client side signs and processes the target service order by adopting a private key of the first object to generate a service to be uplink.
In one possible implementation manner, since the target service order includes the first signature information of the second object, after the first client obtains the target service order from the service system, the first client may obtain the public key of the second object, verify the first signature information by using the public key of the second object, and if the verification is passed, trigger to execute the step of signing the target service order by using the private key of the first object, so as to generate the service to be linked. Under the implementation mode, the obtained target service order can be checked, the risk that the service order is leaked or tampered is avoided, and the data security of service processing is improved.
In one possible implementation manner, after the first client signs the target service order with the private key of the first object, service data may be obtained, and a service to be processed may be generated according to the service data. Wherein the traffic data herein may include any one or more of the following: the first signature information of the second object, the second signature information of the first object, the identification and first asset yield of the first digital asset to be replaced by the second object, and the identification and second asset yield of the second digital asset to be replaced by the first object.
Optionally, the target service order carries the identifier of the first digital asset to be replaced by the second object and the first asset yield; the service data in the service to be uplink is stored according to the field, wherein the field comprises: a first signature field, a second signature field, and a data field; then the first client may also perform the following operations: acquiring the identification of a second digital asset to be replaced by the first object and a second asset yield; adding the identification and the first resource yield of the first digital asset to be replaced by the second object and the identification and the second resource yield of the second digital asset to be replaced by the first object to a data field of a service to be uplink; wherein the first signature information of the second object is recorded in the first signature field and the second signature information of the first object is recorded in the second signature field.
S806: the first client sends a service processing request to the blockchain node.
In particular implementations, the first client may generate a service processing request based on the service to be uplink and send the service processing request to the blockchain node. The blockchain node herein may be any node in a blockchain, or may be a designated node in a blockchain network, such as a billing node, a consensus node, etc., which is not specifically limited in this application.
S807: and the block link point analyzes the data of the service to be uplink, and obtains the first signature information of the second object and the second signature information of the first object.
In one possible implementation, the service data in the service to be uplink is stored according to fields, where the fields may include a first signature field and a second signature field. The block link point performs data analysis on the service to be uplink to obtain first signature information of a second object and second signature information of the first object, and mainly comprises the following steps: data analysis can be performed on a first signature field in the service to be uplink so as to acquire first signature information of the second object from the first signature field; the second signature field in the service to be uplink can be subjected to data analysis so as to acquire the second signature information of the first object from the second signature field. For example, the storage format of the service data of the service to be uplink may be as shown in table 2 in the above embodiment, and then the blockchain node may parse the first signature information of the second object from the first signature field (i.e. Sign1 field) and parse the second signature information of the first object from the second signature field (i.e. Sign2 field).
S808: verifying the second object based on the first signature information of the second object; and verifying the first object based on the second signature information of the first object.
In particular, the first signature information is generated by signing based on the private key of the second object, and the second signature information is generated by signing based on the private key of the first object. Then, the blockchain node can acquire the public key of the second object, and adopts the public key of the second object to carry out signature verification processing on the first signature information, if the signature verification of the first signature information is passed, the verification of the second object is passed; otherwise, the verification of the second object is not passed. Similarly, the blockchain node can acquire the public key of the first object, and adopts the public key of the first object to carry out signature verification processing on the second signature information, if the second signature information passes the signature verification, the verification of the first object passes, otherwise, the verification of the first object does not pass. If the verification of the first object by the blockchain node is not passed or the verification of the second object by the blockchain node is not passed, the blockchain node can delete the service processing request, namely, the asset replacement service is not executed; if the blockchain node passes the verification of the first object and the verification of the second object by the blockchain node also passes, the blockchain node may perform the subsequent step S809.
S809: and if the block chain node passes the verification of the second object and the first object, calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset.
In one possible implementation, the fields corresponding to the service to be uplink further include a data field, where the data field is used to store the asset yield of the digital asset to be permuted. The block link point invokes an asset replacement contract to perform replacement processing on the first digital asset and the second digital asset, and mainly comprises the following steps: firstly, analyzing a data field of a to-be-uplink service to obtain a first resource yield of a first digital asset to be replaced by a second object and a second resource yield of a second digital asset to be replaced by the first object; then, invoking an asset replacement contract, and transferring the first digital asset held by the second object to the account address of the first object according to the first asset yield; and transferring the second digital asset held by the first object to the account address of the second object in accordance with the second asset yield.
In one possible implementation, a trusted execution environment (Trusted Execution Environment, TEE) is deployed in the block link point. Then, the blockchain node may acquire a first type of the first digital asset and acquire a second type of the second digital asset; if the first type or the second type is a preset type, an asset replacement contract can be called, and replacement processing is performed on the first digital asset and the second digital asset in the TEE environment. Under the implementation mode, aiming at special types of digital assets such as digital collection types, the method and the device can execute asset replacement in a TEE environment, so that the safety of a business execution process can be ensured.
S810: and the block link point returns the execution result of the service to be processed to the first client.
In the embodiment of the application, on one hand, the service system outside the blockchain can collect and intensively display a plurality of service orders sent by the second client so that the first client can acquire the target service order initiated service with lower quotation from the service system, therefore, the service system only plays the roles of information collection and centralized display in the process of carrying out service matching on the first object and the second object, does not participate in a specific service process, and can avoid the situation that the service system is wrote, thereby improving the safety of the service processing process; on the other hand, the asset replacement process between the first object and the second object is performed on the blockchain, so that the reliability and safety of the asset replacement process can be ensured; in yet another aspect, any service in the uplink process is a service that achieves intent between the first object and the second object, and redundant service orders are not required to be stored in the blockchain node, so that the storage burden of the node can be reduced.
The following provides an apparatus of an embodiment of the present application, and then, in combination with the above-mentioned blockchain-based service processing scheme provided by the embodiment of the present application, a corresponding description is given to a related apparatus of the embodiment of the present application.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a block chain-based service processing apparatus according to an embodiment of the present application. As shown in fig. 9, the blockchain-based service processing device 900 may be applied to the first client mentioned in the foregoing embodiment. In particular, the blockchain-based business processing device 900 may be a computer program (including program code) running in a computer apparatus, for example, the business processing device 900 is an application software; the service processing apparatus 900 may be configured to perform corresponding steps in the blockchain-based service processing method provided in the embodiments of the present application. In particular, the blockchain-based service processing device 900 may specifically include:
an acquiring unit 901, configured to acquire a target service order in a service system; the target service order is used for requesting replacement processing of the first digital asset held by the second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively displaying business orders submitted from one or more objects; the target service order refers to any one of the service orders in the service system;
A processing unit 902, configured to perform signature processing on the target service order by using a private key of the first object, and generate a service to be uplink; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
a sending unit 903, configured to generate a service processing request based on a service to be uplink, and send the service processing request to a blockchain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object.
In one possible implementation, K service orders are displayed in the service system, and any service order carries the identification and the asset quantity of the digital asset to be replaced; the acquiring unit 901 acquires a target service order in a service system, for performing the following operations:
determining the identification of a first digital asset to be replaced, and determining M service orders to be selected from K service orders according to the identification of the first digital asset, wherein M is a positive integer and M is less than or equal to K;
Acquiring the resource yield of each service order in M service orders to be selected;
and determining the service order with the lowest asset quantity in the M service orders to be selected as a target service order.
In one possible implementation, K service orders in the service system are displayed in a sequence according to a sequence rule; wherein the ordering rule is used to specify any one of the following:
if the digital assets to be replaced in the K service orders are the same identification, sequencing and displaying the K service orders according to the sequence of low to high resource output;
if the digital assets to be replaced in the K service orders are different identifications, sequencing and displaying the K service orders according to the order hanging time from the near to the far; the order hanging time refers to the time when a service order is uploaded to a service system;
and sequencing and displaying the K business orders according to the priority of the asset types of the digital assets.
In one possible implementation, the processing unit 902 is further configured to perform the following operations:
acquiring a first type of the first digital asset and acquiring a second type of the second digital asset;
if the first type or the second type is the preset type, encrypting the service data of the service to be uplink to obtain encrypted service data;
And generating a service processing request according to the encrypted service data.
In one possible implementation, the target service order carries an identification of the first digital asset to be replaced by the second object and a first asset yield; the service data in the service to be uplink is stored according to the field, wherein the field comprises: a first signature field, a second signature field, and a data field; the processing unit 902 is further configured to perform the following operations:
acquiring the identification of a second digital asset to be replaced by the first object and a second asset yield;
adding the identification and the first resource yield of the first digital asset to be replaced by the second object and the identification and the second resource yield of the second digital asset to be replaced by the first object to a data field of a service to be uplink;
wherein the first signature information of the second object is recorded in the first signature field and the second signature information of the first object is recorded in the second signature field.
In this embodiment of the present application, a first client where a first object is located may obtain a target service order from a service system, where the target service order is used to request replacement processing for a first digital asset held by a second object, where the target service order includes first signature information of the second object; the business system is a system outside the blockchain, and is used for intensively displaying business orders submitted by one or more objects, wherein the target business orders refer to any business order in the business system; signature processing is carried out on the target service order by adopting a private key of the first object, a service to be uplink is generated, and the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object; generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object. Therefore, in the method, the first object and the second object can be matched based on the service system under the blockchain, the service system only needs to be responsible for collecting and centralizing display of the service orders and does not participate in a specific service processing process, the reliability of service processing between the first object and the second object can be ensured, meanwhile, the specific settlement process of the service orders is executed on the blockchain, and the reliability and the safety of the service execution process can be further ensured; in addition, redundant service orders are not required to be stored in the blockchain, and the service orders sent to the blockchain are orders with the service intention already achieved, so that the storage burden of the blockchain nodes can be reduced.
Referring to fig. 10, fig. 10 is a schematic structural diagram of another block chain-based service processing apparatus according to an embodiment of the present application. As shown in fig. 10, the blockchain-based service processing device 1000 is applicable to the blockchain nodes mentioned in the foregoing embodiments. In particular, the blockchain-based business processing device 1000 may be a computer program (including program code) running in a computer apparatus, for example, the business processing device 1000 is an application software; the service processing apparatus 1000 may be configured to perform corresponding steps in the blockchain-based service processing method provided in the embodiments of the present application. In particular, the blockchain-based service processing device 1000 may specifically include:
a receiving unit 1001, configured to receive a service processing request sent by a first client; the service processing request is used for requesting to process a service to be uplink, the service to be uplink is generated after signing a target service order, and the target service order is acquired from a service system by a first client; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
The processing unit 1002 is configured to perform data analysis on a service to be uplink to obtain first signature information of a second object and second signature information of the first object;
the processing unit 1002 is further configured to verify the second object based on the first signature information of the second object; and verifying the first object based on the second signature information of the first object;
the processing unit 1002 is further configured to, if the second object and the first object pass verification, invoke an asset replacement contract to perform replacement processing on the first digital asset and the second digital asset.
In one possible implementation manner, after receiving the service processing request sent by the first client, the processing unit 1002 is further configured to perform the following operations:
acquiring identity information of a first object;
according to the identity information of the first object, performing verification processing on the first object; wherein the verification process includes: any one or more of authority verification, identity verification, security verification and validity verification;
and if the verification processing of the first object is passed, triggering and executing the step of carrying out data analysis on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object.
In one possible implementation manner, service data in a service to be uplink is stored according to fields, wherein the fields comprise a first signature field and a second signature field; the processing unit 1002 performs data analysis on the service to be uplink to obtain first signature information of the second object and second signature information of the first object, and is configured to perform the following operations:
data analysis is carried out on a first signature field in the service to be uplink so as to obtain first signature information of a second object from the first signature field;
and carrying out data analysis on the second signature field in the service to be uplink so as to acquire second signature information of the first object from the second signature field.
In one possible implementation, the fields corresponding to the service to be uplink further include a data field, where the data field is used to store the resource yield of the digital asset to be replaced; the processing unit 1002 invokes the asset replacement contract to perform replacement processing on the first digital asset and the second digital asset for performing the following operations:
analyzing the data field of the service to be uplink to obtain a first resource yield of the first digital asset to be replaced by the second object and a second resource yield of the second digital asset to be replaced by the first object;
Invoking an asset replacement contract to transfer a first digital asset held by the second object to an account address of the first object according to the first asset yield; the method comprises the steps of,
and transferring the second digital asset held by the first object to the account address of the second object according to the second asset yield.
In this embodiment of the present application, the blockchain node may receive a service processing request of the first client, where the service processing request is used to request execution of a service to be uplink, where the service to be uplink is generated after signature processing is performed on a target service order, and the target service order is obtained by the first client from a service system; the service to be uplink is used for indicating: the first digital asset held by the second object involved in the target business order is replaced on the blockchain with the second digital asset held by the first object. Then, the data analysis can be carried out on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object; verifying the second object based on the first signature information of the second object; and verifying the first object based on the second signature information of the first object; and if the second object and the first object pass the verification, calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset. Therefore, the block chain node in the method can execute the replacement of the first digital asset and the second digital asset on the block chain, so that the reliability and the safety of the asset replacement process can be ensured; in addition, the asset replacement process between the first object and the second object is based on the business matching realized by the business system under the blockchain, so that the business system is related to the business matching but not to the specific asset replacement process, and the situation that the business system is wrote or falsifies data and the like can be avoided, thereby comprehensively improving the reliability and the safety of the business processing based on the modes of under-chain matching and on-chain settlement; finally, the service of the uplink processing is the service achieving the purpose between the first object and the second object, redundant service orders are not needed to be stored in the blockchain node, and the storage burden of the node can be reduced.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 1100 is configured to perform the steps performed by the first client or the blockchain node in the foregoing method embodiment, where the computer device 1100 includes: one or more processors 1101; one or more input devices 1102, one or more output devices 1103 and a memory 1104. The processor 1101, input device 1102, output device 1103 and memory 1104 are connected by bus 1105. Wherein the memory 1104 is used to store a computer program comprising program instructions.
In one possible embodiment, when the computer device is the first client, the processor 1101 is configured to invoke the program instructions stored in the memory 1104 for performing the following operations:
acquiring a target service order in a service system; the target service order is used for requesting replacement processing of the first digital asset held by the second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively displaying business orders submitted from one or more objects; the target service order refers to any one of the service orders in the service system;
Signing the target service order by adopting a private key of the first object to generate a service to be uplink; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object.
In one possible implementation, K service orders are displayed in the service system, and any service order carries the identification and the asset quantity of the digital asset to be replaced; the processor 1101 obtains a target service order in the service system for performing the following operations:
determining the identification of a first digital asset to be replaced, and determining M service orders to be selected from K service orders according to the identification of the first digital asset, wherein M is a positive integer and M is less than or equal to K;
Acquiring the resource yield of each service order in M service orders to be selected;
and determining the service order with the lowest asset quantity in the M service orders to be selected as a target service order.
In one possible implementation, K service orders in the service system are displayed in a sequence according to a sequence rule; wherein the ordering rule is used to specify any one of the following:
if the digital assets to be replaced in the K service orders are the same identification, sequencing and displaying the K service orders according to the sequence of low to high resource output;
if the digital assets to be replaced in the K service orders are different identifications, sequencing and displaying the K service orders according to the order hanging time from the near to the far; the order hanging time refers to the time when a service order is uploaded to a service system;
and sequencing and displaying the K business orders according to the priority of the asset types of the digital assets.
In one possible implementation, the processor 1101 is further configured to perform the following operations:
acquiring a first type of the first digital asset and acquiring a second type of the second digital asset;
if the first type or the second type is the preset type, encrypting the service data of the service to be uplink to obtain encrypted service data;
And generating a service processing request according to the encrypted service data.
In one possible implementation, the target service order carries an identification of the first digital asset to be replaced by the second object and a first asset yield; the service data in the service to be uplink is stored according to the field, wherein the field comprises: a first signature field, a second signature field, and a data field; the processor 1101 is further configured to perform the following operations:
acquiring the identification of a second digital asset to be replaced by the first object and a second asset yield;
adding the identification and the first resource yield of the first digital asset to be replaced by the second object and the identification and the second resource yield of the second digital asset to be replaced by the first object to a data field of a service to be uplink;
wherein the first signature information of the second object is recorded in the first signature field and the second signature information of the first object is recorded in the second signature field.
In another possible embodiment, when the computer device is a blockchain node, the processor 1101 is configured to invoke the program instructions stored in the memory 1104 for performing the following operations:
receiving a service processing request sent by a first client; the service processing request is used for requesting to process a service to be uplink, the service to be uplink is generated after signing a target service order, and the target service order is acquired from a service system by a first client; the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object;
Carrying out data analysis on the service to be uplink to obtain first signature information of a second object and second signature information of the first object;
verifying the second object based on the first signature information of the second object; and verifying the first object based on the second signature information of the first object;
and if the second object and the first object pass the verification, calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset.
In one possible implementation, after receiving the service processing request sent by the first client, the processor 1101 is further configured to:
acquiring identity information of a first object;
according to the identity information of the first object, performing verification processing on the first object; wherein the verification process includes: any one or more of authority verification, identity verification, security verification and validity verification;
and if the verification processing of the first object is passed, triggering and executing the step of carrying out data analysis on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object.
In one possible implementation manner, service data in a service to be uplink is stored according to fields, wherein the fields comprise a first signature field and a second signature field; the processor 1101 performs data analysis on the service to be uplink to obtain first signature information of the second object and second signature information of the first object, and is configured to perform the following operations:
Data analysis is carried out on a first signature field in the service to be uplink so as to obtain first signature information of a second object from the first signature field;
and carrying out data analysis on the second signature field in the service to be uplink so as to acquire second signature information of the first object from the second signature field.
In one possible implementation, the fields corresponding to the service to be uplink further include a data field, where the data field is used to store the resource yield of the digital asset to be replaced; the processor 1101 invokes the asset replacement contract to perform a replacement process on the first digital asset and the second digital asset for performing the following operations:
analyzing the data field of the service to be uplink to obtain a first resource yield of the first digital asset to be replaced by the second object and a second resource yield of the second digital asset to be replaced by the first object;
invoking an asset replacement contract to transfer a first digital asset held by the second object to an account address of the first object according to the first asset yield; the method comprises the steps of,
and transferring the second digital asset held by the first object to the account address of the second object according to the second asset yield.
In this embodiment of the present application, a first client where a first object is located may obtain a target service order from a service system, where the target service order is used to request replacement processing for a first digital asset held by a second object, where the target service order includes first signature information of the second object; the business system is a system outside the blockchain, and is used for intensively displaying business orders submitted by one or more objects, wherein the target business orders refer to any business order in the business system; signature processing is carried out on the target service order by adopting a private key of the first object, a service to be uplink is generated, and the service to be uplink is used for indicating: replacing, on the blockchain, the first digital asset held by the second object involved in the target business order with the second digital asset held by the first object; generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object. Therefore, in the method, the first object and the second object can be matched based on the service system under the blockchain, the service system only needs to be responsible for collecting and centralizing display of the service orders and does not participate in a specific service processing process, the reliability of service processing between the first object and the second object can be ensured, meanwhile, the specific settlement process of the service orders is executed on the blockchain, and the reliability and the safety of the service execution process can be further ensured; in addition, redundant service orders are not required to be stored in the blockchain, and the service orders sent to the blockchain are orders with the service intention already achieved, so that the storage burden of the blockchain nodes can be reduced.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer storage medium, and the computer storage medium stores a computer program, where the computer program includes program instructions, when executed by a processor, can perform the method in the corresponding embodiment, and therefore, a detailed description will not be given here. For technical details not disclosed in the embodiments of the computer storage medium related 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 on one computer device or executed on multiple computer devices at one site or distributed across multiple sites and interconnected by a communication network.
According to one aspect of the present application, the present application embodiments also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device can perform the method in the foregoing corresponding embodiment, and therefore, a detailed description will not be given here.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable devices. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). Computer readable storage media can be any available media that can be accessed by a computer or data processing device, such as a server, data center, or the like, that contains an integration of one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, a hard Disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
In the present embodiment, the term "module" or "unit" refers to a computer program or a part of a computer program having a predetermined function, and works together with other relevant parts to achieve a predetermined object, and may be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Also, a processor (or multiple processors or memories) may be used to implement one or more modules or units. Furthermore, each module or unit may be part of an overall module or unit that incorporates the functionality of the module or unit.
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 (14)

1. The block chain-based service processing method is characterized by being applied to a first client where a first object is located, and comprises the following steps:
acquiring a target service order in a service system; the target service order is used for requesting replacement processing of a first digital asset held by a second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively displaying business orders submitted by one or more objects; the target service order refers to any one of the service orders in the service system;
Signing the target service order by adopting the private key of the first object to generate a service to be uplink; the service to be uplink is used for indicating: replacing, on a blockchain, a first digital asset held by a second object involved in the target business order with a second digital asset held by the first object;
generating a service processing request based on the service to be uplink, and sending the service processing request to a block chain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object.
2. The method of claim 1, wherein K service orders are displayed in the service system, and any one of the service orders carries an identification of a digital asset to be replaced and an asset amount; the obtaining the target service order in the service system comprises the following steps:
determining the identification of a first digital asset to be replaced, and determining M service orders to be selected from the K service orders according to the identification of the first digital asset, wherein M is a positive integer and M is less than or equal to K;
Acquiring the resource yield of each service order in the M service orders to be selected;
and determining the service order with the lowest asset quantity in the M service orders to be selected as a target service order.
3. The method of claim 2, wherein K service orders in the service system are displayed in order according to an ordering rule; wherein the ordering rule is used to specify any one of the following:
if the digital assets to be replaced in the K service orders are the same identification, sequencing and displaying the K service orders according to the sequence of low asset output to high asset output;
if the digital assets to be replaced in the K service orders are different identifications, sequencing and displaying the K service orders according to the order hanging time from the near to the far; wherein the order hanging time refers to the time when the service order is uploaded to the service system;
and sequencing and displaying the K business orders according to the priority of the asset types of the digital assets.
4. The method of claim 1, wherein the method further comprises:
acquiring a first type of the first digital asset and acquiring a second type of the second digital asset;
If the first type or the second type is the preset type, encrypting the service data of the service to be uplink to obtain encrypted service data;
and generating a service processing request according to the encrypted service data.
5. The method of any one of claims 1-4, wherein the target business order carries an identification of a first digital asset to be replaced by the second object and a first asset yield; and storing the service data in the service to be uplink according to fields, wherein the fields comprise: a first signature field, a second signature field, and a data field; the method further comprises the steps of:
acquiring the identification of a second digital asset to be replaced by the first object and a second asset yield;
adding the identification and the first resource yield of the first digital asset to be replaced of the second object and the identification and the second resource yield of the second digital asset to be replaced of the first object to the data field of the service to be uplink;
wherein first signature information of the second object is recorded into the first signature field, and second signature information of the first object is recorded into the second signature field.
6. A method of blockchain-based business processing, characterized by being applied to blockchain nodes, the method comprising:
receiving a service processing request sent by a first client; the service processing request is used for requesting to process a service to be uplink, the service to be uplink is generated after signing a target service order, and the target service order is acquired from a service system by the first client; the service to be uplink is used for indicating: replacing, on a blockchain, a first digital asset held by a second object involved in the target business order with a second digital asset held by the first object;
carrying out data analysis on the service to be uplink to obtain first signature information of the second object and second signature information of the first object;
verifying the second object based on the first signature information of the second object; the method comprises the steps of,
verifying the first object based on second signature information of the first object;
and if the second object and the first object pass verification, invoking an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset.
7. The method of claim 6, wherein after receiving the service processing request sent by the first client, further comprising:
acquiring identity information of the first object;
according to the identity information of the first object, performing verification processing on the first object; wherein the verification process includes: any one or more of authority verification, identity verification, security verification and validity verification;
and if the verification processing of the first object is passed, triggering and executing the step of carrying out data analysis on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object.
8. The method according to claim 6 or 7, wherein the service data in the service to be uplink is stored according to fields, the fields including a first signature field and a second signature field; the step of carrying out data analysis on the service to be uplink to obtain the first signature information of the second object and the second signature information of the first object comprises the following steps:
data analysis is carried out on a first signature field in the service to be uplink so as to acquire first signature information of the second object from the first signature field;
And carrying out data analysis on the second signature field in the service to be uplink to acquire second signature information of the first object from the second signature field.
9. The method of claim 8, wherein the fields corresponding to the service to be uplink further comprise a data field for storing a resource yield of the digital asset to be permuted; the invoking an asset replacement contract performs a replacement process on the first digital asset and the second digital asset, comprising:
analyzing the data field of the service to be uplink to obtain a first resource yield of a first digital asset to be replaced by the second object and a second resource yield of a second digital asset to be replaced by the first object;
invoking an asset replacement contract to transfer a first digital asset held by the second object to an account address of the first object according to the first asset yield; the method comprises the steps of,
and transferring a second digital asset held by the first object to an account address of the second object according to the second asset yield.
10. The block chain-based service processing device is characterized by being applied to a first client where a first object is located; the device comprises:
The acquisition unit is used for acquiring a target service order in the service system; the target service order is used for requesting replacement processing of a first digital asset held by a second object, and the target service order comprises first signature information of the second object; the business system is a system outside the blockchain and is used for intensively publishing business orders submitted by one or more objects; the target service order refers to any one of the service orders in the service system;
the processing unit is used for signing the target service order by adopting the private key of the first object to generate a service to be uplink; the service to be uplink is used for indicating: replacing, on a blockchain, a first digital asset held by a second object involved in the target business order with a second digital asset held by the first object;
a sending unit, configured to generate a service processing request based on the service to be uplink, and send the service processing request to a blockchain; the service processing request is used for triggering: invoking an asset replacement contract in the blockchain transfers a first digital asset held by the second object into an account of the first object and transfers a second digital asset held by the first object into an account of the second object.
11. A block chain based service processing device, which is characterized by being applied to a block chain node; the device comprises:
the receiving unit is used for receiving the service processing request sent by the first client; the service processing request is used for requesting to process a service to be uplink, the service to be uplink is generated after signing a target service order, and the target service order is acquired from a service system by the first client; the service to be uplink is used for indicating: replacing, on a blockchain, a first digital asset held by a second object involved in the target business order with a second digital asset held by the first object;
the processing unit is used for carrying out data analysis on the service to be uplink to obtain first signature information of the second object and second signature information of the first object;
the processing unit is further used for verifying the second object based on the first signature information of the second object; and verifying the first object based on second signature information of the first object;
and the processing unit is further used for calling an asset replacement contract to execute replacement processing on the first digital asset and the second digital asset if the second object and the first object pass verification.
12. A computer device, comprising: a memory device and a processor;
a memory in which one or more computer programs are stored;
a processor for loading the one or more computer programs to implement the blockchain-based business processing method of any of claims 1-5 or 6-9.
13. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program adapted to be loaded by a processor and to perform the blockchain based service processing method according to any of claims 1-5 or 6-9.
14. A computer program product, characterized in that the computer program product comprises a computer program adapted to be loaded by a processor and to perform the blockchain based service processing method according to any of claims 1-5 or 6-9.
CN202311528919.3A 2023-11-15 2023-11-15 Block chain-based service processing method, device, equipment, medium and product Pending CN117406930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311528919.3A CN117406930A (en) 2023-11-15 2023-11-15 Block chain-based service processing method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311528919.3A CN117406930A (en) 2023-11-15 2023-11-15 Block chain-based service processing method, device, equipment, medium and product

Publications (1)

Publication Number Publication Date
CN117406930A true CN117406930A (en) 2024-01-16

Family

ID=89497984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311528919.3A Pending CN117406930A (en) 2023-11-15 2023-11-15 Block chain-based service processing method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN117406930A (en)

Similar Documents

Publication Publication Date Title
US11030681B2 (en) Intermediate blockchain system for managing transactions
CN110493007B (en) Block chain based information verification method, device, equipment and storage medium
CN110121727B (en) Method and system for providing authenticated, auditable and immutable input for intelligent contracts
CN110383791B (en) Map application crowdsourcing based on blockchain
US11568401B2 (en) Digital payment system
CN110597925A (en) Cross-chain data processing method and device based on block chain
CN112506747B (en) Business process monitoring method and device, electronic equipment and storage medium
CN110599331B (en) Liability collection system, method, equipment and storage medium based on blockchain
CN108920257B (en) Transaction processing method, device, equipment and storage medium
CN112613877A (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN112418859B (en) Block chain consensus method and device, electronic equipment and readable storage medium
CN112035350B (en) Test method and device for block chain system and computer equipment
US20220036323A1 (en) Electronic wallet allowing virtual currency expiration date
CN114971827A (en) Account checking method and device based on block chain, electronic equipment and storage medium
Dash et al. Artificial intelligence models for blockchain-based intelligent networks systems: Concepts, methodologies, tools, and applications
CN110858211B (en) Data storage method, device and system and storage medium
CN116360769A (en) Code generation method, device, equipment and storage medium
CN108052842A (en) Storage, verification method and the device of signed data
CN117406930A (en) Block chain-based service processing method, device, equipment, medium and product
CN115099800A (en) Block chain based method and device for transferring poor asset data
CN110910091A (en) Data processing method, device and medium
CN111127003B (en) Wallet account payment method, device and storage medium
CN112967049B (en) Method and device for issuing receivable through block chain
CN117335976A (en) Block chain-based key processing method, device, equipment, medium and product
CN112561384B (en) Engine-based data processing method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication