Method, device and electronic device for dynamic node exit in alliance chain
Through the mechanism of master node monitoring and other node verification, redundant nodes in the alliance chain are dynamically eliminated, which solves the problem of node congestion, improves processing efficiency and security, and ensures the stability of the alliance chain.
Patent Information
- Application Number
- CN202211234559.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-10-10
AI Technical Summary
How to implement dynamic node removal in the alliance chain to avoid congestion problems caused by redundant nodes.
The master node monitors dynamic exit messages, generates an exit message summary and broadcasts it, and other nodes verify and add a timestamp to generate an authentication result message to determine whether the node is allowed to exit. The time lock and the trustworthiness binary tree are combined to perform a safe and orderly elimination process.
It realizes the dynamic elimination of nodes in the alliance chain, improves processing efficiency, saves storage resources, ensures the security and orderliness of elimination, and avoids data interaction paralysis.
Smart Images

Figure CN115622712B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of alliance chains, and in particular to a method, device, and electronic device for dynamically exiting nodes in an alliance chain. Background Art
[0002] Blockchain, due to its unique traceability and immutability, has gained widespread adoption and is a popular platform for data storage and sharing. Consortium chains, in particular, offer fast processing speeds and low transaction costs due to their relatively small number of nodes. However, precisely because these chains have fewer nodes, they are prone to congestion. Therefore, implementing dynamic node removal within consortium chains has become a pressing technical challenge, ensuring that redundant blockchain nodes are eliminated. Summary of the Invention
[0003] Based on the above problems, the embodiments of the present application provide a method, device and electronic device for dynamic exit of nodes in a consortium chain.
[0004] The embodiments of this application disclose the following technical solutions:
[0005] According to a first aspect of an embodiment of the present application, a method for dynamically exiting a node in a consortium chain is provided, comprising:
[0006] The master node in the alliance chain dynamically monitors the alliance chain based on the set monitoring machine to see if there is a node dynamic exit message generated by the blockchain node that wants to exit;
[0007] In response to monitoring the presence of a node dynamic exit message initiated by a blockchain node in the alliance chain, generating an exit message digest of the node dynamic exit message and broadcasting it;
[0008] All other blockchain nodes in the consortium chain receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that wants to exit the consortium chain, and add the timestamp of receiving the node dynamic exit message to the exit message digest;
[0009] Each other blockchain node in the consortium chain verifies the received exit message digest annotated with the receiving timestamp to generate the corresponding node dynamic exit message authentication result message;
[0010] Based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, determine whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain.
[0011] Optionally, each other blockchain node in the alliance chain verifies the received exit message digest annotated with a reception timestamp to generate a corresponding node dynamic exit message authentication result message, including: obtaining the main information of the exit message digest received by each other blockchain node in the alliance chain; for each other blockchain node in the alliance chain, using the main information of the received exit message digest as the key of a key-value pair, and using the reception timestamp as the value of the key-value pair to generate multiple key-value pairs; based on the multiple key-value pairs, verifying the received exit message digest annotated with a reception timestamp to generate a corresponding node dynamic exit message authentication result message.
[0012] Optionally, based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, determine whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain, including: generating a node dynamic exit message authentication graph based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain; based on the node dynamic exit message authentication graph, determine whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain.
[0013] Optionally, based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, determine whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain, including: creating a time lock, based on the time lock, determining the response to the node dynamic exit message, and allowing the blockchain node to be removed from the alliance chain within the time lock; if the blockchain node that wants to exit the alliance chain is not successfully removed from the alliance chain within the time lock, then returning the result of the removal failure to the master node and the blockchain node that wants to exit the alliance chain.
[0014] Optionally, a method for dynamic exit of a node in a consortium chain also includes: in response to allowing the blockchain node to be removed from the consortium chain, and the blockchain node is successfully removed from the consortium chain, the blockchain node generates a data synchronization message, and the master node initiates a network update request to update the view of the consortium chain.
[0015] Optionally, a method for dynamically exiting a node in a consortium chain further includes: viewing the new consortium chain view. Figure 1 Consistency verification is performed to determine whether the blockchain node with master node identity needs to be replaced.
[0016] Optionally, view the new alliance chain view Figure 1 The consistency verification is to determine whether the blockchain node with the master node identity needs to be replaced, including: performing trusted calculation on all blockchain nodes in the alliance chain to obtain the trust value; visually verifying the new alliance chain view based on the trust value; Figure 1Consistency verification is performed to determine whether the blockchain node with master node identity needs to be replaced.
[0017] Optionally, the new alliance chain view is viewed based on the trust value. Figure 1 Consistency verification is performed to determine whether the blockchain node with the master node identity needs to be replaced, including: generating a trust binary tree based on all trust values, where the distance between adjacent tree nodes along the trunk direction from the root to the top of the tree in the trust binary tree represents the approximation of the trust values from small to large; comparing the trust binary tree with the trust value of the master node to determine whether the blockchain node with the master node identity needs to be replaced; if the trust value of the master node is greater than the height of the trust binary tree, do not replace the blockchain node with the master node identity; otherwise, the blockchain node with the master node identity needs to be replaced.
[0018] According to a second aspect of an embodiment of the present application, a device for dynamically exiting a node in a consortium chain is provided, comprising:
[0019] The first program unit is used for the master node in the alliance chain to dynamically monitor the alliance chain according to the set monitoring machine to see whether there is a node dynamic exit message generated by the blockchain node that wants to exit;
[0020] The second program unit is configured to generate and broadcast a node dynamic exit message digest of the node dynamic exit message in response to monitoring a node dynamic exit message initiated by a blockchain node in the alliance chain;
[0021] The third program unit is configured for all other blockchain nodes in the consortium chain to receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that is to exit the consortium chain, and to append the timestamp of the received node dynamic exit message to the exit message digest;
[0022] The fourth program unit is used for each other blockchain node in the alliance chain to verify the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message;
[0023] The fifth program unit is used to determine whether to respond to the node dynamic exit message based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, so as to determine whether the blockchain node is allowed to be removed from the alliance chain.
[0024] Optionally, the fourth program unit is further used to: obtain the main body information of the exit message digest received by each other blockchain node in the alliance chain; for each other blockchain node in the alliance chain, use the main body information of the exit message digest received as the key of the key-value pair, and use the receiving timestamp as the value of the key-value pair to generate multiple key-value pairs; based on the multiple key-value pairs, verify the received exit message digest annotated with the receiving timestamp to generate a corresponding node dynamic exit message authentication result message.
[0025] Optionally, the fifth program unit is further used to: generate a node dynamic exit message authentication map based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain; and determine whether to respond to the node dynamic exit message based on the node dynamic exit message authentication map to determine whether the blockchain node is allowed to be removed from the alliance chain.
[0026] Optionally, the fifth program unit is further used to: create a time lock, and based on the time lock, determine the dynamic exit message of the response node, and allow the blockchain node to be removed from the alliance chain within the time lock; if the blockchain node that wants to exit the alliance chain is not successfully removed from the alliance chain within the time lock, then return the result of the removal failure to the master node and the blockchain node that wants to exit the alliance chain.
[0027] Optionally, the device also includes: a removal generation unit, which is used to respond to allowing the blockchain node to be removed from the alliance chain, and the blockchain node is successfully removed from the alliance chain, the blockchain node generates a data synchronization message, and the master node initiates a network update request to update the view of the alliance chain.
[0028] Optionally, the device further includes: a verification judgment unit for visually verifying the new alliance chain view. Figure 1 Consistency verification is performed to determine whether the blockchain node with master node identity needs to be replaced.
[0029] Optionally, the verification judgment unit is further used to: perform trusted calculation on all blockchain nodes in the alliance chain to obtain a trust value; and perform visual verification on the new alliance chain view based on the trust value. Figure 1 Consistency verification is performed to determine whether the blockchain node with master node identity needs to be replaced.
[0030] Optionally, the verification and judgment unit is further used to: generate a trustworthiness binary tree based on all trustworthiness values, where the distance between adjacent tree nodes along the trunk direction from the root to the top of the tree in the trustworthiness binary tree represents the approximation of the trustworthiness values from small to large; compare the trustworthiness binary tree with the trustworthiness value of the master node to determine whether it is necessary to replace the blockchain node with the master node identity; if the trustworthiness value of the master node is greater than the height of the trustworthiness binary tree, do not replace the blockchain node with the master node identity; otherwise, the blockchain node with the master node identity needs to be replaced.
[0031] According to a third aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor. The memory stores an executable program, and the processor performs the following steps when running the executable program:
[0032] The master node in the alliance chain dynamically monitors the alliance chain based on the set monitoring machine to see if there is a node dynamic exit message generated by the blockchain node that wants to exit;
[0033] In response to monitoring the presence of a node dynamic exit message initiated by a blockchain node in the alliance chain, generating an exit message digest of the node dynamic exit message and broadcasting it;
[0034] All other blockchain nodes in the consortium chain receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that wants to exit the consortium chain, and add the timestamp of receiving the node dynamic exit message to the exit message digest;
[0035] Each other blockchain node in the consortium chain verifies the received exit message digest annotated with the receiving timestamp to generate the corresponding node dynamic exit message authentication result message;
[0036] Based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, determine whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain.
[0037] In the technical solution of the embodiment of the present application, the master node in the alliance chain dynamically monitors the alliance chain according to the set monitoring machine to see whether there is a node dynamic exit message generated by the blockchain node that is about to exit the alliance chain; in response to monitoring the node dynamic exit message initiated by the blockchain node that is about to exit the alliance chain, an exit message summary of the node dynamic exit message is generated and broadcast; all other blockchain nodes in the alliance chain receive the exit message summary corresponding to the node dynamic exit message initiated by the blockchain node that is about to exit the alliance chain, and add the timestamp of the received node dynamic exit message to the exit message summary; each other blockchain node in the alliance chain verifies the received exit message summary annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message; based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, it is determined whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain, thereby realizing the dynamic removal of nodes from the alliance chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 This is a flowchart of a method for dynamically exiting a node in a consortium chain according to an embodiment of the present application;
[0040] Figure 2 This is a structural diagram of a device for dynamically exiting a node in a consortium chain according to an embodiment of the present application;
[0041] Figure 3 This is another structural diagram of a device for dynamically exiting a node in a consortium chain according to an embodiment of the present application;
[0042] Figure 4 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0043] Figure 5 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0044] The implementation of any technical solution in the embodiments of the present application does not necessarily require achieving all of the above advantages at the same time.
[0045] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0046] In the technical solution of the embodiment of the present application, the master node in the alliance chain dynamically monitors the alliance chain according to the set monitoring machine whether there is a node dynamic exit message generated by the blockchain node that wants to exit the alliance chain; in response to monitoring the node dynamic exit message initiated by the blockchain node that wants to exit the alliance chain, an exit message digest of the node dynamic exit message is generated and broadcast; all other blockchain nodes in the alliance chain receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that wants to exit the alliance chain, and add the timestamp of receiving the node dynamic exit message to the exit message digest; each other blockchain node in the alliance chain verifies the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message; based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, it is judged whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain, thereby realizing the dynamic removal of nodes from the alliance chain.
[0047] Figure 1 This is a flowchart of a method for dynamically exiting a node in a consortium chain according to an embodiment of the present application; Figure 1 As shown, it includes:
[0048] S101: The master node in the consortium chain dynamically monitors the consortium chain according to a set monitoring machine to see whether there is a node dynamic exit message generated by a blockchain node that wants to exit;
[0049] S102: In response to monitoring a node dynamic exit message initiated by a blockchain node in the consortium chain, generating and broadcasting a node dynamic exit message digest;
[0050] S103. All other blockchain nodes in the consortium chain receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that is to exit the consortium chain, and append the timestamp of receiving the node dynamic exit message to the exit message digest;
[0051] S104. Each other blockchain node in the consortium chain verifies the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message;
[0052] S105. Determine whether to respond to the node dynamic exit message based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, so as to determine whether to allow the blockchain node to be removed from the alliance chain.
[0053] Optionally, each other blockchain node in the alliance chain verifies the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message, including: obtaining the main information of the exit message digest received by each other blockchain node in the alliance chain; for each other blockchain node in the alliance chain, using the main information of the exit message digest received as the key of a key-value pair, and using the reception timestamp as the value of the key-value pair to generate multiple key-value pairs; based on the multiple key-value pairs, verifying the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message.
[0054] In this embodiment, the subject information and receipt timestamp of the exit message digest are efficiently stored based on key-value pairs, saving storage resources. Furthermore, the received exit message digest, annotated with the receipt timestamp, is verified based on the multiple key-value pairs, ensuring the generation of a valid node dynamic exit message authentication result message.
[0055] Optionally, judging whether to respond to the node dynamic exit message based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain to determine whether the blockchain node is allowed to be removed from the alliance chain includes: generating a node dynamic exit message authentication graph based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain; judging whether to respond to the node dynamic exit message based on the node dynamic exit message authentication graph to determine whether the blockchain node is allowed to be removed from the alliance chain.
[0056] In this embodiment, the node dynamic exit message authentication map can quickly determine whether to respond to the node dynamic exit message, thereby improving the efficiency of algorithm execution and saving storage resources.
[0057] Optionally, the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain is used to determine whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain, including: creating a time lock, and based on the time lock, determining whether to respond to the node dynamic exit message, allowing the blockchain node to be removed from the alliance chain within the time lock; if the blockchain node that wants to exit the alliance chain is not successfully removed from the alliance chain within the time lock, then returning the result of the removal failure to the master node and the blockchain node that wants to exit the alliance chain.
[0058] In this embodiment, the removal of the blockchain node from the consortium chain is controlled based on the time lock, which ensures the security of the removal on the one hand, and the orderliness of the removal on the other hand, avoiding communication conflicts.
[0059] Optionally, the method for dynamic exit of a node in a consortium chain further includes: in response to allowing the blockchain node to be removed from the consortium chain and the blockchain node being successfully removed from the consortium chain, the blockchain node generates a data synchronization message, and the master node initiates a network update request to update the view of the consortium chain.
[0060] In this embodiment, based on the data synchronization message, the master node can initiate a network update request in real time and quickly to update the view of the alliance chain, thereby ensuring the update efficiency of the alliance chain view and avoiding paralysis of data interaction of the alliance chain due to untimely updates.
[0061] Optionally, the method for dynamically exiting a node in a consortium chain further includes: viewing the new consortium chain view. Figure 1 Consistency verification is performed to determine whether the blockchain node with the master node identity needs to be replaced.
[0062] Optionally, the new alliance chain view is viewed Figure 1 The consistency verification is performed to determine whether the blockchain node with the master node identity needs to be replaced, including: performing a trusted calculation on all blockchain nodes in the alliance chain to obtain a trust value; visually analyzing the new alliance chain view based on the trust value; Figure 1 Consistency verification is performed to determine whether the blockchain node with the master node identity needs to be replaced.
[0063] In this embodiment, the new alliance chain view is viewed by the trust value. Figure 1 The consistency verification ensures that it is possible to effectively determine whether the blockchain node with the master node identity needs to be replaced, thereby avoiding the occurrence of misjudgment.
[0064] Optionally, the new alliance chain view is viewed based on the trust value. Figure 1 The consistency verification is performed to determine whether the blockchain node with the master node identity needs to be replaced, including: generating a trustworthiness binary tree according to all the trustworthiness values, wherein the distance between adjacent tree nodes along the trunk direction from the root to the top of the tree in the trustworthiness binary tree represents the approximation of the trustworthiness values from small to large; comparing the trustworthiness binary tree with the trustworthiness value of the master node to determine whether the blockchain node with the master node identity needs to be replaced; if the trustworthiness value of the master node is greater than the height of the trustworthiness binary tree, then the blockchain node with the master node identity does not need to be replaced; otherwise, the blockchain node with the master node identity needs to be replaced.
[0065] In this embodiment, the trustworthiness binary tree and the trustworthiness value of the master node are compared, which reduces the difficulty of algorithm design. At the same time, it can quickly determine whether the blockchain node with the master node identity needs to be replaced.
[0066] Figure 2 This is a structural diagram of a node dynamic exit device in a consortium chain according to an embodiment of the present application; Figure 2 As shown, it includes:
[0067] The first program unit 201 is used for the master node in the alliance chain to dynamically monitor the alliance chain according to a set monitoring machine to see whether there is a node dynamic exit message generated by a blockchain node that wants to exit;
[0068] The second program unit 202 is configured to generate and broadcast a node dynamic exit message in response to monitoring a node dynamic exit message initiated by a blockchain node in the alliance chain;
[0069] The third program unit 203 is configured for all other blockchain nodes in the consortium chain to receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that is to exit the consortium chain, and to append the timestamp of receiving the node dynamic exit message to the exit message digest;
[0070] The fourth program unit 204 is configured to enable each other blockchain node in the consortium chain to verify the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message;
[0071] The fifth program unit 205 is used to determine whether to respond to the node dynamic exit message based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, so as to determine whether to allow the blockchain node to be removed from the alliance chain.
[0072] Optionally, the fourth program unit 204 is further used to: obtain the main body information of the exit message digest received by each other blockchain node in the alliance chain; for each other blockchain node in the alliance chain, use the main body information of the exit message digest received as the key of a key-value pair, and use the reception timestamp as the value of the key-value pair to generate multiple key-value pairs; based on the multiple key-value pairs, verify the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message.
[0073] Optionally, the fifth program unit 205 is further used to: generate a node dynamic exit message authentication graph based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain; and determine whether to respond to the node dynamic exit message based on the node dynamic exit message authentication graph to determine whether to allow the blockchain node to be removed from the alliance chain.
[0074] Optionally, the fifth program unit 205 is further used to: create a time lock, and based on the time lock, when determining to respond to the node dynamic exit message, allow the blockchain node to be removed from the alliance chain within the time lock; if the blockchain node that wants to exit the alliance chain within the time lock is not successfully removed from the alliance chain, then return the result of the removal failure to the master node and the blockchain node that wants to exit the alliance chain.
[0075] Figure 3 This is a structural diagram of a node dynamic exit device in a consortium chain according to an embodiment of the present application; Figure 3 As shown in the above Figure 2 Based on the embodiment, the characteristics of the node dynamic exit device in the alliance chain of this embodiment are:
[0076] Optionally, the device also includes: a removal generation unit 206, which is used to respond to allowing the blockchain node to be removed from the alliance chain, and the blockchain node is successfully removed from the alliance chain, the blockchain node generates a data synchronization message, and the master node initiates a network update request to update the view of the alliance chain.
[0077] Optionally, the device further includes: a verification judgment unit 207, configured to verify the new alliance chain view. Figure 1 Consistency verification is performed to determine whether the blockchain node with the master node identity needs to be replaced.
[0078] Optionally, the verification judgment unit 207 is further used to: perform trust calculation on all blockchain nodes in the alliance chain to obtain a trust value; and perform visual verification on the new alliance chain view based on the trust value. Figure 1 Consistency verification is performed to determine whether the blockchain node with the master node identity needs to be replaced.
[0079] Optionally, the verification and judgment unit 207 is further used to: generate a trustworthiness binary tree based on all the trustworthiness values, wherein the distance between adjacent tree nodes along the trunk direction from the root to the top of the tree in the trustworthiness binary tree represents the approximation of the trustworthiness values from small to large; compare the trustworthiness binary tree with the trustworthiness value of the master node to determine whether it is necessary to replace the blockchain node with the master node identity; if the trustworthiness value of the master node is greater than the height of the trustworthiness binary tree, do not replace the blockchain node with the master node identity; otherwise, the blockchain node with the master node identity needs to be replaced.
[0080] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application; Figure 4 As shown, it includes a memory 301 and a processor 302. The memory stores an executable program. When the processor runs the executable program, the following steps are performed:
[0081] The master node in the alliance chain dynamically monitors the alliance chain according to a set monitoring machine to see whether there is a node dynamic exit message generated by a blockchain node that wants to exit;
[0082] In response to monitoring a node dynamic exit message initiated by a blockchain node in the alliance chain, generating an exit message digest of the node dynamic exit message and broadcasting it;
[0083] All other blockchain nodes in the consortium chain receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that is to exit the consortium chain, and append the timestamp of receiving the node dynamic exit message to the exit message digest;
[0084] Each other blockchain node in the alliance chain verifies the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message;
[0085] According to the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, determine whether to respond to the node dynamic exit message to determine whether to allow the blockchain node to be removed from the alliance chain.
[0086] Figure 5 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application; Figure 5 As shown, the hardware structure of the electronic device may include: the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 406 into a random access memory (RAM) 403. Various programs and data required for the operation of the device 400 can also be stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0087] Multiple components within electronic device 400 are connected to I / O interface 405, including an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. Input unit 406 can be any type of device capable of inputting information into electronic device 400. Input unit 406 can receive input numeric or character information and generate key input signals related to user settings and / or function control of the electronic device. Output unit 407 can be any type of device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 404 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 409 allows electronic device 400 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0088] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the above steps may be implemented as a computer software program that is tangibly included in a machine-readable medium, such as a storage unit 40*. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the above steps in any other appropriate manner (e.g., by means of firmware).
[0089] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
[0090] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communications. These terminals include smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones.
[0091] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.
[0092] (3) Portable entertainment devices: These devices can display and play multimedia content. These devices include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.
[0093] (4) Server: A device that provides computing services. The server consists of a processor 410, a hard disk, memory, a system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0094] (5) Other electronic devices with data interaction functions.
[0095] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components indicated as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0096] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for dynamic node exit in a consortium chain, characterized in that: include: The master node in the alliance chain dynamically monitors the alliance chain according to a set monitoring machine to see whether there is a node dynamic exit message generated by a blockchain node that wants to exit; In response to monitoring the presence of a node dynamic exit message initiated by a blockchain node in the alliance chain, generating an exit message digest of the node dynamic exit message and broadcasting it; All other blockchain nodes in the consortium chain receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that is to exit the consortium chain, and append the timestamp of receiving the node dynamic exit message to the exit message digest; Each other blockchain node in the alliance chain verifies the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message; Determining whether to respond to the node dynamic exit message based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, so as to determine whether to allow the blockchain node to be removed from the alliance chain; Each other blockchain node in the alliance chain verifies the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message, including: obtaining the main information of the exit message digest received by each other blockchain node in the alliance chain; for each other blockchain node in the alliance chain, using the main information of the exit message digest received by it as the key of a key-value pair, and using the reception timestamp as the value of the key-value pair to generate multiple key-value pairs; based on the multiple key-value pairs, verifying the received exit message digest annotated with the reception timestamp to generate a corresponding node dynamic exit message authentication result message.
2. The node dynamic exit method in the alliance chain according to claim 1 is characterized in that: The determining whether to respond to the node dynamic exit message based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain to determine whether the blockchain node is allowed to be removed from the alliance chain includes: generating a node dynamic exit message authentication graph based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain; determining whether to respond to the node dynamic exit message based on the node dynamic exit message authentication graph to determine whether the blockchain node is allowed to be removed from the alliance chain.
3. The node dynamic exit method in the alliance chain according to claim 1 is characterized in that: The node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain is used to determine whether to respond to the node dynamic exit message to determine whether the blockchain node is allowed to be removed from the alliance chain, including: creating a time lock, and based on the time lock, determining to respond to the node dynamic exit message, allowing the blockchain node to be removed from the alliance chain within the time lock; if the blockchain node that wants to exit the alliance chain is not successfully removed from the alliance chain within the time lock, then returning a removal failure result to the master node and the blockchain node that wants to exit the alliance chain.
4. The method for dynamic node exit in a consortium chain according to claim 1, characterized in that: The method for dynamic exit of a node in a consortium chain also includes: in response to allowing the blockchain node to be removed from the consortium chain and the blockchain node is successfully removed from the consortium chain, the master node initiates a network update request to update the view of the consortium chain.
5. The node dynamic exit method in the alliance chain according to claim 4 is characterized in that: The method for dynamic exit of a node in a consortium chain also includes: performing view consistency verification on the new consortium chain view to determine whether it is necessary to replace the blockchain node with the master node identity.
6. The method for dynamic node exit in the alliance chain according to claim 5, characterized in that: The performing view consistency verification on the new consortium chain view to determine whether the blockchain node with the master node identity needs to be replaced includes: performing trusted calculation on all blockchain nodes in the consortium chain to obtain a trustworthiness value; and performing view consistency verification on the new consortium chain view based on the trustworthiness value to determine whether the blockchain node with the master node identity needs to be replaced.
7. The method for dynamic node exit in a consortium chain according to claim 6, characterized in that: The method further comprises: performing view consistency verification on the new alliance chain view based on the trust value to determine whether the blockchain node with the master node identity needs to be replaced, including: generating a trust binary tree based on all the trust values, wherein the distance between adjacent tree nodes along the trunk direction from the root to the top of the tree in the trust binary tree represents the approximation of the trust values from small to large; comparing the trust binary tree with the trust value of the master node to determine whether the blockchain node with the master node identity needs to be replaced; if the trust value of the master node is greater than the height of the trust binary tree, then the blockchain node with the master node identity does not need to be replaced; otherwise, the blockchain node with the master node identity needs to be replaced.
8. A node dynamic exit device in a consortium chain, characterized in that: include: The first program unit is used for the master node in the alliance chain to dynamically monitor the alliance chain according to a set monitoring machine to see whether there is a node dynamic exit message generated by a blockchain node that wants to exit; A second program unit is configured to generate and broadcast an exit message digest of a node dynamic exit message in response to monitoring a node dynamic exit message initiated by a blockchain node in the alliance chain; A third program unit is configured for all other blockchain nodes in the consortium chain to receive the exit message digest corresponding to the node dynamic exit message initiated by the blockchain node that is to exit the consortium chain, and to append a timestamp of receiving the node dynamic exit message to the exit message digest; a fourth program unit, configured to cause each other blockchain node in the consortium chain to verify the received exit message digest annotated with the reception timestamp, so as to generate a corresponding node dynamic exit message authentication result message; A fifth program unit is configured to determine whether to respond to the node dynamic exit message based on the node dynamic exit message authentication result message generated by all other blockchain nodes in the alliance chain, so as to determine whether to allow the blockchain node to be removed from the alliance chain; The fourth program unit is further configured to: obtain subject information of the exit message digest received by each other blockchain node in the consortium chain; and for each other blockchain node in the consortium chain, use the subject information of the exit message digest received by the node as a key of a key-value pair and use the reception timestamp as a value of the key-value pair to generate multiple key-value pairs; The received exit message digest annotated with the reception timestamp is verified according to the multiple key-value pairs to generate a corresponding node dynamic exit message authentication result message.
Citation Information
Patent Citations
Information management method and system based on block chain technology
CN110381069A
Method and device for joining alliance chain and quitting alliance chain
CN110545286A