WO2022193530A1 - Procédé et système de développement d'architecture de pile de protocoles de chaîne de blocs, dispositif et support de stockage - Google Patents

Procédé et système de développement d'architecture de pile de protocoles de chaîne de blocs, dispositif et support de stockage Download PDF

Info

Publication number
WO2022193530A1
WO2022193530A1 PCT/CN2021/109468 CN2021109468W WO2022193530A1 WO 2022193530 A1 WO2022193530 A1 WO 2022193530A1 CN 2021109468 W CN2021109468 W CN 2021109468W WO 2022193530 A1 WO2022193530 A1 WO 2022193530A1
Authority
WO
WIPO (PCT)
Prior art keywords
microservice
data processing
instance information
network
storage
Prior art date
Application number
PCT/CN2021/109468
Other languages
English (en)
Chinese (zh)
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 深圳壹账通智能科技有限公司
Publication of WO2022193530A1 publication Critical patent/WO2022193530A1/fr

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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
    • 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

Definitions

  • the present application belongs to the field of blockchain technology, and specifically relates to a blockchain protocol stack architecture method, system, device and storage medium.
  • Blockchain is a new type of decentralized protocol that can securely store digital currency transactions or other data, and has the advantage that information cannot be forged and tampered with.
  • the protocol stacks of the blockchain in the existing technology are all monolithic applications, and functions such as network, data processing, and storage are all run in one program, and the performance can easily reach the upper limit.
  • the program of the single application is relatively large, and it is very difficult to improve the performance of the blockchain protocol stack through program expansion.
  • This application proposes a blockchain protocol stack architecture method, system, device and storage medium, which develops each function in the blockchain protocol stack into a service component in a microservice architecture.
  • the service components do not affect each other, and the service components with high processing pressure can be individually upgraded in a targeted manner, and the performance of the protocol stack can be flexibly adjusted to improve the performance of the protocol stack to avoid performance bottlenecks in the protocol stack.
  • the embodiment of the first aspect of this application proposes a blockchain protocol stack architecture method.
  • the blockchain protocol stack includes network microservices, data processing microservices, storage microservices, and registration microservices.
  • the method includes:
  • the network microservice, the data processing microservice and the storage microservice all send respective instance information to the registration microservice;
  • the registration microservice receives instance information sent by the network microservice, the data processing microservice, and the storage microservice, and stores the received instance information in a service list;
  • the registered microservice sends the service list to the network microservice and the data processing microservice;
  • the network microservice receives the transaction information sent by the user, and forwards the transaction information to the data processing microservice according to the service list;
  • the data processing microservice receives the transaction information, processes the transaction information, and forwards the transaction information and processing results to the storage microservice for storage according to the service list.
  • the network microservice receives transaction information sent by a user, and forwards the transaction information to the data processing microservice according to the service list, including:
  • the network microservice selects instance information of a data processing microservice from the service list stored in the local cache;
  • the network microservice forwards the transaction information to the data processing microservice corresponding to the instance information according to the selected instance information.
  • the network microservice selects instance information of a data processing microservice from the service list stored in the local cache, including:
  • the network microservice queries whether there are multiple instance information of the data processing microservice contained in the service list in the local cache according to the microservice identifier corresponding to the data processing microservice;
  • the service list only includes instance information of one data processing microservice, select the instance information included in the service list;
  • the locally cached service list includes instance information of multiple data processing microservices
  • one instance information is selected from the instance information of the multiple data processing microservices according to the preset load balancing policy.
  • selecting one instance information from the instance information of the plurality of data processing microservices according to a preset load balancing strategy includes:
  • the network microservice selects one instance information from the instance information of the multiple data processing microservices according to the data sending order corresponding to each data processing microservice specified by the preset load balancing policy; or, the network microservice Obtain the instance information of the data processing microservice with the shortest response time currently recorded in the preset load balancing policy, where the response time is the average value of the time required for the data processing microservice to process all tasks within the preset time period.
  • the method further includes:
  • Each data processing microservice in the protocol stack system sends its own response time to each network microservice every preset time period;
  • Each network microservice receives the response time sent by each data processing microservice, determines the data processing microservice with the shortest response time, and records the instance information of the data processing microservice with the shortest response time in the preset load balancing policy .
  • the network microservice forwards the transaction information to the data processing microservice corresponding to the instance information according to the selected instance information, including:
  • the network microservice extracts the IP address of the data processing microservice from the instance information
  • the network microservice forwards the transaction information to the data processing microservice according to the IP address.
  • the data processing microservice receives the transaction information, processes the transaction information, and forwards the transaction information and processing results to the storage microservice for processing according to the service list.
  • storage including:
  • the data processing microservice queries whether there are multiple instance information of the storage microservice contained in the service list in the local cache according to the microservice identifier corresponding to the storage microservice;
  • the IP address of the storage microservice is extracted from the instance information, and the transaction information and processing result are forwarded to the storage microservice according to the IP address. Describe the storage microservice;
  • the locally cached service list includes the instance information of multiple storage microservices, select one instance information from the multiple storage microservices instance information according to the preset storage balance strategy, and select one instance information from the selected instance information.
  • the IP address is extracted from the information, and the transaction information and the processing result are forwarded to the storage microservice according to the extracted IP address.
  • the embodiment of the second aspect of the present application provides a blockchain protocol stack architecture system, including a network microservice module, a data processing microservice module, a storage microservice module, and a registration microservice module;
  • the network micro-service module is configured to send its own instance information to the registered micro-service module when the protocol stack is started; receive the service list sent by the registered micro-service module; receive transaction information sent by the user, according to the The service list forwards the transaction information to the data processing microservice module;
  • the data processing micro-service module is used to send its own instance information to the registered micro-service module when the protocol stack is started; receive the service list sent by the registered micro-service module; The transaction information is processed, and the transaction information and processing results are forwarded to the storage microservice module for storage according to the service list;
  • the registration micro-service module is configured to receive instance information sent by the network micro-service module, the data processing micro-service module and the storage micro-service module, and store the received instance information in the service list;
  • the service list is sent to the network microservice module and the data processing microservice module;
  • the storage microservice module is configured to receive and store the transaction information and processing results sent by the data processing microservice module.
  • An embodiment of the third aspect of the present application provides a computer device, including a memory and a processor, where computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, cause the processing
  • the device executes the steps of the method described in the first aspect above.
  • Embodiments of the fourth aspect of the present application provide a storage medium storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, cause the one or more processors to execute the above-mentioned first aspect the steps of the method.
  • the protocol stack of the blockchain is divided by function, and each function is developed into mutually independent service components in the microservice architecture.
  • the service components do not affect each other.
  • the service components with high processing pressure can be individually upgraded and expanded, and the performance of the protocol stack can be flexibly adjusted and improved to avoid performance bottlenecks in the protocol stack.
  • the network microservices, data processing microservices and storage microservices in the microservice architecture of the protocol stack all register their own instance information in the registered microservices, and can realize network distribution and data processing according to the service list in the registered microservices. load balancing.
  • FIG. 1 shows a flowchart of a blockchain protocol stack architecture method provided by an embodiment of the present application
  • FIG. 2 shows a schematic structural diagram of a blockchain protocol stack architecture system provided by an embodiment of the present application
  • FIG. 3 shows a schematic structural diagram of a computer device provided by an embodiment of the present application
  • FIG. 4 shows a schematic diagram of a storage medium provided by an embodiment of the present application.
  • Some embodiments of the present application provide a blockchain protocol stack architecture method, which applies the microservice technology to the blockchain protocol stack.
  • the protocol stack of the blockchain is divided into four functions: network, data processing, storage and registration according to functions, and these four functions are developed into network microservices, data processing microservices, storage microservices and registration microservices in the microservice architecture.
  • Serve The network microservices, data processing microservices, and storage microservices all register their own instance information in the registration microservices.
  • the network microservices and data processing microservices also pull the service list from the registered microservices, and implement network distribution based on the service list. and load balancing of data processing.
  • the microservice components in the protocol stack do not affect each other.
  • the microservice components with high processing pressure can be individually upgraded and expanded, and the performance of the protocol stack can be flexibly adjusted and improved. Avoid performance bottlenecks in the protocol stack.
  • the method specifically includes the following steps:
  • Step 101 When the protocol stack of the blockchain is started, the network microservice, the data processing microservice and the storage microservice all send their respective instance information to the registered microservice.
  • the protocol stack of the blockchain includes network microservices, data processing microservices, storage microservices and registration microservices.
  • the protocol stack of the blockchain is divided into four functions: network, data processing, storage, and registration according to functions. Then these four functions are developed into network microservices, data processing microservices, storage microservices and registration microservices in the microservice architecture. These microservices are independent microservice components, and these microservice components can be configured in the same It can also be configured on different hardware devices.
  • the network microservice is responsible for the transmission and reception of the protocol stack network, such as the reception or forwarding of transactions and blocks, the reception or occurrence of consensus messages, the reception or forwarding of user query requests, execution requests and other request information.
  • the data processing microservice is responsible for data processing operations such as the execution of block consensus, the execution of transactions, and information query. In other embodiments of this application, it can also be subdivided into multiple microservices according to the specific processing functions of data processing. For example, you can set Microservices that are only responsible for executing block consensus, microservices that are only responsible for information query, and microservices that are only responsible for executing transactions.
  • the storage microservice is responsible for storing blocks, state information, transaction information, etc.
  • Registering microservices is used to collect instance information of network microservices, data processing microservices, and storage microservices, store the collected instance information in a service list, and synchronize the service list to network microservices, data processing microservices, and storage microservices. Microservices.
  • the protocol stack of the blockchain may include one or more network microservices, one or more data processing microservices, and one or more storage microservices.
  • the number of network microservices, data processing microservices, and storage microservices can be set according to the performance requirements of the blockchain system.
  • the network microservice, data processing microservice and storage microservice After building the protocol stack of the blockchain into the protocol stack of the microservice architecture mode, when the protocol stack of the blockchain is started, the network microservice, data processing microservice and storage microservice all send their respective instance information to the registered microservice .
  • the instance information includes the microservice identifier, instance number, and IP address.
  • the microservice identifier of the network microservice can be net
  • the instance numbers of the two network microservices are instance1 and instance2 respectively
  • the IP address of one network microservice is 192.168.0.10
  • the other network microservice The IP address of the microservice is 192.168.0.11.
  • the instance information of these two network microservices can be net-instance1-192.168.0.10, net- instance2-192.168.0.11.
  • the microservice identifier of the data processing microservice can be compute, the instance numbers of the two data processing microservices are instance1 and instance2 respectively, and the IP address of one data processing microservice is 192.168. 0.12, the IP address of another data processing microservice is 192.168.0.13. Then the instance information of the two data processing microservices can be compute-instance1-192.168.0.12 and compute-instance2-192.168.0.13 respectively.
  • Step 102 The registered microservice receives the instance information sent by the network microservice, the data processing microservice, and the storage microservice, and stores the received instance information in the service list.
  • the registration microservice After the registration microservice receives the instance information sent by the network microservice, data processing microservice, and storage microservice, it stores the received instance information in the service list.
  • the instance information of the same type of microservices in the service list can be arranged consecutively. As shown in Table 1, the service list is firstly the instance information of the network microservice, then the instance information of the data processing microservice, and finally the instance information of the storage microservice. information.
  • Step 103 The registered microservice sends the service list to the network microservice and the data processing microservice.
  • the registered microservice receives the instance information sent by each other microservice in the protocol stack of the blockchain, stores the received instance information in the service list, and sends the service list to each network microservice and each data processing Microservices. After each network microservice and each data processing microservice receive the service list, the service list is stored in their respective caches.
  • Step 104 The network microservice receives the transaction information sent by the user, and forwards the transaction information to the data processing microservice according to the service list.
  • a network microservice in the protocol stack of the blockchain receives the transaction information sent by the user, selects the instance information of a data processing microservice from the service list stored in the local cache, and executes the transaction according to the selected instance information.
  • the information is forwarded to the data processing microservice corresponding to the instance information.
  • the network microservice queries whether there are multiple instance information of the data processing microservice contained in the service list of the local cache according to the microservice identifier (such as compute) corresponding to the data processing microservice. For instance information of a data processing microservice, the IP address of the data processing microservice is extracted from the instance information. The transaction information is forwarded to the data processing microservice according to the IP address.
  • the microservice identifier such as compute
  • the network microservice finds that the locally cached service list includes instance information of multiple data processing microservices, one instance information is selected from the instance information of the multiple data processing microservices according to the preset load balancing policy.
  • the IP address of the data processing microservice is extracted from the instance information.
  • the transaction information is forwarded to the data processing microservice according to the IP address.
  • the preset load balancing policy can specify the data sending order of all data processing microservices in the service list, and the network microservices send data to each data processing microservice in turn according to the data sending order specified by the preset load balancing policy. For example, assuming that the service list includes compute-instance1-192.168.0.12, compute-instance2-192.168.0.13, and compute-instance3-192.168.0.15, a total of three data processing microservice instance information, the data is sent according to the preset load balancing policy
  • the order is the order in which the numbers are arranged in sequence, that is, the order of data transmission is instance1, instance2, and instance3.
  • the network microservice After the network microservice receives the transaction information, it first sends it to the data processing microservice corresponding to instance1, and then receives a transaction information and sends it to the data processing microservice corresponding to instance2, and then sends the received transaction information to the corresponding data processing microservice of instance3. The data processing microservice of instance1, and then the transaction information is received and sent to the data processing microservice corresponding to instance1, and so on.
  • the preset load balancing strategy may not perform load balancing according to the above-mentioned sequence of numbers, but the preset load balancing strategy stipulates that the load balancing is performed according to the response time of each data processing microservice Load balancing, that is, sending data to the data processing microservice with the shortest response time each time.
  • each data processing microservice in the protocol stack system of the blockchain needs to send its own response time to each network microservice every preset time period, and the response time is the data processing microservice in the preset time period. The average time it takes to process all tasks over the time period.
  • the data processing microservice obtains the instance information of each network microservice from the locally cached service list according to the service identifier corresponding to the network microservice, and extracts the IP address of each network microservice from the instance information of each network microservice. . Then send its own response time to each network microservice according to the IP address of each network microservice.
  • the above-mentioned preset time period may be 20 minutes, 30 minutes, or 1 hour, etc. The shorter the preset time period, the higher the accuracy of load balancing.
  • the network microservice After receiving the response time sent by each data processing microservice, the network microservice determines the data processing microservice with the shortest response time, and records the instance information of the data processing microservice in the preset load balancing policy. After the network microservice receives the transaction information, it obtains the instance information of the data processing microservice currently recorded in the preset load balancing policy. The IP address of the data processing microservice is extracted from the instance information. The transaction information is forwarded to the data processing microservice according to the IP address.
  • the network microservice realizes the load balancing among multiple data processing microservices in the blockchain protocol stack according to the preset load balancing strategy and the service list, avoiding the task backlog of individual data processing microservices and improving data processing efficiency , to reduce user waiting time.
  • Step 105 The data processing microservice receives the transaction information, processes the transaction information, and forwards the transaction information and the processing result to the storage microservice for storage according to the service list.
  • the data processing microservice After the data processing microservice receives the transaction information sent by the network microservice, it processes the transaction information to obtain a processing result. After that, the transaction information and its processing result need to be stored, the data processing microservice obtains the service list from the local cache, and queries the storage microservice contained in the service list in the local cache according to the microservice identifier (such as store) corresponding to the storage microservice. Whether the instance information is multiple, and if the service list includes only one instance information of the storage microservice, the IP address of the storage microservice is extracted from the instance information. The transaction information and processing result are forwarded to the storage microservice according to the IP address.
  • the microservice identifier such as store
  • the network microservice finds that the locally cached service list includes instance information of multiple storage microservices, one instance information is selected from the instance information of the multiple storage microservices according to the preset storage balancing strategy. Extract the IP address of the storage microservice from the instance information. The transaction information and processing result are forwarded to the storage microservice according to the IP address.
  • the preset storage balance strategy can specify the data sending order of all storage microservices in the service list, and the data processing microservice sends data to each storage microservice in turn according to the data sending order specified by the preset storage balance strategy. For example, assuming that the service list includes store-instance1-192.168.0.14, store-instance2-192.168.0.16, store-instance3-192.168.0.17, a total of three storage microservice instance information, the preset storage balance policy specifies the data sending order It is the order in which the numbers are arranged in sequence, that is, the data sending order is instance1, instance2, and instance3.
  • the data processing microservice first sends the transaction information and its processing result to the storage microservice corresponding to instance1, and then processes a transaction information and sends it to the storage microservice corresponding to instance2, and processes another transaction information and sends it to the storage microservice corresponding to instance3. service, and then process the transaction information and then send it to the storage microservice corresponding to instance1, and so on.
  • the data processing microservice realizes the balance of storage capacity among multiple storage microservices in the blockchain protocol stack, avoiding the situation that the storage capacity of individual storage microservices is much larger than that of other storage microservices, and reducing the occurrence of individual storage microservices. Storage failure due to insufficient storage space for the storage microservice.
  • the protocol stack of the blockchain is designed as a micro-service architecture mode, because the network micro-services, data processing micro-services, storage micro-services and registration micro-services in the micro-service architecture are decoupled from each other , there will be no mutual interference in performance. Therefore, for microservices of various functions, when solving the performance bottleneck problem, targeted improvements can be made to the hardware where the microservices of a certain function with performance problems are located. For example, if the network microservice has a data distribution bottleneck, the bandwidth of the hardware where the network microservice is located can be increased. If there is a computing bottleneck in the data processing microservice, the computing power of the central processing unit of the hardware where the data processing microservice is located can be improved. If the storage microservice has a storage space bottleneck, the storage capacity of the hard disk of the hardware where the storage microservice is located can be increased.
  • horizontal instance expansion may also be performed for the microservices of a certain function with performance problems, that is, to increase the number of microservices of the function. For example, if network microservices have data distribution bottlenecks, increase the number of network microservices. If the data processing microservices have computing bottlenecks, increase the number of data processing microservices.
  • the protocol stack of the blockchain is divided by function, and each function is developed into mutually independent service components in the microservice architecture.
  • the service components do not affect each other.
  • the service components with high processing pressure can be individually upgraded and expanded, and the performance of the protocol stack can be flexibly adjusted and improved to avoid performance bottlenecks in the protocol stack.
  • the network microservices, data processing microservices and storage microservices in the microservice architecture of the protocol stack all register their own instance information in the registered microservices, and can realize network distribution and data processing according to the service list in the registered microservices. load balancing.
  • An embodiment of the present application provides a blockchain protocol stack architecture system, which is used to execute the blockchain protocol stack architecture method described in any of the above embodiments.
  • the system includes: network microservices module 201, data processing microservice module 202, storage microservice module 203 and registration microservice module 204;
  • the network microservice module 201 is used to send its own instance information to the registration microservice module 204 when the protocol stack is started; receive the service list sent by the registration microservice module 204; receive the transaction information sent by the user, and convert the transaction information according to the service list. forwarded to the data processing microservice module 202;
  • the data processing microservice module 202 is used for sending its own instance information to the registration microservice module 204 when the protocol stack is started; receiving the service list sent by the registration microservice module 204; receiving transaction information, processing the transaction information, and according to the service list Forward the transaction information and processing results to the storage microservice module 203 for storage;
  • the registration micro-service module 204 is used to receive the instance information sent by the network micro-service module 201, the data processing micro-service module 202 and the storage micro-service module 203, and store the received instance information in the service list; send the service list to the network micro-service module Service module 201 and data processing microservice module 202;
  • the storage microservice module 203 is used to receive and store the transaction information and processing results sent by the data processing microservice module 202 .
  • the network microservice module 201 is used to select an instance information of the data processing microservice module 202 from the service list stored in the local cache; according to the selected instance information, forward the transaction information to the data processing microservice module 202 corresponding to the instance information .
  • the network microservice module 201 is configured to query whether there are multiple instance information of the data processing microservice module 202 contained in the service list of the local cache according to the microservice module identifier corresponding to the data processing microservice module 202; if the service list is obtained by querying only includes the instance information of one data processing microservice module 202, then select the instance information included in the service list; if the locally cached service list includes the instance information of multiple data processing microservice modules 202, according to the preset load For the balancing strategy, one instance information is selected from the instance information of the multiple data processing microservice modules 202 .
  • the network microservice module 201 is configured to select one instance information from the instance information of the multiple data processing microservice modules 202 according to the data sending order corresponding to each data processing microservice module 202 specified by the preset load balancing policy; or, It is used to obtain the instance information of the data processing microservice module 202 with the shortest response time currently recorded in the preset load balancing policy, and the response time is the average value of the time required for the data processing microservice module 202 to process all tasks within the preset time period. .
  • Each data processing microservice module 202 is configured to send its own response time to each network microservice module 201 every preset time period;
  • Each network microservice module 201 is configured to receive the response time sent by each data processing microservice module 202, determine the data processing microservice module 202 with the shortest response time, and use the instance of the data processing microservice module 202 with the shortest response time The information is recorded in the preset load balancing policy.
  • the network microservice module 201 is configured to extract the IP address of the data processing microservice module 202 from the instance information; and forward the transaction information to the data processing microservice module 202 according to the IP address.
  • the data processing microservice module 202 is used to query whether there are multiple instance information of the storage microservice module 203 contained in the service list of the local cache according to the microservice module identifier corresponding to the storage microservice module 203; Only one instance information of the storage microservice module 203 is included, then the IP address of the storage microservice module 203 is extracted from the instance information, and the transaction information and processing results are forwarded to the storage microservice module 203 according to the IP address; if the local cache is queried
  • the service list includes the instance information of multiple storage micro-service modules 203, then according to the preset storage balancing strategy, select one instance information from the multiple storage micro-service modules 203 instance information, and extract the IP address from the selected instance information. , and forward the transaction information and the processing result to the storage microservice module 203 according to the extracted IP address.
  • the protocol stack of the blockchain is divided by function, and each function is developed into mutually independent service components in the microservice architecture.
  • the service components do not affect each other.
  • the service components with high processing pressure can be individually upgraded and expanded, and the performance of the protocol stack can be flexibly adjusted and improved to avoid performance bottlenecks in the protocol stack.
  • the network microservice module, data processing microservice module and storage microservice module in the microservice architecture of the protocol stack all register their own instance information in the registration microservice module, and can implement the network according to the service list in the registration microservice module. Distribution and load balancing of data processing.
  • the computer device includes a processor, a storage medium, a memory, and a network interface connected through a system bus.
  • the storage medium of the computer device stores an operating system, a database and computer-readable instructions
  • the database can store a sequence of control information
  • the processor can be made to implement a blockchain Protocol stack architecture approach.
  • the processor of the computer device is used to provide computing and control capabilities and support the operation of the entire computer device.
  • Computer-readable instructions may be stored in the memory of the computer device, and when the computer-readable instructions are executed by the processor, the processor may execute a blockchain protocol stack architecture method.
  • the network interface of the computer equipment is used for communication with the terminal connection.
  • FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • the computer device includes a memory, a processor and a computer program stored on the memory and running on the processor.
  • the processor executes the computer program, the following steps are implemented: when the protocol stack is started, the network microservice, the data processing microservice and the storage microservice Each service sends its own instance information to the registered microservice; the registered microservice receives the instance information sent by the network microservice, data processing microservice and storage microservice, and stores the received instance information in the service list; the registered microservice stores the service list Send to the network microservice and data processing microservice; the network microservice receives the transaction information sent by the user, and forwards the transaction information to the data processing microservice according to the service list; the data processing microservice receives the transaction information, processes the transaction information, and The list forwards transaction information and processing results to the storage microservice for storage.
  • the network microservice selects an instance information of the data processing microservice from the service list stored in the local cache; the network microservice forwards the transaction information to the instance information according to the selected instance information Corresponding data processing microservices.
  • the network microservice inquires whether there are multiple instance information of the data processing microservice contained in the service list of the local cache; If the service list only includes the instance information of one data processing microservice, select the instance information included in the service list; if the locally cached service list includes the instance information of multiple data processing microservices, the default load balancing strategy is used. , select one instance information from the instance information of multiple data processing microservices.
  • the network microservice selects one instance information from the instance information of the multiple data processing microservices according to the data sending order corresponding to each data processing microservice specified by the preset load balancing policy ; Or, the network microservice obtains the instance information of the data processing microservice with the shortest response time currently recorded in the preset load balancing policy, and the response time is the average time required for the data processing microservice to process all tasks within the preset time period.
  • each data processing microservice in the protocol stack sends its own response time to each network microservice every preset time period; each network microservice receives each network microservice.
  • the response time sent by the data processing microservice determines the data processing microservice with the shortest response time, and records the instance information of the data processing microservice with the shortest response time in the preset load balancing policy.
  • the network microservice extracts the IP address of the data processing microservice from the instance information; the network microservice forwards the transaction information to the data processing microservice according to the IP address.
  • the data processing microservice inquires whether there are multiple instance information of the storage microservice contained in the service list of the local cache; The list only includes the instance information of one storage microservice, then the IP address of the storage microservice is extracted from the instance information, and the transaction information and processing results are forwarded to the storage microservice according to the IP address; if the locally cached service list is queried, If the instance information of multiple storage microservices is included, according to the preset storage balance strategy, select one instance information from the instance information of multiple storage microservices, extract the IP address from the selected instance information, and transfer the transaction according to the extracted IP address. The information and processing results are forwarded to the storage microservice.
  • An embodiment of the present application further provides a storage medium storing computer-readable instructions.
  • the one or more processors perform the following steps :
  • the network microservice, data processing microservice and storage microservice all send their respective instance information to the registered microservice;
  • the registered microservice receives the instance information sent by the network microservice, data processing microservice and storage microservice, Store the received instance information in the service list; register the microservice and send the service list to the network microservice and data processing microservice;
  • the network microservice receives the transaction information sent by the user, and forwards the transaction information to the data processing microservice according to the service list ;
  • the data processing microservice receives the transaction information, processes the transaction information, and forwards the transaction information and processing results to the storage microservice for storage according to the service list.
  • the processor may also perform the following steps: the network microservice selects an instance information of the data processing microservice from the service list stored in the local cache; the network microservice forwards the transaction information to the data processing corresponding to the instance information according to the selected instance information Microservices.
  • the processor may also perform the following steps: according to the microservice identifier corresponding to the data processing microservice, the network microservice queries whether there are multiple instance information of the data processing microservice contained in the service list of the local cache; If the instance information of one data processing microservice is included, select the instance information included in the service list; if the locally cached service list includes the instance information of multiple data processing microservices, according to the preset load balancing strategy, select the instance information from multiple data processing microservices. Select an instance information from the instance information of the data processing microservice.
  • the processor may also perform the following steps: the network microservice selects one instance information from the instance information of multiple data processing microservices according to the data sending order corresponding to each data processing microservice specified by the preset load balancing policy; or, the network The microservice obtains the instance information of the data processing microservice with the shortest response time currently recorded in the preset load balancing policy, and the response time is the average of the time required for the data processing microservice to process all tasks within the preset time period.
  • the processor may further perform the following steps: each data processing microservice in the protocol stack sends its own response time to each network microservice every preset time period; each network microservice receives each data processing microservice The sent response time determines the data processing microservice with the shortest response time, and records the instance information of the data processing microservice with the shortest response time in the preset load balancing policy.
  • the processor may further perform the following steps: the network microservice extracts the IP address of the data processing microservice from the instance information; the network microservice forwards the transaction information to the data processing microservice according to the IP address.
  • the processor may also perform the following steps: the data processing microservice, according to the microservice identifier corresponding to the storage microservice, inquires whether there are multiple instance information of the storage microservice contained in the service list of the local cache; For instance information of a storage microservice, the IP address of the storage microservice is extracted from the instance information, and the transaction information and processing results are forwarded to the storage microservice according to the IP address; if the locally cached service list is queried, it includes multiple storage services. For the instance information of the microservice, according to the preset storage balance strategy, select one instance information from the instance information of multiple storage microservices, extract the IP address from the selected instance information, and combine the transaction information and processing results according to the extracted IP address. Forward to the storage microservice.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

La présente demande concerne un procédé et un système de développement d'architecture de pile de protocoles de chaîne de blocs, un dispositif et un support de stockage. Le procédé comprend les étapes suivantes : lorsqu'une pile de protocoles est démarrée, un micro-service de réseau, un micro-service de traitement de données et un micro-service de stockage envoient tous des informations d'instance à un micro-service d'enregistrement ; le micro-service d'enregistrement stocke les informations d'instance reçues dans une liste de services, et envoie la liste de services au micro-service de réseau et au micro-service de traitement de données ; le micro-service de réseau reçoit des informations de transaction envoyées par un utilisateur, et transmet les informations de transaction au micro-service de traitement de données en fonction de la liste de services ; et le micro-service de traitement de données reçoit et traite les informations de transaction, et en fonction de la liste de services, transmet les informations de transaction et un résultat de traitement au micro-service de stockage pour le stockage. Dans la présente demande, les fonctions dans une pile de protocoles d'une chaîne de blocs sont développées en composants de service dans une architecture de micro-service, et les composants de service n'influent pas l'un sur l'autre, de telle sorte qu'un composant de service ayant une pression de traitement élevée peut être mis à niveau et étendu individuellement de manière ciblée, ce qui permet d'ajuster et d'améliorer de manière flexible les performances de la pile de protocoles et d'éviter les goulots d'étranglement de performance de la pile de protocoles.
PCT/CN2021/109468 2021-03-17 2021-07-30 Procédé et système de développement d'architecture de pile de protocoles de chaîne de blocs, dispositif et support de stockage WO2022193530A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110287197.1A CN113014666B (zh) 2021-03-17 2021-03-17 一种区块链协议栈架构方法、系统、设备及存储介质
CN202110287197.1 2021-03-17

Publications (1)

Publication Number Publication Date
WO2022193530A1 true WO2022193530A1 (fr) 2022-09-22

Family

ID=76409330

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/109468 WO2022193530A1 (fr) 2021-03-17 2021-07-30 Procédé et système de développement d'architecture de pile de protocoles de chaîne de blocs, dispositif et support de stockage

Country Status (2)

Country Link
CN (1) CN113014666B (fr)
WO (1) WO2022193530A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115996229A (zh) * 2022-11-30 2023-04-21 中国电子科技集团公司第十研究所 一种云化测控基带池的微服务数据同步方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014666B (zh) * 2021-03-17 2023-02-28 深圳壹账通智能科技有限公司 一种区块链协议栈架构方法、系统、设备及存储介质
CN114615284A (zh) * 2022-03-09 2022-06-10 北京沃东天骏信息技术有限公司 集群内消息通知方法、接收方法及装置

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420697A (zh) * 2011-09-07 2012-04-18 北京邮电大学 一种可配置服务的综合资源监测管理系统及其方法
CN108270813A (zh) * 2016-12-30 2018-07-10 华为技术有限公司 一种异构多协议栈方法、装置及系统
US20180308072A1 (en) * 2017-04-21 2018-10-25 Gem Method and apparatus for blockchain management
CN108989389A (zh) * 2018-06-11 2018-12-11 北京航空航天大学 一种建立智能合约微服务化的方法
CN110266815A (zh) * 2019-07-10 2019-09-20 西安纸贵互联网科技有限公司 基于区块链的微服务网络系统
CN110554927A (zh) * 2019-09-12 2019-12-10 北京笔新互联网科技有限公司 基于区块链的微服务调用方法
CN111026982A (zh) * 2019-10-15 2020-04-17 深圳壹账通智能科技有限公司 智能合约处理方法、计算机设备及存储介质
CN111240732A (zh) * 2020-01-17 2020-06-05 腾讯科技(深圳)有限公司 分布式微服务的发布方法、装置、设备及存储介质
CN112000448A (zh) * 2020-07-17 2020-11-27 北京计算机技术及应用研究所 基于微服务架构的应用管理方法
CN112511608A (zh) * 2020-11-19 2021-03-16 中国平安财产保险股份有限公司 微服务模块注册与测试方法、装置、设备及存储介质
CN113014666A (zh) * 2021-03-17 2021-06-22 深圳壹账通智能科技有限公司 一种区块链协议栈架构方法、系统、设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301414A (zh) * 2014-10-21 2015-01-21 无锡云捷科技有限公司 基于网络协议栈的服务器负载均衡方法
US10860390B2 (en) * 2017-06-28 2020-12-08 Intel Corporation Microservices architecture
CN107979635A (zh) * 2017-10-24 2018-05-01 广东康美通信息服务有限公司 基于微服务的系统、方法及存储介质
CN109547570B (zh) * 2018-12-29 2021-07-06 深圳云天励飞技术有限公司 服务注册方法、装置、注册中心管理设备及存储介质
CN110365533B (zh) * 2019-07-12 2022-04-12 上海和数软件有限公司 数字资产交易方法、系统和计算机可读存储介质

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420697A (zh) * 2011-09-07 2012-04-18 北京邮电大学 一种可配置服务的综合资源监测管理系统及其方法
CN108270813A (zh) * 2016-12-30 2018-07-10 华为技术有限公司 一种异构多协议栈方法、装置及系统
US20180308072A1 (en) * 2017-04-21 2018-10-25 Gem Method and apparatus for blockchain management
CN108989389A (zh) * 2018-06-11 2018-12-11 北京航空航天大学 一种建立智能合约微服务化的方法
CN110266815A (zh) * 2019-07-10 2019-09-20 西安纸贵互联网科技有限公司 基于区块链的微服务网络系统
CN110554927A (zh) * 2019-09-12 2019-12-10 北京笔新互联网科技有限公司 基于区块链的微服务调用方法
CN111026982A (zh) * 2019-10-15 2020-04-17 深圳壹账通智能科技有限公司 智能合约处理方法、计算机设备及存储介质
CN111240732A (zh) * 2020-01-17 2020-06-05 腾讯科技(深圳)有限公司 分布式微服务的发布方法、装置、设备及存储介质
CN112000448A (zh) * 2020-07-17 2020-11-27 北京计算机技术及应用研究所 基于微服务架构的应用管理方法
CN112511608A (zh) * 2020-11-19 2021-03-16 中国平安财产保险股份有限公司 微服务模块注册与测试方法、装置、设备及存储介质
CN113014666A (zh) * 2021-03-17 2021-06-22 深圳壹账通智能科技有限公司 一种区块链协议栈架构方法、系统、设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115996229A (zh) * 2022-11-30 2023-04-21 中国电子科技集团公司第十研究所 一种云化测控基带池的微服务数据同步方法
CN115996229B (zh) * 2022-11-30 2024-04-05 中国电子科技集团公司第十研究所 一种云化测控基带池的微服务数据同步方法

Also Published As

Publication number Publication date
CN113014666A (zh) 2021-06-22
CN113014666B (zh) 2023-02-28

Similar Documents

Publication Publication Date Title
WO2022193530A1 (fr) Procédé et système de développement d'architecture de pile de protocoles de chaîne de blocs, dispositif et support de stockage
JP6004299B2 (ja) フローテーブルをマッチングするための方法及び装置、並びにスイッチ
US20240031309A1 (en) Data Processing Method, Apparatus, Device and Storage Medium
WO2019001092A1 (fr) Moteur d'équilibrage de charge, client, système informatique distribué, et procédé d'équilibrage de charge
WO2020019743A1 (fr) Procédé et dispositif de régulation de trafic
US20210026692A1 (en) Systems and methods providing serverless dns integration
US20170124021A1 (en) Methods for enabling direct memory access (dma) capable devices for remote dma (rdma) usage and devices thereof
CN109413211B (zh) 一种eos区块链超级节点的架构及其实现方法
US20200274832A1 (en) Rdma transport with hardware integration and out of order placement
US10067719B1 (en) Methods and systems for storing and accessing data in a distributed data storage system
CN101827019A (zh) 网络接口设备
US8930518B2 (en) Processing of write requests in application server clusters
US8539089B2 (en) System and method for vertical perimeter protection
CN110727738B (zh) 基于数据分片的全局路由系统、电子设备及存储介质
CN106503058A (zh) 一种数据加载方法、终端和计算集群
CN103248670A (zh) 计算机网络环境下的连接管理
US20240045869A1 (en) A method and device of data transmission
EP1589424A2 (fr) Cadre à périmètre vertical pour fournir des services d'application dans des environements multi-processeurs
US20060206453A1 (en) Dynamically Sizing Buffers to Optimal Size in Network Layers When Supporting Data Transfers Related to Database Applications
CN106131162B (zh) 一种基于iocp机制实现网络服务代理的方法
JP2014528611A (ja) トランザクションミドルウェアマシン環境においてシングルポイントボトルネックを防止するためのシステムおよび方法
CN112600882B (zh) 一种基于共享内存通信模式的硬件加速方法
WO2021000622A1 (fr) Procédé et appareil d'accès à une base de données, dispositif électronique et produit-programme d'ordinateur
JP5945543B2 (ja) ミドルウェアマシン環境を含むシステム
CN109743350B (zh) 一种科学计算应用影像区交换通信模式的卸载实现方法

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: 21931108

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 110124)