CN110533402B - Billing consensus method and system for heterogeneous system - Google Patents

Billing consensus method and system for heterogeneous system Download PDF

Info

Publication number
CN110533402B
CN110533402B CN201910781389.0A CN201910781389A CN110533402B CN 110533402 B CN110533402 B CN 110533402B CN 201910781389 A CN201910781389 A CN 201910781389A CN 110533402 B CN110533402 B CN 110533402B
Authority
CN
China
Prior art keywords
node
value
credit
accounting
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910781389.0A
Other languages
Chinese (zh)
Other versions
CN110533402A (en
Inventor
徐晓红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Score Finance Technology Co ltd
Original Assignee
Zhuhai Score Finance Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Score Finance Technology Co ltd filed Critical Zhuhai Score Finance Technology Co ltd
Priority to CN201910781389.0A priority Critical patent/CN110533402B/en
Publication of CN110533402A publication Critical patent/CN110533402A/en
Application granted granted Critical
Publication of CN110533402B publication Critical patent/CN110533402B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

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

Abstract

A method and a system for billing consensus of a heterogeneous system are provided. In the system, the observation node selects at least one accounting node with the credit value of the accounting node larger than a set credit threshold value as a current-value accounting node, and selects the current-value accounting node with the highest credit value as a highest credit node according to the credit value of the at least one current-value accounting node; when an account entry request is received, the corresponding at least one current-value accounting node respectively updates the public account book of the corresponding at least one current-value accounting node, and sends at least one updated account balance to the highest credit node; and the highest credit node selects a consensus balance according to the at least one updated account balance and sends the consensus balance to the at least one current value accounting node and the non-current value accounting node. By adopting the scheme of the application, the current value accounting node and the highest credit node are determined through a neutral observation node, and the consensus balance determined by the highest credit node is used as the final account balance, so that the fairness of the nodes participating in the transaction is ensured.

Description

Billing consensus method and system for heterogeneous system
Technical Field
The application relates to the technical field of block chains, in particular to a billing consensus method and system for a heterogeneous system.
Background
The blockchain can be used as a computer architecture technology, and brings huge changes to many application scenarios, such as industrial chain management, production-fusion combination, supply chain finance, and the like.
The consensus mechanism is the root of blockchain technology and is an important mark for distinguishing blockchains from other distributed computer technologies. The fundamental property of blockchains is decentralization, which is a consensus mechanism. In particular, the consensus mechanism carries two important tasks: 1) The fairness of all the participating nodes is ensured; 2) And the consistency of the data of the distributed heterogeneous system is ensured.
Most blockchain network architectures are composed of homogeneous nodes. In other words, most blockchain architectures do not distinguish between transaction nodes and accounting nodes. As shown in the structural diagram of the homogeneous system shown in fig. 1, in a trusted blockchain P2P network structure formed by three nodes, once identity verification (KYC) is completed for each node, a blockchain transaction can be joined, and accounting is performed according to a consensus mechanism of the chain.
Comparing the trusted block chain close to the real financial system generally distinguishes the transaction node from the accounting node. Therefore, a block-chain network architecture composed of heterogeneous nodes is proposed. In such architectures, the blockchain network consists of two layers of distinct nodes. For example, the transaction process is completed by the TBC node and the clearing (accounting) process is completed by the ABC node. The advantage of the multi-layer architecture is that the transaction process and the clearing process can be performed in blockchain network architectures with completely different mechanisms, the transaction process can be processed by adopting an efficient transaction consensus mechanism, and the clearing can be processed by adopting a relatively complete accounting consensus mechanism. This mechanism not only addresses the efficiency issues required for financial transactions, but also makes blockchain expansion relatively easy.
However, financial transactions and bookings are, after all, interrelated. The english word (Credit) transliteration of "Credit" means "buy now, pay in the future". In the transaction mode of 'pay with one hand and delivery with one hand', no credit problem exists. That is, in a homogeneous (single node type) system, transactions and payments occur simultaneously, with no transitions and no delays in between. Thus, there is no credit issue. And once the functions of the nodes are separated, the transaction has the problems of delay, heterogeneous clearing and payment. Clearing and payment are participated in different ways by different departments and different organizations (different nodes), and how to solve the relationship between transaction and (clearing) accounting becomes a very important problem.
If the transaction takes the "exchange" mode, the clearing process for the transaction is generally centralized, and ABC may be a centralized architecture. But in real business trips, more transactions are conducted in an "OTC" fashion. In other words, the ledger is distributed, and there is no "authority" in the transaction process to define the authenticity and reliability of the balance of the participants' accounts, thereby determining the final payment amount for settlement, while all credit risks are borne by this centralized organization. During the transaction of OTC, the authenticity of the ledger is determined by the consensus made by the relevant transaction parties. This is the type of transaction that best represents the superiority of the blockchain in reality. However, if the application of the blockchain is limited only to the clearing of the transaction, which itself is carried out under the chain, the authenticity of the transaction may become an issue. In many supply chain financial practical scenarios where the blockchain is truly down, many people adopt an internal "Token" approach to solve the problem between the transaction and the clearing, so that the transaction becomes a "cash transaction" in a closed loop and the clearing becomes an internal "Token" clearing. This approach may be effective in a closed platform, but in an open platform it is difficult to legally and legally issue such a "Token" for endorsement with credit. Therefore, there is a need to develop a credit-based mechanism to address the relationship between trading and clearing in an open platform.
All blockchain consensus mechanisms so far have been based on homogeneous nodes. A cross-structure consensus mechanism that attempts to contact trading nodes and billing (clearing/settlement) nodes has not been discovered.
Disclosure of Invention
The application provides a billing consensus method and system for a heterogeneous system.
In a first aspect, a billing consensus method for heterogeneous systems is provided, where the method includes:
the observation node selects at least one accounting node with the credit value of the accounting node larger than the set credit threshold value as a current value accounting node;
the observation node selects the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node;
when an account entry request is received, the corresponding at least one current-value accounting node respectively updates the public account book of the corresponding at least one current-value accounting node and sends at least one updated account balance to the highest credit node;
and the highest credit node selects a consensus balance according to the at least one updated account balance, and sends the consensus balance to the at least one current value accounting node and the non-current value accounting node.
In one implementation, the selecting, by the highest credit node, a consensus balance according to the at least one updated account balance includes:
the highest credit node determines that the number of current value accounting nodes with accounting difference is less than a first set threshold value;
and the highest credit node counts the at least one updated account balance, and takes the same and majority account balance as the consensus balance.
In yet another implementation, the method further comprises:
when the difference value between the updated account balance and the consensus balance of any one of the at least one current-value accounting node is greater than a second set threshold value, the observation node subtracts a first set value from the credit value of any one current-value accounting node.
In yet another implementation, the method further comprises:
the observation node determining a credit value for at least one billing node, the determining at least one parameter by which the credit value for the at least one billing node is determined comprising: organization truth credit score C 1 Transaction participation score C 2 And a billing score C 3 And a billing charge worth score C 4
In yet another implementation, the method further comprises:
the observation node sequences the at least one current-value accounting node according to the credit value of the at least one current-value accounting node;
when the heartbeat connection of the observation node and the highest credit node is disconnected, the observation node selects a first current-value accounting node with the credit value ordered after the credit value of the highest credit node as a new highest credit node.
In yet another implementation, the method further comprises:
and the observation node determines the set credit threshold according to the efficiency of the heterogeneous system and/or the number of the nodes participating in selection.
In yet another implementation, the method further comprises:
when the accounting node receives the accounting request, the observation node judges whether the accounting node is a current value accounting node;
if the accounting node is not the current value accounting node, waiting for the next accounting request;
and if the accounting node is a current-value accounting node, executing the step that the corresponding at least one current-value accounting node respectively updates the public ledger of the node.
In yet another implementation, the method further comprises:
the accounting node judges whether the posting request is a mechanism transaction;
and if the posting request is a mechanism transaction, the accounting node updates the self account book according to the posting request.
In a second aspect, a heterogeneous system is provided, comprising a transaction node and a billing node, the heterogeneous system further comprising an observation node;
the observation node is used for selecting at least one accounting node with the credit value larger than the set credit threshold value as a current-value accounting node;
the observation node is used for selecting the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node;
the corresponding at least one current-value accounting node is used for respectively updating a public account book of the corresponding at least one current-value accounting node when receiving the account entry request and sending at least one updated account balance to the highest credit node;
and the highest credit node is used for selecting a consensus balance according to the at least one updated account balance and sending the consensus balance to the at least one current value accounting node and the non-current value accounting node.
In one implementation, the highest credit node is used for determining that the number of current value accounting nodes with accounting difference is less than a first set threshold value;
and the highest credit node counts the at least one updated account balance, and takes the same and most account balance as the consensus balance.
In yet another implementation, the observation node is further configured to subtract the credit value of any one of the at least one current value billing node by a first set value when the difference between the updated account balance and the consensus balance of the at least one current value billing node is greater than a second set threshold.
In yet another implementation, the observation node is further configured to determine a credit value for the billing node, the determining at least one parameter by which the credit value for the billing node is determined including: institution real credit score C 1 Transaction participation score C 2 Billing score C 3 And a billing charge worth score C 4
In yet another implementation, the observation node is further configured to rank the at least one current value billing node according to credit value of the at least one current value billing node;
the watching node is also used for selecting a first current-value accounting node with the credit value ordered after the credit value of the highest credit node as a new highest credit node when the watching node is disconnected with the heartbeat connection of the highest credit node.
In yet another implementation, the observation node is further configured to determine the set credit threshold according to an efficiency of the heterogeneous system and/or a number of participating selection nodes.
In yet another implementation, the observation node is further configured to determine, when an accounting node receives an accounting request, whether the accounting node is a current-value accounting node;
and the accounting node is used for waiting for the next accounting request if the accounting node is not the current value accounting node.
In yet another implementation, the accounting node is further configured to determine whether the posting request is a local institution transaction;
and the accounting node is also used for updating the self account book according to the accounting request if the accounting request is a local mechanism transaction.
In a third aspect, a heterogeneous system is provided that includes an input device, an output device, a memory, and a processor; wherein, the memory stores a group of program codes, and the processor is configured to call the program codes stored in the memory, and execute any of the above first aspect or the first aspect to implement the method.
In a fourth aspect, there is provided a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of any of the first or second aspects described above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first or second aspects described above.
By adopting the scheme of the application, the method has the following beneficial effects:
the current value accounting node and the highest credit node are determined through a neutral observation node, and the consensus balance determined by the highest credit node is used as the final account balance, so that the fairness of the nodes participating in the transaction is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a prior art isomorphic system;
fig. 2 is a schematic structural diagram of a heterogeneous system according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a billing consensus method for heterogeneous systems according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating a billing consensus method for a further heterogeneous system provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of another heterogeneous system provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the disclosure herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in the specification of the present disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this disclosure and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
The embodiment of the application provides a billing consensus method and a billing consensus system of a heterogeneous system.
The embodiment of the application provides a consensus mechanism which takes Proof of Credit (Proof of Credit) as a core and spans transaction nodes and accounting nodes in a heterogeneous block chain transaction system (called a heterogeneous system for short). As shown in fig. 2, it is a schematic structural diagram of a heterogeneous system provided in the embodiment of the present application, the heterogeneous system includes a trading node 11, a billing node 12, an observation node 13, and a dynamic credit scorer 14 connecting the observation node 13 and the billing node 12, and a preselected billing node pool 15, a node credit threshold controller 16, and a billing node pool 17 connected to the billing node 12.
Wherein, the observation node 13: is a third-party neutral observation node additionally arranged between the transaction node and the accounting node. In the practical application scenario of OTC, the transaction node and the accounting node are both related to a certain uplink organization, and both require real-name authentication. After the KYC mechanism authenticates the node, the observation node associates the transaction node and the accounting node of the mechanism. It is the responsibility of the observation node to update the credit value of the accounting node based on the information provided by the dynamic credit scorer.
Pre-selection accounting node pool 15: all uplink accounting nodes are put into a pool of pre-selected accounting nodes. Accounting nodes in the pool of preselected accounting nodes will record the transaction but not participate in the election.
Node credit threshold controller 16: the credit threshold of the elected accounting node is extracted from the pre-selected accounting node pool in the current round of election (elected current accounting node) according to the efficiency requirement of the system and the number of the elected nodes.
Accounting node pool 17: all accounting nodes with credit values greater than the election threshold of the current round will enter the pool of current-value accounting nodes (actual accounting nodes).
Dynamic credit scoring model: and scoring the accounting node in real time according to the history and the current situation of the transaction participation, the state of the accounting node and the KYC information of the mechanism.
The highest credit algorithm: and selecting an effective account balance and an effective transaction list from the accounting pool.
The following describes a billing consensus method for a heterogeneous system provided in an embodiment of the present application with reference to specific procedures:
fig. 3 is a schematic flowchart of a billing consensus method for heterogeneous systems according to an embodiment of the present disclosure, where the method may include the following steps:
s101, the observation node selects at least one accounting node with the credit value larger than the set credit threshold value as a current value accounting node.
In order to ensure the efficiency of the heterogeneous system and/or to consider the number of nodes participating in the selection, not all accounting nodes may be considered as current accounting nodes. Therefore, a credit threshold value is preset, and at least one accounting node with the credit value larger than the set credit threshold value is selected as the current-value accounting node.
S102, the observation node selects the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node.
To determine the billing consensus balance, the current value billing node with the highest credit value may be selected as the highest credit node from which the billing consensus balance is determined. Specifically, the observation node sorts the credit values of all current-value accounting nodes, and the current-value accounting node with the highest credit value is selected as the highest credit node.
S103, when the account entry request is received, the corresponding at least one current-value accounting node respectively updates the public account book of the corresponding at least one current-value accounting node, and sends the at least one updated account balance to the highest credit node.
When receiving an account entry request of a transaction node, the corresponding one or more current-value accounting nodes respectively record accounts of accounts payable settlement information in an accounting chain, update own public accounts and respectively send the updated account balance to the highest credit node.
And S104, the highest credit node selects a consensus balance according to the at least one updated account balance, and sends the consensus balance to the at least one current value accounting node and the non-current value accounting node.
The highest credit node counts and takes the account balance which is the same and accounts for the majority (minority obeys the majority value mode) as the consensus balance according to the account balance provided by the current value accounting node. Namely, the balance of the account of a certain trading party (which may deviate from the real balance but is determined as the balance of the trading party) which is evaluated by adopting a 'few majority-obeyed' value mode is used as the final account balance, and the consensus balance determined by the highest credit node is used as the final account balance, so that the fairness of the nodes participating in the trading is ensured.
And issuing the common ledger after consensus update to all nodes including the current-value accounting node and the non-current-value accounting node.
According to the accounting consensus method of the heterogeneous system, the current accounting node and the highest credit node are determined through a neutral observation node, and the consensus balance determined by the highest credit node is used as the final account balance, so that the fairness of the nodes participating in transaction is ensured.
Fig. 4 is a schematic flowchart of a billing consensus method for a heterogeneous system according to an embodiment of the present disclosure, where the method may include the following steps:
s201, the observation node determines to set a credit threshold according to the efficiency of the heterogeneous system and/or the number of the nodes participating in selection.
Before accounting consensus is carried out, the observation node determines a set credit threshold (election threshold in the current round) of the node credit threshold controller according to the efficiency of the heterogeneous system and/or the number of nodes participating in election (i.e. how many nodes participate in election). And the accounting nodes with the credit values larger than the set credit threshold value enter a current value accounting node (actual accounting node) pool.
When accounting consensus begins, the following modules are respectively initialized: the system comprises a dynamic credit scorer, a pre-selected accounting node pool, a node credit threshold controller and a current-value accounting node pool. The initialized parameters include a reconciliation period, a final public ledger (also called an authoritative public ledger) obtained in a previous accounting period, a public ledger of an accounting node, a node credit value and the like. The reconciliation period may be a time length or a number of bills, for example, one reconciliation period every 60 minutes, or one reconciliation period every 1000 public ledgers.
S202, the observation node determining a credit value of the at least one accounting node, the determining at least one parameter according to which the credit value of the at least one accounting node is determined including: organization truth credit score C 1 Transaction participation score C 2 And a billing score C 3 And a billing charge worth score C 4
And the observation node checks whether a new account checking period is set according to a preset account checking period and the initialized account checking period length. If so, the dynamic credit scorer is started to update the credit states of all the accounting nodes.
In particular, the credit status of all billing nodes is updated, i.e. the credit values of all billing nodes are determined. Wherein the at least one parameter upon which credit values for all billing nodes are determined comprises:
organization truth credit score C 1 (available using big data, machine learning methods);
transaction participation score C 2 (total amount traded in the last round of reconciliation cycle);
billing score C 3
Billing charge score C 4
Then, the credit value for each accounting node is obtained as: c = aC 1 +bC 2 +cC 3 +dC 4
Wherein a, b, c and d are adjustable parameters. Can be adjusted as required. For example, if a > (b, c, d), the system is biased toward large business dominated liquidations where business credits are high. If (b =0, c =0, d = 0), the system becomes a centralized clearing mechanism based on the enterprise real credits. If (a =0, c =0, d = 0), the system organizes a centralized clearing with the largest volume of transactions.
To avoid centralization, the weights of the individual parameters can be equalized, while C is increased 4 The weight of the credit node L (T) ensures that the highest credit node L (T) in the previous reconciliation period cannot be repeatedly selected in the next reconciliation period so as to ensure the democratic performance of the accounting.
Furthermore, the observation node also indicates all the accounting nodes to retain the 'authoritative public account book' of the previous accounting period, initializes the public account books retained by all the accounting nodes, and marks the public account book as a new account checking period account book to be confirmed. The authoritative public account book refers to a settlement record which is recorded by all the current value accounting nodes and is subjected to account checking and consensus. The public ledger refers to a ledger for recording accounts payable settlement information in the accounting chain, and may be different from the "authoritative public ledger" before the initialization (for example, the node does not participate in the accounting in the previous accounting period). The new account checking period to-be-confirmed account book refers to a settlement record recorded by the current value accounting node in the new account checking period.
S203, the observation node selects at least one accounting node with the credit value larger than the set credit threshold value as the current-value accounting node.
And the observation node brings the preselected accounting nodes meeting the conditions into an actual accounting node pool according to the set credit threshold of the node credit threshold controller, and defines the preselected accounting nodes as current-value accounting nodes.
And S204, the observation node selects the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node.
When a new reconciliation period begins, the highest credit node L (T) is elected according to the requirements of the observation nodes. The current credit node in the pool of accounting nodes issues its credit value to the highest credit node L (T-1) of the last period. And L (T-1) selects the highest credit node in the reconciliation period of the current round according to the credit score of the credit node, and sorts other nodes according to the credit value. Meanwhile, the highest credit node L (T-1) in the last period clears the current value integral in the credit score of the highest credit node L, and exits from the current value accounting node pool.
S205, the transaction node sends an account-entering request.
Accordingly, the accounting node receives the posting request.
Wherein the authenticity verification of the transaction itself has been completed in the TBC transaction chain.
The accounting node firstly judges whether the transaction is the local mechanism transaction. The related information of the accounting node is compared with the related information of the transaction mechanism (transaction participant) in the transaction node database; if the information of the accounting node can be matched with the information of the transaction participants, the accounting node is the local institution transaction. If the transaction is a local mechanism transaction, a hash value (HashKey) of the transaction is saved, the hash value is a characteristic parameter for proving the authenticity of the transaction, and all the premise of the embodiment is that the authenticity of the transaction is verified to be authentic after being completed in the TBC (transaction chain). And the accounting node extracts the transaction details and the account balance of the mechanism from the authoritative public account book according to the retained self-transaction information and updates the private account book. The private account book is an account record such as transaction details and account balance related to the mechanism recorded by the accounting node.
S206, the observation node judges whether the accounting node is the current value accounting node.
If the number of the nodes is too large, the efficiency is low, so in order to improve the accounting efficiency, not all accounting nodes are required to participate in actual accounting every time, and only people meeting the conditions participate in accounting (when-value accounting). The previous observation node has determined which are the current-value accounting nodes, and therefore when the accounting node receives the accounting request, whether the accounting node is the current-value accounting node is further judged.
And S207, the observation node sends the judgment result to the accounting node.
In another implementation, the above steps S206 and S207 can be determined directly in step S203, that is, it is directly clear which accounting nodes have the right to account in the period and which accounting nodes have no right to account in the period when the current value accounting nodes are divided; the steps S206 and S207 need not be performed. The determination can be directly carried out by a notification mode or a mode of setting accounting authority, or other methods for recording the state identification of the accounting node.
S208, if the accounting node is not the current value accounting node, the accounting node waits for the next accounting request; and if the accounting node is the current-value accounting node, the corresponding at least one current-value accounting node respectively updates the public ledger of the node, and sends the at least one updated account balance to the highest credit node.
If the accounting node judges that the posting request is not the mechanism transaction, and according to the judgment result of the observation node, if the accounting node is a non-proper value node, the accounting node can only wait. And if the accounting node is the current-value accounting node, updating the public ledger to be confirmed by the accounting node, so that the accounting request is reflected to the related account balance.
S209, the highest credit node determines that the number of current value accounting nodes with accounting difference is smaller than a first set threshold, the highest credit node counts the at least one updated account balance, and the same account balance which accounts for most accounts is taken as the consensus balance.
In the account checking period, after an account entry request occurs each time, all current-value accounting nodes update the public account book held by the current-value accounting nodes and issue the updated relevant balance to L (T). And L (T) selects a consensus balance according to the balance issued by the accounting node, namely the highest credit node evaluates the balance of a selected account of a certain transaction party according to the balance of a certain account provided by the current value accounting node (possibly having a slight deviation from the real balance, but being regarded as the balance of the transaction party). Specifically, the posting consensus adopts a 'minority obeying majority' value mode. When the accounting node balance is selected, a fault tolerance threshold value can be set according to needs, for example, accounting node balance calculation differences of less than 33% are tolerated, namely, accounting node balance calculation differences can be tolerated when the number of accounting nodes is less than the first set threshold value.
And S210, the highest credit node sends the consensus balance to at least one current value accounting node and a non-current value accounting node.
And L (T) issues the common ledger after consensus update to all nodes, including the current-value accounting node and the non-current-value accounting node.
And S211, when the difference value between the updated account balance and the consensus balance of any one of the at least one current value accounting node is greater than a second set threshold, the observation node subtracts the first set value from the credit value of any one current value accounting node. Wherein the first set threshold may be equal to the second set threshold.
The accounting node calculating the error in the accounting period will be penalized to subtract the credit score. For example, when the balance of an account billed by the accounting node deviates from the common balance and the deviation is larger than a tolerance value, the credit value of the accounting node is penalized and a first set value is subtracted to be used as the accounting current value score.
S212, the observation node ranks the at least one current-value accounting node according to the credit value of the at least one current-value accounting node, and when the observation node is disconnected from the heartbeat of the highest credit node, the observation node selects the first current-value accounting node with the credit value ranked after the credit value of the highest credit node as a new highest credit node.
In order to ensure the stability of the accounting system, if the heartbeat of the L (T) is not monitored, the accounting node at the next position of the credit sequence takes over, and the election is initiated again.
According to the bookkeeping consensus method of the heterogeneous system, the current bookkeeping node and the highest credit node are determined through a neutral observation node, and the consensus balance determined by the highest credit node is used as the final account balance, so that the fairness of the nodes participating in transaction is ensured; and the credit value of the accounting node is scored by integrating parameters such as real credit scoring of the institution, transaction participation scoring, accounting scoring and accounting current value scoring, so that the democratic property of accounting can be ensured.
The embodiment of the present application further provides a heterogeneous system, and the structure of the heterogeneous system is shown in fig. 2. The heterogeneous system is used for executing the accounting consensus method. Exemplarily, the following steps are carried out:
the observation node is used for selecting at least one accounting node with the credit value larger than the set credit threshold value as a current-value accounting node;
the observation node is used for selecting the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node;
the corresponding at least one current-value accounting node is used for respectively updating a public account book of the corresponding at least one current-value accounting node when receiving the account entry request and sending at least one updated account balance to the highest credit node;
and the highest credit node is used for selecting a consensus balance according to the at least one updated account balance and sending the consensus balance to the at least one current value accounting node and the non-current value accounting node.
In one implementation, the highest credit node is used for determining that the number of current value accounting nodes with accounting difference is less than a first set threshold value;
and the highest credit node counts the at least one updated account balance, and takes the same and majority account balance as the consensus balance.
In yet another implementation, the observation node is further configured to subtract the credit value of any one of the at least one current value billing node by a first set value when the difference between the updated account balance and the consensus balance is greater than a second set threshold.
In yet another implementation, the observation node is further configured to determine a credit value for the billing node, the determining at least one parameter by which the credit value for the billing node is determined including: organization truth credit score C 1 Transaction participation score C 2 And a billing score C 3 And the billing equivalentIs divided into C 4
In yet another implementation, the observation node is further configured to rank the at least one current value billing node according to credit value of the at least one current value billing node;
the watching node is also used for selecting a first current-value accounting node with the credit value ordered after the credit value of the highest credit node as a new highest credit node when the watching node is disconnected with the heartbeat connection of the highest credit node.
In yet another implementation, the observation node is further configured to determine the set credit threshold according to an efficiency of the heterogeneous system and/or a number of participating selection nodes.
In yet another implementation, the observation node is further configured to determine, when an accounting node receives an accounting request, whether the accounting node is a current-value accounting node;
and the accounting node is used for waiting for the next accounting request if the accounting node is not the current value accounting node.
In yet another implementation, the accounting node is further configured to determine whether the posting request is a local institution transaction;
and the accounting node is also used for updating the self account book according to the accounting request if the accounting request is a local mechanism transaction.
The detailed description of each module or node of the heterogeneous system may refer to the description related to the method shown in fig. 3 or fig. 4.
According to the heterogeneous system provided by the embodiment of the application, the current value accounting node and the highest credit node are determined through a neutral observation node, and the consensus balance determined by the highest credit node is used as the final account balance, so that the fairness of the nodes participating in the transaction is ensured.
The embodiment of the application also provides a heterogeneous system, and the heterogeneous system is used for executing the accounting consensus method. Some or all of the above methods may be implemented by hardware, or may be implemented by software or firmware.
Optionally, the system may be a chip or an integrated circuit when embodied.
Alternatively, when part or all of the billing consensus method of the above embodiments is implemented by software or firmware, it can be implemented by a heterogeneous system 200 provided in fig. 5. As shown in fig. 5, the system 200 may include:
an input device 21, an output device 22, a memory 23, and a processor 24 (the processor 24 in the device may be one or more, and one processor is taken as an example in fig. 5). In the present embodiment, the input device 21, the output device 22, the memory 23 and the processor 24 may be connected by a bus or other means, wherein the bus connection is taken as an example in fig. 5.
Wherein the processor 24 is configured to perform the following steps:
the control observation node selects at least one accounting node with the credit value larger than the set credit threshold value as a current value accounting node;
controlling the observation node to select the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node;
when an account entry request is received, controlling the corresponding at least one current-value accounting node to respectively update the public account book of the corresponding at least one current-value accounting node, and sending at least one updated account balance to the highest credit node;
and controlling the highest credit node to select a consensus balance according to the at least one updated account balance, and sending the consensus balance to the at least one current value accounting node and the non-current value accounting node.
In one implementation, processor 24 controls the top credit node to select a consensus balance based on the at least one updated account balance, including:
the highest credit node determines that the number of current value accounting nodes with accounting difference is less than a first set threshold value;
and the highest credit node counts the at least one updated account balance, and takes the same and majority account balance as the consensus balance.
In yet another implementation, processor 24 is further configured to perform the steps of:
when the difference value between the updated account balance and the consensus balance of any one of the at least one current-value accounting node is larger than a second set threshold value, controlling the observation node to subtract a first set value from the credit value of any one current-value accounting node.
In yet another implementation, processor 24 is further configured to perform the steps of:
controlling the observation node to determine a credit value for at least one billing node, the determining at least one parameter by which the credit value for at least one billing node is determined comprising: institution real credit score C 1 Transaction participation score C 2 And a billing score C 3 And a billing charge worth score C 4
In yet another implementation, processor 24 is further configured to perform the steps of:
controlling the observation node to sort the at least one current value accounting node according to the credit value of the at least one current value accounting node;
when the heartbeat connection between the observation node and the highest credit node is disconnected, the observation node is controlled to select a first current-value accounting node with the credit value ordered after the credit value of the highest credit node as a new highest credit node.
In yet another implementation, processor 24 is further configured to perform the steps of:
and controlling the observation node to determine the set credit threshold according to the efficiency of the heterogeneous system and/or the number of the nodes participating in selection.
In yet another implementation, processor 24 is further configured to perform the steps of:
when the accounting node receives the accounting request, controlling the observation node to judge whether the accounting node is a current value accounting node;
if the accounting node is not the current value accounting node, controlling the accounting node to wait for the next accounting request;
and if the accounting node is a current-value accounting node, executing the step that the corresponding at least one current-value accounting node respectively updates the public ledger of the node.
In yet another implementation, processor 24 is further configured to perform the steps of:
controlling the accounting node to judge whether the posting request is a local mechanism transaction;
and if the posting request is a mechanism transaction, controlling the accounting node to update the accounting book of the accounting node according to the posting request.
Alternatively, a program of the above-described data processing method may be stored in the memory 23. The memory 23 may be a physically separate unit or may be integrated with the processor 24. The memory 23 may also be used for storing data.
Alternatively, when part or all of the data processing method of the above embodiments is implemented by software, the apparatus may also include only a processor. The memory for storing the program is located outside the device, and the processor is connected with the memory through a circuit or a wire and used for reading and executing the program stored in the memory.
The processor may be a Central Processing Unit (CPU), a Network Processor (NP), or a WLAN device.
The processor may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory may include volatile memory (volatile memory), such as random-access memory (RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory may also comprise a combination of memories of the kind described above.
According to the heterogeneous system provided by the embodiment of the application, the current value accounting node and the highest credit node are determined through a neutral observation node, and the consensus balance determined by the highest credit node is used as the final account balance, so that the fairness of the nodes participating in the transaction is ensured.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the division of the unit is only one logical function division, and other division may be implemented in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. The shown or discussed mutual coupling, direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the disclosure are wholly or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a read-only memory (ROM), or a Random Access Memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a Digital Versatile Disk (DVD), or a semiconductor medium, such as a Solid State Disk (SSD).

Claims (7)

1. A billing consensus method for a heterogeneous system, the method comprising:
the observation node selects at least one accounting node with the credit value of the accounting node larger than the set credit threshold value as a current value accounting node;
the observation node selects the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node;
when an account entry request is received, the corresponding at least one current-value accounting node respectively updates the public account book of the corresponding at least one current-value accounting node, and sends at least one updated account balance to the highest credit node;
the highest credit node selects a consensus balance according to the at least one updated account balance, and sends the consensus balance to the at least one current value accounting node and the non-current value accounting node; the method comprises the following steps:
the highest credit node determines that the number of current value accounting nodes with accounting difference is less than a first set threshold value;
the highest credit node counts the at least one updated account balance, and takes the same and majority account balance as the consensus balance;
when the difference value between the updated account balance and the consensus balance of any one of the at least one current-value accounting node is greater than a second set threshold value, the observation node subtracts a first set value from the credit value of any one current-value accounting node;
the observation node determining a credit value for at least one billing node, the determining at least one parameter by which the credit value for the at least one billing node is determined comprising: organization truth credit score C 1 Transaction participation score C 2 And a billing score C 3 And a billing equivalent score C 4
2. The method of claim 1, further comprising:
the observation node sorts the at least one current value accounting node according to the credit value of the at least one current value accounting node;
when the heartbeat connection of the observation node and the highest credit node is disconnected, the observation node selects a first current-value accounting node with the credit value ordered after the credit value of the highest credit node as a new highest credit node.
3. The method of claim 1, further comprising:
and the observation node determines the set credit threshold according to the efficiency of the heterogeneous system and/or the number of the nodes participating in selection.
4. The method of claim 1, further comprising:
when the accounting node receives the accounting request, the observation node judges whether the accounting node is a current value accounting node;
if the accounting node is not the current value accounting node, waiting for the next accounting request;
and if the accounting node is a current-value accounting node, executing the step that the corresponding at least one current-value accounting node respectively updates the public ledger of the node.
5. The method of claim 4, further comprising:
the accounting node judges whether the posting request is a local mechanism transaction;
and if the posting request is a mechanism transaction, the accounting node updates the self account book according to the posting request.
6. A heterogeneous system comprising a trading node and a billing node, wherein the heterogeneous system further comprises an observation node;
the observation node is used for selecting at least one accounting node with the credit value larger than the set credit threshold value as a current-value accounting node;
the observation node is used for selecting the current-value accounting node with the highest credit value as the highest credit node according to the credit value of at least one current-value accounting node;
the corresponding at least one current-value accounting node is used for respectively updating a public account book of the corresponding at least one current-value accounting node when receiving the account entry request and sending at least one updated account balance to the highest credit node;
the highest credit node is used for selecting a consensus balance according to the at least one updated account balance and sending the consensus balance to the at least one current value accounting node and the non-current value accounting node; the method comprises the following steps:
the highest credit node determines that the number of current-value accounting nodes with accounting difference is less than a first set threshold value;
the highest credit node counts the at least one updated account balance, and takes the same and majority account balance as the consensus balance;
when the difference value between the updated account balance and the consensus balance of any one of the at least one current-value accounting node is greater than a second set threshold value, the observation node subtracts a first set value from the credit value of any one current-value accounting node;
the observation node determining a credit value for at least one billing node, the determining at least one parameter by which the credit value for the at least one billing node is determined comprising: organization truth credit score C 1 Transaction participation score C 2 Billing score C 3 And a billing charge worth score C 4
7. A heterogeneous system comprising an input device, an output device, a memory, and a processor; wherein the memory has stored therein a set of program code and the processor is configured to call the program code stored in the memory to perform the method of any of claims 1~5.
CN201910781389.0A 2019-08-22 2019-08-22 Billing consensus method and system for heterogeneous system Active CN110533402B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910781389.0A CN110533402B (en) 2019-08-22 2019-08-22 Billing consensus method and system for heterogeneous system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910781389.0A CN110533402B (en) 2019-08-22 2019-08-22 Billing consensus method and system for heterogeneous system

Publications (2)

Publication Number Publication Date
CN110533402A CN110533402A (en) 2019-12-03
CN110533402B true CN110533402B (en) 2023-01-03

Family

ID=68662616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910781389.0A Active CN110533402B (en) 2019-08-22 2019-08-22 Billing consensus method and system for heterogeneous system

Country Status (1)

Country Link
CN (1) CN110533402B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113379539B (en) * 2020-03-09 2024-02-23 中国移动通信集团设计院有限公司 Delegation rights and benefits proving consensus method and device based on block chain
CN111683083B (en) * 2020-06-05 2022-07-08 成都质数斯达克科技有限公司 Block chain user identity authentication method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596623A (en) * 2018-05-09 2018-09-28 合肥达朴汇联科技有限公司 A kind of block chain common recognition reaches method
CN108600161A (en) * 2018-03-12 2018-09-28 成都零光量子科技有限公司 A kind of fair efficient block chain common recognition method
CN108665359A (en) * 2017-03-29 2018-10-16 中国移动通信有限公司研究院 Block chain processing method, accounting nodes and verification node
CN108737375A (en) * 2018-04-13 2018-11-02 中山大学 A kind of block chain common recognition method and system
CN109544982A (en) * 2019-01-04 2019-03-29 通链(北京)科技有限公司 Parking information sharing method and shared system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190238485A1 (en) * 2018-01-30 2019-08-01 Hewlett Packard Enterprise Development Lp Transmitting credits between accounting channels
AU2018348318B2 (en) * 2018-11-07 2020-05-21 Advanced New Technologies Co., Ltd. Blockchain system supporting public and private transactions under account models

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665359A (en) * 2017-03-29 2018-10-16 中国移动通信有限公司研究院 Block chain processing method, accounting nodes and verification node
CN108600161A (en) * 2018-03-12 2018-09-28 成都零光量子科技有限公司 A kind of fair efficient block chain common recognition method
CN108737375A (en) * 2018-04-13 2018-11-02 中山大学 A kind of block chain common recognition method and system
CN108596623A (en) * 2018-05-09 2018-09-28 合肥达朴汇联科技有限公司 A kind of block chain common recognition reaches method
CN109544982A (en) * 2019-01-04 2019-03-29 通链(北京)科技有限公司 Parking information sharing method and shared system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
The Development of Smart Contracts for Heterogeneous Blockchains;Henry Syahputra 等;《ResearchGate》;20190131;第1-10页 *
区块链技术及在金融业的应用;王文庆;《商场现代化》;20180430(第08期);第132-133页 *
基于P2P电子商务的可信信用评价模型;安静;《石家庄职业技术学院学报》;20151228(第06期);第52-56页 *

Also Published As

Publication number Publication date
CN110533402A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
US11250518B2 (en) Method for secure ledger distribution and computer system using secure distributed ledger technology
US11907947B2 (en) Resource transfer system
US11995645B2 (en) Computer-implemented system and method for generating and extracting user related data stored on a blockchain
US20230177515A1 (en) Decentralized safeguard against fraud
WO2020192272A1 (en) Blockchain-based transfer method and system, computing device and storage medium
Rosner et al. Understanding and regulating twenty-first century payment systems: The ripple case study
JP3847560B2 (en) System and method for one day netting payment settlement
US8560436B2 (en) System and method for assessing credit risk in an on-line lending environment
US11521290B2 (en) Systems and methods for storing contract information on multiple blockchain ledgers
US20080133402A1 (en) Sociofinancial systems and methods
US11481499B2 (en) Blockchain security system
US20120226587A1 (en) System and method for electronically-facilitated collective purchasing
CN110751468A (en) Multi-directional state channel method, system and medium for block chain expansion
CN107103530A (en) A kind of many account trading method and system of bank individual
CN110533402B (en) Billing consensus method and system for heterogeneous system
WO2019023372A1 (en) Electronic payment network security
CN114282956A (en) Energy transaction method, device, electronic equipment and storage medium
CN109785127A (en) A kind of sales invoice checking method, system and relevant device
CN111292178A (en) Demand matching method and device, storage medium and electronic equipment
CN113506112A (en) Receivable account right confirming method and device and electronic equipment
CA2986719A1 (en) Systems and methods for providing an orchestration layer for service offered by early warning services
CN116703395A (en) Digital RMB payment method, device, equipment, system and medium
CN111598693A (en) Block chain-based account management method, system and device
CN110610424A (en) Account system, service terminal, transaction management method and system, device and medium
US20150100474A1 (en) Internet rosca data processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant