WO2020134618A1 - 一种基于联盟链网络的业务处理方法及系统 - Google Patents

一种基于联盟链网络的业务处理方法及系统 Download PDF

Info

Publication number
WO2020134618A1
WO2020134618A1 PCT/CN2019/115983 CN2019115983W WO2020134618A1 WO 2020134618 A1 WO2020134618 A1 WO 2020134618A1 CN 2019115983 W CN2019115983 W CN 2019115983W WO 2020134618 A1 WO2020134618 A1 WO 2020134618A1
Authority
WO
WIPO (PCT)
Prior art keywords
service node
node
business
target
value corresponding
Prior art date
Application number
PCT/CN2019/115983
Other languages
English (en)
French (fr)
Inventor
杨新颖
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to SG11202100903PA priority Critical patent/SG11202100903PA/en
Priority to EP19905900.7A priority patent/EP3813335B1/en
Publication of WO2020134618A1 publication Critical patent/WO2020134618A1/zh
Priority to US17/162,830 priority patent/US11102284B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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/22Payment schemes or models
    • G06Q20/223Payment schemes or models based on the use of peer-to-peer networks
    • 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/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • 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/405Establishing or using transaction specific rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the embodiments of the present specification relate to the field of information technology, and in particular, to a service processing method and system based on an alliance chain network.
  • multiple service organizations may form an alliance
  • the server (or server cluster) of each service organization may actually be regarded as a node in the alliance chain network.
  • the node managed by the service organization is responsible for accepting business-related transactions initiated by customers of the service organization, and then broadcasts the business-related transactions to the entire network, and each node executes the business-related transactions separately.
  • Business-related transactions are written into the blockchain for distributed certificate deposit.
  • the embodiments of this specification provide a business processing method and device based on the alliance chain network.
  • the technical solutions are as follows:
  • the alliance chain network includes a plurality of service nodes, and the target service node is a service node having a cooperative relationship with at least one service node, and the target client Any client responsible for docking with the target service node, the target client stores an alternative queue corresponding to the target service node, and the alternative queue corresponding to the target service node includes
  • the service node has the node ID of the service node with the cooperative relationship;
  • the service initiation method includes:
  • the target client constructs business-related transactions, and sends the business-related transactions to the target service node;
  • a method for determining an alternative queue described in the business acceptance method of the first aspect includes multiple service nodes, and the target service node is associated with at least one service node.
  • the method includes:
  • the target service node determines the current performance characterization value corresponding to the service node for each service node that has a cooperative relationship with the target service node; the current performance characterization value corresponding to the service node is positively related to the current load capacity of the service node Correlation, and/or, the current performance characteristic value corresponding to the service node is negatively correlated with the current communication delay of the service node;
  • the service nodes having a cooperative relationship with the target service node are sorted from large to small to obtain the target corresponding to the target Alternative queue for the service node.
  • a service acceptance method based on a consortium chain network Based on the service initiation method of the first aspect, the service acceptance method includes:
  • the target service node receives business-related transactions sent by the client responsible for the docking of the cooperative service node; wherein, the cooperative service node is any service node that has a cooperative relationship with the target service node;
  • a business processing system including a consortium chain network composed of multiple service nodes and several clients each service node is responsible for docking; wherein, the target service node is connected to at least one service The node has a service node with a cooperative relationship, and the target client is any client that the target service node is responsible for docking, and the target client stores an alternative queue corresponding to the target service node, corresponding to the target service
  • the candidate queue of the node contains the node identifier of the service node having a cooperative relationship with the target service node;
  • the target client constructs a business-related transaction and sends the business-related transaction to the target service node; when it is determined that the target service node has not accepted the business-related transaction, the A node identifier is determined to be the designated node identifier; the business-related transaction is sent to the service node corresponding to the designated node identifier.
  • the service nodes in the alliance chain network can reach a cooperative relationship with each other. For a group of service nodes with a cooperative relationship, if any of the service nodes are down, it is impossible to accept business-related transactions , Then the client connected to the service node can instead send business-related transactions to other service nodes in the same group for acceptance.
  • each service node In the alliance chain network, no matter which service node accepts business-related transactions, it will be broadcast to the entire network and executed by each service node. Therefore, in the business processing mode based on the alliance chain network, each service node stores The data is naturally consistent. In other words, for any service node, during the service node downtime, other service nodes accept and broadcast the business initiated by the client docked by the service node, which means that the alliance chain network itself already has disaster recovery Ability to provide uninterrupted services to customers of any service organization in the alliance (that is, high availability of network services of the alliance chain).
  • Figure 1 is a schematic diagram of the architecture of the business processing mode based on the alliance chain network
  • FIG. 2 is a schematic diagram of the architecture of a federation chain network with high service availability in the prior art
  • FIG. 3 is a schematic flowchart of a method for initiating a service based on an alliance chain network provided by an embodiment of this specification;
  • FIG. 4 is a schematic flowchart of another method for initiating a service based on an alliance chain network provided by an embodiment of this specification
  • FIG. 5 is a schematic flowchart of a business acceptance method based on an alliance chain network provided by an embodiment of this specification
  • FIG. 6 is a schematic structural diagram of a user operation device provided by an embodiment of this specification.
  • FIG. 7 is a schematic structural diagram of a service device provided by an embodiment of this specification.
  • FIG. 8 is a schematic structural diagram of a service device provided by an embodiment of this specification.
  • FIG. 9 is a schematic structural diagram of a computer device configured to configure an apparatus of an embodiment of this specification.
  • the transaction described in this specification refers to a piece of data that a user creates through a client of the blockchain and needs to be finally released to the distributed database of the blockchain.
  • a transaction is a data structure agreed in the blockchain protocol. To store a piece of data in the blockchain, it needs to be encapsulated into a transaction.
  • a narrowly defined transaction refers to a value transfer issued by the user to the blockchain; for example, in the traditional Bitcoin blockchain network, the transaction can be a transfer initiated by the user in the blockchain.
  • the generalized transaction refers to a piece of business data with business intent published by the user to the blockchain; for example, the operator can build an alliance chain based on actual business needs, relying on the alliance chain to deploy some other types not related to value transfer Online business (for example, rental business, vehicle scheduling business, insurance claims business, credit service, medical service, etc.), and in this type of alliance chain, the transaction can be a business with business intent issued by the user in the alliance chain Message or business request.
  • the client (client) initiates a business, that is, the client (client) initiates a business-related transaction (this article refers to a business-related transaction).
  • FIG. 1 is a schematic diagram of the architecture of a business processing mode based on the alliance chain network.
  • FIG. 2 is a schematic diagram of an alliance chain network with high service availability in the prior art.
  • each service organization needs to perform disaster recovery deployment on the service nodes it manages.
  • service organization A can adopt the disaster recovery deployment model of "two cities and three centers in the same city", deploying a host room and a slave machine room in the same city, and deploying a slave machine room in another place.
  • the service room A is run by the host room.
  • the host room fails the service node A is continued by the slave room in the same city.
  • the slave room in the remote place continues to run.
  • Service node A in this way, can basically ensure that service node A continuously accepts business-related transactions initiated by customers of service organization A, making the service provided by the alliance chain network highly available.
  • the service organization needs to spend a high technical cost to make the data of the three computer rooms deployed by itself consistent. In this way, the three computer rooms of the service organization can only be needed. When the service is switched.
  • the service of the alliance chain network can be made highly available at a low technical cost.
  • at least part of service nodes in the alliance chain network may not need to be deployed for disaster recovery, and among service nodes that are not deployed for disaster recovery, at least one service node group may be divided.
  • the service node group includes at least two service nodes, and the service nodes in the service node group have a cooperative relationship.
  • a group of service nodes that have a cooperative relationship if any one of the service nodes is down, other service nodes in the same group can be used as backup nodes to replace the service node that is down to accept the business-related business initiated by the client docked by the service node. transaction.
  • each service node in the alliance chain network has natural data consistency, and does not require additional technical costs to deploy data consistency to each service node.
  • the service node A may reach a cooperation relationship with the service node B.
  • service node A and service node B are each other's disaster recovery devices.
  • the customer of service node A can instead initiate a business-related transaction to service node B, and service node B can accept the business-related transaction and broadcast it to the entire network for distributed processing. In this way, for the customer of service node A, the service interruption is not felt.
  • FIG. 3 is a schematic flowchart of a method for initiating a service based on an alliance chain network provided by an embodiment of this specification, including the following steps:
  • S300 The target client constructs a business-related transaction, and sends the business-related transaction to the target service node.
  • the alliance chain network includes multiple service nodes.
  • the service node may or may not implement disaster recovery deployment in the prior art. If the service node does not deploy disaster recovery, it can reach a cooperation relationship with other service nodes that also do not perform disaster recovery deployment. It should be noted that, in the alliance chain network, there may be more than one service node group with a cooperative relationship.
  • the target service node refers to a service node that has a cooperative relationship with at least one other service node.
  • the target node any service node in any service node group in the alliance chain network is called the target node.
  • any client that the target service node is responsible for docking is called the target client, and the service node that has a cooperative relationship with the target service node is called the cooperative service node.
  • the target client stores a candidate queue corresponding to the target service node.
  • the candidate queue corresponding to the target service node contains the node identifier of the service node that has a cooperative relationship with the target service node.
  • the target client can select the service node from the stored alternative queue to continue to initiate business-related transactions, and the service will not be interrupted.
  • the arrangement order of each service node in the candidate queue corresponding to the target service node may be specified according to actual needs, or may be specified randomly.
  • the target service node generally sends the candidate queue corresponding to itself to each client connected to itself for storage. If the target service node subsequently updates the candidate queue corresponding to itself, it will also send the updated candidate queue to each client that it docks with, so that each client will store the updated candidate The queue is deleted and the updated candidate queue is stored.
  • S304 Send the business-related transaction to the service node corresponding to the designated node identifier.
  • the target service node may fail to accept the business-related transactions due to downtime, or may fail to accept the business-related transactions due to other reasons (such as excessive load). It should be noted that in this article, after the target client sends a business-related transaction to the target service node, after a specified time interval, if it does not receive the acceptance result returned by the target service node, it can be determined that the target service node has not accepted the office Describe business-related transactions.
  • the target client After the target client determines that the target service node has not accepted the business-related transaction, it can select a node ID (for example, the first node ID) from the stored candidate queue as the designated node ID, and then send the business-related transaction to the designated node Identify the corresponding service node to request the service node to accept the business-related transaction.
  • a node ID for example, the first node ID
  • FIG. 4 is a schematic flowchart of another method for initiating a service based on an alliance chain network provided by an embodiment of this specification, including the following steps:
  • S400 The target client constructs a business-related transaction, and sends the business-related transaction to the target service node.
  • S404 Send the business-related transaction to the service node corresponding to the specified node identifier.
  • step S406 Determine whether the specified condition is satisfied, if not, perform step S408, and if yes, perform step S410.
  • step S408 Determine the next node identifier in the stored candidate queue as the designated node identifier again, and return to step S404.
  • the target client After the target client determines that the target service node has not accepted the business-related transaction, it can conduct business according to the stored service node corresponding to the target service node in the order of each node identification, from first to last for each service node corresponding to the node identification Initiate an attempt until the business-related transaction is accepted, or until the service node corresponding to the Nth node identifier in the stored candidate queue does not accept the business-related transaction; N ⁇ (1, M+1), M The number of nodes identified in the stored alternative queue.
  • the alliance chain network itself already has disaster recovery capabilities, and can provide services to customers of any service organization in the alliance without interruption (that is, high availability of alliance chain network services). Moreover, the alliance chain network has fault tolerance, even if there is a service node down, it will not affect the normal execution of the business.
  • this article gives an example of a method to determine the candidate queue, as follows:
  • Step 1 The target service node determines the current performance characterization value corresponding to the service node for each service node that has a cooperative relationship with the target service node.
  • the current performance characterization value corresponding to the service node is positively correlated with the current load capacity of the service node, and/or, the current performance characterization value corresponding to the service node is negatively correlated with the current communication delay of the service node. That is, the current performance evaluation of the service node is based on at least one of the two indicators of the current load capacity and the current communication delay. The more current resources of the service node are idle, the stronger the current load capacity, and the stronger the current performance. The lower the communication delay of the target service node currently connected to the service node, the stronger the current performance of the service node.
  • Step 2 The target service node sorts the service nodes having a cooperative relationship with the target service node according to the size of the current performance characterization value corresponding to the service nodes having a cooperative relationship with the target service node, A candidate queue corresponding to the target service node is obtained.
  • the target service node will rank the cooperative nodes with strong current performance at the top and the cooperative nodes with weak current performance at the bottom.
  • the candidate queue corresponding to the target service node can also be dynamically updated accordingly.
  • the target service node may, for each service node having a cooperative relationship with the target service node, re-determine the current performance characterization value corresponding to the service node every time a specified period passes, and then according to the target service node The current performance characterization value corresponding to each service node having a cooperative relationship updates the candidate queue corresponding to the target service node.
  • the target service node may reorder the service nodes having a cooperative relationship with the service node according to the size of the current performance characterization value corresponding to each service node having a cooperative relationship with the target service node To obtain the updated candidate queue corresponding to the target service node.
  • each service node in the same service node group can periodically send its own heartbeat information to each other.
  • the heartbeat information sent by each service node may specifically include the resource idle information, communication delay information, and unit time of the service node Transaction acceptance volume, transaction broadcast volume per unit time, etc.
  • the target service node may determine the first current relationship representation value corresponding to the service node for each service node that has a cooperative relationship with the target service node.
  • the first current relationship characterization value corresponding to the service node is used to characterize the frequency with which the service node accepts business-related transactions sent by the target client. The more frequently the service node accepts business-related transactions sent by the target client, the service node The corresponding first current relationship characterization value is larger.
  • the target service node may determine, for each service node having a cooperative relationship with the target service node, the service node corresponding to the current performance characteristic value corresponding to the service node and the first current relationship characteristic value corresponding to the service node The first current comprehensive characterization value.
  • the first current comprehensive characterization value corresponding to the service node is positively correlated with the current performance characterization value corresponding to the service node, and negatively correlated with the first current relationship characterization value corresponding to the service node.
  • the target service node can readjust each service that has a cooperative relationship with the target service node from large to small The nodes are sorted to obtain an updated candidate queue corresponding to the target service node.
  • the target service node when the target service node updates the candidate list corresponding to itself, it generally lowers the order of cooperative service nodes that "help" itself more, and lowers the order of cooperative service nodes that "help” itself less. Bit up. Therefore, when the target service node is down, the target client will continue to send business-related transactions to the service node with the highest priority.
  • a second current relationship characterization value corresponding to the service node is determined.
  • the second current relationship characterization value corresponding to the service node is used to characterize how frequently the target service node accepts business-related transactions sent by the client corresponding to the service node, and the more frequently the target service node accepts the service node The service-related transaction sent by the corresponding client, the larger the second current relationship representation value corresponding to the service node.
  • the second current relationship corresponding to the service node is determined according to the current performance characteristic value corresponding to the service node and the second current relationship characteristic value corresponding to the service node Comprehensive characterization value; wherein, the second current comprehensive characterization value corresponding to the service node is positively correlated with the current performance characterization value corresponding to the service node, and is positively correlated with the second current relationship characterization value corresponding to the service node.
  • the target service node when updating the candidate list corresponding to itself, the target service node generally increases the order of the cooperative service nodes that it "helps" more, and the order of the cooperative service nodes that "helps" itself less. Bit down. Therefore, when the target service node is down, the target client will continue to send business-related transactions to the service node with the highest priority.
  • the first current relationship characterization value and the second current relationship characterization value corresponding to the service node are determined.
  • the current performance characteristic value corresponding to the service node, the first current relationship characteristic value corresponding to the service node, and the second current relationship characteristic value are determined to determine the The third current comprehensive characterization value corresponding to the service node; wherein the third current comprehensive characterization value corresponding to the service node is positively correlated with the current performance characterization value corresponding to the service node, and the first current relationship characterization value corresponding to the service node is negative Relevant, the second current relationship characteristic value corresponding to the service node is positively related.
  • FIG. 5 is a schematic flowchart of a business acceptance method based on an alliance chain network provided by an embodiment of this specification, including the following steps:
  • the target service node receives the business-related transaction sent by the docking client responsible for the docking service node.
  • S502 immediately accept the received business-related transactions; or delay the acceptance of the received business-related transactions; or refuse to accept the received business-related transactions.
  • the cooperative service node of the target service node can accept business-related transactions sent by the target client (explained earlier).
  • the target service node can of course also receive the messages sent by the client that the cooperative service node is responsible for docking Business-related transactions. The following will explain from the perspective of the target service node accepting business instead of its partner service node.
  • the client docked by the cooperative service node may instead send business-related transactions to the target service node.
  • the target service node can have its own transaction acceptance strategy, and according to its own transaction acceptance strategy, choose immediate acceptance, delayed acceptance or rejection.
  • the transaction acceptance strategy can be configured according to actual needs.
  • the target service node may randomly decide to accept immediately, delay acceptance or refuse acceptance.
  • Strategy 1 If, within the specified historical period, the amount of resources consumed by accepting the business-related transactions sent by the client docked by the cooperative service node is not greater than the first threshold, the received business-related transactions will be accepted immediately. If, within a specified historical period, the amount of resources consumed due to accepting business-related transactions sent by the client docked by the cooperative service node is greater than the first threshold, the acceptance is delayed or rejected.
  • Strategy 2 If within the specified historical period, the amount of resources consumed due to accepting business-related transactions sent by the client docked by the cooperative service node is greater than the first threshold and less than the second threshold, the delayed acceptance of the received business Related transactions. If, within a specified historical period, the amount of resources consumed by accepting business-related transactions sent by the client docked by the cooperative service node is not greater than the first threshold and not less than the second threshold, it is immediately accepted or rejected.
  • Strategy 3 If, within the specified historical period, the amount of resources consumed by accepting the business-related transactions sent by the client docked by the cooperative service node is not less than the second threshold, the business-related transactions received will be rejected. If, within a specified historical period, the amount of resources consumed due to accepting business-related transactions sent by the client docked by the cooperative service node is less than the second threshold, it will be accepted immediately or delayed.
  • Strategy 4 If within the specified historical period, the amount of resources consumed by accepting the business-related transactions sent by the client docked by the cooperative service node is not greater than the first threshold, the received business-related transactions will be accepted immediately. If, within a specified historical period, the amount of resources consumed by accepting business-related transactions sent by the client docked by the cooperative service node is greater than the first threshold and less than the second threshold, the business-related transactions received are delayed; The first threshold is smaller than the second threshold. If, within a specified historical period, the amount of resources consumed by accepting business-related transactions sent by the client docked by the cooperative service node is not less than the second threshold, the business-related transactions received are rejected.
  • the first threshold is smaller than the second threshold.
  • the alliance chain network includes multiple service nodes, and the target service node is a service node that has a cooperative relationship with at least one service node, and the user operation device is docked with For the target service node, the user operation device stores a candidate queue corresponding to the target service node, and the candidate queue corresponding to the target service node includes a service node having a cooperative relationship with the target service node Of the node ID;
  • the user operation device includes:
  • the transaction construction module 601 constructs business-related transactions and sends the business-related transactions to the target service node;
  • the processing module 602 when it is determined that the target service node has not accepted the business-related transaction, determines a node identifier in the stored candidate queue as the designated node identifier; sends the business-related transaction to the designated node identifier Corresponding service node.
  • the processing module 602 determines the first node identifier in the stored candidate queue as the designated node identifier; iterates through the following steps until the specified conditions are met:
  • the next node identifier in the stored candidate queue is determined again as the specified node identifier
  • the specified condition is that the business-related transaction is accepted or the service node corresponding to the Nth node identifier in the stored candidate queue does not accept the business-related transaction; N ⁇ (1, M+1 ), M is the number of node identifiers in the stored candidate queue.
  • the alliance chain network includes multiple service nodes.
  • the service device is a service node that has a cooperative relationship with at least one service node.
  • the service device includes:
  • the first determining module 701 determines, for each service node having a cooperative relationship with the service device, the current performance characterization value corresponding to the service node; the current performance characterization value corresponding to the service node is positively related to the current load capacity of the service node Correlation, and/or, the current performance characteristic value corresponding to the service node is inversely related to the current communication delay of the service node;
  • the sorting module 702 sorts the service nodes having a cooperative relationship with the target service node from large to small according to the size of the current performance characterization value corresponding to the service nodes having a cooperative relationship with the service device, and obtains the corresponding Alternative queue of the service device.
  • the device also includes:
  • Update module 703 for each service node that has a cooperative relationship with the target service node, whenever a specified period passes, the current performance characterization value corresponding to the service node is re-determined; according to the relationship with the target service node The current performance characterization value corresponding to each service node updates the candidate queue corresponding to the target service node.
  • the updating module 703 according to the size of the current performance characterization value corresponding to each service node having a cooperative relationship with the target service node, reorders the service nodes having a cooperative relationship with the service node from large to small, The updated candidate queue corresponding to the target service node is obtained.
  • the target client is any client that the service device is responsible for docking
  • the device also includes:
  • the second determination module 704 determines the first current relationship representation value corresponding to the service node for each service node that has a cooperative relationship with the target service node every time a specified period passes; wherein, the service node corresponds to the first A current relationship characterization value is used to characterize how frequently the service node accepts business-related transactions sent by the target client. The more frequently the service node accepts business-related transactions sent by the target client, the first current relationship characterization value corresponding to the service node The bigger
  • the update module 703 determines, for each service node that has a cooperative relationship with the target service node, the corresponding service node according to the current performance characterization value corresponding to the service node and the first current relationship characterization value corresponding to the service node The first current comprehensive characterization value of; where the first current comprehensive characterization value corresponding to the service node is positively correlated with the current performance characterization value corresponding to the service node, and negatively correlated with the first current relationship characterization value corresponding to the service node; The size of the first current comprehensive representation value corresponding to each service node that has a cooperative relationship with the target service node, reorders the service nodes that have a cooperative relationship with the target service node from large to small, and gets updated Corresponding to the candidate queue of the target service node.
  • the device also includes:
  • the third determination module 705 determines the second current relationship characterization value corresponding to the service node for each service node that has a cooperative relationship with the target service node each time a specified period passes; wherein, the service node corresponds to the first 2.
  • the current relationship characterization value is used to characterize how frequently the target service node accepts business-related transactions sent by the client corresponding to the service node. The more frequently the target service node accepts business-related transactions sent by the client corresponding to the service node Transaction, the larger the second current relationship characterization value corresponding to the service node;
  • the update module 703 determines, for each service node that has a cooperative relationship with the target service node, a current performance characteristic value corresponding to the service node and a second current relationship characteristic value corresponding to the service node to determine that the service node corresponds The second current comprehensive characterization value of; where the second current comprehensive characterization value corresponding to the service node is positively correlated with the current performance characterization value corresponding to the service node, and is positively correlated with the second current relationship characterization value corresponding to the service node; The size of the second current comprehensive characterization value corresponding to each service node having a cooperative relationship with the target service node is re-sorted from large to small to each service node having a cooperative relationship with the target service node, after being updated Corresponding to the candidate queue of the target service node.
  • FIG. 8 is a schematic structural diagram of a service device provided by an embodiment of this specification, including:
  • the receiving module 801 receives a business-related transaction sent by a docking client responsible for a cooperation service node; wherein, the cooperation service node is any service node that has a cooperation relationship with the target service node;
  • the processing module 802 immediately accepts the received business-related transactions; or delays the acceptance of the received business-related transactions; or refuses to accept the received business-related transactions.
  • the processing module 802 if the amount of resources consumed by accepting the business-related transaction sent by the client docked by the cooperative service node within the specified historical period is not greater than the first threshold, the received business-related transaction is immediately accepted .
  • the processing module 802 if within a specified historical period, the amount of resources consumed due to accepting business-related transactions sent by the client docked by the cooperative service node is greater than the first threshold and less than the second threshold, then delay acceptance reception Business-related transactions that have arrived; the first threshold is less than the second threshold.
  • the processing module 802 refuses to accept the received business-related transaction if the amount of resources consumed by accepting the business-related transaction sent by the client docked by the cooperative service node is not less than the second threshold within a specified historical period .
  • the embodiments of the present specification also provide a business processing system, including a consortium chain network composed of multiple service nodes and a number of clients each service node is responsible for docking; wherein, the target service node has at least one service node For a service node of a cooperative relationship, the target client is any client that the target service node is responsible for docking.
  • the target client stores an alternative queue corresponding to the target service node, corresponding to the target service node’s
  • the candidate queue contains the node identifier of the service node that has a cooperative relationship with the target service node;
  • the target client constructs a business-related transaction and sends the business-related transaction to the target service node; when it is determined that the target service node has not accepted the business-related transaction, the A node identifier is determined to be the designated node identifier; the business-related transaction is sent to the service node corresponding to the designated node identifier.
  • the target client determines the first node identifier in the stored candidate queue as the specified node identifier; the following steps are performed in a loop until the specified conditions are met:
  • the next node identifier in the stored candidate queue is determined again as the specified node identifier
  • the specified condition is that the business-related transaction is accepted or the service node corresponding to the Nth node identifier in the stored candidate queue does not accept the business-related transaction; N ⁇ (1, M+1 ), M is the number of node identifiers in the stored candidate queue.
  • the target service node determines the current performance characterization value corresponding to the service node; the current performance characterization value corresponding to the service node and the current load capacity of the service node Positive correlation, and/or, the current performance characterization value corresponding to the service node is negatively correlated with the current communication delay of the service node; according to the size of the current performance characterization value corresponding to each service node having a cooperative relationship with the target service node,
  • the service nodes that have a cooperative relationship with the target service node are sorted from large to small to obtain a candidate queue corresponding to the target service node.
  • the target service node receives a business-related transaction sent by a docking client responsible for a cooperative service node, wherein the cooperative service node is any service node that has a cooperative relationship with the target service node; immediately accepts the received Business-related transactions; or delayed acceptance of business-related transactions received; or rejection of business-related transactions received.
  • Embodiments of the present specification also provide a computer device, which includes at least a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to realize the operations shown in FIGS. 3 to 5. The function of the method.
  • the device may include: a processor 1410, a memory 1420, an input/output interface 1430, a communication interface 1440, and a bus 1450.
  • the processor 1410, the memory 1420, the input/output interface 1430 and the communication interface 1440 realize the communication connection among the devices through the bus 1450.
  • the processor 1410 may be implemented by a general-purpose CPU (Central Processing Unit, central processing unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. Programs to implement the technical solutions provided by the embodiments of this specification.
  • the memory 1420 may be implemented in the form of ROM (Read Only Memory, Read Only Memory), RAM (Random Access Memory, Random Access Memory), static storage devices, and dynamic storage devices.
  • the memory 1420 may store an operating system and other application programs. When the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, related program codes are stored in the memory 1420 and called and executed by the processor 1410.
  • the input/output interface 1430 is used to connect input/output modules to realize information input and output.
  • the input/output/module can be configured as a component in the device (not shown in the figure), or can be externally connected to the device to provide corresponding functions.
  • the input device may include a keyboard, mouse, touch screen, microphone, various sensors, etc.
  • the output device may include a display, a speaker, a vibrator, an indicator light, and the like.
  • the communication interface 1440 is used to connect a communication module (not shown in the figure) to implement communication interaction between the device and other devices.
  • the communication module can implement communication through a wired method (such as USB, network cable, etc.), and can also implement communication through a wireless method (such as mobile network, WIFI, Bluetooth, etc.).
  • the bus 1450 includes a path to transfer information between various components of the device (eg, processor 1410, memory 1420, input/output interface 1430, and communication interface 1440).
  • the device may also include the necessary Other components.
  • the above-mentioned device may also include only the components necessary to implement the solutions of the embodiments of the present specification, rather than including all the components shown in the figures.
  • Embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the functions of the methods shown in FIGS. 3 to 5.
  • Computer readable media including permanent and non-permanent, removable and non-removable media, can store information by any method or technology.
  • the information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
  • the system, method, module or unit explained in the above embodiments may be specifically implemented by a computer chip or entity, or implemented by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or any combination of these devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

公开了一种基于联盟链网络的业务处理方法及系统。联盟链网络中的服务节点之间可以彼此达成合作关系,针对一组具有合作关系的服务节点,如果其中有任一服务节点宕机导致无法受理业务相关交易,那么该服务节点对接的客户端就可以转而将业务相关交易发送给同组的其他服务节点进行受理。

Description

一种基于联盟链网络的业务处理方法及系统 技术领域
本说明书实施例涉及信息技术领域,尤其涉及一种基于联盟链网络的业务处理方法及系统。
背景技术
随着区块链技术的发展,基于联盟链网络的业务处理模式较为常见。这种业务处理模式的优势在于,能够以去中心化的方式解决某个服务机构的客户对该服务机构不信任的问题。
具体地,多个服务机构可以组成一个联盟,每个服务机构的服务器(或服务器集群)实际上可视为联盟链网络中的一个节点。针对任一服务机构,该服务机构所管理的节点负责受理该服务机构的客户发起的业务相关交易,然后将该业务相关交易广播至全网,由各节点分别执行该业务相关交易,并将该业务相关交易写入区块链进行分布式存证。
然而在实践中,针对联盟中的任一服务机构,倘若该服务机构所管理的节点设备宕机,那么,在宕机期间,该服务机构的客户发起的业务相关交易将不会被受理,也即,联盟链网络无法为该服务机构的客户提供服务。
发明内容
为了解决联盟链网络中的任一节点设备宕机导致无法为该节点设备对接的客户提供服务的问题,本说明书实施例提供一种基于联盟链网络的业务处理方法及装置,技术方案如下:
根据本说明书实施例的第1方面,提供一种基于联盟链网络的业务发起方法,联盟链网络包括多个服务节点,目标服务节点为与至少一个服务节点具有合作关系的服务节点,目标客户端为所述目标服务节点负责对接的任一客户端,所述目标客户端存储有对应于所述目标服务节点的备选队列,对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识;
所述业务发起方法包括:
所述目标客户端构建业务相关交易,并将所述业务相关交易发送给所述目标服务节 点;
当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的一个节点标识确定为指定节点标识;
将所述业务相关交易发送给所述指定节点标识对应的服务节点。
根据本说明书实施例的第2方面,提供一种确定第1方面的业务受理方法中所述的备选队列的方法,联盟链网络包括多个服务节点,目标服务节点为与至少一个服务节点具有合作关系的服务节点,所述方法包括:
所述目标服务节点针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的当前性能表征值;该服务节点对应的当前性能表征值与该服务节点的当前负载能力正相关,和/或,该服务节点对应的当前性能表征值与该服务节点的当前通信延迟负相关;
根据与所述目标服务节点具有合作关系的各服务节点对应的当前性能表征值的大小,由大到小对与所述目标服务节点具有合作关系的各服务节点进行排序,得到对应于所述目标服务节点的备选队列。
根据本说明书实施例的第3方面,提供一种基于联盟链网络的业务受理方法,基于上述第1方面的业务发起方法,所述业务受理方法包括:
目标服务节点接收合作服务节点负责对接的客户端所发送的业务相关交易;其中,所述合作服务节点是与所述目标服务节点具有合作关系的任一服务节点;
立即受理接收到的业务相关交易;
或延时受理接收到的业务相关交易;
或拒绝受理接收到的业务相关交易。
根据本说明书实施例的第4方面,提供一种业务处理系统,包括由多个服务节点组成的联盟链网络以及每个服务节点负责对接的若干客户端;其中,目标服务节点为与至少一个服务节点具有合作关系的服务节点,目标客户端为所述目标服务节点负责对接的任一客户端,所述目标客户端存储有对应于所述目标服务节点的备选队列,对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识;
所述目标客户端,构建业务相关交易,并将所述业务相关交易发送给所述目标服务 节点;当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的一个节点标识确定为指定节点标识;将所述业务相关交易发送给所述指定节点标识对应的服务节点。
本说明书实施例所提供的技术方案,联盟链网络中的服务节点之间可以彼此达成合作关系,针对一组具有合作关系的服务节点,如果其中有任一服务节点宕机导致无法受理业务相关交易,那么该服务节点对接的客户端就可以转而将业务相关交易发送给同组的其他服务节点进行受理。
由于在联盟链网络中,不论是哪个服务节点受理的业务相关交易,都会被广播至全网,由各服务节点分别执行,因此,在基于联盟链网络的业务处理模式下,各服务节点存储的数据是天然一致的。也就是说,针对任一服务节点,在该服务节点宕机期间,由其他服务节点代为受理该服务节点对接的客户端所发起的业务并广播,这意味着联盟链网络本身就已具备容灾能力,可以为联盟中任一服务机构的客户不间断地提供服务(即联盟链网络服务的高可用性)。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本说明书实施例。
此外,本说明书实施例中的任一实施例并不需要达到上述的全部效果。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1是基于联盟链网络的业务处理模式的架构示意图;
图2是现有技术中具有服务高可用性的联盟链网络的架构示意图;
图3是本说明书实施例提供的一种基于联盟链网络的业务发起方法的流程示意图;
图4是本说明书实施例提供的另一种基于联盟链网络的业务发起方法的流程示意图;
图5是本说明书实施例提供的一种基于联盟链网络的业务受理方法的流程示意图;
图6是本说明书实施例提供的一种用户操作装置的结构示意图;
图7是本说明书实施例提供的一种服务装置的结构示意图;
图8是本说明书实施例提供的一种服务装置的结构示意图;
图9是用于配置本说明书实施例装置的一种计算机设备的结构示意图。
具体实施方式
需要说明的是,在本说明书中所描述的交易(transaction),是指用户通过区块链的客户端创建,并需要最终发布至区块链的分布式数据库中的一笔数据。交易是区块链协议中所约定的一种数据结构,一笔数据要存入区块链,就需要被封装成交易。
区块链中的交易,存在狭义的交易以及广义的交易之分。狭义的交易是指用户向区块链发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是用户在区块链中发起的一笔转账。而广义的交易是指用户向区块链发布的一笔具有业务意图的业务数据;例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转移无关的其它类型的在线业务(比如,租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是用户在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。
在本文中,客户(客户端)发起业务,也就是客户(客户端)发起一笔与业务有关的交易(本文称之为业务相关交易)。
在现有的基于联盟链网络的业务处理模式下,联盟中每个服务机构都有自己的客户。针对任一服务机构,需要由该服务机构所管理的服务节点受理该服务机构的客户发起的业务相关交易。并且,不论是哪个服务机构的客户发起的业务相关交易,最终都会交由联盟链网络中的各服务节点进行分布式执行与存证。图1是基于联盟链网络的业务处理模式的架构示意图。
在现有技术中,针对任一服务节点,为了使得该服务节点可以不间断地受理客户发起的业务相关交易(即服务的高可用性),通常会针对每个服务节点进行容灾部署。
图2是现有技术中具有服务高可用性的联盟链网络的架构示意图。如图2所示,每个服务机构都需要对自己管理的服务节点进行容灾部署。例如,服务机构A可以采用“同城两地三中心”的容灾部署模式,在同一城市部署一个主机房和一个从机房,此外,在异地再部署一个从机房。正常情况下,由主机房运行服务节点A,当主机房发生故障时,由从同城的从机房继续运行服务节点A,当同城的主机房与从机房都故障时,由异地的 从机房继续运行服务节点A,如此,可以基本保证服务节点A不间断地受理服务机构A的客户发起的业务相关交易,使得联盟链网络对外提供的服务高可用。
然而,在图2所示的架构中,针对每个服务机构,该服务机构需要花费高额的技术成本使得自己部署的三个机房实现数据一致,如此,该服务机构的三个机房才能在需要的时候进行服务切换。
而在本发明中,能够以较低的技术成本,实现联盟链网络的服务高可用。具体地,在本发明中,联盟链网络中的至少部分服务节点可以无需进行容灾部署,在没有进行容灾部署的服务节点中,可以划分出至少一个服务节点组。针对每个服务节点组,该服务节点组包括至少两个服务节点,该服务节点组内的服务节点之间具有合作关系。对于具有合作关系的一组服务节点而言,其中任一服务节点宕机,同组的其他服务节点可以作为备用节点,代替该宕机的服务节点受理该服务节点对接的客户端发起的业务相关交易。
并且,由于区块链架构的分布式机制,使得联盟链网络中的各服务节点具有天然的数据一致性,并不需要额外花费技术成本对各服务节点进行数据一致性部署。
例如,如图1所示,服务节点A可以与服务节点B达成合作关系。如此,服务节点A与服务节点B互为对方的容灾设备。当服务节点A宕机时,服务节点A的客户可以转而向服务节点B发起业务相关交易,服务节点B可以受理该业务相关交易并广播至全网进行分布式处理。如此,对于服务节点A的客户而言,并未感受到服务中断,对于联盟链网络而言,由于各服务节点之间具有共识机制,也就具备容错能力(可以容忍一定数量的宕机节点和/或恶意节点),因此,哪怕服务节点A宕机,服务节点B~C依然可以基于共识机制顺利将该业务相关交易写入区块链。
为了使本领域技术人员更好地理解本说明书实施例中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于保护的范围。
以下结合附图,详细说明本说明书各实施例提供的技术方案。
图3是本说明书实施例提供的一种基于联盟链网络的业务发起方法的流程示意图,包括如下步骤:
S300:目标客户端构建业务相关交易,并将所述业务相关交易发送给所述目标服务节点。
在本说明书实施例中,联盟链网络中包括多个服务节点。针对每个服务节点,该服务节点可以进行现有技术中的容灾部署,也可以不进行容灾部署。该服务节点如果不进行容灾部署,则可以与其他同样不进行容灾部署的服务节点达成合作关系。需要说明的是,在联盟链网络中,具有合作关系的服务节点组可以不止一个。
在本文中,目标服务节点是指与其他至少一个服务节点具有合作关系的服务节点。也就是说,为了描述的方便,本文将联盟链网络中的任一服务节点组中的任一服务节点称为目标节点。同样为了描述的方便,本文将目标服务节点负责对接的任一客户端称为目标客户端,将与目标服务节点具有合作关系的服务节点称为合作服务节点。
在本说明书实施例中,目标客户端上存储有对应于所述目标服务节点的备选队列。而对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识。
这意味着,当目标服务节点宕机时,目标客户端可以从存储的备选队列中选择服务节点继续发起业务相关交易,服务不会中断。
其中,对应于所述目标服务节点的备选队列中各服务节点的排列顺序可以根据实际需要指定,也可以随机指定。
目标服务节点一般会预先将对应于自身的备选队列下发给自身对接的每个客户端进行存储。目标服务节点如果后续更新了对应于自身的备选队列,那么,还会将更新后的备选队列下发给自身对接的每个客户端,使得每个客户端将存储的更新前的备选队列删除,并存储更新后的备选队列。
S302:当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的一个节点标识确定为指定节点标识。
S304:将所述业务相关交易发送给所述指定节点标识对应的服务节点。
实际应用中,目标服务节点可能由于宕机而未能受理所述业务相关交易,也可能由于其他原因(如负载过重)而未能受理所述业务相关交易。需要说明的是,在本文中,目标客户端在向目标服务节点发送业务相关交易起,经过指定时间间隔后,如果未收到目标服务节点返回的受理结果,就可以确定目标服务节点未受理所述业务相关交易。
目标客户端确定目标服务节点未受理业务相关交易之后,可以从存储的备选队列中选择一个节点标识(例如,选择第一个节点标识)作为指定节点标识,然后将业务相关交易发送给指定节点标识对应的服务节点,以请求该服务节点受理该业务相关交易。
图4是本说明书实施例提供的另一种基于联盟链网络的业务发起方法的流程示意图,包括以下步骤:
S400:目标客户端构建业务相关交易,并将所述业务相关交易发送给所述目标服务节点。
S402:当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的第一个节点标识确定为指定节点标识。
S404:将所述业务相关交易发送给所述指定节点标识对应的服务节点。
S406:判断是否满足指定条件,若否,则执行步骤S408,若是,执行步骤S410。
S408:重新将存储的备选队列中的下一个节点标识确定为所述指定节点标识,并返回执行步骤S404。
S410:结束。
目标客户端确定目标服务节点未受理业务相关交易之后,可以按照存储的对应于目标服务节点的备选队列中各节点标识的先后顺序,由先到后针对每个节点标识对应的服务节点进行业务发起尝试,直至所述业务相关交易被受理,或者,直至存储的备选队列中的第N个节点标识对应的服务节点未受理所述业务相关交易;N∈(1,M+1),M为存储的备选队列中节点标识的数量。
通过图3或图4所示的业务发起方法,针对任一服务节点,在该服务节点宕机期间,由其他服务节点代为受理该服务节点对接的客户端所发起的业务并广播,这意味着联盟链网络本身就已具备容灾能力,可以为联盟中任一服务机构的客户不间断地提供服务(即联盟链网络服务的高可用性)。并且,联盟链网络具有容错能力,哪怕有服务节点宕机,也不会影响业务的正常执行。
此外,本文示例性的给出了一种确定备选队列的方法,如下:
步骤一:目标服务节点针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的当前性能表征值。
其中,该服务节点对应的当前性能表征值与该服务节点的当前负载能力正相关,和/或,该服务节点对应的当前性能表征值与该服务节点的当前通信延迟负相关。也就是说,对该服务节点的当前性能评价依据当前负载能力与当前通信延迟两个指标中的至少一个指标。该服务节点当前的资源空闲越多,意味着其当前负载能力越强,也就意味着其 当前性能越强。目标服务节点当前连接到该服务节点的通信延迟越低,意味着该服务节点的当前性能越强。
步骤二:目标服务节点根据与所述目标服务节点具有合作关系的各服务节点对应的当前性能表征值的大小,由大到小对与所述目标服务节点具有合作关系的各服务节点进行排序,得到对应于所述目标服务节点的备选队列。
如此,目标服务节点会将当前性能较强的合作节点的排序靠前,将当前性能较弱的合作节点的排序靠后。
进一步地,由于目标服务节点对应的每个合作服务节点的性能往往是动态变化的,因此,对应于目标服务节点的备选队列也可以相应进行动态更新。具体地,目标服务节点可以针对与所述目标服务节点具有合作关系的每个服务节点,每当经过指定周期时,重新确定该服务节点对应的当前性能表征值,然后根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值,更新对应于所述目标服务节点的备选队列。
具体地,目标服务节点可以根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值的大小,重新由大到小对与该服务节点具有合作关系的各服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
在实践中,同一个服务节点组中的各服务节点可以定时向彼此发送自身的心跳信息,每个服务节点发送的心跳信息具体可以包含该服务节点的资源闲置信息、通信延时信息、单位时间的交易受理量、单位时间的交易广播量等等。
此外,本说明书实施例还提供了以下三种更新备选队列的方式:
方式一:
每当经过指定周期时,目标服务节点可以针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第一当前关系表征值。
其中,该服务节点对应的第一当前关系表征值用于表征该服务节点受理目标客户端发送的业务相关交易的频繁程度,该服务节点越频繁受理目标客户端发送的业务相关交易,该服务节点对应的第一当前关系表征值越大。
随后,目标服务节点可以针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第一当前关系表征值,确定该服务节点对应的第一当前综合表征值。其中,该服务节点对应的第一当前综合表征值 与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第一当前关系表征值负相关。
最后,目标服务节点可以根据与所述目标服务节点具有合作关系的每个服务节点对应的第一当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
在方式一中,目标服务节点在更新对应于自身的备选列表时,一般会将“帮助”自身较多的合作服务节点的顺位下调,将“帮助”自身较少的合作服务节点的顺位上调。于是,当目标服务节点宕机时,目标客户端会优先向顺位高的服务节点继续发送业务相关交易。
方式二:
每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第二当前关系表征值。
其中,该服务节点对应的第二当前关系表征值用于表征该所述目标服务节点受理该服务节点对应的客户端发送的业务相关交易的频繁程度,所述目标服务节点越频繁受理该服务节点对应的客户端发送的业务相关交易,该服务节点对应的第二当前关系表征值越大。
然后,针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第二当前关系表征值,确定该服务节点对应的第二当前综合表征值;其中,该服务节点对应的第二当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第二当前关系表征值正相关。
最后,根据与所述目标服务节点具有合作关系的每个服务节点对应的第二当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
在方式二中,目标服务节点在更新对应于自身的备选列表时,一般会将自身“帮助”较多的合作服务节点的顺位上调,将自身“帮助”较少的合作服务节点的顺位下调。于是,当目标服务节点宕机时,目标客户端会优先向顺位高的服务节点继续发送业务相关交易。
方式三:
每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第一当前关系表征值与第二当前关系表征值。
然后,针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值、该服务节点对应的第一当前关系表征值与第二当前关系表征值,确定该服务节点对应的第三当前综合表征值;其中,该服务节点对应的第三当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第一当前关系表征值负相关,与该服务节点对应的第二当前关系表征值正相关。
最后,根据与所述目标服务节点具有合作关系的每个服务节点对应的第三当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
当然,在本说明书实施例中,还可以有很多其他的更新备选队列的策略,例如,如果同一个服务节点组中的各服务节点互相提供的是“有偿帮助”,那么,在更新备选队列时,可以不受上述的第一当前关系表征值和/或第二当前关系表征值的约束。
图5是本说明书实施例提供的一种基于联盟链网络的业务受理方法的流程示意图,包括如下步骤:
S500:目标服务节点接收合作服务节点负责对接的客户端所发送的业务相关交易。
S502:立即受理接收到的业务相关交易;或延时受理接收到的业务相关交易;或拒绝受理接收到的业务相关交易。
在实际应用中,目标服务节点的合作服务节点可以受理目标客户端发送的业务相关交易(前文已有阐述),此外,目标服务节点当然也可以接收其合作服务节点负责对接的客户端所发送的业务相关交易。以下将从目标服务节点代替其合作服务节点受理业务的角度进行说明。
当目标服务节点的某个合作服务节点宕机时,该合作服务节点对接的客户端有可能转而向所述目标服务节点发送业务相关交易。目标服务节点可以有自身的交易受理策略,并依据自身的交易受理策略,选择立即受理、延时受理或拒绝受理。
所述交易受理策略可以根据实际需要进行配置。例如,目标服务节点可以随机决定立即受理、延时受理或拒绝受理。
此外,本说明书实施例示例性的给出以下交易受理策略:
策略一:若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不大于第一阈值,则立即受理接收到的业务相关交易。若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量大于第一阈值,则延时受理或拒绝受理。
策略二:若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量大于第一阈值且小于第二阈值,则延时受理接收到的业务相关交易。若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不大于第一阈值且不小于第二阈值,则立即受理或拒绝受理。
策略三:若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不小于第二阈值,则拒绝受理接收到的业务相关交易。若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量小于第二阈值,则立即受理或延时受理。
策略四:若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不大于第一阈值,则立即受理接收到的业务相关交易。若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量大于第一阈值且小于第二阈值,则延时受理接收到的业务相关交易;所述第一阈值小于所述第二阈值。若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不小于第二阈值,则拒绝受理接收到的业务相关交易。
需要说明的是,在本文中,所述第一阈值小于所述第二阈值。
图6是本说明书实施例提供的一种用户操作装置的结构示意图,联盟链网络包括多个服务节点,目标服务节点为与至少一个服务节点具有合作关系的服务节点,所述用户操作装置对接于所述目标服务节点,所述用户操作装置存储有对应于所述目标服务节点的备选队列,对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识;
所述用户操作装置包括:
交易构建模块601,构建业务相关交易,并将所述业务相关交易发送给所述目标服务节点;
处理模块602,当确定所述目标服务节点未受理所述业务相关交易时,将存储的 备选队列中的一个节点标识确定为指定节点标识;将所述业务相关交易发送给所述指定节点标识对应的服务节点。
所述处理模块602,将存储的备选队列中的第一个节点标识确定为指定节点标识;循环执行以下步骤,直至满足指定条件:
将所述业务相关交易发送给所述指定节点标识对应的服务节点;
若未满足所述指定条件,则重新将存储的备选队列中的下一个节点标识确定为所述指定节点标识;
其中,所述指定条件为,所述业务相关交易被受理,或,存储的备选队列中的第N个节点标识对应的服务节点未受理所述业务相关交易;N∈(1,M+1),M为存储的备选队列中节点标识的数量。
图7是本说明书实施例提供的一种服务装置的结构示意图,联盟链网络包括多个服务节点,所述服务装置为与至少一个服务节点具有合作关系的服务节点,所述服务装置包括:
第一确定模块701,针对与所述服务装置具有合作关系的每个服务节点,确定该服务节点对应的当前性能表征值;该服务节点对应的当前性能表征值与该服务节点的当前负载能力正相关,和/或,该服务节点对应的当前性能表征值与该服务节点的当前通信延迟负相关;
排序模块702,根据与所述服务装置具有合作关系的各服务节点对应的当前性能表征值的大小,由大到小对与所述目标服务节点具有合作关系的各服务节点进行排序,得到对应于所述服务装置的备选队列。
所述装置还包括:
更新模块703,针对与所述目标服务节点具有合作关系的每个服务节点,每当经过指定周期时,重新确定该服务节点对应的当前性能表征值;根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值,更新对应于所述目标服务节点的备选队列。
所述更新模块703,根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值的大小,重新由大到小对与该服务节点具有合作关系的各服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
目标客户端为所述服务装置负责对接的任一客户端;
所述装置还包括:
第二确定模块704,每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第一当前关系表征值;其中,该服务节点对应的第一当前关系表征值用于表征该服务节点受理目标客户端发送的业务相关交易的频繁程度,该服务节点越频繁受理目标客户端发送的业务相关交易,该服务节点对应的第一当前关系表征值越大;
所述更新模块703,针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第一当前关系表征值,确定该服务节点对应的第一当前综合表征值;其中,该服务节点对应的第一当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第一当前关系表征值负相关;根据与所述目标服务节点具有合作关系的每个服务节点对应的第一当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
所述装置还包括:
第三确定模块705,每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第二当前关系表征值;其中,该服务节点对应的第二当前关系表征值用于表征该所述目标服务节点受理该服务节点对应的客户端发送的业务相关交易的频繁程度,所述目标服务节点越频繁受理该服务节点对应的客户端发送的业务相关交易,该服务节点对应的第二当前关系表征值越大;
所述更新模块703,针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第二当前关系表征值,确定该服务节点对应的第二当前综合表征值;其中,该服务节点对应的第二当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第二当前关系表征值正相关;根据与所述目标服务节点具有合作关系的每个服务节点对应的第二当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
基于图3或4所示的业务发起方法,图8是本说明书实施例提供的一种服务装置的结构示意图,包括:
接收模块801,接收合作服务节点负责对接的客户端所发送的业务相关交易;其中,所述合作服务节点是与所述目标服务节点具有合作关系的任一服务节点;
处理模块802,立即受理接收到的业务相关交易;或延时受理接收到的业务相关交易;或拒绝受理接收到的业务相关交易。
所述处理模块802,若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不大于第一阈值,则立即受理接收到的业务相关交易。
所述处理模块802,若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量大于第一阈值且小于第二阈值,则延时受理接收到的业务相关交易;所述第一阈值小于所述第二阈值。
所述处理模块802,若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不小于第二阈值,则拒绝受理接收到的业务相关交易。
此外,本说明书实施例还提供了一种业务处理系统,包括由多个服务节点组成的联盟链网络以及每个服务节点负责对接的若干客户端;其中,目标服务节点为与至少一个服务节点具有合作关系的服务节点,目标客户端为所述目标服务节点负责对接的任一客户端,所述目标客户端存储有对应于所述目标服务节点的备选队列,对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识;
所述目标客户端,构建业务相关交易,并将所述业务相关交易发送给所述目标服务节点;当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的一个节点标识确定为指定节点标识;将所述业务相关交易发送给所述指定节点标识对应的服务节点。
所述目标客户端,将存储的备选队列中的第一个节点标识确定为指定节点标识;循环执行以下步骤,直至满足指定条件:
将所述业务相关交易发送给所述指定节点标识对应的服务节点;
若未满足所述指定条件,则重新将存储的备选队列中的下一个节点标识确定为所述指定节点标识;
其中,所述指定条件为,所述业务相关交易被受理,或,存储的备选队列中的第N个节点标识对应的服务节点未受理所述业务相关交易;N∈(1,M+1),M为存储的备选队列中节点标识的数量。
所述目标服务节点,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的当前性能表征值;该服务节点对应的当前性能表征值与该服务节点的当前负载能力正相关,和/或,该服务节点对应的当前性能表征值与该服务节点的当前通信延迟负相关;根据与所述目标服务节点具有合作关系的各服务节点对应的当前性能表征值的大小,由大到小对与所述目标服务节点具有合作关系的各服务节点进行排序,得到对应于所述目标服务节点的备选队列。
所述目标服务节点,接收合作服务节点负责对接的客户端所发送的业务相关交易,其中,所述合作服务节点是与所述目标服务节点具有合作关系的任一服务节点;立即受理接收到的业务相关交易;或延时受理接收到的业务相关交易;或拒绝受理接收到的业务相关交易。
本说明书实施例还提供一种计算机设备,其至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现图3~5所示方法的功能。
图9示出了本说明书实施例所提供的一种更为具体的计算设备硬件结构示意图,该设备可以包括:处理器1410、存储器1420、输入/输出接口1430、通信接口1440和总线1450。其中处理器1410、存储器1420、输入/输出接口1430和通信接口1440通过总线1450实现彼此之间在设备内部的通信连接。
处理器1410可以采用通用的CPU(Central Processing Unit,中央处理器)、微处理器、应用专用集成电路(Application Specific Integrated Circuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本说明书实施例所提供的技术方案。
存储器1420可以采用ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、静态存储设备,动态存储设备等形式实现。存储器1420可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1420中,并由处理器1410来调用执行。
输入/输出接口1430用于连接输入/输出模块,以实现信息输入及输出。输入输出/模块可以作为组件配置在设备中(图中未示出),也可以外接于设备以提供相应功能。其中输入设备可以包括键盘、鼠标、触摸屏、麦克风、各类传感器等,输出设备可以包括显示器、扬声器、振动器、指示灯等。
通信接口1440用于连接通信模块(图中未示出),以实现本设备与其他设备的通信交互。其中通信模块可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信。
总线1450包括一通路,在设备的各个组件(例如处理器1410、存储器1420、输入/输出接口1430和通信接口1440)之间传输信息。
需要说明的是,尽管上述设备仅示出了处理器1410、存储器1420、输入/输出接口1430、通信接口1440以及总线1450,但是在具体实施过程中,该设备还可以包括实现正常运行所必需的其他组件。此外,本领域的技术人员可以理解的是,上述设备中也可以仅包含实现本说明书实施例方案所必需的组件,而不必包含图中所示的全部组件。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现图3~5所示方法的功能。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本说明书实施例可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本说明书实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等) 执行本说明书实施例各个实施例或者实施例的某些部分所述的方法。
上述实施例阐明的系统、方法、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于方法和设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的方法实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,在实施本说明书实施例方案时可以把各模块的功能在同一个或多个软件和/或硬件中实现。也可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本说明书实施例的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本说明书实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本说明书实施例的保护范围。

Claims (27)

  1. 一种基于联盟链网络的业务发起方法,联盟链网络包括多个服务节点,目标服务节点为与至少一个服务节点具有合作关系的服务节点,目标客户端为所述目标服务节点负责对接的任一客户端,所述目标客户端存储有对应于所述目标服务节点的备选队列,对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识;
    所述业务发起方法包括:
    所述目标客户端构建业务相关交易,并将所述业务相关交易发送给所述目标服务节点;
    当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的一个节点标识确定为指定节点标识;
    将所述业务相关交易发送给所述指定节点标识对应的服务节点。
  2. 如权利要求1所述的方法,将存储的备选队列中的一个节点标识确定为指定节点标识,具体包括:
    将存储的备选队列中的第一个节点标识确定为指定节点标识;
    将所述业务相关交易发送给所述指定节点标识对应的服务节点,具体包括:
    循环执行以下步骤,直至满足指定条件:
    将所述业务相关交易发送给所述指定节点标识对应的服务节点;
    若未满足所述指定条件,则重新将存储的备选队列中的下一个节点标识确定为所述指定节点标识;
    其中,所述指定条件为,所述业务相关交易被受理,或,存储的备选队列中的第N个节点标识对应的服务节点未受理所述业务相关交易;N∈(1,M+1),M为存储的备选队列中节点标识的数量。
  3. 一种确定权利要求1或2中所述的备选队列的方法,联盟链网络包括多个服务节点,目标服务节点为与至少一个服务节点具有合作关系的服务节点,所述方法包括:
    所述目标服务节点针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的当前性能表征值;该服务节点对应的当前性能表征值与该服务节点的当前负载能力正相关,和/或,该服务节点对应的当前性能表征值与该服务节点的当前通信延迟负相关;
    根据与所述目标服务节点具有合作关系的各服务节点对应的当前性能表征值的大小,由大到小对与所述目标服务节点具有合作关系的各服务节点进行排序,得到对应于 所述目标服务节点的备选队列。
  4. 如权利要求3所述的方法,所述方法还包括:
    针对与所述目标服务节点具有合作关系的每个服务节点,每当经过指定周期时,重新确定该服务节点对应的当前性能表征值;
    根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值,更新对应于所述目标服务节点的备选队列。
  5. 如权利要求4所述的方法,根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值,更新对应于所述目标服务节点的备选队列,具体包括:
    根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值的大小,重新由大到小对与该服务节点具有合作关系的各服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
  6. 如权利要求4所述的方法,目标客户端为所述目标服务节点负责对接的任一客户端;
    所述方法还包括:
    每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第一当前关系表征值;
    其中,该服务节点对应的第一当前关系表征值用于表征该服务节点受理目标客户端发送的业务相关交易的频繁程度,该服务节点越频繁受理目标客户端发送的业务相关交易,该服务节点对应的第一当前关系表征值越大;
    根据与所述目标服务节点具有合作关系的各服务节点对应的当前性能表征值,更新对应于所述目标服务节点的备选队列,具体包括:
    针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第一当前关系表征值,确定该服务节点对应的第一当前综合表征值;其中,该服务节点对应的第一当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第一当前关系表征值负相关;
    根据与所述目标服务节点具有合作关系的每个服务节点对应的第一当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
  7. 如权利要求4所述的方法,所述方法还包括:
    每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第二当前关系表征值;
    其中,该服务节点对应的第二当前关系表征值用于表征该所述目标服务节点受理该服务节点对应的客户端发送的业务相关交易的频繁程度,所述目标服务节点越频繁受理该服务节点对应的客户端发送的业务相关交易,该服务节点对应的第二当前关系表征值越大;
    根据与所述目标服务节点具有合作关系的各服务节点对应的当前性能表征值,更新对应于所述目标服务节点的备选队列,具体包括:
    针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第二当前关系表征值,确定该服务节点对应的第二当前综合表征值;其中,该服务节点对应的第二当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第二当前关系表征值正相关;
    根据与所述目标服务节点具有合作关系的每个服务节点对应的第二当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
  8. 一种基于联盟链网络的业务受理方法,基于权利要求1或2所述的业务发起方法,所述业务受理方法包括:
    目标服务节点接收合作服务节点负责对接的客户端所发送的业务相关交易;其中,所述合作服务节点是与所述目标服务节点具有合作关系的任一服务节点;
    立即受理接收到的业务相关交易;
    或延时受理接收到的业务相关交易;
    或拒绝受理接收到的业务相关交易。
  9. 如权利要求8所述的方法,立即受理接收到的业务相关交易,具体包括:
    若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不大于第一阈值,则立即受理接收到的业务相关交易。
  10. 如权利要求8所述的方法,延时受理接收到的业务相关交易,具体包括:
    若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量大于第一阈值且小于第二阈值,则延时受理接收到的业务相关交易;所述第一阈值小于所述第二阈值。
  11. 如权利要求8所述的方法,拒绝受理接收到的业务相关交易,具体包括:
    若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不小于第二阈值,则拒绝受理接收到的业务相关交易。
  12. 一种用户操作装置,联盟链网络包括多个服务节点,目标服务节点为与至少一 个服务节点具有合作关系的服务节点,所述用户操作装置对接于所述目标服务节点,所述用户操作装置存储有对应于所述目标服务节点的备选队列,对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识;
    所述用户操作装置包括:
    交易构建模块,构建业务相关交易,并将所述业务相关交易发送给所述目标服务节点;
    处理模块,当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的一个节点标识确定为指定节点标识;将所述业务相关交易发送给所述指定节点标识对应的服务节点。
  13. 如权利要求12所述的装置,所述处理模块,将存储的备选队列中的第一个节点标识确定为指定节点标识;循环执行以下步骤,直至满足指定条件:
    将所述业务相关交易发送给所述指定节点标识对应的服务节点;
    若未满足所述指定条件,则重新将存储的备选队列中的下一个节点标识确定为所述指定节点标识;
    其中,所述指定条件为,所述业务相关交易被受理,或,存储的备选队列中的第N个节点标识对应的服务节点未受理所述业务相关交易;N∈(1,M+1),M为存储的备选队列中节点标识的数量。
  14. 一种服务装置,联盟链网络包括多个服务节点,所述服务装置为与至少一个服务节点具有合作关系的服务节点,所述服务装置包括:
    第一确定模块,针对与所述服务装置具有合作关系的每个服务节点,确定该服务节点对应的当前性能表征值;该服务节点对应的当前性能表征值与该服务节点的当前负载能力正相关,和/或,该服务节点对应的当前性能表征值与该服务节点的当前通信延迟负相关;
    排序模块,根据与所述服务装置具有合作关系的各服务节点对应的当前性能表征值的大小,由大到小对与所述目标服务节点具有合作关系的各服务节点进行排序,得到对应于所述服务装置的备选队列。
  15. 如权利要求14所述的装置,所述装置还包括:
    更新模块,针对与所述目标服务节点具有合作关系的每个服务节点,每当经过指定周期时,重新确定该服务节点对应的当前性能表征值;根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值,更新对应于所述目标服务节点的备选队列。
  16. 如权利要求15所述的装置,所述更新模块,根据与所述目标服务节点具有合作关系的每个服务节点对应的当前性能表征值的大小,重新由大到小对与该服务节点具有合作关系的各服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
  17. 如权利要求15所述的装置,目标客户端为所述服务装置负责对接的任一客户端;
    所述装置还包括:
    第二确定模块,每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第一当前关系表征值;其中,该服务节点对应的第一当前关系表征值用于表征该服务节点受理目标客户端发送的业务相关交易的频繁程度,该服务节点越频繁受理目标客户端发送的业务相关交易,该服务节点对应的第一当前关系表征值越大;
    所述更新模块,针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第一当前关系表征值,确定该服务节点对应的第一当前综合表征值;其中,该服务节点对应的第一当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第一当前关系表征值负相关;根据与所述目标服务节点具有合作关系的每个服务节点对应的第一当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
  18. 如权利要求15所述的装置,所述装置还包括:
    第三确定模块,每当经过指定周期时,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的第二当前关系表征值;其中,该服务节点对应的第二当前关系表征值用于表征该所述目标服务节点受理该服务节点对应的客户端发送的业务相关交易的频繁程度,所述目标服务节点越频繁受理该服务节点对应的客户端发送的业务相关交易,该服务节点对应的第二当前关系表征值越大;
    所述更新模块,针对与所述目标服务节点具有合作关系的每个服务节点,根据该服务节点对应的当前性能表征值与该服务节点对应的第二当前关系表征值,确定该服务节点对应的第二当前综合表征值;其中,该服务节点对应的第二当前综合表征值与该服务节点对应的当前性能表征值正相关,与该服务节点对应的第二当前关系表征值正相关;根据与所述目标服务节点具有合作关系的每个服务节点对应的第二当前综合表征值的大小,由大到小重新对与所述目标服务节点具有合作关系的各个服务节点进行排序,得到更新后的对应于所述目标服务节点的备选队列。
  19. 一种服务装置,基于权利要求1或2所述的业务发起方法,所述服务装置为所述目标服务节点,所述服务装置包括:
    接收模块,接收合作服务节点负责对接的客户端所发送的业务相关交易;其中,所述合作服务节点是与所述目标服务节点具有合作关系的任一服务节点;
    处理模块,立即受理接收到的业务相关交易;或延时受理接收到的业务相关交易;或拒绝受理接收到的业务相关交易。
  20. 如权利要求19所述的装置,所述处理模块,若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不大于第一阈值,则立即受理接收到的业务相关交易。
  21. 如权利要求19所述的装置,所述处理模块,若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量大于第一阈值且小于第二阈值,则延时受理接收到的业务相关交易;所述第一阈值小于所述第二阈值。
  22. 如权利要求19所述的装置,所述处理模块,若在指定历史期间内,因受理所述合作服务节点对接的客户端所发送的业务相关交易而消耗的资源量不小于第二阈值,则拒绝受理接收到的业务相关交易。
  23. 一种业务处理系统,包括由多个服务节点组成的联盟链网络以及每个服务节点负责对接的若干客户端;其中,目标服务节点为与至少一个服务节点具有合作关系的服务节点,目标客户端为所述目标服务节点负责对接的任一客户端,所述目标客户端存储有对应于所述目标服务节点的备选队列,对应于所述目标服务节点的备选队列中包含与所述目标服务节点具有合作关系的服务节点的节点标识;
    所述目标客户端,构建业务相关交易,并将所述业务相关交易发送给所述目标服务节点;当确定所述目标服务节点未受理所述业务相关交易时,将存储的备选队列中的一个节点标识确定为指定节点标识;将所述业务相关交易发送给所述指定节点标识对应的服务节点。
  24. 如权利要求23所述的系统,所述目标客户端,将存储的备选队列中的第一个节点标识确定为指定节点标识;循环执行以下步骤,直至满足指定条件:
    将所述业务相关交易发送给所述指定节点标识对应的服务节点;
    若未满足所述指定条件,则重新将存储的备选队列中的下一个节点标识确定为所述指定节点标识;
    其中,所述指定条件为,所述业务相关交易被受理,或,存储的备选队列中的第N个节点标识对应的服务节点未受理所述业务相关交易;N∈(1,M+1),M为存储的备 选队列中节点标识的数量。
  25. 如权利要求23所述的系统,所述目标服务节点,针对与所述目标服务节点具有合作关系的每个服务节点,确定该服务节点对应的当前性能表征值;该服务节点对应的当前性能表征值与该服务节点的当前负载能力正相关,和/或,该服务节点对应的当前性能表征值与该服务节点的当前通信延迟负相关;根据与所述目标服务节点具有合作关系的各服务节点对应的当前性能表征值的大小,由大到小对与所述目标服务节点具有合作关系的各服务节点进行排序,得到对应于所述目标服务节点的备选队列。
  26. 如权利要求23所述的系统,所述目标服务节点,接收合作服务节点负责对接的客户端所发送的业务相关交易,其中,所述合作服务节点是与所述目标服务节点具有合作关系的任一服务节点;立即受理接收到的业务相关交易;或延时受理接收到的业务相关交易;或拒绝受理接收到的业务相关交易。
  27. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求1~11任一项所述的方法。
PCT/CN2019/115983 2018-12-28 2019-11-06 一种基于联盟链网络的业务处理方法及系统 WO2020134618A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
SG11202100903PA SG11202100903PA (en) 2018-12-28 2019-11-06 Service processing methods and systems based on a consortium blockchain network
EP19905900.7A EP3813335B1 (en) 2018-12-28 2019-11-06 Service processing methods and systems based on a consortium blockchain network
US17/162,830 US11102284B2 (en) 2018-12-28 2021-01-29 Service processing methods and systems based on a consortium blockchain network

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811621431.4A CN110012054B (zh) 2018-12-28 2018-12-28 一种基于联盟链网络的业务处理方法及系统
CN201811621431.4 2018-12-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/162,830 Continuation US11102284B2 (en) 2018-12-28 2021-01-29 Service processing methods and systems based on a consortium blockchain network

Publications (1)

Publication Number Publication Date
WO2020134618A1 true WO2020134618A1 (zh) 2020-07-02

Family

ID=67165320

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/115983 WO2020134618A1 (zh) 2018-12-28 2019-11-06 一种基于联盟链网络的业务处理方法及系统

Country Status (6)

Country Link
US (1) US11102284B2 (zh)
EP (1) EP3813335B1 (zh)
CN (1) CN110012054B (zh)
SG (1) SG11202100903PA (zh)
TW (1) TW202027482A (zh)
WO (1) WO2020134618A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110012054B (zh) 2018-12-28 2020-06-26 阿里巴巴集团控股有限公司 一种基于联盟链网络的业务处理方法及系统
CN110445657B (zh) * 2019-08-15 2022-01-04 北京计算机技术及应用研究所 一种基于区块链的分布式组网管理系统
CN113691509B (zh) * 2021-08-09 2022-07-05 北京理工大学 一种基于联盟链的电子邮件系统及方法
US20230419313A1 (en) * 2022-06-24 2023-12-28 Atlassian Pty Ltd. Apparatuses, methods, and computer program products for managing a digital asset repository associated with a distributed ledger system based on an event stream related to an application framework

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984045A (zh) * 2006-06-12 2007-06-20 华为技术有限公司 一种实现弹性分组环上业务保护的方法
CN106452871A (zh) * 2016-10-13 2017-02-22 安徽鼎集信息科技有限公司 一种高可用性容灾系统
CN106991573A (zh) * 2017-04-07 2017-07-28 中链科技有限公司 基于区块链技术的艺术品保真方法和服务器
US20180276626A1 (en) * 2017-03-21 2018-09-27 Dappsters, LLC Blockchain systems and methods
CN110012054A (zh) * 2018-12-28 2019-07-12 阿里巴巴集团控股有限公司 一种基于联盟链网络的业务处理方法及系统

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6182139B1 (en) 1996-08-05 2001-01-30 Resonate Inc. Client-side resource-based load-balancing with delayed-resource-binding using TCP state migration to WWW server farm
CN1317658C (zh) * 2002-12-31 2007-05-23 联想(北京)有限公司 利用机群节点相互备份的容错方法
US7752629B2 (en) 2004-05-21 2010-07-06 Bea Systems Inc. System and method for application server with overload protection
CN102148850B (zh) * 2010-08-09 2014-08-06 华为软件技术有限公司 一种集群系统的业务处理方法及集群系统
CN105406980B (zh) * 2015-10-19 2018-06-05 浪潮(北京)电子信息产业有限公司 一种多节点备份方法及装置
CN107291546B (zh) 2016-03-30 2020-07-14 华为技术有限公司 一种资源调度方法及装置
CN107306278A (zh) * 2016-04-18 2017-10-31 阿里巴巴集团控股有限公司 故障检测方法、全局负载均衡服务器和常驻网关
CN105763386A (zh) * 2016-05-13 2016-07-13 中国工商银行股份有限公司 业务处理系统及方法
CN106919476A (zh) * 2017-02-24 2017-07-04 中国科学院软件研究所 基于联盟链的数据安全备份方法、客户端及云服务端
CN107124460A (zh) * 2017-04-28 2017-09-01 北京汇通金财信息科技有限公司 一种联盟链系统、联盟链记账节点通信的方法和装置
CN116055503A (zh) * 2017-06-30 2023-05-02 区块链控股有限公司 区块链网络中概率中继的流量控制
CN108234212A (zh) * 2017-12-29 2018-06-29 深信服网络科技(深圳)有限公司 混合云容灾方法、服务器及存储介质
US11257073B2 (en) * 2018-01-31 2022-02-22 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing machine learning models for smart contracts using distributed ledger technologies in a cloud based computing environment
CN108449401A (zh) * 2018-03-12 2018-08-24 厦门益东智能科技有限公司 一种基于区块链技术的算力共享方法及系统
CN108805569A (zh) * 2018-05-29 2018-11-13 阿里巴巴集团控股有限公司 基于区块链的交易处理方法及装置、电子设备
US20190370793A1 (en) * 2018-06-04 2019-12-05 Decentralized Finance Labs, Inc. Hybrid consensus for blockchain using proof of work and proof of stake
CN108769242A (zh) * 2018-06-13 2018-11-06 杭州迪普科技股份有限公司 一种报文调度方法及装置
CN110740113B (zh) * 2018-07-20 2021-10-29 富士通株式会社 通过多个主体协作进行信息处理的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984045A (zh) * 2006-06-12 2007-06-20 华为技术有限公司 一种实现弹性分组环上业务保护的方法
CN106452871A (zh) * 2016-10-13 2017-02-22 安徽鼎集信息科技有限公司 一种高可用性容灾系统
US20180276626A1 (en) * 2017-03-21 2018-09-27 Dappsters, LLC Blockchain systems and methods
CN106991573A (zh) * 2017-04-07 2017-07-28 中链科技有限公司 基于区块链技术的艺术品保真方法和服务器
CN110012054A (zh) * 2018-12-28 2019-07-12 阿里巴巴集团控股有限公司 一种基于联盟链网络的业务处理方法及系统

Also Published As

Publication number Publication date
SG11202100903PA (en) 2021-02-25
TW202027482A (zh) 2020-07-16
CN110012054A (zh) 2019-07-12
EP3813335B1 (en) 2023-09-06
US11102284B2 (en) 2021-08-24
EP3813335A4 (en) 2021-09-08
EP3813335A1 (en) 2021-04-28
CN110012054B (zh) 2020-06-26
US20210160312A1 (en) 2021-05-27

Similar Documents

Publication Publication Date Title
WO2020134618A1 (zh) 一种基于联盟链网络的业务处理方法及系统
US20220335034A1 (en) Multi-master architectures for distributed databases
US10360199B2 (en) Partitioning and rebalancing data storage
CN113783922A (zh) 负载均衡的方法、系统和装置
US10686875B2 (en) Elastically scalable document-oriented storage services
CN111045821A (zh) 一种容器调度方法、装置、容器调度器及可读存储介质
US9390156B2 (en) Distributed directory environment using clustered LDAP servers
WO2022134797A1 (zh) 一种数据分片存储方法、装置、计算机设备和存储介质
CN106095483A (zh) 服务的自动化部署方法及装置
CN109189327B (zh) 区块链数据的压缩处理方法和装置
CN111163172B (zh) 消息处理系统、方法、电子设备及存储介质
CN114629958B (zh) 资源分配方法、装置、电子设备及存储介质
EP3188531B1 (en) Cluster system self-organizing method, device, and cluster system
CN111435320A (zh) 一种数据处理方法及其装置
JP6171494B2 (ja) 情報処理装置、処理要求プログラム、および処理要求方法
US11005746B1 (en) Stack group merging system
US20200252336A1 (en) Switching fabric configuration and management system
CN117390067A (zh) 数据聚合处理方法、装置、设备及存储介质
CN118283768A (zh) 数据同步方法和通信装置
CN114598743A (zh) 一种服务发现方法、装置、电子设备及存储介质
CN115297156A (zh) 一种微服务注册系统以及微服务注册方法
CN116980460A (zh) RabbitMQ集群的节点连接方法、装置、设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19905900

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019905900

Country of ref document: EP

Effective date: 20210121

NENP Non-entry into the national phase

Ref country code: DE