A distributed system information synchronization method and system

By using the ACSU election and TIPC protocols to create multicast groups and approval services in distributed systems, the bottleneck of information synchronization performance in distributed systems is solved, and efficient and reliable information synchronization and flexible system management are achieved.

CN115883494BActive Publication Date: 2025-05-02BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211491979.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-25
Publication Date
2025-05-02
Estimated Expiration
2042-11-25

AI Technical Summary

Technical Problem

In the prior art, there is a performance bottleneck in the synchronization of information between nodes in distributed systems, especially when nodes are online, node discovery and address acquisition need to be supplemented with other protocols. The operational redundancy of the TCP/IP protocol increases communication time, affecting applications with high time response requirements.

Method used

The master node is obtained by performing ACSU elections in a distributed system, and a multicast group and approval service are created on the master node based on the Transparent Inter-Process Communication (TIPC) protocol. Information synchronization is performed between nodes through multicast groups. The approval service is used to listen to node join requests and differentiate role types for synchronization.

Benefits of technology

It realizes the rapidity and reliability of information synchronization in distributed systems, saves bandwidth, improves configuration success rate and system operation stability, and supports node joining and exiting, improving system flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883494B_ABST
    Figure CN115883494B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and system for information synchronization of a distributed system, which relates to the field of data security technology. The method includes: conducting ACSU election in a distributed system and obtaining a master control node; creating a multicast group and an approval service on the master control node based on a transparent inter-process communication protocol; approving the joining request information based on the approval service, and obtaining a node approval result; if the node approval result is passed, the node to be approved obtains the node instance number information according to the node approval result, and joins the multicast group according to the node instance number information, and the node instance number information corresponds to the node role type of the node to be approved; and executing the message synchronization operation of each node in the multicast group according to the node instance number information. This method can achieve the technical effect of improving the speed and reliability of information synchronization in a distributed system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to an information synchronization method and system for a distributed system. Background Art

[0002] At present, with the rapid development of network technology, network traffic has experienced explosive growth, and network security has attracted great attention from the whole society. When single-machine firewalls, load balancing and other equipment are deployed in actual network environments, performance bottlenecks are likely to occur. The development of distributed security gateway systems has been put on the agenda; and information synchronization between nodes in a distributed system is the key support for achieving the collaborative work of distributed systems.

[0003] In the prior art, a distributed system is equivalent to a cluster, and the nodes in the cluster work together to present an integrated device. The typical implementation method of reliable message transmission in a distributed system is to use the Transmission Control Protocol (TCP). However, the method of implementing reliable message transmission in a distributed system through TCP has the following technical defects: it is necessary to create multiple socket long links; the Internet Protocol (IP) address and port number information of the destination node must be known accurately to interact, so other protocols are needed to assist in node discovery and address acquisition when the node goes online; many operations of the TCP / IP protocol are redundant, such as the three-way handshake, which increases the communication time of the application, which is not conducive to applications with high time response requirements, such as processing the increase and decrease of cluster member nodes due to various reasons such as restart and downtime. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, system, electronic device and computer-readable storage medium for information synchronization in a distributed system, which can achieve the technical effect of improving the speed and reliability of information synchronization in the distributed system.

[0005] In a first aspect, an embodiment of the present application provides an information synchronization method for a distributed system, comprising:

[0006] Conducting ACSU election in a distributed system and obtaining a master control node, wherein the master control node is used to manage and control all nodes in the distributed system;

[0007] Creating a multicast group and an approval service on the master control node based on a transparent inter-process communication protocol, wherein the multicast group is used for information synchronization between nodes, and the approval service is used for monitoring a request for a node to join the multicast group;

[0008] Obtaining the joining request information of the node to be approved to join the multicast group;

[0009] Approving the joining request information based on the approval service to obtain a node approval result;

[0010] If the node approval result is passed, the node to be approved obtains node instance number information according to the node approval result, and joins the multicast group according to the node instance number information, where the node instance number information corresponds to the node role type of the node to be approved;

[0011] A message synchronization operation of each node in the multicast group is performed according to the node instance number information.

[0012] In the above implementation process, the information synchronization method of the distributed system is implemented based on the transparent inter-process communication (TIPC) protocol, that is, based on TIPC, the master node selection, creation of multicast group and approval service are completed, and then other nodes in the distributed system apply to join the multicast group, the master node approves the node to join the multicast group, and the node joins the multicast group with the node instance number corresponding to its own role, thereby completing the message synchronization operation of each node in the multicast group; in the information synchronization method of the distributed system, information synchronization between nodes is performed by distinguishing role types, which has high reliability and saves bandwidth; moreover, configuration command synchronization is performed after distinguishing role types, which can improve the configuration success rate and thus improve the system operation stability; in addition, it can also support the joining and exit of each node in the distributed system, thereby improving the system flexibility; thus, the information synchronization method of the distributed system can achieve the technical effect of improving the speed and reliability of information synchronization in the distributed system.

[0013] Furthermore, the step of performing ACSU election in the distributed system and obtaining the master control node includes:

[0014] Acquire a plurality of candidate nodes according to the distributed system, wherein the candidate nodes have an external management interface capability;

[0015] Running a preset ACSU election service based on the multiple nodes to be elected to obtain multiple node name information;

[0016] Prioritize the nodes according to their name information to obtain a priority ranking result.

[0017] The master control node is obtained according to the priority sorting result.

[0018] In the above implementation process, the candidate nodes are all nodes in the distributed system that have external management interface capabilities (ie, CSUs). The preset ACSU election service is run on the candidate nodes to elect the candidate node with the highest priority as the master node.

[0019] Further, after the step of obtaining the master control node according to the priority sorting result, the method further includes:

[0020] The preset ACSU election service is closed based on the multiple nodes to be elected.

[0021] Furthermore, the step of approving the joining request information based on the approval service and obtaining the node approval result includes:

[0022] Obtaining operating status information of the distributed system;

[0023] The approval service approves the joining request information according to the running status information to obtain a node approval result.

[0024] In the above implementation process, whether to approve the node to be approved to join the multicast group is decided according to the current operation status of the distributed system, so as to avoid increasing the system burden when the system is busy (such as batch configuration synchronization), thereby improving the stability of the system.

[0025] Furthermore, if the node approval result is passed, the node to be approved obtains the node instance number information according to the node approval result, and joins the multicast group according to the node instance number information, including:

[0026] If the node approval result is passed, obtaining the node role information of the node to be approved, wherein the node role information includes one of a master control node, a channel service node, a business processing node, a switching node, and an interface node;

[0027] The node to be approved obtains node instance number information according to the node approval result and the node role information, and joins the multicast group according to the node instance number information.

[0028] In the above implementation process, the nodes to be approved are distinguished by different role types and join the multicast group with different instance numbers.

[0029] Furthermore, the step of performing message synchronization operations on each node in the multicast group according to the node instance number information includes:

[0030] Obtain corresponding receiving node instance number information according to the node role type of the preset receiving end node;

[0031] Obtaining the destination address information of the multicast message according to the receiving node instance number information;

[0032] A message synchronization operation of each node in the multicast group is performed according to the multicast message destination address information.

[0033] In the above implementation process, each node in the distributed system distinguishes roles to synchronize information between nodes, which has high reliability and saves bandwidth; moreover, distinguishing roles to synchronize configuration commands can improve the configuration success rate and improve the stability of system operation.

[0034] Further, after the step of performing a message synchronization operation on each node in the multicast group according to the multicast message destination address information, the method further includes:

[0035] Determining whether the information synchronization of the preset receiving end node is successful;

[0036] If so, the function returns the value of successful sending to the sending node;

[0037] If not, the error code of the sending failure is returned to the sending node.

[0038] In the above implementation process, by feeding back the information of whether the receiving end node information is synchronized successfully, abnormal nodes can be isolated in time to avoid configuration errors and nodes that cause business processing errors from existing in the distributed system for a long time.

[0039] In a second aspect, an embodiment of the present application provides an information synchronization system for a distributed system, including:

[0040] An election module, used to perform ACSU election in a distributed system and obtain a master control node, wherein the master control node is used to manage and control all nodes in the distributed system;

[0041] A creation module, used to create a multicast group and an approval service on the master control node based on a transparent inter-process communication protocol, wherein the multicast group is used for information synchronization between nodes, and the approval service is used to monitor a request for a node to join the multicast group;

[0042] A joining request module, used to obtain joining request information of a node to be approved applying to join the multicast group;

[0043] An approval module, used to approve the joining request information based on the approval service and obtain a node approval result;

[0044] An instance number module, used for obtaining node instance number information according to the node approval result if the node approval result is passed, and joining the multicast group according to the node instance number information, wherein the node instance number information corresponds to the node role type of the node to be approved;

[0045] A synchronization module is used to perform message synchronization operations on each node in the multicast group according to the node instance number information.

[0046] Furthermore, the election module is specifically used for:

[0047] Acquire a plurality of candidate nodes according to the distributed system, wherein the candidate nodes have an external management interface capability;

[0048] Running a preset ACSU election service based on the multiple nodes to be elected to obtain multiple node name information;

[0049] Prioritize the nodes according to their name information to obtain a priority ranking result.

[0050] The master control node is obtained according to the priority sorting result.

[0051] Furthermore, the election module is further configured to: shut down a preset ACSU election service based on the multiple nodes to be elected.

[0052] Furthermore, the approval module is also used for:

[0053] Obtaining operating status information of the distributed system;

[0054] The approval service approves the joining request information according to the running status information to obtain a node approval result.

[0055] Furthermore, the instance number module is specifically used for:

[0056] If the node approval result is passed, obtaining the node role information of the node to be approved, wherein the node role information includes one of a master control node, a channel service node, a business processing node, a switching node, and an interface node;

[0057] The node to be approved obtains node instance number information according to the node approval result and the node role information, and joins the multicast group according to the node instance number information.

[0058] Furthermore, the synchronization module is specifically used for:

[0059] Obtain corresponding receiving node instance number information according to the node role type of the preset receiving end node;

[0060] Obtaining the destination address information of the multicast message according to the receiving node instance number information;

[0061] A message synchronization operation of each node in the multicast group is performed according to the multicast message destination address information.

[0062] Furthermore, the information synchronization system of the distributed system further includes a judgment module, and the judgment module is used to:

[0063] Determining whether the information synchronization of the preset receiving end node is successful;

[0064] If so, the function returns the value of successful sending to the sending node;

[0065] If not, the error code of the sending failure is returned to the sending node.

[0066] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.

[0067] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.

[0068] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.

[0069] Other features and advantages disclosed in the present application will be described in the following description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology disclosed in the present application.

[0070] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0072] Figure 1 A schematic diagram of the structure of a distributed system provided in an embodiment of the present application;

[0073] Figure 2 A schematic diagram of a flow chart of an information synchronization method for a distributed system provided in an embodiment of the present application;

[0074] Figure 3 A schematic diagram of the ACSU election process provided in an embodiment of the present application;

[0075] Figure 4 A flowchart of another distributed system information synchronization method provided in an embodiment of the present application;

[0076] Figure 5 A structural block diagram of an information synchronization system for a distributed system provided in an embodiment of the present application;

[0077] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0079] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0080] The embodiments of the present application provide a method, system, electronic device and computer-readable storage medium for information synchronization of a distributed system, which can be applied to the information synchronization process of a distributed system; the information synchronization method of the distributed system is implemented based on the transparent inter-process communication (TIPC) protocol, that is, the master node selection, multicast group creation and approval service are completed based on TIPC, and then other nodes in the distributed system apply to join the multicast group, the master node approves the node to join the multicast group, and the node joins the multicast group with the node instance number corresponding to its own role, thereby completing the message synchronization operation of each node in the multicast group; in the information synchronization method of the distributed system, information synchronization between nodes is performed by distinguishing role types, which has high reliability and saves bandwidth; moreover, configuration command synchronization is performed after distinguishing role types, which can improve the configuration success rate and thus improve the system operation stability; in addition, it can also support the joining and exit of each node in the distributed system to improve the system flexibility; thus, the information synchronization method of the distributed system can achieve the technical effect of improving the speed and reliability of information synchronization in the distributed system.

[0081] For example, in the embodiment of the present application, the Transparent Inter-Process Communication (TIPC) protocol supports fast and reliable communication between cluster nodes. Each TIPC node has only one address, and there is no concept of network interface. During the communication process, it is not necessary to know the location and port number of the receiving end, and communication is carried out through a location-transparent service address.

[0082] For example, the TIPC protocol reduces the steps of establishing communication connections and addressing target addresses for trusted network environments. In the TCP / IP protocol, the process of establishing connections and searching between nodes requires at least 9 packet exchanges, while TIPC reduces it to 2. This can increase the frequency of information exchange between nodes and reduce the waiting time between nodes.

[0083] For example, the TIPC protocol has a name table (NAME TABLE) shared between nodes. The sockets created by different nodes in the distributed system all have a name table entry in the shared NAME TABLE. When an application creates a TIPC socket and binds the socket to a {SERVICE_NAME, INSTANCE} address, other nodes can immediately see the information of the socket in the shared NAME TABLE.

[0084] See also Figure 1 , Figure 1 A schematic diagram of the structure of a distributed system provided in an embodiment of the present application; wherein: Figure 1 The boxes shown have the following meanings:

[0085] ACSU stands for Active Control and Service Unit, which is the node that currently provides a management interface to the outside world and performs business processing, and is responsible for managing and controlling the nodes in the entire distributed system (i.e., the master control node in the embodiment of the present application);

[0086] Node1-node3: business processing nodes;

[0087] Switch: Completes the connection between nodes and internal data exchange;

[0088] Node4-node5: nodes that provide physical network interfaces to the outside world.

[0089] See also Figure 2 , Figure 2 A schematic diagram of a flow chart of a distributed system information synchronization method provided in an embodiment of the present application, wherein the distributed system information synchronization method comprises the following steps:

[0090] S100: ACSU election is performed in the distributed system to obtain a master control node, which is used to manage and control all nodes in the distributed system.

[0091] Exemplarily, during the ACSU election process, the nodes to be selected are generally all nodes in the distributed system that have the ability to provide external management interfaces; optionally, a node is selected from the candidate nodes according to priority as the master control node, which is the node that currently provides a management interface to the outside world and performs business processing, and is responsible for managing and controlling the nodes in the entire distributed system.

[0092] Exemplarily, the node to be selected may be a control and service unit (CSU) in a distributed system.

[0093] S200: Creating a multicast group and an approval service on the master control node based on the transparent inter-process communication protocol. The multicast group is used for information synchronization between nodes, and the approval service is used for monitoring a node's request to join the multicast group.

[0094] In some embodiments, the master control node creates a TIPC type socket, and creates and joins a multicast group for information synchronization between nodes according to the multicast group type number specified by the distributed system;

[0095] At the same time, the master control node creates an additional TIPC socket of the "I AM ACSU" service (i.e., approval service) to monitor requests from other online nodes to join the multicast group and respond to them.

[0096] S300: Obtaining the joining request information of the node to be approved applying to join the multicast group.

[0097] Exemplarily, after the multicast group is created, other nodes in the distributed system may send joining request information to the master control node to apply to join the multicast group.

[0098] S400: Approve the joining request information based on the approval service and obtain the node approval result;

[0099] S500: If the node approval result is passed, the node to be approved obtains node instance number information according to the node approval result, and joins the multicast group according to the node instance number information, where the node instance number information corresponds to the node role type of the node to be approved.

[0100] Exemplarily, after receiving a response from the master control node (ie, the node approval result is passed), the node to be approved will join the multicast group with the node instance number corresponding to its own role.

[0101] S600: Execute message synchronization operation of each node in the multicast group according to the node instance number information.

[0102] In some embodiments, the information synchronization method of the distributed system is implemented based on the transparent inter-process communication (TIPC) protocol, that is, the master node selection, multicast group creation and approval service are completed based on TIPC, and then other nodes in the distributed system apply to join the multicast group, the master node approves the node to join the multicast group, and the node joins the multicast group with the node instance number corresponding to its own role, thereby completing the message synchronization operation of each node in the multicast group; in the information synchronization method of the distributed system, information synchronization between nodes is performed by distinguishing role types, which has high reliability and saves bandwidth; moreover, configuration command synchronization is performed after distinguishing role types, which can improve the configuration success rate and thus improve the system operation stability; in addition, it can also support the joining and exit of each node in the distributed system to improve the system flexibility; thus, the information synchronization method of the distributed system can achieve the technical effect of improving the speed and reliability of information synchronization in the distributed system.

[0103] See also Figure 3 , Figure 3 A schematic diagram of the ACSU election process provided in an embodiment of the present application.

[0104] Exemplarily, in S100: the steps of performing ACSU election and obtaining a master control node in a distributed system include:

[0105] S110: Acquire multiple candidate nodes according to the distributed system, wherein the candidate nodes have an external management interface capability;

[0106] S120: running a preset ACSU election service based on multiple candidate nodes to obtain multiple node name information;

[0107] S130: Prioritize the multiple nodes according to their name information to obtain a priority ranking result;

[0108] S140: Obtain a master control node according to the priority sorting result.

[0109] Exemplarily, the candidate nodes are all nodes in the distributed system that have external management interface capabilities (ie, CSUs). A preset ACSU election service is run on the candidate nodes to elect the candidate node with the highest priority as the master node.

[0110] Exemplarily, after the step of obtaining a master control node according to the priority sorting result at S140, the method further includes:

[0111] S150: shutting down the preset ACSU election service based on multiple nodes to be elected.

[0112] See also Figure 4 , Figure 4 A flowchart of another distributed system information synchronization method provided in an embodiment of the present application.

[0113] Exemplarily, S400: the step of approving the joining request information based on the approval service and obtaining the node approval result includes:

[0114] S410: Obtaining running status information of the distributed system;

[0115] S420: Approve the joining request information according to the operation status information approval service to obtain the node approval result.

[0116] Exemplarily, whether to approve the node to be approved to join the multicast group is determined based on the current operation status of the distributed system, thereby avoiding increasing the system burden when the system is busy (such as batch configuration synchronization is in progress), thereby improving the stability of the system.

[0117] Exemplarily, S500: if the node approval result is passed, the node to be approved obtains the node instance number information according to the node approval result, and joins the multicast group according to the node instance number information, including:

[0118] S510: If the node approval result is passed, obtain the node role information of the node to be approved, where the node role information includes one of a master control node, a channel service node, a business processing node, a switching node, and an interface node;

[0119] S520: The node to be approved obtains node instance number information according to the node approval result and the node role information, and joins the multicast group according to the node instance number information.

[0120] Exemplarily, the node to be approved distinguishes different role types and joins the multicast group with different instance numbers.

[0121] Exemplarily, S600: the step of performing a message synchronization operation on each node in the multicast group according to the node instance number information includes:

[0122] S610: Obtain corresponding receiving node instance number information according to the node role type of the preset receiving end node;

[0123] S620: Obtaining the destination address information of the multicast message according to the receiving node instance number information;

[0124] S630: Execute message synchronization operation on each node in the multicast group according to the destination address information of the multicast message.

[0125] Exemplarily, each node in a distributed system performs information synchronization between nodes based on different roles, which has high reliability and saves bandwidth; moreover, synchronizing configuration commands based on different roles can improve the configuration success rate and improve the stability of system operation.

[0126] Exemplarily, when synchronizing messages between nodes, the destination address of the multicast message is filled in according to the instance number corresponding to the expected role type, and the corresponding message can be sent to the expected type node.

[0127] Exemplarily, after the step of performing message synchronization operation on each node in the multicast group according to the destination address information of the multicast message at S630, the method further includes:

[0128] S640: Determine whether the information synchronization of the preset receiving end node is successful;

[0129] If yes, S641: send the successful function return value to the sending end node;

[0130] If not, S642: send a failed error code return value to the sending end node.

[0131] Exemplarily, by feeding back information on whether the receiving end node information is successfully synchronized, abnormal nodes can be isolated in a timely manner to avoid configuration errors and nodes that cause business processing errors from existing in the distributed system for a long time.

[0132] In some implementation scenarios, the present application provides a reliable, role-differentiated information synchronization method in a distributed system, combined with Figures 1 to 4 , the implementation of the information synchronization method includes the following 7 steps:

[0133] (1) ACSU elections;

[0134] First, a service "I WANT TO BE ACSU" (preset ACSU election service) is run on all nodes in the distributed system that have external management interface capabilities, namely CSU. Each node can monitor the node information corresponding to all nodes running this service in the distributed system by querying the shared name table of the local TIPC, and elect a node with the smallest node ID, that is, the highest priority, as the ACSU. After the ACSU election is completed, the ACSU and other CSUs close the "I WANT TO BE ACSU" service;

[0135] (2) ACSU creates a multicast group;

[0136] ACSU creates a TIPC type socket and creates and joins a multicast group for information synchronization between nodes according to the multicast group type number specified by the system;

[0137] (3) ACSU creates services for approval;

[0138] ACSU creates an additional TIPC socket for the "I AM ACSU" service to listen for requests from other online nodes to join the multicast group and respond;

[0139] (4) The node applies to join the multicast group;

[0140] The CSU nodes that have not been elected as ACSU in the current distributed system will send a request to join the multicast group to the "I AM ACSU" service. After the online node detects that there is an ACSU, it will also send a request to join the multicast group to the "I AM ACSU" service.

[0141] (5) ACSU approves nodes to join the multicast group based on the current system operation status;

[0142] ACSU decides whether to approve a node to join a multicast group based on the current operation of the distributed system. For example, when a node is online, the current system is performing batch configuration synchronization and cannot join the multicast group at this time. ACSU will not respond until the system status allows new nodes to join the multicast group. ACSU will respond to the node's request, and the node is in a busy waiting state before receiving a response from ACSU.

[0143] (6) The node joins the multicast group using the node instance number corresponding to its role;

[0144] In a distributed system, the five types of node roles, ACSU, CSU, service processing node, switching node, and interface node, correspond to five different multicast group node instance numbers. After receiving the ACSU response, the node to be approved adds the socket to the multicast group with the node instance number corresponding to its own role;

[0145] (7) Differentiate node types for message synchronization.

[0146] When each node is synchronizing information, it fills in the destination address of the multicast message according to the node instance number corresponding to the expected receiving end role type. Only nodes that join the multicast group with this node instance number will receive this information, and other types of nodes will not receive this multicast message. Using the reliability of TIPC multicast messages, when the node information is synchronized successfully, the sending node will receive the function return value of successful sending; when one or more receiving nodes fail to receive, the sending end will receive the error code return value of the failed multicast message, which is convenient for the sending node to handle errors in a timely manner.

[0147] In some implementation scenarios, the information synchronization method of a distributed system provided in an embodiment of the present application can be applied to the synchronization of basic information between nodes in a distributed system, such as node attributes, node priority, LPU interface status, etc. Each type of node can encapsulate its own information as a multicast message and send it to the ACSU and the corresponding type of nodes that care about their own information, avoiding broadcasting to unnecessary nodes and causing waste of resources.

[0148] In some implementation scenarios, the information synchronization method of a distributed system provided in an embodiment of the present application can be applied to configuration command synchronization in a distributed system. When ACSU performs configuration command synchronization for other nodes, the destination address of the reliable multicast is filled in with the node instance number corresponding to the node role type according to the node type to which the command applies, to prevent nodes that do not care about this type of command from receiving the command, resulting in configuration failure or abnormality. At the same time, the reliability of multicast group messages can ensure strict consistency of configuration between nodes of the same type, promptly discover nodes with synchronization abnormalities, and help to handle them in a timely manner.

[0149] In some implementation scenarios, the information synchronization method of the distributed system provided in the embodiments of the present application can be used to support the joining and exiting of nodes in the distributed system. When a node finds that its own software is abnormal, or ACSU finds that the software of this node is running abnormally and notifies this node to exit the multicast group, the node will exit and no longer receive messages in the multicast group. When this node is processed and the software is restored, it can reapply to join the multicast group, re-receive synchronization messages from other related types of nodes in the group, update the storage information of this node, and publish the information of this node to nodes that care about the information of this node.

[0150] In summary, the information synchronization method of the distributed system provided in the embodiment of the present application has at least the following beneficial effects:

[0151] 1) The present invention can synchronize information between nodes in a distributed system by distinguishing roles, with high reliability and bandwidth saving;

[0152] 2) Differentiating roles to synchronize configuration commands can improve the configuration success rate and the stability of system operation;

[0153] 3) Abnormal nodes can be isolated in time to prevent nodes with business processing errors caused by configuration errors from existing in the system for a long time;

[0154] 4) It can support the joining and exit of distributed system nodes to improve system flexibility.

[0155] Please attend Figure 5 , Figure 5 This is a structural block diagram of an information synchronization system of a distributed system provided in an embodiment of the present application. The information synchronization system of the distributed system includes:

[0156] An election module 100 is used to elect an ACSU in a distributed system and obtain a master control node, and the master control node is used to manage and control all nodes in the distributed system;

[0157] A creation module 200 is used to create a multicast group and an approval service on the master control node based on a transparent inter-process communication protocol. The multicast group is used for information synchronization between nodes, and the approval service is used to monitor a request for a node to join the multicast group.

[0158] A joining request module 300 is used to obtain joining request information of a node to be approved applying to join a multicast group;

[0159] The approval module 400 is used to approve the joining request information based on the approval service and obtain the node approval result;

[0160] The instance number module 500 is used for obtaining the node instance number information according to the node approval result if the node approval result is passed, and joining the multicast group according to the node instance number information, wherein the node instance number information corresponds to the node role type of the node to be approved;

[0161] The synchronization module 600 is used to perform message synchronization operations on each node in the multicast group according to the node instance number information.

[0162] Exemplarily, the election module 100 is specifically used for:

[0163] Acquire multiple candidate nodes according to the distributed system, wherein the candidate nodes have an external management interface capability;

[0164] Run the preset ACSU election service based on multiple candidate nodes to obtain multiple node name information;

[0165] Prioritize the nodes according to their name information to obtain a priority ranking result.

[0166] Obtain the master node based on the priority sorting results.

[0167] Exemplarily, the election module 100 is further configured to: shut down a preset ACSU election service based on a plurality of nodes to be elected.

[0168] Exemplarily, the approval module 400 is further used for:

[0169] Get the running status information of the distributed system;

[0170] Approve the joining request information according to the running status information approval service and obtain the node approval result.

[0171] Exemplarily, the instance number module 500 is specifically used for:

[0172] If the node approval result is passed, the node role information of the node to be approved is obtained, and the node role information includes one of a master control node, a channel service node, a business processing node, a switching node, and an interface node;

[0173] The node to be approved obtains the node instance number information according to the node approval result and the node role information, and joins the multicast group according to the node instance number information.

[0174] Exemplarily, the synchronization module 600 is specifically used for:

[0175] Obtain corresponding receiving node instance number information according to the node role type of the preset receiving end node;

[0176] Obtaining the destination address information of the multicast message according to the instance number information of the receiving node;

[0177] Message synchronization operations are performed on each node in the multicast group according to the destination address information of the multicast message.

[0178] Exemplarily, the information synchronization system of the distributed system further includes a judgment module, which is used to:

[0179] Determine whether the information synchronization of the preset receiving end node is successful;

[0180] If so, the function returns the value of successful sending to the sending node;

[0181] If not, the error code of the sending failure is returned to the sending node.

[0182] It should be noted that the information synchronization system of the distributed system provided in the embodiment of the present application is Figures 1 to 4 The method embodiments shown correspond to each other and will not be described again here to avoid repetition.

[0183] This application also provides an electronic device, see Figure 6 , Figure 6 A block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 510, a communication interface 520, a memory 530, and at least one communication bus 540. The communication bus 540 is used to realize direct connection and communication between these components. The communication interface 520 of the electronic device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 510 may be an integrated circuit chip with signal processing capabilities.

[0184] The processor 510 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 510 can also be any conventional processor, etc.

[0185] The memory 530 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 530 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 510, the electronic device can execute the above-mentioned Figures 1 to 4 The method embodiment involves various steps.

[0186] Optionally, the electronic device may further include a storage controller and an input / output unit.

[0187] The memory 530, storage controller, processor 510, peripheral interface, input and output unit components are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses 540. The processor 510 is used to execute executable modules stored in the memory 530, such as software function modules or computer programs included in the electronic device.

[0188] The input and output unit is used to provide users with the task creation and to create a start optional time period or preset execution time for the task to realize the interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.

[0189] Understandably, Figure 6 The structure shown is for illustration only, and the electronic device may also include Figure 6 More or fewer components as shown, or with Figure 6 Different configurations shown. Figure 6 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0190] An embodiment of the present application further provides a storage medium having instructions stored thereon. When the instructions are run on a computer, the computer program is executed by a processor to implement the method described in the method embodiment. To avoid repetition, the method will not be described here.

[0191] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the method embodiment.

[0192] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0193] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0194] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0195] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0196] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0197] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A distributed system information synchronization method, characterized in that: include: Conducting ACSU election in a distributed system and obtaining a master control node, the master control node is used to manage and control all nodes in the distributed system, wherein the ACSU is the node that currently provides a management interface to the outside and performs business processing, and is responsible for managing and controlling the nodes in the distributed system; Creating a multicast group and an approval service on the master control node based on a transparent inter-process communication protocol, wherein the multicast group is used for information synchronization between nodes, and the approval service is used for monitoring a request for a node to join the multicast group; Obtaining the joining request information of the node to be approved to join the multicast group; Approving the joining request information based on the approval service to obtain a node approval result; If the node approval result is passed, the node to be approved obtains node instance number information according to the node approval result, and joins the multicast group according to the node instance number information, where the node instance number information corresponds to the node role type of the node to be approved; A message synchronization operation of each node in the multicast group is performed according to the node instance number information.

2. The information synchronization method of a distributed system according to claim 1, characterized in that: The steps of performing ACSU election in a distributed system and obtaining a master control node include: Acquire a plurality of candidate nodes according to the distributed system, wherein the candidate nodes have an external management interface capability; Running a preset ACSU election service based on the multiple nodes to be elected to obtain multiple node name information; Prioritize the nodes according to their name information to obtain a priority ranking result. The master control node is obtained according to the priority sorting result.

3. The information synchronization method of a distributed system according to claim 2, characterized in that: After the step of obtaining the master control node according to the priority sorting result, the method further includes: The preset ACSU election service is closed based on the multiple nodes to be elected.

4. The information synchronization method of a distributed system according to claim 1, characterized in that: The step of approving the joining request information based on the approval service and obtaining the node approval result includes: Obtaining operating status information of the distributed system; The approval service approves the joining request information according to the running status information to obtain a node approval result.

5. The information synchronization method of a distributed system according to claim 1, characterized in that: If the node approval result is passed, the node to be approved obtains the node instance number information according to the node approval result, and joins the multicast group according to the node instance number information, including: If the node approval result is passed, obtaining the node role information of the node to be approved, wherein the node role information includes one of a master control node, a channel service node, a business processing node, a switching node, and an interface node; The node to be approved obtains node instance number information according to the node approval result and the node role information, and joins the multicast group according to the node instance number information.

6. The information synchronization method of a distributed system according to claim 5, characterized in that: The step of performing message synchronization operations on each node in the multicast group according to the node instance number information includes: Obtain corresponding receiving node instance number information according to the node role type of the preset receiving end node; Obtaining the destination address information of the multicast message according to the receiving node instance number information; A message synchronization operation of each node in the multicast group is performed according to the multicast message destination address information.

7. The information synchronization method of a distributed system according to claim 6, characterized in that: After the step of performing message synchronization operation on each node in the multicast group according to the multicast message destination address information, the method further includes: Determining whether the information synchronization of the preset receiving end node is successful; If so, the function returns the value of successful sending to the sending node; If not, the error code of the sending failure is returned to the sending node.

8. An information synchronization system for a distributed system, characterized in that: include: An election module, used to perform ACSU election in a distributed system and obtain a master control node, wherein the master control node is used to manage and control all nodes in the distributed system; A creation module, used to create a multicast group and an approval service on the master control node based on a transparent inter-process communication protocol, wherein the multicast group is used for information synchronization between nodes, and the approval service is used to monitor a request for a node to join the multicast group; A joining request module, used to obtain joining request information of a node to be approved applying to join the multicast group; An approval module, used to approve the joining request information based on the approval service and obtain a node approval result; An instance number module, for obtaining node instance number information according to the node approval result if the node approval result is passed, and joining the multicast group according to the node instance number information, wherein the node instance number information corresponds to the node role type of the node to be approved; A synchronization module is used to perform message synchronization operations on each node in the multicast group according to the node instance number information.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the information synchronization method of a distributed system as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the information synchronization method of a distributed system as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multiple-node hot standby method of metadata service nodes in cloud storage service

    CN104765661A

  • Cloud desktop system, cloud terminal, and method of applying to join multicast group

    CN106227490A