CN109493204B - Service accounting method based on block chain and terminal equipment - Google Patents

Service accounting method based on block chain and terminal equipment Download PDF

Info

Publication number
CN109493204B
CN109493204B CN201811202424.0A CN201811202424A CN109493204B CN 109493204 B CN109493204 B CN 109493204B CN 201811202424 A CN201811202424 A CN 201811202424A CN 109493204 B CN109493204 B CN 109493204B
Authority
CN
China
Prior art keywords
endorsement
information
node
sub
service
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
CN201811202424.0A
Other languages
Chinese (zh)
Other versions
CN109493204A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811202424.0A priority Critical patent/CN109493204B/en
Publication of CN109493204A publication Critical patent/CN109493204A/en
Application granted granted Critical
Publication of CN109493204B publication Critical patent/CN109493204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention is suitable for the technical field of data processing, and provides a block chain-based service accounting method, terminal equipment and a computer-readable storage medium, wherein the method comprises the following steps: performing serial sequential splitting on the complex service information to obtain a plurality of service sub-information; submitting the plurality of business sub-information to an endorsement node, wherein the endorsement node is used for performing simulation transaction verification on the plurality of business sub-information one by one and returning an endorsement result of successful endorsement after the simulation transaction verification is successful; and if the received endorsement results are successful endorsements and the endorsement nodes returning the endorsement results meet preset conditions, submitting the plurality of service sub-information containing the endorsement results to preset consensus nodes, wherein the consensus nodes are used for keeping accounts of the plurality of service sub-information containing the endorsement results in the block chain. The invention carries out endorsement on a plurality of service sub-information split from the complex service information one by one, and carries out bookkeeping after the endorsement is successful, thereby improving the bookkeeping success rate of the service information on the block chain.

Description

Service accounting method based on block chain and terminal equipment
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a block chain-based service accounting method, terminal equipment and a computer-readable storage medium.
Background
With the updating of information technology, a blockchain is gradually becoming popular as a new storage mode, the blockchain is a chained data structure which combines data blocks in a sequential connection mode according to a time sequence, data is guaranteed not to be falsified and forged in a cryptographic mode, and nowadays, many enterprises and public institutions store generated service information into the blockchain for accounting.
In the prior art, some complex service information faces multiple accounts on a block chain, when the service information is booked in the block chain, because the service information is huge, after the information in the front row in the service information is booked, if the information in the middle row in the service information is judged not to meet the bookkeeping condition, if a certain account cannot support the transaction process of the information in the middle row, the booked information needs to be reversely booked, so that the block chain bookkeeping success rate is low, and data pollution is easily caused to the block chain.
Disclosure of Invention
In view of this, embodiments of the present invention provide a block chain-based service accounting method, a terminal device, and a computer-readable storage medium, so as to solve the problem in the prior art that the success rate of accounting a relatively complex service on a block chain is low, and data pollution is easily caused.
A first aspect of an embodiment of the present invention provides a block chain-based service accounting method, including:
the method comprises the steps of splitting received complex service information in a serial sequence to obtain a plurality of service sub-information, wherein the complex service information comprises a start identifier and an end identifier, the start identifier is used for indicating the service sub-information located at the head, and the end identifier is used for indicating the service sub-information located at the tail;
submitting the plurality of business sub-information to an endorsement node set, wherein endorsement nodes in the endorsement node set are used for performing simulated transaction verification on the plurality of business sub-information one by one and returning endorsement results of successful endorsements after the simulated transaction verification is successful;
if the received endorsement results are successful endorsements and the endorsement node returning the endorsement results meets a preset condition, submitting the plurality of service sub-information containing the endorsement results to a preset consensus node, wherein the consensus node is used for bookkeeping the plurality of service sub-information containing the endorsement results in a block chain.
A second aspect of the embodiments of the present invention provides a terminal device, where the terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
carrying out serial sequence splitting on received complex service information to obtain a plurality of service sub-information, wherein the complex service information comprises a start identifier and an end identifier, the start identifier is used for indicating the service sub-information positioned at the head, and the end identifier is used for indicating the service sub-information positioned at the tail;
submitting the plurality of business sub-information to an endorsement node set, wherein endorsement nodes in the endorsement node set are used for performing simulated transaction verification on the plurality of business sub-information one by one and returning endorsement results of successful endorsements after the simulated transaction verification is successful;
if the received endorsement results are successful endorsements and the endorsement node returning the endorsement results meets a preset condition, submitting the plurality of service sub-information containing the endorsement results to a preset consensus node, wherein the consensus node is used for bookkeeping the plurality of service sub-information containing the endorsement results in a block chain.
A third aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of:
carrying out serial sequence splitting on received complex service information to obtain a plurality of service sub-information, wherein the complex service information comprises a start identifier and an end identifier, the start identifier is used for indicating the service sub-information positioned at the head, and the end identifier is used for indicating the service sub-information positioned at the tail;
submitting the plurality of business sub-information to an endorsement node set, wherein endorsement nodes in the endorsement node set are used for carrying out simulated transaction verification on the plurality of business sub-information one by one and returning an endorsement result of successful endorsement after the simulated transaction verification is successful;
if the received endorsement results are successful endorsements and the endorsement nodes returning the endorsement results meet preset conditions, submitting the plurality of service sub-information containing the endorsement results to preset consensus nodes, wherein the consensus nodes are used for keeping the plurality of service sub-information containing the endorsement results in a block chain.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the embodiment of the invention firstly carries out serial sequential splitting on complex service information to obtain a plurality of pieces of service sub-information, then submits the plurality of split service sub-information to an endorsement node, packs and submits an endorsement result and the plurality of pieces of service sub-information to a consensus node if the endorsement results of the received endorsement node on the plurality of pieces of service sub-information are successful, and carries out bookkeeping on the plurality of pieces of service sub-information containing the endorsement result in a block chain after the consensus verification of the endorsement result and the plurality of pieces of service sub-information is successful.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an implementation of a block chain based service billing method according to an embodiment of the present invention;
fig. 2 is a flowchart of an implementation of a block chain based service billing method according to a second embodiment of the present invention;
fig. 3 is a flowchart of an implementation of a service billing method based on a blockchain according to a third embodiment of the present invention;
fig. 4 is a flowchart of an implementation of a service billing method based on a block chain according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a terminal device according to a fifth embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal device according to a sixth embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows an implementation flow of a service billing method based on a block chain according to an embodiment of the present invention, which is detailed as follows:
in S101, performing serial sequential splitting on received complex service information to obtain a plurality of service sub information, where the complex service information includes a start identifier and an end identifier, the start identifier is used to indicate the service sub information located at the head, and the end identifier is used to indicate the service sub information located at the tail.
In the embodiment of the present invention, the terminal device first obtains complex service information to be billed, which is generated by an upstream system, where the complex service information includes a plurality of service sub-information, and for convenience of description, the complex service information is described as transfer transaction information, but this does not limit the embodiment of the present invention. In order to standardize the generation and detection mechanism of the complex service information, in the embodiment of the present invention, a complete complex service information is set to include a start identifier and an end identifier, where the start identifier is used to indicate the service sub-information located at the head (the service sub-information located at the head includes the start identifier), and the end identifier is used to indicate the service sub-information located at the end (the service sub-information located at the end includes the end identifier). The specific content of the start identifier and the end identifier can be set by self according to the actual situation. In addition, since the terminal device may receive a plurality of different complex service information at the same time, the upstream system may be configured to randomly generate a Start identifier and an end identifier according to different services, for example, in the random generation process, the Start identifier generated by the upstream system is "Start-Num start ", where Num start The Start is used for indicating that the identifier is a Start identifier; the End mark matched with the End mark is' End-Num start ", end is used to indicate that the tag is an End tag. At the same time, set the terminal device according toThe service number in the Start identifier identifies different complex service information, and for example, after receiving the information containing the Start identifier "Start-1" and the information containing the Start identifier "Start-2", it can be identified that the two pieces of information do not belong to the same complex service information.
A complete complex service message contains multiple service sub-messages, for example, the complex service message is "Account A Account to Account B Transfer 100 Yuan (including Start identifier), account B Account to Account C If the transfer is 500 yuan (including the end identifier), the service sub-information is' Account A Account to Account B Transfer 100 Yuan "and" Account B Account to Account C Transfer 500 yuan ". After receiving the complete complex service information, the terminal equipment carries out serial sequence splitting on the complex service information, wherein the splitting basis is a time basis or an initiator basis, and when the time basis aims at a scene containing a plurality of time points in the complex service information, and the serial sequence splitting is carried out according to the time basis, service sub-information corresponding to the time points is split according to the sequence of the time points in the complex service information from front to back; when the serial sequence splitting is carried out according to the initiator, the service sub-information corresponding to the initiator is sequentially split according to the sequence of each initiator from front to back in the complex service information, for example, for the Account A Account to Account B Transfer 100 Yuan, account B Account to Account C For complex service information of transfer 500 yuan', the first initiator is Account Account A The second initiator is Account Account B Therefore, the business sub-information corresponding to the first initiator can be divided into' Account A Account to Account B Transfer 100 Yuan, the business sub-information corresponding to the second initiator is' Account B Account to Account C Transfer 500 yuan ". Generally speaking, since the service implementation (such as the transfer) is sequential, the sequence of the service sub-information and the service sub-information split according to the time base and the initiator base is generally the same according to the actual application fieldThe scenes may be split serially in order using the above or other basis. It should be noted that if other service sub-information exists between the service sub-information containing the start identifier and the service sub-information containing the end identifier, other service sub-information may be set to contain the same start identifier for easy identification, for example, one complex service information may be "Account information A Account to Account B Transfer 100 Yuan (containing Start identifier Start-1), account B Account to Account C 500 Yuan transfer (containing Start-1) Account Account C Account to Account D Transfer 400 Yuan (containing the End identifier End-1) ".
Optionally, if the service sub information including the same start identifier is not received and the service sub information including the end identifier corresponding to the start identifier is not received within the freezing duration after the service sub information including the start identifier is received, the service sub information including the start identifier is placed in the freezing database. In the embodiment of the present invention, a freezing duration (for example, 30 minutes) may be set in the terminal device, and if the service sub-information including the same start identifier is not received in the freezing duration after the service sub-information including the start identifier is received, and the service sub-information including the end identifier corresponding to the start identifier is not received, it is verified that the corresponding service is in a stalled state, so that the service sub-information including the start identifier local to the terminal device is stored in the freezing database, and is not processed for a while, so that the stalled service is prevented from occupying processing resources of the terminal device. And if the service sub-information containing the same start identifier or the service sub-information containing the corresponding end identifier is received subsequently, the matched service sub-information can be searched from the freezing database, and the processing is continued.
In S102, submitting the plurality of service sub-information to an endorsement node set, where an endorsement node in the endorsement node set is configured to perform simulated transaction verification on the plurality of service sub-information one by one, and return an endorsement result that the endorsement is successful after the simulated transaction verification is successful.
And submitting the plurality of business sub-information to an endorsement node set in the block chain, wherein the endorsement node set comprises one or more endorsement nodes, and the endorsement nodes are used for performing simulated transaction verification on the plurality of business sub-information one by one. In a blockchain, a node (peer) refers to a communication entity of the blockchain for maintaining a copy of the blockchain ledger, the node belongs to a logical concept, and a plurality of nodes of different types can run on the same physical machine. In the embodiment of the invention, a designated endorsement node can be performed in advance in a plurality of nodes of the blockchain, and a simulated transaction verification function is deployed on the endorsement node, wherein the simulated transaction verification function is specifically that after a plurality of business sub-information are received, simulated transaction verification is performed one by one in a copy of the blockchain ledger according to the plurality of business sub-information (the verification process is only copy verification, namely, the transaction performed in the verification process is not real transaction and cannot affect data in the blockchain), and after the simulated transaction verification of all the business sub-information is successful, an endorsement result with successful endorsement is returned.
For example, the endorsement node receives the first service sub-information as "Account A Account to Account B Transfer 100 Yuan and the second service sub-information is Account B Account to Account C After transferring 500 yuan, firstly performing simulated transaction verification according to the first business sub-information, and specifically verifying Account in the copy of the block chain Account A Whether the Account balance is greater than or equal to 100 yuan, if the Account A If the account balance is greater than or equal to 100 yuan, the copy of the block chain account book can support the transaction of the first business sub-information, and the endorsement node continues to verify the second business sub-information; if Account Account A If the account balance is less than 100 yuan, the endorsement result of the endorsement failure is directly returned. The endorsement node verifies the second business sub-information on the basis that the first business sub-information simulates the completion of the transaction, namely, the Account is used for verifying the second business sub-information B Account received A The Account is judged according to the 100-element Account transfer and the copy of the block chain Account book B Whether the Account balance is greater than or equal to 500 yuan, if the Account is Account B Account balance greater than or equal toIf the number is equal to 500 yuan, the transaction verification is simulated to be successful, and the endorsement result of the endorsement success is returned; and if the account balance is less than 500 yuan, simulating transaction verification failure and returning an endorsement result of the endorsement failure.
Optionally, a preset intelligent contract is deployed to the endorsement node, the endorsement node splits the complex service information into a plurality of service sub-information, and the plurality of service sub-information are subjected to simulated transaction verification one by one. In the embodiment of the invention, the process of serial sequence splitting of complex service information can be integrated into the endorsement node, specifically, an intelligent contract is compiled based on the functional logic of serial sequence splitting and the functional logic of simulated transaction verification, and the intelligent contract is deployed to the endorsement node. After deployment is completed, when the terminal equipment receives the complex service information, the complex service information is directly submitted to the endorsement node in the endorsement node set, and the endorsement node completes splitting of the complex service information and verification of the simulated transaction of the split plurality of service sub-information, so that the workload of the terminal equipment is reduced, and the processing efficiency of the terminal equipment on the complex service information is improved. It is worth mentioning that the terminal device can uniformly submit the existing complex service information to the endorsement node set for performing the simulated transaction verification when the received complex service information reaches the preset number or the preset data volume, so as to prevent the communication resource loss caused by frequent submission.
In S103, if the received endorsement results are successful endorsement and the endorsement node returning the endorsement result satisfies a preset condition, submitting the plurality of service sub-information including the endorsement result to a preset consensus node, where the consensus node is configured to perform billing in a block chain for the plurality of service sub-information including the endorsement result.
The terminal equipment acquires endorsement results returned by endorsement nodes in the endorsement node set after the endorsement nodes are subjected to simulated transaction verification, and if the endorsement results received by the terminal equipment are successful and the endorsement nodes returning the endorsement results meet preset conditions, a plurality of service sub-information containing the endorsement results are submitted to preset consensus nodes; and if the endorsement result of the endorsement failure exists, stopping accounting the complex service information. For example, the preset condition may be that the endorsement nodes returning the endorsement result reach a preset endorsement number (for example, if the endorsement node set includes 10 endorsement nodes, the endorsement number may be set to 7), and the endorsement result returned by receiving a specified endorsement node or nodes may also be received. After receiving the plurality of service sub-information containing endorsement results, the consensus node of the block chain performs consensus verification on the plurality of service sub-information containing endorsement results in the block chain. In the embodiment of the present invention, the blockchain is preferably a federation chain, so the consensus node may be a designated node of a designated enterprise in the enterprise that constructs the federation chain, and the algorithm for performing consensus verification by the consensus node may adopt a Practical Byzantine Fault Tolerance (PBFT) algorithm or a Delegated Proof of authority (DPOS) algorithm, etc. And after the consensus verification is passed, the consensus node informs all nodes in the block chain to add a plurality of service sub-information containing endorsement results into the block chain in a block form, so as to complete the accounting of the complex service information in the block chain account book.
As can be seen from the embodiment shown in fig. 1, in the embodiment of the present invention, complex service information is split into multiple pieces of service sub information, the multiple pieces of service sub information are submitted to endorsement nodes, and simulated transaction verification is performed one by one, and if the endorsement results returned by the endorsement nodes are successful in endorsement and the endorsement nodes of the returned endorsement results satisfy a preset condition, the multiple pieces of service sub information including the endorsement results are submitted to a consensus node for performing simulated transaction verification one by one.
Fig. 2 is a diagram showing a method obtained by expanding a process after submitting a plurality of business sub-information to an endorsement node set on the basis of the first embodiment of the present invention. The embodiment of the present invention provides an implementation flowchart of a block chain-based service billing method, as shown in fig. 2, the service billing method may include the following steps:
in S201, if the received endorsement results are successful in endorsement, but the endorsement nodes returning the endorsement results do not meet the preset condition, determining the endorsement nodes not returning the endorsement results as target nodes, and submitting the plurality of service sub-information to the target nodes again, where the target nodes are in an online state.
In the embodiment of the present invention, if the terminal device submits the plurality of service sub information to the endorsement node set, the received endorsement results are successful in endorsement, but the endorsement nodes returning the endorsement results do not satisfy the preset condition, for example, the endorsement nodes returning the endorsement results do not reach the preset endorsement number, the terminal device determines the endorsement nodes not returning the endorsement results as the target nodes, and submits the plurality of service sub information to the target nodes again. It should be noted that, since the terminal device cannot establish communication connection with the endorsement node in the offline state, and naturally cannot receive the endorsement result returned from the endorsement node in the offline state, when determining the target node, the endorsement nodes in the endorsement node set in the online state are determined first, and then the endorsement nodes in the online state and not returning the endorsement result are determined as the target nodes.
In S202, if receiving an endorsement acceptance prompt of the target node about the plurality of service sub-information, monitoring the target node, and giving an alarm when the endorsement result returned by the target node is not received within a preset time period.
After submitting the plurality of service sub-information to the target node, the terminal equipment monitors data returned by the target node if receiving an endorsement acceptance prompt (the endorsement acceptance prompt is used for prompting the target node to endorse the plurality of service sub-information). If the terminal device does not receive the endorsement result returned by the target node within the preset time period, the target node is proved to have problems in the endorsement process (if the computing resources of the target node are greatly occupied by other programs), the terminal device gives an alarm based on the target node. The preset time period may be determined based on an average endorsement duration of a plurality of past complex service information, for example, the average endorsement duration is 8 minutes, and then the preset time period may be set to be slightly longer than the average endorsement duration, for example, to be 10 minutes.
In S203, if a rejection endorsement prompt of the target node about the plurality of service sub information is received, repeatedly submitting the plurality of service sub information to the target node at preset submission intervals until receiving the acceptance endorsement prompt of the target node.
On the other hand, if the terminal device receives the endorsement rejection prompt returned by the target node after submitting the plurality of service sub-information to the target node, because the target node may be in a situation that the occupancy rate is too high and the endorsement cannot be performed, the terminal device repeatedly submits the plurality of service sub-information to the target node at preset submission intervals (for example, 1 minute) until the occupancy rate of the target node is reduced and the endorsement can be performed, that is, the terminal device receives the endorsement acceptance prompt returned by the target node.
As can be seen from the embodiment shown in fig. 2, in the embodiment of the present invention, if the endorsement results received by the terminal device are successful in endorsement, but the endorsement nodes returning the endorsement results do not meet the preset condition, the endorsement nodes not returning the endorsement results are determined as target nodes, and the plurality of service sub-information are submitted to the target nodes again, and after the submission is completed, if the terminal device receives an endorsement acceptance prompt returned by the target nodes, an alarm is given when the endorsement results are not received within the preset time period; if the terminal equipment receives the endorsement rejection prompt returned by the target node, the plurality of service sub-information are repeatedly submitted to the target node at preset submission intervals until the endorsement acceptance prompt of the target node is received.
Fig. 3 is a diagram that is obtained by refining a process of submitting a plurality of service sub-information to an endorsement node set on the basis of the first embodiment of the present invention, where the service sub-information is arranged in an order from a low level to a high level of an originator, and the endorsement node set includes a plurality of endorsement nodes, and each endorsement node corresponds to one originator level. An embodiment of the present invention provides an implementation flowchart of a block chain-based service billing method, and as shown in fig. 3, the service billing method may include the following steps:
in S301, the first service sub information in the plurality of service sub information is analyzed to obtain the level of the initiator of the service sub information.
In the embodiment of the invention, one initiator level is preset for a plurality of initiators possibly appearing in the service, and when the complex service information is serially and sequentially split, the split service sub-information is arranged according to the sequence from the low to the high of the initiator level (because the common services such as the transfer are all from bottom to top). For example, when a user transfers money by using a mobile phone, the user calls an application program on the mobile terminal, then the application program sends a transfer request to a banking institution, and the banking institution finally confirms the transfer request. On the other hand, in the embodiment of the present invention, for endorsement nodes in an endorsement node set, each endorsement node corresponds to an initiator level, that is, each endorsement node maintains a copy of a blockchain account book, but each endorsement node has an endorsement authority, and can only perform simulated transaction verification on service information related to the corresponding initiator level, for example, an endorsement node corresponding to a mobile terminal can only perform simulated transaction verification on service information of which an initiator is a mobile terminal. Based on the above situation, when submitting the plurality of business sub-information to the endorsement node set, first analyzing the first business sub-information in the plurality of business sub-information to obtain the level of the initiator of the business sub-information.
In S302, the endorsement nodes in the endorsement node set that match the originator level are determined as first nodes, and the first service sub-information is submitted to the first nodes for simulated transaction verification.
After the initiator level of the first-order business sub-information is determined, endorsement nodes corresponding to the initiator level are searched in the endorsement node set and are determined as first nodes. Because the first node has the endorsement authority to the service information related to the initiator level, the first service sub-information is submitted to the first node for simulation transaction verification. The number of the first nodes can be one or more than one.
In S303, after receiving the endorsement result and the simulated transaction result returned by the first node, analyzing a second node corresponding to the next service sub-information, and submitting the endorsement result, the simulated transaction result, and the next service sub-information to the second node for simulated transaction verification until all the service sub-information is submitted.
In the embodiment of the invention, after the verification of the simulated transaction is completed, the endorsement node in the endorsement node set generates a simulated transaction result in addition to the endorsement result. For example, the first business sub-information is "Account A Account to Account B Transfer 100 Yuan, after the business sub-information is submitted to the first node, if the first node verifies the simulated transaction of the business sub-information successfully, the endorsement result generated by the first node is successful, and in the simulated transaction result generated by the first node, the Account is Account A Account balance of (2) has been reduced by 100 yuan, account B Has increased by 100 dollars. After receiving the endorsement result and the simulated transaction result returned by the first node, if the endorsement result is successful, the terminal equipment analyzes the next service sub-information of the first service sub-information to obtain a second node corresponding to the next service sub-information in the endorsement node set, and sends the endorsement result, the simulated transaction result and the simulated transaction result to the terminal equipmentAnd submitting the next service sub-information to the second node for endorsement, and repeating the process until all the service sub-information is endorsed completely. In addition, in the embodiment of the present invention, a node condition may be set for each initiator level, the node conditions of multiple initiator levels may be set to be the same or different, and for the endorsement result of a certain service sub-information, the terminal device performs the endorsement of the next service sub-information after judging that the endorsement node returning the endorsement result satisfies the corresponding node condition.
Optionally, if the endorsement result returned by the first node is an endorsement failure, stopping accounting for the plurality of service sub-information, and generating and outputting error information based on the simulated transaction result and the service sub-information corresponding to the simulated transaction result. If the endorsement result returned by the first node (or the endorsement node corresponding to other initiator levels) is an endorsement failure, the terminal device stops bookkeeping of the plurality of service sub-information, and generates and outputs error information based on the simulated transaction result generated by the first node and the service sub-information corresponding to the simulated transaction result, so that a user can conveniently search the reason of the bookkeeping failure from the error information, such as insufficient balance of a user account, and the coping mechanism of the bookkeeping failure condition is perfected.
As can be seen from the embodiment shown in fig. 3, in the embodiment of the present invention, an initiator level is obtained by analyzing the first-position business sub-information in the multiple business sub-information, an endorsement node in a set of endorsement nodes that matches the initiator level is determined as a first node, the first-position business sub-information is submitted to the first node for simulated transaction verification, after receiving the endorsement result and the simulated transaction result returned by the first node, a second node corresponding to the next business sub-information is analyzed, and the endorsement result, the simulated transaction result and the next business sub-information are submitted to the second node for simulated transaction verification until all the business sub-information is submitted.
Fig. 4 is a method obtained by refining a process of determining endorsement nodes corresponding to an initiator level in an endorsement node set as first nodes and submitting first-order service sub-information to the first nodes for simulated transaction verification, on the basis that each initiator level corresponds to a preset key pair, each key pair comprises a public key and a private key, and each endorsement node holds a private key corresponding to its own initiator level, and the endorsement nodes in the endorsement node set correspond to the initiator level. The embodiment of the present invention provides an implementation flowchart of a block chain-based service billing method, as shown in fig. 4, the service billing method may include the following steps:
in S401, respectively encrypting the plurality of service sub-information according to the public key corresponding to the initiator level, encrypting preset verification information according to the public key corresponding to the first service sub-information, and sending the encrypted verification information to each endorsement node in the endorsement node set, where the endorsement node is configured to decrypt the encrypted verification information according to its own private key to obtain a decryption result.
In the embodiment of the present invention, each initiator level corresponds to a key pair, each key pair includes a public key and a private key, and the key is preferably generated by an asymmetric encryption algorithm, such as an Elliptic Curve Cryptography (ECC) or an RSA encryption algorithm. The endorsement node holds a private key corresponding to the level of the initiator of the endorsement node, and the terminal equipment at least holds a public key corresponding to each level of the initiator. After the terminal equipment splits the complex service information into a plurality of service sub-information, encrypting each service sub-information according to the public key corresponding to the level of the initiator, and encrypting the preset verification information according to the public key corresponding to the first service sub-information. After encryption is completed, the terminal equipment sends the encrypted verification information to a plurality of endorsement nodes in the endorsement node set, wherein the verification information can be set in a user-defined mode. And for a plurality of endorsement nodes in the endorsement node set, the endorsement nodes are preset to decrypt the received encrypted verification information according to the held private key and return the decryption result to the terminal equipment.
In S402, after receiving the decryption result returned by the endorsement node, if the decryption result is the same as the verification information, determining the endorsement node returning the decryption result as the first node, and submitting the encrypted first-order service sub-information to the first node.
After the terminal equipment receives the decryption result returned by the endorsement node, if the decryption result is the same as the verification information before encryption, the endorsement node returning the decryption result is determined as a first node, namely the first node in the endorsement node set is determined through the verification information. After the first node is determined, the terminal device submits the encrypted first-order business sub-information to the first node, the first node decrypts the encrypted business sub-information based on a private key held by the first node, and performs simulated transaction verification on the obtained business sub-information. In another endorsement mode of the embodiment of the invention, the terminal device can also submit the plurality of encrypted service sub-information to the first node after determining the first node, and the first node only holds the private key corresponding to the level of the initiator of the first node, so that the first node can only successfully decrypt the encrypted first-position service sub-information, and the confidentiality of the information is improved.
As can be seen from the embodiment shown in fig. 4, in the embodiment of the present invention, a plurality of service sub-information are encrypted according to the public key corresponding to the level of the initiator, the preset verification information is encrypted according to the public key corresponding to the service sub-information located at the top, the encrypted verification information is sent to each endorsement node in the endorsement node set, after receiving the decryption result returned by the endorsement node, if the decryption result is the same as the verification information, the endorsement node returning the decryption result is determined as the first node, and the encrypted service sub-information located at the top is submitted to the first node.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 5 shows a block diagram of a terminal device according to an embodiment of the present invention, where the terminal device includes units for executing steps in the embodiment corresponding to fig. 1. Please refer to fig. 1 and fig. 1 for the corresponding description of the embodiment. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 5, the terminal device includes:
a splitting unit 51, configured to split a received complex service information in a serial order to obtain a plurality of service sub information, where the complex service information includes a start identifier and an end identifier, the start identifier is used to indicate the service sub information located at the head, and the end identifier is used to indicate the service sub information located at the tail;
a first submitting unit 52, configured to submit the multiple pieces of business sub-information to an endorsement node set, where an endorsement node in the endorsement node set is configured to perform simulated transaction verification on the multiple pieces of business sub-information one by one, and return an endorsement result that the endorsement is successful after the simulated transaction verification is successful;
a second submitting unit 53, configured to submit the multiple pieces of service sub-information including the endorsement result to a preset consensus node if the received endorsement results are all successful endorsements and the endorsement node that returns the endorsement result meets a preset condition, where the consensus node is configured to perform bookkeeping on the multiple pieces of service sub-information including the endorsement result in a block chain.
Optionally, the first committing unit 52 includes:
a determining unit, configured to determine, if the received endorsement results are successful in endorsement, but the endorsement nodes returning the endorsement results do not meet the preset condition, the endorsement nodes not returning the endorsement results as target nodes, and submit the plurality of service sub-information to the target nodes again, where the target nodes are in an online state;
the monitoring unit is used for monitoring the target node if receiving endorsement acceptance prompts of the target node about the plurality of business sub-information, and giving an alarm when the endorsement results returned by the target node are not received in a preset time period;
and the repeated submission unit is used for repeatedly submitting the plurality of service sub-information to the target node at preset submission intervals until receiving the acceptance endorsement prompt of the target node if the rejection endorsement prompt of the target node about the plurality of service sub-information is received.
Optionally, the multiple service sub-information are arranged in an order from a lower level to a higher level of the initiator, the endorsement node set includes multiple endorsement nodes, each endorsement node corresponds to one initiator level, and the first submitting unit 52 includes:
the analysis unit is used for analyzing the first business sub information in the plurality of business sub information to obtain the level of the initiator of the business sub information;
a submitting subunit, configured to determine the endorsement node in the endorsement node set that matches the originator level as a first node, and submit the first service sub-information to the first node for verification of simulated transaction;
and the sequence submitting unit is used for analyzing a second node corresponding to the next business sub-information after receiving the endorsement result and the simulated transaction result returned by the first node, and submitting the endorsement result, the simulated transaction result and the next business sub-information to the second node for simulated transaction verification until all the business sub-information is submitted completely.
Optionally, each initiator level corresponds to a preset key pair, the key pair includes a public key and a private key, the endorsement node holds the private key corresponding to its own initiator level, and the submitting subunit includes:
the encryption unit is used for respectively encrypting the plurality of service sub-information according to the public keys corresponding to the initiator grades, encrypting preset verification information according to the public key corresponding to the first service sub-information, and sending the encrypted verification information to each endorsement node in the endorsement node set, wherein the endorsement node is used for decrypting the encrypted verification information according to the private key of the endorsement node and obtaining a decryption result;
and the verification unit is used for determining the endorsement node returning the decryption result as the first node and submitting the encrypted first-order business sub-information to the first node if the decryption result is the same as the verification information after receiving the decryption result returned by the endorsement node.
Optionally, the sequential commit unit comprises:
and the book stopping and keeping unit is used for stopping keeping accounts of the plurality of business sub-information if the endorsement result returned by the first node is an endorsement failure, and generating and outputting error information based on the simulated transaction result and the business sub-information corresponding to the simulated transaction result.
Therefore, the terminal device provided by the embodiment of the invention carries out endorsement on a plurality of service sub-information split from complex service information one by one at the endorsement node, and carries out bookkeeping only when all endorsement results are successful, thereby improving the billing success rate of the service information and avoiding block chain data pollution caused by anti-bookkeeping.
Fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62, such as a block chain based service accounting program, stored in said memory 61 and executable on said processor 60. The processor 60 executes the computer program 62 to implement the steps in each of the above embodiments of the block chain based service accounting method, such as the steps S101 to S103 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the units in the terminal device embodiments described above, such as the functions of the units 51 to 53 shown in fig. 5.
Illustratively, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to accomplish the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into a splitting unit, a first submitting unit, and a second submitting unit, and the specific functions of each unit are as follows:
the system comprises a splitting unit, a judging unit and a processing unit, wherein the splitting unit is used for carrying out serial sequence splitting on received complex service information to obtain a plurality of service sub information, the complex service information comprises a start identifier and an end identifier, the start identifier is used for indicating the service sub information positioned at the head, and the end identifier is used for indicating the service sub information positioned at the tail;
the first submission unit is used for submitting the plurality of business sub-information to an endorsement node set, wherein endorsement nodes in the endorsement node set are used for performing simulation transaction verification on the plurality of business sub-information one by one and returning an endorsement result of successful endorsement after the simulation transaction verification is successful;
and a second submitting unit, configured to submit the multiple pieces of service sub-information including the endorsement result to a preset consensus node if the received endorsement results are all successful endorsements and the endorsement node that returns the endorsement result meets a preset condition, where the consensus node is configured to perform bookkeeping on the multiple pieces of service sub-information including the endorsement result in a block chain.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer programs and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the above division of each functional unit is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units according to needs, that is, the internal structure of the terminal device is divided into different functional units to perform all or part of the above described functions. Each functional unit in the embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application. The specific working process of the units in the system may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed terminal device and method may be implemented in other ways. For example, the above-described terminal device embodiments are merely illustrative, and for example, the division of the units is only one logical function division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The 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 addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. A service billing method based on a block chain is characterized by comprising the following steps:
carrying out serial sequence splitting on received complex service information to obtain a plurality of service sub-information, wherein the complex service information comprises a start identifier and an end identifier, the start identifier is used for indicating the service sub-information positioned at the head, and the end identifier is used for indicating the service sub-information positioned at the tail;
submitting the plurality of business sub-information to an endorsement node set, wherein endorsement nodes in the endorsement node set are used for carrying out simulated transaction verification on the plurality of business sub-information one by one and returning an endorsement result of successful endorsement after the simulated transaction verification is successful;
if the received endorsement results are successful endorsements and the endorsement nodes returning the endorsement results meet preset conditions, submitting the plurality of service sub-information containing the endorsement results to preset consensus nodes, wherein the consensus nodes are used for keeping the plurality of service sub-information containing the endorsement results in a block chain.
2. The business accounting method of claim 1, wherein said submitting a plurality of said business sub-information to an endorsement node set comprises:
if the received endorsement results are successful in endorsement, but the endorsement nodes returning the endorsement results do not meet the preset conditions, determining the endorsement nodes not returning the endorsement results as target nodes, and submitting the plurality of service sub-information to the target nodes again, wherein the target nodes are in an online state;
if receiving an endorsement acceptance prompt of the target node about the plurality of service sub-information, monitoring the target node, and giving an alarm when the endorsement result returned by the target node is not received in a preset time period;
and if receiving a rejection endorsement prompt of the target node about the plurality of service sub-information, repeatedly submitting the plurality of service sub-information to the target node at preset submission intervals until receiving the acceptance endorsement prompt of the target node.
3. The service billing method of claim 1 wherein a plurality of said service sub-information are arranged in an order from a low to a high originator level, said endorsement node set comprises a plurality of said endorsement nodes, each of said endorsement nodes corresponding to one of said originator levels, said submitting a plurality of said service sub-information to an endorsement node set comprises:
analyzing the first business sub information in the plurality of business sub information to obtain the level of an initiator of the business sub information;
determining the endorsement node in the endorsement node set which is consistent with the level of the initiator as a first node, and submitting the first business sub-information to the first node for simulation transaction verification;
and after the endorsement result and the simulated transaction result returned by the first node are received, analyzing a second node corresponding to the next business sub-information, and submitting the endorsement result, the simulated transaction result and the next business sub-information to the second node for simulated transaction verification until all the business sub-information is submitted completely.
4. The service billing method of claim 3 wherein each of the originator classes corresponds to a preset key pair, the key pair includes a public key and a private key, the endorsement node holds the private key corresponding to its own originator class, the endorsement nodes in the endorsement node set that match the originator class are determined as first nodes, and the first service sub-information is submitted to the first nodes for simulated transaction verification, including:
respectively encrypting the plurality of service sub-information according to the public key corresponding to the initiator grade, encrypting preset verification information according to the public key corresponding to the first service sub-information, and sending the encrypted verification information to each endorsement node in the endorsement node set, wherein the endorsement node is used for decrypting the encrypted verification information according to the private key of the endorsement node to obtain a decryption result;
after the decryption result returned by the endorsement node is received, if the decryption result is the same as the verification information, determining the endorsement node returning the decryption result as the first node, and submitting the encrypted first-order business sub-information to the first node.
5. The business billing method of claim 3, wherein said receiving the endorsement result and the simulated transaction result returned by the first node comprises:
and if the endorsement result returned by the first node is an endorsement failure, stopping bookkeeping of the plurality of business sub-information, and generating and outputting error information based on the simulated transaction result and the business sub-information corresponding to the simulated transaction result.
6. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
carrying out serial sequence splitting on received complex service information to obtain a plurality of service sub-information, wherein the complex service information comprises a start identifier and an end identifier, the start identifier is used for indicating the service sub-information positioned at the head, and the end identifier is used for indicating the service sub-information positioned at the tail;
submitting the plurality of business sub-information to an endorsement node set, wherein endorsement nodes in the endorsement node set are used for performing simulated transaction verification on the plurality of business sub-information one by one and returning endorsement results of successful endorsements after the simulated transaction verification is successful;
if the received endorsement results are successful endorsements and the endorsement nodes returning the endorsement results meet preset conditions, submitting the plurality of service sub-information containing the endorsement results to preset consensus nodes, wherein the consensus nodes are used for keeping the plurality of service sub-information containing the endorsement results in a block chain.
7. The terminal device of claim 6, wherein said submitting a plurality of said business sub-information to an endorsement node set comprises:
if the received endorsement results are successful in endorsement, but the endorsement nodes returning the endorsement results do not meet the preset conditions, determining the endorsement nodes not returning the endorsement results as target nodes, and submitting the plurality of service sub-information to the target nodes again, wherein the target nodes are in an online state;
if receiving an endorsement acceptance prompt of the target node about the plurality of service sub-information, monitoring the target node, and giving an alarm when the endorsement result returned by the target node is not received in a preset time period;
and if the endorsement rejection prompt of the target node about the plurality of service sub-information is received, repeatedly submitting the plurality of service sub-information to the target node at preset submission intervals until the acceptance endorsement prompt of the target node is received.
8. The terminal device according to claim 6, wherein a plurality of the service sub-information are arranged in an order from a lower level to a higher level of an initiator, the endorsement node set includes a plurality of the endorsement nodes, each of the endorsement nodes corresponds to one initiator level, and the submitting a plurality of the service sub-information to the endorsement node set includes:
analyzing the first business sub information in the plurality of business sub information to obtain the level of an initiator of the business sub information;
determining the endorsement nodes in the endorsement node set which are consistent with the level of the initiator as first nodes, and submitting the first business sub-information to the first nodes for simulation transaction verification;
after receiving the endorsement result and the simulated transaction result returned by the first node, analyzing a second node corresponding to the next business sub-information, and submitting the endorsement result, the simulated transaction result and the next business sub-information to the second node for simulated transaction verification until all the business sub-information is submitted completely.
9. The terminal device of claim 8, wherein each of the initiator levels corresponds to a preset key pair, the key pair includes a public key and a private key, the endorsement node holds the private key corresponding to its own initiator level, the endorsement nodes in the endorsement node set that match the initiator level are determined as first nodes, and the first service sub-information is submitted to the first nodes for verification of simulated transactions, including:
respectively encrypting the plurality of service sub-information according to the public key corresponding to the level of the initiator, encrypting preset verification information according to the public key corresponding to the first service sub-information, and sending the encrypted verification information to each endorsement node in the endorsement node set, wherein the endorsement node is used for decrypting the encrypted verification information according to the private key of the endorsement node to obtain a decryption result;
after the decryption result returned by the endorsement node is received, if the decryption result is the same as the verification information, determining the endorsement node returning the decryption result as the first node, and submitting the encrypted first-order business sub-information to the first node.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the service billing method according to any of claims 1 to 5.
CN201811202424.0A 2018-10-16 2018-10-16 Service accounting method based on block chain and terminal equipment Active CN109493204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811202424.0A CN109493204B (en) 2018-10-16 2018-10-16 Service accounting method based on block chain and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811202424.0A CN109493204B (en) 2018-10-16 2018-10-16 Service accounting method based on block chain and terminal equipment

Publications (2)

Publication Number Publication Date
CN109493204A CN109493204A (en) 2019-03-19
CN109493204B true CN109493204B (en) 2023-04-18

Family

ID=65689826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811202424.0A Active CN109493204B (en) 2018-10-16 2018-10-16 Service accounting method based on block chain and terminal equipment

Country Status (1)

Country Link
CN (1) CN109493204B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110264350A (en) * 2019-05-10 2019-09-20 重庆金融资产交易所有限责任公司 Bookkeeping methods, device and the computer equipment for thering is endorsement to sign based on block chain
CN110210238B (en) * 2019-05-31 2021-05-18 联想(北京)有限公司 Data processing method, data processing device and computer system
CN110197082A (en) * 2019-05-31 2019-09-03 联想(北京)有限公司 Data processing method, data processing equipment and computer system
CN110162992B (en) * 2019-05-31 2022-06-28 联想(北京)有限公司 Data processing method, data processing device and computer system
CN110414979A (en) * 2019-06-21 2019-11-05 深圳壹账通智能科技有限公司 Endorsement endorsement method, device, equipment and storage medium on line
CN110533429A (en) * 2019-08-30 2019-12-03 北京金山云网络技术有限公司 Transaction endorsement method, apparatus and block chain network in block chain
CN111046037A (en) * 2019-11-18 2020-04-21 远光软件股份有限公司 Transaction processing method of block chain, electronic device and storage medium
CN111460525A (en) * 2020-03-31 2020-07-28 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and storage medium
CN111598650A (en) * 2020-04-28 2020-08-28 深圳壹账通智能科技有限公司 Resource request transaction method based on block chain network and related device
CN112133386A (en) * 2020-09-29 2020-12-25 深圳壹账通智能科技有限公司 Block chain-based information processing method, device, equipment and medium
CN112258184B (en) * 2020-10-28 2023-08-01 成都质数斯达克科技有限公司 Method, apparatus, electronic device and readable storage medium for freezing blockchain network
CN112508527A (en) * 2020-12-15 2021-03-16 中国联合网络通信集团有限公司 Service processing method, device and server
CN112738045A (en) * 2020-12-23 2021-04-30 中科三清科技有限公司 Multi-source fusion identity authentication system and method
CN112527912B (en) * 2021-02-07 2021-06-01 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107403379A (en) * 2017-08-07 2017-11-28 质数智慧科技(成都)有限公司 A kind of data processing method, device and block chain Core distribution formula system
CN108288159A (en) * 2018-03-07 2018-07-17 物数(上海)信息科技有限公司 Across chain method of commerce, system, equipment and storage medium based on multi-tiling chain
CN108376368A (en) * 2018-03-07 2018-08-07 物数(上海)信息科技有限公司 Endorsement strategy determines method, apparatus, electronic equipment, storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9418364B2 (en) * 2013-10-25 2016-08-16 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for distributed transactions in a data communication network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107403379A (en) * 2017-08-07 2017-11-28 质数智慧科技(成都)有限公司 A kind of data processing method, device and block chain Core distribution formula system
CN108288159A (en) * 2018-03-07 2018-07-17 物数(上海)信息科技有限公司 Across chain method of commerce, system, equipment and storage medium based on multi-tiling chain
CN108376368A (en) * 2018-03-07 2018-08-07 物数(上海)信息科技有限公司 Endorsement strategy determines method, apparatus, electronic equipment, storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
超级账本Fabric的架构与设计.电脑编程技巧与维护.2017,(第18期),第4-5页. *

Also Published As

Publication number Publication date
CN109493204A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109493204B (en) Service accounting method based on block chain and terminal equipment
CN111724153B (en) Prepaid consumption supervision system and method based on block chain and storage medium
CN108985772A (en) A kind of verification method, device, equipment and the storage medium of block chain
CN111476572B (en) Block chain-based data processing method, device, storage medium and equipment
CN109064146A (en) A kind of digital cash method of commerce, equipment, system, terminal and client wallet
CN110932859B (en) User information processing method, device and equipment and readable storage medium
CN111008863A (en) Lottery drawing method and system based on block chain
CN110365662B (en) Business approval method and device
CN111416709B (en) Voting method, device, equipment and storage medium based on block chain system
CN111414434B (en) Block chain-based data transaction management network, transaction device and storage medium
Li et al. A decentralized and secure blockchain platform for open fair data trading
CN109815289A (en) Block generation method, calculating equipment, storage medium for block chain network
CN115499379B (en) Information interaction method, device, equipment and medium based on block chain
CN111950032A (en) Block chain-based data storage method, terminal device and storage medium
CN111292190A (en) Transaction generation method, block creation method, related device and equipment
CN110599175A (en) Block processing method and related equipment
CN114039733B (en) Certificate storage service transfer method, device and equipment for alliance chains
CN113328854B (en) Service processing method and system based on block chain
CN102693478A (en) Trading method of bid security during bidding procedure and system thereof
CN113988831A (en) Transfer method based on alliance chain
CN113902440A (en) Distributed key-based alliance chain cross-chain transaction method and device
CN110889683B (en) Public mobile payment method and system
CN109818965B (en) Personal identity verification device and method
CN115392914B (en) Supply chain financial platform based on block chain and data processing method
Chenli et al. Fairtrade: Efficient atomic exchange-based fair exchange protocol for digital data trading

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