A Data Interaction Verification Method and System Based on Hash Algorithm and Gossip Protocol
By developing a data interaction verification method and system based on hash algorithm and gossip protocol, the customized data interaction requirements of KaiWuDB database were solved, achieving data interaction security, scalability and consistency, and improving the database's operating efficiency and stability.
Patent Information
- Application Number
- CN202410721153.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-06-05
AI Technical Summary
Existing technologies cannot meet the special customized data interaction needs of the KaiWuDB database, especially in terms of geographically dispersed multi-centers, customized projects, customized message types and methods, and data reporting methods. They cannot guarantee the security, scalability, fault tolerance, consistency convergence, and interaction efficiency of data interaction.
A data interaction verification method and system based on hash algorithm and gossip protocol is adopted. Through configuration information loading, node joining small cluster, master-slave node heartbeat monitoring, interactive data verification, and cluster size adjustment, data interaction and verification between nodes are realized, ensuring data security, scalability and consistency.
The security, scalability, and consistency convergence of the data interaction and verification function modules of the KaiWuDB database have been improved, the algorithm operation time has been reduced, it is suitable for domestic environments, and the efficiency and stability of the database operation have been improved.
Smart Images

Figure CN118709158B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of database technology, specifically to a data interaction verification method and system based on hash algorithms and the gossip protocol. Background Technology
[0002] KaiwuDB clusters generate their own interaction data. KaiwuDB interaction data is divided into control data and basic data streams. The basic data streams include: collection point data streams, performance metrics data (data size, insertion speed per unit time, query speed per unit time, P95, P99, etc.), operational metrics data (including cluster size, cluster resource usage, resource runtime, etc.), and health metrics data (including whether nodes are offline, whether nodes are stuck, whether node ports are blocked, etc.). Key steps include... Figure 1 As shown: (1) Nodes of the KaiWuDB cluster join the KaiWuDB cluster, (2) Collect and report the interaction data of the nodes, (3) Nodes of the KaiWuDB cluster verify the interaction data in the cluster, (4) Write the interaction data in the KaiWuDB cluster to disk.
[0003] Due to the diverse deployment scenarios and customized needs of KaiWuDB data, existing conventional data interaction solutions cannot fully guarantee the security, scalability, fault tolerance, and consistency convergence of KaiWuDB monitoring data, nor can they meet the requirements for interaction efficiency. Furthermore, due to the limitations of conventional data interaction functions, they are not suitable for the customized needs of KaiWuDB data interaction and verification. These include customized requirements such as multi-site locations, customized projects, customized message types and methods, and customized data reporting methods.
[0004] The data interaction and verification module addresses the needs of data interaction and verification within the KaiWuDB database cluster, a critical issue for ensuring the normal operation of the database. While traditional data interaction management methods collect and report interaction data to meet cluster requirements, they cannot satisfy the specific customized interaction and verification needs of the KaiWuDB database. These needs include multi-site locations, customized projects, customized message types and methods, and customized data reporting methods. Furthermore, traditional data interaction methods must meet specific performance metrics for the interaction data. They fail to meet the security, fault tolerance, scalability, consistency convergence, and interaction efficiency requirements of the KaiWuDB database's data interaction and verification module, significantly limiting the actual operational efficiency and stability of the KaiWuDB database.
[0005] How to meet the specific customized data interaction requirements of the KaiWuDB database is a technical problem that needs to be solved. Summary of the Invention
[0006] The technical objective of this invention is to address the above-mentioned shortcomings by providing a data interaction verification method and system based on hash algorithms and gossip protocols, thereby solving the technical problem of how to meet the special customized data interaction requirements of the KaiWuDB database.
[0007] In a first aspect, the present invention provides a data interaction verification method based on a hash algorithm and a gossip protocol, applied to a KaiWuDB cluster, used to realize data interaction and verification between nodes within the cluster through a data interaction and verification module. The method includes the following steps:
[0008] Start KaiWuDB and the data interaction and verification module, and load the configuration information of the data interaction and verification module into memory. The configuration information includes the hash algorithm type, cluster configuration information and customized data interaction rules. The customized data interaction rules define the format of the data exchanged between nodes, the storage rules of the data exchanged, and the display rules. The cluster configuration information defines the hierarchical scale of the data interaction cluster.
[0009] For new nodes, the nodes are added to the data interaction cluster and then to a small cluster. The data interaction cluster includes multiple levels of small clusters. Each small cluster includes an elected master node and multiple slave nodes. Within the small cluster, the master node periodically sends heartbeat information to the slave nodes to monitor whether the slave nodes have gone offline.
[0010] For each small cluster, the slave node sends its interaction data and hash checksum to other nodes in the same small cluster based on the gossip protocol, and periodically sends its interaction data and hash checksum to the corresponding master node; after the master node verifies the received interaction data based on the hash checksum, it pushes the verified interaction data to the next level small cluster, and the master node of the highest level small cluster synchronizes and summarizes all interaction data, and then writes the summarized interaction data to disk;
[0011] For each small cluster, it is periodically determined whether the size of the small cluster meets the hierarchical size defined in the cluster configuration information. If it does not meet the requirements, the size of the data interaction cluster is adjusted according to the joining time of the nodes in the small cluster. The nodes that joined the small cluster later are added to other small clusters or a new small cluster is created.
[0012] The UI is customized based on the configuration information, and interactive data is displayed through the customized UI.
[0013] As a preferred option, start KaiWuDB and the data interaction and verification module, including the following steps:
[0014] Start KaiWuDB;
[0015] Start the data interaction and verification module, and check if the configuration information of the data interaction and verification module exists. If it does not exist, prompt that the data interaction and verification module failed to start and indicate that the configuration information is missing, and record the prompt information in the system table. If it exists, load the configuration information into memory.
[0016] Preferably, for a new node, adding the node to the data interaction cluster and then to a smaller cluster includes the following steps:
[0017] For the smallest cluster at the most basic level, based on the cluster configuration information, a small cluster that has not reached the predetermined size is selected as the target cluster, and the node is recommended to join the target cluster, or the node actively joins an already created smallest cluster at the lowest level.
[0018] If the small cluster a node is trying to join is offline, the node will fail to join, and a failure message will be added and recorded in the system table.
[0019] If a node does not receive a heartbeat message from its master node within a predetermined time after joining the small cluster, it will indicate that the node in the cluster is likely offline and record it in the system table.
[0020] As a preferred method, for each small cluster, nodes within the small cluster broadcast their identity information and hash verification code to other nodes for authentication based on the gossip protocol.
[0021] For a newly added node to the small cluster, the node broadcasts its identity information and hash verification code to the master node for authentication based on the gossip protocol. After successful authentication, the master node pushes the cluster information of the small cluster and the identity information of other nodes in the small cluster to the newly added node.
[0022] Secondly, the present invention provides a data interaction verification system based on hash algorithm and gossip protocol, applied to KaiWuDB cluster, for use in conjunction with data interaction and verification module, to realize data interaction and verification between nodes within the cluster through a data interaction verification method based on hash algorithm and gossip protocol as described in any of the first aspects, the system including configuration module, cluster update module, interaction verification module, small cluster detection module and data display module;
[0023] The configuration module is used to perform the following: start KaiWuDB and the data interaction and verification module, load the configuration information of the data interaction and verification module into memory, the configuration information includes hash algorithm type, cluster configuration information and customized data interaction rules, the customized data interaction rules define the format of data interaction between nodes, the storage rules of the data interaction and the display rules, and the cluster configuration information defines the hierarchical scale of the data interaction cluster.
[0024] The cluster update module is used to perform the following: For a new node, the node is added to the data interaction cluster and then to a small cluster. The data interaction cluster includes multiple levels of small clusters. Each small cluster includes an elected master node and multiple slave nodes. The master node in the small cluster periodically sends heartbeat information to the slave nodes to monitor whether the slave nodes have gone offline.
[0025] The interaction verification module works in conjunction with the data exchange and verification module to perform the following: For each small cluster, the slave node sends its interaction data and hash verification code to other nodes within the same small cluster based on the gossip protocol, and periodically sends its interaction data and hash verification code to the corresponding master node; the master node verifies the received interaction data based on the hash verification code, and pushes the verified interaction data to the next higher level small cluster; the master node of the highest level small cluster synchronizes and summarizes all interaction data, and then writes the summarized interaction data to disk;
[0026] The small cluster detection module is used to perform the following: For each small cluster, it periodically determines whether the size of the small cluster meets the hierarchical size defined in the cluster configuration information. If it does not meet the requirements, it adjusts the size of the data interaction cluster according to the joining time of the nodes in the small cluster, and adds the nodes that joined the small cluster later to other small clusters or creates a new small cluster.
[0027] The data display module is used to perform the following: customize the UI interface based on the configuration information, and display interactive data through the customized UI interface.
[0028] Preferably, the startup configuration module is used to perform the following:
[0029] Start KaiWuDB;
[0030] Start the data interaction and verification module, and check if the configuration information of the data interaction and verification module exists. If it does not exist, prompt that the data interaction and verification module failed to start and indicate that the configuration information is missing, and record the prompt information in the system table. If it exists, load the configuration information into memory.
[0031] Preferably, for a new node, the cluster update module performs the following actions to add the node to the data interaction cluster and to a smaller cluster:
[0032] For a new node, adding the node to the data interaction cluster and then to a smaller cluster includes the following steps:
[0033] For the smallest cluster at the most basic level, based on the cluster configuration information, a small cluster that has not reached the predetermined size is selected as the target cluster, and the node is recommended to join the target cluster, or the node actively joins an already created smallest cluster at the lowest level.
[0034] If the small cluster a node is trying to join is offline, the node will fail to join, and a failure message will be added and recorded in the system table.
[0035] If a node does not receive a heartbeat message from its master node within a predetermined time after joining the small cluster, it will indicate that the node in the cluster is likely offline and record it in the system table.
[0036] As a preferred method, for each small cluster, nodes within the small cluster broadcast their identity information and hash verification code to other nodes for authentication based on the gossip protocol.
[0037] For newly added nodes in the small cluster, the interaction verification module works in conjunction with the data exchange and verification module to perform the following: the node broadcasts its identity information and hash verification code to the master node for identity verification based on the gossip protocol. After successful verification, the master node pushes the cluster information of the small cluster and the identity information of other nodes in the small cluster to the node.
[0038] The data interaction verification method and system based on hash algorithm and gossip protocol of the present invention have the following advantages: it meets the functional module requirements of data interaction and verification of KaiWuDB database, ensures the security, scalability, fault tolerance and consistency convergence of data in the monitoring data interaction process, and can perform specific hash algorithm optimization for certain domestic environments (arm architecture, loong64 architecture, mips architecture), reducing the algorithm operation time by 50%. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] The invention will be further described below with reference to the accompanying drawings.
[0041] Figure 1 A functional architecture diagram for data interaction and verification in KaiWuDB;
[0042] Figure 2 Example 1: Flowchart of a data interaction verification method based on hash algorithm and gossip protocol. Detailed Implementation
[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0044] This invention provides a data interaction verification method and system based on hash algorithm and gossip protocol to solve the technical problem of how to meet the special customized data interaction requirements of KaiWuDB database.
[0045] Example 1:
[0046] This invention discloses a data interaction verification method based on a hash algorithm and gossip protocol, applied to the KaiWuDB cluster. It enables data interaction and verification between nodes within the cluster through a data interaction and verification module. The method includes the following steps:
[0047] Step S100: Start KaiWuDB and the data interaction and verification module, and load the configuration information of the data interaction and verification module into memory. The configuration information includes hash algorithm type, cluster configuration information and customized data interaction rules. The customized data interaction rules define the format of data interaction between nodes, the storage rules of the data interaction, and the display rules. The cluster configuration information defines the hierarchical scale of the data interaction cluster.
[0048] Step S200: For a new node, add the node to the data interaction cluster and to a small cluster. The data interaction cluster includes multiple levels of small clusters. Each small cluster includes an elected master node and multiple slave nodes. The master node in the small cluster periodically sends heartbeat information to the slave nodes to monitor whether the slave nodes are offline.
[0049] Step S300: For each small cluster, the slave node sends its interaction data and hash verification code to other nodes in the same small cluster based on the gossip protocol, and periodically sends its interaction data and hash verification code to the corresponding master node; after the master node verifies the received interaction data based on the hash verification code, it pushes the verified interaction data to the next higher level small cluster, and the master node of the highest level small cluster synchronously summarizes all interaction data and writes the summarized interaction data to disk;
[0050] Step S400: For each small cluster, periodically determine whether the size of the small cluster meets the hierarchical size defined in the cluster configuration information. If not, adjust the size of the data interaction cluster according to the joining time of the nodes in the small cluster, and add the nodes that joined the small cluster later to other small clusters or create a new small cluster.
[0051] Step S500: Customize the UI interface based on the configuration information, and display the interactive data through the customized UI interface.
[0052] In this embodiment, step S100, which involves starting KaiWuDB and the data interaction and verification module, includes the following steps:
[0053] (1) Start KaiWuDB;
[0054] (2) Start the data interaction and verification module, and determine whether the configuration information of the data interaction and verification module exists. If it does not exist, prompt that the data interaction and verification module failed to start and that the configuration information is missing, and record the prompt information in the system table. If it exists, load the configuration information into memory.
[0055] In this embodiment, step S200 involves adding a new node to the data interaction cluster and then to a smaller cluster, which includes the following steps:
[0056] (1) For the smallest cluster at the lowest level, based on the cluster configuration information, select a small cluster that has not reached the predetermined size as the target cluster, and recommend that the node join the target cluster, or the node actively joins a small cluster that has already been created at the lowest level.
[0057] (2) If the small cluster to which the node is joining is offline, the node will fail to join. A failure message will be added and recorded in the system table.
[0058] (3) If a node does not receive a heartbeat message from its master node within a predetermined time after joining the small cluster, it will indicate that the node in the cluster is suspected of being offline and record it in the system table.
[0059] In step S200, if a node fails to join the cluster, there are two scenarios: Scenario 1: The system prompts that the node failed to join the data interaction cluster, and the node to be joined is suspected of being offline, and records this in the system table; Scenario 2: If no monitoring data is received from the other party for a long time, the system prompts that the node in the small cluster is suspected of being offline, and records this in the system table.
[0060] In this embodiment, for each small cluster, nodes broadcast their identity information and hash verification code to other nodes for authentication based on the gossip protocol. After successful authentication, nodes periodically or proactively push their interaction data and hash verification code to other nodes within the small cluster.
[0061] Within a small cluster, the transmission of interactive data must verify the hash code to ensure message integrity, consistency, and security.
[0062] For a newly added node to the small cluster, the node broadcasts its identity information and hash verification code to the master node for authentication based on the gossip protocol. After successful authentication, the master node pushes the cluster information of the small cluster and the identity information of other nodes in the small cluster to the newly added node.
[0063] Within a small cluster, the master node periodically sends heartbeat messages to the slave nodes to monitor whether the slave nodes have gone offline, thereby ensuring the timeliness and integrity of the information.
[0064] During the data interaction process, the master node in the highest-level small cluster synchronizes and verifies the interactive data, and then writes the relevant data to physical storage media such as disks.
[0065] In step S400 of this embodiment, it is periodically determined whether the number of nodes in the data interaction cluster is less than or equal to three. Based on the order of joining time, the size of the data interaction cluster is adjusted so that the nodes that join later can join other data interaction clusters or create a new data interaction cluster, and the user is prompted.
[0066] Example 2:
[0067] This invention discloses a data interaction verification system based on a hash algorithm and a gossip protocol, applied to a KaiWuDB cluster. It includes a configuration module, a cluster update module, an interaction verification module, a small cluster detection module, and a data display module, which are used to cooperate with the data interaction and verification module to realize data interaction and verification between nodes within the cluster through the method disclosed in Example 1.
[0068] The configuration module is used to perform the following: start KaiWuDB and the data interaction and verification module, load the configuration information of the data interaction and verification module into memory, the configuration information includes hash algorithm type, cluster configuration information and customized data interaction rules, the customized data interaction rules define the format of data interaction between nodes, the storage rules of the data interaction and the display rules, and the cluster configuration information defines the hierarchical scale of the data interaction cluster.
[0069] The startup configuration module is used to execute the following:
[0070] (1) Start KaiWuDB;
[0071] (2) Start the data interaction and verification module, and determine whether the configuration information of the data interaction and verification module exists. If it does not exist, prompt that the data interaction and verification module failed to start and that the configuration information is missing, and record the prompt information in the system table. If it exists, load the configuration information into memory.
[0072] The cluster update module is used to perform the following: For a new node, the node is added to the data interaction cluster and then to a small cluster. The data interaction cluster includes multiple levels of small clusters. Each small cluster includes an elected master node and multiple slave nodes. The master node in the small cluster periodically sends heartbeat information to the slave nodes to monitor whether the slave nodes have gone offline.
[0073] For new nodes, the cluster update module performs the following steps to add the node to the data interaction cluster and then to a smaller cluster:
[0074] (1) For the smallest cluster at the lowest level, based on the cluster configuration information, select a small cluster that has not reached the predetermined size as the target cluster, and recommend that the node join the target cluster, or the node actively joins a small cluster that has already been created at the lowest level.
[0075] (2) If the small cluster to which the node is joining is offline, the node will fail to join. A failure message will be added and recorded in the system table.
[0076] (3) If a node does not receive a heartbeat message from its master node within a predetermined time after joining the small cluster, it will indicate that the node in the cluster is suspected of being offline and record it in the system table.
[0077] If a node fails to join the cluster, there are two scenarios: Scenario 1: The system indicates that the node failed to join the data interaction cluster, and the node being joined is suspected of being offline, and this is recorded in the system table; Scenario 2: If no monitoring data is received from the other party for a long time, the system indicates that the node in the small cluster is suspected of being offline, and this is recorded in the system table.
[0078] In this embodiment, for each small cluster, nodes broadcast their identity information and hash verification code to other nodes for authentication based on the gossip protocol. After successful authentication, nodes periodically or proactively push their interaction data and hash verification code to other nodes within the small cluster.
[0079] Within a small cluster, the transmission of interactive data must verify the hash code to ensure message integrity, consistency, and security.
[0080] For a newly added node to the small cluster, the node broadcasts its identity information and hash verification code to the master node for authentication based on the gossip protocol. After successful authentication, the master node pushes the cluster information of the small cluster and the identity information of other nodes in the small cluster to the newly added node.
[0081] The interaction verification module works in conjunction with the data exchange and verification module to perform the following: For each small cluster, the slave node is instructed to send its interaction data and hash verification code to other nodes within the same small cluster based on the gossip protocol, and periodically send its interaction data and hash verification code to the corresponding master node; the master node is instructed to verify the received interaction data based on the hash verification code, and then push the verified interaction data to the next higher level small cluster; the master node of the highest level small cluster is instructed to synchronously summarize all interaction data, and then write the summarized interaction data to disk.
[0082] During the data interaction process, the master node in the highest-level small cluster synchronizes and verifies the interactive data, and then writes the relevant data to physical storage media such as disks.
[0083] The small cluster detection module performs the following: For each small cluster, it periodically determines whether the size of the small cluster meets the hierarchical size defined in the cluster configuration information. If it does not meet the requirements, it adjusts the size of the data interaction cluster according to the joining time of the nodes in the small cluster, adding the nodes that joined the small cluster later to other small clusters or creating a new small cluster.
[0084] In this embodiment, the small cluster detection module is used to periodically determine whether the number of nodes in the data interaction cluster is less than or equal to three. Based on the order of joining time, the size of the data interaction cluster is adjusted so that the nodes that join later can join other data interaction clusters or create a new data interaction cluster, and the user is notified.
[0085] The data display module is used to perform the following: customize the UI interface based on the configuration information, and display interactive data through the customized UI interface.
[0086] The present invention has been shown and described in detail above with reference to the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above embodiments, those skilled in the art will know that more embodiments of the present invention can be obtained by combining the means in the different embodiments described above, and these embodiments are also within the protection scope of the present invention.
Claims
1. A data interaction verification method based on hash algorithm and gossip protocol, characterized in that, This method, applied to the KaiWuDB cluster, enables data interaction and verification between nodes within the cluster via a data interaction and verification module. The method includes the following steps: Start KaiWuDB and the data interaction and verification module, and load the configuration information of the data interaction and verification module into memory. The configuration information includes the hash algorithm type, cluster configuration information and customized data interaction rules. The customized data interaction rules define the format of the data exchanged between nodes, the storage rules of the data exchanged, and the display rules. The cluster configuration information defines the hierarchical scale of the data interaction cluster. For new nodes, the nodes are added to the data interaction cluster and then to a small cluster. The data interaction cluster includes multiple levels of small clusters. Each small cluster includes an elected master node and multiple slave nodes. Within the small cluster, the master node periodically sends heartbeat information to the slave nodes to monitor whether the slave nodes have gone offline. For each small cluster, the slave node sends its interaction data and hash checksum to other nodes in the same small cluster based on the gossip protocol, and periodically sends its interaction data and hash checksum to the corresponding master node; After the master node verifies the received interaction data based on the hash checksum, it pushes the verified interaction data to the next level small cluster. The master node of the highest level small cluster then synchronizes and summarizes all the interaction data and writes the summarized interaction data to disk. For each small cluster, it is periodically determined whether the size of the small cluster meets the hierarchical size defined in the cluster configuration information. If it does not meet the requirements, the size of the data interaction cluster is adjusted according to the joining time of the nodes in the small cluster. The nodes that joined the small cluster later are added to other small clusters or a new small cluster is created. The UI is customized based on the configuration information, and interactive data is displayed through the customized UI.
2. The data interaction verification method based on hash algorithm and gossip protocol according to claim 1, characterized in that, To start KaiWuDB and its data interaction and verification modules, follow these steps: Start KaiWuDB; Start the data interaction and verification module, and check if the configuration information of the data interaction and verification module exists. If it does not exist, prompt that the data interaction and verification module failed to start and indicate that the configuration information is missing, and record the prompt information in the system table. If it exists, load the configuration information into memory.
3. The data interaction verification method based on hash algorithm and gossip protocol according to claim 1 or 2, characterized in that, For a new node, adding the node to the data interaction cluster and then to a smaller cluster includes the following steps: For the smallest cluster at the most basic level, based on the cluster configuration information, a small cluster that has not reached the predetermined size is selected as the target cluster, and the node is recommended to join the target cluster, or the node actively joins an already created smallest cluster at the lowest level. If the small cluster a node is trying to join is offline, the node will fail to join, and a failure message will be added and recorded in the system table. If a node does not receive a heartbeat message from its master node within a predetermined time after joining the small cluster, it will indicate that the node in the cluster is likely offline and record it in the system table.
4. The data interaction verification method based on hash algorithm and gossip protocol according to claim 3, characterized in that, For each small cluster, nodes within the small cluster broadcast their identity information and hash verification code to other nodes for authentication based on the gossip protocol. For a newly added node to the small cluster, the node broadcasts its identity information and hash verification code to the master node for authentication based on the gossip protocol. After successful authentication, the master node pushes the cluster information of the small cluster and the identity information of other nodes in the small cluster to the newly added node.
5. A data interaction verification system based on a hash algorithm and a gossip protocol, characterized in that, This system is applied to the KaiWuDB cluster and is used in conjunction with the data interaction and verification module to realize data interaction and verification between nodes within the cluster through a data interaction verification method based on hash algorithm and gossip protocol as described in any one of claims 1-4. The system includes a configuration module, a cluster update module, an interaction verification module, a small cluster detection module, and a data display module. The configuration module is used to perform the following: start KaiWuDB and the data interaction and verification module, load the configuration information of the data interaction and verification module into memory, the configuration information includes hash algorithm type, cluster configuration information and customized data interaction rules, the customized data interaction rules define the format of data interaction between nodes, the storage rules of the data interaction and the display rules, and the cluster configuration information defines the hierarchical scale of the data interaction cluster. The cluster update module is used to perform the following: For a new node, the node is added to the data interaction cluster and then to a small cluster. The data interaction cluster includes multiple levels of small clusters. Each small cluster includes an elected master node and multiple slave nodes. The master node in the small cluster periodically sends heartbeat information to the slave nodes to monitor whether the slave nodes have gone offline. The interactive verification module works in conjunction with the data exchange and verification module to perform the following: For each small cluster, the slave node is instructed to send its interactive data and hash verification code to other nodes in the same small cluster based on the gossip protocol, and periodically sends its interactive data and hash verification code to the corresponding master node; After the master node verifies the received interactive data based on the hash checksum, it pushes the verified interactive data to the next level small cluster. The master node of the highest level small cluster then synchronizes and aggregates all interactive data and writes the aggregated interactive data to disk. The small cluster detection module is used to perform the following: For each small cluster, it periodically determines whether the size of the small cluster meets the hierarchical size defined in the cluster configuration information. If it does not meet the requirements, it adjusts the size of the data interaction cluster according to the joining time of the nodes in the small cluster, and adds the nodes that joined the small cluster later to other small clusters or creates a new small cluster. The data display module is used to perform the following: customize the UI interface based on the configuration information, and display interactive data through the customized UI interface.
6. The data interaction verification system based on hash algorithm and gossip protocol according to claim 5, characterized in that, The startup configuration module is used to execute the following: Start KaiWuDB; Start the data interaction and verification module, and check if the configuration information of the data interaction and verification module exists. If it does not exist, prompt that the data interaction and verification module failed to start and indicate that the configuration information is missing, and record the prompt information in the system table. If it exists, load the configuration information into memory.
7. The data interaction verification system based on hash algorithm and gossip protocol according to claim 5 or 6, characterized in that, For a new node, the cluster update module performs the following actions to add the node to the data interaction cluster and to a smaller cluster: For a new node, adding the node to the data interaction cluster and then to a smaller cluster includes the following steps: For the smallest cluster at the most basic level, based on the cluster configuration information, a small cluster that has not reached the predetermined size is selected as the target cluster, and the node is recommended to join the target cluster, or the node actively joins an already created smallest cluster at the lowest level. If the small cluster a node is trying to join is offline, the node will fail to join, and a failure message will be added and recorded in the system table. If a node does not receive a heartbeat message from its master node within a predetermined time after joining the small cluster, it will indicate that the node in the cluster is likely offline and record it in the system table.
8. The data interaction verification system based on hash algorithm and gossip protocol according to claim 7, characterized in that, For each small cluster, nodes within the small cluster broadcast their identity information and hash verification code to other nodes for authentication based on the gossip protocol. For newly added nodes in the small cluster, the interaction verification module works in conjunction with the data exchange and verification module to perform the following: the node broadcasts its identity information and hash verification code to the master node for identity verification based on the gossip protocol. After successful verification, the master node pushes the cluster information of the small cluster and the identity information of other nodes in the small cluster to the node.
Citation Information
Patent Citations
Distributed database system load balancing method and device
CN116991580A
Blockchain system, data processing method, computer device, and storage medium
WO2021174787A1