Cluster scale-out method and apparatus, device, and storage medium

By obtaining and matching the configuration information of cluster nodes, resource migration is automatically performed, which solves the problems of complex expansion process and high error rate in the existing technology, and realizes an efficient and simplified cluster expansion process.

WO2024255302A1PCT designated stage expired Publication Date: 2024-12-19ZTE CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/077895
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-16
Filing Date
2024-02-21
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

The existing technology is complex in the expansion process of network management systems and bare metal cloud platforms, requiring high-tech manual operations, resulting in large resource migration, long-term and error-prone.

Method used

By obtaining configuration information of the target cluster and the source cluster, determining the matching relationship between nodes and migrating resources to achieve cluster expansion, the operation process is simplified and manual intervention is reduced.

Benefits of technology

The cluster automatic capacity expansion is realized, which reduces the difficulty and error rate of resource migration, improves operational efficiency and capacity expansion efficiency, and simplifies the modification of configuration parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077895_19122024_PF_FP_ABST
    Figure CN2024077895_19122024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of communications, and provides a cluster scale-out method and apparatus, a device, and a storage medium. The method comprises: acquiring, from plans of a target cluster, configuration information of the plans corresponding to target nodes, and extracting configuration information of source nodes from a source cluster to be scaled out; according to the configuration information of the source nodes and the configuration information of the plans corresponding to the target nodes, determining the target nodes matched with the corresponding configuration information of the source nodes, and obtaining the matching relationship between the source nodes and the target nodes; and perform resource migration on the source nodes according to the matching relationship, such that the source nodes are scaled out to be the matched target nodes. The method is used for reducing the complexity of cluster scale-out, improving scale-out efficiency, and implementing automatic cluster scale-out.
Need to check novelty before this filing date? Find Prior Art

Description

Cluster expansion method, device, equipment and storage medium Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular to a cluster expansion method, apparatus, device, and storage medium. Background Art

[0002] When network service personnel expand the network management system (and other systems based on the bare metal cloud platform), they need to refer to the resource configuration template used during deployment and manually configure the deployment parameters of the newly added nodes (including node labels, storage volumes, etc.) based on their experience. At the same time, they need to modify the deployment parameters of each existing node in the cluster one by one, and even manually migrate middleware services statically bound to the nodes to other nodes.

[0003] Summary of the Invention

[0004] The present disclosure provides a cluster expansion method, apparatus, device, and storage medium.

[0005] A first aspect of the present disclosure provides a cluster expansion method, comprising: obtaining, from a plan of a target cluster, configuration information corresponding to each target node in the target cluster, and extracting, from a source cluster to be expanded, configuration information of each source node in the source cluster; determining, based on the configuration information of each source node and the configuration information corresponding to the plan of each target node, a target node that matches the configuration information of each source node, and obtaining a matching relationship between each source node and the matching target node; and migrating resources for each source node based on the matching relationship, so that each source node is expanded to a matching target node.

[0006] A second aspect of the present disclosure provides a cluster expansion device, including: an acquisition module, which is configured to obtain configuration information corresponding to each target node in the target cluster from the plan of the target cluster, and extract the configuration information of each source node in the source cluster from the source cluster to be expanded; a determination module, which is configured to determine the target nodes that match the configuration information of each source node based on the configuration information of each source node and the configuration information corresponding to the plan of each target node, and obtain the matching relationship between each source node and the matching target node; and an expansion module, which is configured to migrate resources for each source node according to the matching relationship, so that each source node is expanded to a matching target node.

[0007] A third aspect of the present disclosure provides an electronic device, comprising: at least one processor; a memory on which one or more programs are stored, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the cluster expansion method according to the first aspect; and at least one I / O interface connected between the processor and the memory, configured to implement information interaction between the processor and the memory.

[0008] A fourth aspect of the present disclosure provides a computer-readable medium having a computer program stored thereon. When the computer program is executed by a processor, the cluster expansion method according to the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] FIG1 is a schematic diagram of an application scenario of a cluster expansion method provided by an embodiment of the present disclosure;

[0010] FIG2 is a schematic diagram of a flow chart of a cluster expansion method provided by an embodiment of the present disclosure;

[0011] FIG3 is a schematic diagram of a row-by-row search process provided by an embodiment of the present disclosure;

[0012] FIG4 is a schematic diagram of a global search process provided by an embodiment of the present disclosure;

[0013] FIG5 is a schematic diagram of a process for expanding a bare metal server cluster according to an embodiment of the present disclosure;

[0014] FIG6 is a schematic diagram of matching a source cluster and a target cluster provided by an embodiment of the present disclosure;

[0015] FIG7 is a schematic diagram of another matching method between a source cluster and a target cluster provided by an embodiment of the present disclosure;

[0016] FIG8 is a schematic structural diagram of a cluster expansion device provided by an embodiment of the present disclosure;

[0017] FIG9 is a schematic structural diagram of another cluster expansion device provided by an embodiment of the present disclosure;

[0018] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.

[0020] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0021] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0022] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not preclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

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

[0024] The existing method of scaling network management systems (and other bare metal cloud-based systems) is complex and requires manual intervention from network service personnel, which in turn requires a high level of technical expertise. Furthermore, manual selection is often suboptimal, leading to large amounts of resource migration during the scaling process, which is time-consuming and prone to errors.

[0025] The embodiments of the present disclosure provide a cluster expansion method, which can be applied to the expansion of a bare metal server cluster, and can also be applied to the expansion of a virtual machine cluster, etc.

[0026] A bare metal server (BMS) is a hardware device that combines the characteristics of a traditional physical server with the virtualization service capabilities of cloud computing technology. It is a product that combines the advantages of hardware and software. In essence, it is a server that combines cloud computing service functions and provides the performance of physical equipment.

[0027] FIG1 is a schematic diagram of an application scenario of a cluster expansion method provided by an embodiment of the present disclosure. The application scenario includes a control node 100 and a cluster 110, wherein the control node 100 includes one or more processors for implementing the cluster expansion method provided by the embodiment of the present disclosure when executing a computer program; a memory for storing one or more computer programs; and a communication interface that can be configured to receive and send data. The processor, memory, and communication interface can be connected via a bus or other means. The cluster 110 registers and manages one or more nodes, such as one or more bare metal servers. The configuration information of each node in the cluster 110 can be collected in a non-invasive manner and transmitted to the control node 100 for storage through network communication between the control node and the cluster. The cluster 110 can be managed by a cloud platform based on Kubernetes (such as Communication Platform as a Service (cPaaS), Platform as a Service (PaaS), and Precision Cloud Foundation PaaS (TECS Cloud Foundation PaaS, TCF PaaS).

[0028] FIG2 is a schematic flow chart of a cluster expansion method provided in an embodiment of the present disclosure. The cluster expansion method mainly includes steps 201 to 203 .

[0029] In step 201 , configuration information corresponding to each target node in the target cluster is obtained from the target cluster plan, and configuration information of each source node in the source cluster to be expanded is extracted from the source cluster to be expanded.

[0030] The source cluster can represent a cluster of all nodes (i.e., source nodes) currently included in a network management system (e.g., a wireless unified management expert (UME) network management system), such as cluster 110 shown in Figure 1. The target cluster can represent a desired cluster, where each node is referred to as a target node. The target cluster can be achieved by expanding the capacity of the source cluster.

[0031] The target cluster planning may be used to describe the specific configuration of the target cluster that is expected to be achieved. For example, the target cluster planning may include a configuration template of the target cluster, a resource description file of the target cluster, and the like.

[0032] Node configuration information can be described in a variety of ways, such as using different labels, roles, or descriptors to describe the node's hardware specifications, running services, and functions. Labels, roles, or descriptors can be a collection of short strings.

[0033] Exemplarily, the configuration information of each source node in the source cluster may be read from each source node of the original cluster through an interface provided by a cloud platform that manages the source cluster.

[0034] Exemplarily, obtaining the planned configuration information corresponding to each target node from the target cluster plan may include obtaining a configuration template for the target cluster, and obtaining the planned configuration information corresponding to each target node from the configuration template. The target cluster configuration template may be obtained through human-computer interaction, and the information in the configuration template may be pre-configured by a technician according to the format in the template.

[0035] In step 202, based on the configuration information of each source node and the configuration information planned corresponding to each target node, a target node matching the configuration information of each source node is determined, and a matching relationship between each source node and the matching target node is obtained.

[0036] In some embodiments, before determining the target node that matches the configuration information of each source node, the configuration information of each source node in the source cluster and the configuration information corresponding to the target node in the target cluster are sorted according to the agreed format, so that the format of the sorted configuration information of the source node is the same as the format of the configuration information corresponding to the target node, so as to facilitate the comparison of the configuration information of the source node and the configuration information corresponding to the target node. For example, based on the configuration information of each node in the source cluster, an assembly diagram of the source cluster is generated, and the expression format of the configuration information of each source node is agreed in the assembly diagram of the source cluster. For example, based on the configuration information corresponding to the target node in the target cluster, an assembly diagram of the target cluster is generated, and the expression format of the configuration information corresponding to the target node is agreed in the assembly diagram of the target cluster, and the expression format agreed upon by the assembly diagram of the source cluster and the assembly diagram of the target cluster is the same. The expression format of the assembly diagram of the source cluster and the assembly diagram of the target cluster is xls format, and can also be xlsx, json, xml, txt and other formats.

[0037] In some embodiments, based on the configuration information of each source node and the configuration information planned corresponding to each target node, a target node that matches the configuration information of each source node is determined, and a matching relationship between each source node and the matching target node is obtained, including: based on the configuration information of each source node and the configuration information planned corresponding to each target node, determining the similarity between each source node and each target node; using the target node with the highest similarity to each source node as the target node that matches each source node, and obtaining a matching relationship between each source node and the matching target node. Selecting the target node with the highest similarity to each source node as the target node that best matches each source node can optimize the adjustment of node labels during expansion and reduce resource migration during cluster expansion.

[0038] In some embodiments, to prevent two source nodes from matching to the same target node, the present disclosure resolves such conflicts by selecting an optimal node pair with the most similar configuration information. There are multiple solutions, including but not limited to the following two solutions:

[0039] Solution A uses a row-by-row search method to select the optimal node pair.

[0040] The target node with the highest similarity with each source node is used as the target node matching each source node, and a matching relationship between each source node and the matching target node is obtained, including: adding each target node to the target node list; traversing each source node, obtaining the maximum value of the similarity between the currently traversed source node and all the target nodes in the target node list during each traversal process, using the target node corresponding to the maximum value as the target node matching the configuration information of the currently traversed source node, establishing a matching relationship between the currently traversed source node and the matching target node, and deleting the target node corresponding to the maximum value from the target node list.

[0041] For example, in the first step, for a source node, the similarity between the source node and all nodes in the target node list is calculated. In the second step, the target node with the greatest similarity is found. This source node and the target node with the greatest similarity are designated as a matching node pair, meaning their configuration information is the most similar. This target node is then removed from the target node list. In the third step, all remaining source nodes are traversed sequentially, repeating steps 1 and 2.

[0042] Figure 3 is a schematic diagram of the row-by-row search process. In step S200, the similarity between the source node R1 and each target node in the target node list is obtained, and the target node D3 with the greatest similarity is obtained. The source node R1 and the target node D3 are determined to be the optimal node pair, and D3 is deleted from the target node list. In step S201, the similarity between the source node R2 and each target node in the target node list (other nodes except the target node D3) is obtained, and the target node D4 with the greatest similarity is obtained. The source node R2 and the target node D4 are determined to be the optimal node pair, and D4 is deleted from the target node list. In step S202, the similarity between the source node R3 and each target node in the target node list (other nodes except the target nodes D3 and D4) is obtained, and the target node D2 with the greatest similarity is obtained. The source node R3 and the target node D2 are paired as the optimal node pair, and D2 is deleted from the target node list. At this time, all source nodes are traversed and the process ends.

[0043] Solution B uses a global search method to select the optimal node pair.

[0044] The target node with the highest similarity to each source node is used as the target node matched with each source node, and a matching relationship between each source node and the matched target node is obtained, including: constructing a similarity matrix with each source node as a column and each target node as a row, the value of any element in the similarity matrix is ​​the similarity between the source node in the column where the value is located and the target node in the row where the value is located; in a matching process, extracting the maximum value from the similarity matrix, and using the target node in the row where the maximum value is located as the target node that matches the configuration information of the source node in the column where the maximum value is located (that is, the target node in the row where the maximum value is located and the source node in the column where the maximum value is located are determined as the optimal node pair), obtaining a matching relationship between the source node in the column where the maximum value is located and the matched target node, and deleting the row and column where the maximum value is located from the similarity matrix, and executing the matching process again until a target node that matches the configuration information of each source node is obtained.

[0045] For example, in the first step, the similarities between all source nodes and all target nodes are calculated. In the second step, the source node and target node corresponding to the current maximum similarity are found, set as a matching node pair, and the similarities in the row containing the source node and the column containing the target node of the optimal matching node pair are removed. In the third step, step 2 is repeated until all source nodes are matched.

[0046] Figure 4 shows a schematic diagram of the global search process. In step s300, the maximum similarity corresponds to the source node R2 and the target node D4, R2 and D4 are set as the optimal node pair, and the row where R2 is located and the column where D4 is located are deleted; in step s301, the maximum similarity corresponds to the source node R3 and the target node D2, R3 and D2 are set as the optimal node pair, and the row where R3 is located and the column where D2 is located are deleted; in step s302, the maximum similarity corresponds to the source node R1 and the target node D3, R1 and D3 are set as the optimal node pair, and the row where R1 is located and the column where D3 is located are deleted. At this time, all source nodes have been matched and the process ends.

[0047] It should be noted that the row-by-row search and global search methods provided by Solutions A and B are greedy methods, resulting in local optimal solutions that are close to the global optimal solution. Other methods can also be used to obtain optimal node pairs, such as the N-Queens method, which is a backtracking method and can achieve the global optimal solution. However, this method has a high time complexity and takes a very long time to calculate when there are many nodes. We will not elaborate on this here.

[0048] In some embodiments, the similarity between each source node and each target node is determined based on the configuration information of each source node and the configuration information planned corresponding to each target node, including: determining the similarity between each source node and each target node based on the tag set corresponding to each source node and the tag set corresponding to each target node. The tag set is used to describe the configuration information of the corresponding node. The similarity is proportional to the overlap, and the overlap is used to represent the degree of overlap between the tag set corresponding to each source node and the tag set corresponding to the target node. The tag set includes at least one tag.

[0049] For example, in a bare metal server cluster, each node may have different hardware specifications, run different services, and perform different functions. Nodes can be distinguished by their label sets. A node's label set includes at least one label, which can be a string. For example, a label is a key-value pair, with different labels using different strings. Different node parameters use different labels. The label set composed of these parameter labels can be used to describe the node's configuration information. For example, a node's hardware specifications may be labeled with one label, the services it runs may be labeled with another label, and the functions it performs may be labeled with another label. These three labels can be distinct from each other.

[0050] In some embodiments, the similarity between each source node and each target node is determined based on the tag set corresponding to each source node and the tag set corresponding to each target node. Various schemes may be used, including but not limited to the following similarity calculation schemes:

[0051] Solution 1, Jaccard similarity

[0052] The similarity between each source node and each target node is determined based on the label set corresponding to each source node and the label set corresponding to each target node, including: performing the following process for each source node and any group of source nodes and target nodes in each target node: obtaining the intersection of the label set corresponding to the source node and the label set corresponding to the target node, and the union of the label set corresponding to the source node and the label set corresponding to the target node; taking the ratio of the number of labels contained in the intersection to the number of labels contained in the union as the similarity between the source node and the target node.

[0053] For example, the Jaccard similarity calculation formula is used to calculate the similarity between a source node and a target node. L1 represents the label set of a source node, and L2 represents the label set of a target node. The Jaccard similarity sim is defined as the ratio of the number of labels in the intersection of L1 and L2 to the number of labels in the union. The calculation formula is formula (1): sim = |L1∩L2| / |L1∪L2| (1)

[0054] Solution 2, optimized Jaccard similarity

[0055] The similarity between each source node and each target node is determined based on the label set corresponding to each source node and the label set corresponding to each target node, including: performing the following process for each source node and any group of source nodes and target nodes in each source node and each target node: obtaining the intersection of the label set corresponding to the source node and the label set corresponding to the target node, and obtaining the union of the label set corresponding to the source node and the label set corresponding to the target node; when the intersection is empty, setting the similarity between the source node and the target node to a negative value; when the intersection is not empty, taking the square root of the number of labels contained in the union to obtain an intermediate value, and taking the ratio of the number of labels contained in the intersection to the intermediate value as the similarity between the source node and the target node.

[0056] For example, the Jaccard optimized similarity calculation formula increases the weight of the intersection relative to the Jaccard similarity and introduces negative values ​​to distinguish the case where the intersection is zero, which is more in line with the business scenario. Let L1 represent the source node label set and L2 represent the target node label set. The Jaccard optimized similarity calculation formula is formula (2):

[0057] Solution 3, cosine similarity

[0058] The similarity between each source node and each target node is determined based on a label set corresponding to each source node and a label set corresponding to each target node, including: merging and sorting the labels in the label set corresponding to all source nodes and the labels in the label set corresponding to all target nodes to obtain an ordered set; performing the following process for any group of source nodes and target nodes among each source node and each target node: obtaining the first number of occurrences of each label in the ordered set in the label set corresponding to the source node and the second number of occurrences in the label set corresponding to the target node; obtaining the product value of the first number and the second number corresponding to each label in the ordered set respectively, and accumulating the product values ​​corresponding to all labels in the ordered set as a first sum value; obtaining the square value of the first number corresponding to each label in the ordered set respectively, and summing the square values ​​of the first numbers corresponding to all labels in the ordered set to obtain a second sum value; obtaining the square value of the second number corresponding to each label in the ordered set respectively, and summing the square values ​​of the second numbers corresponding to all labels in the ordered set to obtain a third sum value, and taking the product value of the ratio of the first sum value to the second sum value and the third sum value as the similarity between the source node and the target node.

[0059] For example, the label sets of all source nodes and all target nodes are unioned and sorted to obtain an ordered set G; Ni represents the first number of times the i-th label in the ordered set G appears in the label set corresponding to the source node, Mi represents the second number of times the i-th label in the ordered set G appears in the combination of the labels corresponding to the target node, and n represents the number of labels in the ordered set. The cosine similarity calculation formula is formula (3):

[0060] in, is the first sum value, is the second sum, The third sum.

[0061] In step 203, resources are migrated for each source node according to the matching relationship, so that each source node is expanded to a matching target node.

[0062] In some embodiments, the cluster expansion method further includes: adding a new node in the source cluster according to the configuration information of the target node in the target cluster that does not match any source node, and configuring the new node to have the configuration information of the target node that does not match any source node.

[0063] In an exemplary embodiment, FIG5 is a schematic diagram of a process for expanding a bare metal server cluster, which mainly includes steps 501 to 509 .

[0064] In step 501, configuration information of a bare metal server source cluster is obtained. For example, configuration information of each node in the bare metal server source cluster may be obtained.

[0065] In step 502 , a source cluster assembly diagram is generated based on the configuration information of the bare metal server source cluster.

[0066] In step 503 , the resource description file of the target cluster is read to obtain configuration information of the target cluster, for example, configuration information planned corresponding to each node in the target cluster.

[0067] In step 504 , a target cluster assembly graph is generated according to the configuration information of the target cluster.

[0068] The execution order of steps 501 to 502 and steps 503 to 504 is not limited. Steps 501 to 502 can be executed first, and then steps 503 to 504, or steps 503 to 504 can be executed first, and then steps 501 to 502, or steps 503 to 504 can be executed in parallel while steps 501 to 502 are executed.

[0069] In step 505 , the similarity between the source node in the assembly graph of the source cluster and the target node in the assembly graph of the target cluster is calculated.

[0070] At step 506 , an optimal node pair matching the source node and the target node is determined based on the similarity.

[0071] In step 507, the matching results are output, including information about each optimal node pair and information about the source node and target node in each optimal node pair. The matching results can be saved in a file format such as json, xls, xlsx, xml, or txt.

[0072] In step 508 , a new node, such as a new server, is determined based on the unmatched target node, and the new node is included in the cluster management.

[0073] In step 509, the node labels of all nodes in the cluster are updated, that is, based on the matching result, the label set of the nodes in the cluster is updated according to the resource description file of the target cluster.

[0074] In an exemplary embodiment, FIG6 is a schematic diagram of the matching of the source cluster and the target cluster. In a UME network management system, the source cluster has 2 source nodes for computing and 1 source node for distributed database. It is now planned to expand the capacity of the system, and it is expected that the configuration template of the target cluster achieved by the expansion will have 2 target nodes for computing and 2 target nodes for distributed storage. The above method is used to expand the source cluster to the target cluster, that is, the configuration of one source node for computing in the source cluster remains unchanged, that is, the source node 1 for computing in the source cluster is directly used as the target node 1 for computing in the target cluster; another source node for computing in the source cluster is newly added with a middleware service (represented by a new label), that is, a new middleware service is added to the source node 2 for computing in the source cluster and the label set is modified to obtain the target node 2-1 for computing in the target cluster; the source node 1 for distributed database in the source cluster is directly used as the target node 1 for distributed storage in the target cluster. After operating using the cluster expansion method provided by the embodiment of the present disclosure, the original two source nodes for computing and one source node for a distributed database in the source cluster can be accurately matched with the two target nodes for computing and one target node for a distributed database in the desired target cluster, and the unmatched target node 2 for distributed storage in the target cluster is determined as a newly added node, and the newly added node is added to the source cluster according to the configuration information of the unmatched target node for a distributed database, thereby achieving expansion from the source cluster to the target cluster. In the process of expanding the source cluster to obtain the target cluster, only a slight adjustment of the source node 2 for computing and a new target node need to be added to complete the expansion.

[0075] In an exemplary embodiment, FIG7 is a schematic diagram of the matching of the source cluster and the target cluster. In a telecommunications cloud system, the source cluster has two source nodes for computing, and product A is deployed. It is now planned to expand the system and deploy product B, and it is hoped that the same set of templates will be used for the expansion and the new deployment. The target cluster expected to be achieved through expansion has three target nodes for computing, of which two target nodes are allocated to product A and the remaining one target node is allocated to product B. After operating using the cluster expansion method provided in the embodiment of the present disclosure, the two source nodes used by product A in the source cluster (i.e., source node 1 of product A and source node 2 of product A) can be accurately matched with the two target nodes used by product A in the target cluster, and target node 1 used by product B in the target cluster can be added to the source cluster as a newly added node. To expand from the source cluster to the target cluster, it is only necessary to add target node 1 of product B to complete the expansion.

[0076] In the embodiment of the present disclosure, based on the configuration information of each source node in the source cluster to be expanded and the configuration information corresponding to each target node in the plan of the target cluster, the target node that matches the configuration information of each source node is determined, and the matching relationship between the source node and the target node is obtained. According to the matching relationship, resources of the source node are migrated so that the source node is expanded to a matching target node, thereby realizing automatic cluster expansion without the need for network service personnel to manually modify the configuration parameters of each node in the source cluster. The operation method is simple and efficient, and the configuration information of the source node and the target node are optimally paired, which reduces the difficulty of resource migration during the expansion process, minimizes the amount of resource migration, improves the migration efficiency, and avoids the error rate caused by manual operation.

[0077] The cluster expansion method provided by the embodiment of the present disclosure can automatically identify new nodes and automatically generate configuration parameters for the new nodes, replacing the original manual identification and operation, improving operational efficiency, and reducing operational complexity. The source nodes in the current cluster are matched with the target nodes in the expansion template, so that the amount of resource migration during the expansion process is significantly less than manual allocation, improving the efficiency and reliability of the expansion. Moreover, the matching results are used to automatically update the parameter configuration of the source node, replacing the original manual identification and operation, improving operational efficiency, and reducing operational complexity. In addition, a quantitative method for measuring the degree of similarity between the source node and the target node before and after the expansion can also be provided to help users evaluate whether the expansion step is feasible.

[0078] The steps of the various methods above are divided only for clarity of description. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this disclosure. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of this disclosure.

[0079] The present disclosure provides a cluster expansion device. The specific implementation of the device can be found in the related description of the method embodiment and will not be repeated here. FIG8 shows a schematic diagram of the structure of the device, which mainly includes an acquisition module 801, a determination module 802 and an expansion module 803.

[0080] The acquisition module 801 is configured to acquire the configuration information corresponding to each target node in the target cluster from the target cluster plan, and to extract the configuration information of each source node in the source cluster from the source cluster to be expanded.

[0081] The determination module 802 is configured to determine the target nodes that match the configuration information of each source node based on the configuration information of each source node and the configuration information planned corresponding to each target node, and obtain the matching relationship between each source node and the matching target node.

[0082] The expansion module 803 is configured to perform resource migration on each source node according to the matching relationship, so as to expand each source node into a matching target node.

[0083] In an exemplary embodiment, FIG9 is a schematic structural diagram of a cluster expansion device, wherein the acquisition module 801 includes a query submodule 901 and a file input submodule 902 , and the determination module 802 includes a calculation submodule 903 , a selection submodule 904 and an output submodule 905 .

[0084] The query submodule 901 is used to query the configuration information of the source cluster (such as the configuration information of each node in the source cluster) through the network interface provided by the cloud platform, and generate the assembly diagram of the source cluster. The file input submodule 902 is used to parse the configuration template or resource description file used when deploying the target cluster, obtain the configuration information of the target cluster (such as the configuration information of each node in the target cluster), and generate the assembly diagram of the target cluster. The calculation submodule 903 is used to input the assembly diagram of the source cluster and the assembly diagram of the target cluster, and calculate the similarity between the original node and the target node based on the node label. The selection submodule 904 is used to determine the optimal matching node pair based on the similarity of the nodes. The output submodule 905 is used to output the matching results, including the information of all matching node pairs, and the information of the matching node pairs includes the configuration information of the source node with the most similar configuration information and the configuration information of the target node.

[0085] The functions or modules included in the apparatus provided in the embodiments of the present disclosure can be used to execute the method described in the method embodiments. The specific implementation and technical effects thereof can be referred to the description of the above method embodiments, and will not be repeated here for the sake of brevity.

[0086] It should be noted that all modules involved in this embodiment are logical modules. In actual applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovations of this disclosure, this embodiment does not include units that are not closely related to solving the technical problems proposed by this disclosure. However, this does not mean that other units do not exist in this embodiment.

[0087] 10 , an embodiment of the present disclosure provides an electronic device comprising

[0088] At least one processor 1001; a memory 1002 having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the above method; and at least one I / O interface 1003, connected between the processor and the memory, and configured to implement information exchange between the processor and the memory.

[0089] Processor 1001 is a device with data processing capabilities, including but not limited to a central processing unit (CPU). Memory 1002 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically, SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH). I / O interface (read / write interface) 1003 is connected between processor 1001 and memory 1002 to enable information exchange between processor 1001 and memory 1002, including but not limited to a data bus.

[0090] In some embodiments, the processor 1001 , the memory 1002 , and the I / O interface 1003 are connected to each other via a bus, and further connected to other components of the computing device.

[0091] This embodiment further provides a computer-readable medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in this embodiment is implemented. To avoid repeated description, the specific steps of the method are not repeated here.

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

[0093] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0094] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.

[0095] It is understood that the above embodiments are merely exemplary embodiments for illustrating the principles of the present disclosure, and the present disclosure is not limited thereto. Those skilled in the art may make various modifications and improvements without departing from the spirit and substance of the present disclosure, and such modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A cluster expansion method, comprising: Acquire the configuration information corresponding to each target node in the target cluster from the target cluster plan, and extract the configuration information of each source node in the source cluster from the source cluster to be expanded; According to the configuration information of each source node and the configuration information planned corresponding to each target node, a target node matching the configuration information of each source node is determined, and a matching relationship between each source node and the matching target node is obtained; as well as The resources of each source node are migrated according to the matching relationship, so that each source node is expanded to become the matching target node.

2. The cluster expansion method according to claim 1, wherein: The step of determining the target nodes matching the configuration information of each source node according to the configuration information of each source node and the configuration information planned corresponding to each target node, and obtaining the matching relationship between each source node and the matching target node includes: Determine the similarity between each source node and each target node according to the configuration information of each source node and the configuration information of each target node; The target node with the highest similarity to each source node is used as the target node matching each source node, and a matching relationship between each source node and the matching target node is obtained.

3. The cluster expansion method according to claim 2, wherein: The step of taking the target node with the highest similarity to each source node as the target node matched with each source node, and obtaining the matching relationship between each source node and the matched target node includes: Add each target node to the target node list; Traverse each source node, obtain the maximum value of the similarity between the current traversed source node and all the target nodes in the target node list in each traversal process, use the target node corresponding to the maximum value as the target node matching the configuration information of the current traversed source node, and establish the current traversed source node and the target node matching the configuration information of the current traversed source node. The matching relationship between the target nodes that match the configuration information of the source node is determined, and the target node corresponding to the maximum value is deleted from the target node list.

4. The cluster expansion method according to claim 2, wherein: The step of taking the target node with the highest similarity to each source node as the target node matched with each source node, and obtaining the matching relationship between each source node and the matched target node includes: A similarity matrix is ​​constructed with each source node as a column and each target node as a row, wherein the value of any element in the similarity matrix is ​​the similarity between the source node in the column where the value is located and the target node in the row where the value is located; In a matching process, the maximum value is extracted from the similarity matrix, and the target node in the row where the maximum value is located is used as the target node that matches the configuration information of the source node in the column where the maximum value is located, and the matching relationship between the source node in the column where the maximum value is located and the target node that matches the configuration information of the source node in the column where the maximum value is located is obtained, and the row and column where the maximum value is located are deleted from the similarity matrix, and the matching process is performed again until the target node that matches the configuration information of each source node is obtained.

5. The cluster expansion method according to claim 2, wherein: Determining the similarity between each source node and each target node according to the configuration information of each source node and the configuration information corresponding to each target node, includes: Determine the similarity between each source node and each target node according to the label set corresponding to each source node and the label set corresponding to each target node; The label set is used to describe the configuration information of the corresponding node, the similarity is proportional to the overlap, and the overlap is used to indicate the overlap between the label set corresponding to each source node and the label set corresponding to each target node, and The tag set includes at least one tag.

6. The cluster expansion method according to claim 5, wherein: The determining the similarity between each source node and each target node respectively according to the tag set corresponding to each source node and the tag set corresponding to each target node includes: For any set of source nodes and target nodes among each source node and each target node, execute The following process: Obtaining the intersection of the label set corresponding to the source node and the label set corresponding to the target node, and obtaining the union of the label set corresponding to the source node and the label set corresponding to the target node; The ratio of the number of labels included in the intersection to the number of labels included in the union is used as the similarity between the source node and the target node.

7. The cluster expansion method according to claim 5, wherein: The determining the similarity between each source node and each target node respectively according to the tag set corresponding to each source node and the tag set corresponding to each target node includes: For any set of source nodes and target nodes in each source node and each target node, the following process is performed: Obtaining the intersection of the label set corresponding to the source node and the label set corresponding to the target node, and obtaining the union of the label set corresponding to the source node and the label set corresponding to the target node; When the intersection is empty, the similarity between the source node and the target node is set to a negative value; When the intersection is not empty, the square root of the number of labels included in the union is obtained to obtain an intermediate value, and the ratio of the number of labels included in the intersection to the intermediate value is used as the similarity between the source node and the target node.

8. The cluster expansion method according to claim 5, wherein: The determining the similarity between each source node and each target node respectively according to the tag set corresponding to each source node and the tag set corresponding to each target node includes: Merge and sort the labels in the label set corresponding to all source nodes and the labels in the label set corresponding to all target nodes to obtain an ordered set; For any set of source nodes and target nodes in each source node and each target node, the following process is performed: Get the first number of each tag in the ordered set that appears in the tag set corresponding to the source node and the first number of each tag in the tag set corresponding to the target node. The second time; Obtaining the product value of the first number of times and the second number of times corresponding to each tag in the ordered set respectively, and accumulating the product values ​​corresponding to all tags in the ordered set as a first sum value; Obtaining the square value of the first order corresponding to each tag in the ordered set respectively, and summing the square values ​​of the first order corresponding to all tags in the ordered set to obtain a second sum value; Obtaining the square value of the second order corresponding to each tag in the ordered set respectively, and summing the square values ​​of the second order corresponding to all tags in the ordered set to obtain a third sum value; The product value of the ratio of the first sum value to the second sum value and the third sum value is used as the similarity between the source node and the target node.

9. The cluster expansion method according to claim 1, further comprising: A new node is added in the source cluster according to the configuration information of the target node in the target cluster that is not matched to any source node, and the new node is configured to have the configuration information of the target node that is not matched to any source node.

10. A cluster expansion device, comprising: An acquisition module, configured to acquire, from the planning of the target cluster, the configuration information of the planning corresponding to each target node in the target cluster, and to extract, from the source cluster to be expanded, the configuration information of each source node in the source cluster; A determination module is configured to determine the target nodes matching the configuration information of each source node according to the configuration information of each source node and the configuration information planned corresponding to each target node, and obtain a matching relationship between each source node and the matching target node; as well as The expansion module is configured to migrate resources for each source node according to the matching relationship, so as to expand each source node to the matching target node.

11. An electronic device, comprising: at least one processor; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the cluster expansion method according to any one of claims 1 to 9; as well as At least one I / O interface is connected between the processor and the memory and is configured to implement information interaction between the processor and the memory.

12. A computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the cluster expansion method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • MySQL cluster online capacity expansion method and device, equipment and storage medium

    CN113051252A

  • Capacity expansion method and device of storage cluster, electronic equipment and readable storage medium

    CN114020214A

  • Big data cluster resource dynamic adjustment method and device

    CN114490066A

  • Container dynamic scheduling method and device, computer equipment and storage medium

    CN114880100A

  • Cloud host migration method and device, electronic equipment and storage medium

    CN116208613A