Cluster configuration method and device, computer equipment, readable storage medium and program product

By layering the configuration items in the cluster configuration system and determining the target configuration value, the problem of low efficiency of large-scale cluster configuration is solved, and efficient and accurate cluster configuration is achieved.

CN120429035APending Publication Date: 2025-08-05KINGDEE DEEKING CLOUDCOMPUTING CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510534357.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

When the existing cluster configuration system handles large-scale clusters, the configuration items are centrally stored and flattened, resulting in low configuration efficiency.

Method used

By receiving the configuration information of the target cluster, determining its corresponding at least two configuration levels, obtaining the set of configuration items of the target configuration level from the configuration file, and determining the target configuration value of the same configuration item based on the preset coverage rules, and sending it to the target cluster for configuration.

Benefits of technology

Improve the comprehensiveness and efficiency of configuration management, reduce conflicts between the same configuration items in different configuration levels, and achieve the correct configuration of the target cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429035A_ABST
    Figure CN120429035A_ABST
Patent Text Reader

Abstract

The invention relates to a cluster configuration method and device, computer equipment, a readable storage medium and a program product. The method comprises the following steps: receiving configuration information corresponding to a target cluster; determining a configuration level corresponding to the configuration information in preset configuration levels; obtaining a target configuration item set corresponding to a target configuration hierarchy in the configuration hierarchies from the configuration file, and obtaining a target configuration item matched with the configuration information from the target configuration item set; if the same configuration item exists in the target configuration items corresponding to different configuration hierarchies, obtaining target configuration values of the same configuration item based on a preset coverage rule for different configuration values corresponding to the same configuration item in the different configuration hierarchies; and sending the target configuration item corresponding to each configuration level and the configuration value of the target configuration item to a target cluster, so that the target cluster is configured based on the target configuration item and the configuration value corresponding to the target configuration item. By adopting the method, the comprehensiveness and the configuration efficiency of configuration management of the product can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a cluster configuration method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of computer technology, SaaS (Software as a service) products have emerged as the times require. During the operation of large-scale SaaS products, large-scale clusters are usually required to support. To adapt to different business scenarios and load conditions, it is often necessary to configure each cluster.

[0003] However, when the current cluster configuration system processes the configuration of large-scale clusters, a large number of configuration items are stored centrally and flattened, resulting in low configuration efficiency. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide a cluster configuration method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the comprehensiveness and configuration efficiency of product configuration management.

[0005] In a first aspect, this application provides a cluster configuration method, including:

[0006] Receiving configuration information corresponding to a target cluster;

[0007] Determining at least two configuration levels corresponding to the configuration information;

[0008] Obtaining a set of target configuration items corresponding to a target configuration level in the configuration level from a configuration file, and obtaining a target configuration item matching the configuration information from the set of target configuration items;

[0009] If there are identical configuration items among the target configuration items corresponding to different configuration levels, for the different configuration values corresponding to the identical configuration items in different configuration levels, based on a preset override rule, determining a target configuration value for the identical configuration item;

[0010] Sending the target configuration items corresponding to each configuration level and the configuration values corresponding to the target configuration items to the target cluster, so that the target cluster is configured based on the target configuration items and the configuration values corresponding to the target configuration items.

[0011] In one embodiment, for the different configuration values corresponding to the identical configuration items in different configuration levels, based on a preset override rule, determining a target configuration value for the identical configuration item includes: determining different priorities corresponding to the different configuration levels where the identical configuration item is located; determining the configuration level with the highest priority among the different priorities, and determining the configuration value of the identical configuration item corresponding to the configuration level with the highest priority as the target configuration value.

[0012] In one embodiment, determining different priorities corresponding to different configuration levels where the same configuration item is located includes: obtaining the applicable scope corresponding to each configuration level in different configuration levels, and determining the priorities of each configuration level in different configuration levels based on the applicable scope corresponding to each configuration level.

[0013] In one embodiment, the preset configuration levels include a first type of level and a second type of level. The configuration items in the first type of level are used to configure a single cluster, and the configuration items in the second type of level are used to configure at least one cluster. Determining the configuration level corresponding to the configuration information includes: if the configuration information includes a configuration item and the configuration value corresponding to the configuration item, determining that the configuration level corresponding to the configuration information includes the first type of level; if the configuration information does not include a configuration item and the configuration value corresponding to the configuration item, determining that the configuration level corresponding to the configuration information is the second type of level.

[0014] In one embodiment, the second type of level includes a label level. Receiving the configuration information corresponding to the target cluster includes: receiving at least one label information corresponding to the target cluster;

[0015] Determining the configuration level corresponding to the configuration information includes: determining that the configuration level corresponding to the configuration information at least includes the label level;

[0016] Obtaining the set of target configuration items corresponding to the target configuration level in the configuration level from the configuration file, and obtaining the target configuration item matching the configuration information from the set of target configuration items includes: obtaining the set of target configuration items corresponding to the label level from the configuration file, and obtaining the target configuration item matching the label information from the set of target configuration items.

[0017] In one embodiment, receiving the configuration information corresponding to the target cluster includes: receiving at least one configuration item corresponding to the target cluster and the matching configuration value;

[0018] Determining the configuration level corresponding to the configuration information includes: determining that the configuration level corresponding to the configuration information includes the first type of level;

[0019] Before obtaining the set of target configuration items corresponding to the target configuration level in the configuration level from the configuration file, it further includes: storing the association relationship between at least one configuration item and the matching configuration value, at least one configuration item and the matching configuration value and the target cluster in the configuration file.

[0020] In a second aspect, the present application further provides a cluster configuration device, including:

[0021] A receiving module, configured to receive the configuration information corresponding to the target cluster;

[0022] A preprocessing module, configured to determine a configuration level corresponding to configuration information in a preset configuration level;

[0023] An acquisition module, configured to obtain a set of target configuration items corresponding to a target configuration level in the configuration level from a configuration file, and obtain a target configuration item matching the configuration information from the set of target configuration items;

[0024] An overriding module, configured to, if there are identical configuration items among the target configuration items corresponding to different configuration levels, obtain a target configuration value of an identical configuration item based on a preset overriding rule for different configuration values corresponding to the identical configuration item in different configuration levels;

[0025] A sending module, configured to send the target configuration items corresponding to each configuration level and the configuration values of the target configuration items to a target cluster, so that the target cluster performs configuration based on the target configuration items and the configuration values corresponding to the target configuration items.

[0026] In a third aspect, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0027] Receive configuration information corresponding to a target cluster;

[0028] Determine a configuration level corresponding to the configuration information in a preset configuration level;

[0029] Obtain a set of target configuration items corresponding to the target configuration level in the configuration level from a configuration file, and obtain a target configuration item matching the configuration information from the set of target configuration items;

[0030] If there are identical configuration items among the target configuration items corresponding to different configuration levels, obtain a target configuration value of an identical configuration item based on a preset overriding rule for different configuration values corresponding to the identical configuration item in different configuration levels;

[0031] Send the target configuration items corresponding to each configuration level and the configuration values of the target configuration items to a target cluster, so that the target cluster performs configuration based on the target configuration items and the configuration values corresponding to the target configuration items.

[0032] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0033] Receive configuration information corresponding to a target cluster;

[0034] Determine a configuration level corresponding to the configuration information in a preset configuration level;

[0035] Obtain the set of target configuration items corresponding to the target configuration level in the configuration hierarchy from the configuration file, and obtain the target configuration item that matches the configuration information from the set of target configuration items;

[0036] If there are identical configuration items among the target configuration items corresponding to different configuration levels, for the different configuration values corresponding to the identical configuration items in different configuration levels, obtain the target configuration value of the identical configuration item based on the preset override rule;

[0037] Send the target configuration items corresponding to each configuration level and the configuration values of the target configuration items to the target cluster, so that the target cluster performs configuration based on the target configuration items and the configuration values corresponding to the target configuration items.

[0038] In a fifth aspect, the present application also provides a computer program product, including a computer program, which when executed by a processor implements the following steps:

[0039] Receive the configuration information corresponding to the target cluster;

[0040] Determine the configuration level corresponding to the configuration information in the preset configuration hierarchy;

[0041] Obtain the set of target configuration items corresponding to the target configuration level in the configuration hierarchy from the configuration file, and obtain the target configuration item that matches the configuration information from the set of target configuration items;

[0042] If there are identical configuration items among the target configuration items corresponding to different configuration levels, for the different configuration values corresponding to the identical configuration items in different configuration levels, obtain the target configuration value of the identical configuration item based on the preset override rule;

[0043] Send the target configuration items corresponding to each configuration level and the configuration values of the target configuration items to the target cluster, so that the target cluster performs configuration based on the target configuration items and the configuration values corresponding to the target configuration items.

[0044] The above-mentioned cluster configuration method, device, computer equipment, computer-readable storage medium, and computer program product receive the configuration information corresponding to the target cluster, determine at least two configuration levels corresponding to the configuration information, obtain the set of target configuration items corresponding to the target configuration level in the configuration file from the configuration file, and obtain the target configuration items matching the configuration information from the set of target configuration items. In this way, the configuration information corresponding to the target cluster at each configuration level can be determined, and the configuration information can be managed hierarchically, which can not only improve the comprehensiveness of configuration management, but also facilitate the management of configuration diversity and personalized configuration. When determining the configuration value of the configuration item corresponding to the target cluster, if there are identical configuration items among the target configuration items corresponding to different configuration levels, for the different configuration values corresponding to the identical configuration items in different configuration items, based on the preset override rule, the target configuration value of the identical configuration item is obtained, and the target configuration items corresponding to each configuration level and the corresponding target configuration values are sent to the target cluster, so that the target cluster can be configured based on the target configuration items and the corresponding target configuration values. By determining the target configuration value of the target configuration item corresponding to the target cluster among multiple configuration values, the conflicts that may be caused by the different configuration values corresponding to the identical configuration items in different configuration levels are reduced, and the correct configuration of the target cluster is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0046] Figure 1 It is a diagram of the application environment of the cluster configuration method in an embodiment;

[0047] Figure 2 It is a flowchart of the cluster configuration method in an embodiment;

[0048] Figure 3 It is a flowchart of the steps for determining the target configuration value of the identical configuration item in an embodiment;

[0049] Figure 4 It is a diagram of the configuration file in an embodiment;

[0050] Figure 5 It is a structural diagram of the configuration system in an embodiment;

[0051] Figure 6 It is a diagram of the association relationship between the tag-level configuration item and the cluster in an embodiment;

[0052] Figure 7It is a structural block diagram of a cluster configuration device in an embodiment;

[0053] Figure 8 It is an internal structure diagram of a computer device in an embodiment. Specific implementation manners

[0054] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The cluster configuration method provided by the embodiments of the present application can be applied to, for example Figure 1 the application environment shown in the figure. Among them, the terminal 102 communicates with the server cluster 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the terminal 102, or placed in the cloud or other network servers. The data storage system can store the configuration files related to the configuration of the server cluster 104. The configuration files store the configuration items corresponding to each configuration level and their corresponding configuration values. For example, the configuration file stores 4 configuration levels, namely the A level, the B level, the C level and the D level. The A level includes the configuration item a and the configuration item b. The B level includes the configuration item a and the configuration item c. Among them, the configuration value of the configuration item a in the A level is 1. The configuration value of the configuration item a in the B level is 2. In this embodiment, each cluster corresponding to the SaaS product is configured based on a hierarchical configuration system. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, servers or other network-accessible devices. The server cluster 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0056] In an exemplary embodiment, as Figure 2 shown in the figure, a cluster configuration method is provided, and this method is described by taking the terminal 102 in Figure 1 as an example. Among them, configuration files are stored in the terminal, and the configuration files store the configuration items corresponding to each configuration level and the configuration values of the configuration items. The method includes the following steps S202 to step S210. Among them:

[0057] Step S202, receive the configuration information corresponding to the target cluster.

[0058] Among them, the configuration information is a set of specific parameters and setting values used to guide how the cluster is set up and run. The configuration information can be a direct set of specific parameters and setting values. For example, the configuration information is {A: a; B: b; C: c}, where A, B, and C represent configuration items, and a, b, and c represent the configuration values corresponding to each configuration item. The configuration information can also be indirect information used to indicate a set of specific parameters and setting values. For example, the indirect information can be a label. Labels D and E are stored in the configuration file. Among them, label D corresponds to configuration items d and e. Then the configuration information can be D. Therefore, receiving the configuration information corresponding to the target cluster can include: receiving the label corresponding to the target cluster.

[0059] When configuring the cluster, if the received configuration information is empty, the configuration corresponding to the target cluster can be the default configuration.

[0060] Step S204, determine the configuration level corresponding to the configuration information in the preset configuration level.

[0061] Among them, the configuration level is a hierarchical structure formed by classifying all configuration items.

[0062] In this embodiment, the level where the configuration item is located can be determined based on the applicable scope corresponding to the configuration item. If a certain configuration item is applicable to all clusters, the level where the configuration item is located is the first level. If a certain configuration item is applicable to some clusters, the level where the configuration item is located is the second level. If a certain configuration item is only applicable to a certain cluster, the level where the configuration item is located is the third level. Optionally, since the number of configuration items corresponding to each configuration level is relatively large, the configuration level can include sub-levels. After determining the level where the configuration item is located, the target sub-level of the configuration item in the configuration level can be determined based on the business attribute corresponding to the configuration item.

[0063] Exemplarily, after receiving the configuration information input by the user, at least two configuration levels corresponding to the configuration information can be determined based on the type of the configuration information. At least two configuration levels include the above-mentioned first level and second level. At this time, the configuration information is indirect information, such as a label. The second level includes at least one label. Each label associates at least one configuration item.

[0064] Optionally, in addition to the above-mentioned label, the configuration information can also include at least one configuration item and the corresponding configuration value. The configuration levels corresponding to the configuration information determined in this way include the above-mentioned first level, second level, and third level.

[0065] Step S206, obtain the set of target configuration items corresponding to the target configuration level in the configuration level from the configuration file, and obtain the target configuration item that matches the configuration information from the set of target configuration items.

[0066] Among them, the configuration file includes each configuration level, the configuration items corresponding to each configuration level, and the configuration values of each configuration item.

[0067] Exemplarily, if the configuration levels in the configuration file include the first level, the second level, and the third level. Since the second level and the third level are the levels where the configuration items corresponding to some clusters or a single cluster are located, there are multiple groups of configuration items in the second level, and each group of configuration items corresponds to the configuration of some clusters. There are multiple groups of configuration items in the third level, and each group of configuration items corresponds to the configuration of a single cluster.

[0068] Exemplarily, after determining the configuration level corresponding to the configuration information, obtain the set of target configuration items corresponding to the target configuration level in the configuration file. Among them, the target configuration level is the level that can be determined through indirect information. For example, it may include the above-mentioned first level and second level. Then, the target configuration item matching the configuration information can be obtained from the set of target configuration items. For example, multiple configuration items corresponding to tags are stored in the second level of the configuration level. For example, tag A corresponds to {configuration item a: configuration value a1; configuration item b: configuration value b1}, and tag B corresponds to {configuration item a: configuration value a2; configuration item b: configuration value b2}. When the user configures the target cluster, select tag A as the configuration information corresponding to the target cluster. Then, after the terminal determines that the configuration levels corresponding to the configuration information are the first level and the second level, the set of target configuration items corresponding to the target configuration level obtained from the configuration file is: {configuration item a: configuration value a1; configuration item b: configuration value b1}, {configuration item a: configuration value a2; configuration item b: configuration value b2}, and all configuration items corresponding to the first level. Since the configuration information corresponds to tag A, the finally obtained target configuration items matching the configuration information are {configuration item a: configuration value a1; configuration item b: configuration value b1}, all configuration items corresponding to the first level, and the matching configuration values.

[0069] It can be understood that if the configuration information is direct information, that is, at least one configuration item and the matching configuration value, the corresponding configuration level is the third level. At this time, the configuration file needs to be updated based on the configuration information. Exemplarily, updating the configuration file based on the configuration information includes: adding at least one configuration item and the matching configuration value to the set of configuration items corresponding to the third level in the configuration file, and associating at least one configuration item and the matching configuration value with the target cluster.

[0070] Step S208, if there are the same configuration items among the target configuration items corresponding to different configuration levels, for the different configuration values corresponding to the same configuration item in different configuration levels, obtain the target configuration value of the same configuration item based on the preset override rule.

[0071] There are the same configuration items at each configuration level, that is, configuration items with the same name but possibly different configuration values. And the configuration items corresponding to the target cluster may be spread across each configuration level, that is, there are configuration items corresponding to the target cluster at each configuration level. In this case, there may be the same configuration items in the target configuration items corresponding to different configuration levels. If all the configuration items determined from the configuration levels are directly sent to the target cluster, there may be a situation where there are multiple values for one configuration item, resulting in the target cluster being unable to determine which value to use for relevant configurations. Therefore, for the different configuration values corresponding to the same configuration item in different configuration levels, the target configuration value of this same configuration item can be obtained based on a preset override rule.

[0072] For example, the configuration items at the first level corresponding to the target cluster are: {configuration item a: configuration value a1; configuration item b: configuration value b1}, the configuration items at the second level corresponding to it are: {configuration item a: configuration value a2; configuration item b: configuration value b1}, and the configuration items at the third level corresponding to it are {configuration item a: configuration value a3; configuration item c: configuration value c3}. Based on the preset override rule, the target configuration value of configuration item a is a3, the target configuration item of configuration item b is b1, and the target configuration value of configuration item c is c3.

[0073] Step S210, send the target configuration items corresponding to each configuration level and the configuration values of the target configuration items to the target cluster, so that the target cluster can perform configurations based on the target configuration items and the configuration values corresponding to the target configuration items.

[0074] After determining the target configuration items and the configuration values of the target configuration items corresponding to the target cluster at each configuration level, send all the target configuration items and their respective corresponding configuration values to the target cluster, and the target cluster then performs relevant configurations on itself based on these target configuration items and the corresponding configuration values.

[0075] In the above cluster configuration method, by receiving the configuration information corresponding to the target cluster, at least two configuration levels corresponding to the configuration information are determined. The target configuration item set corresponding to the target configuration level in the configuration level is obtained from the configuration file, and the target configuration item matching the configuration information is obtained from the target configuration item set. In this way, the configuration information corresponding to the target cluster at each configuration level can be determined, and the configuration information can be managed hierarchically. This can not only improve the comprehensiveness of configuration management, but also facilitate the management of configuration diversity and personalized configuration. When determining the configuration value of the configuration item corresponding to the target cluster, if there are identical configuration items in the target configuration items corresponding to different configuration levels, for the different configuration values corresponding to the identical configuration items in different configuration items, based on the preset override rule, the target configuration value of the identical configuration item is obtained. The target configuration items corresponding to each configuration level and the corresponding target configuration values are sent to the target cluster, so that the target cluster can be configured based on the target configuration items and the corresponding target configuration values. By determining the target configuration value of the target configuration item corresponding to the target cluster among multiple configuration values, the conflict that may be caused by different configuration values corresponding to identical configuration items in different configuration levels is reduced, and the correct configuration of the target cluster is achieved.

[0076] In an exemplary embodiment, as Figure 3 shown, for the different configuration values corresponding to the identical configuration items in different configuration levels, based on the preset override rule, determining the target configuration value of the identical configuration item includes steps S302 to S304. Among them:

[0077] Step S302, determine the different priorities corresponding to the different configuration levels where each identical configuration item is located.

[0078] Step S304, determine the configuration level with the highest priority among the different priorities, and set the configuration value of the identical configuration item corresponding to the configuration level with the highest priority as the target configuration value.

[0079] Exemplarily, after obtaining the configuration items and the corresponding configuration values corresponding to the configuration information at each configuration level, if there are identical configuration items among these configuration items, the configuration values corresponding to these identical configuration items in different configuration levels may be different. In this case, if all the configuration items and configuration values corresponding to the configuration information are directly sent to the target cluster, for a certain configuration, the target cluster may receive multiple configuration values and cannot determine the final configuration value, which will affect the configuration efficiency of the target cluster. Therefore, before sending all the configuration items corresponding to the target cluster and the corresponding configuration values to the target cluster, the terminal can determine the target configuration value corresponding to the identical configuration item among the multiple configuration values corresponding to the identical configuration item.

[0080] Exemplarily, different priorities corresponding to different configuration levels of the same configuration item can be determined, the configuration level with the highest priority can be determined from the different priorities, and the configuration value of the same configuration item corresponding to the configuration level with the highest priority can be determined as the target configuration value.

[0081] It can be understood that, to reduce resource waste between the terminal and the target cluster, for the same configuration item in different configuration levels, after determining the target configuration value, one same configuration item and its corresponding target configuration value are retained in the target set sent to the target cluster.

[0082] For example, the configuration items at the first level corresponding to the target cluster are: {configuration item a: configuration value a1; configuration item b: configuration value b1}, the configuration items at the second level are: {configuration item a: configuration value a2; configuration item b: configuration value b1}, and the configuration items at the third level are {configuration item a: configuration value a3; configuration item c: configuration value c3}. The priority of the first level is lower than that of the second level, and the priority of the second level is lower than that of the third level. Therefore, for configuration item a, the different configuration levels it belongs to are the first level, the second level, and the third level, and the corresponding priority indices are 1, 2, and 3 respectively. The configuration level with the highest priority is determined to be the third level. Therefore, the configuration value of the same configuration item is determined to be a3. For configuration item b, the different configuration levels it belongs to are the first level and the second level, and the corresponding priority indices are 1 and 2 respectively. The configuration level with the highest priority is determined to be the second level. Therefore, the configuration value of the same configuration item is determined to be b1. Configuration item c is not the same configuration item in different configuration levels and is not processed. Therefore, the target set sent by the terminal to the target cluster is {configuration item a: configuration value a3; configuration item b: configuration value b1; configuration item c: configuration value c3}.

[0083] In this embodiment, by determining different priorities corresponding to different configuration levels where the same configuration item is located, determining the configuration level with the highest priority from the different priorities, and then using the configuration value of the same configuration item corresponding to the configuration level with the highest priority as the target configuration value of the same configuration item, the configuration items sent to the target cluster are obtained from multiple configuration levels, which can consider the comprehensiveness of the configuration. Based on the priorities of each configuration level, the same configuration items are merged and overwritten, which can consider the particularity of the configuration level with a higher priority, so as to achieve the effect of comprehensive and accurate configuration of the target cluster.

[0084] In some embodiments, the priority of the configuration levels can be determined based on the scope of application of the configuration items in the configuration levels. For example, a single configuration item and its configuration value in the first level are applicable to all clusters, a single configuration item and its configuration value in the second level are applicable to some clusters, and a single configuration item and its configuration value in the third level are applicable to a single cluster. The smaller the scope of application of the configuration item and its configuration value, the more the individuality and differences of the clusters to be considered. Therefore, the smaller the scope of application, the higher the priority of the configuration item and its configuration value. Thus, the priority of each configuration level can be determined based on the corresponding scope of application of the configuration level. Exemplarily, determining different priorities corresponding to different configuration levels where the same configuration item is located includes: obtaining the scope of application corresponding to each configuration level in different configuration levels, and determining the priority of each configuration level in different configuration levels based on the scope of application corresponding to each configuration level.

[0085] Among them, the scope of application corresponding to each configuration level can be determined based on the scope of application of a single configuration item and the configuration value of this configuration item within the configuration level. The larger the scope of application of a single configuration item and its configuration value, the lower the priority of the configuration level where this configuration item is located.

[0086] By classifying the configuration items associated with all clusters into multiple configuration levels, it is convenient to manage the configuration items hierarchically, and determine the priority of each configuration level through the scope of application corresponding to each configuration level. Thus, the particularity of some configuration items and their configuration values sent to the target cluster can be considered, and furthermore, the individuality of the target cluster and the differences between different target clusters can be considered, achieving a comprehensive and personalized configuration effect.

[0087] In some embodiments, the priority corresponding to each configuration level can also be preset by the user.

[0088] From the above, it can be seen that in the embodiments of the present application, all configuration items are archived to the matching configuration levels. By hierarchically managing the configuration items, the management efficiency of a large number of configuration items can be improved, and the configuration items that need to be configured for the cluster to be configured can be quickly located, improving the configuration efficiency. And through the hierarchical management structure, the configuration items are distributed for management. When configuring the cluster, the consistency of the cluster configuration can also be improved.

[0089] In this embodiment, the preset configuration levels include the first type of level and the second type of level. Each type of level includes multiple configuration items. There may be configuration items with the same name but different configuration values in the first type of level and the second type of level.

[0090] Exemplarily, each configuration item and the matching configuration value in the first type of hierarchy are used to configure a single cluster. For example, the first type of hierarchy may include the above-mentioned third hierarchy. The relationship between each configuration item and the matching configuration value and the associated cluster is stored in the first type of hierarchy. For example, the configuration items in the first type of hierarchy are divided into group A and group B. Among them, group A is associated with cluster A1, and group B is associated with cluster B1. Each configuration item in group A is used to be sent to cluster A1 to configure cluster A1. Each configuration item in group B is used to be sent to cluster B1 to configure cluster B1. Optionally, since a single cluster can store independent instances and data sets for each tenant, a single configuration item in the first type of hierarchy can also be used to configure a single tenant in a single cluster. That is to say, the first type of hierarchy may include the fourth hierarchy, and the fourth hierarchy is used to configure a single tenant. The configuration item information corresponding to each tenant is stored in the fourth hierarchy. The configuration item information includes at least one configuration item and the configuration value corresponding to the configuration item. The configuration item information of different tenants may be the same, different, or partially the same. Refer to Figure 4 the configuration file, Figure 4 tenant_a and tenant_b in it are different tenants, al_k1 is the configuration item to be configured for tenants tenant_a and tenant_b, and a1_va is the value of the configuration item al_k1 associated with tenant_a. It can be seen that the values of the configuration item al_k1 for tenants tenant_a and tenant_b are different.

[0091] Exemplarily, each configuration item and the matching configuration value in the second type of hierarchy are used to configure at least one cluster. For example, the second type of hierarchy may include the above-mentioned first hierarchy and second hierarchy. The configuration items in the first hierarchy can be applied to all clusters. The second hierarchy is used to associate some configuration items with some clusters. Multiple tags and the configuration item information associated with each tag may be included in the second hierarchy. Refer to Figure 4 , Figure 4 tag_ecology and tag_vip in it are different tags. The configuration item information associated with the tag_ecology tag is: {tl_k1:tl_v1; tl_k2:tl_v3}. When configuring a cluster, if the configuration information of the target cluster received is tag_ecology. Then it can be determined that the configuration items corresponding to the target cluster at this configuration level are {tl_k1:tl_v1; tl_k2:tl_v3}. A cluster can be associated with at least one tag. That is to say, a tag can be used to configure at least one cluster. When inputting the configuration information corresponding to the target cluster, it can be achieved by inputting a tag. In this way, the terminal can determine the configuration corresponding to the target cluster based on the configuration item information corresponding to the tag, so that the cluster can be configured quickly, thereby improving the configuration efficiency.

[0092] In some exemplary embodiments, the configuration file stores multiple configuration levels and all configuration item information corresponding to each configuration level. When determining the configuration level to which the configuration information corresponding to the target cluster belongs, it can be determined by judging whether the configuration information includes specific configuration items. If the configuration information includes specific configuration items and configuration values, it indicates a personalized configuration and belongs to the first type of level. If the configuration information does not include specific configuration items and configuration values, it indicates a general configuration and belongs to the second type of level.

[0093] In this embodiment, by constructing a multi-level configuration structure and dividing the configuration levels into a personalized first type of level and a general second type of level, it is possible to ensure the consistency and management efficiency of cluster configuration while also paying attention to the flexibility of configuration and the differences between clusters.

[0094] In some embodiments, the second type of level includes a label level. In this case, the user can input at least one label information corresponding to the target cluster to the terminal. After the terminal receives at least one label information corresponding to the target cluster, it can determine that the configuration level corresponding to the target cluster includes the label level. Then it can obtain the target configuration item set corresponding to the label level from the configuration file, and obtain the target configuration items that match the label information from the target configuration item set. Here, the target configuration item set refers to the set of all configuration items corresponding to the label level. The target configuration item set includes configuration items corresponding to multiple label information. For example, the A label corresponds to 10 configuration items, and the B label corresponds to 8 configuration items. These 18 configuration items together form the target configuration item set.

[0095] The configuration item information corresponding to each label can be preset in the configuration file. Therefore, when configuring the cluster, it is possible to simply input the label information to determine some configuration items corresponding to the target cluster.

[0096] In this embodiment, the clusters are divided into multiple groups by labels. When configuring a large-scale cluster, the number of clusters that need to be configured can be reduced, thereby improving the consistency of cluster configuration and ensuring the correct operation of the SaaS product.

[0097] In some embodiments, personalized configuration of the cluster is required. In this case, the user can input the configuration item information corresponding to the target cluster. At this time, the terminal receives the configuration item information corresponding to the target cluster. The configuration item information includes at least one configuration item and the matching configuration value. After analysis, the terminal determines that the configuration level corresponding to the configuration information includes the first type of level. Then, the terminal can write these configuration items and the corresponding configuration values into the configuration file and identify the association relationship between these configuration items and the corresponding configuration values and the target cluster. For example, Figure 4The configuration item information corresponding to the grouping ns-t51 in it is: gl_k3: gl_v3.

[0098] In this embodiment, by receiving the personalized configuration information of the target cluster and storing this personalized configuration information in the configuration file, the flexibility of the configuration can be improved. When the configuration information of the target cluster needs to be modified, only the corresponding personalized configuration information of the target cluster in the configuration file needs to be modified, which can facilitate the maintenance of the cluster configuration.

[0099] Exemplarily, the configuration file adopts structured text. When the configuration file is updated, the existing version is recorded, and changes are made based on the existing version, so that the configuration changes and records can be traced back.

[0100] In an exemplary embodiment, to implement the multi-level large-scale SaaS product configuration management, the configuration system is divided into four layers, namely global-level configuration, label-level configuration, grouping-level configuration, and tenant-level configuration (refer to Figure 5 ). Among them, the configuration items corresponding to the global-level configuration are valid globally. The configuration items corresponding to the label-level configuration are valid for the relevant clusters. The configuration items corresponding to the grouping-level configuration are valid for a single cluster. The configuration items corresponding to the tenant-level configuration are valid for a single tenant and are usually used for the management of feature switches.

[0101] The label-level configuration realizes the association relationship between some configuration items and some clusters. That is to say, a configuration item corresponds to a label, and a cluster also corresponds to at least one label (usually associated when creating a cluster or changing the configuration of a cluster). Thus, when the label of the configuration item and the label of the cluster match, all the configuration items corresponding to the label are applied to the corresponding cluster. For example, Figure 6 the configuration items and clusters of the same color in

[0102] Based on this configuration system, when a user wants to configure a cluster, the terminal receives the configuration information corresponding to the target cluster; determines the configuration level corresponding to the configuration information in the preset configuration levels; obtains the set of target configuration items corresponding to the target configuration level in the configuration level from the configuration file, and obtains the target configuration item that matches the configuration information from the set of target configuration items; if there are identical configuration items among the target configuration items corresponding to different configuration levels, determines the different priorities corresponding to the different configuration levels where the identical configuration items are located, determines the configuration level with the highest priority among the different priorities, and determines the configuration value of the identical configuration item corresponding to the configuration level with the highest priority as the target configuration value. In this way, the terminal can process the values of multiple identical configuration items sent to the target cluster based on the preset override rules, so that each configuration item in the set of configuration items finally sent to the target cluster corresponds to only one configuration value, to avoid the situation of configuration chaos in the target cluster. That is to say, when a configuration item appears in different levels or corresponds to different tags, it is necessary to determine the final configuration value of the configuration item based on the priority of the level or tag.

[0103] In this configuration system, the priority of the global-level configuration is lower than the priority of the tag-level configuration, the priority of the tag-level configuration is lower than the priority of the group-level configuration, and the priority of the group-level configuration is lower than the priority of the tenant-level configuration. And for the same configuration item, that is, the configuration item with the same name, it cannot belong to both the tag level and the global level at the same time. The preset override rules include: ① The group level overrides the tag level; ② The group level overrides the global level; ③ The group level overrides the group level; ④ The tag level overrides the tag level; ⑤ The global level overrides the global level; ⑥ The tenant level overrides other levels. The preset override rules also include: ① The tag level cannot override the group level; ② The tag level cannot override the global level; ③ The global level cannot override the group level; ④ The global level cannot override the tag level; ⑤ Other levels cannot override the tenant level.

[0104] In this embodiment, by constructing the above configuration system and configuring the cluster based on this configuration system, it can not only improve the configuration efficiency, but also facilitate the management of the general configuration and personalized configuration of the cluster, and the tag configuration divides both the cluster and the configuration items, which can improve the configuration consistency and reduce the occurrence of configuration delay and inconsistency caused by large-scale configuration.

[0105] It should be understood that although the steps in the flowcharts involved in the above embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear statement in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0106] Based on the same inventive concept, an embodiment of the present application also provides a cluster configuration device for implementing the above-mentioned cluster configuration method. The solution provided by this device to solve problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the cluster configuration device provided below can refer to the limitations on the cluster configuration method in the above text, and will not be repeated here.

[0107] In an exemplary embodiment, as Figure 7 shown, a cluster configuration device 700 is provided, including: a receiving module 701, a preprocessing module 702, an obtaining module 703, an overriding module 704, and a sending module 705, where:

[0108] The receiving module 701 is configured to receive configuration information corresponding to a target cluster;

[0109] The preprocessing module 702 is configured to determine the configuration level corresponding to the configuration information in a preset configuration level;

[0110] The obtaining module 703 is configured to obtain a set of target configuration items corresponding to the target configuration level in the configuration level from a configuration file, and obtain a target configuration item matching the configuration information from the set of target configuration items;

[0111] The overriding module 704 is configured to, if there are identical configuration items among the target configuration items corresponding to different configuration levels, for different configuration values corresponding to the identical configuration items in different configuration levels, obtain the target configuration value of the identical configuration item based on a preset overriding rule;

[0112] The sending module 705 is configured to send the target configuration items corresponding to each configuration level and the configuration values of the target configuration items to the target cluster, so that the target cluster is configured based on the target configuration items and the configuration values corresponding to the target configuration items.

[0113] In some embodiments, when determining the target configuration value of the same configuration item based on a preset overriding rule for different configuration values corresponding to the same configuration item in different configuration levels, the overriding module 704 is further configured to: determine different priorities corresponding to different configuration levels where the same configuration item is located; determine the configuration level with the highest priority among the different priorities, and determine the configuration value of the same configuration item corresponding to the configuration level with the highest priority as the target configuration value.

[0114] In some embodiments, when determining different priorities corresponding to different configuration levels where the same configuration item is located, the overriding module 704 is further configured to: obtain the applicable scope corresponding to each configuration level in different configuration levels, and determine the priority of each configuration level in different configuration levels based on the applicable scope corresponding to each configuration level.

[0115] In some embodiments, the preset configuration levels include a first type of level and a second type of level. The configuration items in the first type of level are used to configure a single cluster, and the configuration items in the second type of level are used to configure at least one cluster. When determining the configuration level corresponding to the configuration information, the preprocessing module 702 is further configured to: if the configuration information includes a configuration item and the configuration value corresponding to the configuration item, determine that the configuration level corresponding to the configuration information includes the first type of level; if the configuration information does not include a configuration item and the configuration value corresponding to the configuration item, determine that the configuration level corresponding to the configuration information is the second type of level.

[0116] In some embodiments, the second type of level includes a tag level. When receiving the configuration information corresponding to the target cluster, the receiving module 701 is configured to: receive at least one tag information corresponding to the target cluster; when determining the configuration level corresponding to the configuration information, the preprocessing module 702 is configured to: determine that the configuration level corresponding to the configuration information at least includes the tag level; when obtaining the set of target configuration items corresponding to the target configuration level in the configuration level from the configuration file and obtaining the target configuration item matching the configuration information from the set of target configuration items, the obtaining module 703 is further configured to: obtain the set of target configuration items corresponding to the tag level from the configuration file, and obtain the target configuration item matching the tag information from the set of target configuration items.

[0117] In some embodiments, when receiving the configuration information corresponding to the target cluster, the receiving module 701 is configured to: receive at least one configuration item and the matching configuration value corresponding to the target cluster; when determining the configuration level corresponding to the configuration information, the preprocessing module 702 is configured to: determine that the configuration level corresponding to the configuration information includes the first type of level; before obtaining the set of target configuration items corresponding to the target configuration level in the configuration level from the configuration file, the storage module is configured to: store the association relationship between at least one configuration item and the matching configuration value, at least one configuration item and the matching configuration value and the target cluster in the configuration file.

[0118] Each module in the above cluster configuration device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of the processor, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0119] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 8 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. The computer program, when executed by the processor, implements a cluster configuration method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.

[0120] Those skilled in the art can understand that Figure 8 the structure shown in

[0121] is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0122] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0123] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0124] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0125] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0126] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in this application.

[0127] The above embodiments only represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A cluster configuration method, characterized in that: The method comprises: Receive the configuration information corresponding to the target cluster; Determining a configuration level corresponding to the configuration information in a preset configuration level; Obtaining a target configuration item set corresponding to a target configuration level in the configuration level from a configuration file, and obtaining a target configuration item matching the configuration information from the target configuration item set; If the target configuration items corresponding to different configuration levels have the same configuration item, for different configuration values corresponding to the same configuration item in different configuration levels, obtain the target configuration value of the same configuration item based on a preset overwriting rule; The target configuration items corresponding to each of the configuration levels and the configuration values of the target configuration items are sent to the target cluster, so that the target cluster is configured based on the target configuration items and the configuration values corresponding to the target configuration items.

2. The method according to claim 1, characterized in that The step of obtaining, for different configuration values corresponding to the same configuration item in different configuration levels, a target configuration value of the same configuration item based on a preset overwriting rule includes: Determine different priorities corresponding to different configuration levels where the same configuration item is located; A configuration level with the highest priority among the different priorities is determined, and a configuration value of the same configuration item corresponding to the configuration level with the highest priority is determined as the target configuration value.

3. The method according to claim 2, characterized in that Determining different priorities corresponding to different configuration levels where the same configuration item is located includes: An applicable scope corresponding to each configuration level in the different configuration levels is obtained, and a priority of each configuration level in the different configuration levels is determined based on the applicable scope corresponding to each configuration level.

4. The method according to claim 1, wherein The preset configuration levels include a first level and a second level, wherein configuration items in the first level are used to configure a single cluster, and configuration items in the second level are used to configure at least one cluster, and determining the configuration level corresponding to the configuration information includes: If the configuration information includes a configuration item and a configuration value corresponding to the configuration item, determining that the configuration level corresponding to the configuration information includes the first type of level; If the configuration information does not include a configuration item and a configuration value corresponding to the configuration item, it is determined that the configuration level corresponding to the configuration information is the second level.

5. The method according to claim 4, characterized in that The second level includes a label level, and the received configuration information corresponding to the target cluster includes: Receive at least one tag information corresponding to the target cluster; Determining the configuration level corresponding to the configuration information includes: Determining that the configuration level corresponding to the configuration information includes at least the tag level; The acquiring, from the configuration file, a target configuration item set corresponding to the target configuration level in the configuration level, and acquiring, from the target configuration item set, a target configuration item matching the configuration information, includes: A target configuration item set corresponding to the tag level is obtained from the configuration file, and a target configuration item matching the tag information is obtained from the target configuration item set.

6. The method according to claim 4, characterized in that The receiving configuration information corresponding to the target cluster includes: Receive at least one configuration item and a matching configuration value corresponding to the target cluster; Determining the configuration level corresponding to the configuration information includes: Determining that the configuration level corresponding to the configuration information includes the first level; Before obtaining the target configuration item set corresponding to the target configuration level in the configuration level from the configuration file, the method further includes: The association relationship between the at least one configuration item and the matching configuration value, and the at least one configuration item and the matching configuration value and the target cluster is stored in the configuration file.

7. A cluster configuration device, characterized in that: The device comprises: A receiving module is used to receive the configuration information corresponding to the target cluster; A preprocessing module, configured to determine a configuration level corresponding to the configuration information in a preset configuration level; an acquisition module, configured to acquire, from a configuration file, a target configuration item set corresponding to a target configuration level in the configuration level, and acquire, from the target configuration item set, a target configuration item matching the configuration information; an overwriting module, configured to obtain, based on a preset overwriting rule, a target configuration value of the same configuration item for different configuration values corresponding to the same configuration item in different configuration levels if the same configuration item exists in the target configuration items corresponding to different configuration levels; The sending module is configured to send the target configuration items corresponding to each of the configuration levels and the configuration values of the target configuration items to the target cluster, so that the target cluster is configured based on the target configuration items and the configuration values corresponding to the target configuration items.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for deploying service based on cluster, storage medium and equipment

    CN114489720A

  • Configuration hierarchical management method, system and equipment based on configuration center and medium

    CN118069211A

  • Service process configuration management method and device, server and storage medium

    CN118819682A