Method, system, computer device and storage medium for managing application configuration

By generating change logs and using HTTP long polling to achieve real-time updates, combined with permission verification and encryption mechanisms, the complexity and security issues of configuration change operations in the Spring Cloud Config configuration center are resolved, security audits and data recovery are implemented, and production and operation costs are reduced.

CN115878216BActive Publication Date: 2025-09-19HEBEI HAPPY CONSUMPTION FINANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211534788.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2025-09-19
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

The existing Spring Cloud Config configuration center has complex configuration change procedures, cannot achieve automated deployment, and lacks permission management and audit services, resulting in high production and operation costs and increased operational risks.

Method used

By generating change logs, locating abnormal information and restoring to the expected configuration, security auditing and data recovery are achieved. HTTP long polling is used to achieve real-time updates. In combination with permission verification and encryption mechanisms, the security of configuration information is ensured.

Benefits of technology

It realizes the security audit and data recovery of application configuration, reduces production and operation costs, and improves operational safety and the security of configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115878216B_ABST
    Figure CN115878216B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, computer device, and storage medium for managing application configuration. The method includes: obtaining configuration information; determining whether the configuration information has changed; if the configuration information has changed, generating a change log based on the change type, change time, and change object of the configuration information; when an application configuration anomaly is determined during an audit, locating the anomaly information according to the change log, and restoring the expected configuration information in the historical version according to the data table corresponding to the change log. The above-mentioned method of the present invention generates a change log for the configuration information that has changed, so that when an application configuration anomaly is found during the audit, the anomaly information can be located according to the change log, and restored to the expected configuration information, thereby ensuring the security of the application configuration and achieving secure auditing and data recovery of the application configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and more specifically, to a method, system, computer device and storage medium for managing application configuration. Background Art

[0002] As applications become increasingly complex, the number of configuration items increases. The configuration center is a crucial core component of microservice architectures, and most enterprises currently use Spring Cloud Config. However, Spring Cloud Config currently suffers from complex configuration change processes and a lack of automated deployment. Furthermore, it lacks necessary permission management and auditing services, and configuration changes don't take effect immediately, requiring additional components to implement or restart services. This increases production and operational costs and increases operational risks. Summary of the Invention

[0003] In order to solve the problems or some of the problems existing in the above-mentioned prior art, the embodiments of the present invention provide a method, system, computer device and storage medium for managing application configuration. When an application configuration anomaly is found during the audit process, the abnormal information can be located according to the generated change log and restored to the expected configuration information, thereby ensuring the security of the application configuration and realizing security auditing and data recovery of the application configuration.

[0004] According to a first aspect of the present invention, an embodiment of the present invention provides a method for managing application configuration, which includes: obtaining configuration information; determining whether the configuration information has changed; if the configuration information has changed, generating a change log based on the change type, change time and change object of the configuration information; when an application configuration anomaly is determined during an audit process, locating the anomaly information according to the change log, and restoring the expected configuration information in the historical version according to the data table corresponding to the change log.

[0005] According to the above-mentioned embodiment of the present invention, by generating a change log for the configuration information that has changed, when an application configuration anomaly is found during the audit process, the abnormal information can be located according to the change log, and the expected configuration information can be restored, thereby ensuring the security of the application configuration and realizing security auditing and data recovery of the application configuration.

[0006] In some embodiments of the present invention, the method further includes: if the configuration information changes, sending a notification to the client via http long polling, so that the client obtains the configuration information.

[0007] According to the above-mentioned embodiment of the present invention, when the configuration information changes, the client automatically obtains the configuration information immediately based on the notification sent by http long polling, which can realize real-time update of application configuration and avoid complex processes assisted by restarting services or other components, thereby reducing production and operation costs and improving operational safety.

[0008] In some embodiments of the present invention, obtaining the configuration information includes inserting the configuration information of the configuration publisher into a custom registration table.

[0009] In some implementations of the present invention, the method further includes: determining whether to publish the configuration information according to the configuration authority of the configuration publisher.

[0010] According to the above-mentioned embodiments of the present invention, whether to publish configuration information is determined through authority verification, which can reduce the occurrence of accidents such as information leakage and misoperation of configuration items.

[0011] In some embodiments of the present invention, the method further includes: when the configuration information contains sensitive information, encrypting the configuration information before publishing.

[0012] According to the above-mentioned embodiments of the present invention, the security of the application can be improved by automatically encrypting the sensitive information of the configuration information.

[0013] According to the second aspect of the present invention, an embodiment of the present invention provides a system for managing application configuration, which includes: an information acquisition module for acquiring configuration information; a change judgment module for judging whether the configuration information has changed; a log generation module for generating a change log based on the change type, change time and change object of the configuration information when the configuration information has changed; an information recovery module for locating the abnormal information according to the change log when an application configuration abnormality is determined during the audit process, and restoring the expected configuration information in the historical version according to the data table corresponding to the change log.

[0014] According to the above-mentioned embodiment of the present invention, by generating a change log for the configuration information that has changed, when an application configuration anomaly is found during the audit process, the abnormal information can be located according to the change log, and the expected configuration information can be restored, thereby ensuring the security of the application configuration and realizing security auditing and data recovery of the application configuration.

[0015] In some embodiments of the present invention, the configuration center server further includes: a dynamic update module, configured to send a notification to the client via http long polling when the configuration information changes, so that the client obtains the configuration information.

[0016] According to the above-mentioned embodiment of the present invention, when the configuration information changes, the client automatically obtains the configuration information immediately based on the notification sent by http long polling, which can realize real-time update of application configuration and avoid complex processes assisted by restarting services or other components, thereby reducing production and operation costs and improving operational safety.

[0017] In some embodiments of the present invention, obtaining the configuration information includes inserting the configuration information of the configuration publisher into a custom registration table.

[0018] In some embodiments of the present invention, the configuration center server further includes: an authority control module, configured to determine whether to publish the configuration information according to the configuration authority of the configuration publisher.

[0019] According to the above-mentioned embodiments of the present invention, whether to publish configuration information is determined through authority verification, which can reduce the occurrence of accidents such as information leakage and misoperation of configuration items.

[0020] In some embodiments of the present invention, the configuration center server further includes: an encryption module, configured to encrypt the configuration information before publishing when the configuration information contains sensitive information.

[0021] According to the above-mentioned embodiments of the present invention, the security of the application can be improved by automatically encrypting the sensitive information of the configuration information.

[0022] According to the third aspect of the present invention, an embodiment of the present invention provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor, the computer performs the following operations: the operations include the steps included in the method for managing application configuration as described in any of the above embodiments.

[0023] According to a fourth aspect of the present invention, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, wherein the computer-readable instructions, when executed by the processor, can implement the method for managing application configuration as described in any one of the above embodiments.

[0024] From the above, it can be seen that the method, system, computer device and storage medium for managing application configuration provided by the present invention generate a change log for the configuration information that has changed. When an application configuration anomaly is discovered during the audit process, the anomaly information can be located according to the change log, and the expected configuration information can be restored. This can ensure the security of the application configuration and achieve secure auditing and data recovery of the application configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a flowchart of a method for managing application configuration according to an embodiment of the present invention;

[0026] Figure 2 is a flowchart of a method for managing application configuration according to a further embodiment of the present invention;

[0027] Figure 3 4 is an architectural diagram of a system for managing application configuration according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The various aspects of the present invention are described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, well-known modules, units and their connections, links, communications or operations are not shown or described in detail. In addition, the described features, architectures or functions can be combined in any manner in one or more embodiments. It should be understood by those skilled in the art that the various embodiments described below are only for illustration and are not intended to limit the scope of protection of the present invention. It can also be easily understood that the modules or units or processing methods in the various embodiments described herein and shown in the drawings can be combined and designed in various different configurations.

[0029] The following is a brief explanation of the terms used in this article.

[0030] Spring Cloud Config: A configuration center.

[0031] Spring: An open source J2EE application framework.

[0032] Bean: An object instantiated, assembled, and managed by the Spring container.

[0033] Fallback mechanism: a fault-tolerant method for service failures.

[0034] Config Service: Client configuration service.

[0035] Admin Service: Configure the management service.

[0036] Namespace: A collection of configuration items.

[0037] notificationID: Notification ID.

[0038] LDAP protocol: Lightweight Directory Access Protocol, lightweight directory access protocol.

[0039] jdk: Software Development Kit for the Java language.

[0040] JCE: Java Cryptography Extension, Java Cryptography Extension, provides a framework and implementation for encryption, key generation algorithms and negotiation.

[0041] AppId: The application ID of the access system. The AppId is the unique identifier of the access system.

[0042] ReleaseId: A version number generated after the configuration information set corresponding to the application connected to the system is released. This version number is generated each time the configuration information is released.

[0043] OpenApi interface: open application programming interface.

[0044] DevOps: A combination of Development and Operations, a collective term for a set of processes, methods, and systems used to promote communication, collaboration, and integration between development (application / software engineering), technical operations, and quality assurance (QA) departments.

[0045] Figure 1 The figure is a flowchart of a method for managing application configuration according to an embodiment of the present invention.

[0046] like Figure 1 As shown, in one embodiment of the present invention, the method may include: step S11, step S12, step S13 and step S14, and the above steps are described in detail below.

[0047] In step S11, configuration information is obtained. In some embodiments, obtaining configuration information includes inserting the configuration information of the configuration publisher, such as application name, application port number, database connection pool, business, and other configuration information, into a custom registry using AppId as the key and the configuration information as the value, so that the client can obtain the configuration information of the required items from the registry. For example, the Spring framework provides two levels of processing extension interfaces: BeanPostProcessor and BeanFactoryPostProcessor. During the startup of the Spring container, the configuration center registers the beans containing ${…} placeholders and @Value annotations in the configuration information into the registry defined in the configuration center framework through the custom BeanPostProcessor and BeanFactoryPostProcessor. In this way, configuration information that adapts to the custom rules of the configuration center can be obtained.

[0048] In step S12, it is determined whether the configuration information has been changed.

[0049] In step S13, if the configuration information is changed, a change log is generated based on the change type, change time, and change object of the configuration information. The change type of the configuration information includes but is not limited to one or more of the following: adding, modifying, deleting, and publishing operations.

[0050] In other embodiments, the operation type, operation time and operation account are determined based on the configuration information, and an event operation log is generated based on the above information, and the event operation log is saved in a relational database. At the same time, each time an operation is published, a copy of the currently published configuration information is saved in a historical version library.

[0051] In step S14, if an application configuration anomaly is identified during the audit, the anomaly information is located based on the change log, and the desired configuration information from the historical version is restored based on the data table corresponding to the change log. Specifically, when a security audit is required, the issue is located based on the change log, quickly and easily locating the time and account number of the configuration change. If configuration information needs to be restored, a one-click data restore is performed using the data tables in the historical version repository. In an optional embodiment, the application configuration is restored to the configuration version closest to the current configuration that did not exhibit the anomaly through the historical version repository.

[0052] The above-mentioned method for managing application configuration according to the embodiment of the present invention generates a change log for the configuration information that has changed. When an application configuration anomaly is found during the audit process, the anomaly information can be located according to the change log, and the expected configuration information can be restored. This ensures the security of the application configuration, avoids serious consequences caused by misoperation or malicious human deletion, and realizes security auditing and data recovery of the application configuration.

[0053] In a further embodiment, when the configuration information changes, a notification is sent to the client via HTTP long polling, allowing the client to obtain the corresponding configuration information. When the configuration information changes, the client (service / system) connected to the configuration center automatically pulls all the configuration information corresponding to the AppId provided by the client, based on the notification sent by HTTP long polling. This can achieve real-time application configuration updates, avoid the complex process of restarting services or other auxiliary components, thereby reducing production and operation costs and improving operational safety.

[0054] In other implementations, the client uses a fallback mechanism to periodically pull configuration information from the ConfigService in the configuration center, for example, every five minutes. Therefore, if HTTP long polling fails due to a fault, preventing the system (client) connected to the configuration center from obtaining the latest configuration information, the fallback mechanism can be used to proactively pull configuration information every five minutes. This provides fault tolerance, provides an additional way for the access system to obtain configuration information, and ensures that updated configuration information takes effect on the client.

[0055] The present invention provides a method for managing application configuration based on a further implementation of http long polling request and Spring extension mechanism, which can realize real-time update of application configuration. Figure 2 As shown, the method for managing application configuration of this further embodiment includes the following steps:

[0056] First, the configuration center server inserts the ReleaseId (release ID) of the published configuration information into the Release Message table (release registry) through the Admin Service, obtaining the configuration information from the configuration center server. Furthermore, the configuration center server scans the registry once per second through the Config Service to obtain the configuration information in the registry. In further implementations, the ReleaseId serves as the version number of the published configuration information and can be used to restore the desired configuration information from a historical version, i.e., to determine the corresponding data snapshot of the configuration information based on the version number.

[0057] Secondly, on the one hand, the client of the configuration center uses the fallback mechanism to regularly pull configuration information from the registry from the Config Service of the configuration center every 5 minutes; on the other hand, the client initiates an HTTP request through a while loop. The Config Service of the configuration center's server establishes a long connection with the client through HTTP long polling with a preset duration, for example, 60 seconds. The Config Service will suspend the request for 60 seconds. If there is no configuration information change within 60 seconds, the HttpStatus304 status is returned, indicating that the configuration information has not been modified. If the configuration information is updated, the HttpStatus200 status is returned, indicating that the configuration information has been modified, and the configuration center client is notified, so that the configuration center client immediately pulls the configuration information from the Config Service. The pulled configuration information overwrites the original Bean properties, making the Bean properties take effect in real time.

[0058] Among them, when the configuration information is updated and returns the status of HttpStatus 200, the latest notificationID in the Namespace is returned at the same time, and the client calls the setResult method of DeferredResult, that is, DeferredResultWrapper#setResult(List <confignotication>) method to directly set the DeferredResult result and end the long poll. The DeferredResult result contains the version number of the latest configuration release. The client uses this release number to pull all the configuration information for the client (application) from the configuration center, compares it, and overwrites any changed configuration information. If the configuration information has not been updated, the long poll ends until a change is made or the timeout occurs.

[0059] In some embodiments, the method for managing application configuration further includes: determining whether to publish the configuration information based on the configuration authority of the configuration publisher. In a further embodiment, the operator of the configuration publisher logs in to the configuration center through a domain account, and the configuration center obtains the account information after a successful login by parsing the LDAP protocol, and then configures the authority for the login account, and saves the account information, application, authority type and other data into the authority data table; when the configuration publisher publishes the configuration information, the configuration center verifies whether the domain account of the configuration publisher has the operation authority corresponding to the configuration information to be published based on the authority data table; when the domain account does not have the corresponding operation authority, the configuration information to be published is refused to be published; when the domain account has the corresponding operation authority, the configuration information to be published is published and the published configuration information is stored in the historical version library. Among them, the authority configuration can assign independent permissions to each application system connected to the configuration center, and can also assign different permissions to different configuration files corresponding to the application system.

[0060] By using fine-grained permission verification to determine whether to publish configuration information, accidents such as information leakage and incorrect operation of configuration items can be reduced.

[0061] In an optional implementation, the authority of the configuration publisher is judged through SQL statements.

[0062] In a further embodiment, the method for managing application configurations further includes: when the configuration information contains sensitive information, encrypting the configuration information before publishing it. In an optional embodiment, the configuration center encrypts and decrypts sensitive information using a JDK extended encryption module. This encryption module uses JCE technology to encrypt and store the sensitive information, and automatically decrypts the encrypted configuration information for application systems connected to the configuration center. Consequently, application systems not connected to the configuration center are unable to decrypt the information and, therefore, cannot obtain the actual configuration information. Automatic decryption is only possible after the application system is connected to the configuration center, thereby improving the security of the application system.

[0063] In a further implementation, the configuration center's OpenAPI interface is connected to the DevOps system. By invoking the configuration center's OpenAPI interface, the DevOps system can automatically publish, read, encrypt, and decrypt configuration information. Furthermore, the DevOps system can automatically decrypt the retrieved configuration information. Furthermore, based on the connection between the DevOps system and the OpenAPI interface, configuration login and permission management can be performed through the existing domain account system.

[0064] When the change of application configuration only supports the new version of the application system and does not support the old version of the application system, and the application system of the application configuration has multiple nodes deployed in the production environment, the DevOps system automatically suspends the real-time effectiveness mechanism of the configuration information of the application configuration, and restores the real-time effectiveness mechanism of the configuration information of the application configuration after all nodes in the application system are updated to the new version, and then enables all nodes in the application system to pull the latest application configuration for configuration release and change.

[0065] Based on the compatibility of OpenApi services and DevOps systems, open application configuration is achieved and sensitive information can be automatically encrypted and decrypted, improving the security of the application system. At the same time, it can also support multi-node configuration incompatible upgrades, reducing the complexity of operation and maintenance and ensuring business continuity.

[0066] Figure 3 4 is an architectural diagram of a system for managing application configuration according to an embodiment of the present invention.

[0067] like Figure 3 As shown, the configuration center server 300 of the system for managing application configuration includes:

[0068] The information acquisition module 310 is configured to acquire configuration information. In some implementations, acquiring configuration information includes inserting the configuration information of the configuration publisher into a custom registry so that the client can acquire the configuration information of the required items from the registry.

[0069] The change determination module 320 is configured to determine whether the configuration information has changed.

[0070] The log generation module 330 is configured to generate a change log based on the change type, change time, and change object of the configuration information when the configuration information is changed. The change type of the configuration information includes but is not limited to one or more of the following operations: adding, modifying, deleting, and publishing.

[0071] In other embodiments, the operation type, operation time and operation account are determined based on the configuration information, and an event operation log is generated based on the above information, and the event operation log is saved in a relational database. At the same time, each time an operation is published, a copy of the currently published configuration information is saved in a historical version library.

[0072] Information recovery module 340 is used to locate the anomaly information based on the change log when an application configuration anomaly is identified during an audit, and to restore the desired configuration information from the historical version based on the data table corresponding to the change log. Specifically, when a security audit is required, the change log is used to locate the issue, quickly and easily pinpointing the time and account number of the configuration change. If configuration information needs to be restored, a one-click data recovery is performed using the data tables in the historical version repository. In an optional embodiment, the historical version repository is used to restore the application configuration to the configuration version closest to the current configuration that did not exhibit any anomalies.

[0073] By generating a change log for the configuration information that has changed, when an application configuration anomaly is discovered during the audit process, the anomaly information can be located according to the change log and restored to the expected configuration information, thereby ensuring the security of the application configuration and achieving secure auditing and data recovery of the application configuration.

[0074] Dynamic update module 350 is used to send notifications to clients via HTTP long polling when configuration information changes, allowing the clients to obtain the corresponding configuration information. When configuration information changes, the configuration center client (service / system) automatically retrieves all configuration information corresponding to the AppId provided by the client, which is returned by the configuration center server based on the AppId provided by the client, based on the notification sent via HTTP long polling. This enables real-time application configuration updates, avoiding the complex process of restarting services or other auxiliary components, thereby reducing production and operating costs and improving operational security.

[0075] In other implementations, the client uses a fallback mechanism to periodically pull configuration information from the Config Service on the configuration center server, for example, every five minutes. Therefore, if HTTP long polling fails due to a fault, preventing the configuration center client from obtaining the latest configuration information, the fallback mechanism can be used to proactively pull configuration information every five minutes. This provides fault tolerance and provides the client with an additional method to obtain configuration information, ensuring that updated configuration information takes effect on the client.

[0076] The permission control module 360 ​​is used to determine whether to publish the configuration information according to the configuration permission of the configuration publisher. In a further embodiment, the operator of the configuration publisher logs in to the configuration center server through a domain account, and the configuration center server obtains the account information after successful login by parsing the LDAP protocol, and then configures the permission for the login account, and saves the account information, application, permission type and other data into the permission data table; when the configuration publisher publishes the configuration information, the configuration center server verifies whether the domain account of the configuration publisher has the operation permission corresponding to the configuration information to be published according to the permission data table; when the domain account does not have the corresponding operation permission, it refuses to publish the configuration information to be published; when the domain account has the corresponding operation permission, it publishes the configuration information to be published and stores the published configuration information into the historical version library. Among them, the permission configuration can assign independent permissions to each application system connected to the configuration center server, and can also assign different permissions to different configuration files corresponding to the application system.

[0077] By using fine-grained permission verification to determine whether to publish configuration information, accidents such as information leakage and incorrect operation of configuration items can be reduced.

[0078] In an optional implementation, the authority of the configuration publisher is judged through SQL statements.

[0079] The encryption module 370 is used to encrypt and publish the configuration information when the configuration information contains sensitive information. In an optional embodiment, the encryption module 370 is a JDK extension encryption module. For sensitive information, the configuration center server encrypts and decrypts the information through the JDK extension encryption module. The encryption module uses JCE technology to encrypt and store the sensitive information, and automatically decrypts the encrypted configuration information for the application system (client) connected to the configuration center server. As a result, the application system (client) that is not connected to the configuration center server cannot decrypt the information and thus cannot obtain the real configuration information. Only after the application system is connected to the configuration center server can it be automatically decrypted, thereby improving the security of the application system.

[0080] The service access module 380 is configured to connect to the DevOps system and enable the DevOps system to perform at least one of the following operations: publishing configuration information, encrypting configuration information, decrypting configuration information, and reading configuration information. In some embodiments, the service access module includes an OpenAPI interface. Based on the compatibility of the OpenAPI service with the DevOps system, it enables open application configuration and can automatically encrypt and decrypt sensitive information, thereby improving the security of the application system.

[0081] The above-mentioned system for managing application configuration using the implementation mode of the present invention can realize fast and secure automated application configuration and real-time effectiveness of application configuration, and can also realize fine-grained permission management and corresponding security audit services, as well as anomaly location and data recovery after configuration anomalies, which not only improves operational efficiency but also reduces production and operation costs.

[0082] Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by combining software with a hardware platform. Based on this understanding, all or part of the contribution of the technical solution of the present invention to the background art can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.

[0083] Correspondingly, embodiments of the present invention further provide a computer-readable storage medium having computer-readable instructions or a program stored thereon. When executed by a processor, the computer-readable instructions or program causes the computer to perform the following operations: the operations include the steps included in the method for managing application configurations described in any of the above embodiments, which are not further described here. The storage medium may include, for example, an optical disk, a hard disk, a floppy disk, a flash memory, a magnetic tape, and the like.

[0084] In addition, embodiments of the present invention further provide a computer device comprising a memory and a processor, wherein the memory is configured to store one or more computer-readable instructions or programs, wherein the one or more computer-readable instructions or programs, when executed by the processor, can implement the method for managing application configurations as described in any of the above embodiments. The computer device may be, for example, a server, a desktop computer, a laptop computer, a tablet computer, or the like.

[0085] Finally, it should be noted that the above embodiments are intended only to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may be modified or some of the technical features thereof may be replaced with equivalents. Such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention. Therefore, the scope of protection of the present invention shall be determined by the claims.< / confignotication>

Claims

1. A method for managing application configuration, characterized in that: The method comprises: Insert the configuration information of the configuration publisher into the registry of the configuration center, wherein the OpenApi interface of the configuration center is connected to the DevOps system; Determining whether the configuration information has changed; If the configuration information is changed, a change log is generated based on the change type, change time, and change object of the configuration information; When the application configuration changes support the new version of the application system but not the old version, and the application system of the application configuration is deployed on multiple nodes in the production environment, the DevOps system automatically suspends the real-time effectiveness of the configuration information of the application configuration, and restores the real-time effectiveness of the configuration information of the application configuration after all nodes in the application system of the application configuration are updated to the new version, and then causes multiple nodes in the application system of the application configuration to pull the configuration information; If the configuration information changes, a notification is sent to the client through http long polling, so that the client can obtain the configuration information and overwrite the original Bean properties according to the configuration information, so that the Bean properties take effect in real time; The client periodically pulls the configuration information from the configuration center through the fallback mechanism; When an application configuration anomaly is determined during the audit process, the anomaly information is located according to the change log, and the expected configuration information in the historical version is restored according to the data table corresponding to the change log.

2. The method according to claim 1, wherein The method further comprises: Determine whether to publish the configuration information according to the configuration authority of the configuration publisher.

3. The method according to claim 2, wherein The method further comprises: When the configuration information contains sensitive information, the configuration information is encrypted and then published.

4. A system for managing application configuration, characterized in that: The configuration center server of the system includes: An information acquisition module is used to insert the configuration information of the configuration publisher into the registry of the configuration center, wherein the OpenApi interface of the configuration center is connected to the DevOps system; A change determination module, configured to determine whether the configuration information has changed; A log generation module, configured to generate a change log based on the change type, change time, and change object of the configuration information when the configuration information is changed; The dynamic update module is used to send a notification to the client through http long polling when the configuration information changes, so that the client can obtain the configuration information and overwrite the original Bean properties according to the configuration information, so that the Bean properties take effect in real time; The dynamic update module is further configured to enable the client to periodically pull the configuration information from the configuration center through a fallback mechanism; An information recovery module is used to locate the abnormal information according to the change log when an application configuration anomaly is determined during the audit process, and to restore the expected configuration information in the historical version according to the data table corresponding to the change log; A service access module is used to connect with the DevOps system. When the application configuration change supports the new version of the application system but not the old version of the application system, and the application system of the application configuration is deployed on multiple nodes in the production environment, the DevOps system automatically suspends the real-time effectiveness of the configuration information of the application configuration, and restores the real-time effectiveness of the configuration information of the application configuration after all nodes in the application system of the application configuration are updated to the new version, and then enables multiple nodes in the application system of the application configuration to pull the configuration information.

5. The system according to claim 4, wherein: The configuration center server also includes: The authority control module is used to determine whether to publish the configuration information according to the configuration authority of the configuration publisher.

6. The system according to claim 5, wherein: The configuration center server also includes: The encryption module is used to encrypt the configuration information before publishing it when the configuration information contains sensitive information.

7. A computer-readable storage medium storing computer-readable instructions, characterized in that: The computer-readable instructions are executed by a processor to implement the method according to any one of claims 1 to 3.

8. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, wherein: The processor executes the computer-readable instructions to implement the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Methods and systems for managing configuration information

    CN111045745A

  • Application configuration change log

    US20040260718A1