Data processing method, device and electronic device based on blockchain system

Through the smart contract of the blockchain system, the problem of low efficiency and insufficient security of traditional resource settlement is solved, and efficient and accurate resource settlement and data security is achieved.

CN111311407BActive Publication Date: 2024-11-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010082376.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-07
Publication Date
2024-11-12
Estimated Expiration
2040-10-30

AI Technical Summary

Technical Problem

Traditional resource settlement methods are inefficient and have low accuracy, and centralized systems are vulnerable to attacks, resulting in high risk of leaking settlement records and tampering.

Method used

The blockchain system is used to divide data processing into accounting node subnetwork and business node subnetwork. Through smart contracts, resource query, update and settlement requests are processed to improve the efficiency and accuracy of data processing, and ensure that through decentralized accounting Data security.

Benefits of technology

It improves the efficiency and accuracy of resource settlement, avoids manual participation and data omission errors, ensures the transparency and immutability of data processing, and reduces the risk of attack.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111311407B_ABST
    Figure CN111311407B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method, device and electronic device based on a blockchain system, and relates to the field of blockchain. The blockchain system includes a business node subnetwork and an accounting node subnetwork, the business node subnetwork includes a business node, the accounting node subnetwork includes an accounting node, the data processing method is executed by the accounting node, and the data processing method includes: receiving a data processing request sent by the business node; parsing the data processing request to obtain the type of the data processing request; calling a target logic module from a smart contract stored in the accounting node subnetwork according to the type of the data processing request, processing valid data corresponding to the data processing request through the target logic module, and returning the processing result to the business node. The present disclosure improves the efficiency and accuracy of data processing by performing data processing through simplified and standardized smart contracts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of blockchain technology, and in particular to a data processing method based on a blockchain system, a data processing device based on a blockchain system, a computer storage medium, and an electronic device. Background Art

[0002] Resource settlement is very common in modern business cooperation. For example, in the fields of e-commerce, online travel, online ticketing, etc., it usually involves resource settlement between the platform and merchants.

[0003] Traditional resource settlement is carried out centrally by the settlement party. The settlement party collects the transaction data of the platform party, classifies the transaction data by merchants, and generates a settlement statement according to the calculation method specified in the merchant contract; then the settlement statement is sent to the platform party and the merchant for reconciliation confirmation. The platform and the merchant review it manually or through program automation methods. If there is a dispute in the bill, it will be manually negotiated and handled; finally, after the platform party and the merchant confirm that it is correct, the settlement party initiates the settlement payment. The settlement process of this settlement method is long, requires manual participation, is inefficient, and the settlement results will be inaccurate due to reasons such as data omissions. In addition, in a centralized settlement system, if the settlement party is attacked maliciously, a large number of settlement records will be leaked and tampered with, causing the platform party and the merchant to suffer significant economic losses.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The embodiments of the present disclosure provide a data processing method based on a blockchain system, a data processing device based on a blockchain system, a computer storage medium, and an electronic device, which can improve settlement efficiency and accuracy at least to a certain extent.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of an embodiment of the present disclosure, there is provided a data processing method based on a blockchain system, wherein the blockchain system comprises a business node subnetwork and an accounting node subnetwork, wherein the business node subnetwork comprises a business node, and the accounting node subnetwork comprises an accounting node, wherein the data processing method is executed by the accounting node, and wherein the data processing method comprises: receiving a data processing request sent by the business node; parsing the data processing request to obtain the type of the data processing request; calling a target logic module from a smart contract stored in the accounting node subnetwork according to the type of the data processing request, processing valid data corresponding to the data processing request through the target logic module, and returning the processing result to the business node.

[0008] According to one aspect of an embodiment of the present disclosure, there is provided a data processing device based on a blockchain system, wherein the blockchain system comprises a business node subnetwork and an accounting node subnetwork, wherein the business node subnetwork comprises a business node, the accounting node subnetwork comprises an accounting node, the accounting node comprises the data processing device, and the data processing device comprises: a first receiving module, configured to receive a data processing request sent by the business node; a parsing module, configured to parse the data processing request to obtain the type of the data processing request; and a processing module, configured to call a target logic module from a smart contract stored in the accounting node subnetwork according to the type of the data processing request, process valid data corresponding to the data processing request through the target logic module, and return the processing result to the business node.

[0009] In some embodiments of the present disclosure, based on the aforementioned scheme, the smart contract includes a contract framework and a business custom interface, wherein the contract framework is formed according to the common logic of resource settlement and contains multiple logic modules corresponding to the sub-logics in the common logic; the business custom interface is constructed according to the data class corresponding to the sub-logic.

[0010] In some embodiments of the present disclosure, the contract framework includes a scheduler; based on the aforementioned scheme, the first receiving module is configured to: receive the data processing request sent by the blockchain application program interface in the blockchain system through the scheduler.

[0011] In some embodiments of the present disclosure, the sub-logic includes resource logic, contract logic and settlement logic; the logic module includes a resource logic module, a contract logic module and a settlement logic module; the data class includes a resource class, a contract class and a settlement class; the business custom interface includes a resource class custom interface, a contract class custom interface and a settlement class custom interface.

[0012] In some embodiments of the present disclosure, based on the aforementioned scheme, the data processing device is configured to: define the business logic in the smart contract through one or more of the resource class custom interface, the contract class custom interface and the settlement class custom interface; wherein the business logic corresponding to the resource class custom interface includes: a method for generating a resource identifier, a method for verifying the legality of a resource, a method for storing and reading a resource, and a method for querying a contract associated with a resource; the business logic corresponding to the contract class custom interface includes: a method for generating a contract identifier, a method for verifying the legality of a contract, a method for storing and reading a contract, and a method for settling a contract; the business logic corresponding to the settlement class custom interface includes: a method for generating a settlement bill identifier, and a method for storing and reading a settlement bill.

[0013] In some embodiments of the present disclosure, the type of the data processing request includes any one or more of a resource query request, a resource update request, a contract query request, a contract update request or a resource settlement request; the valid data includes valid resources and valid contracts; based on the aforementioned scheme, the processing module includes: a first processing unit, which is used to call the resource logic module in the smart contract when the type of the data processing request is a resource query request and / or a resource update request, and query and / or update the valid resources based on the resource logic in the resource logic module; or, a second processing unit, which is used to call the contract logic module in the smart contract when the type of the data processing request is a contract query request and / or a contract update request, and query and / or update the valid contract based on the contract logic in the contract logic module; or, a third processing unit, which is used to settle according to the public logic in the contract framework, the valid resources and the valid contract when the type of the data processing request is a resource settlement request.

[0014] In some embodiments of the present disclosure, based on the aforementioned scheme, the third processing unit includes: a contract determination unit, used to determine the contract corresponding to the effective resources based on the effective resources; a resource settlement unit, used to settle the effective resources according to the settlement rules in the contract corresponding to the effective resources, and generate a settlement slip based on the effective resources and the settlement results corresponding to the effective resources.

[0015] In some embodiments of the present disclosure, based on the aforementioned scheme, the contract determination unit is configured to: obtain a resource identifier corresponding to the valid resource; determine the contract identifier corresponding to the resource identifier based on the resource identifier and the resource contract identifier relationship table in the accounting node; and determine the contract corresponding to the valid resource based on the contract identifier.

[0016] In some embodiments of the present disclosure, based on the aforementioned solution, the data processing device is further configured to: add a label to the valid resource or delete the valid resource.

[0017] In some embodiments of the present disclosure, based on the aforementioned scheme, the data processing device is further configured to: obtain an identifier of the settlement order to be queried, and obtain a target settlement order from the accounting node according to the identifier of the settlement order to be queried.

[0018] In some embodiments of the present disclosure, the business node subnetwork includes a first business node and a second business node associated with the first business node; the valid data includes valid resources and valid contracts; based on the aforementioned scheme, the data processing device includes: a second receiving module, used to receive the first resource and the first contract uploaded by the first business node, and receive the second resource and the second contract uploaded by the second business node; a verification module, used to verify the first resource and the second resource through the smart contract to obtain the valid resource, and verify the first contract and the second contract to obtain the valid contract.

[0019] In some embodiments of the present disclosure, based on the aforementioned scheme, the verification module is configured to: match the resource identifier of the first resource with the resource identifier of the second resource; if they match, determine that the first resource and the second resource are the valid resources; at the same time, match the contract identifier of the first contract with the contract identifier of the second contract; if they match, determine that the first contract and the second contract are the valid contracts.

[0020] In some embodiments of the present disclosure, based on the aforementioned solution, the data processing device further includes: a third receiving module, configured to receive valid resources and valid contracts uploaded by the first service node and the second service node to form the valid data.

[0021] According to one aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the data processing method based on the blockchain system as described in the above embodiment is implemented.

[0022] According to one aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the data processing method based on the blockchain system as described in the above embodiment.

[0023] In the technical solution provided by the embodiment of the present disclosure, the blockchain system is divided into an accounting node subnetwork and a business node subnetwork, the accounting node subnetwork includes accounting nodes, and the business node subnetwork includes business nodes. When data processing is performed through the accounting node, the data processing request sent by the business node is first received; then the data processing request is parsed to obtain the corresponding data processing type; finally, the target logic module is called from the smart contract stored in the accounting node subnetwork according to the data processing type, and the valid data corresponding to the data processing request is processed by the target logic module, and the processing result is returned to the business node. The technical solution of the present disclosure can perform data processing based on the blockchain system. On the one hand, it avoids manual participation in data processing and improves the efficiency of data processing; on the other hand, it avoids the accuracy of data processing results caused by data omissions or program errors, and improves the accuracy of data processing.

[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0026] Figures 1 to 3 A schematic diagram of the system architecture of a blockchain system applied in one embodiment of the present disclosure is shown;

[0027] Figure 4 The flowchart of a data processing method based on a blockchain system according to an embodiment of the present disclosure is schematically shown;

[0028] Figure 5 The following schematically shows an architecture diagram of a smart contract according to an embodiment of the present disclosure;

[0029] Figure 6 The following schematically shows an architecture diagram of a smart contract according to an embodiment of the present disclosure;

[0030] Figure 7 The following schematically shows a flow chart of checking the validity of resources and contracts according to an embodiment of the present disclosure;

[0031] Figure 8 A schematic diagram of a resource settlement process according to an embodiment of the present disclosure is shown schematically;

[0032] Fig. 9 A schematic diagram of a process of determining a contract corresponding to a valid resource according to an embodiment of the present disclosure is shown;

[0033] Fig.10 A schematic diagram of a fund settlement process according to an embodiment of the present disclosure is schematically shown;

[0034] Fig.11 A block diagram of a data processing device based on a blockchain system according to an embodiment of the present disclosure is schematically shown;

[0035] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0036] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.

[0037] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0039] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0040] Figure 1The system architecture of a blockchain system used in an embodiment of the present invention is shown. The blockchain system includes an accounting node subnetwork 2 and a business node subnetwork 1. The accounting node subnetwork 2 includes accounting nodes 21 that reach consensus on data blocks and record the data blocks on the blockchain. The business node subnetwork 1 includes business nodes 11, which can verify the data blocks recorded by the accounting nodes on the blockchain, or request corresponding settlement data from the accounting nodes.

[0041] Specifically, the verification of the data block recorded by the accounting node on the blockchain by the business node 11 may include the following steps: an accounting node 21 in the accounting node subnetwork generates a signature based on the information to be included in a data block to be added to the blockchain using a key specific to the accounting node; the accounting node 21 adds the information to be included and the generated signature to the data block and adds it to the blockchain; the accounting node 21 sends the signature to the business node in the business node subnetwork, and the business node verifies the signature according to the key specific to the accounting node, so that the business node 11 verifies the data block recorded by the accounting node on the blockchain. The accounting node in the accounting node subnetwork is responsible for recording the data block to the blockchain, and the business node in the business node subnetwork is responsible for witnessing the result recorded by the accounting node. Specifically, the accounting node generates a signature based on the information to be included in a data block to be added to the blockchain, and then adds the information to be included and the generated signature to the data block for uploading. The signature is sent to the business node in the business node subnetwork, so that the business node verifies the signature according to the key specific to the accounting node. The business node in the business node subnetwork can witness the data of the entire network by verifying the signature of the accounting node on the block. Although the accounting network has a monopoly on the right to keep accounts, because the data block has a digital signature representing the identity of the accountant, all actions are publicly traceable. If the accounting nodes collectively commit evil, then all nodes in the witness network will retain evidence of the specific accounting node's evil deeds. Compared with traditional centralized systems and private chains, the operation of the system in this solution is more transparent; and compared with traditional decentralized public chain solutions, this solution is more controllable and easier to regulate.

[0042] In one embodiment of the present invention, the accounting node subnetwork 2 and the business node subnetwork 1 can be connected through the proxy node 12. The proxy node 12 can be a business node of the business node subnetwork 1, which is responsible for transmitting the information that the accounting node 21 wants to transmit to the business node 11 to the business node 11. The business node 11 is a terminal that generates various data that need to be uploaded to the chain, and can also be a terminal that queries settlement data from the accounting node subnetwork 2. The data to be uploaded to the chain generated by the business node 11 is transmitted to the accounting node 21 through the proxy node 12, and then recorded on the blockchain after consensus, which is conducive to the unified processing and supervision of data, and the business node 11 can also supervise and witness the upload of the data to be uploaded to the chain through the information sent by the accounting node 21 via the proxy node 12, which is of great significance in some scenarios where unified supervision is required but the nodes under supervision are afraid of collective cheating and thus need supervision.

[0043] exist Figure 1 In the structure shown, the service node subnetwork 1 adopts the P2P network mode. The P2P network is a distributed application architecture that distributes tasks and workloads between peers. It is a networking or network form formed by the peer computing model at the application layer, that is, a "point-to-point" or "end-to-end" network. It can be defined as: the participants of the network share part of their hardware resources (processing power, storage capacity, network connection capacity, printer, etc.), these shared resources provide services and content through the network, and can be directly accessed by other peer nodes without going through an intermediate entity. The participants in this network are both providers of resources, services and content, and acquirers of resources, services and content. Therefore, in the service node subnetwork 1, when the proxy node 12 receives the message transmitted from the accounting node 21, it propagates to the surrounding service nodes 11, and the surrounding service nodes 11 receive the message and then transmit it to the surrounding service nodes 11, so as to achieve the propagation of the message between each service node 11 of the service node subnetwork 1.

[0044] Figure 2 The system architecture of another blockchain system used in the embodiment of the present invention is shown. Figure 1 The difference between the system architecture shown in is that the P2P network mode is not adopted in the service node subnetwork 1, but the broadcast network mode is adopted. Specifically, after receiving the message transmitted from the accounting node 21, the proxy node 12 broadcasts the message to other service nodes 11 in the service node subnetwork 1. In this way, the message is also propagated between each service node 11 in the service node subnetwork 1.

[0045] Figure 3 The system architecture of another blockchain system used in the embodiment of the present invention is shown. Figure 1The difference in the system architecture shown is that its accounting node subnetwork 2 is divided into multiple branch accounting node subnetworks. The accounting nodes in each branch accounting node subnetwork can be responsible for the consensus and chaining of a certain type of information to be chained. For example, a resource link on a platform is clicked by a user, and the platform and the merchant need to settle resources based on information such as the number of clicks. The settlement request needs to be chained on the blockchain, and the settlement result after settlement also needs to be chained on the blockchain. At this time, in order to facilitate the management of chained information, the accounting nodes in one branch accounting node subnetwork are specifically responsible for the consensus and chaining of the settlement request, and the accounting nodes in another branch accounting node subnetwork are specifically responsible for the consensus and chaining of the settlement result.

[0046] It should be noted that in Figures 1 to 3 In the architecture of the blockchain system shown, the proxy node 12 is located in the business node subnetwork 1. In other embodiments of the present invention, the proxy node 12 may also be located in the consensus node subnetwork 3, or independent of the business node subnetwork 1 and the consensus node subnetwork 3.

[0047] In the relevant technologies in this field, taking resource settlement as an example, the settlement is usually handled by the platform or an independent third party as the settlement party. The specific processing process is: first, the settlement party collects the transaction data of the platform, classifies the transaction data by merchant, and generates a settlement statement in accordance with the calculation method specified in the merchant contract; then the settlement statement is sent to the platform and the merchant for reconciliation confirmation, and the platform and the merchant review it manually or through automated procedures. If there is a dispute over the bill, it is manually negotiated; finally, after the platform and the merchant have confirmed that it is correct, the settlement party initiates settlement payment.

[0048] The above resource settlement method has the following problems:

[0049] (1) Settlement rules are usually complicated, involving a variety of actions such as floating profit-sharing ratios, discounts and promotions, and refunds. If they are calculated manually, errors are likely to occur. If they are processed by a computer program, it is difficult for either party to trust the other party's calculation results, and each party must independently recalculate the results through the program. The programs are developed independently by each party, and are prone to program errors or loopholes, resulting in inconsistent bills.

[0050] (2) Even if the automated settlement process is accurate, since the process needs to run in different environments of multiple parties, there may be situations where one party’s transaction data is missed or the settlement is repeated.

[0051] (3) The settlement process is long. The reconciliation process requires multiple confirmations from the settlement party, the platform party, and the merchant, and requires manual participation, which is inefficient.

[0052] In view of the problems existing in the related technologies, this disclosure proposes a data processing method based on a blockchain system, which can be used for resource settlement and Figures 1 to 3 The architecture of the blockchain system shown can be applied in the application scenario of resource settlement, which is described in detail below:

[0053] In one embodiment of the present invention, each service node in the service node subnetwork may be a platform terminal, a merchant terminal, a personal user terminal, etc. The accounting nodes in the accounting node subnetwork may be various resource settlement party terminals, such as bank terminals deployed in multiple regions as accounting nodes to form an accounting node subnetwork. The resource settlement party and the platform party may also be the same organization, and the platform party signs a contract with the merchant to provide a platform for the merchant's resources and conduct resource settlement.

[0054] The smart contract in the accounting node subnetwork stores the control logic of resource settlement, such as information that various types of business nodes can access (such as resource information provided by the platform or merchant, contract information provided by the platform or merchant, settlement orders obtained based on resource information and contract information settlement, etc.), updates of resource information by the platform or merchant, updates of contract information by the platform or merchant, etc. When the accounting node in the accounting node subnetwork receives a data processing request (such as a resource settlement request) sent by a business node in the business node subnetwork, it determines the target logic module corresponding to the data processing request according to the above-mentioned smart contract stored in the accounting node subnetwork, and then processes the valid data corresponding to the data processing request through the target logic module, and returns the processing result of the data processing request to the business node. It can be seen that the technical solution of the embodiment of the present invention can conveniently manage various control logics in the data processing process through smart contracts, effectively improving the efficiency of data processing.

[0055] The implementation details of the data processing method based on the blockchain system according to the embodiment of the present invention are described in detail below:

[0056] The present disclosure first provides a data processing method based on a blockchain system. Figure 4 The flowchart of a data processing method based on a blockchain system according to an embodiment of the present disclosure is schematically shown as follows: Figures 1 to 3 As shown, the blockchain system includes an accounting node subnetwork 2 and a business node subnetwork 1. The accounting node subnetwork 2 includes an accounting node 21, and the business node subnetwork 1 includes a business node 11. Figure 4 The data processing method of the blockchain system shown can be executed by the accounting node 21 in the accounting node subnetwork 2. Figure 4 As shown, the data processing method based on the blockchain system includes at least steps S410 to S430, which are described in detail as follows:

[0057] In step S410, a data processing request sent by a service node is received.

[0058] In one embodiment of the present disclosure, during the fund settlement, three parties are usually involved, namely, the platform, the merchant and the settlement party. The platform provides the platform with access to multiple merchants, and the merchants provide goods or services on the platform. The settlement party is responsible for settling the revenue share between the merchants and the platform. The settlement party and the platform party can be the same organization, or a neutral third-party institution, such as a bank, a professional accounting institution, etc. For example, the platform party is a large e-commerce platform, the merchant is a garment processing factory, and the settlement party is a bank. The large e-commerce platform can sign a contract with the garment processing factory to provide a sales platform for the garment processing factory. The garment processing factory can upload information such as product photos and introductions to the platform, and the user can purchase the product by clicking on the product link on the platform. When the user clicks to purchase the product, the fund settlement between the large e-commerce platform and the garment processing factory is triggered. During the fund settlement, the bank calculates the respective incomes of the large e-commerce platform and the garment processing factory according to the settlement rules recorded in the contract. However, after settlement, the bank still needs to reconcile the accounts between the merchant and the platform. There may be inconsistencies in the bills of both parties. Therefore, in order to ensure the openness and transparency of the settlement process, settlement can be based on the blockchain system, and transparent settlement can be carried out through jointly reviewed smart contracts to ensure that the data cannot be tampered with and the settlement process is traceable.

[0059] In one embodiment of the present disclosure, the blockchain system includes a business node subnetwork 1 and an accounting node subnetwork 2. The business node 11 in the business node subnetwork 1 can directly send a data processing request to the accounting node 21 in the accounting node subnetwork 2, or first send the data processing request to the proxy node 12, and the proxy node 12 forwards the data processing request to the accounting node 21, and then responds to the data processing request through the accounting node 21, calling the smart contract stored in the accounting node subnetwork 2 for corresponding processing.

[0060] In one embodiment of the present disclosure, the business node subnetwork 1 may specifically include a first business node and a second business node associated with the first business node, wherein the first business node may be a node corresponding to the platform terminal in the blockchain system, and the second business node may be a node corresponding to the merchant terminal in the blockchain system, and of course, they may also be interchangeable, with the node corresponding to the platform terminal in the blockchain system being the second business node, and the node corresponding to the merchant terminal in the blockchain system being the first business node, which is not specifically limited in the present disclosure embodiment. The goods or services provided by merchants on the platform are collectively referred to as resources, and merchants obtain income by providing resources to the platform. In order to settle the income sharing between merchants and platform parties, resources and contracts may be uploaded to the blockchain through the first business node and the second business node, and then the resources and contracts may be consensused and chained through the accounting node 21. Finally, when the user triggers the resource in the platform, and the merchant or platform party updates the resource and / or contract, the business node 11 sends a data processing request to the accounting node 21, and the accounting node 21 responds to the data processing request and calls the target logic module in the smart contract for data processing.

[0061] In step S420, the data processing request is parsed to obtain the type of the data processing request.

[0062] In one embodiment of the present disclosure, the data processing request has different types according to the different processing objects. In the embodiment of the present disclosure, the types of data processing requests include any one or more of resource query request, resource update request, contract query request, contract update request or resource settlement request. Since the data processing request includes multiple different types of requests, in order to call the target logic module corresponding to the data processing request in the smart contract, after receiving the data processing request, it is necessary to parse the data processing request to obtain the type corresponding to the data processing request, and call the target logic module in the smart contract according to the type of the data processing request to perform corresponding data processing.

[0063] In one embodiment of the present disclosure, since a platform can sign contracts with multiple merchants, each merchant corresponds to one or more businesses, and different businesses have different settlement rules, if the merchant or the platform develops smart contracts according to business needs, it may lead to too many types of smart contracts and too many loopholes. In addition, the smart contract on the blockchain is a public data processing method that requires multiple participants to jointly review, and reviewing smart contracts requires a certain computer programming foundation, which is relatively difficult for merchants and even platforms. In view of this, in the embodiment of the present disclosure, a smart contract is formed according to the logic of resource settlement, Figure 5 The architecture diagram of the smart contract is shown as Figure 5As shown, the smart contract 500 includes a contract framework 501 and a business custom interface 502. The contract framework 501 is formed according to the public logic of resource settlement and contains multiple logic modules; the business custom interface 502 is constructed according to the data class corresponding to the sub-logic in the public logic. The public logic is a common process in the resource settlement process. For example, when calculating the respective incomes of merchants and platform parties, the public logic is to generate a settlement slip for settlement based on resources and contracts. Then, according to the public logic, it can be determined that the sub-logic corresponding to the public logic includes resource logic, contract logic and settlement logic. Accordingly, resource logic modules, contract logic modules and settlement logic modules can be set in the contract framework. However, different businesses have different corresponding resources and contracts, so different business developers can define different business logics for different logic modules. The smart contract in the embodiment of the present disclosure is composed of a contract framework and a business custom interface, which makes the smart contract simpler and more standardized. The use of the smart contract for settlement can improve settlement efficiency and accuracy, and avoid the situation where there are too many and too complicated smart contracts developed by different merchants or platforms, and the settlement result error is too large due to loopholes.

[0064] In one embodiment of the present disclosure, in order to facilitate developers of different businesses to define different business logics, corresponding data classes can be abstracted from the logic modules in the contract framework 501, and business custom interfaces 502 can be constructed based on the contract framework 501 according to the data classes, so that the contract framework 501 can complete the call and execution of the business custom interfaces 502. Among them, the data classes abstracted from the logic modules are resource classes, contract classes, and settlement classes, respectively, and correspondingly, the business custom interfaces 502 constructed from the data classes are resource class custom interfaces, contract class custom interfaces, and settlement class custom interfaces, respectively. Through any one or more of the resource class custom interfaces, contract class custom interfaces, and settlement class custom interfaces, developers of various businesses can implement custom business logic.

[0065] In one embodiment of the present disclosure, Figure 6 The architecture diagram of the smart contract is shown as Figure 6As shown, the contract framework 501 includes a scheduler 601, a resource logic module 602, a contract logic module 603, a settlement logic module 604 and a storage module 605, and the business custom interface 502 includes a resource class custom interface 606, a contract class custom interface 607 and a settlement class custom interface 608. Among them, the scheduler 601 can receive a data processing request sent by the blockchain application program interface of the blockchain system, and the data processing request is also a call request for the smart contract. After receiving the data processing request, the data processing request can be parsed by the scheduler to obtain the type of the data processing request, and then the corresponding logic module in the contract framework 501 can be called according to the type of the data processing request, and the data processing is performed by the logic module with the preset business logic.

[0066] In one embodiment of the present disclosure, corresponding business logic may be defined through the business customization interface 502, specifically:

[0067] The business logic corresponding to the resource class custom interface 606 may include: (1) a method for generating a resource identifier; a unique identifier of a resource may be generated by the method for generating a resource identifier. In the embodiment of the present disclosure, any method may be used to generate a resource identifier, for example, the resource type, resource chain serial number, merchant code, and platform code may be generated according to a preset combination method, such as a resource identifier F00356AK456TB001, where F represents that the resource is a food type, 00356 is the chain serial number of the resource, AK456 is the merchant code, and TB001 is the platform code. (2) a method for verifying the legality of a resource; the legality of a resource may be verified based on the specific attribute information of the resource corresponding to the data processing request, for example, whether the length and composition of the resource identifier conform to the preset rules, etc. (3) a method for storing and reading resources; a storage module 605 is provided in the contract framework 501, through which newly added resources and resources to be updated may be added or updated to the storage medium, and the stored resources may also be read from the storage medium. When adding or updating resources, resources can be persisted to storage media through serialization. Serialization is the process of converting resource information into a byte stream that can be stored or transmitted. The storage medium can be a network, memory, disk, etc. When querying resources, they can be read from the storage medium through deserialization. Deserialization is the process of converting a byte stream into a resource. (4) Query method for the contract associated with the resource. When settling, settlement must be made according to the settlement rules in the resource and the contract corresponding to the resource. Therefore, when settling a resource, the corresponding contract can be queried based on the resource, for example, the corresponding contract can be queried based on the resource identifier corresponding to the resource.

[0068] The business logic corresponding to the contract class custom interface 607 may include: (1) a method for generating a contract identifier; a unique identifier of a contract may be generated by the method for generating a contract identifier. The method for generating the contract identifier may also adopt any generation method. The generation method may be the same as or different from the method for generating a resource identifier. The disclosed embodiment does not specifically limit this. For example, the contract type, the contract chain serial number, the merchant code, and the platform code may be generated by combining them according to a preset combination method. For example, a contract identifier is B01215AK456TB001, where B is the contract type, 01215 is the contract chain serial number, AK456 is the merchant code, and TB001 is the platform code. It is worth noting that the contract type may be a type identifier customized by the platform according to the nature of the merchant, for example, A represents a contract signed with a state-owned enterprise, B represents a contract signed with a private enterprise, C represents a contract signed with an individual merchant, and so on. (2) Contract legality verification method: According to the contract legality verification method, the legality of the contract can be verified, for example, the resource identification, resource supply conditions, settlement rules, etc. in the contract can be verified. If there are illegal objects, the contract is judged to be illegal. (3) Contract storage and reading method: Similar to resources, after the business node uploads the contract to the accounting node, it calls the smart contract stored in the accounting node subnetwork, and stores the contract in a storage medium such as a disk through the storage module 605 in the contract framework of the smart contract. In order to facilitate the subsequent reading of the contract, the serialization method can be used to persist the contract to a storage medium such as a disk. When reading, it only needs to be read from the storage medium such as a disk through the deserialization method. (4) Contract settlement method: This settlement method is used to describe the settlement rules of resources, specifically involving the capital allocation ratio and calculation method of merchants and platform parties.

[0069] The business logic corresponding to the settlement class custom interface 608 includes: (1) the method for generating the settlement form identifier; the settlement form represents the result after the resources are settled according to the contract. It can be inherited from the resource class and extend the members to save the settlement results. That is to say, the settlement form includes the resources and the settlement results corresponding to the resources. After the resources are settled and the settlement form is generated, the settlement form identifier can be generated according to the method defined by the business personnel. The method for generating the settlement form identifier can also be any generation method, for example, it can be generated based on the resource identifier and the contract identifier corresponding to the resource, or it can be generated based on the resource identifier, etc. (2) the method for storing and reading the settlement form; similar to the storage and reading of resources and contracts, the settlement form can be persisted to a storage medium such as a disk by a serialization method through the storage module 605, and the settlement form can be read from a storage medium such as a disk by a deserialization method.

[0070] In step S430, the target logic module is called from the smart contract stored in the accounting node subnetwork according to the type of data processing request, the valid data corresponding to the data processing request is processed by the target logic module, and the processing result is returned to the business node.

[0071] In one embodiment of the present disclosure, based on the above-mentioned business logic corresponding to each business custom interface, query or update of resources or contracts can be realized, and settlement of resources can also be realized. When the data processing request is resource query and / or resource update, the resource logic module can be called to query and / or update the resources based on the resource logic in the resource logic module; when the data processing request is contract query and / or contract update, the contract logic module can be called to query and / or update the contract based on the contract logic in the contract logic module; when the data processing request is a resource settlement request, settlement can be performed based on the public logic, resources and contracts in the contract framework.

[0072] In one embodiment of the present disclosure, the data processing request may include the type of data processing request and the data to be processed, or may include the type of data processing request and identification information of the data to be processed, or may include the type of data processing request, the data to be processed, and identification information of the data. Of course, it may also be in other forms of composition, for example, it may include the type of data processing request and one or more hash values. The hash value may be formed by hashing the resource / contract after the accounting node receives the resource / contract, or it may be formed by hashing the resource identifier / contract identifier generated after processing the resource / contract according to the business logic in the smart contract. The embodiment of the present disclosure does not make specific limitations on this.

[0073] In one embodiment of the present disclosure, since the first business node and the second business node will upload their respective resources and contracts to the accounting node, and the resources and contracts will be consensus-based and chained through the accounting node, in order to ensure the reliability of the final settlement result, the accounting node needs to call the smart contract to verify the validity of the resources and contracts, and process the valid resources or valid contracts through the target logic module. Figure 7 A schematic diagram of the process of checking the validity of resources and contracts is shown, such as Figure 7As shown, in step S701, the first resource and the first contract uploaded by the first business node are received, and the second resource and the second contract uploaded by the second business node are received; in step S702, the first resource and the second resource are checked by the smart contract to obtain a valid resource, and the first contract and the second contract are checked to obtain a valid contract. When verifying the validity of the resource and the contract, a matching verification can be performed based on the resource identifier and the contract identifier. Specifically, the resource identifier of the first resource is matched with the resource identifier of the second resource. If they match, the first resource and the second resource are determined to be valid resources. At the same time, the contract identifier of the first contract is matched with the contract identifier of the second contract. If they match, the first contract and the second contract are determined to be valid contracts. After determining the valid resources and valid contracts, valid data can be formed according to the valid resources and valid contracts, and the valid data can be processed. Specifically, the valid resources and valid contracts can be queried or updated, or resource settlement can be performed based on the valid resources and valid contracts.

[0074] In one embodiment of the present disclosure, the first business node and the second business node may upload their respective digital signatures to the blockchain system while uploading resources and contracts. The digital signature is formed by asymmetric encryption of the resources and contracts. The digital signature can be used to prevent the resources or contracts from being tampered with, and the sources of the resources and contracts can be traced, thereby improving data security.

[0075] In one embodiment of the present disclosure, when querying a valid resource or a valid contract, the resource identifier of the valid resource or the contract identifier of the valid contract can be read from a storage medium such as a disk through a deserialization method; when updating a valid resource or a valid contract, a resource identifier corresponding to the valid resource or a contract identifier corresponding to the valid contract can be generated according to a resource identifier generation method in a resource logic module or a contract identifier generation method in a contract logic module, and then the valid resource or valid contract can be persisted to a storage medium such as a disk through a serialization method.

[0076] In one embodiment of the present disclosure, when valid resources are settled, settlement can be performed according to the common logic in the contract framework 501, the valid resources, and the valid contracts corresponding to the valid resources. Figure 8 A schematic diagram of the resource settlement process is shown in FIG. Figure 8 As shown, in step S801, the contract corresponding to the effective resource is determined according to the effective resource; in step S802, the effective resource is settled according to the settlement rules in the contract corresponding to the effective resource, and a settlement sheet is generated according to the effective resource and the settlement result corresponding to the effective resource. In step S801, the contract corresponding to the effective resource can be determined according to the resource identifier of the effective resource. Fig. 9A schematic diagram of the process of determining the contract corresponding to the valid resource is shown, such as Fig. 9 As shown, in step S901, the resource identifier corresponding to the valid resource is obtained; in step S902, the contract identifier corresponding to the resource identifier is determined according to the resource identifier and the resource contract identifier relationship table in the accounting node; in step S903, the contract corresponding to the valid resource is determined according to the contract identifier. A plurality of resources and contracts are stored in the data block, and there is a mapping relationship between each resource and the corresponding contract. According to the mapping relationship, a resource contract identifier relationship table can be formed by the resource identifier and the contract identifier. After obtaining the resource identifier of the valid resource, the resource identifier can be matched with the resource identifier in the resource contract identifier relationship table. If there is a resource identifier that matches the resource identifier of the valid resource, the contract identifier corresponding to the resource identifier is obtained, and the corresponding contract is obtained from the data block according to the contract identifier. For example, the resource identifier of the valid resource is F00356AK456TB001. By matching the resource identifier with the resource identifier in the resource contract identifier relationship table, the corresponding contract identifier B01215AK456TB001 can be obtained, and then the contract corresponding to the valid resource can be further obtained from the data block according to the contract identifier. In step S802, after obtaining the contract corresponding to the valid resources, the settlement rules jointly confirmed by the merchant and the platform can be obtained therefrom, and the valid resources can be settled according to the settlement rules. Furthermore, after obtaining the settlement results, a settlement statement can be formed according to the valid resources and the settlement results. The settlement statement can be understood as a bill, which records at least the resource identification, the merchant's deserved income and the platform's deserved income.

[0077] In one embodiment of the present disclosure, the verification of the validity of resources and contracts can also be performed outside the blockchain system. It can be verified manually or electronically. After the verification is passed, the valid resources and valid contracts are sent to the accounting node through the first business node and the second business node for consensus and chain-up.

[0078] In one embodiment of the present disclosure, in order to ensure the efficiency of the settlement of resources by the smart contract, after completing the settlement of a certain resource, a tag can be added to the resource, the resource and the corresponding contract to indicate that the resource has been settled, avoiding repeated settlement and wasting time and resources; of course, in addition to adding tags for distinction, the resource, the resource and the corresponding contract can also be deleted through the contract framework, which can avoid repeated settlement and save storage space. The contract framework ensures the atomicity of the operation through blockchain system transactions, that is, the generation of the settlement order and the deletion of the resource must succeed or fail at the same time, ensuring that the settlement order will not be generated out of thin air and the resources will not disappear out of thin air.

[0079] In one embodiment of the present disclosure, after a settlement is generated according to valid resources and corresponding contracts, the settlement statement can be persisted to a storage medium such as a disk through the storage module 605 in the contract framework 501. If the settlement statement is to be queried, it can be searched in the disk according to the obtained settlement statement identifier to be queried. After determining the target settlement statement, the target settlement statement is read by a deserialization method to obtain the details of the target settlement statement.

[0080] In one embodiment of the present disclosure, a settlement request may be initiated by the platform or by a merchant, or when a user triggers an operation on resources in the platform. For example, when a user subscribes or purchases, the first business node or the second business node is triggered to send a settlement request to the blockchain system. Furthermore, when a settlement request is initiated by the platform or a merchant, it may be initiated at predetermined time intervals, such as on the first day of each month, on the last day of each month, or every 15 days, or at zero o'clock every day. The embodiments of the present disclosure include but are not limited to the above-mentioned settlement request initiation time points.

[0081] Take the resource settlement between a shopping platform and the merchants who have signed contracts with it as an example. Fig.10 The schematic diagram of the fund settlement process is shown in FIG. Fig.10 As shown, in step S1001, the business personnel define resource logic, contract logic and settlement logic through the business custom interface in the smart contract; in step S1002, the shopping platform uploads the resources and contracts to the blockchain system, and the merchant also uploads the resources and contracts to the blockchain system; in step S1003, the shopping platform or the merchant sends a settlement request, and the accounting node subnetwork in the blockchain system responds to the settlement request and calls the smart contract stored therein; in step S1004, the resources and contracts uploaded by the shopping platform and the merchant are verified through the smart contract to obtain valid resources and valid contracts; in step S1005, according to The resource logic and contract logic process the valid resources and valid contracts, and persist the valid resources and valid contracts to the disk in a serialized manner through the storage module in the contract framework; in step S1006, the resource identifier of the valid resource is obtained, and the corresponding contract identifier is obtained based on the resource identifier, and the corresponding contract is obtained based on the contract identifier; in step S1007, the settlement rules are obtained from the contract, and the valid resources are settled based on the settlement rules to form a settlement statement; in step S1008, the accounting node returns the settlement statement to the business node, and at the same time, the settlement statement is persisted to the disk in a serialized manner through the storage module.

[0082] The data processing method based on the blockchain system in the disclosed embodiment first sends a data processing request to the accounting node through the business node, then parses the data processing request to obtain the type of the data processing request, and finally calls the target logic module from the smart contract stored in the accounting node sub-network according to the type of the data processing request, processes the valid data corresponding to the data processing request through the target logic module to obtain the processing result, and returns the processing result to the business node. The accounting node and the business node can separate the accounting process of the blockchain system from the business processing process, and then can maintain the full amount of data blocks through the decentralized accounting node sub-network, ensuring the security of the data blocks, avoiding the performance and disaster recovery problems brought by the centralized control scheme, and improving the accuracy and processing efficiency of fund settlement.

[0083] At the same time, the smart contract in the disclosed embodiment includes a contract framework and a business custom interface. The contract framework is formed according to the public logic of resource settlement, and the business custom interface is formed according to the sub-logic contained in the public logic. Business personnel can define the business logic of each logic module through the business custom interface, and then process the valid data through the logic module in the smart contract. The data processing method based on the blockchain system in the disclosed embodiment can, on the one hand, ensure that the data processing process is transparent, the data is not tampered with, and the processing process is traceable, thereby improving the accuracy and reliability of the data processing results; on the other hand, the smart contract can share multi-party bill information in real time, improve the coordination efficiency, and enable the multi-party settlement with a high degree of discreteness to be effectively executed, thereby improving the efficiency of data processing; on the other hand, the smart contract is more simplified and standardized, and developers can more easily write logic codes that meet the settlement intention based on the business custom interface, thereby reducing the risk of fund disputes caused by unexpected loopholes, and also avoiding the situation of inconsistent bills caused by data omissions or repeated settlements due to different operating environments during the reconciliation process between the platform and the merchant.

[0084] The following describes an apparatus embodiment of the present disclosure, which can be used to execute the data processing method based on the blockchain system in the above-mentioned embodiment of the present disclosure. For details not disclosed in the apparatus embodiment of the present disclosure, please refer to the data processing method based on the blockchain system in the above-mentioned embodiment of the present disclosure.

[0085] Fig.11 The block diagram schematically shows a data processing device based on a blockchain system according to an embodiment of the present disclosure.

[0086] Reference Fig.11As shown, according to an embodiment of the present disclosure, a data processing device 1100 based on a blockchain system includes a business node subnetwork and an accounting node subnetwork, the business node subnetwork includes a business node, the accounting node subnetwork includes an accounting node, the accounting node includes a data processing device 1100, and the data processing device 1100 includes: a first receiving module 1101, a parsing module 1102 and a processing module 1103.

[0087] Specifically, the first receiving module 1101 is used to receive the data processing request sent by the business node; the parsing module 1102 is used to parse the data processing request to obtain the type of the data processing request; the processing module 1103 is used to call the target logic module from the smart contract stored in the accounting node subnetwork according to the type of the data processing request, process the valid data corresponding to the data processing request through the target logic module, and return the processing result to the business node.

[0088] In one embodiment of the present disclosure, the smart contract includes a contract framework and a business custom interface, wherein the contract framework is formed according to the common logic of resource settlement and contains multiple logic modules corresponding to the sub-logics in the common logic; the business custom interface is constructed according to the data class corresponding to the sub-logic.

[0089] In one embodiment of the present disclosure, the contract framework includes a scheduler; the first receiving module 1101 is configured to: receive the data processing request sent by the blockchain application program interface in the blockchain system through the scheduler.

[0090] In one embodiment of the present disclosure, the sub-logic includes resource logic, contract logic and settlement logic; the logic module includes a resource logic module, a contract logic module and a settlement logic module; the data class includes a resource class, a contract class and a settlement class; the business custom interface includes a resource class custom interface, a contract class custom interface and a settlement class custom interface.

[0091] In one embodiment of the present disclosure, the data processing device 1100 is configured to: define the business logic in the smart contract through one or more of the resource class custom interface, the contract class custom interface and the settlement class custom interface; wherein the business logic corresponding to the resource class custom interface includes: a method for generating a resource identifier, a method for verifying the legality of a resource, a method for storing and reading a resource, and a method for querying a contract associated with a resource; the business logic corresponding to the contract class custom interface includes: a method for generating a contract identifier, a method for verifying the legality of a contract, a method for storing and reading a contract, and a method for settling a contract; the business logic corresponding to the settlement class custom interface includes: a method for generating a settlement bill identifier, and a method for storing and reading a settlement bill.

[0092] In some embodiments of the present disclosure, the type of the data processing request includes any one or more of a resource query request, a resource update request, a contract query request, a contract update request or a resource settlement request; the valid data includes valid resources and valid contracts; the processing module 1103 includes: a first processing unit, which is used to call the resource logic module in the smart contract when the type of the data processing request is a resource query request and / or a resource update request, and query and / or update the valid resources based on the resource logic in the resource logic module; or, a second processing unit, which is used to call the contract logic module in the smart contract when the type of the data processing request is a contract query request and / or a contract update request, and query and / or update the valid contract based on the contract logic in the contract logic module; or, a third processing unit, which is used to settle according to the public logic in the contract framework, the valid resources and the valid contract when the type of the data processing request is a resource settlement request.

[0093] In one embodiment of the present disclosure, the third processing unit includes: a contract determination unit, used to determine the contract corresponding to the effective resources based on the effective resources; a resource settlement unit, used to settle the effective resources according to the settlement rules in the contract corresponding to the effective resources, and generate a settlement slip based on the effective resources and the settlement results corresponding to the effective resources.

[0094] In one embodiment of the present disclosure, the contract determination unit is configured to: obtain a resource identifier corresponding to the valid resource; determine a contract identifier corresponding to the resource identifier based on the resource identifier and a resource contract identifier relationship table in the accounting node; and determine a contract corresponding to the valid resource based on the contract identifier.

[0095] In one embodiment of the present disclosure, the data processing device is further configured to: add a tag to the valid resource or delete the valid resource.

[0096] In one embodiment of the present disclosure, the data processing device 1100 is further configured to: obtain an identifier of the settlement order to be queried, and obtain a target settlement order from the accounting node according to the identifier of the settlement order to be queried.

[0097] In one embodiment of the present disclosure, the business node subnetwork includes a first business node and a second business node associated with the first business node; the valid data includes valid resources and valid contracts; the data processing device 1100 includes: a second receiving module, used to receive the first resource and the first contract uploaded by the first business node, and receive the second resource and the second contract uploaded by the second business node; a verification module, used to verify the first resource and the second resource through the smart contract to obtain the valid resource, and verify the first contract and the second contract to obtain the valid contract.

[0098] In one embodiment of the present disclosure, the verification module is configured to: match the resource identifier of the first resource with the resource identifier of the second resource; if they match, determine that the first resource and the second resource are the valid resources; at the same time, match the contract identifier of the first contract with the contract identifier of the second contract; if they match, determine that the first contract and the second contract are the valid contracts.

[0099] In one embodiment of the present disclosure, the data processing device 1100 further includes: a third receiving module, configured to receive valid resources and valid contracts uploaded by the first service node and the second service node to form the valid data.

[0100] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.

[0101] It should be noted that Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0102] like Fig.12As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM) 1203 to implement the image annotation method described in the above embodiment. In the RAM 1203, various programs and data required for system operation are also stored. The CPU 1201, ROM 1202 and RAM 1203 are connected to each other through a bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.

[0103] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.

[0104] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1209, and / or installed from a removable medium 1211. When the computer program is executed by a central processing unit (CPU) 1201, various functions defined in the system of the present disclosure are executed.

[0105] It should be noted that the computer-readable medium shown in the embodiment of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0106] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0107] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0108] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the image processing device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0109] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0110] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0111] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0112] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data processing method based on a blockchain system, characterized in that: The blockchain system includes a business node subnetwork and an accounting node subnetwork, the business node subnetwork includes a first business node and a second business node associated with the first business node, the accounting node subnetwork includes an accounting node, the data processing method is executed by the accounting node, and the data processing method includes: receiving a first resource and a first contract uploaded by the first service node, and receiving a second resource and a second contract uploaded by the second service node; Matching the resource identifier of the first resource with the resource identifier of the second resource; If they match, then the first resource and the second resource are determined to be valid resources; at the same time, Matching the contract identifier of the first contract with the contract identifier of the second contract; If they match, then the first contract and the second contract are determined to be valid contracts; Form valid data based on valid resources and valid contracts; receiving a data processing request sent by the first service node; Parsing the data processing request to obtain a type of the data processing request, where the type of the data processing request includes a resource settlement request; Calling a target logic module from the smart contract stored in the accounting node subnetwork according to the type of the data processing request, processing valid data corresponding to the data processing request through the target logic module, and returning the processing result to the first service node; The calling of the target logic module from the smart contract stored in the accounting node subnetwork according to the type of the data processing request, and processing the valid data corresponding to the data processing request through the target logic module, includes: When the type of the data processing request is a resource settlement request, obtaining a resource identifier corresponding to the valid resource; Determine the contract identifier corresponding to the resource identifier according to the resource identifier and the resource contract identifier relationship table in the accounting node, wherein the resource contract identifier relationship table contains the mapping relationship between each resource identifier and the contract identifier; Determining the contract corresponding to the valid resource according to the contract identifier; The valid resources are settled according to the settlement rules in the contract corresponding to the valid resources, and a settlement sheet is generated according to the valid resources and the settlement results corresponding to the valid resources.

2. The data processing method based on the blockchain system according to claim 1 is characterized in that: The smart contract includes a contract framework and a business custom interface, wherein the contract framework is formed according to the public logic of resource settlement and contains multiple logic modules corresponding to the sub-logics in the public logic; the business custom interface is constructed according to the data class corresponding to the sub-logics.

3. The data processing method based on the blockchain system according to claim 2 is characterized in that: The contract framework includes a scheduler; The receiving the data processing request sent by the service node includes: The data processing request sent by the blockchain application program interface in the blockchain system is received by the scheduler.

4. The data processing method based on the blockchain system according to claim 2 is characterized in that: The sub-logic includes resource logic, contract logic and settlement logic; the logic module includes resource logic module, contract logic module and settlement logic module; the data class includes resource class, contract class and settlement class; the business custom interface includes resource class custom interface, contract class custom interface and settlement class custom interface.

5. The data processing method based on the blockchain system according to claim 4 is characterized in that: The method further comprises: Define the business logic in the smart contract through one or more of the resource class custom interface, the contract class custom interface, and the settlement class custom interface; The business logic corresponding to the resource-class custom interface includes: a method for generating a resource identifier, a method for verifying the legality of a resource, a method for storing and reading a resource, and a method for querying a contract associated with a resource; The business logic corresponding to the contract-type custom interface includes: a method for generating a contract identifier, a method for verifying the legality of a contract, a method for storing and reading a contract, and a method for settling a contract; The business logic corresponding to the settlement custom interface includes: a method for generating a settlement form identifier and a method for storing and reading a settlement form.

6. The data processing method based on the blockchain system according to claim 1 or 5, characterized in that: The type of the data processing request also includes any one or more of a resource query request, a resource update request, a contract query request, or a contract update request; The calling of a target logic module from the smart contract stored in the accounting node subnetwork according to the data processing type, and processing the valid data corresponding to the data processing request through the target logic module, further includes: When the type of the data processing request is a resource query request and / or a resource update request, calling the resource logic module in the smart contract, and querying and / or updating the valid resource based on the resource logic in the resource logic module; or, When the type of the data processing request is a contract query request and / or a contract update request, the contract logic module in the smart contract is called, and the valid contract is queried and / or updated based on the contract logic in the contract logic module.

7. The data processing method based on the blockchain system according to claim 1 is characterized in that: After generating the settlement form, the method further includes: Add a tag to the valid resource or delete the valid resource.

8. The data processing method based on the blockchain system according to claim 1 is characterized in that: The method further comprises: Obtain an identifier of the settlement order to be queried, and obtain a target settlement order from the accounting node according to the identifier of the settlement order to be queried.

9. The data processing method based on the blockchain system according to claim 1 is characterized in that: The service node subnetwork includes a first service node and a second service node associated with the first service node; the method further includes: Receive the valid resources and the valid contract uploaded by the first service node and the second service node to form the valid data.

10. A data processing device based on a blockchain system, characterized in that: The blockchain system includes a business node subnetwork and an accounting node subnetwork, wherein the business node subnetwork includes a first business node and a second business node associated with the first business node, the accounting node subnetwork includes an accounting node, and the accounting node includes the data processing device, wherein the data processing device includes: A first receiving module, used to receive a data processing request sent by the first service node; A parsing module, used for parsing the data processing request to obtain the type of the data processing request, wherein the type of the data processing request includes a resource settlement request; A processing module, configured to call a target logic module from a smart contract stored in the accounting node subnetwork according to the type of the data processing request, process valid data corresponding to the data processing request through the target logic module, and return the processing result to the first service node, wherein the valid data includes valid resources and valid contracts; The calling of the target logic module from the smart contract stored in the accounting node subnetwork according to the type of the data processing request, and processing the valid data corresponding to the data processing request through the target logic module, includes: When the type of the data processing request is a resource settlement request, obtaining a resource identifier corresponding to the valid resource; Determine the contract identifier corresponding to the resource identifier according to the resource identifier and the resource contract identifier relationship table in the accounting node, wherein the resource contract identifier relationship table contains the mapping relationship between each resource identifier and the contract identifier; Determining the contract corresponding to the valid resource according to the contract identifier; Settling the valid resources according to the settlement rules in the contract corresponding to the valid resources, and generating a settlement sheet according to the valid resources and the settlement results corresponding to the valid resources; A second receiving module, configured to receive a first resource and a first contract uploaded by the first service node, and receive a second resource and a second contract uploaded by the second service node; The checking module is configured to match the resource identifier of the first resource with the resource identifier of the second resource. If they match, the first resource and the second resource are determined to be the valid resources. At the same time, the contract identifier of the first contract is matched with the contract identifier of the second contract. If they match, the first contract and the second contract are determined to be the valid contracts, and valid data is formed based on the valid resources and the valid contracts.

11. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to perform the data processing method based on the blockchain system as described in any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the data processing method based on the blockchain system as described in any one of claims 1 to 9 is implemented.

13. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data processing method based on a blockchain system as described in any one of claims 1 to 9.