A configuration management system with customizable overlay and access control

By implementing a customized configuration management system with overlay and access control, the fragmentation and lack of permissions in configuration management within the Kylin system have been resolved. This has enabled unified view management and access control of configurations, improved system flexibility and security, and reduced configuration conflict rates and maintenance costs.

CN120744899BActive Publication Date: 2025-12-02KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing configuration management system in the Kylin system has problems such as deep coupling between code and configuration, fragmented configuration management architecture, lack of permission control mechanism, separation of compile-time and runtime configuration, and insufficient ability to trace configuration changes, which makes it difficult for the system to meet the high requirements of enterprise-level applications.

Method used

This paper proposes a configuration management system with custom overlay and access control, including configuration management services, shared libraries and tools. It achieves unified view management of configuration files through view building module, hot reloading module and notification module. It adopts sorting algorithms of directory priority, file numerical priority and ASCII character order, combined with permission verification and conflict resolution mechanism, to provide real-time notification and access control.

Benefits of technology

It enables centralized management, dynamic loading, access control, and version tracking of configurations, improving the manageability, flexibility, and security of system configurations, reducing configuration conflict rates and maintenance costs, and enhancing system responsiveness and customization efficiency.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

This invention relates to the field of system configuration technology, specifically providing a configuration management system with customizable overlay and access control. The system includes a configuration management service, a configuration management shared library, and configuration management tools. The configuration management service builds a unified view, monitors real-time directory updates, and sends change signals. The configuration management shared library provides an API interface for communicating with the configuration management service. This API interface is used to read data from various fields in the configuration data, register and subscribe to change signals with the service, and modify configuration values. The configuration management tools include command-line tools, configuration file conversion tools, compatibility testing tools, and visual management tools, used to assist the execution of the configuration management service and the configuration management shared library. This solution addresses the problems of fragmented configuration management, difficult function customization, and low maintenance efficiency in various scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of system configuration technology, specifically providing a configuration management system with customizable overlay and access control. Background Technology

[0002] With the acceleration of digital transformation, modern operating systems face multi-layered challenges. They not only need to be compatible with diverse hardware ecosystems and meet the business needs of different industry scenarios, but also need to balance feature expansion and version stability during software iteration. These challenges place higher demands on system configuration management mechanisms.

[0003] Current mainstream configuration file libraries such as INI, YAML, and JSON have many shortcomings. Their APIs are complex to use, have a high learning curve, and squeeze application development time. Furthermore, these tools lack real-time notification mechanisms, failing to promptly inform applications of configuration changes. More importantly, each software application manages its own configuration files, resulting in scattered file storage locations and making unified management difficult.

[0004] The development of software configuration management modules has gone through several stages, from early configuration management solutions to today's diversified configuration management systems. Technological advancements have continuously improved these systems to better meet user needs. Early configuration management solutions were mostly based on text files or simple INI files. These files typically stored configuration information in key-value pairs, allowing users to directly edit them to change configurations. While simple, this approach was error-prone and inflexible in complex systems. Furthermore, early solutions lacked version control, making it difficult to trace and recover configuration changes, and conflicts were prone to occur when multiple users modified configurations simultaneously.

[0005] As software systems become increasingly complex, platforms are introducing more flexible and powerful configuration management solutions: such as Linux's KConfig and dconf; Windows' Registry; and mechanisms like SharedPreferences and Content Providers to manage application configurations. These configuration systems enhance user-friendliness by providing simple UI tools, simplifying API usage to reduce costs, and enabling centralized configuration management.

[0006] While Linux's Kconfig provides kernel configuration management capabilities, the system options are too complex for novice users. In addition, KConfig lacks built-in support for complex data structures, and related documentation and community support are relatively insufficient, making it difficult for beginners to get started quickly.

[0007] Because Linux systems use binary storage, the Dconf configuration is difficult for ordinary users to view and edit directly, resulting in poor readability. It also relies on the Gnome environment, is not cross-platform, and has insufficient support for other desktop environments.

[0008] Windows' registry structure is relatively complex, which can easily confuse ordinary users. Improper modifications can lead to system stability issues, and the backup process is relatively difficult. Android's configuration management, such as SharedPreferences, is only suitable for simple configurations and is weak in managing configurations for large applications. Furthermore, its performance may degrade under conditions of large data volumes or frequent concurrent access.

[0009] These shortcomings lead to the following problems when customizing projects with the current Kylin system, making it unable to meet the high requirements of enterprise-level applications for configuration management.

[0010] 1. Deep coupling between code and configuration: Traditional hard-coding mode leads to the tight binding of functional modules and business logic, resulting in a large number of conditional branch judgments based on project characteristics in the code. This not only increases code redundancy, but also seriously hinders the system's ability to respond agilely to dynamic business scenarios.

[0011] 2. Fragmentation of configuration management architecture: Existing configuration policies are scattered across multiple media such as the registry, files and databases, lacking a unified version control and overriding strategy, resulting in low cross-project configuration inheritance rate.

[0012] 3. Lack of configuration permission control mechanism: The lack of a systematic configuration permission definition and management mechanism makes it impossible to effectively distinguish and control the modification permissions of different levels of configuration, which can easily cause configuration conflicts and security risks in multi-party collaborative development and maintenance scenarios.

[0013] 4. The problem of separation between compile-time and runtime configuration: The separation of compile-time macro definition and runtime configuration management makes it difficult for binary deliverables to achieve polymorphism of the same source, directly resulting in high branch maintenance costs for customized and general versions.

[0014] 5. Insufficient configuration change traceability: Existing configuration management solutions lack effective change recording and traceability mechanisms. When configuration-related problems occur in the system, it is difficult to quickly locate and resolve them, increasing the difficulty and risk of operation and maintenance. Summary of the Invention

[0015] To overcome the above-mentioned shortcomings, this invention is proposed to solve the problems of fragmented configuration management, difficult function customization, and low maintenance efficiency in multiple scenarios.

[0016] This invention proposes a configuration management system with customizable overlay and access control, including a configuration management service, a configuration management shared library, and configuration management tools.

[0017] The configuration management service is used to build a unified view based on the configuration data of the configuration file, and to monitor real-time updates of the directory to which the configuration file belongs and send change signals.

[0018] The configuration management shared library is connected to the configuration management service information and is used to provide an API interface for communicating with the configuration management service. The API interface is used to read data from each field of the configuration data in the unified view built by the configuration management service, register and subscribe to change signals with the service, and modify the configuration value.

[0019] The configuration management tool is connected to the configuration management service and the configuration management shared library, and includes command-line tools, configuration file conversion tools, compatibility testing tools, and visual management tools to assist in the execution of the configuration management service and the configuration management shared library.

[0020] Furthermore, the configuration management service includes a view building module, a hot reloading module, and a notification module connected in sequence.

[0021] Furthermore, the view building module is used to transform the scattered configuration strategies in the configuration file into a unified view. The view building module achieves configuration file sorting, configuration file parsing to obtain configuration data from the configuration file, and generating a unified view based on the configuration data through three processes: configuration file sorting, configuration file parsing, and unified view generation.

[0022] Furthermore, the configuration file sorting uses a sorting algorithm based on directory priority, file numeric priority, and ASCII character order to sort the configuration files in the system;

[0023] The directory priority sorting algorithm includes sorting the directories in ascending order according to the user-preset directory weight values, with the configuration files of high-priority directories overwriting the configuration file content of low-priority directories.

[0024] The file numeric priority and ASCII character order sorting algorithm includes defining the file name specification for configuration files, naming them in the format of numbers and characters, and the configuration management service sequentially scanning the configuration files in each directory. After scanning each directory, the configuration files in the directory are sorted. The sorting rule is as follows: extract the numeric priority corresponding to the numbers in the file name using regular expressions, and sort them in ascending order of numeric priority. If the numeric priorities are the same, compare the characters in each file name after removing the numbers using a string comparison algorithm, and sort them according to ASCII character order. Finally, an ordered list of configuration files with low priority first and high priority last is obtained.

[0025] Furthermore, when the configuration file is parsed:

[0026] Based on the libyaml-cpp parsing library, secondary development was carried out. During the parsing process of YAML format configuration files, the logic for extracting and marking application name app_name, version number version, and permissions was added. During parsing, the child nodes of the root node app_name are forced to be the version field. At the same time, the permission fields of each level are automatically inherited and marked through the permission stack mechanism.

[0027] The path tracing is used to record the absolute position of each child node, and the final output is the application name, version number, and permission mapping table with path as configuration data.

[0028] Furthermore, the generation of the unified view includes:

[0029] Based on the ordered list of configuration files obtained by sorting the configuration files, the configuration data of each configuration file is recursively read and overwritten into the corresponding fields of the unified view. If it is a new field, the configuration data corresponding to the field is directly added to the unified view. During the overwriting process, the merging and overwriting process is controlled by permission verification and conflict resolution mechanisms.

[0030] The purpose of the permission verification is to add dual permission definitions to each configuration file, namely, superimposed control permissions and configuration modification permissions.

[0031] The conflict resolution mechanism arbitrates conflicts arising from the same configuration data in different configuration files.

[0032] Furthermore, the permission verification adds superimposed control permissions and configuration modification permissions to each configuration file.

[0033] The overlay control permissions include:

[0034] For configuration items marked with the final flag, they are locked the first time they are encountered in the merge chain, and subsequent files skip this configuration item;

[0035] For configuration items marked with the stable flag, the configuration item is locked after system-level overriding is completed, and user-level files skip the configuration item.

[0036] For unmarked configuration items, allow stacking;

[0037] The configuration modification permissions include:

[0038] For configuration items marked "public", any user can modify them;

[0039] For configuration items marked as private, the operator's identity is verified through the RBAC module when making modifications.

[0040] Furthermore, the hot-loading module monitors changes to the configuration file storage directory through inotify, triggers difference merging when a file is changed, and notifies the view building module to execute a unified view generation process on the differing configuration files.

[0041] Furthermore, the notification module is used to send a signal to the application via a socket after the unified view is updated, informing the application of the change notification.

[0042] Furthermore, the configuration management tool includes a command-line tool, a configuration file conversion tool, a compatibility testing tool, and a visual management tool;

[0043] The command-line tool manages configuration data in the unified view by calling the API interface of the configuration management shared library;

[0044] The configuration file conversion tool supports converting configuration files in ini, conf, json, and schema.xml formats into yaml format;

[0045] The compatibility testing tool is used to detect whether there are conflicts between the customized file and the baseline file, and supports customers to self-check whether the customized configuration file is compliant.

[0046] The visualization management tool is used to centrally present configuration data in a unified view and supports directory-level display.

[0047] The working principle and beneficial effects of this invention:

[0048] In implementing the technical solution of this invention, the configuration file follows the YAML specification and adds structural and type constraints on top of the YAML format. Access permissions for configuration items are controlled through metadata tags. Configurations at each level are stored in predefined system paths, forming a clear storage hierarchy to ensure orderly management and flexible expansion of configuration data. A dynamic view generation service has been developed to achieve real-time integration and conflict resolution of configurations. A standardized and scalable configuration management system is established to achieve centralized management, dynamic loading, access control, and version traceability of configurations, providing a technical foundation for agile customization and version unification of operating systems, fundamentally improving the manageability, flexibility, and security of system configurations. Detailed Implementation

[0049] Some embodiments of the present invention will now be described. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0050] Example 1

[0051] This embodiment proposes a configuration management system with customized overlay and access control, mainly including a configuration management service, a configuration management shared library, and configuration management tools. The entire system is built around the core goal of "configuration-driven business," possessing the capability of "build once, deliver in multiple forms," ​​supporting unified management across hardware platforms and different business scenarios, and realizing closed-loop management of the entire configuration process from definition to execution.

[0052] 1. Configuration Management Service

[0053] The configuration management service is the core of the configuration management system, including the view building module, hot reloading module, and notification module. It is responsible for building a unified view, monitoring real-time directory updates, and sending change signals.

[0054] 1.1 View Building Module

[0055] The view building module employs a multi-level strategy merging engine to transform scattered configuration strategies into a unified runtime view.

[0056] 1.1.1 Sorting of configuration files

[0057] A three-level priority (directory priority → file numeric priority → ASCII character order) sorting algorithm is used to sort the configuration files in the system.

[0058] (1) Directory priority

[0059] Directory configurations are sorted in ascending order based on user-defined directory weight values. Directories with lower weight values ​​have lower priority, and directories with higher weight values ​​have higher priority. Configuration files in high-priority directories will overwrite the configuration files in low-priority directories.

[0060] The directories where configuration files are stored include the baseline directory ( / etc / kylin-config / base) and the production directory ( / etc / kylin-config / industry / ). Users can use visual tools to increase, decrease, or adjust the directory weight values ​​of configuration files to change directory priority.

[0061] (2) File numeric priority → ASCII character order

[0062] The file name convention for configuration files is defined, using a number-character file name format. The configuration management service will scan the configuration files in each directory sequentially, and sort the configuration files in each directory after scanning.

[0063] The sorting rules are as follows: Numerical priority levels are extracted from filenames using regular expressions. Files are then sorted in ascending order of numerical priority. If numerical priority levels are the same, a string comparison algorithm is used to compare the characters in each filename after removing the numbers, sorting them according to ASCII character order (AZ, az). The final sorting algorithm produces an ordered list of configuration files with lower priority first and higher priority last. The final file list is arranged with lower numerical priority first and higher numerical priority last. For files with the same numerical priority, the first letter with the smaller ASCII code (a) comes first, followed by the first letter with the larger ASCII code (z).

[0064] 1.1.2 Configuration File Parsing

[0065] Multi-threaded parsing of all configuration files; the configuration management system has standardized and enhanced the YAML format configuration files, adding application name and configuration version declaration fields to the original configuration structure to support more granular configuration management.

[0066] The specific implementation is as follows:

[0067] Based on the libyaml-cpp parsing library, secondary development was carried out. During the parsing of YAML format configuration files, the logic for extracting and marking application name (app_name), version number (version), and permissions (permission) was added. During parsing, the child nodes of the root node app_name are required to have the version field. At the same time, the permission field of each level is automatically inherited and marked through the permission stack mechanism. Child configuration items in a configuration group that do not declare the permission field will inherit the permission field of the configuration group (child nodes can override the permissions of the parent node).

[0068] The path tracking records the absolute position of each child node (e.g., app.version.group.key). Each configuration item or configuration group has an absolute path for a key, including the application name, version number, and group names at each level. This is a branch on a tree. The final output is the application name, version number, and permission mapping table with the path as configuration data. This ensures the accuracy of permission inheritance and hierarchy. The configuration data is stored in memory for subsequent merging and overwriting to generate a unified view.

[0069] Furthermore, in the configuration file parsing process, a layered verification mechanism is adopted to intercept configuration files that do not declare required fields or have non-compliant formats in real time, and to record detailed error logs (including file paths, missing fields and other key information).

[0070] 1.1.3 Generating a unified view

[0071] Based on the ordered list of configuration files, the system recursively reads the configuration data from each configuration file and overwrites the corresponding fields in the unified view. If a field is new, the corresponding configuration data is directly added to the unified view. The merging and overwriting process is controlled through permission verification and conflict resolution mechanisms.

[0072] In one implementation, the purpose of permission verification is to add dual permission definitions to each configuration file, namely, superimposed control permissions and configuration modification permissions.

[0073] ①Overlay control permissions

[0074] For configuration items marked with the final flag, they are locked the first time they are encountered in the merge chain, and subsequent files skip this configuration item;

[0075] For configuration items marked with the stable flag, the configuration file is locked after the system-level (files under / etc / kylin-config / ) has been overwritten, and user-level files (files under the user's home directory) skip the configuration file;

[0076] For unmarked configuration items, allow them to be stacked completely.

[0077] ② Configure modification permissions

[0078] Configuration items marked with "public" are public configurations and can be modified by any user.

[0079] For configuration items marked as private, the operator's identity is verified through the RBAC module when making modifications.

[0080] In one implementation, the conflict resolution mechanism arbitrates conflicts arising from unified configuration data in different configuration files.

[0081] When a type conflict occurs, the base declaration type is forced to be used, and the configuration data in the custom files (referring to configuration files in directories other than the basic directory) is discarded;

[0082] When a value conflict occurs, the system automatically clamps to the nearest valid value.

[0083] When object structure conflicts occur, recursively merge and mark the conflicting nodes;

[0084] When permission conflicts occur, the principle of final > stable applies to the stacking of control permissions, while the principle of private > public applies to configuration modification permissions.

[0085] 1.2 Hot-loading module

[0086] The hot reloading module listens for changes in the configuration file storage directory through inotify. When a file is changed, it triggers a difference merge, notifies the view building module to execute a process to generate a unified view from the differing configuration files, and sends a signal to all applications that are interested in the changes through the notification module after the update is complete.

[0087] 1.3 Notification Module

[0088] The notification module is responsible for sending signals to applications via sockets to notify them of changes to the unified view. The notification module allows applications to subscribe to change signals for specified configuration items, sending notifications to applications that are subscribed to those configuration items when a configuration change occurs in the unified view.

[0089] 2. Configure and manage shared libraries

[0090] The configuration management shared library provides API interfaces for communicating with the configuration management service. These API interfaces are used to read data from various fields in the configuration data from the unified view built by the configuration management service, register and subscribe to change signals with the service, and modify configuration values, etc.

[0091] 3. Configuration Management Tools

[0092] Configuration management tools include command-line tools, configuration file conversion tools, compatibility testing tools, and visual management tools.

[0093] Command-line tools manage configuration data in the unified view by calling the API interface of the configuration management shared library, such as reading and writing, reloading the unified view, and exporting the view.

[0094] The configuration file conversion tool supports converting configuration files in ini, conf, json, and schema.xml formats into yaml format.

[0095] The compatibility testing tool can detect conflicts between custom files and baseline files, allowing customers to self-check the compliance of their custom configuration files. Baseline files refer to files in the `basic` directory. Files in directories other than `basic` are custom files, which are configuration files with the same name as baseline files but stored in custom directories (not `basic` directories).

[0096] The visual management tool has the capabilities of a command-line tool, which can centrally present configuration data in a unified view and supports selecting the level (i.e., directory level) for display, allowing you to view the view data superimposed on each level in the overlay process.

[0097] Based on the above, a configuration management system with customized overlay and access control is proposed. It forms a complete configuration management technology system in three aspects: management services, configuration management shared library, and configuration management tools.

[0098] First, the configuration file is strictly bound to the YAML specification, and structural and type constraints are added on top of the YAML format. Access permissions for configuration items are controlled through metadata tags. Configuration at each level is stored in predefined system paths, forming a clear storage hierarchy that ensures orderly management and flexible expansion of configuration data.

[0099] Secondly, this invention develops a dynamic view generation service to achieve real-time configuration integration and conflict resolution. This engine captures configuration file change events in real time through a file monitoring service, employs a minimal incremental parsing algorithm to improve processing efficiency, and executes an intelligent conflict arbitration strategy to ensure that the system can automatically select the correct configuration value when conflicts exist among multiple configuration sources. The conflict resolution mechanism uses the baseline configuration as a safety net, prioritizing the stable operation of the application while respecting the overriding rules of high-priority configurations, thus providing technical support for configuration overlay.

[0100] Finally, this documentation provides standardized configuration operation interfaces to ensure easy access and management of configurations. These interfaces include an Application Programming Interface (API) supporting atomic transaction operations and configuration change event listening; a Command Line Interface (CLI) providing batch configuration read / write and import / export capabilities; and a Graphical User Interface (GUI) enabling visual management and sandbox simulation of configurations. These three layers of interfaces meet the configuration operation needs of different scenarios, greatly improving the convenience and flexibility of configuration management.

[0101] These key protection points together constitute a complete configuration management solution, fundamentally solving problems such as fragmentation, conflict, and maintenance difficulties in traditional configuration management, and providing strong support for agile customization and unified maintenance of the system.

[0102] Furthermore, this embodiment establishes a layered and decoupled configuration management system, enabling precise control and flexible application of configurations, and generating multifaceted technical value.

[0103] In terms of performance, the self-developed high-efficiency storage architecture, combined with the intelligent caching mechanism, significantly reduces the latency of configuration data access. Compared with traditional configuration solutions, query speed is improved by more than 15%, and data write efficiency is improved by about 5%. This optimization directly improves system responsiveness and user experience.

[0104] In terms of flexibility, the module supports multi-level configuration overlay and custom rule definition, adapting to various configuration scenarios ranging from simple parameter settings to complex multi-module linkage. Multi-dimensional permission control strategies ensure configuration security and compliance, preventing configuration changes at different levels from interfering with each other.

[0105] In terms of maintainability, the unique configuration version rollback function enables the system to quickly locate and resolve configuration problems, reducing the system failure rate caused by configuration errors by 80%. The unified configuration view generation mechanism simplifies the management complexity of cross-component configurations and significantly reduces maintenance costs.

[0106] In terms of business value, this module supports a flexible deployment mode of "build once, deliver in multiple forms," ​​and achieves dynamic switching and parameter tuning of functions through configuration-driven implementation, greatly improving the efficiency of system customization. Practice shows that after adopting this module, the project customization cycle has been shortened by 40%, the configuration conflict rate has been reduced by 65%, and the binary homogeneity rate has been increased to over 95%.

[0107] Example 2

[0108] Building upon the customized overlay and access control configuration management system proposed in Example 1, this paper further demonstrates the system-level application and single-application implementation process of the configuration management system. Taking the power management of Kylin System V10 SP1 as an example, the implementation process first prepares a basic configuration file, defines the sub-functions of power management (sleep, hibernation, shutdown, etc.), and stores it in the baseline directory. When customization is required, the configuration file is copied and modified (e.g., disabling hibernation function), and stored in the corresponding hierarchical directory (e.g., the project directory). After the configuration service detects the change, it merges the configurations according to the priority rules (user > domain controller > project > production line > baseline), resolves conflicts, and generates a unified view. The application reads this view through the API to execute the corresponding business, realizing functional customization without modifying the code and ensuring binary homogeneous delivery.

[0109] The following is a further detailed description of this embodiment:

[0110] Step 1: Prepare the relevant configuration files for the power management function. The configuration files should follow a standardized configuration scheme file format and include sub-function configuration items for power management, such as sleep, hibernation, shutdown, and restart functions. These sub-functions are enabled by default.

[0111] Step 2: Place the configuration file prepared in Step 1 into the baseline directory ( / etc / kylin-config / basic).

[0112] Step 3: Copy the power management configuration file and customize the sub-functions. For example, change the hibernation function to be disabled.

[0113] Step 4: Place the custom files in the specified directory according to the source of the customization requirements. For example, if the power pipe is customized for the project, place it in / etc / kylin-config / project.

[0114] Step 5: The unified configuration solution service detects changes to the configuration files in the directory and performs a view update operation.

[0115] Step Six: The unified configuration scheme reads the relevant configuration files for power management functions in all directory levels, overwrites the baseline configuration with the customized configuration according to the predetermined hierarchical overlay rules, and updates the new configuration of power management functions to the unified view after resolving conflicts. At this time, the hibernation function is in the disabled state in the unified view.

[0116] Step 7: The power management-related applications in the system are modularized to enable configuration-driven business operations, read configuration data through tools provided by the unified configuration scheme, and execute corresponding business operations.

[0117] The technical solutions of the present invention have now been described. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions resulting from these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A configuration management system with customized overlay and access control, characterized in that, This includes configuration management services, configuration management shared libraries, and configuration management tools. The configuration management service is used to build a unified view based on the configuration data of the configuration file, and to monitor real-time updates of the directory to which the configuration file belongs and send change signals. The configuration management shared library is connected to the configuration management service information and is used to provide an API interface for communicating with the configuration management service. The API interface is used to read data from each field of the configuration data in the unified view built by the configuration management service, register and subscribe to change signals with the service, and modify the configuration value. The configuration management tool is connected to the configuration management service and the configuration management shared library, and includes a command-line tool, a configuration file conversion tool, a compatibility testing tool, and a visual management tool to assist in the execution of the configuration management service and the configuration management shared library; The configuration management service includes a view building module, a hot reloading module, and a notification module connected in sequence. The view building module is used to transform the scattered configuration strategies in the configuration file into a unified view. The view building module achieves configuration file sorting, configuration file parsing to obtain configuration data, and unified view generation through three processes: configuration file sorting, configuration file parsing to obtain configuration data, and unified view generation based on configuration data. The generation of the unified view includes: Based on the ordered list of configuration files obtained by sorting the configuration files, the configuration data of each configuration file is recursively read and overwritten into the corresponding fields of the unified view. If it is a new field, the configuration data corresponding to the field is directly added to the unified view. During the overwriting process, the merging and overwriting process is controlled by permission verification and conflict resolution mechanisms. The purpose of the permission verification is to add dual permission definitions to each configuration file, namely, superimposed control permissions and configuration modification permissions. The conflict resolution mechanism arbitrates conflicts that occur in the unified configuration data in different configuration files; The permission verification adds superimposed control permissions and configuration modification permissions to each configuration file. The overlay control permissions include: For configuration items marked with the final flag, they are locked the first time they are encountered in the merge chain, and subsequent files skip this configuration item; For configuration items marked with the stable flag, the configuration item is locked after system-level overriding is completed, and user-level files skip the configuration item. For unmarked configuration items, allow stacking; The configuration modification permissions include: For configuration items marked "public", any user can modify them; For configuration items marked as private, the operator's identity is verified through the RBAC module when making modifications.

2. The configuration management system for customized overlay and access control according to claim 1, characterized in that, The configuration files are sorted using a sorting algorithm that combines directory priority, file numeric priority, and ASCII character order. The directory priority sorting algorithm includes sorting in ascending order according to the user-preset directory weight value, and the configuration files of high-priority directories will cover the configuration file content of low-priority directories. The file numeric priority and ASCII character order sorting algorithm includes defining the file name specification for configuration files, naming them in the format of numbers and characters, and the configuration management service sequentially scanning the configuration files in each directory. After scanning each directory, the configuration files in the directory are sorted. The sorting rule is as follows: extract the numeric priority corresponding to the numbers in the file name using regular expressions, and sort them in ascending order of numeric priority. If the numeric priorities are the same, compare the characters in each file name after removing the numbers using a string comparison algorithm, and sort them according to ASCII character order. Finally, an ordered list of configuration files with low priority first and high priority last is obtained.

3. The configuration management system for customized overlay and access control according to claim 2, characterized in that, When parsing the configuration file: Based on the libyaml-cpp parsing library, secondary development was carried out. During the parsing process of YAML format configuration files, the logic for extracting and marking application name app_name, version number version, and permissions was added. During parsing, the child nodes of the root node app_name are forced to be the version field. At the same time, the permission fields of each level are automatically inherited and marked through the permission stack mechanism. The path tracing is used to record the absolute position of each child node, and the final output is the application name, version number, and permission mapping table with path as configuration data.

4. The configuration management system for customized overlay and access control according to claim 1, characterized in that, The hot-loading module monitors changes to the configuration file storage directory through inotify. When a file is changed, it triggers a difference merging process and notifies the view building module to execute a unified view generation process on the differing configuration files.

5. The configuration management system for customized overlay and access control according to claim 1, characterized in that, The notification module is used to send a signal to the application via socket after the unified view is updated, informing it of the change in the unified view.

6. A configuration management system for customized overlay and access control according to claim 5, characterized in that, The configuration management tools include command-line tools, configuration file conversion tools, compatibility testing tools, and visual management tools; The command-line tool manages configuration data in the unified view by calling the API interface of the configuration management shared library; The configuration file conversion tool supports converting configuration files in ini, conf, json, and schema.xml formats into yaml format; The compatibility testing tool is used to detect whether there are conflicts between the customized file and the baseline file, and supports customers to self-check whether the customized configuration file is compliant. The visualization management tool is used to centrally present configuration data in a unified view and supports directory-level display.

Citation Information

Patent Citations

  • Data management system

    CN117807617A

  • Intelligent document updating processing method and system

    CN120471039A