CN117539649A - Identification management method, equipment and readable storage medium of distributed cluster - Google Patents

Identification management method, equipment and readable storage medium of distributed cluster Download PDF

Info

Publication number
CN117539649A
CN117539649A CN202410034040.1A CN202410034040A CN117539649A CN 117539649 A CN117539649 A CN 117539649A CN 202410034040 A CN202410034040 A CN 202410034040A CN 117539649 A CN117539649 A CN 117539649A
Authority
CN
China
Prior art keywords
node
registration request
information
current
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410034040.1A
Other languages
Chinese (zh)
Inventor
曹继权
李冲海
郑长威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Yuzhong Network Technology Co ltd
Original Assignee
Guangzhou Yuzhong Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Yuzhong Network Technology Co ltd filed Critical Guangzhou Yuzhong Network Technology Co ltd
Priority to CN202410034040.1A priority Critical patent/CN117539649A/en
Publication of CN117539649A publication Critical patent/CN117539649A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, equipment and a readable storage medium for managing identifications of distributed clusters, which relate to the field of electronic data processing, wherein the method comprises the following steps: when a registration request is received, comparing load counts among a current node, a front node corresponding to the current node and a rear node corresponding to the current node; if the load count of the current node is minimum, determining the node identification and the neighbor node information of the node to be registered corresponding to the registration request; packaging response information based on the node identification and the neighbor node information; the response information is sent to the node corresponding to the registration request based on the preset socket chain, so that the technical problem that an operation and maintenance engineer needs to manually configure a new node when unique identification is repeated in the related technology, so that the capacity expansion cost is high is effectively solved, and the technical effect of automatically configuring the node in the automatic capacity expansion or capacity contraction process of the cluster or the service node is realized.

Description

Identification management method, equipment and readable storage medium of distributed cluster
Technical Field
The present invention relates to the field of electronic data processing, and in particular, to a method, an apparatus, and a readable storage medium for managing a distributed cluster identifier.
Background
In software systems, in order to distinguish between large amounts of data and messages, a globally unique value, i.e. ID (Identity document, identification) is typically used for identification.
In the related art, a distributed ID generation method based on a snowflake algorithm is generally adopted because the snowflake algorithm uses a binary number of 64 bits to represent the generated ID, wherein 1 bit is an unused sign bit, 41 bits are millisecond-level time stamps, 10 bits are machine IDs, 12 bits are serial numbers, and 12-bit serial numbers are used to represent different IDs generated within the same millisecond, and 4096 unique IDs can be generated every millisecond on the same machine.
Under the conditions of high concurrency, node offline and the like, when the distributed system nodes receive more than 4096 ID generation requests, ID repetition can be caused, and the accuracy of system operation is affected. At this time, an operation and maintenance engineer needs to manually configure each new node or update information such as machine codes and serial numbers of existing nodes, so that the cost of labor for expanding the system and the time cost are excessive.
Disclosure of Invention
The embodiment of the application solves the technical problem that an operation and maintenance engineer is required to manually configure a new node when unique identifiers are repeated in the related technology by providing the identifier management method, the device and the readable storage medium of the distributed cluster, so that the expansion cost is high, and the technical effect of automatically configuring the nodes in the automatic expansion or contraction process of the cluster or the service node is realized.
The embodiment of the application provides an identification management method of a distributed cluster, which comprises the following steps:
when a registration request is received, comparing load counts among a current node, a front node corresponding to the current node and a rear node corresponding to the current node;
if the load count of the current node is minimum, determining the node identification and the neighbor node information of the node to be registered corresponding to the registration request;
packaging response information based on the node identification and the neighbor node information;
and sending the response information to the node corresponding to the registration request based on a preset socket chain.
Optionally, before the step of comparing the load counts between the current node and the front node and the rear node corresponding to the current node when the registration request is received, the method includes:
generating a temporary machine code, a temporary serial number and a load count when a node registration instruction is received;
generating node confirmation information based on a preset rule;
and initiating the registration request to a node corresponding to an example node address stored in a preset configuration table based on the temporary machine code, the temporary serial number, the load count and the node confirmation information.
Optionally, after the step of comparing the load counts between the current node and the front node and the rear node corresponding to the current node when the registration request is received, the method includes:
determining the current node, and the node with the minimum load count between the current node and the front node and the rear node corresponding to the current node as an executing node, wherein the executing node is the node executing the registration request;
and sending the registration request to the executing node.
Optionally, the step of determining the node identifier and the neighbor node information of the node to be registered corresponding to the registration request includes:
obtaining cache data corresponding to the current node;
calculating a machine code and a serial number based on the cached data, and determining the node identification based on the machine code and the serial number;
and determining the neighbor node information based on the load count of each node associated in the cache data.
Optionally, the step of calculating a machine code and a serial number based on the cached data, and determining the node identifier based on the machine code and the serial number includes:
acquiring a system nanosecond time stamp, and calculating a first field corresponding to the system nanosecond time stamp;
Calculating the machine code and the serial number based on the cache data, wherein the machine code is used as a second field, and the serial number is used as a third field;
determining a fourth field based on the initialization array and the initialization offset;
and splicing the first field, the second field, the third field and the fourth field based on a preset sequence to generate the node identification.
Optionally, the step of determining the fourth field based on the initialization array and the initialization offset includes:
initializing an offset and an array of a preset length;
extracting a target value from the array based on a preset rule, wherein the index of the target value is equal to the offset;
based on the average value between the target value and the preset value and the result of the offset after the preset calculation rule, encoding to obtain a target character, and updating the offset;
the fourth field is determined based on the target character when the number of target characters is equal to a number threshold.
Optionally, after the step of sending the response information to the node corresponding to the registration request based on the preset socket chain, the method includes:
The corresponding response header is checked according to the received response information based on the registration request;
if the verification is passed, updating the front node and the rear node of the current node based on the adjacent node information corresponding to the response information;
and updating the machine code and the serial number of the current node based on the node identification corresponding to the response information.
Optionally, after the step of updating the machine code and the serial number of the current node based on the node identifier corresponding to the response information, the method includes:
generating node broadcast information based on the node address, the load count, the priority, the system time stamp, the machine code, the serial number and the working state of the adjacent node corresponding to the current node;
broadcasting the node broadcast information to a cluster network based on a preset time interval.
In addition, the application also provides a distributed cluster identification management device, which comprises a memory, a processor and a distributed cluster identification management program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the distributed cluster identification management method when executing the distributed cluster identification management program.
In addition, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores an identification management program of the distributed cluster, and the identification management program of the distributed cluster realizes the steps of the identification management method of the distributed cluster when being executed by a processor.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
because the load counting among the current node, the front node corresponding to the current node and the rear node is compared when the registration request is received; if the load count of the current node is minimum, determining the node identification and the neighbor node information of the node to be registered corresponding to the registration request; packaging response information based on the node identification and the neighbor node information; the response information is sent to the node corresponding to the registration request based on the preset socket chain, so that the technical problem that an operation and maintenance engineer needs to manually configure a new node when unique identification is repeated in the related technology, so that the capacity expansion cost is high is effectively solved, and the technical effect of automatically configuring the node in the automatic capacity expansion or capacity contraction process of the cluster or the service node is realized.
Drawings
Fig. 1 is a schematic flow chart of a first embodiment of an identification management method of a distributed cluster in the present application;
fig. 2 is a schematic flow chart of steps S321-S324 in a third embodiment of a method for managing a distributed cluster in the present application;
fig. 3 is a schematic flow chart of steps S3231-S3234 in a third embodiment of a method for managing identification of a distributed cluster in the present application;
fig. 4 is a schematic diagram of determining node identifiers in a third embodiment of an identifier management method of a distributed cluster in the present application;
fig. 5 is a schematic diagram of a hardware structure involved in an embodiment of an identifier management device of a distributed cluster in the present application.
Detailed Description
In the related art, in a software system, in order to distinguish a large amount of data and messages, a globally unique value is generally used for identification. After the functions of the software system are continuously expanded and users are continuously increased, the software system is usually adjusted to be a distributed clustering architecture in order to enhance the characteristics of high concurrency, easy expansion and the like. After the distributed addition cluster architecture is adopted, the generation of the distributed ID is generated. One common approach in the industry today is based on snowflake algorithm derived distributed ID generation. The algorithm is roughly that a distributed ID is calculated according to three values of the current system time stamp, the current machine code and the serial number. Typically, 4096 IDs can be generated per millisecond. However, in the case of high concurrency, node down, etc., a certain distributed system node receives more than 4096 ID generation requests, and thus the possibility of ID duplication may be caused. In the existing calculation, to cope with sudden system pressure, the cluster is generally evaluated in advance, the capacity of the cluster is expanded in advance, and more nodes are added to average the pressure of all resources. However, in the process of capacity expansion or contraction, an operation and maintenance engineer is usually required to manually configure each new node or update the information such as the machine code and serial number of the existing node. The operation flow of the operation and maintenance engineer is additionally increased, and the repeated and complicated operation flow is easy for the operation and maintenance engineer to error or ignore the important operations. Also making it impossible to better use automated capacity expansion or contraction management in larger scale clusters. The main technical scheme adopted by the embodiment of the application is as follows: when the current node receives a registration request initiated by a node to be registered, load counts of a front node and a rear node of the current node are determined. And the node with the smallest load count is used as the node for executing the registration request, the node to be registered is registered, and the node to be registered is sent back through the socket chain based on response information, so that the registration is completed. Therefore, the capacity of automatically configuring the nodes in the automatic capacity expansion or capacity contraction process of the cluster or the service node is realized. Therefore, the operation of development engineers and operation and maintenance engineers is reduced, and the overall utilization rate of service resources is improved.
In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example 1
An embodiment of the application discloses a method for managing identifiers of distributed clusters, and referring to fig. 1, the method includes:
and step S110, comparing the load count between the current node and the front node and the back node corresponding to the current node when the registration request is received.
In this embodiment, the registration request is a request broadcast to the other nodes for registration at the other nodes, and the successful registration at any node is regarded as the completion of registration in the node cluster. The current node is the node that received the registration request. In the cluster network, at least one node can receive a registration request sent by a node to be registered, and the node receiving the registration request is the current node in the embodiment.
As an alternative implementation manner, a neighboring node corresponding to the current node is determined based on the cluster network, and the neighboring node includes a front node and a rear node of the current node. The number of the front nodes is at least one, and the number of the rear nodes is also at least one. When the current node receives a registration request sent by a node to be registered, determining adjacent nodes according to information stored in a cache of the current node, namely determining a front node and a rear node; and then, acquiring load counts corresponding to the front node, the rear node and the current node respectively. The load count is a quantized value of the current load of the node, and may be the number of the rest nodes connected with the node, or a numerical value calculated by the current load condition of the node.
Optionally, after step S110, the method includes:
step S111, determining the current node and the node with the smallest load count between the current node and the corresponding front node and the corresponding back node, as an executing node, where the executing node is the node executing the registration request;
step S112, sending the registration request to the executing node.
In this embodiment, after load counts of a current node and three nodes corresponding to a front node and a rear node are determined, the values of the load counts of the three nodes are compared, and a node with the smallest value of the load counts is determined as an executing node. If the current node is not the executing node, the current node sends a registration request to the executing node. If the current node is the executing node, S112 is not executed.
Step S120, if the load count of the current node is the smallest, determining the node identifier and the neighbor node information of the node to be registered corresponding to the registration request.
In this embodiment, the node corresponding to the registration request is the node to be registered, and the node identifier is a unique identifier of the node and may be a combination of a machine code and a serial number. The neighbor node information is related information of neighbor nodes of the node to be registered.
As an alternative embodiment, the execution node of the registration request is determined based on the load count, that is, the node with the smallest load count among the current node, the previous node, and the next node is used as the execution node of the registration request. If the load count of the current node is minimum, determining the current node to process the registration request of the node to be registered, and determining the node corresponding to the registration request, namely the node identification of the node to be registered and the node information of the adjacent nodes of the node to be registered.
When the current node processes the registration request, the node to be registered does not have a standard node identifier at the moment, the node identifier of the node to be registered needs to be calculated by the current node according to a preset algorithm, and the neighbor node information of the node to be registered is determined according to the residual resources in the current cluster network.
In this embodiment, since the node to be registered does not have a node identifier, when broadcasting a registration request, in order to connect with other nodes through sockets, the node identifier is randomly generated according to a random generation algorithm and filled into the registration request, so as to ensure the content of the message body and the completeness of the structure.
In this embodiment, if the load count of the current node is not the smallest, the registration request is executed according to the node with the smallest load count as the execution node of the registration request.
As an alternative embodiment, after determining the execution node, the node is also the current node in this execution flow, and loops around step S110 to determine the final execution node.
As another alternative embodiment, after determining the execution node, the execution node does not loop through step S110, and directly executes the registration request. This is because the node to be registered may send registration requests to a plurality of nodes, in order to avoid the nodes in the line requesting circulation, resulting in a reduction in request processing efficiency.
And step S130, packaging the node identification and the adjacent node information into response information.
In this embodiment, the response information is information about a registration request returned by the current node to the node to be registered, so that the node to be registered completes registration in the clustered network based on the response information after receiving the response information.
As an alternative implementation manner, after the current node determines the node identifier and the neighbor node information of the node to be registered, the node identifier, the neighbor node information and the related information of the current node, such as the node identifier, the load count and the like of the current node, are packaged into response information.
And step S140, the response information is sent to the node corresponding to the registration request based on a preset socket chain.
In this embodiment, after the response information is generated, the response information corresponding to the registration request is returned to the node to be registered according to the socket chain when the registration request is received, so that the node to be registered completes registration.
As an alternative embodiment, when a registration request is received, the current node and the load counts of the current node corresponding to the front node and the rear node are first obtained. The load count is a comprehensive evaluation value of indexes such as the task number, the CPU utilization rate, the memory utilization rate and the like of the current node. And comparing the load counts among the three, and finding out the node with the smallest load count as an execution node of the registration request. And determining the node identification and the neighbor node information of the node corresponding to the registration request. The node identification may be a unique identifier and the neighbor node information includes IP addresses and port numbers of the front and rear nodes. And according to the node identification and the adjacent node information, encapsulating the node identification and the adjacent node information into response information. The response information may include node identification, neighbor node information, and other additional registration information. And sending response information to the node corresponding to the registration request based on a preset socket chain. The socket chain may be a connection of a set of TCP or UDP sockets for communication between nodes. After receiving the response information, the node corresponding to the registration request analyzes the information to obtain the node identification and the neighbor node information. And updating a local node list according to the received node identification and the adjacent node information, and carrying out corresponding maintenance and adjustment, including adding new nodes, updating the adjacent node information and the like.
In this embodiment, after the node to be registered is started, an instance node address provided by the configuration table is tried to be connected, and if the instance node is a distributed ID instance, the node to be registered is registered in the target node, that is, the node corresponding to the registration request receiver. And registering the target node into the node to be registered to form a distributed cluster network which is active and standby. If the address of the unconfigured or configured instance node is consistent with the address of the node to be registered, the node searching capability is not triggered. After the new node is successfully registered, the new node is tried to be broadcasted to other registered nodes, and the whole distributed cluster network node is synchronously updated, so that a block-like chain structure is realized. After the node is successfully registered, the machine code and the serial number distributed by the adjacent node are received and used for initializing the working state of the node. The machine code and sequence number may change after the node is deregistered and re-registered.
For example, after the current node receives the registration request, the current node load count is compared with the load technology of the neighboring node, the neighboring node includes a front node and a rear node, and if the current node load count is higher than the neighboring node, and in order to avoid excessive distribution, the difference is generally higher than 16 counts, the registration request is distributed to the neighboring node to respond. And if the load count of the current node is smaller than that of the adjacent node, responding by the current node. In particular, in response, a special header is sent for node acknowledgement when the node to be registered uses a socket to connect to the current node. After the current node receives the header information, the header information structure is checked whether to meet the standard, and if not, the current socket connection is terminated. If the standard is met, 2 bytes are read from the 2 nd bit of the header information and are recorded into a cache as the machine code of the node to be registered, wherein the 0 th bit and the 1 st bit are initial marks; reading 2 bytes from the 4 th bit of the head information, and recording the 2 bytes as a serial number of the node to be registered in a cache; and reading 2 bytes from the 6 th bit of the head information, and recording the 2 bytes as the load count of the node to be registered in the cache. After the machine code, the serial number and the load count of the node to be registered are recorded in the cache, 2 nodes with the lowest load count are searched from the cache and used as the information of the front node and the rear node of the node to be registered. And packaging the message into response information, and returning to the current socket connection. After the node to be registered receives the response information of the current node, the response header information of the current node is confirmed, namely the judging structure is consistent with the request header information, and if the judging structure does not accord with the standard, the current socket connection is stopped. If the information meets the standard, analyzing a response body returned by the current node, recording the machine code, the serial number and the load count of the current node into a cache, taking the information of the front node and the back node in the response body as the adjacent nodes of the node to be registered, and recording the information into the cache.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
because the load counting among the current node, the front node corresponding to the current node and the rear node is compared when the registration request is received; if the load count of the current node is minimum, determining the node identification and the neighbor node information of the node to be registered corresponding to the registration request; packaging response information based on the node identification and the neighbor node information; the response information is sent to the node corresponding to the registration request based on the preset socket chain, so that the technical problem that an operation and maintenance engineer needs to manually configure a new node when unique identification is repeated in the related technology, so that the capacity expansion cost is high is effectively solved, and the technical effect of automatically configuring the node in the automatic capacity expansion or capacity contraction process of the cluster or the service node is realized.
Based on the first embodiment, a second embodiment of the present application provides a method for managing a distributed cluster identifier, before step S110, including:
step S210, when a node registration instruction is received, a temporary machine code, a temporary serial number, and a load count are generated.
In this embodiment, the current node is not a specific type of node, but an executing node of a request or an instruction is regarded as the current node as an executing body of the request or the instruction.
As an alternative implementation manner, when the current node receives the node registration instruction, since the node identifier, that is, the machine code and the serial number, are not present, the temporary machine code and the temporary serial number are generated according to a preset format parameter according to a random generation algorithm. Since the node is not registered in the cluster network, there is no connected node, and thus the load count is determined to be 0 to ensure completeness of the registration request.
As another alternative embodiment, the load node is related to the load condition and processing capacity of the node itself in addition to the number of connected nodes, so that an initialization value of the load count is set according to the indexes such as the processor utilization, the memory size and the like of the node.
Step S220, generating node confirmation information based on a preset rule.
In this embodiment, the nodes are connected by using sockets, so that when the current node broadcasts a registration request, a specific header information is generated for node confirmation, that is, node confirmation information, based on a preset rule. Socket connection refers to a communication connection established between two applications in a computer network. Socket connection is achieved through the use of a socket, which is a software interface that allows applications to communicate over a network. When an application needs to communicate with a remote host, it creates a socket and binds it to the local IP address and port. The application may then send and receive data through the socket, send data from locally to the remote host, or receive data from the remote host.
Step S230, initiating the registration request to a node corresponding to the instance node address stored in the preset configuration table based on the temporary machine code, the temporary serial number, the load count and the node acknowledgement information.
In this embodiment, the preset configuration table stores node addresses of instance nodes recorded in the cluster network, where the instance nodes generally refer to specific nodes in the distributed cluster, that is, actually running single servers or computers in the cluster. Each instance node has its own unique identifier that can be used to distinguish between different nodes. These instance nodes may be distributed among different physical servers, virtual machines, or containers and work in concert with each other to provide cluster functionality and services. The instance nodes are responsible for bearing tasks and computation in the cluster, communicate and cooperate with each other through the Internet or an internal network, and jointly complete the operation and work of the distributed system.
As an optional implementation manner, based on the message structure corresponding to the socket, the registration request is encapsulated according to the temporary machine code, the temporary serial number, the load count and the node confirmation information, and the node confirmation information is taken as a request head; acquiring a preset configuration table corresponding to the cluster network, determining example nodes which can be connected with the current node according to the preset configuration table, determining node addresses of all example nodes, and sending a registration request to the example nodes in a socket connection mode based on the node addresses. That is, in this embodiment, the number of nodes that receive the registration request is at least one, and a plurality of nodes may receive the registration request.
Illustratively, a machine code and serial number are temporarily generated prior to registration of the node a. When the node A initiates registration, the node B calculates available machine codes and serial numbers in the current network based on the cached data and returns the machine codes and serial numbers through a registration response body. And after the A node analyzes the response body, updating the node machine code and the serial number, and broadcasting the latest node state to the network. When the a node is configured with a plurality of exploring nodes, when the a node registers, the response time of each node may be inconsistent due to the influence of the network link length or the network state. Therefore, when other nodes receive the registration information of the A node, available machine codes and serial numbers can be calculated for the A node at the same time. But node a only receives the information of the earliest responding node and closes the socket connection with the other nodes. Other nodes that are closed will not return results and wait for the broadcast of the latest state of node a.
Illustratively, a node registration instruction is received and a temporary machine code, a temporary sequence number, and a load count are generated. These temporary identifiers will be used to identify and authenticate the node. Generating node confirmation information based on preset rules. This information may include the configuration of the current node, IP address, port number, etc. And acquiring a preset configuration table, wherein the table comprises the storage instance node address and the corresponding node information. And initiating a registration request to an example node address in a preset configuration table according to the temporary machine code, the temporary serial number, the load count and the node confirmation information. And receiving the response of the instance node and processing. To complete node registration.
Because the temporary machine code, the temporary serial number and the load count are used, the node determining information is generated at the same time, the safety of communication between the nodes is ensured, and meanwhile, the integrity of a message structure is ensured.
Based on the first embodiment, a third embodiment of the present application provides an identifier management method of a distributed cluster, where step S120 includes:
step S310, obtaining the cache data corresponding to the current node.
In this embodiment, each node has corresponding cache data, in which node information of the remaining nodes in the cluster network is recorded, including, but not limited to, a machine code, a serial number, and a load count.
When the current node executes the registration request, calculating the node identification of the node to be registered according to the cache data associated with the current node, and determining the neighbor node of the node to be registered. Since there may be multiple nodes receiving and executing registration requests at the same time, there may be a difference in the cached data for each node, there may be a difference in the node identities calculated by the different nodes and the determined neighbor nodes. Therefore, the dynamic performance of the cluster network is further improved, and the uniqueness of the node identification is guaranteed.
Step S320, calculating a machine code and a serial number based on the cached data, and determining the node identifier based on the machine code and the serial number.
In this embodiment, based on the relevant data in the cache data, the machine code and the serial number of the node to be registered are calculated, and then the node identifier is constructed according to the determined machine code and serial number.
As an alternative implementation manner, according to the system nanosecond time stamp in the cache data and a preset calculation function, the node identifier is split into a plurality of characters of parts to be calculated respectively, wherein the machine code and the serial number are used as two parts. And then splicing according to the calculated characters of all parts to determine the node identification.
Because the system nanosecond time stamp is used, the node to be registered broadcasts the registration request to a plurality of nodes, and because the transmission path consumption is different, the time stamps of different nodes when receiving the registration request can be different, and the calculated node identifications can be different. The diversity of node identification of the nodes to be registered determined by different nodes is ensured. Meanwhile, because the nodes return different response message links to the nodes to be registered, the response messages arrive at the nodes to be registered successively, so that the nodes to be registered send registration requests at a certain moment, the received node identifications are quite likely to exist, and the node identification calculation method is combined, so that the order of magnitude of the selectable quantity of the node identifications is ensured, and meanwhile, the dynamic capacity expansion is realized.
Step S330, determining the neighbor node information based on the load count of each node associated in the cache data.
In this embodiment, the current node determines, according to the cache data, the load counts of the remaining nodes in the cluster network, and determines, according to the load counts of the remaining nodes and the load counts of the current node, the neighboring nodes of the node to be registered, including the front node and the rear node. And taking the node information of the adjacent node as the adjacent node information.
As an alternative implementation manner, according to the load counts of the nodes, determining 2 nodes with the lowest load counts as neighboring nodes of the node to be registered.
Optionally, referring to fig. 2, step S320 includes:
step S321, acquiring a system nanosecond time stamp, and calculating a first field corresponding to the system nanosecond time stamp.
In the present embodiment, the system nanosecond time stamp is a representation of time from a certain fixed origin. It represents the nanoseconds of a point in time from the start point. The fixed starting point may be a preset value or may be the initiation time of the registration request. I.e. the registration request is associated with a transmission time. But also the time of receipt of the registration request by the current node.
In this embodiment, the node identifier is formed by combining several fields, for example, a first field, a second field, a third field, and the like, and the number of fields is not limited. Nor does it limit the order of each field combination.
As an alternative implementation manner, determining a system nanosecond time stamp according to the sending time and/or the receiving time corresponding to the registration request as a time starting point; the system nanosecond time stamp is converted into a first field with a preset bit number based on a preset algorithm.
Step S322, calculating the machine code and the serial number based on the buffered data, and using the machine code as a second field and the serial number as a third field.
In this embodiment, the second field is determined based on the machine code of the current node or the rest of the nodes in the buffered data, and the third field is determined based on the serial number of the current node or the rest of the nodes in the buffered data.
As an alternative embodiment, the machine code of the current node in the cache data is used as the second field, and the serial number of the current node is used as the third field.
As another alternative implementation manner, the machine codes of the rest nodes in the cache data are obtained, two nodes with the lowest load technology are determined based on the current network resources corresponding to the cluster node network, and the machine codes are determined by summing according to the machine codes of the two nodes and the current node, wherein the machine codes are 16-ary and are used as the second field. Similarly, the serial numbers of the rest nodes in the cache data are obtained, two nodes with the lowest load technology are determined based on the current network resources corresponding to the cluster node network, and the serial numbers corresponding to the nodes to be registered are determined through summation according to the serial numbers of the two nodes and the current node, wherein the machine code is 16-ary and is used as a third field. The summation is based on characters corresponding to each position according to 16 scale, and the remainder of dividing the summation result by 16 is used as the character after summation.
In step S323, the fourth field is determined based on the initialization array and the initialization offset.
In this embodiment, the initialization array is an array of a predetermined length, and the value of the initialization offset is zero.
As an alternative implementation, a preset number of values are determined based on initializing the array, and each time a value is taken from the array, the offset is increased by 1 count until the offset is greater than or equal to the length of the array and is set to 0. And carrying out a preset operation when the number is fetched each time, and further determining a fourth field according to an operation result.
Step S324, splicing the first field, the second field, the third field and the fourth field according to a preset sequence, and generating the node identifier.
In this embodiment, the first field, the second field, the third field, and the fourth field are spliced according to a preset sequence, so as to generate the node identifier.
The first field is followed by a second field, the second field is followed by a third field, the third field is followed by a fourth field, and the node identifiers are sequentially spliced.
For example, a second field follows a first field, a third field follows a second field, a fourth field follows a third field, and the node identifiers are spliced in reverse order.
As an optional implementation manner of this embodiment, a system nanosecond time stamp is obtained, and a first field corresponding to the system nanosecond time stamp is calculated. The current system timestamp may be obtained using a system-provided timestamp function or library and intercepted, converted to a field of a desired format as needed. Based on the cached data and the current network resource, a machine code and a sequence number are calculated, and the machine code is used as a second field, and the sequence number is used as a third field. The machine code may be a unique identification generated based on factors such as the system, network environment, etc., such as a hash value of the gateway address or an identification generated based on a particular algorithm. The serial number may be a number or other ordered identification that is incrementally generated according to the order of each registration request. The fourth field is determined based on the initialization array and the initialization offset. The initialization array may be a fixed array set in advance for calculating the value of the fourth field. The initialization offset may be a fixed value that is added or otherwise manipulated with respect to the other fields in calculating the fourth field. And obtaining the value of the fourth field according to the specific definition and calculation rule of the initialization array and the offset. And splicing the first field, the second field, the third field and the fourth field based on a preset sequence to generate the node identification. Specific delimiters, connections or other rules may be selected to splice the fields into a complete node identifier, as desired.
Illustratively, a system nanosecond time stamp is obtained and a first field is determined based on the calculated time stamp. For example, the current timestamp is 1623936152991911, the first 5 bits may be taken as the first field: 16239. based on the cached data and the current network resource, a machine code and a sequence number are calculated, and the machine code is used as a second field, and the sequence number is used as a third field. For example, assuming that the calculated machine code is "ABCDEF", the serial number is 123, a second field is "ABCDEF", and a third field is 123 may be obtained.
And determining a fourth field according to a preset initialization array and an initialization offset. Assuming that the initialization array is [5, 3, 8, 2, 7, 4, 9, 1, 6, 0], the offset is 3, the fourth field can be determined to be the sum of the sizes of the second field and the third field plus the offset, i.e., 123+6+3=132. And splicing the first field, the second field, the third field and the fourth field based on a preset sequence to generate the node identification. For example, the first field, the second field, the third field, and the fourth field are concatenated to obtain a node identifier 16239ABCDEF123132.
Optionally, referring to fig. 3, step S323 includes:
in step S3231, an offset and an array of preset length are initialized.
In this embodiment, an array of a predetermined length is determined, and a predetermined number of values are determined according to the array. And initializing an offset, wherein the initial value of the offset is zero.
And step S3232, extracting a target value from the array based on a preset rule, wherein the index of the target value is equal to the offset.
In this embodiment, the target value is extracted from the array, where the index of the target value is equal to the offset. After each target value is taken out to determine the corresponding target character, the value of the offset is increased by one.
Step S3233, based on the average value between the target value and the preset value and the result of the offset after the preset calculation rule, the target character is obtained by encoding, and the offset is updated.
In this embodiment, for any one extraction process, based on the extracted target value, an average value of the target value and a preset value is calculated, then an intermediate quantity is determined after preset calculation based on the average value, a sum of the intermediate quantity and the offset is rounded, and then a remainder is calculated with a preset quantity corresponding to the array, so as to obtain a result after a preset calculation rule, then the result is encoded to obtain a target character, and meanwhile, the value of the offset is added by one.
Step S3234, determining the fourth field based on the target character when the number of the target characters is equal to a number threshold.
And when the number of the target characters is equal to the number threshold value, merging the obtained target characters into one character string, namely a fourth field.
As an alternative embodiment, an array of length preset is created. There are 32 values in the array, and one value is randomly extracted as a target value, or the target value is extracted from the created array according to a preset rule. The index of the target value is equal to the offset. An average value between the target value and the preset value is calculated. And adding the result of the offset after the preset calculation rule with the average value to obtain the target character obtained by encoding. And updating the offset to be the index of the target character obtained by encoding. And counting the number of the target characters obtained by encoding. If the number of target characters is equal to the number threshold, a fourth field is determined based on the target characters.
Illustratively, referring to FIG. 4, the strings are ordered by ASCII standard. The node identifier is integrally composed of 4 parts, wherein the first field is a system nanosecond time stamp, the first field is converted into a 10-bit ordered character string by a Base32 algorithm, the second field is a machine code, the third field is a serial number, the fourth field is a 14-bit random character, and the total number of the fourth field is 32-bit ordered character string. Wherein the Base32 algorithm coding basis consists of 32 ordered characters, namely ASCII code table value sizes, and corresponding characters in the character table are obtained by converting 10 system into 32 system through calculation. The current system time stamp is obtained through a system nanosecond time stamp obtaining function provided by a programming language and is converted into 10-bit ordered characters through a Base32 algorithm to serve as data of a first segment of node identification, wherein the system nanosecond time stamp can be a 19-bit integer. And obtaining the 16-system machine code from the cache data of the current node as the data of the second field. And obtaining the 16-system serial number from the node cache as data of a third field. In the node initialization phase, an unsigned 8-bit integer array of length 32 is initialized and 32 values are randomly generated. And initializing an offset, wherein each time a value is taken from the array, the offset is added with 1 count until the offset is greater than or equal to the length of the array and is set to 0. The value of the index equal to the offset is fetched from the array and recorded as the value a. The offset is added by 1 count, and the value a and 255 are averaged and then integrated with 32. I.e. the formula 32 x (a+255)/2, recorded as the value b. The value b is rounded and summed with the offset, recorded as the value c. The value c is calculated by summing the values of 32 and recorded as the value d. The value d is encoded by the Base32 algorithm and recorded as the value e. 14 values e1 to e14 are obtained according to the above procedure, and 14 characters are combined as data of the fourth field. And then splicing the first field, the second field, the third field and the fourth field into a 32-bit character string, namely the node identifier. Since the character code table is arranged according to the ASCII standard, the character strings can be ordered directly using a system or a programming language self-contained character string ordering algorithm.
Because the fields of the node identification are calculated according to the system-level nanosecond time stamp, the system-level nanosecond time stamp is associated with the registration request, so that the randomness and the security of the fields are improved, the order of possible results is ensured, the machine code and the serial number are determined based on the cache data, the machine code and the serial number can be obtained through the data calculation of a plurality of nodes, the last field is further provided with a random array and an offset, the node identification is formed together, and the machine code, the serial number and the node identification of the node to be registered are improved. While supporting high concurrency and easy expansion, 42 hundred million service nodes can be compatible, so that 42 hundred million service nodes can generate non-repeated IDs at the same time. The self-exploration capability, the node confirmation algorithm, the dynamic machine code and the serial number generation algorithm are combined, so that the capability of automatically configuring the nodes in the automatic capacity expansion or capacity contraction process of the cluster or the service node is met. Therefore, the operation of development engineers and operation and maintenance engineers is reduced, and the overall utilization rate of service resources is improved.
Based on the first embodiment, a fourth embodiment of the present application proposes a method for managing a distributed cluster, including, after step S140:
Step S410, checking the corresponding response header based on the received response information of the registration request.
In the present embodiment, a response header of the received response information is acquired. And checking the response head according to a preset rule, for example, checking whether the version number, the encryption algorithm, the signature and the like in the response head meet the requirements. If the verification is passed, continuing to execute the next step; if the verification is not passed, the subsequent steps are aborted and the situation of failure of the verification is handled.
Step S420, if the verification is passed, updating the front node and the rear node of the current node based on the neighbor node information corresponding to the response information.
In this embodiment, the information of the front node and the rear node of the current node is updated according to the neighbor node information in the response information. The neighbor node information is stored in a data structure, such as a linked list or a hash table, of the current node.
Step S430, updating the machine code and the serial number of the current node based on the node identifier corresponding to the response information.
In this embodiment, the machine code and serial number of the current node are updated according to the node identification information in the response information. The machine code may be obtained from the response information or may be generated according to a predetermined method. The serial number may be obtained from the response information or may be generated according to a predetermined method.
Optionally, after step S430, the method further includes:
step S440, generating node broadcast information based on the node address corresponding to the current node, the load count, the priority, the system time stamp, the machine code, the serial number, and the neighboring node working state.
In this embodiment, the node broadcast information is information of the current node broadcasting itself to the rest of the nodes in the clustered network. The working state of the adjacent node is the working state of the adjacent node of the current node, including the front node and the back node.
Step S450, broadcasting the node broadcasting information to the cluster network based on the preset time interval.
As an alternative embodiment, a data structure of node broadcast information, such as a JSON object or dictionary, is generated using the information of the node address, load count, priority, system time stamp, machine code, and serial number of the current node. And adding the working state of the neighbor node of the current node into the node broadcasting information. A preset time interval is set for controlling the broadcasting frequency of the information broadcast by the node. At the arrival of each time interval, the following broadcasting steps are performed: the node broadcast information is converted into a string or binary format for transmission to the clustered network. The node broadcast information is broadcast to all nodes in the clustered network using a network communication scheme. And receiving broadcast information of other nodes and performing corresponding processing.
Illustratively, after the node exploration capability is implemented, a single node has dynamic management and control capability of the entire distributed cluster network. Each node in the network can broadcast its own working state regularly, and when a certain node does not broadcast the working state within a certain time, for example, 120 seconds, the node can be logged off by other nodes until the node is reconnected to other nodes and is restored after re-registration. The broadcasted operating state information includes: node address, load count, priority, system time stamp, machine code, serial number, neighbor node operating status, etc.
In this embodiment, the current node serves as an execution body, and performs corresponding operations in each embodiment of the present application according to the received registration request, the node registration instruction, the response information, and the like.
Because the node broadcast information is generated based on the node address, the load count, the priority, the system time stamp, the machine code, the serial number and the working state of the adjacent node corresponding to the current node; broadcasting the node broadcast information to a cluster network based on a preset time interval. The cluster network can dynamically and adaptively manage unresponsive nodes, so that the cluster network is prevented from being bloated and negative nodes exist.
The application further provides a distributed cluster identifier management device, and referring to fig. 5, fig. 5 is a schematic structural diagram of a distributed cluster identifier management device of a hardware running environment according to an embodiment of the application.
As shown in fig. 5, the identification management device of the distributed cluster may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the identity management device of the distributed cluster, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Optionally, the memory 1005 is electrically connected to the processor 1001, and the processor 1001 may be configured to control operation of the memory 1005, and may also read data in the memory 1005 to implement identification management of the distributed clusters.
Optionally, as shown in fig. 5, an operating system, a data storage module, a network communication module, a user interface module, and an identification manager of the distributed cluster may be included in the memory 1005 as one storage medium.
Optionally, in the identifier management device of the distributed cluster shown in fig. 5, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the identifier management device of the distributed cluster may be provided in the identifier management device of the distributed cluster.
As shown in fig. 5, the identifier management device of the distributed cluster calls, through the processor 1001, the identifier management program of the distributed cluster stored in the memory 1005, and performs the related step operations of the identifier management method of the distributed cluster provided in the embodiment of the present application:
When a registration request is received, comparing load counts among a current node, a front node corresponding to the current node and a rear node corresponding to the current node;
if the load count of the current node is minimum, determining the node identification and the neighbor node information of the node to be registered corresponding to the registration request;
packaging response information based on the node identification and the neighbor node information;
and sending the response information to the node corresponding to the registration request based on a preset socket chain.
Optionally, the processor 1001 may call the identifier manager of the distributed cluster stored in the memory 1005, and further perform the following operations:
generating a temporary machine code, a temporary serial number and a load count when a node registration instruction is received;
generating node confirmation information based on a preset rule;
and initiating the registration request to a node corresponding to an example node address stored in a preset configuration table based on the temporary machine code, the temporary serial number, the load count and the node confirmation information.
Optionally, the processor 1001 may call the identifier manager of the distributed cluster stored in the memory 1005, and further perform the following operations:
Determining the current node, and the node with the minimum load count between the current node and the front node and the rear node corresponding to the current node as an executing node, wherein the executing node is the node executing the registration request;
and sending the registration request to the executing node.
Optionally, the processor 1001 may call the identifier manager of the distributed cluster stored in the memory 1005, and further perform the following operations:
obtaining cache data corresponding to the current node;
calculating a machine code and a serial number based on the cached data, and determining the node identification based on the machine code and the serial number;
and determining the neighbor node information based on the load count of each node associated in the cache data.
Optionally, the processor 1001 may call the identifier manager of the distributed cluster stored in the memory 1005, and further perform the following operations:
acquiring a system nanosecond time stamp, and calculating a first field corresponding to the system nanosecond time stamp;
calculating the machine code and the serial number based on the cache data, wherein the machine code is used as a second field, and the serial number is used as a third field;
Determining a fourth field based on the initialization array and the initialization offset;
and splicing the first field, the second field, the third field and the fourth field based on a preset sequence to generate the node identification.
Optionally, the processor 1001 may call the identifier manager of the distributed cluster stored in the memory 1005, and further perform the following operations:
initializing an offset and an array of a preset length;
extracting a target value from the array based on a preset rule, wherein the index of the target value is equal to the offset;
based on the average value between the target value and the preset value and the result of the offset after the preset calculation rule, encoding to obtain a target character, and updating the offset;
the fourth field is determined based on the target character when the number of target characters is equal to a number threshold.
Optionally, the processor 1001 may call the identifier manager of the distributed cluster stored in the memory 1005, and further perform the following operations:
the corresponding response header is checked according to the received response information based on the registration request;
if the verification is passed, updating the front node and the rear node of the current node based on the adjacent node information corresponding to the response information;
And updating the machine code and the serial number of the current node based on the node identification corresponding to the response information.
Optionally, the processor 1001 may call the identifier manager of the distributed cluster stored in the memory 1005, and further perform the following operations:
generating node broadcast information based on the node address, the load count, the priority, the system time stamp, the machine code, the serial number and the working state of the adjacent node corresponding to the current node;
broadcasting the node broadcast information to a cluster network based on a preset time interval.
In addition, the embodiment of the application further provides a computer readable storage medium, wherein the computer readable storage medium stores an identification management program of the distributed cluster, and the identification management program of the distributed cluster realizes the relevant steps of any embodiment of the identification management method of the distributed cluster when being executed by a processor.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. The identification management method of the distributed cluster is characterized by comprising the following steps of:
when a registration request is received, comparing load counts among a current node, a front node corresponding to the current node and a rear node corresponding to the current node;
if the load count of the current node is minimum, determining the node identification and the neighbor node information of the node to be registered corresponding to the registration request;
packaging response information based on the node identification and the neighbor node information;
And sending the response information to the node corresponding to the registration request based on a preset socket chain.
2. The method for managing the identifier of the distributed cluster according to claim 1, wherein the step of comparing the load counts between the current node and the front node and the rear node corresponding to the current node when the registration request is received, comprises:
generating a temporary machine code, a temporary serial number and a load count when a node registration instruction is received;
generating node confirmation information based on a preset rule;
and initiating the registration request to a node corresponding to an example node address stored in a preset configuration table based on the temporary machine code, the temporary serial number, the load count and the node confirmation information.
3. The method for managing the identifier of the distributed cluster according to claim 1, wherein after the step of comparing the load counts between the current node and the front node and the rear node corresponding to the current node when the registration request is received, the method comprises:
determining the current node, and the node with the minimum load count between the current node and the front node and the rear node corresponding to the current node as an executing node, wherein the executing node is the node executing the registration request;
And sending the registration request to the executing node.
4. The method for managing the identifier of the distributed cluster according to claim 1, wherein the step of determining the node identifier of the node to be registered and the neighbor node information corresponding to the registration request includes:
obtaining cache data corresponding to the current node;
calculating a machine code and a serial number based on the cached data, and determining the node identification based on the machine code and the serial number;
and determining the neighbor node information based on the load count of each node associated in the cache data.
5. The method of identity management of a distributed cluster of claim 4, wherein the steps of calculating a machine code and a serial number based on the cached data, and determining the node identity based on the machine code and the serial number comprise:
acquiring a system nanosecond time stamp, and calculating a first field corresponding to the system nanosecond time stamp;
calculating the machine code and the serial number based on the cache data, wherein the machine code is used as a second field, and the serial number is used as a third field;
determining a fourth field based on the initialization array and the initialization offset;
And splicing the first field, the second field, the third field and the fourth field based on a preset sequence to generate the node identification.
6. The method of claim 5, wherein the step of determining the fourth field based on the initialization array and the initialization offset comprises:
initializing an offset and an array of a preset length;
extracting a target value from the array based on a preset rule, wherein the index of the target value is equal to the offset;
based on the average value between the target value and the preset value and the result of the offset after the preset calculation rule, encoding to obtain a target character, and updating the offset;
the fourth field is determined based on the target character when the number of target characters is equal to a number threshold.
7. The method for managing the identifier of the distributed cluster according to claim 1, wherein after the step of sending the response information to the node corresponding to the registration request based on the preset socket chain, the method comprises:
the corresponding response header is checked according to the received response information based on the registration request;
If the verification is passed, updating the front node and the rear node of the current node based on the adjacent node information corresponding to the response information;
and updating the machine code and the serial number of the current node based on the node identification corresponding to the response information.
8. The method for managing the identifier of the distributed cluster according to claim 7, wherein after the step of updating the machine code and the serial number of the current node based on the node identifier corresponding to the response information, the method comprises:
generating node broadcast information based on the node address, the load count, the priority, the system time stamp, the machine code, the serial number and the working state of the adjacent node corresponding to the current node;
broadcasting the node broadcast information to a cluster network based on a preset time interval.
9. An identification management device for a distributed cluster, comprising a memory, a processor and an identification management program for a distributed cluster stored on the memory and executable on the processor, wherein the processor implements the steps of the identification management method for a distributed cluster according to any one of claims 1 to 8 when executing the identification management program for a distributed cluster.
10. A computer readable storage medium, wherein the computer readable storage medium has stored thereon an identification management program of a distributed cluster, which when executed by a processor, implements the steps of the identification management method of a distributed cluster according to any of claims 1 to 8.
CN202410034040.1A 2024-01-10 2024-01-10 Identification management method, equipment and readable storage medium of distributed cluster Pending CN117539649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410034040.1A CN117539649A (en) 2024-01-10 2024-01-10 Identification management method, equipment and readable storage medium of distributed cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410034040.1A CN117539649A (en) 2024-01-10 2024-01-10 Identification management method, equipment and readable storage medium of distributed cluster

Publications (1)

Publication Number Publication Date
CN117539649A true CN117539649A (en) 2024-02-09

Family

ID=89788495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410034040.1A Pending CN117539649A (en) 2024-01-10 2024-01-10 Identification management method, equipment and readable storage medium of distributed cluster

Country Status (1)

Country Link
CN (1) CN117539649A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753610A (en) * 2008-12-19 2010-06-23 华为技术有限公司 Distributed network structure method, device, system and task processing method
CN104410547A (en) * 2014-12-03 2015-03-11 合肥工大高科信息科技股份有限公司 Address conflict detection method for distributed control system
CN112256437A (en) * 2020-11-10 2021-01-22 网易(杭州)网络有限公司 Task distribution method and device
CN113015165A (en) * 2021-03-11 2021-06-22 青岛海信智能商用系统股份有限公司 Internet of things platform device access method, device and system
CN113449488A (en) * 2020-03-27 2021-09-28 北京京东拓先科技有限公司 Method and device for generating unique identifier

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753610A (en) * 2008-12-19 2010-06-23 华为技术有限公司 Distributed network structure method, device, system and task processing method
CN104410547A (en) * 2014-12-03 2015-03-11 合肥工大高科信息科技股份有限公司 Address conflict detection method for distributed control system
CN113449488A (en) * 2020-03-27 2021-09-28 北京京东拓先科技有限公司 Method and device for generating unique identifier
CN112256437A (en) * 2020-11-10 2021-01-22 网易(杭州)网络有限公司 Task distribution method and device
CN113015165A (en) * 2021-03-11 2021-06-22 青岛海信智能商用系统股份有限公司 Internet of things platform device access method, device and system

Similar Documents

Publication Publication Date Title
US11632441B2 (en) Methods, systems, and devices for electronic note identifier allocation and electronic note generation
CN110619114B (en) Serial number generation method and system
US10073916B2 (en) Method and system for facilitating terminal identifiers
CN108564164B (en) Parallel deep learning method based on SPARK platform
CN111885050B (en) Data storage method and device based on block chain network, related equipment and medium
CN110995513A (en) Data sending and receiving method in Internet of things system, Internet of things equipment and platform
US20230370285A1 (en) Block-chain-based data processing method, computer device, computer-readable storage medium
CN110930254A (en) Data processing method, device, terminal and medium based on block chain
CN109951551B (en) Container mirror image management system and method
CN107948005B (en) Internet of things protocol updating method and device
CN108063814B (en) Load balancing method and device
CN113268540A (en) Data synchronization method and device
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN117539649A (en) Identification management method, equipment and readable storage medium of distributed cluster
CN110888892A (en) Block synchronization method, device and storage medium
CN116595099A (en) Asynchronous processing method and device for high concurrency data
CN116821215A (en) OPC UA server searching method based on port inquiry
CN107563942B (en) Logistics data batch processing method, logistics processing system and processing device
CN114490073A (en) Electronic map operation and maintenance method, electronic map data using method and service system
CN112698932A (en) Industrial application program calling method and device, computer equipment and storage medium
CN111510484A (en) Block chain processing method, system, device, computer equipment and storage medium
CN111382200A (en) Information loading method and device, server and storage medium
CN104270444A (en) Method capable of being used for configuring mobile phone application menu
CN116720818B (en) Warehouse processing method, device and computer equipment based on block chain
CN113132233B (en) Data processing method, software defined network controller and data processing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination