End-side free networking distributed system

By installing an action record manager and controller on each node, recording and processing network operation information and maintaining the network node list, the problem of rapid master selection in the terminal-side free networking distributed system is solved, and the problem of rapid master selection is realized. It avoids business risks and updates node status in real time, and is suitable for flexible and changeable end-side free networking scenarios.

CN119109771APending Publication Date: 2024-12-10KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411339030.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In the end-side free networking distributed system, it is difficult to quickly determine the new master node when the master node fails, resulting in business risks. The fault tolerance rate of the specified method in the existing technology is low, while the election method is complex and difficult to implement, especially in the large number of nodes. and in real time.

Method used

Each node is equipped with an action record manager and controller to record and process network operation information, maintain the network node list, select new master nodes in the order of the list, and perform data synchronization and health checks when the master node fails to ensure that Node list consistency.

Benefits of technology

It realizes rapid automatic master selection after the master node failure, avoids business risks, dynamically changing master node selection, avoids complex rules and election calculations, and is suitable for flexible and changeable end-side free networking scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109771A_ABST
    Figure CN119109771A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an end-side free networking distributed system which comprises a plurality of nodes, and each node is provided with an action record manager used for recording networking operation information of a user and generating networking operation records of different versions according to networking operations at different moments; the controller is used for acquiring the networking operation record of the user from the action record manager and carrying out merging / duplicate removal processing on the record to obtain a system networking information record of the latest version; receiving network node list update information regularly sent by the master node, maintaining a network node list, marking the master node and the slave nodes in the network node list, and marking the latest state information of each node; and the selection module is used for selecting a new master node according to the sequence of the network node list when a master node fault is found. And a proper new main node can be obtained without complicated rules and election calculation. And the method is more suitable for a cluster use scene in which free networking is carried out at an end side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distributed systems, and in particular to a terminal-side free networking distributed system. Background Art

[0002] Currently, multi-node distributed systems have been widely used in various fields, such as big data processing, microservice architecture, containerized deployment, artificial intelligence, deep learning, machine learning, etc. The resource usage model in the industry in large-scale scenarios basically adopts a combination of cloud resources and local resources.

[0003] In a multi-node distributed system, the master node plays a vital role, mainly responsible for managing and controlling the operation of the entire distributed system. Specifically, the functions of the master node include: the master node is responsible for monitoring the status of each node in the cluster, coordinating task scheduling, allocating resources, and handling abnormal situations. At the same time, the master node can also manage all changes within the cluster, including adding and deleting indexes or nodes. The master node ensures the high availability and stability of the distributed system by maintaining the relevant status information of each node in the system. However, in actual use, the master node will inevitably fail, which will make the distributed system unable to work properly.

[0004] In current technology, when a master node fails, a new master node is usually selected by designation or election. However, both of the above methods have problems in the end-side free networking distributed system. The designation method usually fixes the master node to a few nodes. In this mode, the master node has a low fault tolerance rate and does not have the ability to automatically select a master. In the end-side free networking distributed system, the node status changes quickly, and new online nodes or offline nodes may be added at any time. It is very likely that the set nodes will be offline at the same time. If the master node fails, it will cause irreparable losses to the business.

[0005] In the election method, it is necessary to set reasonable and complex rules for selecting the master node. At the same time, the number of nodes to be elected must be controlled to an odd number to avoid the situation where the election result cannot be obtained. This is difficult to achieve for the end-side free networking distributed system. First of all, the number of nodes is large and is changing in real time. It is difficult to determine which nodes can participate in the election to elect a new reasonable master node. Summary of the invention

[0006] The embodiment of the present invention provides an end-side free networking distributed system to solve the technical problem in the prior art of quickly determining a new master node when the master node of the end-side free networking distributed system fails.

[0007] Specifically, an embodiment of the present invention provides a terminal-side free networking distributed system, including:

[0008] include:

[0009] A plurality of nodes, each of which has:

[0010] Action record manager, used to record the user's networking operation information and generate different versions of networking operation records according to the networking operations at different times;

[0011] A controller, the controller is used to obtain the user's networking operation record from the action record manager, and merge / de-duplicate the record to obtain the latest version of the system networking information record;

[0012] Used to receive network node list update information sent by the master node regularly, maintain the network node list, and mark the master node and slave node in the network node list, and mark the latest status information of each node;

[0013] When a master node failure is detected, a new master node is selected according to the order of the network node list.

[0014] Furthermore, the controller is also used for:

[0015] After determining that the node is the new master node, a health check is performed on all nodes in the network according to the network node list, and network node list update information is generated according to the health check result.

[0016] Furthermore, the controller is also used for:

[0017] After determining that the node is the new master node, send data synchronization commands to other nodes;

[0018] Correspondingly, the controllers of other slave nodes are also used for:

[0019] The data stored in the self is synchronized according to the data synchronization command and the synchronized data information.

[0020] Furthermore, the controller of the master node is also used to:

[0021] Generate network node list update information based on the latest version of system networking information record of each node.

[0022] Furthermore, each node is also provided with:

[0023] The application interface server is used to provide the application interface of the distributed system and provide unified HTTP services to the outside world.

[0024] Furthermore, the application interface server is also used for:

[0025] Provide an API interface for free networking, use the API interface to receive networking operations, and perform networking processing based on the networking operations.

[0026] Furthermore, the action record manager is used to record the user's networking operation information according to the networking operation received by the API structure.

[0027] Furthermore, the controller of the master node is also used for:

[0028] The network node list is generated using the latest version of the system networking information record of each node, and the latest version of the system networking information record is sent to each slave node at a regular interval.

[0029] Furthermore, each node is also provided with:

[0030] The device classifier determines the role and function of the node according to the type of the node device.

[0031] The end-side free networking distributed system provided by the embodiment of the present invention is provided with: an action record manager for recording the user's networking operation information and generating different versions of networking operation records according to the networking operations at different times; a controller, the controller is used to obtain the user's networking operation record from the action record manager, and merge / de-duplicate the record to obtain the latest version of the system networking information record; for receiving the network node list update information sent by the master node regularly, maintaining the network node list, the network node list marks the master node and the slave node, and marks the latest status information of each node; for selecting a new master node in the order of the network node list when the master node failure is found. Utilizing the flexible and changeable characteristics of the node status in the end-side free networking distributed system, a controller is provided at each node, and the latest changed networking operation record is obtained by using the controller. The master node can generate a network node list according to the latest networking operation record of each node, and regularly send the latest updated network node list to all online slave nodes, so that the slave nodes have a consistent network node list, and when the master node failure is determined, the node is selected as the master node in order according to the network node list. Compared with the designated method, the selected master node can be in dynamic change and updated in real time with the node status of the free networking distributed system on the end side, avoiding the business risks caused by the failure of the master node. Compared with the election method, there is no restriction on the number of nodes in the free networking distributed system on the end side, and no complex rules and election calculations are required to obtain a suitable new master node. It is more suitable for cluster usage scenarios with free networking on the end side. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0033] Figure 1 It is a schematic diagram of the structure of the terminal-side free networking distributed system provided by an embodiment of the present invention;

[0034] Figure 2 It is a schematic diagram of the networking structure in the terminal-side free networking distributed system provided by an embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of a newly added node in a terminal-side free networking distributed system provided by an embodiment of the present invention;

[0036] Figure 4 This is a schematic diagram of a new master election in a terminal-side free networking distributed system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0038] Figure 1 is a schematic diagram of the structure of a terminal-side free networking distributed system provided by an embodiment of the present invention, Figure 2 is a schematic diagram of a network structure in a terminal-side free networking distributed system provided by an embodiment of the present invention, Figure 4 This is a schematic diagram of a new master election in a terminal-side free networking distributed system provided by an embodiment of the present invention.

[0039] See also Figure 1 , Figure 2 and Figure 4The end-side free networking distributed system provided in this embodiment can be used on the end-side of the end-cloud architecture. The end-side usually refers to the edge part of the computer network, that is, the side closer to the end user device. In the traditional computing model, data processing is usually completed in a centralized server or data center, while edge devices (such as personal computers, smart phones, sensors, etc.) are mainly responsible for data collection and transmission. However, with the development of the Internet of Things (IoT) and edge computing technology, more and more data processing work has begun to be completed on the end-side, that is, data processing, analysis and storage are performed on devices close to the source of data generation. End-side computing has been widely used in various fields, including smart homes, industrial automation, intelligent transportation systems, etc., providing important support for building a more intelligent, efficient and secure network. The current mainstream cloud computing mainly uses systems such as kubernetes, mesos, yarn, etc. to manage clusters and corresponding computing and storage resources.

[0040] Exemplarily, this embodiment is implemented based on the Kylin server. By networking and interconnecting different types of devices in the local area network (including server devices (physical machines, virtual machines), mobile phones, tablets and other smart terminal devices), unified management of all nodes in the local area network is achieved, making it convenient for users to use / borrow resources around them anytime and anywhere.

[0041] Figure 1 is a schematic diagram of the structure of the terminal side free networking distributed system provided by an embodiment of the present invention, see Figure 1 In the end-side free networking distributed system, the abstraction layer and resource management and job scheduling components can be used to enable different application frameworks to share cluster resources in the data center or cloud environment, and effectively manage large-scale cluster resources. Resource scheduling and management of large-scale distributed systems are realized, which improves the scalability and resource utilization of the system.

[0042] Among them, each node in the end-side free networking distributed system can use its own system and driver to manage hardware resources. The end-side free networking distributed system uses the above abstraction layer and components to manage the computing resources of the node.

[0043] In the end-side free networking distributed system, the master node plays an important role. Once the master node fails, it will affect the normal business. Therefore, in this embodiment, the end-side free networking distribution includes: multiple nodes, wherein the node can correspond to multiple edge devices. Among them, each node is provided with: an action record manager, which is used to record the user's networking operation information, and generate different versions of networking operation records according to the networking operations at different times; a controller, the controller is used to obtain the user's networking operation record from the action record manager, and merge / deduplicate the record to obtain the latest version of the system networking information record; used to receive the network node list update information sent by the master node at regular intervals, maintain the network node list, the network node list marks the master node and the slave node, and marks the latest status information of each node; when the master node failure is found, a new master node is selected according to the order of the network node list.

[0044] Exemplarily, the action record manager is mainly used to manage application requests from users, and record the user's application requests in the database. Each operation record encapsulates the user's node information and the corresponding operation information of the node. At the same time, each operation record will have a version field. Each version corresponds to a version management, representing an operation request of the user. Especially various operations related to networking, such as adding or deleting nodes. The version has the following characteristics: 1. Uniqueness, 2. Incrementality, 3. Timing. Uniqueness means that the version is globally unique; incrementality means that the version is designed in an integer incrementing manner; timing means that the value of the version can be converted into a specific time for later processing.

[0045] The controller is the core component, which is mainly responsible for maintaining the network, node leader election, data synchronization, ensuring data consistency on all nodes in the network, and also detecting the service health status of all nodes and updating the survival status of all nodes.

[0046] Exemplarily, the controller synchronizes the operation data according to the version in the operation record, and implements operations such as data merging / deduplication / update / deletion / addition / synchronization, etc., to obtain the latest version of the system networking information record.

[0047] After obtaining the latest version of the system networking information record, it should be synchronized to all other nodes in the end-side free networking distributed system. Optionally, it can be implemented in the following two ways. The first is that each node uploads the latest version of the system networking information record to the master node, which processes it to obtain complete network node list update information and sends it to all nodes in a surviving state. Another way is for each node to communicate with each other and send each other the latest version of the system networking information record. The controller of each node processes the received latest version of the system networking information record and its own latest version of the system networking information record to obtain network node list update information. The network node list marks the master node and the slave node, and marks the latest status information of each node. Using the above method, it can be ensured that the list information on all nodes of the end-side free networking distributed system remains consistent at the same time.

[0048] Using the above method, the node list data in all nodes can be the same, including node data, the order of nodes in the list, etc. In order to maintain the consistency of all node list data in the entire cluster, all node list data will be maintained by the master node. The node list manager in the master node will periodically detect the status information of all nodes and reorder the nodes in the list according to the node status, time, node type and other information. After each round of detection, the master node will update the node list information on all nodes, thereby ensuring the consistency of all node lists in the cluster.

[0049] In the traditional master+node cluster management mode, if the master node fails, the cluster cannot be used, the master node does not run business, and resources are wasted. The automatic master election function of the end-side free networking distributed system in this embodiment means that all nodes in the cluster have the ability to become master nodes, but at the same time, there is only one node in the entire cluster as the master node. When the master node fails, all other non-master nodes in the cluster can become master nodes through the unique master election logic provided by this embodiment.

[0050] For example, when the master node fails, by default, the node corresponding to the first element in the network node list will be used as the master node, and then the master election operation will be performed based on the health status of the node. The specific implementation process of the master election is as follows: Each node in the cluster has an identical node list. In order to ensure the consistency of the information in each node list in the cluster, its data generation and deletion are synchronized by the master node; when electing a master, each node will traverse the nodes according to the order of the local node list and make a master election judgment on the nodes; each node will have a master election judgment logic, and the controller of each node will regularly detect the health status of the master node. If the master node is found to be unhealthy, it will enter the master election logic and elect a master based on the local node list information. If the master node is still working normally, it will not enter the master election logic.

[0051] By using the above master election logic, a suitable node can be quickly selected as the new master node. Compared with the existing master election method, it not only avoids the long operation time of the master election algorithm due to the change in the number of nodes, and the network storm caused by the large amount of interactive data, but also avoids the situation where the business service cannot be provided for a long time due to the long calculation time of the master election strategy.

[0052] The end-side free networking distributed system provided by the embodiment of the present invention is provided with: an action record manager for recording the user's networking operation information and generating different versions of networking operation records according to the networking operations at different times; a controller, the controller is used to obtain the user's networking operation record from the action record manager, and merge / de-duplicate the record to obtain the latest version of the system networking information record; for receiving the network node list update information sent by the master node regularly, maintaining the network node list, the network node list marks the master node and the slave node, and marks the latest status information of each node; for selecting a new master node in the order of the network node list when the master node failure is found. Utilizing the flexible and changeable characteristics of the node status in the end-side free networking distributed system, a controller is provided at each node, and the latest changed networking operation record is obtained by using the controller. The master node can generate a network node list according to the latest networking operation record of each node, and regularly send the latest updated network node list to all online slave nodes, so that the slave nodes have a consistent network node list, and when the master node failure is determined, the node is selected as the master node in order according to the network node list. Compared with the designated method, the selected master node can be in dynamic change and updated in real time with the node status of the free networking distributed system on the end side, avoiding the business risks caused by the failure of the master node. Compared with the election method, there is no restriction on the number of nodes in the free networking distributed system on the end side, and no complex rules and election calculations are required to obtain a suitable new master node. It is more suitable for cluster usage scenarios with free networking on the end side.

[0053] Exemplarily, the controller is also used to: after determining that the node is the new master node, perform a health check on all nodes in the network according to the network node list, and generate network node list update information according to the health check results. Correspondingly, a controller is also provided in the master node, and the controller configured in the master node maintains the node list data. The master node will periodically detect the status information of all nodes, and reorder the nodes in the list according to the node status, time, node type and other information. After each round of detection, the master node will update the node list information on all nodes, thereby ensuring the consistency of all node lists in the cluster.

[0054] Accordingly, after determining that the node is the new master node, a data synchronization command is sent to other nodes;

[0055] Correspondingly, the controllers of other slave nodes are also used to synchronize the data stored in themselves according to the data synchronization command and the synchronized data information. In the end-side free networking distributed system provided in this embodiment, all data are stored in the master node data center, and all user requests for data will be processed through the master node centralized data. If the master node fails, the data of the entire cluster will be at risk of being lost. The decentralized distributed data management mode will cause data consistency problems. This method provides a semi-centralized management mode, that is, all data that is strongly related to the node is managed in a distributed manner, and all nodes will have their own local data; and data that is not related to the node will be stored in the master node, but in order to avoid data loss after the master node fails, the master node will periodically synchronize the data in the master node to all nodes, but data access will be accessed at the master node.

[0056] In this embodiment, each node of the end-side free networking distributed system is also configured with: an application interface server, which is used to provide an application interface for the distributed system and uniformly provide HTTP services to the outside. The application interface server uniformly manages the API interface in the end-side free networking distributed system and uniformly provides HTTP services to the outside. Responsible for exposing the API interface to the outside, providing users with API interfaces for using end-side computing resources, etc. Optionally, an entrance for external users to access nodes in the end-side free networking distributed system can be provided. And an API interface for user identity registration, authentication, and authorization is provided. Users can use any IP address in the cluster to use the services in the cluster. That is, the unified interface management will convert the processing of the interface into two modes according to the node type and role: 1. The API interface of the master node will directly process operations such as query / create / delete of data; 2. The API interface provided to the user by the non-master node will not directly query the data, but will redirect the API interface to the master node for processing.

[0057] Figure 3 This is a schematic diagram of a newly added node in the terminal-side free networking distributed system provided by an embodiment of the present invention, see Figure 3 , users can use the API interface to build a terminal-side free networking distributed system, optionally, can add / delete / maintain node resources of the terminal-side free networking distributed system, and can use the interface to view node list information and resource information. Correspondingly, the action record manager is used to record the user's networking operation information according to the networking operation received by the API structure.

[0058] In a preferred implementation of this embodiment, each node is also provided with: a device classifier, which determines the role and function of the node according to the type of the node device. Its main task is to distinguish the role and positioning that the node should assume when joining the end-side free networking distributed system. The classifier divides the nodes into two categories, namely, server-type nodes and end-side type nodes. Server-type nodes can provide heterogeneous resources for users and have sufficient cpu / mem resources, so they can be used as master nodes; while end-side type nodes are mainly mobile phones, tablets, smart watches and other devices. Such devices cannot provide sufficient resources, so they can only be converted to API interfaces. Since the end-side free networking distributed system provided by the embodiment is committed to networking any device, but since the resource types, performance, usage scenarios, etc. between different devices are different, in order to better manage all nodes and resources in the cluster, it is necessary to divide the nodes of the cluster according to their performance. The device classifier will divide them according to the type of device, and the automatic master selection function will select nodes with good performance as candidate nodes for the master node. The use of the device classifier can further improve the accuracy of the selected master node, and can provide better performance to realize the business services of the end-side free networking distributed system.

[0059] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A terminal-side free networking distributed system, characterized in that: include: A plurality of nodes, each of which has: Action record manager, used to record the user's networking operation information and generate different versions of networking operation records according to the networking operations at different times; A controller, the controller is used to obtain the user's networking operation record from the action record manager, and merge / de-duplicate the record to obtain the latest version of the system networking information record; Used to receive network node list update information sent by the master node regularly, maintain the network node list, and mark the master node and slave node in the network node list, and mark the latest status information of each node; When a master node failure is detected, a new master node is selected according to the order of the network node list.

2. The system according to claim 1, characterized in that The controller is also used for: After determining that the node is the new master node, a health check is performed on all nodes in the network according to the network node list, and network node list update information is generated according to the health check result.

3. The system according to claim 2, characterized in that The controller is also used for: After determining that the node is the new master node, send data synchronization commands to other nodes; Correspondingly, the controllers of other slave nodes are also used for: The data stored in the self is synchronized according to the data synchronization command and the synchronized data information.

4. The system according to claim 1, characterized in that The master node controller is also used to: Generate network node list update information based on the latest version of system networking information record of each node.

5. The system according to claim 1, characterized in that Each of the nodes is also provided with: The application interface server is used to provide the application interface of the distributed system and provide unified HTTP services to the outside world.

6. The system according to claim 5, characterized in that The application interface server is further used for: Provide an API interface for free networking, use the API interface to receive networking operations, and perform networking processing based on the networking operations.

7. The system according to claim 6, characterized in that The action record manager is used to record the user's networking operation information according to the networking operation received by the API structure.

8. The system according to claim 4, characterized in that The controller of the master node is also used for: The network node list is generated using the latest version of the system networking information record of each node, and the latest version of the system networking information record is sent to each slave node at a regular interval.

9. The system according to claim 1, characterized in that Each of the nodes is also provided with: The device classifier determines the role and function of the node according to the type of the node device.