Cluster management method, electronic equipment and computer readable medium

The master node and slave node are determined in the customer pre-equipment cluster through election methods, and simplified data synchronization and management are achieved, solving the problem of managing a large number of CPE clusters in the prior art, and expanding the usage environment.

CN119030991APending Publication Date: 2024-11-26ZTE CORP

Patent Information

Application Number
CN202310587485.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The prior art is difficult to effectively manage a large number of customer front-end equipment (CPE) clusters, especially in scenarios with a wide range and a large number of equipment, resulting in complex and inconvenient equipment management.

Method used

The master node and slave node are determined through election method. The master node interacts with the server and the slave node synchronizes data with the master node, avoiding the complex process of the server needing to synchronize data to all devices.

Benefits of technology

Simplifies management of a large number of devices, extends the usage environment, and reduces the risk of new MAC address configuration complexity and missed configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030991A_ABST
    Figure CN119030991A_ABST
Patent Text Reader

Abstract

The invention provides a cluster management method, electronic equipment and a computer readable medium. The cluster management method comprises the following steps: determining a target equipment identifier of a main node elected from all customer front-end equipment in a cluster where the cluster is located; receiving data of a server under the condition that the target equipment is determined to be a main node according to the target equipment identifier, and updating self-stored data according to the received data; or, under the condition that it is determined that the device itself is the slave node according to the target device identifier, the data stored by the client front-end device serving as the master node is synchronized to the device itself.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cluster technology, and in particular to a cluster management method, an electronic device, and a computer-readable medium. Background Art

[0002] With the fifth generation of mobile communication technology (5G, 5 th With the popularization of the Next Generation Mobile Communication Technology and the application of wireless networks, the use scenarios of wireless terminal products are becoming more and more diversified, so new requirements are put forward for wireless terminal products to adapt to more use scenarios. At present, customer premise equipment (CPE) is mainly used in scenarios with a small scope and a small number of devices, such as homes and small offices. These places are more convenient to manage devices because of the small number of devices. It is not applicable to scenarios with a wide scope and a large number of CPEs. Summary of the invention

[0003] Embodiments of the present application provide a cluster management method, an electronic device, and a computer-readable medium.

[0004] In a first aspect, an embodiment of the present application provides a cluster management method, which is applied to a customer front-end device, and the method includes: determining a target device identifier of a master node selected from all customer front-end devices in the cluster where the customer front-end device is located; when the customer front-end device is determined to be the master node according to the target device identifier, receiving data from a server, and updating the data stored in the customer front-end device according to the received data; or, when the customer front-end device is determined to be a slave node according to the target device identifier, synchronizing the data stored in the customer front-end device as the master node to the customer front-end device itself.

[0005] In a second aspect, an embodiment of the present application provides a cluster management method, which is applied to a server, and the method includes: receiving the voting device identification and the stored latest data tag sent by each customer front-end device in the cluster respectively; wherein the latest data tag is used to indicate the latest update time of the stored data; selecting a customer front-end device from the cluster as a master node according to the voting device identification and the stored latest data tag of all customer front-end devices in the cluster, and using the first other customer front-end device in the cluster as a slave node; wherein the first other customer front-end device is a customer front-end device other than the master node in the cluster; and sending the device identification of the customer front-end device serving as the master node to all customer front-end devices in the cluster.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; a memory, wherein at least one program is stored in the memory, and when the at least one program is executed by the at least one processor, any one of the above-mentioned cluster management methods is implemented.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned cluster management methods is implemented.

[0008] The cluster management method provided in the embodiment of the present application selects a master node based on an election to interact with the server for data, and synchronizes data between the slave node and the master node. This avoids the complex process of the server synchronizing data to all devices in the cluster. The operation is simple, easy to manage a large number of devices, and expands the usage environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A schematic diagram of a cluster management method according to an embodiment of the present application;

[0010] Figure 2 A schematic diagram of a flow chart of a cluster management method provided in another embodiment of the present application;

[0011] Figure 3 A schematic diagram of a flow chart of a cluster management method provided in another embodiment of the present application;

[0012] Figure 4 A schematic diagram of a network topology in an example of an embodiment of the present application;

[0013] Figure 5 A schematic block diagram of an electronic device provided in another embodiment of the present application;

[0014] Figure 6 A schematic block diagram of the composition of a cluster management system provided in another embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to enable those skilled in the art to better understand the technical solution of the present application, the cluster management method, electronic device, and computer-readable medium provided by the present application are described in detail below in conjunction with the accompanying drawings.

[0016] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make this application thorough and complete and to enable those skilled in the art to fully understand the scope of this application.

[0017] In the absence of conflict, the embodiments of the present application and the features therein may be combined with each other.

[0018] As used herein, the term "and / or" includes any and all combinations of at least one of the associated listed items.

[0019] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of at least one other feature, whole, step, operation, element, component and / or its group is not excluded.

[0020] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined herein.

[0021] Figure 1 A flowchart of a cluster management method provided by one embodiment of the present application.

[0022] First, refer to Figure 1 An embodiment of the present application provides a cluster management method, which is applied to a CPE. The method includes:

[0023] Step 100, determining a target device identifier of a master node to be elected from all CPEs in the cluster where the master node is located.

[0024] In some exemplary embodiments, determining the target device identifier of the master node elected from all CPEs in the cluster to which the device is located includes: sending the device identifier of the device itself for voting and the latest data tag stored by the device itself to the server; wherein the latest data tag is used to indicate the latest update time of the stored data; and receiving the target device identifier returned by the server.

[0025] In some exemplary embodiments, when the device identification of its own vote and the latest data tag stored by itself are sent to the server, the cluster identification of the cluster to which it belongs is also sent to the server.

[0026] In some exemplary embodiments, before sending the device identification of its own vote and the latest data tag stored by itself to the server, the method also includes: generating a random number; wherein the random number is any one of the device identifications of all CPEs in the cluster; and using the random number as the device identification of its own vote.

[0027] In some exemplary embodiments, the latest data tag may be represented by a timestamp of the updated data, such that the later the timestamp, the newer the data.

[0028] In some exemplary embodiments, the data tag may be represented by a numerical value, and each time the data is updated, the numerical value increases by 1. Thus, the larger the numerical value is, the more times the data is updated, and the newer the data is.

[0029] In some exemplary embodiments, determining the target device identifier of the master node to be elected from all CPEs in the cluster to which the cluster belongs includes: obtaining the correspondence between the communication information and device identifiers of all CPEs in the cluster to which the cluster belongs; selecting one CPE from the cluster as the master node (master node) according to the correspondence, and the first other CPE in the cluster as the follower node (follower node); wherein the first other CPE is the CPE in the cluster other than the master node.

[0030] In some exemplary embodiments, the communication information includes a wide area network (WAN) Internet Protocol (IP) address and a communicative port number.

[0031] In some exemplary embodiments, before obtaining the correspondence between the communication information and device identification of all CPEs in the cluster where the method is located, the method further includes: sending the communication information of the method to the server; and receiving the device identification of the method returned by the server.

[0032] In some exemplary embodiments, the communication information of the device itself may be sent to the server after the dial-up is successful.

[0033] In some exemplary embodiments, the number of CPEs in a cluster is greater than or equal to three.

[0034] In some exemplary embodiments, the number of CPEs in a cluster is an even number or an odd number.

[0035] In some exemplary embodiments, the device identifier may be any integer between 1 and N, used to distinguish CPEs in a cluster; wherein N is the number of CPEs in the cluster.

[0036] In some exemplary embodiments, the device identifiers of different CPEs in a cluster are different.

[0037] In some exemplary embodiments, the correspondence also includes a cluster identifier.

[0038] In some exemplary embodiments, before acquiring the correspondence between the communication information and device identifications of all CPEs in the cluster to which the method belongs, the method further includes: receiving a cluster identification returned by the server.

[0039] In some exemplary embodiments, when a cluster creation notification message sent by a server is received, a CPE may be selected from the cluster as a master node according to the corresponding relationship, and the first other CPE in the cluster may be used as a slave node. That is, when a cluster creation notification message is received, a cluster creation function is started. For example, a cluster creation process may be run, and a CPE may be selected from the cluster as a master node according to the corresponding relationship through the cluster creation process, and the first other CPE in the cluster may be used as a slave node.

[0040] In some exemplary embodiments, selecting a CPE from a cluster as a master node according to the corresponding relationship includes: sending its own voted device identifier and its own stored latest data tag to a second other CPE in the cluster according to the corresponding relationship; wherein the second other CPE is a CPE other than itself in the cluster; receiving the device identifier voted by the second other CPE in the cluster and the latest data tag stored by the second other CPE according to the corresponding relationship; selecting a CPE from the cluster as the master node according to its own voted device identifier and its own stored latest data tag, as well as the device identifier voted by the second other CPE and the latest data tag stored by the second other CPE.

[0041] In some exemplary embodiments, sending the device identification of its own vote and the latest data tag stored by itself to the second other CPE in the cluster according to the corresponding relationship includes: generating a random number; wherein the random number is any one of the device identifications in the corresponding relationship; and sending the random number as the device identification of its own vote and the latest data tag stored by itself to the second other CPE.

[0042] In some exemplary embodiments, a random number can be sent to a second other CPE as the device identifier of its own vote and the latest data tag stored by itself according to the communication information in the corresponding relationship, and the device identifier of the second other CPE vote and the latest data tag stored by the second other CPE can be received.

[0043] In some exemplary embodiments, a connection can be established with a second other CPE using socket technology based on the communication information in the corresponding relationship, and a random number can be sent to the second other CPE as the device identifier of its own vote and the latest data label stored in itself based on the established connection, and the device identifier of the second other CPE's vote and the latest data label stored in the second other CPE are received.

[0044] In some exemplary embodiments, selecting a CPE as a master node from a cluster based on its own voted device identifier and its own stored latest data tag, as well as the device identifier voted by a second other CPE and the latest data tag stored by the second other CPE includes: determining a CPE that meets preset conditions; wherein the CPE that meets the preset conditions is a CPE in the cluster that has the latest data stored as indicated by the latest data tag; and selecting a CPE as a master node from the CPEs that meet the preset conditions based on the number of votes of the CPEs that meet the preset conditions.

[0045] In some exemplary embodiments, the data tag may be represented by a timestamp of the updated data, such that the later the timestamp, the newer the data.

[0046] In some exemplary embodiments, the data tag may be represented by a numerical value, and each time the data is updated, the numerical value increases by 1. Thus, the larger the numerical value is, the more times the data is updated, and the newer the data is.

[0047] In some exemplary embodiments, the number of votes of a CPE refers to the number of device identifiers of the voting device identifier of the CPE among the device identifiers of the voting device identifier of the CPE itself and the device identifiers of the voting device identifier of the second other CPE. For example, there are 10 CPEs in the cluster, the device identifier of CPE 1 is 1, the device identifier of CPE 2 is 2, the device identifier of CPE 3 is 3, the device identifier of CPE 4 is 4, the device identifier of CPE 5 is 5, the device identifier of CPE 6 is 6, the device identifier of CPE 7 is 7, the device identifier of CPE 8 is 8, the device identifier of CPE 9 is 9, and the device identifier of CPE 10 is 10. The device identifiers of CPE 1 to CPE 3 are all 1, the device identifiers of CPE4 to CPE8 are all 2, and the device identifiers of CPE 9 to CPE 10 are all 3. Then, the number of votes of CPE 1 is 3, the number of votes of CPE 2 is 5, the number of votes of CPE 3 is 2, and the number of votes of CPE 4 to CPE 10 are all 0.

[0048] In some exemplary embodiments, when the number of CPEs satisfying the preset condition is 1, the CPE satisfying the preset condition is used as a master node.

[0049] In some exemplary embodiments, when the number of CPEs satisfying the preset condition is greater than or equal to 2, a CPE is selected as a master node from the CPEs satisfying the preset condition according to the number of votes of the CPEs satisfying the preset condition.

[0050] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: selecting a CPE that meets the preset conditions and has a number of votes greater than or equal to half of the number of CPEs participating in the voting in the cluster as the master node.

[0051] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: when the number of CPEs that meet the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs that participate in the voting in the cluster is 1, selecting a CPE that meets the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs that participate in the voting in the cluster is selected as the master node.

[0052] In some exemplary embodiments, when determining the number of CPEs that meet the preset conditions and whose votes are greater than or equal to half of the number of CPEs participating in the voting in the cluster, the number of CPEs that meet the preset conditions and whose votes are greater than or equal to the number of CPEs participating in the voting in the cluster can be determined first, and then the number of these CPEs can be counted. For example, the cluster includes 10 CPEs, and there are 3 CPEs that meet the preset conditions, namely CPE 3, CPE 9, and CPE 10. The number of votes of CPE 3 is 6, the number of votes of CPE 9 is 0, and the number of votes of CPE 10 is 2. Then the number of CPEs that meet the preset conditions and whose votes are greater than or equal to half of the number of CPEs participating in the voting in the cluster is 1.

[0053] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: among the CPEs that meet the preset conditions, the number of CPEs whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster is greater than or equal to 2, and when the number of votes of the CPEs that meet the preset conditions that is greater than or equal to the number of votes of the CPEs participating in the voting in the cluster are not the same, the CPE with the highest number of votes among the CPEs that meet the preset conditions that is greater than or equal to the number of votes of the CPEs participating in the voting in the cluster is selected as the master node.

[0054] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: among the CPEs that meet the preset conditions, the number of CPEs whose votes are greater than or equal to half of the number of CPEs participating in the voting in the cluster is greater than or equal to 2, and among the CPEs that meet the preset conditions, the number of CPEs with the highest number of votes is greater than or equal to 2, then the CPE with the largest device identifier among the CPEs with the highest number of votes that meet the preset conditions is selected as the master node.

[0055] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: if there is no CPE among the CPEs that meet the preset conditions whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster, re-executing the election process, that is, re-executing the step of selecting a CPE as the master node from the cluster according to the corresponding relationship.

[0056] Step 101, when determining that it is a master node according to the target device identifier, it receives data from the server and updates its own stored data according to the received data; or, when determining that it is a slave node according to the target device identifier, it synchronizes the data stored in the client front-end device as the master node to itself.

[0057] In some exemplary embodiments, when the target device is identified as a slave node based on the target device identification, the data stored in the CPE as the master node is periodically synchronized to the target device itself.

[0058] In some exemplary embodiments, synchronizing the data stored by the CPE as the master node to itself includes: obtaining the latest data tag of the CPE as the master node, and comparing the latest data tag of the CPE as the master node with its own latest data tag; when the latest data tag of the CPE as the master node and its own latest data tag indicate that the data stored by the CPE as the master node is newer than the data stored by itself, updating its own stored data according to the data stored by the CPE as the master node; when the latest data tag of the CPE as the master node and its own latest data tag indicate that the data stored by the CPE as the master node is not newer than the data stored by itself, no processing is performed.

[0059] In some exemplary embodiments, the method further includes: when there is a newly added CPE in the cluster, re-execute the step of determining the target device identifier of the master node elected from all CPEs in the cluster where the cluster is located. That is, when there is a newly added CPE in the cluster, re-execute steps 100 to 101, and all CPEs in the cluster include the original CPEs in the cluster and the newly added CPEs.

[0060] In some exemplary embodiments, when there is a newly added CPE in the cluster, the cluster creation function is restarted. For example, the cluster creation process can be terminated, and then the cluster creation process can be re-run, and steps 100 to 101 are re-executed through the cluster creation process. All CPEs in the cluster include the original CPEs in the cluster and the newly added CPEs.

[0061] In some exemplary embodiments, the method also includes: when the CPE serving as the master node goes offline and the number of CPEs serving as slave nodes is greater than or equal to 2, selecting a CPE from the first other CPEs as a new master node according to the corresponding relationship, and using the third other CPE in the cluster as a new slave node; wherein the third other CPE is the CPE in the cluster excluding the offline master node and the new master node.

[0062] In some exemplary embodiments, when the slave node itself acts as a slave node, if it cannot communicate with the master node, it is considered that the master node is offline.

[0063] In some exemplary embodiments, when the master node itself acts as the master node, if it cannot communicate with the slave node, it is considered that the slave node is offline.

[0064] In some exemplary embodiments, the master node can count the number of slave nodes that synchronize data in each cycle, and use the counted number of slave nodes as updated data to synchronize to the slave nodes in the next cycle, so that the slave nodes can know the number of slave nodes in the current cluster.

[0065] In some exemplary embodiments, the method further includes: when the CPE serving as the master node is offline and the number of CPEs serving as slave nodes is less than 2, re-execute the step of determining the target device identifier of the master node elected from all CPEs in the cluster where the CPE is located. That is, when the CPE serving as the master node is offline and the number of CPEs serving as slave nodes is less than 2, re-execute steps 100 to 101.

[0066] In some exemplary embodiments, the method further includes: when the node is a master node that has been offline and the master node that has been offline is back online, determining whether the WAN IP address of the node before the node is offline and the WAN IP address of the node after the node is back online has changed; when the WAN IP address of the node before the node is offline and the WAN IP address of the node after the node is back online has changed, re-executing the step of obtaining the correspondence between the communication information and the device identification of all customer front-end devices in the cluster where the node is located, or sending the device identification of the node that the node voted for and the latest data tag stored by the node to the server. That is, when the WAN IP address of the node before the node is offline and the WAN IP address of the node after the node is back online has changed, re-executing steps 100 to 101.

[0067] In some exemplary embodiments, when the WAN IP address of the CPE before the disconnection and the WAN IP address after the re-connection are changed, a cluster re-creation notification message is sent to the server; the cluster re-creation notification message sent by the server is received; and the cluster re-creation notification message is stored as updated data. In this way, after the CPE as a slave node synchronizes data from the master node, it is informed that the cluster needs to be re-created.

[0068] In some exemplary embodiments, the WAN IP address of the device before it was disconnected may be stored in the device.

[0069] In some exemplary embodiments, when the WAN IP address before going offline and the WAN IP address after coming back online change, a cluster re-creation notification message is sent to the server; the cluster re-creation notification message sent by the server is received; and the cluster re-creation notification message is sent to all CPEs that serve as slave nodes.

[0070] In some exemplary embodiments, the method further includes: if the WAN IP address of the node before being offline and the WAN IP address of the node after being back online do not change, adding the node to the cluster as a slave node.

[0071] In some exemplary embodiments, the method further includes: when the CPE as a slave node is offline and the number of CPEs as slave nodes currently online is less than a preset threshold, re-execute the step of obtaining the correspondence between the communication information and device identification of all customer premise equipment in the cluster where the CPE is located, or send the device identification voted by the CPE and the latest data tag stored by the CPE to the server. That is, when the CPE as a slave node is offline and the number of CPEs as slave nodes currently online is less than a preset threshold, re-execute steps 100 to 101, and all CPEs in the cluster include the fourth other CPE in the cluster except the offline slave node.

[0072] In some exemplary embodiments, the preset threshold may be any value, such as 2.

[0073] In some exemplary embodiments, when the node itself is the master node, it can check whether the CPE serving as the slave node is online through heartbeat detection.

[0074] In some exemplary embodiments, the method further includes: when the node itself is a slave node that has been offline and the slave node that has been offline is back online, determining whether its WAN IP address before being offline and its WAN IP address after being back online have changed; when its WAN IP address before being offline and its WAN IP address after being back online have changed, re-execute the step of obtaining the correspondence between the communication information and device identification of all customer front-end devices in its cluster, or sending its own voted device identification and its own stored latest data tag to the server. That is, when its WAN IP address before being offline and its WAN IP address after being back online have changed, re-execute steps 100 to 101.

[0075] In some exemplary embodiments, the method further includes: if the WAN IP address of the node before being offline and the WAN IP address of the node after being back online do not change, adding the node as a slave node to the cluster.

[0076] The cluster management method provided in the embodiment of the present application selects a master node based on an election to interact with the server for data, and synchronizes data between the slave node and the master node. This avoids the complex process of the server synchronizing data to all devices in the cluster. The operation is simple, easy to manage a large number of devices, and expands the usage environment.

[0077] Figure 2 A flowchart of a cluster management method provided by another embodiment of the present application.

[0078] Second, refer to Figure 2 Another embodiment of the present application provides a cluster management method, applied to a server, the method comprising:

[0079] Step 200, receiving the voting device identification and the stored latest data tag sent by each CPE in the cluster respectively; wherein the latest data tag is used to indicate the latest update time of the stored data.

[0080] In some exemplary embodiments, when the voted device identification and the stored latest data tag sent by each CPE in the cluster are respectively received, the cluster identification of the cluster to which the CPE belongs is also received.

[0081] In some exemplary embodiments, the device identifier may be any integer between 1 and N, used to distinguish CPEs in a cluster; wherein N is the number of CPEs in the cluster.

[0082] In some exemplary embodiments, the device identifiers of different CPEs in a cluster are different.

[0083] In some exemplary embodiments, returning the device identification to the CPE includes: returning the device identification and the cluster identification to the CPE.

[0084] Step 201, select one CPE from the cluster as the master node according to the device identifications voted by all CPEs in the cluster and the stored latest data tags, and select the first other CPE in the cluster as the slave node; wherein the first other CPE is the CPE in the cluster other than the master node.

[0085] In some exemplary embodiments, selecting a CPE as a master node from the cluster based on the device identifications voted by all CPEs in the cluster and the latest data tags stored includes: determining CPEs belonging to the same cluster based on the cluster identification; and selecting a CPE as a master node from the cluster based on the device identifications voted by all CPEs in the same cluster and the latest data tags stored.

[0086] In some exemplary embodiments, selecting a CPE from the cluster as a master node based on the device identifications voted by all CPEs in the cluster and the latest data tags stored includes: determining a CPE that meets a preset condition; wherein the CPE that meets the preset condition is a CPE in the cluster that has the latest data stored as indicated by the latest data tag; and selecting a CPE from the CPEs that meet the preset condition as a master node based on the number of votes of the CPEs that meet the preset condition.

[0087] In some exemplary embodiments, the data tag may be represented by a timestamp of the updated data, such that the later the timestamp, the newer the data.

[0088] In some exemplary embodiments, the data tag may be represented by a numerical value, and each time the data is updated, the numerical value increases by 1. Thus, the larger the numerical value is, the more times the data is updated, and the newer the data is.

[0089] In some exemplary embodiments, the number of votes of a CPE refers to the number of device identifiers of the voting device identifier being the CPE among the device identifiers voted by all CPEs in the cluster. For example, there are 10 CPEs in the cluster, the device identifier of CPE 1 is 1, the device identifier of CPE 2 is 2, the device identifier of CPE 3 is 3, the device identifier of CPE 4 is 4, the device identifier of CPE 5 is 5, the device identifier of CPE 6 is 6, the device identifier of CPE 7 is 7, the device identifier of CPE 8 is 8, the device identifier of CPE 9 is 9, and the device identifier of CPE 10 is 10. The device identifiers of CPE 1 to CPE 3 are all 1, the device identifiers of CPE 4 to CPE 8 are all 2, and the device identifiers of CPE 9 to CPE 10 are all 3. Then, the number of votes of CPE 1 is 3, the number of votes of CPE 2 is 5, the number of votes of CPE 3 is 2, and the number of votes of CPE 4 to CPE 10 are all 0.

[0090] In some exemplary embodiments, when the number of CPEs satisfying the preset condition is 1, the CPE satisfying the preset condition is used as a master node.

[0091] In some exemplary embodiments, when the number of CPEs satisfying the preset condition is greater than or equal to 2, a CPE is selected as a master node from the CPEs satisfying the preset condition according to the number of votes of the CPEs satisfying the preset condition.

[0092] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: selecting a CPE that meets the preset conditions and has a number of votes greater than or equal to half of the number of CPEs participating in the voting in the cluster as the master node.

[0093] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: when the number of CPEs that meet the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs that participate in the voting in the cluster is 1, selecting a CPE that meets the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs that participate in the voting in the cluster is selected as the master node.

[0094] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: among the CPEs that meet the preset conditions, the number of CPEs whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster is greater than or equal to 2, and when the number of votes of the CPEs that meet the preset conditions that is greater than or equal to the number of votes of the CPEs participating in the voting in the cluster are not the same, the CPE with the highest number of votes among the CPEs that meet the preset conditions that is greater than or equal to the number of votes of the CPEs participating in the voting in the cluster is selected as the master node.

[0095] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: among the CPEs that meet the preset conditions, the number of CPEs whose votes are greater than or equal to half of the number of CPEs participating in the voting in the cluster is greater than or equal to 2, and among the CPEs that meet the preset conditions, the number of CPEs with the highest number of votes is greater than or equal to 2, then the CPE with the largest device identifier among the CPEs with the highest number of votes that meet the preset conditions is selected as the master node.

[0096] In some exemplary embodiments, selecting a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions includes: if there is no CPE among the CPEs that meet the preset conditions whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster, re-executing the election process, that is, re-executing the step of selecting a CPE as the master node from the cluster according to the device identifications of all CPEs voting in the cluster and the latest data tags stored.

[0097] Step 202: Send the device identification of the CPE serving as the master node to all CPEs in the cluster.

[0098] In some exemplary embodiments, before respectively receiving the voting device identification and the stored latest data tag sent by each CPE in the cluster, the method also includes: receiving communication information of the CPE sent by the CPE; returning the device identification of the CPE to the CPE; and storing the correspondence between the communication information and the device identification.

[0099] Figure 3 A flowchart of a cluster management method provided by another embodiment of the present application.

[0100] Thirdly, refer to Figure 3 Another embodiment of the present application provides a cluster management method, applied to a server, the method comprising:

[0101] Step 300: receiving the communication information of the CPE sent by the CPE; and returning the device identification of the CPE to the CPE.

[0102] In some exemplary embodiments, the communication information includes a WAN IP address and a communicable port number.

[0103] In some exemplary embodiments, the device identifier may be any integer between 1 and N, used to distinguish CPEs in a cluster; wherein N is the number of CPEs in the cluster.

[0104] In some exemplary embodiments, the device identifiers of different CPEs in a cluster are different.

[0105] In some exemplary embodiments, returning the device identification of the CPE to the CPE includes: returning the device identification and the cluster identification of the CPE to the CPE.

[0106] Step 301: When the communication information of all CPEs is acquired, for each cluster to which the CPEs are divided, the correspondence between the communication information of all CPEs in the cluster and the device identification is sent to all CPEs in the cluster.

[0107] In some exemplary embodiments, when the communication information of all CPEs is acquired, for each cluster to which the CPEs are divided, the correspondence between the communication information and device identifications of all CPEs in the cluster is sent to all CPEs in the cluster.

[0108] In some exemplary embodiments, the correspondence further includes a cluster identifier.

[0109] In some exemplary embodiments, when communication information of all CPEs is acquired, the CPEs are divided into at least one cluster, and a cluster identifier of the cluster is sent to the CPEs.

[0110] In some exemplary embodiments, the number of CPEs in the cluster may be pre-set in the server.

[0111] In some exemplary embodiments, it can be determined whether the communication information of all CPEs in the cluster has been obtained according to the number of CPEs in the preset cluster. Specifically, when the number of CPEs corresponding to the received communication information is equal to the number of CPEs in the preset cluster, it is determined that the communication information of all CPEs in the cluster has been obtained; when the number of CPEs corresponding to the received communication information is less than the number of CPEs in the preset cluster, it is determined that the communication information of all CPEs in the cluster has not been obtained.

[0112] In some exemplary embodiments, the number of clusters and the number of CPEs in each cluster may be pre-set in the server.

[0113] In some exemplary embodiments, it can be determined whether the communication information of all CPEs has been obtained based on the number of pre-set clusters and the number of CPEs in each cluster. Specifically, when the number of CPEs corresponding to the received communication information is equal to the sum of the numbers of CPEs in all clusters, it is determined that the communication information of all CPEs has been obtained; when the number of CPEs corresponding to the received communication information is less than the sum of the numbers of CPEs in all clusters, it is determined that the communication information of all CPEs has not been obtained.

[0114] In some exemplary embodiments, when there is a new CPE added to the cluster, the number of CPEs in the cluster in the server may be reset.

[0115] In some exemplary embodiments, after the corresponding relationship of all CPEs in the cluster is sent to all CPEs in the cluster, the method further includes: sending a cluster creation notification message to all CPEs in the cluster.

[0116] Step 302: Receive a device identifier of the CPE serving as the master node sent by the CPE serving as the master node.

[0117] In some exemplary embodiments, after receiving a device identification sent by a CPE that serves as a master node, the CPE corresponding to the device identification is marked as a master node.

[0118] In order to describe in detail the specific implementation of the cluster management method of the embodiment of the present application, an example is listed below for illustration. The listed example is not used to limit the protection scope of the embodiment of the present application.

[0119] Example

[0120] In this example, a certain office building needs to install hundreds of mobile Internet product devices (such as the above-mentioned CPE) to complete the network coverage of the office building. Only the terminal devices corresponding to the MAC addresses in the media range control (MAC, Media Access Control) address whitelist stored in the mobile Internet product devices can access the Internet normally. If there are new MAC addresses to be added to the MAC address whitelist, they need to be sent to the mobile Internet product devices one by one through the server. Manually completing the delivery of new MAC addresses is not only a large workload, but also prone to omissions and forgotten configurations. This example provides a method that only needs to send the new MAC address to the master node in the cluster through the server. Other devices in the cluster synchronize the new MAC address to their own stored MAC address whitelist through the master node. This operation greatly reduces the configuration complexity and workload of the new MAC address, and also avoids the occurrence of missed configurations.

[0121] In this example, Figure 4As shown in the figure, suppose that three clusters are created among the hundreds of installed mobile Internet product devices. After the clusters are created, suppose that the MAC addresses of the mobile phones and computers that want to connect to the above network are not added to the MAC address whitelist, the Internet access authentication interface will pop up when the mobile phones and computers connect to the network; if the MAC addresses of the mobile phones and computers are added to the MAC address whitelist, the Internet access authentication interface will not pop up when the mobile phones and computers connect to the network, and they can directly access the Internet.

[0122] In this example, the server can send MAC address whitelists to the master nodes in the three clusters. The slave nodes in each cluster obtain the latest MAC address whitelist from the master node of its own cluster. The MAC address whitelists obtained by the devices in the three clusters are the same.

[0123] When a device corresponding to a MAC address in the MAC address whitelist is connected to cluster 1 among the three clusters, the Internet access authentication interface will not pop up. When a device corresponding to a MAC address in the MAC address whitelist is disconnected from the network environment of base group 1 and enters cluster 2 or cluster 3, it can also directly access the Internet after successfully connecting to the network without popping up the Internet access authentication interface.

[0124] Assume that a mobile Internet product device in cluster 2 is shut down and restarted due to power failure or other reasons, and the WAN IP address does not change. After the restart, the mobile Internet product device directly joins cluster 2 as a slave node, reads the latest data from the master node of cluster 2, updates its own stored data, and keeps synchronization with the data of the master node.

[0125] Fourthly, refer to Figure 5 Another embodiment of the present application provides an electronic device, including: at least one processor 501; a memory 502, wherein at least one program is stored in the memory 502, and when the at least one program is executed by the at least one processor 501, any one of the above-mentioned cluster management methods is implemented.

[0126] In some exemplary embodiments, the electronic device further includes: one or more I / O interfaces 503 connected between the processor 501 and the memory 502 , and configured to implement information interaction between the processor 501 and the memory 502 .

[0127] Among them, the processor 501 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 502 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 503 is connected between the processor 501 and the memory 502, and can realize information interaction between the processor 501 and the memory 402, including but not limited to a data bus (Bus), etc.

[0128] In some embodiments, the processor 501 , the memory 502 , and the I / O interface 503 are connected to each other via a bus 504 , and further connected to other components of the computing device.

[0129] In a fifth aspect, another embodiment of the present application provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned cluster management methods is implemented.

[0130] Figure 6 A block diagram of the composition of a cluster management system provided in another embodiment of the present application.

[0131] Sixth, refer to Figure 6 Another embodiment of the present application provides a cluster management system, including: at least one CPE601 and a server 602.

[0132] Among them, CPE 601 is used to determine the target device identifier of the master node elected from all customer front-end devices in the cluster where it is located; when it is determined that it is the master node according to the target device identifier, it receives data from the server and updates its own stored data according to the received data; or, when it is determined that it is a slave node according to the target device identifier, it synchronizes the data stored in the customer front-end device that is the master node to itself.

[0133] In some exemplary embodiments, CPE 601 is specifically used to determine the target device identifier of the master node elected from all customer front-end devices in its cluster in the following manner: sending its own voting device identifier and its own stored latest data tag to the server; wherein the latest data tag is used to indicate the latest update time of the stored data; and receiving the target device identifier returned by the server.

[0134] Among them, server 602 is used to respectively receive the voting device identification and the stored latest data label sent by each customer front-end device in the cluster; wherein the latest data label is used to indicate the latest update time of the stored data; select a customer front-end device from the cluster as the master node according to the voting device identification and the stored latest data label of all customer front-end devices in the cluster, and use the first other customer front-end device in the cluster as the slave node; wherein the first other customer front-end device is the customer front-end device other than the master node in the cluster; send the device identification of the customer front-end device serving as the master node to all customer front-end devices in the cluster.

[0135] In some exemplary embodiments, CPE 601 is specifically used to determine the target device identifier of the master node elected from all customer premises devices in the cluster where it is located in the following manner: obtain the correspondence between the communication information and device identifiers of all customer premises devices in the cluster where it is located; select one customer premises device from the cluster as the master node according to the correspondence, and select the first other customer premises device in the cluster as the slave node; wherein the first other customer premises device is a customer premises device other than the master node in the cluster.

[0136] In some exemplary embodiments, CPE 601 is further used to: send its own communication information to the server; and receive its own device identification returned by the server.

[0137] In some exemplary embodiments, CPE 601 is specifically used to select a CPE as a master node from a cluster according to a corresponding relationship in the following manner: sending its own voted device identifier and its own stored latest data label to a second other CPE in the cluster according to the corresponding relationship; wherein the second other CPE is a CPE other than itself in the cluster; receiving the device identifier voted by the second other CPE in the cluster and the latest data label stored by the second other CPE according to the corresponding relationship; selecting a CPE as a master node from the cluster according to its own voted device identifier and its own stored latest data label, as well as the device identifier voted by the second other CPE and the latest data label stored by the second other CPE.

[0138] In some exemplary embodiments, CPE 601 is specifically used to implement sending its own voting device identifier and its own stored latest data label to the second other CPE in the cluster according to the corresponding relationship in the following manner: generating a random number; wherein the random number is any one of the device identifiers in the corresponding relationship; and sending the random number as its own voting device identifier and its own stored latest data label to the second other CPE.

[0139] In some exemplary embodiments, CPE 601 is specifically used to select a CPE as a master node from a cluster based on its own voted device identifier and its own latest stored data label, as well as the device identifier voted by a second other CPE and the latest data label stored by the second other CPE in the following manner: determine a CPE that meets preset conditions; wherein the CPE that meets the preset conditions is a CPE in the cluster that has the latest data stored as indicated by the latest data label; and select a CPE as a master node from the CPEs that meet the preset conditions based on the number of votes of the CPEs that meet the preset conditions.

[0140] In some exemplary embodiments, CPE 601 is specifically used to select a CPE as a master node from CPEs that meet the preset conditions according to the number of votes of the CPEs that meet the preset conditions in at least one of the following ways: select the CPEs that meet the preset conditions and have a number of votes greater than or equal to half of the number of CPEs participating in the vote in the cluster as master nodes; when the number of CPEs that meet the preset conditions and have a number of votes greater than or equal to half of the number of CPEs participating in the vote in the cluster is 1, select the CPEs that meet the preset conditions and have a number of votes greater than or equal to half of the number of CPEs participating in the vote in the cluster as master nodes; when the number of CPEs that meet the preset conditions and have a number of votes greater than or equal to half of the number of CPEs participating in the vote in the cluster is 1 If the number of CPEs that meet the preset conditions is greater than or equal to 2 and the number of votes of CPEs that meet the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster are not the same, the front-end device with the highest number of votes among the CPEs that meet the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster will be used as the master node; if the number of CPEs that meet the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster is greater than or equal to 2, and the number of CPEs with the highest number of votes among the CPEs that meet the preset conditions is greater than or equal to 2, the CPE with the largest device identifier among the CPEs that meet the preset conditions and whose number of votes is greater than or equal to half of the number of CPEs participating in the voting in the cluster will be used as the master node.

[0141] In some exemplary embodiments, CPE 601 is further configured to: when there is a new CPE added to the cluster, re-execute the step of determining the target device identifier of the master node elected from all customer premises devices in the cluster where the CPE 601 is located.

[0142] In some exemplary embodiments, CPE 601 is also used for: when the CPE serving as the master node goes offline and the number of CPEs serving as slave nodes is greater than or equal to 2, selecting a CPE from the first other CPEs as a new master node according to the corresponding relationship, and using the third other CPE in the cluster as a new slave node; wherein the third other CPE is the CPE in the cluster excluding the offline master node and the new master node.

[0143] In some exemplary embodiments, CPE 601 is also used for: when it is a main node that has been offline and the main node that has been offline is back online, determining whether its WAN IP address before being offline and its WAN IP address after being back online have changed; when its WAN IP address before being offline and its WAN IP address after being back online have changed, re-executing the step of obtaining the correspondence between the communication information and device identification of all customer front-end devices in its cluster, or sending its own voted device identification and its own latest stored data tag to the server.

[0144] In some exemplary embodiments, CPE 601 is further configured to: if the WAN IP address of CPE 601 before being offline and after being back online does not change, add itself to the cluster as a slave node.

[0145] In some exemplary embodiments, CPE 601 is also used for: when a CPE serving as a slave node goes offline and the number of CPEs serving as slave nodes currently online is less than 2, re-execute the step of obtaining the correspondence between the communication information and device identification of all customer front-end devices in the cluster where it is located, or send its own voted device identification and its own stored latest data label to the server; wherein all customer front-end devices in the cluster include a fourth other customer front-end device in the cluster except the offline slave node.

[0146] In some exemplary embodiments, CPE 601 is also used for: when the CPE itself is a slave node that has been disconnected and the slave node that has been disconnected is back online, determining whether its WAN IP address before being disconnected and after being back online has changed; when the CPE itself is a slave node that has been disconnected and the slave node that has been back online has changed, re-executing the step of obtaining the correspondence between the communication information and the device identification of all customer front-end devices in its cluster, or sending its own voted device identification and its own latest stored data tag to the server.

[0147] In some exemplary embodiments, CPE 601 is further configured to: if the WAN IP address of CPE 601 before being offline and after being back online does not change, add itself to the cluster as a slave node.

[0148] The specific implementation process of the cluster management system is the same as the specific implementation process of the cluster management method in the aforementioned embodiment, and will not be repeated here.

[0149] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0150] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present application as set forth in the appended claims.

Claims

1. A cluster management method, applied to a customer front-end device, comprising: Determine the target device identifier of the master node elected from all customer front-end devices in the cluster where the master node is located; When determining that the target device is a master node according to the target device identifier, receiving data from the server, and updating the data stored in the target device according to the received data; or, When it is determined that the node itself is a slave node according to the target device identifier, the data stored in the client front-end device as the master node is synchronized to the node itself.

2. The cluster management method according to claim 1, wherein: The step of determining the target device identifier of the master node selected from all the customer front-end devices in the cluster in which the customer front-end devices are located comprises: Sending the device identification of its own voting and the latest data tag stored by itself to the server; wherein the latest data tag is used to indicate the latest update time of the stored data; Receive the target device identifier returned by the server.

3. The cluster management method according to claim 1, wherein: The step of determining the target device identifier of the master node selected from all the customer front-end devices in the cluster in which the customer front-end devices are located comprises: Obtain the correspondence between the communication information and device identification of all customer front-end devices in the cluster where the customer is located; According to the corresponding relationship, a customer premises device is selected from the cluster as a master node, and a first other customer premises device in the cluster is selected as a slave node; wherein the first other customer premises device is a customer premises device in the cluster other than the master node.

4. The cluster management method according to claim 3, wherein: Before obtaining the correspondence between the communication information and device identifications of all customer front-end devices in the cluster where the customer front-end device is located, the method further includes: Send its own communication information to the server; Receive the device identification returned by the server.

5. The cluster management method according to claim 3, wherein: The selecting a customer front-end device from the cluster as a master node according to the corresponding relationship includes: Sending the device identification of its own vote and the latest data tag stored in itself to the second other customer front-end device in the cluster according to the corresponding relationship; wherein the second other customer front-end device is a customer front-end device other than itself in the cluster; Receive the device identification voted by the second other customer front-end device in the cluster and the latest data tag stored by the second other customer front-end device according to the corresponding relationship; wherein the latest data tag is used to indicate the latest update time of the stored data; A customer front-end device is selected from the cluster as the master node according to its own voting device identification and its own stored latest data label, as well as the device identification voted by the second other customer front-end device and the second other customer front-end device stored latest data label.

6. The cluster management method according to claim 5, wherein: The sending, according to the corresponding relationship, the device identification of the self-voted device and the latest data tag stored by the self to the second other customer front-end device in the cluster comprises: Generate a random number; wherein the random number is any one of the device identifiers in the corresponding relationship; The random number is sent to the second other customer front-end device as the device identification of its own voting and the latest data label stored in itself.

7. The cluster management method according to claim 5, wherein: The selecting a customer front-end device from the cluster as a master node according to the device identification voted by the customer front-end device and the latest data tag stored by the customer front-end device, as well as the device identification voted by the second other customer front-end device and the latest data tag stored by the second other customer front-end device comprises: Determine a customer front-end device that meets the preset conditions; wherein the customer front-end device that meets the preset conditions is a customer front-end device that stores the latest data indicated by the latest data tag in the cluster; A customer premises device is selected from the customer premises devices that meet the preset conditions as a master node according to the number of votes of the customer premises devices that meet the preset conditions.

8. The cluster management method according to claim 7, wherein: The selecting a customer premises device as a master node from the customer premises devices that meet the preset conditions according to the number of votes of the customer premises devices that meet the preset conditions comprises at least one of the following: Among the customer premise equipments that meet the preset conditions, the customer premise equipment whose number of votes is greater than or equal to half of the number of customer premise equipments participating in the voting in the cluster is used as the master node; When the number of customer front-end devices whose votes are greater than or equal to half of the number of customer front-end devices participating in voting in the cluster among the customer front-end devices satisfying the preset conditions is 1, the customer front-end device whose votes are greater than or equal to half of the number of customer front-end devices participating in voting in the cluster among the customer front-end devices satisfying the preset conditions is taken as the master node; In the case that, among the customer front-end devices that meet the preset conditions, the number of customer front-end devices whose votes are greater than or equal to half of the number of customer front-end devices participating in the voting in the cluster is greater than or equal to 2, and in the case that the number of votes of the customer front-end devices that meet the preset conditions are greater than or equal to half of the number of customer front-end devices participating in the voting in the cluster are all different, the customer front-end device with the highest number of votes among the customer front-end devices that meet the preset conditions and whose votes are greater than or equal to half of the number of customer front-end devices participating in the voting in the cluster is taken as the master node; When, among the customer front-end devices that meet the preset conditions, the number of customer front-end devices whose number of votes is greater than or equal to half of the number of customer front-end devices participating in the voting in the cluster is greater than or equal to 2, and when, among the customer front-end devices that meet the preset conditions, the number of customer front-end devices with the highest number of votes is greater than or equal to 2, the customer front-end device with the highest number of votes among the customer front-end devices that meet the preset conditions and with the largest device identifier is used as the master node.

9. The cluster management method according to any one of claims 3 to 8, further comprising: When the customer front-end device serving as the master node goes offline and the number of the customer front-end devices serving as the slave nodes is greater than or equal to a preset threshold, one customer front-end device is selected from the first other customer front-end devices as a new master node according to the corresponding relationship, and the third other customer front-end device in the cluster is selected as a new slave node; wherein the third other customer front-end device is a customer front-end device in the cluster excluding the offline master node and the new master node.

10. The cluster management method according to claim 9, further comprising: When the node is the offline master node and the offline master node is back online, determine whether the wide area network Internet Protocol address of the node before the offline and the wide area network Internet Protocol address of the node after the back online are changed; In the case that the WAN Internet Protocol address before the disconnection and the WAN Internet Protocol address after the re-online are changed, the step of obtaining the correspondence between the communication information and the device identification of all the customer front-end devices in the cluster where the customer front-end devices are located is re-executed.

11. The cluster management method according to claim 10, further comprising: In the case that the WAN Internet Protocol address of the node before being offline and the WAN Internet Protocol address of the node after being back online do not change, the node joins the cluster as the slave node.

12. The cluster management method according to any one of claims 3 to 8, further comprising: When the customer front-end device serving as the slave node goes offline and the number of customer front-end devices serving as the slave nodes that are currently online is less than a preset threshold, the step of obtaining the correspondence between the communication information and the device identification of all customer front-end devices in the cluster where the customer front-end device is located is re-executed; wherein all customer front-end devices in the cluster include a fourth other customer front-end device in the cluster except the slave node that goes offline.

13. The cluster management method according to claim 12, further comprising: When the slave node is the offline slave node and the offline slave node is back online, determining whether the wide area network Internet Protocol address of the slave node before the offline and the wide area network Internet Protocol address of the slave node after the offline are changed; In the case that the WAN Internet Protocol address before the disconnection and the WAN Internet Protocol address after the re-online are changed, the step of obtaining the correspondence between the communication information and the device identification of all the customer front-end devices in the cluster where the customer front-end devices are located is re-executed.

14. The cluster management method according to claim 13, further comprising: In the case that the WAN Internet Protocol address of the node before being offline and the WAN Internet Protocol address of the node after being back online do not change, the node joins the cluster as the slave node.

15. A cluster management method, applied to a server, the method comprising: Respectively receiving the voting device identification and the stored latest data tag sent by each customer front-end device in the cluster; wherein the latest data tag is used to indicate the latest update time of the stored data; Selecting a customer front-end device from the cluster as a master node according to the device identifications voted by all customer front-end devices in the cluster and the latest data tags stored, and selecting the first other customer front-end device in the cluster as a slave node; wherein the first other customer front-end device is a customer front-end device in the cluster other than the master node; The device identification of the customer premises device serving as the master node is sent to all customer premises devices in the cluster.

16. The cluster management method according to claim 15, before receiving the voting device identification and the stored latest data tag sent by each customer front-end device in the cluster, the method further comprises: Respectively receiving communication information sent by each customer front-end device in the cluster; Returning a device identifier of the customer front-end device to the customer front-end device; The correspondence between the communication information and the device identification is stored.

17. An electronic device comprising: at least one processor; A memory, wherein at least one program is stored in the memory, and when the at least one program is executed by the at least one processor, the cluster management method according to any one of claims 1 to 16 is implemented.

18. A computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the cluster management method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Method and device for data synchronization based on cluster server system

    CN104753994A

  • Method and device for selecting master and slave nodes in distributed server cluster

    CN105338028A

  • Master-slave node data synchronization method and device, and readable medium

    CN110502373A

  • Data synchronization method and system, electronic equipment and computer readable storage medium

    CN111049928A

  • Data disaster tolerance method and device and computer readable medium

    CN112190924A

Cited By

  • Intelligent energy consumption optimized multimedia equipment cluster management terminal

    CN120215373A