Blockchain system and information updating method and device

By introducing component registration centers and dynamic component information update mechanisms, the problem that blockchain node control components cannot perceive changes in business components in a timely manner is solved, and the stability and robustness of the blockchain network are improved.

CN115017167BActive Publication Date: 2025-09-02ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210602304.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-09-02
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

The control components of blockchain nodes cannot perceive changes in business components in a timely manner, resulting in poor robustness of blockchain networks.

Method used

Introduce the component registration center, and the business components are registered to the center after startup, and control the components to maintain dynamic component information locally, and update the component change messages sent by the component registration center to avoid reloading static configuration files and shutting down and restarting.

Benefits of technology

Real-time and online updates of available business components are realized, improving the operational stability and robustness of the blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115017167B_ABST
    Figure CN115017167B_ABST
Patent Text Reader

Abstract

This specification provides a blockchain system and information update method and apparatus. The blockchain system includes a component registration center and blockchain nodes in a blockchain network. The blockchain nodes include a control component and the business components it manages. After startup, the business components register with the component registration center. When a registered business component changes, the component registration center sends a component change message to the control component indicating the change. The control component updates locally maintained dynamic component information based on the component change message. The dynamic component information indicates available business components that can be called by the control component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of blockchain technology, and more particularly to a blockchain system and an information updating method and device. Background Art

[0002] Blockchain is a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. In a blockchain system, data blocks are linked sequentially in chronological order to form a chain-like data structure, and cryptographically guaranteed to be tamper-proof and unforgeable.

[0003] Given that blockchain nodes can perform a variety of different functions while participating in a blockchain network, they can each include functional components (or functional modules) corresponding to each function. In other words, a blockchain node can be composed of multiple different functional components. For example, a blockchain node typically includes a business component for executing specific tasks and a control component for scheduling and controlling the execution of those tasks.

[0004] In related technologies, control components perceive business components through their own static configuration files. For example, after an administrator sets up this static configuration file, the control component can load it at startup to learn which business components it can call. However, due to the inherent characteristics of static configuration files, control components can only be loaded during startup. Therefore, if a business component changes, the control component may not be able to perceive the change in a timely manner, which can adversely affect the normal operation of blockchain nodes and reduce the robustness of the blockchain network. Summary of the Invention

[0005] The purpose of the present invention is to provide a blockchain system and an information updating method and device.

[0006] According to a first aspect of one or more embodiments of this specification, a blockchain system is proposed, wherein the blockchain system includes a component registration center and a blockchain node in a blockchain network, wherein the blockchain node includes a control component and a business component managed by the control component.

[0007] After the business component is started, it is registered with the component registration center;

[0008] When a registered service component is changed, the component registration center sends a component change message indicating the change to the control component;

[0009] The control component is used to update locally maintained dynamic component information according to the component change message, where the dynamic component information is used to indicate available business components that can be called by the control component.

[0010] According to a second aspect of one or more embodiments of this specification, an information update method is proposed, which is applied to a control component, wherein the control component and the business components it manages constitute blockchain nodes in a blockchain network, the method comprising:

[0011] Obtain a component change message from a component registration center, wherein the component change message is used to indicate that a business component registered with the component registration center has changed;

[0012] The locally maintained dynamic component information is updated according to the component change message, where the dynamic component information is used to indicate the available business components that can be called by the control component.

[0013] According to a third aspect of one or more embodiments of this specification, another information update method is proposed, which is applied to a component registration center, where business components registered with the component registration center and control components that manage the business components constitute blockchain nodes in a blockchain network. The method includes:

[0014] In response to a change in a registered business component, generating a component change message indicating the change;

[0015] The component change message is sent to the control component, so that the control component updates locally maintained dynamic component information according to the component change message, where the dynamic component information is used to indicate available business components that can be called by the control component.

[0016] According to a fourth aspect of one or more embodiments of this specification, an information update device is proposed, which is applied to a control component, wherein the control component and the business components it manages constitute blockchain nodes in a blockchain network, and the device includes:

[0017] A message acquisition unit, configured to acquire a component change message from a component registration center, wherein the component change message indicates that a business component registered with the component registration center has changed;

[0018] An information updating unit is configured to update locally maintained dynamic component information according to the component change message, wherein the dynamic component information is used to indicate available business components that can be called by the control component.

[0019] According to a fifth aspect of one or more embodiments of this specification, another information update device is provided, which is applied to a component registration center. Business components registered with the component registration center and control components that manage the business components constitute blockchain nodes in a blockchain network. The device includes:

[0020] A message generating unit, configured to generate a component change message indicating a change in response to a change in a registered service component;

[0021] A message sending unit is used to send the component change message to the control component, so that the control component updates the locally maintained dynamic component information according to the component change message, and the dynamic component information is used to indicate the available business components that can be called by the control component.

[0022] According to a sixth aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0023] processor;

[0024] a memory for storing processor-executable instructions;

[0025] The processor implements the method as described in any one of the second aspect or the third aspect by running the executable instructions.

[0026] According to the seventh aspect of one or more embodiments of this specification, a computer-readable storage medium is proposed, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any one of the second aspect or the third aspect are implemented.

[0027] In the embodiment of this specification, each business component in the blockchain node is registered with the component registration center in the blockchain system after startup is completed; and when the component registration center perceives that a registered business component has changed, it sends a component change message indicating the change to the control component; accordingly, the control component can update the locally maintained dynamic component information indicating the available business components that can be called by the control component based on the message.

[0028] This solution introduces a component registration center. Each business component managed by the control component in a blockchain node is registered with the component registration center after startup. Furthermore, the control component maintains local, real-time dynamic component information. During operation, the control component accesses this information to learn about the available business components it can call. As can be appreciated, upon detecting a change in a registered business component, the component registration center sends a component change message to the control component indicating the change. The control component then updates the dynamic component information based on this message, enabling timely updates of this dynamic component information. Furthermore, the control component does not need to reload static configuration files or shut down or restart. By reading the updated dynamic component information in real time, it can promptly detect changes, thus enabling real-time, online updates of available business components. At any given moment, the available business components obtained by the control component from reading this dynamic component information are truly available. This effectively eliminates the potential adverse impact on the normal operation of the blockchain node caused by the control component's inability to promptly detect changes in business components, thereby improving the operational stability and robustness of the blockchain network. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0030] Figure 1 This is a schematic diagram of the architecture of a blockchain system provided by an exemplary embodiment.

[0031] Figure 2 This is a process of an information updating method provided by an exemplary embodiment.

[0032] Figure 3 This is a process of another information updating method provided by an exemplary embodiment.

[0033] Figure 4 It is a structural diagram of a device provided by an exemplary embodiment.

[0034] Figure 5 It is a block diagram of an information updating device provided by an exemplary embodiment.

[0035] Figure 6 It is a block diagram of another information updating device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0036] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.

[0037] To address the aforementioned issues in related technologies, this specification proposes a blockchain system and information update method and apparatus. This system introduces a component registration center for registering various business components. The control component maintains dynamic component information locally and updates this dynamic component information based on component change messages sent by the component registration center in response to changes to registered business components. This enables real-time, online updates of available business components in each business component managed by the control component. The blockchain system and information update scheme disclosed herein are described in detail below, in conjunction with the accompanying drawings and corresponding embodiments.

[0038] The blockchain system described in this specification includes a component registration center and blockchain nodes in the blockchain network, and the blockchain nodes include control components and the business components they manage. Figure 1 As shown, the blockchain network is composed of multiple blockchain nodes such as nodeA~E. Any blockchain node can include a corresponding control component and the business components it manages. Taking blockchain node nodeA as an example, the node can include a control component (i.e., control component A) and at least one business component. In terms of component functions, the business components that constitute nodeA can include computing components 1~m and storage components 1~n, etc., where n and m are integers greater than or equal to 0, but m and n should not be equal to 0 at the same time. Each of the above business components is connected to the control component A and is managed by the control component A.

[0039] It is understandable that Figure 1 The figure shows the connection status of the control component and each business component in the blockchain node after startup. Among them, each business component in nodeA is registered to the component registration center. Of course, the control component can also be registered to the component registration center. The control component A locally maintains dynamic component information, which is used to indicate the available business components that can be called by the control component A. For example, in Figure 1In the case where the computing components 1~m and storage components 1~n shown can all be called by the control component A, the component information of the computing components 1~m and storage components 1~n can be recorded in the dynamic component information; and in the case where the computing component 2 cannot be used, the component information of the computing component 2 may not be recorded in the dynamic component information, or the component information of the component may be recorded and the component information is set to an unavailable state, etc., to avoid the control component from trying to call the component. Among them, unlike the static configuration file, the control component A can read the dynamic component information maintained by itself in real time during operation without restarting, so as to know the available business components that it can call. In addition, the component information of any business component recorded in the dynamic component information maintained by nodeA may include the component identifier and network address of the business component, etc., which will not be repeated.

[0040] During the operation of a blockchain node, business components registered with the component registry may change. For example, a new computing component m+1 may be registered with the component registry and added to the blockchain node. Computing component 1 may also fail due to a fault. Storage component 2 may be suspended by the blockchain network administrator or the node member corresponding to node A. The information update solution described in this specification is designed to enable the control component to update the locally maintained dynamic component information when business components registered with the component registry change, so that the control component can read this information to obtain the available business components it can call.

[0041] Any blockchain node can be a computing entity composed of corresponding control components and business components at the logical level. As far as physical devices are concerned, the various components that constitute the blockchain node can be deployed in the same or different physical devices, and this specification does not limit this. For example, control component A and the various business components it manages can be deployed in the same node device (i.e., the node device where nodeA is located). At this time, the control component A and the various business components it manages can be corresponding functional modules running in the node device. Alternatively, the above-mentioned control component A and at least one business component can be respectively run in different devices. For example, when the control component A runs in the node device, the various business components it manages can be respectively run in other business devices, so that the control component A can realize remote calls to various business components, which will not be repeated.

[0042] In one embodiment, the aforementioned blockchain network can be deployed based on a server cluster. For example, at least one blockchain node in the blockchain network can be deployed separately within a server cluster, and the control components and business components contained within the blockchain node can be deployed separately within different containers within the server cluster. This approach not only improves the operational stability of each blockchain node within the blockchain network through server clustering, but also enables effective resource and permission isolation between different components of different blockchain nodes and between different components of the same blockchain node through container technology, thereby preventing interference between different blockchain nodes or components, improving component operational efficiency, and further enhancing the operational stability of the blockchain network. The aforementioned containers can be Docker containers, Rocket containers, Warden containers, etc., and will not be further described.

[0043] The server cluster can be a Kubernetes cluster based on the Kubernetes architecture of the container orchestration engine. In this case, the control component and business component can be the master node and worker node, respectively, in the Kubernetes cluster. It is understood that the Kubernetes cluster is a portable, scalable, open-source platform that can be used to manage containerized workloads and services. The master node is responsible for managing and controlling the entire cluster, and control commands for the cluster can be sent to the master node. Worker nodes are responsible for performing specific tasks within the cluster, and the master node can assign (or schedule) tasks to be executed to the worker nodes, that is, call the worker nodes to execute tasks. Based on the excellent characteristics of the Kubernetes cluster, the control component can achieve efficient and reasonable management and control of business components. In addition, the component registry can be an ETCD distributed storage service. For example, if the server cluster is a Kubernetes cluster, the component registry can run in the cluster's master node, such as running in the control component. The specific implementation of the Kubernetes cluster and ETCD distributed storage service can be found in the relevant art and will not be elaborated here.

[0044] In the blockchain system, the business component can be registered with the component registration center after startup, and the component registration center can send a component change message to the control component to indicate the change when the registered business component changes; accordingly, the control component can update the locally maintained dynamic component information according to the component change message.

[0045] As previously mentioned, the business component may include a computing component and a storage component. The computing component can receive blockchain tasks distributed by the control component and obtain blockchain data from the storage component. Furthermore, the computing component can execute the blockchain tasks based on the blockchain data. In this manner, the control component can distribute the blockchain tasks to the computing component, which then collaborates with the storage component to execute the tasks using the on-chain data stored by the storage component, thereby achieving trusted on-chain execution of the blockchain tasks. Accordingly, the computing component can store the execution results of the blockchain tasks in the storage component to achieve on-chain evidence of the execution results. The storage component can be used to record blockchain node ledgers, blockchain transactions, transaction receipts, status data, and the like, though this specification does not limit this.

[0046] It should be noted that in addition to executing blockchain tasks based on blockchain data, the computing component may also compute the blockchain tasks based on data obtained through other means, such as obtaining off-chain data from an off-chain device to execute the blockchain tasks. Furthermore, the execution results may be stored in the storage component. Similarly, in addition to storing the execution results in the storage component, the computing component may also store the execution results obtained by executing the blockchain tasks using any data locally, send them to other blockchain nodes, or store them on off-chain devices, to meet the diverse task execution and result storage requirements in different business scenarios. This specification does not limit this.

[0047] See Figure 2 , Figure 2 FIG. 1 is a flow chart of an information updating method provided by an exemplary embodiment. Figure 2 As shown, the method is applied to a component registration center, and the business components registered with the component registration center and the control components that manage the business components constitute blockchain nodes in the blockchain network. The method includes steps 202-204.

[0048] Step 202: In response to a change in a registered business component, a component change message is generated to indicate the change.

[0049] Step 204: Send the component change message to the control component, so that the control component updates the locally maintained dynamic component information according to the component change message, where the dynamic component information is used to indicate the available business components that can be called by the control component.

[0050] In this embodiment, each business component in the blockchain node is registered with the component registration center in the blockchain system after startup. When the component registration center detects that a registered business component has changed, it sends a component change message indicating the change to the control component. Accordingly, the control component can update the locally maintained dynamic component information indicating the available business components that can be called by the control component based on the message.

[0051] This solution introduces a component registration center. Each business component managed by the control component in a blockchain node is registered with the component registration center after startup. Furthermore, the control component maintains local, real-time dynamic component information. During operation, the control component accesses this information to learn about the available business components it can call. As can be appreciated, upon detecting a change in a registered business component, the component registration center sends a component change message to the control component indicating the change. The control component then updates the dynamic component information based on this message, enabling timely updates of this dynamic component information. Furthermore, the control component does not need to reload static configuration files or shut down or restart. By reading the updated dynamic component information in real time, it can promptly detect changes, thus enabling real-time, online updates of available business components. At any given moment, the control component's access to this dynamic component information ensures that the available business components are truly available. This effectively eliminates the potential negative impact on blockchain node operation caused by the control component's inability to promptly detect changes in business components, thereby improving the operational stability of the blockchain network.

[0052] In one embodiment, for a business component to participate normally in constituting a blockchain node, it may register itself with a component registration center after startup. For example, after a normal startup or after an abnormal shutdown and restart, any business component may initiate a registration request containing the business component's registration information to the component registration center. Accordingly, the component registration center may locally maintain the registration information in response to the registration request, completing the registration of the business component, i.e., registering the business component with the component registration center. Specifically, only the above-mentioned registration information may be recorded, so that the above-mentioned registration information can be directly deleted in the event of a component downtime. Alternatively, the component registration center may record the above-mentioned registration information and set a status flag for it, so that the flag represents the current status of the business component. In the event of a change in its status (such as downtime, suspension, etc.), the component registration center may update the above-mentioned status flag without deleting all registration information, so as to quickly restore the status of the component.

[0053] Among them, considering that the component registration center may also have registered business components of other blockchain nodes (belonging to the said blockchain network or other blockchain networks), in order to facilitate the component registration center to distinguish which blockchain node the business component that initiated the registration request belongs to, the registration information in the above registration request may include the network identifier of the said blockchain network and / or the node identifier of the said blockchain node; or, in the case where any blockchain node only contains one control component, the registration information may include the component identifier of the control component without having to include the node identifier of the said blockchain node. In addition, considering that the component registration center may also have registered other business components, in order to facilitate the component registration center to distinguish the identity of the business component that initiated the registration request, the registration information in the above registration request may also include the component identifier of the said business component. Of course, in order for the component registration center to establish a connection with the business component and effectively control the component after the component is registered, the registration information in the registration request may also include the network address of the IP (Internet Protocol) address, MAC address and / or port number (Port) of the said business component, which is not limited in this specification. Unit

[0054] Taking the computing component as an example of a newly registered business component, the registration request includes registration information in the following format: "key: " / chain_id / domain_id / cu / cu_id" value: {"ip": "127.0.0.1", "port": 18000}". Among them, "chain_id" is the network identifier of the blockchain network; any control component and the business components it manages can be regarded as a domain in the blockchain network. For a third place outside the domain, the domain can be regarded as a blockchain node. The above-mentioned "domain_id" is the node identifier of the blockchain node or the component identifier of the control component; the "cu" is the type identifier of the computing unit, which indicates that the business component initiating the registration request is a computing component. If the business component is a memory unit, the corresponding identifier can be "mu"; "cu_id" is the component identifier of the computing component that initiates the registration request. If the business component is a memory component, the corresponding component identifier can be "mu_id"; the parameters "ip" and "port" in value are the IP address and port number of the computing component respectively.

[0055] In practice, the registration of a new business component with the component registry can be considered a change to that business component. That is, a change to any business component can include the registration of that component with the component registry. Alternatively, the operational state of any business component may change. For example, the component may switch between an available state and an unavailable state (such as a paused state or a stopped state) due to the execution of blockchain transactions or tasks. A switch from any of these states to another state can be considered a change in the operational state of the component, thereby determining that the component has changed. Alternatively, the calling information of any component, such as its call interface or network address, may change. The component registry can determine that a change has occurred when this information changes. Alternatively, if a business component registered with the component registry crashes, the connection between that component and the component registry will be disconnected. Network congestion, connection timeouts, and other conditions may also cause a disconnection between the two. In this regard, the component registry can determine that a change has occurred when it determines that the connection between itself and the business component has been disconnected.

[0056] Accordingly, the component registration center can generate a component change message indicating the change in response to any of the above changes. For example, the component registration center can generate a component addition message for any business component in response to the completion of registration of any business component in the component registration center (i.e., the new business component is registered in the component registration center). The component addition message can include the component identifier of the component, the call information of the registered component, the current status, etc., so that the control component can be informed of the component through this information. Of course, in order to reduce the number of interactions between the component registration center and the control component, the component registration center can generate the component change message when the current status is an available state, so that the control component can directly update the locally maintained dynamic component information based on the message. Obviously, the updated dynamic component information can be used to indicate that the newly added any of the above business components is an available business component of the control component. For another example, the component registration center can generate a component downtime message for any of the business components in response to the disconnection of the connection between any of the business components and the component registration center, wherein the message includes the component identifier of any of the business components.

[0057] The component registration center can detect whether the connection between it and a business component is disconnected through a heartbeat mechanism. For example, after completing registration, any business component can send a heartbeat message to the component registration center at a fixed interval. This heartbeat message can include the component identifier and other necessary information. Under normal circumstances, the component registration center can receive the heartbeat messages sent by any business component at this fixed interval. If the component is down, it will stop sending heartbeat messages. If the connection between the component and the component registration center is disconnected, the heartbeat messages sent by the component registration center will not be received properly, resulting in a heartbeat loss. Therefore, if the component registration center does not receive a heartbeat message from any business component within a preset number of fixed intervals, it can determine that the connection between it and the component is disconnected. The preset number is the number of consecutively lost heartbeat messages and can be set based on network conditions, business scenario characteristics, and other practical possibilities, such as 2, 4, 1, etc. It can also be understood that the smaller the above-mentioned fixed period (i.e., the time interval between adjacent heartbeat messages sent by any business component), the higher the sensitivity of the component registration center in perceiving the disconnection (i.e., the faster it can perceive the disconnection); at the same time, the frequency with which the business component and the component registration center process heartbeat messages is also higher. Therefore, the specific reference of the fixed period can be reasonably set according to the sensitivity requirements, the load conditions of the control component or the component registration center, etc., and this specification does not limit this. Among them, the parameters such as the above-mentioned fixed period and preset number can be specified by the business component in its registration request. For example, the registration information in the aforementioned format can include the fixed period and preset number, so that the component can be kept alive through the heartbeat mechanism as soon as the registration is completed.

[0058] As previously mentioned, in addition to registering the business components managed by the control component, the component registration center may also register other business components managed by other control components. For the control component, only when the business components it manages change does it need to update the locally maintained dynamic component information. Therefore, to improve the accuracy of component change messages, the component registration center can respond to changes in registered business components and, if it determines that the changed business component is managed by the control component, regenerate a component change message for that business component. For example, when the control component is registered with the component registration center, the registration information of the control component may include the node identifier of the blockchain node to which it corresponds (or its own component identifier); accordingly, the registration information of each business component it manages may also include the node identifier of the blockchain node (or the component identifier of the control component). The component registration center can use this identifier to establish a mapping relationship between the control component and the various business components it manages. Based on this, when it is determined that any business component has changed, the component registration center can query the corresponding node identifier (or the component identifier of the control component that manages the business component) from its registration information, and send the generated component change message to the control component corresponding to the node identifier (or the control component represented by the component), thereby achieving targeted sending of component change messages. In this way, it can not only avoid the invalid sending of component change messages, but also help narrow the notification scope of the above changes, prevent irrelevant control components from knowing the relevant information of the business components managed by the control components, and improve the security of the components and their related information.

[0059] See Figure 3 , Figure 3 FIG. 1 is a flow chart of another information updating method provided by an exemplary embodiment. Figure 3 As shown, the method is applied to a control component, and the control component and the business components it manages constitute blockchain nodes in a blockchain network. The method includes steps 302-304.

[0060] Step 302: Obtain a component change message from a component registration center. The component change message is used to indicate that a business component registered with the component registration center has changed.

[0061] As previously mentioned, upon determining that a business component registered with the component registration center has changed, the component registration center may generate a component change message indicating the change and send it to the control component. A change in any business component may include at least one of the following: the business component being registered with the component registration center, the connection between the business component and the component registration center being disconnected, the running state of the business component changing, or the call information of the business component changing.

[0062] In one embodiment, after the control component is started or registered, it can initiate an availability information request to the component registration center and receive initial component information returned by the component registration center. This information indicates the currently available business components that can be called by the control component. The control component can maintain this initial component information locally as the initial version of the dynamic component information, so that it can be updated subsequently in response to component change messages.

[0063] In one embodiment, the control component can obtain the component change message in a variety of ways. For example, the component registration center can generate a component change event in response to a change in a registered business component, wherein the event can include the above-mentioned component change message generated by itself. Accordingly, the control component can monitor the component change event and obtain the component change message based on the monitored event. The control component can send an event monitoring request to the component registration center during the registration phase or after registration is completed, so that the component registration center can create an event generation task locally in response to the request, and by executing the task, generate the component change message in response to a change in a registered business component. In addition, in the case of monitoring the above-mentioned component change event, the control component can obtain the component change message through a pre-created callback function. In this way, the control component and the component registration center can realize the asynchronous transmission of the component change message through the event monitoring mechanism, which helps the two to process the message accordingly according to their respective operating rhythms and avoid interference with other transactions.

[0064] As another example, the control component can proactively query for component change messages. For example, the control component can initiate change query requests to the component registration center according to a preset query cycle and receive component change messages returned by the component registration center when a registered business component changes. Alternatively, the component registration center can proactively send component change messages to the control component. For example, the component registration center can send these messages to the control component if it determines that the changed business component is managed by the control component. By proactively and promptly sending component change messages, the control component can reduce the delay in perceiving the change, thereby improving the real-time performance of the control component in processing blockchain transactions.

[0065] Step 304: Update locally maintained dynamic component information according to the component change message, where the dynamic component information is used to indicate available business components that can be called by the control component.

[0066] In this embodiment, each business component in the blockchain node is registered with the component registration center in the blockchain system after startup. When the component registration center detects that a registered business component has changed, it sends a component change message indicating the change to the control component. Accordingly, the control component can update the locally maintained dynamic component information indicating the available business components that can be called by the control component based on the message.

[0067] This solution introduces a component registration center. Each business component managed by the control component in a blockchain node is registered with the component registration center after startup. Furthermore, the control component maintains local, real-time dynamic component information. During operation, the control component accesses this information to learn about the available business components it can call. As can be appreciated, upon detecting a change in a registered business component, the component registration center sends a component change message to the control component indicating the change. The control component then updates the dynamic component information based on this message, enabling timely updates of this dynamic component information. Furthermore, the control component does not need to reload static configuration files or shut down or restart. By reading the updated dynamic component information in real time, it can promptly detect changes, thus enabling real-time, online updates of available business components. At any given moment, the control component's access to this dynamic component information ensures that the available business components are truly available. This effectively eliminates the potential negative impact on blockchain node operation caused by the control component's inability to promptly detect changes in business components, thereby improving the operational stability of the blockchain network.

[0068] As mentioned above, the component registration center can send a component change message to the control component when it is determined that the business component that has changed is managed by the control component. In fact, the component registration center can also send the generated component change message to multiple control components, and the control component can update the locally maintained dynamic component information according to the component change message when it is determined that the business component that has changed indicated by the component change message is managed by the control component. It can be understood that for the control component, the business component that has changed indicated by the component change message is managed by the control component, which means that the business component that has changed is managed by the control component itself, so the control component should respond to the component change message to update the dynamic component information it maintains. Of course, in the case that the business component that has changed indicated by the component change message is not managed by the control component (such as managed by other control components), the control component can directly discard the message to avoid updating the locally maintained dynamic component information.

[0069] Among them, in the locally maintained dynamic component information, the component information of any business component may include the component identifier and call address of the component. In the case where the component change message is the aforementioned component addition message, the control component may record the above-mentioned component information of the newly added component recorded in the message locally. Alternatively, in the case where the component change message is the aforementioned component downtime message, the control component may search for the component information of the downtime component in the locally maintained dynamic component information based on the component identifier recorded in the message, and then delete the component information or set the status identifier of the component information to an unavailable state, etc., which will not be repeated here.

[0070] At this point, the control component completes the update of dynamic component information. It will be appreciated that, at any point after the update, the dynamic component information can be used to determine the available business components that can be invoked at that moment. Based on this information, the control component can invoke these available business components to process blockchain tasks. For example, the control component can obtain blockchain tasks generated by executing blockchain transactions and process these tasks based on the updated dynamic component information. This process is described below with reference to several embodiments.

[0071] In one embodiment, the control component can obtain the blockchain task in various ways. For example, the control component can first obtain a blockchain transaction and generate a blockchain task by executing the transaction. If the blockchain node where the control component is located is a non-consensus node, the control component can synchronize blockchain transactions that have already passed consensus from other blockchain nodes and execute the transaction. Alternatively, if the blockchain node where the control component is located is a consensus node, the control component can synchronize blockchain transactions that have not yet passed consensus from other blockchain nodes, participate in the consensus process for the transaction, and then execute the transaction if it is determined to have passed consensus. Alternatively, the control component can receive blockchain transactions initiated by the node member corresponding to the blockchain node it is located in through the control component. For another example, the blockchain task can also be generated by executing a blockchain transaction on another blockchain node in the blockchain network. In this case, the control component can directly obtain the blockchain task from the other blockchain node.

[0072] It is understandable that the control component obtains the above-mentioned blockchain task after the local startup is completed. The startup of the control component can be a normal startup, or it can be a restart after an abnormal shutdown (or downtime). The following takes the restart after an abnormal shutdown as an example for explanation. Among them, since the control component is essentially a functional module running in a physical device (such as any server in the aforementioned server cluster), the shutdown of the control component can be the cessation of operation of the functional module itself, or it can be the cessation of operation of the entire physical device. The embodiments of this specification are not limited to this.

[0073] During the operational phase prior to a crash, the control component may be processing certain blockchain tasks. Given that processing takes time, to effectively manage unfinished blockchain tasks, the control component can cache these tasks, such as in the control component's local storage or other storage space accessible to the control component. If the control component has not yet completed processing these blockchain tasks (e.g., processing has not yet begun or is in progress), the control component may crash for some reason. Subsequently, the control component can restart and, upon restart, retrieve the blockchain tasks generated and cached before the crash.

[0074] In practice, between the time the control component crashes and the moment it restarts, other blockchain nodes may generate new blockchain tasks. Therefore, after the restart, the control component can retrieve these new blockchain tasks from other blockchain nodes. To distinguish these two types of blockchain tasks, blockchain tasks generated before the control component crash are referred to as historical blockchain tasks, while those generated after the control component crash are referred to as current blockchain tasks. Subsequently, the control component can process both the current blockchain tasks acquired after the current restart and the historical blockchain tasks cached within its own cache.

[0075] It is understandable that if the historical blockchain tasks and the current blockchain tasks are processed sequentially in the order of their generation time, the current blockchain task may need to wait for a long time to be processed, thereby causing task execution time delays and even causing the current blockchain task to pile up in large quantities due to the inability to be processed in time. To address this issue, the control component can process the historical blockchain tasks and the current blockchain task in parallel.

[0076] In one embodiment, the control component can alternately select historical blockchain tasks and current blockchain tasks from the historical task set consisting of the historical blockchain tasks and the current task set consisting of the current blockchain tasks, and execute the selected blockchain tasks sequentially in the order in which the blockchain tasks were selected, thereby effectively achieving parallel processing of the historical blockchain tasks and the current blockchain tasks. For the historical task set, the control component can randomly select each historical blockchain task in sequence to simplify the selection process; alternatively, it can select each historical blockchain task in the order in which the tasks were generated, thereby ensuring that the execution order of each historical blockchain task remains consistent with the order in which each historical blockchain task is generated. Similarly, for the current task set, the off-chain computing node can randomly select each current blockchain task in sequence; alternatively, it can select each current blockchain task in the order in which the tasks were generated, which will not be further described. Exemplarily, the control component can alternately obtain historical blockchain tasks and current blockchain tasks one by one, and execute each obtained blockchain task accordingly. It is understandable that the historical blockchain tasks and the current blockchain tasks differ only in the timing and acquisition method of their generation. For any two obtained historical blockchain tasks and the current blockchain task, the processing process of the control component does not differ substantially.

[0077] In one embodiment, the control component can determine the target available business component corresponding to the blockchain task based on the updated dynamic component information and dispatch the blockchain task to the target available business component for execution. The blockchain task can be any blockchain task acquired by the control component; in other words, the blockchain task can be either a historical blockchain task or a current blockchain task. It is understood that the updated dynamic component information may indicate multiple available business components, all of which can be called by the control component. Using the above method, the target available business component corresponding to the blockchain task to be executed can be determined and called to execute the task.

[0078] The business component indicated by the dynamic component information may include a computing component. In this case, the dynamic component information may include the computing type of the computing component. In practice, any computing component may have a corresponding computing type, which can be considered the type of task that the computing component can perform. When any control component manages multiple computing components, the computing types of these computing components may be the same or different. To further ensure that the target computing component successfully executes the blockchain task and improve the execution efficiency of the task, the control component may determine the target available computing component based on the computing type. For example, the control component may determine the target computing type corresponding to the blockchain task and select the target available computing component from the available computing components with the computing type of the target computing type. In this way, the computing type of the target available computing component executing the blockchain task can be ensured to match the target computing type of the task, helping to avoid execution errors and improving execution efficiency to a certain extent.

[0079] To facilitate recording the computation types of each available computation component, the control component may maintain a computation type list. This list is used to record the computation types of each available computation component managed by the control component. The control component can then determine the target available computation component based on the computation type list. For example, the control component may first determine the target computation type of the blockchain task, then query the computation type list for the target computation type, and determine the available computation component corresponding to the target computation type as the target available computation component. The computation type and target computation type may include a forwarding type, an MFT (Managed File Transfer) type, a privacy-preserving computation type, a data query type, and the like, though this specification does not limit this.

[0080] The computing component whose computing type is the target computing type is the available computing component. It is understandable that there may be at least one of the above available computing components. Obviously, if there is only one available computing component, then that available computing component can be used as the target available computing component without selection. In the case where there are multiple available computing components, the control component can select the target available business component from these available computing components in one of the following ways. For example, the control component can randomly select any available computing component from the available computing components whose computing type is the target computing type as the target available computing component. The random selection method makes the selection rule simple and fast, which helps to reduce the processing time of blockchain tasks.

[0081] For another example, the control component can also count the currently available resources of each available computing component and select the available computing component with the most currently available resources as the target available computing component. It is understood that the more currently available resources a given available computing component has, the less likely it is that the blockchain task will be slowed down or even fail due to resource constraints if assigned to it. Therefore, the probability of the task being successfully completed is generally higher. Therefore, selecting that available computing component as the target available computing component is more conducive to the smooth processing of the blockchain task, helping to improve the processing efficiency and success rate of the task.

[0082] For another example, if the execution of the blockchain transaction also generates a forward blockchain task that needs to be executed before the blockchain task, the control component can also use the available computing component used to process the forward blockchain task as the target available computing component. Typically, multiple blockchain tasks generated by executing the same blockchain transaction have the same computing type. As previously mentioned, the computing type of the target available computing component is the target computing type. This shows that the computing type of the available computing component used to execute the forward blockchain task matches not only the forward blockchain task but also the blockchain task. Therefore, invoking the target computing component to process the blockchain task not only ensures smooth task processing through the computing type, but also allows the same computing component to sequentially process the forward blockchain task and the blockchain task, eliminating the need to invoke a new computing component. This can significantly speed up the processing of the blockchain task. Furthermore, the computing component's cached data can be used to process the blockchain task, further improving task processing efficiency.

[0083] The process for processing blockchain tasks described in each of the above embodiments may include executing the blockchain task and storing the execution results. If the business component also includes a storage component, the target available computing component may obtain blockchain data from the storage component and execute the blockchain task based on this data. Clearly, since the blockchain data is stored by the storage component, it can be considered on-chain data that is stored as evidence on the blockchain node. Using this on-chain data to execute the blockchain task achieves on-chain trusted execution of the blockchain task. Furthermore, the target available computing component may also store the execution results of the blockchain task in the storage component to achieve on-chain evidence of the execution results.

[0084] In addition to executing blockchain tasks based on blockchain data, the target available computing component may also obtain off-chain data from off-chain devices and execute the blockchain tasks based on this data. Furthermore, the execution results may be stored in the storage component. Similarly, in addition to storing the execution results in the storage component, the target available computing component may also store the execution results obtained by executing the blockchain tasks using any data locally, send them to other blockchain nodes, or store them on off-chain devices, to meet the diverse task execution and result storage requirements in different business scenarios. This specification does not limit this.

[0085] Figure 4 This is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 4 At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410. Of course, it may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0086] like Figure 5 As shown, Figure 5 This is a block diagram of an information updating device provided by this specification according to an exemplary embodiment. The device can be applied to Figure 4 The device shown in the figure is used to implement the technical solution of this specification. The device is applied to the control component, and the control component and the business components it manages constitute the blockchain node in the blockchain network. The device includes:

[0087] A message acquisition unit 501 is configured to acquire a component change message from a component registration center, wherein the component change message indicates that a business component registered with the component registration center has changed.

[0088] The information updating unit 502 is configured to update locally maintained dynamic component information according to the component change message, where the dynamic component information is used to indicate available business components that can be called by the control component.

[0089] Optionally, the message acquiring unit 501 is further configured to:

[0090] Monitoring component change events generated by the component registration center in response to changes in registered business components, and obtaining component change messages based on the monitored component change events;

[0091] Receiving a component change message sent by a component registration center in response to a change in a registered business component;

[0092] Initiate a change query request to the component registration center according to a preset query cycle, and receive the component change message returned by the component registration center when a registered business component is changed.

[0093] Optional,

[0094] The component change message is sent by the component registration center to the control component when it is determined that the changed business component is managed by the control component; or,

[0095] The information updating unit 502 is further configured to update locally maintained dynamic component information according to the component change message when it is determined that the changed service component indicated by the component change message is managed by the control component.

[0096] Optionally, also include:

[0097] The task acquisition unit 503 is used to acquire the blockchain task generated by executing the blockchain transaction and process the blockchain task according to the updated dynamic component information.

[0098] Optionally, the task acquisition unit 503 is further configured to:

[0099] Obtain and execute blockchain transactions to generate blockchain tasks; or,

[0100] Obtaining blockchain tasks generated by executing blockchain transactions from other blockchain nodes in the blockchain network.

[0101] Optionally, the task acquisition unit 503 is further configured to:

[0102] After the current startup is completed, the current blockchain task and the historical blockchain tasks cached by the current blockchain task are obtained, where the historical blockchain tasks and the current blockchain tasks are generated before and after the control component is shut down, respectively;

[0103] The historical blockchain task and the current blockchain task are processed in parallel according to the updated dynamic component information.

[0104] Optionally, this startup of the control component is a normal startup or a restart after an abnormal shutdown.

[0105] Optionally, the task acquisition unit 503 is further configured to:

[0106] The target available business component corresponding to the blockchain task is determined according to the updated dynamic component information, and the blockchain task is sent to the target available business component for execution.

[0107] Optionally, the business component includes a computing component, the dynamic component information includes a computing type of the computing component, and the task acquisition unit 503 is further configured to:

[0108] Determine a target computing type corresponding to the blockchain task, and select a target available computing component from available computing components whose computing type is the target computing type.

[0109] Optionally, the task acquisition unit 503 is further configured to:

[0110] Randomly select any available computing component from available computing components whose computing type is the target computing type as a target available computing component;

[0111] The available computing component with the most currently available resources among the available computing components whose computing type is the target computing type is used as the target available computing component;

[0112] In a case where executing the blockchain transaction further generates a forward blockchain task that needs to be executed before the blockchain task, an available computing component used to process the forward blockchain task is used as a target available computing component.

[0113] Optionally, the business component further includes a storage component. During the process of the target available computing component processing the blockchain task,

[0114] The blockchain task is executed by the target available computing component based on the blockchain data obtained from the storage component; and / or,

[0115] The execution result of the blockchain task is stored in the storage component.

[0116] Optionally, any business component changes, including at least one of the following:

[0117] Any of the business components is registered with the component registration center, the connection between any of the business components and the component registration center is disconnected, the running state of any of the business components changes, or the calling information of any of the business components changes.

[0118] like Figure 6 As shown, Figure 6 This is a block diagram of another information updating device provided by this specification according to an exemplary embodiment. The device can be applied to Figure 4The device shown in the figure is used to implement the technical solution of this specification. The device is applied to the component registration center, and the business components registered with the component registration center and the control components that manage the business components constitute the blockchain nodes in the blockchain network. The device includes:

[0119] The message generating unit 601 is configured to generate a component change message indicating a change in a registered service component in response to the change;

[0120] The message sending unit 602 is used to send the component change message to the control component, so that the control component updates the locally maintained dynamic component information according to the component change message, and the dynamic component information is used to indicate the available business components that can be called by the control component.

[0121] Optionally, the message generating unit 601 is further configured to:

[0122] In response to a change in a registered service component, if it is determined that the changed service component is managed by the control component, a component change message for the service component is generated.

[0123] Optionally, the message generating unit 601 is further configured to:

[0124] In response to any business component completing registration at the component registration center, generating a component new addition message for the any business component; or,

[0125] In response to a disconnection between any business component and the component registration center, a component downtime message for the any business component is generated.

[0126] Optional,

[0127] It also includes a heartbeat receiving unit 603, which is used to receive a heartbeat message sent by any business component to the component registration center according to a fixed period after completing registration;

[0128] The message generating unit 601 is further configured to determine that the connection between any business component and the component registration center is disconnected if the heartbeat message sent by any business component is not received within a preset number of fixed periods.

[0129] Optionally, also include:

[0130] The request receiving unit 604 is configured to receive a registration request initiated by the service component after the current startup is completed, wherein the registration request includes registration information of the service component;

[0131] The component registration unit 605 is used to maintain the registration information locally to complete the registration of the business component.

[0132] Optionally, the registration information includes at least one of the following:

[0133] The network identifier of the blockchain network, the node identifier of the blockchain node, the component identifier of the business component, and the network address of the business component.

[0134] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0135] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0136] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a server system. Of course, the present invention does not exclude that with the future development of computer technology, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, an in-vehicle human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0137] Although one or more embodiments of this specification provide method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not clearly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any particular order.

[0138] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more of the present specifications, the functions of each module can be implemented in the same or multiple software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0139] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0140] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0142] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0143] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0144] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules 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 technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0145] Those skilled in the art will appreciate that one or more embodiments of this specification may be provided as a method, system, or computer program product. Thus, one or more embodiments of this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0146] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In distributed computing environments, program modules may be located in local and remote computer storage media, including storage devices.

[0147] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between the various embodiments can be referenced across them. Each embodiment focuses on the differences from the other embodiments. In particular, since the system embodiments are generally similar to the method embodiments, their description is relatively simple. For relevant parts, reference can be made to the description of the method embodiments. Throughout this specification, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and integrate the different embodiments or examples, and features of different embodiments or examples, described in this specification, without conflict.

[0148] The foregoing is merely an example of one or more embodiments of this specification and is not intended to limit the one or more embodiments of this specification. It will be apparent to those skilled in the art that various modifications and variations may be made to one or more embodiments of this specification. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this specification shall be included within the scope of the claims.

Claims

1. A blockchain system, comprising a component registration center and a blockchain node in a blockchain network, wherein the blockchain node comprises a control component and the business components it manages, wherein: After the business component is started, it is registered with the component registration center; When a registered service component is changed, the component registration center sends a component change message indicating the change to the control component; The control component is used to update the locally maintained dynamic component information according to the component change message, and the dynamic component information is used to indicate the available business components that can be called by the control component; wherein, the updated dynamic component information is used to process historical blockchain tasks and current blockchain tasks in parallel, the historical blockchain tasks are generated before the control component is shut down, and the current blockchain tasks are generated after the control component is shut down.

2. The system according to claim 1, wherein the business component comprises a computing component and a storage component, wherein: The computing component receives the blockchain task distributed by the control component and executes the blockchain task based on the blockchain data obtained from the storage component; and / or, The computing component stores the execution result of the blockchain task in the storage component.

3. In the system according to claim 1, at least one blockchain node is deployed in a server cluster, and the control component and the business component contained in the blockchain node are respectively deployed in different containers in the server cluster.

4. According to the system of claim 3, when the server cluster is a Kubernetes cluster based on the container orchestration engine Kubernetes architecture, the control component and the business component are respectively the management node and the working node in the Kubernetes cluster.

5. In the system according to claim 1, the component registration center is an ETCD distributed storage service.

6. An information update method, applied to a control component, wherein the control component and the business components it manages constitute blockchain nodes in a blockchain network, the method comprising: Obtain a component change message from a component registration center, wherein the component change message is used to indicate that a business component registered with the component registration center has changed; updating locally maintained dynamic component information according to the component change message, wherein the dynamic component information is used to indicate available business components that can be called by the control component; Among them, the updated dynamic component information is used to process historical blockchain tasks and current blockchain tasks in parallel, the historical blockchain tasks are generated before the control component is shut down, and the current blockchain tasks are generated after the control component is shut down.

7. The method according to claim 6, wherein obtaining a component change message from a component registration center comprises one of the following: Monitoring component change events generated by the component registration center in response to changes in registered business components, and obtaining component change messages based on the monitored component change events; or, Receiving a component change message sent by a component registration center in response to a change in a registered business component; or, Initiate a change query request to the component registration center according to a preset query cycle, and receive the component change message returned by the component registration center when a registered business component is changed.

8. The method according to claim 6, The component change message is sent by the component registration center to the control component when it is determined that the changed service component is managed by the control component; or, The updating of the locally maintained dynamic component information according to the component change message includes: When it is determined that the changed service component indicated by the component change message is managed by the control component, locally maintained dynamic component information is updated according to the component change message.

9. The method according to claim 6, further comprising: Obtain a blockchain task generated by executing a blockchain transaction, and process the blockchain task according to the updated dynamic component information.

10. The method according to claim 9, wherein obtaining a blockchain task generated by executing a blockchain transaction comprises: Obtain and execute blockchain transactions to generate blockchain tasks; or, Obtaining blockchain tasks generated by executing blockchain transactions from other blockchain nodes in the blockchain network.

11. The method according to claim 9, wherein obtaining a blockchain task generated by executing a blockchain transaction and processing the blockchain task according to the updated dynamic component information comprises: After the current startup is completed, the current blockchain task and the historical blockchain tasks cached by the current blockchain task are obtained, where the historical blockchain tasks and the current blockchain tasks are generated before and after the control component is shut down, respectively; The historical blockchain task and the current blockchain task are processed in parallel according to the updated dynamic component information.

12. The method according to claim 11, wherein the current startup of the control component is a normal startup or a restart after an abnormal shutdown.

13. The method according to claim 9, wherein processing the blockchain task according to the updated dynamic component information comprises: The target available business component corresponding to the blockchain task is determined according to the updated dynamic component information, and the blockchain task is sent to the target available business component for execution.

14. The method according to claim 13, wherein the business component includes a computing component, the dynamic component information includes a computing type of the computing component, and determining the target available business component corresponding to the blockchain task based on the updated dynamic component information comprises: Determine a target computing type corresponding to the blockchain task, and select a target available computing component from available computing components whose computing type is the target computing type.

15. The method according to claim 14, wherein the step of selecting a target available business component from computing components whose computing type is the target computing type comprises one of the following: Randomly select any available computing component from available computing components whose computing type is the target computing type as a target available computing component; The available computing component with the most currently available resources among the available computing components whose computing type is the target computing type is used as the target available computing component; In a case where executing the blockchain transaction further generates a forward blockchain task that needs to be executed before the blockchain task, an available computing component used to process the forward blockchain task is used as a target available computing component.

16. The method according to claim 14, wherein the business component further comprises a storage component, and during the process of the target available computing component processing the blockchain task, The blockchain task is executed by the target available computing component based on the blockchain data obtained from the storage component; and / or, The execution result of the blockchain task is stored in the storage component.

17. The method according to claim 6, wherein any business component changes, including at least one of the following: Any of the business components is registered with the component registration center, the connection between any of the business components and the component registration center is disconnected, the running state of any of the business components changes, or the calling information of any of the business components changes.

18. An information update method, applied to a component registration center, wherein business components registered with the component registration center and control components that manage the business components constitute blockchain nodes in a blockchain network, the method comprising: In response to a change in a registered business component, generating a component change message indicating the change; Sending the component change message to the control component, so that the control component updates locally maintained dynamic component information according to the component change message, where the dynamic component information is used to indicate available business components that can be called by the control component; Among them, the updated dynamic component information is used to process historical blockchain tasks and current blockchain tasks in parallel, the historical blockchain tasks are generated before the control component is shut down, and the current blockchain tasks are generated after the control component is shut down.

19. The method according to claim 18, wherein, in response to a change in a registered service component, generating a component change message indicating the change comprises: In response to a change in a registered service component, if it is determined that the changed service component is managed by the control component, a component change message for the service component is generated.

20. The method according to claim 18, wherein, in response to a change in a registered service component, generating a component change message indicating the change comprises: In response to any business component completing registration in the component registration center, generating a component new addition message for the any business component; or, In response to a disconnection between any business component and the component registration center, a component downtime message for the any business component is generated.

21. The method according to claim 20, Also includes: Receiving a heartbeat message sent by any business component to the component registration center according to a fixed period after completing registration; Determining that the connection between any business component and the component registration center is disconnected includes: if the heartbeat message sent by any business component is not received within a preset number of fixed periods, determining that the connection between any business component and the component registration center is disconnected.

22. The method of claim 18, further comprising: Receive a registration request initiated by the business component after the current startup is completed, the registration request including registration information of the business component; The registration information is maintained locally to complete the registration of the service component.

23. The method according to claim 22, wherein the registration information includes at least one of the following: The network identifier of the blockchain network, the node identifier of the blockchain node, the component identifier of the business component, and the network address of the business component.

24. An information update device, applied to a control component, wherein the control component and the business components it manages constitute blockchain nodes in a blockchain network, the device comprising: A message acquisition unit, configured to acquire a component change message from a component registration center, wherein the component change message indicates that a business component registered with the component registration center has changed; An information updating unit, configured to update locally maintained dynamic component information according to the component change message, wherein the dynamic component information is used to indicate available service components that can be called by the control component; Among them, the updated dynamic component information is used to process historical blockchain tasks and current blockchain tasks in parallel, the historical blockchain tasks are generated before the control component is shut down, and the current blockchain tasks are generated after the control component is shut down.

25. An information update device, applied to a component registration center, wherein business components registered with the component registration center and control components that manage the business components constitute blockchain nodes in a blockchain network, the device comprising: A message generating unit, configured to generate a component change message indicating a change in response to a change in a registered service component; a message sending unit, configured to send the component change message to the control component, so that the control component updates locally maintained dynamic component information according to the component change message, wherein the dynamic component information is used to indicate available business components that can be called by the control component; Among them, the updated dynamic component information is used to process historical blockchain tasks and current blockchain tasks in parallel, the historical blockchain tasks are generated before the control component is shut down, and the current blockchain tasks are generated after the control component is shut down.

26. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 6 to 23 by running the executable instructions.

27. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 6 to 23.

Citation Information

Patent Citations

  • Container cloud management system based on blockchain technology

    CN113169952A

  • Data processing method, calculation and storage separation system and block chain network architecture

    CN114510540A