Configuration management methods, devices and computer equipment

By using configuration separation technology, the unified configuration items of the microservice gateway are broken down into separate configuration files for each microservice, which solves the problem of configuration management of the microservice gateway in the microservice architecture and enables fine-grained management and synchronous updates of each microservice.

CN119996182BActive Publication Date: 2025-12-02CHINA SOUTHERN POWER GRID COMPANY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510137728.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-12-02
Estimated Expiration
2045-02-07

AI Technical Summary

Technical Problem

In a microservice architecture, the microservice gateway needs to handle a large number of complex configuration parameters and is difficult to adjust in a timely manner to keep up with changes in microservices, resulting in extremely difficult configuration management.

Method used

By using configuration separation technology, the unified configuration items of the microservice gateway are broken down into separate configuration files for each microservice. Based on different configuration requirements, separate configuration files or databases corresponding to each microservice are generated to achieve fine-grained management.

Benefits of technology

It enables flexible adaptation to the unique configuration requirements of different microservices, and provides fine-grained management and control over each microservice, ensuring that the system keeps pace with business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996182B_ABST
    Figure CN119996182B_ABST
Patent Text Reader

Abstract

This application relates to the field of microservices technology, and in particular to a configuration management method, apparatus, and computer device. The method includes: upon receiving a configuration update request initiated by a target user for a target microservice, and determining that the update configuration item carried in the configuration update request is a unified configuration item for the target microservice in a microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice; the separate configuration files for the target microservice are updated according to the update configuration information in the update configuration item; and the updated separate configuration files corresponding to the target microservice are sent to the microservice gateway to instruct the microservice gateway to apply the updated separate configuration files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of microservices technology, and in particular to a configuration management method, apparatus, and computer device. Background Technology

[0002] Microservice architecture breaks down a large application into multiple small, independently deployed and running microservices, and this architectural pattern is currently very popular. The microservice gateway is located at the external boundary of the entire microservice system. All kinds of external requests first come into contact with it, so it is indispensable and undertakes the key responsibility of connecting the external and internal microservices.

[0003] As a business grows, the number of microservices will continue to increase, and individual microservices will also be iterated and upgraded. Different microservices have their own configuration parameters, such as authentication rules, rate limiting thresholds, and service discovery settings, to adapt to their unique business logic, performance requirements, and security rules.

[0004] However, for a microservice gateway to interface with numerous microservices, it must take all these different configurations into account. Manually handling massive amounts of complex configurations and keeping up with changes in microservices to make timely adjustments is extremely difficult. Summary of the Invention

[0005] Therefore, it is necessary to provide a configuration management method, apparatus, and computer equipment that can improve the personalized configuration management of various microservices in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a configuration management method, which includes:

[0007] Upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice.

[0008] Update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0009] Send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0010] In one embodiment, determining the update configuration item carried in the configuration update request as a unified configuration item for the target microservice in the microservice gateway includes:

[0011] Match the updated configuration items carried in the configuration update request with the unified configuration items of the target microservice in the microservice gateway;

[0012] If a match is successful, it is determined that the update configuration item carried in the configuration update request is the unified configuration item of the target microservice in the microservice gateway.

[0013] In one embodiment, based on configuration update requirements, the unified configuration item is separated to obtain individual configuration files for each microservice to which the unified configuration item belongs, including:

[0014] Based on the configuration update requirements, create the initial configuration files for each microservice to which the unified configuration items belong;

[0015] Add a unified configuration item to each initial configuration file to obtain a separate configuration file for each microservice to which the unified configuration item belongs.

[0016] In one embodiment, the unified configuration items for the target microservice in the microservice gateway are constructed in the following manner:

[0017] Retrieve the microservice configuration items of the target microservice;

[0018] If the microservice configuration items of the target microservice are consistent with or similar to those of other microservices, the consistent or similar microservice configuration items will be used as the unified configuration items for the target microservice in the microservice gateway.

[0019] In one embodiment, based on configuration update requirements, the unified configuration item is separated to obtain individual configuration files for each microservice to which the unified configuration item belongs, including:

[0020] If there are at least two target users, then the current user is selected from among the target users according to their priority.

[0021] Based on the current user's configuration update request for the target microservice, the unified configuration item is separated to obtain separate configuration files for each microservice to which the unified configuration item belongs.

[0022] In one embodiment, the updated configuration items include at least gateway routing rule configuration items and microservice function configuration items; the microservice function configuration items include at least authentication function configuration items and log storage function configuration items.

[0023] Secondly, this application also provides a configuration management device, including:

[0024] The configuration separation module is used to, upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the update request is a unified configuration item for the target microservice in the microservice gateway, separate the unified configuration item according to the configuration update request, obtaining separate configuration files for each microservice to which the unified configuration item belongs. The microservices to which the unified configuration item belongs include the target microservice.

[0025] The configuration update module is used to update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0026] The configuration application module is used to send the updated individual configuration file corresponding to the target microservice to the microservice gateway, so as to instruct the microservice gateway to apply the updated individual configuration file.

[0027] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0028] Upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice.

[0029] Update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0030] Send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0031] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0032] Upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice.

[0033] Update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0034] Send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0035] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0036] Upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice.

[0037] Update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0038] Send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0039] The aforementioned configuration management method, apparatus, and computer equipment utilize configuration separation technology to decompose the configuration information of the microservice gateway according to different configuration requirements, thereby generating separate configuration files or databases corresponding to each microservice. The advantage of this approach is its ability to flexibly address the unique configuration requirements of different microservices, enabling fine-grained management of the configuration for each microservice—a process known as granular control. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is an application environment diagram of the configuration management method in one embodiment;

[0042] Figure 2 This is a flowchart illustrating the configuration management method in one embodiment;

[0043] Figure 3 This is a flowchart illustrating the steps of determining the update configuration items carried in the configuration update request as unified configuration items for the target microservice in the microservice gateway, as shown in one embodiment.

[0044] Figure 4 This is a flowchart illustrating the steps for obtaining individual configuration files for each microservice to which a unified configuration item belongs, as shown in one embodiment.

[0045] Figure 5 This is a flowchart illustrating the steps for separating unified configuration items in one embodiment;

[0046] Figure 6 This is a structural block diagram of the configuration management device in one embodiment;

[0047] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0049] In one exemplary embodiment, such as Figure 1 As shown, an application environment diagram of a configuration management method is provided. The application environment diagram includes a computer device, which is equipped with a configuration management module, a microservice gateway module, and microservices configured.

[0050] In one exemplary embodiment, such as Figure 2 As shown, a configuration management method is provided. Taking the application of this method to the configuration management module in a computer device as an example, it includes:

[0051] S201: Upon obtaining the configuration update request initiated by the target user for the target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item of the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain the individual configuration files of each microservice to which the unified configuration item belongs.

[0052] In this case, the configuration update request initiated by the target user for the target microservice may come from business changes of the microservice, performance optimization requirements, or other factors.

[0053] Then, the configuration management database or storage structure of the microservice gateway is queried to obtain all unified configuration items for the target microservice. The received updated configuration items are compared with these unified configuration items. Methods such as string matching and hash table lookup can be used to quickly determine whether there is a match. If a match is found, the subsequent separation process is triggered. If a match is not found, the pre-set error handling mechanism can be used, such as issuing an error message to the administrator.

[0054] Among them, the microservices to which the unified configuration item belongs include the target microservice.

[0055] It is understandable that each microservice to which a unified configuration item belongs refers to an individual microservice in a microservice architecture that shares specific configuration elements. These microservices share common configuration content due to commonalities in business requirements, technical architecture, or operating environment; this common configuration content is the unified configuration item.

[0056] For example, unified configuration items might be basic configuration elements shared by multiple microservices, such as common network connection parameters (e.g., timeout, connection pool size), common security policy configurations (e.g., encryption algorithms, authentication methods), or system-level global settings (e.g., log levels, system default encoding). These configuration items are consistent or similar across multiple microservices and are treated and maintained as a whole during configuration management. Updates may affect the operational status of multiple microservices, therefore, they need to be separated and updated according to a specific process to ensure the stability and normal operation of the entire microservice architecture.

[0057] The separation process refers to using configuration separation technology to break down the configuration information of the microservice gateway according to different configuration requirements, thereby generating separate configuration files or databases corresponding to each microservice.

[0058] Optionally, the specific implementation process of the separate processing flow is as follows: Create a dedicated configuration file or configuration group for each microservice to which the unified configuration item belongs. In practice, these configuration resources may be distinguished and created based on factors such as the microservice's name and functional modules. When merging configurations, factors such as version information and environment variables will be considered to determine whether to load specific configurations. For example, in a development environment, some configuration items used for debugging may be loaded. In a production environment, configurations that prioritize performance and stability will be selected.

[0059] S202 updates the individual configuration file of the target microservice based on the update configuration information in the update configuration item.

[0060] Understandably, the updated configuration items carry updated configuration information that specifies what changes need to be made to the target microservice.

[0061] Optionally, locate the target configuration location corresponding to the updated configuration item in the configuration file. Once the target configuration location is found, replace the old value with the new value from the updated configuration information. During this process, pay special attention to maintaining the syntax and format of the configuration file. After the update is complete, this configuration file will allow the target microservice to operate according to the new rules and parameters, keeping it synchronized with changes in business requirements. For example, after replacing the old value for the number of concurrent requests, the microservice can run according to the new concurrency limit the next time it processes a request, improving response efficiency.

[0062] S203, send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0063] Understandably, after updating the individual configuration file of the target microservice, this modified configuration file needs to be transferred from the location of the configuration management module to a location accessible to the microservice gateway. This transfer process may employ different methods depending on the system architecture, such as pushing files via network protocols (e.g., HTTP, FTP) or utilizing a distributed file system sharing mechanism to ensure the microservice gateway can access the updated configuration file.

[0064] Optionally, the microservice gateway can be notified and driven to enable this new configuration, in which case the microservice gateway can update the microservice configuration without having to rebuild it.

[0065] During operation, the microservice gateway originally relied on the old configuration file to handle various tasks such as routing and security verification. After receiving the updated configuration file, it reads and parses it according to the established procedure and integrates the new configuration parameters into its own running logic. For example, if the updated configuration file adjusts the routing rules for a certain type of request, after the microservice gateway reads the application file, it will accurately distribute the request to the corresponding microservice instance according to the new routing rules when it encounters such a request again, thereby ensuring that the system operation is in line with the latest business requirements or operation and maintenance adjustments.

[0066] In the above configuration management method, this application utilizes configuration separation technology to decompose the configuration information of the microservice gateway according to different configuration requirements, thereby generating separate configuration files or databases corresponding to each microservice. The advantage of this approach is that it can flexibly address the unique configuration requirements of different microservices, achieving fine-grained management of the configuration for each microservice, also known as granular control.

[0067] In one exemplary embodiment, such as Figure 3 As shown, the configuration update items carried in the configuration update request are identified as the unified configuration items for the target microservice in the microservice gateway, including:

[0068] S301 matches the update configuration items carried in the configuration update request with the unified configuration items of the target microservice in the microservice gateway.

[0069] Optionally, the update configuration items carried in the configuration update request are compared with the existing unified configuration items in the microservice gateway for the target microservice. For example, for update configuration items, the configuration category (e.g., network configuration, security configuration), parameter name (e.g., connection timeout, encryption algorithm), parameter type (e.g., integer, string, boolean), and parameter value are specified. Unified configuration items are also characterized in the same way. Initial matching is performed using parameter names and types. Potentially matching unified configuration items are filtered by comparing whether the parameter names and parameter types in the update configuration item and the unified configuration item are the same. For example, in the above example, the "connection timeout" in the update configuration item has the same name as the "connection timeout" in the unified configuration item, and both are integer types (in seconds), so a possible match is determined.

[0070] Understandably, unified configuration items are derived through a specific build process. First, all microservice configuration items for the target microservice are collected, and then compared one by one with the configuration items of other microservices. If certain configuration items are found to be identical or extremely similar in content, format, or purpose, these items are selected and integrated to form the unified configuration items for the target microservice in the microservice gateway. For example, if multiple microservices need to connect to the same database, then database connection-related configurations, such as database address, port number, and username, are highly likely to be recognized as consistent microservice configuration items and thus become unified configuration items.

[0071] Optionally, the unified configuration item of the target microservice in the microservice gateway is constructed in the following way: obtain the microservice configuration item of the target microservice; if it is determined that the microservice configuration item of the target microservice is consistent or similar to the microservice configuration item of other microservices, the consistent or similar microservice configuration item is used as the unified configuration item of the target microservice in the microservice gateway.

[0072] S302 If the match is successful, it is determined that the update configuration item carried in the configuration update request is the unified configuration item of the target microservice in the microservice gateway.

[0073] Optionally, once a match is confirmed, the details of the successfully matched updated configuration item and the corresponding unified configuration item of the target microservice in the microservice gateway need to be recorded. This includes the name, type, current value (the value in the unified configuration item), and updated value (the value in the updated configuration item). This information can be stored using a data structure, such as a dictionary (in Python) or an object (in languages ​​like Java).

[0074] To ensure that subsequent processes clearly identify whether an updated configuration item is related to a unified configuration item, it needs to be marked. A specific tag or status can be set in the update task queue or update record of the configuration management system to indicate that this updated configuration item is related to the unified configuration item of the target microservice in the microservice gateway.

[0075] In one exemplary embodiment, such as Figure 4 As shown, based on configuration update requirements, the unified configuration item is separated to obtain individual configuration files for each microservice to which the unified configuration item belongs, including:

[0076] S401 creates initial configuration files for each microservice to which the unified configuration item belongs, based on configuration update requirements.

[0077] Understandably, upon receiving a configuration update request, the primary task is to build an initial configuration file framework for each microservice to which the unified configuration item belongs. This initial configuration file provides the foundation for adding precise configuration content later. For example, if three microservices A, B, and C share certain unified configuration items, then corresponding initial configuration files will be created for each of these three microservices. These initial files are initially empty, or only contain some basic, common header information.

[0078] S401 adds a unified configuration item to each initial configuration file, resulting in a separate configuration file for each microservice to which the unified configuration item belongs.

[0079] Optionally, after obtaining the initial configuration files for each microservice, the next step is to add the unified configuration items one by one, turning them into complete individual configuration files. For example, the unified configuration items might contain common database connection configurations, such as the database address, port number, and username. This information would be written into the initial configuration files for microservices A, B, and C respectively, thus forming their own exclusive individual configuration files. In this way, each microservice has complete configuration content adapted to itself, which can be flexibly adjusted according to actual needs later, and also facilitates precise modifications when updating configuration items.

[0080] The updated configuration items must include at least gateway routing rule configuration items and microservice function configuration items. Microservice function configuration items must include at least authentication function configuration items and log storage function configuration items.

[0081] Among these, gateway routing rule configuration items affect the flow of microservice requests. For example, different routing rules can be formulated based on factors such as client type, request origin region, or request priority to accurately forward requests to the corresponding microservice instances. Updating these configuration items requires adjusting the routing rule descriptions in the initial configuration file, thereby changing the communication paths between microservices.

[0082] For example, separating routing rules using tags and version numbers helps improve the routing efficiency and accuracy of a gateway. In a system with multiple microservice versions, different versions of microservices may have different interfaces or functionalities. By setting appropriate tags or version numbers for routing rules, it can be ensured that requests are accurately routed to the correct version of the microservice. For instance, an API gateway needs to route requests from different clients to different versions of the product information microservice. Setting tags based on client type enables precise route allocation, improving overall system performance and user experience.

[0083] Among the microservice configuration options are: Authentication Configuration: This determines how the microservice verifies the legitimacy of the request source. This includes options such as username-password authentication, token authentication, or multi-factor authentication. Updating this option can improve system security and adapt to new security policies. Log Storage Configuration: This manages how logs generated by the microservice are stored—whether on local disk, cloud storage, or a distributed file system, as well as the storage duration and log file size limits. Adjusting this configuration option can optimize the efficiency of operation and maintenance troubleshooting and meet the log management needs at different stages.

[0084] For example, separating configurations for specific functionalities of different microservices, such as separate authentication and logging configurations, is key to meeting diverse business needs. Some microservices may require more stringent authentication methods, such as two-factor authentication or integration with third-party authentication authorities, while others may only require simple username / password authentication. By providing independent configuration mechanisms for these specific functions, it can be ensured that each microservice achieves optimal security and functionality. Similarly, for logging configurations, different microservices may need to record different levels of logging information or send logs to different storage locations; this separation based on specific functions can meet these differentiated needs.

[0085] In one exemplary embodiment, such as Figure 5As shown, based on configuration update requirements, the unified configuration item is separated to obtain individual configuration files for each microservice to which the unified configuration item belongs, including:

[0086] S501, if the number of target users is at least two, then select the current user from among the target users according to the priority of each target user.

[0087] Understandably, in scenarios where at least two target users initiate configuration update requests, user priority becomes a crucial filtering factor. The system pre-sets priorities for different target users, which may be based on factors such as user role, business importance, and payment level. For example, in enterprise-level microservice systems, super administrators have higher priority than ordinary operations and maintenance personnel, and heads of core business departments have higher priority than employees of peripheral business departments. By comparing the priorities of each target user, the system selects the one with the highest priority and identifies them as the current user. This is done to ensure that in the complex situation of multiple users competing for configuration updates, the most important and urgent needs are processed first.

[0088] S502, based on the current user's configuration update request for the target microservice, separates the unified configuration item and obtains separate configuration files for each microservice to which the unified configuration item belongs.

[0089] Optionally, after locking onto the current user, the system focuses on handling configuration update requests initiated by that user for the target microservice, processing the unified configuration item accordingly. It follows a predetermined separation process, breaking down the unified configuration item and integrating it into the individual configuration files corresponding to each microservice. For example, if the current user submits an update request to adjust the database connection configuration shared by several microservices (a unified configuration item), the system will precisely modify the configuration files of each microservice involved in that unified configuration item based on this request. This ensures that subsequent microservices use the updated configuration while maintaining the independence and adaptability of each microservice's configuration. This approach makes the configuration update process more orderly and adaptable to complex business scenarios with multiple users.

[0090] In this embodiment, a locking mechanism or conflict detection algorithm is used to resolve the conflict problem that may occur when multiple people modify configuration information at the same time.

[0091] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0092] Based on the same inventive concept, this application also provides a configuration management device for implementing the configuration management method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more configuration management device embodiments provided below can be found in the limitations of the configuration management method described above, and will not be repeated here.

[0093] In one exemplary embodiment, such as Figure 6 As shown, a configuration management device is provided, including:

[0094] The configuration separation module 11 is used to, upon receiving a configuration update request initiated by a target user for a target microservice, and determining that the update configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, separate the unified configuration item according to the configuration update request, obtaining separate configuration files for each microservice to which the unified configuration item belongs. The microservices to which the unified configuration item belongs include the target microservice.

[0095] Configuration update module 12 is used to update the individual configuration files of the target microservice according to the update configuration information in the update configuration item;

[0096] The configuration application module 13 is used to send the updated individual configuration file corresponding to the target microservice to the microservice gateway, so as to instruct the microservice gateway to apply the updated individual configuration file.

[0097] In one embodiment, the configuration separation module 11 is used to match the updated configuration items carried in the configuration update request with the unified configuration items of the target microservice in the microservice gateway.

[0098] If a match is successful, it is determined that the update configuration item carried in the configuration update request is the unified configuration item of the target microservice in the microservice gateway.

[0099] In one embodiment, the configuration separation module 11 is used to create initial configuration files for each microservice to which a unified configuration item belongs, based on configuration update requirements.

[0100] Add a unified configuration item to each initial configuration file to obtain a separate configuration file for each microservice to which the unified configuration item belongs.

[0101] In one embodiment, the device further includes a unified building module for:

[0102] Retrieve the microservice configuration items of the target microservice;

[0103] If the microservice configuration items of the target microservice are consistent with or similar to those of other microservices, the consistent or similar microservice configuration items will be used as the unified configuration items for the target microservice in the microservice gateway.

[0104] In one embodiment, the separation module 11 is configured to select the current user from among the target users according to the priority of each target user if the number of target users is at least two.

[0105] Based on the current user's configuration update request for the target microservice, the unified configuration item is separated to obtain separate configuration files for each microservice to which the unified configuration item belongs.

[0106] In one embodiment, the updated configuration items include at least gateway routing rule configuration items and microservice function configuration items; the microservice function configuration items include at least authentication function configuration items and log storage function configuration items.

[0107] Each module in the aforementioned configuration management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, 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 module.

[0108] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data for configuration management methods. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a configuration management method.

[0109] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0110] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0111] Upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice.

[0112] Update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0113] Send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0114] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0115] Upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice.

[0116] Update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0117] Send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0118] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0119] Upon receiving a configuration update request from a target user for a target microservice, and determining that the updated configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; each microservice to which the unified configuration item belongs includes the target microservice.

[0120] Update the individual configuration files of the target microservice based on the update configuration information in the update configuration items;

[0121] Send the updated individual configuration file corresponding to the target microservice to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

[0122] 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 used for analysis, data stored, data displayed, 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 the relevant data must comply with relevant regulations.

[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media 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), magnetic 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 take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this application.

[0125] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A configuration management method, characterized in that, The method includes: Upon receiving a configuration update request from a target user for a target microservice, and determining that the update configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, the unified configuration item is separated according to the configuration update request to obtain individual configuration files for each microservice to which the unified configuration item belongs; the microservices to which the unified configuration item belongs include the target microservice. Update the individual configuration file of the target microservice according to the update configuration information in the update configuration item; The updated individual configuration file corresponding to the target microservice is sent to the microservice gateway to instruct the microservice gateway to apply the updated individual configuration file.

2. The method according to claim 1, characterized in that, The step of determining the update configuration items carried in the configuration update request as unified configuration items for the target microservice in the microservice gateway includes: Match the update configuration items carried in the configuration update request with the unified configuration items of the target microservice in the microservice gateway; If the match is successful, it is determined that the update configuration item carried in the configuration update request is the unified configuration item of the target microservice in the microservice gateway.

3. The method according to claim 1, characterized in that, The step of separating the unified configuration item according to the configuration update requirement to obtain separate configuration files for each microservice to which the unified configuration item belongs includes: Based on the configuration update requirements, create the initial configuration files for each microservice to which the unified configuration item belongs; Add the unified configuration item to each initial configuration file to obtain a separate configuration file for each microservice to which the unified configuration item belongs.

4. The method according to claim 1, characterized in that, The unified configuration items for the target microservice in the microservice gateway are constructed in the following manner: Obtain the microservice configuration items of the target microservice; If it is determined that the microservice configuration items of the target microservice are consistent or similar to those of other microservices, the consistent or similar microservice configuration items will be used as the unified configuration items of the target microservice in the microservice gateway.

5. The method according to claim 1, characterized in that, The step of separating the unified configuration item according to the configuration update requirement to obtain separate configuration files for each microservice to which the unified configuration item belongs includes: If the number of target users is at least two, then the current user is selected from among the target users according to their priority. Based on the configuration update request initiated by the current user for the target microservice, the unified configuration item is separated to obtain individual configuration files for each microservice to which the unified configuration item belongs.

6. The method according to any one of claims 1-5, characterized in that, The updated configuration items include at least gateway routing rule configuration items and microservice function configuration items; the microservice function configuration items include at least authentication function configuration items and log storage function configuration items.

7. A configuration management device, characterized in that, The device includes: The configuration separation module is used to, upon receiving a configuration update request initiated by a target user for a target microservice, and determining that the update configuration item carried in the configuration update request is a unified configuration item for the target microservice in the microservice gateway, separate the unified configuration item according to the configuration update request to obtain separate configuration files for each microservice to which the unified configuration item belongs; the microservices to which the unified configuration item belongs include the target microservice. The configuration update module is used to update the individual configuration file of the target microservice according to the update configuration information in the update configuration item; The configuration application module is used to send the updated individual configuration file corresponding to the target microservice to the microservice gateway, so as to instruct the microservice gateway to apply the updated individual configuration file.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

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

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

Citation Information

Patent Citations

  • Service management method and device, storage medium and electronic equipment

    CN110032392A

  • Micro-service updating method and device, electronic equipment and storage medium

    CN117331581A