Software configuration method and device
By building a distributed configuration database and message publishing subscription center in the software configuration management system, introducing machine learning classifiers and configuration dependency trees, combining grammar analyzers and integrity verification, the dependency management and consistency problems of traditional configuration management systems in the processing of complex configuration projects are solved, and intelligent and reliable configuration management is realized.
Patent Information
- Application Number
- CN202510026272.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-08
AI Technical Summary
Traditional software configuration management systems lack systematic management of dependencies when dealing with complex configuration projects, resulting in consistency problems in the configuration update process, and lack of intelligent configuration classification mechanisms and complete version control systems.
By building a distributed configuration database and message publishing and subscription center, we can achieve traceability and real-time synchronization of configuration changes. A machine learning classifier is introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration project template to manage complex dependencies between key configuration projects. Use the configuration version linked list and historical repository to achieve accurate tracking of configuration status, and combine a syntax analyzer and integrity verification to ensure the reliability of configuration updates.
It realizes intelligent and reliable configuration management, breaks through the limitations of traditional static configuration management, can effectively manage the configuration of complex software systems, and improves the reliability and efficiency of configuration management.
Smart Images

Figure CN119415143B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a software configuration method and device. Background Art
[0002] Traditional software configuration management systems usually use static configuration files, which are obviously insufficient in scenarios where configuration items are complex and versions change frequently. Existing configuration methods often lack systematic management of dependencies between configuration items, which easily leads to consistency issues during configuration updates.
[0003] At the same time, the existing system has limitations in configuration classification and feature extraction. Traditional methods lack an intelligent configuration classification mechanism, making it difficult to effectively identify and manage key configuration items. The system is also relatively simple in configuration change tracking and status synchronization, and has failed to establish a complete version control system.
[0004] In addition, existing technologies also have problems with the reliability and real-time nature of configuration updates. There is a lack of strict syntax checking and integrity verification mechanisms, and the notification distribution mechanism for configuration updates is not perfect, which affects the overall availability of the system. Solving these problems is of great significance to improving the reliability and efficiency of software configuration management. Summary of the invention
[0005] In response to the problems in the prior art, the present application provides a software configuration method and device that can break through the limitations of traditional static configuration management and provide an intelligent and reliable configuration management solution for complex software systems.
[0006] In order to solve at least one of the above problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a software configuration method, comprising:
[0008] Construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, extract the subscription module identifier from the configuration change record table to generate a configuration subscription module list;
[0009] Input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table according to the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree according to the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database;
[0010] Receive a configuration update instruction, write the current configuration data into a historical version library, use a syntax analyzer to perform syntax verification on the updated configuration content, read a list of key configuration items from the configuration item dependency tree, perform integrity verification on the updated configuration content based on the list of key configuration items, write the updated configuration content that passes the verification into the distributed configuration database, send a configuration update message to the subscription module according to the configuration subscription module list, and the subscription module loads the updated configuration content from the distributed configuration database after receiving the configuration update message.
[0011] Further, generating a configuration change record table in the message publishing and subscription center, writing the configuration update history record into the configuration change record table, and constructing a configuration version linked list based on the configuration change record table, includes:
[0012] Constructing a configuration change record data structure, setting a configuration identification field, a change time field, a change content field, an operator field, an environment identification field, and a subscription module field in the data structure, creating a configuration change record table in a relational database according to the data structure, and performing version number auto-increment management on the records in the configuration change record table based on a trigger mechanism;
[0013] A queue data structure is used to sort and store the change records in the configuration change record table, a chain reference relationship between configuration versions is established according to the version number, the chain reference relationship is written into a version control table, and the configuration versions in the version control table are traversed in chronological order to generate a configuration version chain list.
[0014] Furthermore, synchronizing the configuration status information to the distributed configuration database according to the configuration version linked list, and extracting the subscription module identifier from the configuration change record table to generate a configuration subscription module list includes:
[0015] Traversing the version nodes in the configuration version linked list to obtain the configuration version number, reading the configuration status information from the version control table according to the configuration version number, storing the configuration status information in the cache layer in the form of key-value pairs, writing the configuration status information in the cache layer into the configuration status table of the distributed configuration database, and establishing a configuration item index in the configuration status table;
[0016] The subscription module field value is read from the configuration change record table, the subscription module field value is deduplicated to obtain a subscription module identification set, a subscription relationship mapping table is established according to the subscription module identification set, and the subscription relationship mapping table is written into a distributed configuration database to generate a configuration subscription module list.
[0017] Furthermore, the inputting of the configuration feature parameters into the machine learning classifier for classification, generating configuration category labels, and establishing a mapping relationship table according to the configuration feature parameters and the configuration category labels include:
[0018] A hierarchical clustering algorithm is used to preprocess the configuration feature parameters, the configuration feature parameters are standardized to obtain a normalized feature vector, the normalized feature vector is input into a support vector machine classifier, a feature space mapping of the normalized feature vector is calculated based on a kernel function, and the feature space mapping is classified according to a maximum margin hyperplane principle to obtain a configuration category label;
[0019] Construct a mapping table structure in a relational database, set a feature parameter field and a category label field in the mapping table structure, write the configuration feature parameters and the configuration category labels into the mapping table structure in a one-to-one correspondence, and create an index for the records in the mapping table structure to generate a mapping relationship table.
[0020] Further, matching and screening the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generating a configuration item dependency tree according to the reference relationship between the key configuration items, and writing the configuration item dependency tree into the distributed configuration database includes:
[0021] Read configuration information from the mapping relationship table, perform regular expression matching on the configuration information and a preset key configuration item template, extract configuration item identifiers that have successfully matched, classify and aggregate the configuration item identifiers to obtain a key configuration item set, and assign a unique identification code to each configuration item in the key configuration item set;
[0022] A depth-first search algorithm is used to traverse the key configuration item set, the configuration content of each configuration item is parsed to extract the identifiers of other referenced configuration items, a directed acyclic graph data structure is constructed to record the reference relationship between the configuration items, and the directed acyclic graph is serialized and written into the dependency table of the distributed configuration database to generate a configuration item dependency tree.
[0023] Further, the reading of a list of key configuration items from the configuration item dependency tree, performing integrity verification on the updated configuration content based on the list of key configuration items, and writing the updated configuration content that passes the verification into the distributed configuration database includes:
[0024] Reading a configuration item dependency tree from a dependency table of a distributed configuration database, performing hierarchical traversal on the configuration item dependency tree to extract key configuration item identifiers, constructing a verification rule set according to the key configuration item identifiers, parsing the updated configuration content into configuration item key-value pairs, and performing item-by-item matching verification on the configuration item key-value pairs and the verification rule set;
[0025] The configuration item key-value pairs that pass the integrity check are written into the configuration content table of the distributed configuration database, a configuration item index is established in the configuration content table, the configuration version information in the configuration status table is updated, and the configuration version information is synchronized to the version control table.
[0026] Further, sending a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loading the updated configuration content from the distributed configuration database after receiving the configuration update message, includes:
[0027] Read a configuration subscription module list from a distributed configuration database, obtain a subscription module identifier set in the configuration subscription module list, build a message queue channel according to the subscription module identifier set, encapsulate the configuration version number and the configuration update timestamp into a configuration update message, and deliver the configuration update message to the subscription module through the message queue channel;
[0028] A configuration loading thread is created in the subscription module. The configuration loading thread listens to the message queue channel to receive configuration update messages, queries the configuration content table of the distributed configuration database according to the configuration version number in the configuration update message, reads the updated configuration content from the configuration content table and loads it into the memory cache of the subscription module.
[0029] In a second aspect, the present application provides a software configuration device, comprising:
[0030] A subscription storage module is used to construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, and extract a subscription module identifier from the configuration change record table to generate a configuration subscription module list;
[0031] A mapping dependency module is used to input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table according to the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree according to the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database;
[0032] The dynamic configuration module is used to receive configuration update instructions, write current configuration data into a historical version library, perform syntax verification on the updated configuration content using a syntax analyzer, read a list of key configuration items from the configuration item dependency tree, perform integrity verification on the updated configuration content based on the list of key configuration items, write the updated configuration content that passes the verification into the distributed configuration database, send a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loads the updated configuration content from the distributed configuration database after receiving the configuration update message.
[0033] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the software configuration method when executing the program.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the software configuration method when executed by a processor.
[0035] In a fifth aspect, the present application provides a computer program product, comprising a computer program / instruction, which implements the steps of the software configuration method when executed by a processor.
[0036] It can be seen from the above technical solutions that the present application provides a software configuration method and device, which realizes the traceability and real-time synchronization of configuration changes by constructing a distributed configuration database and a message publishing and subscription center. The machine learning classifier is innovatively introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration project template to effectively manage the complex dependencies between key configuration projects. Accurate tracking of configuration status is achieved through the configuration version list and historical version library, and the reliability of configuration updates is ensured by combining a syntax analyzer and integrity check. This method breaks through the limitations of traditional static configuration management and provides an intelligent and reliable configuration management solution for complex software systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 This is one of the flowcharts of the software configuration method in the embodiment of the present application;
[0039] Figure 2 This is a second flowchart of the software configuration method in an embodiment of the present application;
[0040] Figure 3 The third flowchart of the software configuration method in the embodiment of the present application;
[0041] Figure 4 This is a fourth flowchart of the software configuration method in an embodiment of the present application;
[0042] Figure 5 This is a fifth flowchart of the software configuration method in the embodiment of the present application;
[0043] Figure 6 This is a sixth flowchart of the software configuration method in the embodiment of the present application;
[0044] Figure 7 FIG7 is a flowchart of the software configuration method in the embodiment of the present application;
[0045] Figure 8 A structural diagram of a software configuration device in an embodiment of the present application;
[0046] Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0047] Reference numerals:
[0048] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0051] In view of the problems existing in the prior art, the present application provides a software configuration method and device, which realizes the traceability and real-time synchronization of configuration changes by constructing a distributed configuration database and a message publishing and subscription center. The machine learning classifier is innovatively introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration project template to effectively manage the complex dependencies between key configuration projects. Accurate tracking of configuration status is achieved through the configuration version list and historical version library, and the reliability of configuration updates is ensured by combining a syntax analyzer and integrity check. This method breaks through the limitations of traditional static configuration management and provides an intelligent and reliable configuration management solution for complex software systems.
[0052] In order to break through the limitations of traditional static configuration management and provide an intelligent and reliable configuration management solution for complex software systems, this application provides an embodiment of a software configuration method, see Figure 1 , the software configuration method specifically includes the following contents:
[0053] Step S101: construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, extract the subscription module identifier from the configuration change record table to generate a configuration subscription module list;
[0054] Optionally, this embodiment implements a distributed configuration management platform, and its implementation process and logical reasoning process are described in detail below.
[0055] This embodiment first adopts the method of sharding databases and tables to build a distributed configuration database. The configuration data is horizontally sharded according to the business domain, and each shard contains a complete configuration table structure. The configuration table includes a configuration item table, a configuration value table, and a configuration relationship table. The configuration item table stores the meta information of the configuration, such as the configuration key, description, creation time, etc.; the configuration value table stores the specific content of the configuration and supports multiple data types; the configuration relationship table maintains the dependency relationship between configuration items. To ensure data consistency, a two-phase commit protocol is used to process cross-shard transactions.
[0056] Next, we build a message publishing and subscription center, and use a topic tree structure to organize message topics. Each configuration item corresponds to a topic node, and the change message of the configuration item is published to the corresponding topic. Subscribers can subscribe to specific topics or topic wildcards to achieve flexible message subscription. The message center maintains a topic subscription relationship table to record the corresponding relationship between topics and subscribers. When the configuration changes, the change message is pushed according to the subscription relationship.
[0057] In the message publishing and subscription center, the configuration change record table is implemented through the event source mode. This table records all configuration change events in chronological order. Each record contains the event ID, configuration item ID, change type, change content, operation time and operator. Change types include addition, modification, deletion, etc. By scanning the configuration change record table, the configuration status at any point in time can be reconstructed.
[0058] Based on the configuration change record table, this embodiment constructs a version linked list structure. Each version node contains a version number, a change record ID set, a parent version reference, and a status mark. By analyzing the temporal relationship of the change record, related changes are organized into versions. A linked list is formed between versions through parent version references to support version backtracking. The status mark is used to identify whether the version has been released or rolled back.
[0059] During the configuration status synchronization process, first obtain the latest valid version from the version list. Then extract the change records associated with the version and group the changes by configuration item. Merge each group of changes to get the final status of the configuration item. Finally, write the merged result to the status table of the distributed configuration database. The status table uses row-level locks to ensure the correctness of concurrent updates.
[0060] In order to optimize performance, this embodiment adopts an incremental update strategy during state synchronization. By comparing the changes in adjacent versions, only the changed configuration items are synchronized. At the same time, the copy-on-write technology is used to not affect the configuration read operation during the update. This design significantly reduces the data synchronization overhead.
[0061] In terms of configuration subscription management, this embodiment builds a subscription relationship by analyzing the configuration change record table. The subscriber information in the change record is scanned to extract the unique subscription module identifier. The subscription module identifier is associated with the configuration item of interest to generate a configuration subscription module list. The list is stored in a hash table structure to support fast search for subscription relationships.
[0062] This embodiment also implements access control at the configuration item granularity. By adding a permission field in the configuration item table, the configuration access scope of different subscription modules is controlled. When a module requests to subscribe to a configuration, its permission is checked to see if it meets the requirements. This ensures the security of configuration access.
[0063] To handle the consistency of configuration data, this embodiment adopts a multi-version concurrency control mechanism. Each configuration update operation generates a new version number, and the read operation obtains a consistent configuration view through the version number. When a version conflict occurs, the last writer wins strategy is used to resolve the conflict.
[0064] In terms of exception handling, this embodiment implements a complete error recovery mechanism. Configuration update operations remain atomic, either all succeed or all roll back. By saving operation logs, state recovery is supported after system failure. In the case of message push failure, a message retry queue is implemented to ensure that configuration changes can be delivered reliably.
[0065] The design of this embodiment solves the key issues of configuration management in a distributed environment: high availability of configuration data is achieved through a distributed database; traceability of configuration changes is ensured through version control; real-time push of configuration updates is achieved through a message subscription mechanism; and security of configuration access is ensured through fine-grained permission control.
[0066] The comprehensive application of these technologies enables the configuration management system to support the configuration requirements of large-scale distributed applications and provide efficient and reliable configuration management services. The system can handle highly concurrent configuration access requests, ensure the consistency of configuration data, and support real-time update and rollback of configuration.
[0067] Step S102: input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table based on the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree based on the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database;
[0068] Optionally, this embodiment implements a configuration classification and dependency analysis system based on machine learning, and its implementation process and technical principles are described in detail below.
[0069] This embodiment first preprocesses the configuration feature parameters. Feature parameters include the name, path, data type, value range, update frequency, access rights and other attributes of the configuration item. For text features, the TF-IDF algorithm is used to extract keyword features; for numerical features, standardization is performed to normalize the values to the [0,1] interval. After feature processing, a fixed-dimensional feature vector is obtained as the input of the machine learning classifier.
[0070] In terms of classifier selection, this embodiment uses support vector machine (SVM) as the basic classifier. A training set is constructed by analyzing historical configuration data. Each training sample contains a configuration feature vector and a manually annotated category label. The category labels include predefined categories such as system configuration, business configuration, security configuration, and performance configuration. The RBF kernel function is used to construct a nonlinear classifier, and the kernel function parameters are selected through cross-validation optimization.
[0071] During the classification process, the configuration feature vector is mapped to a high-dimensional feature space, and a maximum margin hyperplane is constructed in the feature space for classification. The probability distribution of the configuration item belonging to each category is obtained by calculating the kernel function value of the configuration feature and the support vector of each category. The category with the highest probability is selected as the classification result of the configuration item, and the confidence of the classification is recorded at the same time.
[0072] This embodiment innovatively implements the mapping relationship management between configuration features and category labels. A mapping table is created in a relational database, and the table structure contains fields such as feature ID, feature vector, category label, and classification confidence. For a new configuration item, the feature vector is first extracted, the category is predicted by the classifier, and then the correspondence between the feature and the category is written into the mapping table.
[0073] The identification of key configuration items uses a template matching method. The preset configuration templates define the key attributes and rules of different types of configurations. For example, the database connection configuration must include attributes such as the host address, port, and user name; the cache configuration must specify parameters such as capacity and expiration policy. The configuration items are matched with the template rules through the regular expression engine to extract the key configuration items that meet the rules.
[0074] In dependency analysis, this embodiment implements semantic-based configuration reference detection. By parsing variable references, function calls, and configuration paths in configuration values, the dependencies between configuration items are identified. For example, the service address in the microservice configuration may reference the registry configuration; the data source configuration may reference the encryption configuration to obtain the password. These reference relationships constitute a dependency network between configuration items.
[0075] The dependency tree is constructed using a depth-first search algorithm. Starting from each key configuration item, recursively traverse the configuration items it references, and construct a directed acyclic graph to represent the dependency relationship. The nodes in the graph represent configuration items, the edges represent the reference relationship, and the weight of the edge represents the dependency strength. Topological sorting is used to ensure the correctness of the dependency relationship and avoid circular dependencies.
[0076] This embodiment uses an efficient graph data structure when storing dependency trees. A special graph is created in the distributed configuration database to store dependency relationships. The table structure supports fast node query and path traversal, facilitating dependency analysis and impact range assessment. By establishing node indexes and edge indexes, graph query performance is optimized.
[0077] In order to handle the dependency changes caused by configuration changes, this embodiment implements an incremental update mechanism. When a configuration item changes, only the dependency of the changed configuration item is re-analyzed and the dependency tree is partially updated. This incremental update strategy significantly improves the efficiency of dependency analysis.
[0078] In practical applications, the design of this embodiment effectively solves the configuration classification and dependency management problems in large-scale configuration systems. The machine learning classifier can accurately identify the category of configuration items and support intelligent management of configurations; template-based key configuration identification ensures the reliability of important configuration items; and dependency analysis provides a reliable impact assessment basis for configuration changes.
[0079] The combined application of these technologies significantly improves the intelligence level of configuration management. The system can automatically classify and evaluate the importance of configurations, identify dependencies between configurations, and provide decision support for configuration change management. Especially in the microservice architecture, this intelligent configuration management method greatly reduces the risk of configuration errors.
[0080] Step S103: receiving a configuration update instruction, writing the current configuration data into a historical version library, using a syntax analyzer to perform syntax verification on the updated configuration content, reading a list of key configuration items from the configuration item dependency tree, performing integrity verification on the updated configuration content based on the list of key configuration items, writing the updated configuration content that passes the verification into the distributed configuration database, sending a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loading the updated configuration content from the distributed configuration database after receiving the configuration update message.
[0081] Optionally, this embodiment implements a complete configuration update and verification mechanism, and its implementation process and core technical points are described in detail below.
[0082] This embodiment first receives a configuration update instruction through the configuration management interface. The update instruction contains the update operation type, the target configuration item identifier, the new configuration content, and the operation metadata. The operation metadata records information such as the user who initiated the update, the timestamp, and the update description. After receiving the update instruction, the system first performs a basic check on the instruction format to ensure that the necessary fields are complete.
[0083] Before performing a configuration update, this embodiment uses a snapshot method to save the current configuration state. Create a historical version record, including the version number, timestamp, configuration content, and operation record. To optimize storage space, the historical version uses an incremental storage method to only record the changed configuration items. The historical version library uses time partition storage to facilitate quick retrieval of historical records by time range.
[0084] The parser of this embodiment adopts a multi-stage verification strategy. First, lexical analysis is performed to decompose the configuration content into a sequence of tokens to verify the naming conventions, data types, and value formats of the configuration items. Then, grammatical analysis is performed to check whether the configuration structure conforms to the predefined grammatical rules. For example, JSON format configuration checks bracket matching and key-value pair integrity; YAML format configuration checks indentation levels, reference syntax, etc.
[0085] During the syntax analysis process, this embodiment implements a context-aware verification mechanism. According to the type of configuration item and the application scenario, the corresponding verification rules are dynamically loaded. For example, the database connection configuration needs to verify the URL format and connection parameter syntax; the cache configuration needs to verify the capacity unit, expiration time format, etc. This scenario-based verification ensures the correctness of the configuration syntax.
[0086] Integrity verification is the core innovation of this embodiment. First, a list of key configuration items is extracted from the configuration item dependency tree to build a verification context. The verification context contains the necessary attributes, dependencies, and constraints of the configuration items. Based on this context, the system performs multi-dimensional integrity checks.
[0087] In the attribute integrity check, verify whether the updated content contains all necessary configuration items and attributes. By traversing the list of key configuration items, check the existence and validity of each necessary attribute against the updated content. For optional attributes, verify whether their values meet the preset constraints.
[0088] Dependency verification is an important part of integrity verification. This embodiment ensures the consistency of related configurations by analyzing the configuration project dependency tree. For example, when updating a service configuration, verify that the middleware configuration it depends on exists and is valid; when modifying a security configuration, check whether the service using the configuration needs to be updated synchronously.
[0089] This embodiment innovatively implements configuration value domain verification. By establishing a value domain model for configuration items, the rationality of configuration values is verified. The value domain model contains constraints such as value range, enumeration value set, and numerical precision. For example, the number of core threads configured in the thread pool cannot be greater than the maximum number of threads; the retry interval must be within a reasonable range.
[0090] The verified configuration updates are written to the distributed configuration database in a transactional manner. The writing process uses a two-phase commit protocol to ensure data consistency. First, the updated content is written to the preparation area, and after completion, the global write lock is obtained to atomically update the configuration status table and index.
[0091] The configuration update message is sent using a reliable message push mechanism. According to the list of configured subscription modules, the affected subscription modules are identified. An update message containing the version number, summary of the changed content, and timestamp is constructed and pushed to the subscription module through the message queue. The message queue supports message persistence and retry mechanisms to ensure message delivery.
[0092] On the subscription module side, this embodiment implements an intelligent configuration loading mechanism. After receiving the update message, the subscription module first verifies the validity and version number of the message. Then, the update content is loaded from the distributed configuration database according to the configuration identifier. The loading process uses local cache to avoid frequent access to the database.
[0093] The design of this embodiment effectively solves the security and reliability issues in the configuration update process. Through a complete verification mechanism, the risk of configuration errors is reduced; through reliable message push, timely synchronization of configuration updates is ensured; through historical version management, rapid rollback of configuration is supported.
[0094] The combined application of these technologies significantly improves the reliability of configuration management. The system can accurately verify the correctness of configuration updates, reliably synchronize configuration changes, and quickly recover when problems occur. Especially in the microservice architecture, this reliable configuration update mechanism provides an important guarantee for the stable operation of the system.
[0095] From the above description, it can be seen that the software configuration method provided in the embodiment of the present application can achieve traceability and real-time synchronization of configuration changes by constructing a distributed configuration database and a message publishing and subscription center. The machine learning classifier is innovatively introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration project template to effectively manage the complex dependencies between key configuration items. Accurate tracking of configuration status is achieved through the configuration version list and the historical version library, and the reliability of configuration updates is ensured by combining the syntax analyzer and integrity check. This method breaks through the limitations of traditional static configuration management and provides an intelligent and reliable configuration management solution for complex software systems.
[0096] In one embodiment of the software configuration method of the present application, see Figure 2 , and can also include the following:
[0097] Step S201: construct a configuration change record data structure, set a configuration identification field, a change time field, a change content field, an operator field, an environment identification field and a subscription module field in the data structure, create a configuration change record table in a relational database according to the data structure, and perform version number auto-increment management on the records in the configuration change record table based on a trigger mechanism;
[0098] Step S202: Use a queue data structure to sort and store the change records in the configuration change record table, establish a chain reference relationship between configuration versions according to the version number, write the chain reference relationship into a version control table, and traverse the configuration versions in the version control table in chronological order to generate a configuration version chain list.
[0099] Optionally, this embodiment implements a complete configuration change tracking and version management mechanism, and its implementation process and technical principles are described in detail below.
[0100] This embodiment first designs the data structure of the configuration change record. In the relational database, the configuration identification field adopts a composite primary key design, including the configuration item ID and the configuration path, and supports the unique identification of multi-level configurations. The change time field uses a high-precision timestamp to accurately record the time when the configuration change occurs. The change content field is stored in JSON format, including the complete configuration content before and after the change, which is convenient for difference analysis and rollback operations.
[0101] The operator field records the information of the executor of the change operation, including the operator ID, role, and operation source. The environment identifier field is used to distinguish different operating environments, such as development environment, test environment, production environment, etc. The subscription module field adopts an array structure to record all subscribers who are concerned about the change of the configuration item and supports dynamic subscription management.
[0102] This embodiment adopts a partition table design when creating a configuration change record table. The records are partitioned and stored according to the time range, and each partition corresponds to the change record of a time window. This design optimizes the query performance of historical records and facilitates data archiving and cleaning. A composite index of configuration identifier, timestamp and environment identifier is established on the table structure to support efficient multi-dimensional query.
[0103] Version number management is the core innovation of this embodiment. Through the database trigger mechanism, the version number is automatically assigned when a new change record is inserted. The trigger first obtains the latest version number of the configuration item, and then generates a new version number according to the preset rules. The version number adopts an incremental strategy and includes an environment identifier prefix to ensure the uniqueness of the version number in multiple environment scenarios.
[0104] To handle concurrent update scenarios, this embodiment implements a version number lock mechanism. When multiple change operations occur simultaneously, the trigger ensures the atomic increment of the version number through row-level locks. For distributed environments, a global sequence number service is used to generate a monotonically increasing version number to avoid version conflicts.
[0105] The sorting and storage of change records is implemented using a priority queue. The queue is sorted by change timestamp and version number to ensure the time sequence of change records. The queue node contains the key information of the change record and a reference to the complete record. The combination of memory queue and persistent storage achieves efficient record access and persistence guarantee.
[0106] This embodiment innovatively implements chain reference management of configuration versions. Each version node contains a reference pointer to the previous version, forming a version chain table structure. The version node records information such as version number, change summary, parent version reference, etc. By traversing the version chain table, the configuration status at any point in time can be reconstructed.
[0107] The design of the version control table adopts a graph structure storage mode. The table records the reference relationship between version nodes and supports version branching and merging scenarios. Each reference relationship contains information such as source version, target version, reference type, and timestamp. Through this design, the system can support complex version management requirements.
[0108] In the process of building the version list, this embodiment implements an incremental building mechanism. The system maintains the latest status of the version list. When a new change record arrives, it only needs to append the corresponding version node to the end of the list. This incremental update strategy significantly improves the efficiency of version management.
[0109] To ensure the consistency of version data, this embodiment implements a version synchronization mechanism. In a distributed environment, the synchronous update of version information is guaranteed by a two-phase commit protocol. When the version information changes, the system first writes the update to the local node, and then coordinates all nodes to complete global synchronization.
[0110] The design of this embodiment effectively solves the complexity of configuration version management. Through a complete change record structure, the system reliably tracks the configuration change history; through efficient version number management, the correctness of the version sequence is ensured; through a chain reference structure, flexible version backtracking and branch management are supported.
[0111] The combined application of these technologies significantly improves the traceability and controllability of configuration management. The system can accurately record and manage the history of configuration changes, support accurate backtracking of configuration status, and provide a reliable version control foundation for configuration management. Especially in complex microservice architectures, this precise version management mechanism provides a strong guarantee for the orderly evolution of system configuration.
[0112] In one embodiment of the software configuration method of the present application, see Figure 3 , and can also include the following:
[0113] Step S301: traverse the version nodes in the configuration version linked list to obtain the configuration version number, read the configuration status information from the version control table according to the configuration version number, store the configuration status information in the cache layer in the form of key-value pairs, write the configuration status information in the cache layer into the configuration status table of the distributed configuration database, and establish a configuration item index in the configuration status table;
[0114] Step S302: Read the subscription module field value from the configuration change record table, deduplicate the subscription module field value to obtain a subscription module identification set, establish a subscription relationship mapping table according to the subscription module identification set, and write the subscription relationship mapping table into a distributed configuration database to generate a configuration subscription module list.
[0115] Optionally, this embodiment implements a set of efficient configuration status synchronization and subscription management mechanisms, and its implementation process and technical principles are described in detail below.
[0116] This embodiment first implements the traversal operation of the configuration version list. The iterator mode is used to traverse the version list, and each version node contains a version number, a timestamp, and a status mark. A double buffering mechanism is used during the traversal process to cache the version information to be processed in the memory to avoid frequent version data reading. In order to process large-scale version data, a batch processing mechanism is implemented, and a fixed number of version nodes are processed in each batch.
[0117] The version control table is read using a multi-level cache strategy. First, check whether the local cache has the status information of the target version. If it exists, return it directly; otherwise, query the distributed cache and finally return to the source of the version control table. The cache uses the LRU elimination strategy to dynamically adjust the cache content according to the version access frequency. For hot version data, the system will actively preload it into the cache.
[0118] The cache storage of configuration status information is the core innovation of this embodiment. The cache layer adopts a layered architecture, including local memory cache and distributed cache. The key of the key-value pair is composed of the configuration item identifier and the version number, and the value contains the configuration content and metadata. To ensure cache consistency, the update-on-write strategy is implemented. When the configuration changes, all cache nodes are updated at the same time.
[0119] This embodiment implements a version-aware mechanism in cache management. Each cache entry contains a version tag, and the validity of the cache is determined by comparing the version number. When a version inconsistency is detected, the system triggers a cache refresh and reloads the configuration status from the authoritative data source. This mechanism ensures the consistency of cache data in a distributed environment.
[0120] The design of the configuration status table adopts a shard storage strategy. It is horizontally sharded according to the business attributes of the configuration items, and each shard contains the associated configuration status information. The table structure optimizes read and write performance and contains fields such as configuration item identification, version number, status value, and update time. By establishing a composite index, multi-dimensional status query is supported.
[0121] This embodiment innovatively implements a configuration item indexing mechanism. The index structure uses a B+ tree to support fast location and range query of configuration items. The index item contains the configuration item path, version number, and status location information. Through the index, the system can efficiently locate and access configuration status data. The index update is asynchronous to avoid affecting the performance of the main process.
[0122] In terms of subscription management, this embodiment implements an efficient subscription information processing mechanism. By scanning the configuration change record table, the value of the subscription module field is extracted. The bitmap algorithm is used to deduplicate the subscription module identifier, which significantly reduces memory usage. The deduplicated results are stored in an ordered set to facilitate subsequent subscription relationship management.
[0123] The design of the subscription relationship mapping table adopts a graph structure. The table records the many-to-many relationship between configuration items and subscription modules, supporting complex subscription scenarios. Each mapping relationship contains attributes such as subscription conditions, notification policies, and priorities. Through this design, the system can flexibly manage subscription relationships and support dynamic subscription and unsubscription operations.
[0124] This embodiment implements an incremental update mechanism during the subscription list generation process. The system maintains the latest status of the subscription relationship, and when a subscription relationship change is detected, only the changed part is updated. This incremental update strategy significantly improves the efficiency of subscription management and reduces data synchronization overhead.
[0125] To ensure the reliability of subscription data, this embodiment implements a backup mechanism for subscription relationships. Subscription relationship data is backed up to persistent storage regularly to support the recovery of subscription relationships. When a subscription management service fails, the subscription status can be quickly restored from the backup.
[0126] The design of this embodiment effectively solves the complexity of configuration status synchronization and subscription management. Through the multi-level cache mechanism, the configuration status access performance is improved; through the efficient index structure, fast configuration query is supported; through flexible subscription management, accurate push of configuration changes is achieved.
[0127] The combined application of these technologies significantly improves the performance and reliability of the configuration management system. The system can efficiently synchronize and manage configuration status, accurately maintain subscription relationships, and provide reliable technical support for configuration management of distributed systems. Especially in large-scale microservice architectures, this efficient state synchronization and subscription mechanism provides an important guarantee for the stable operation of the system.
[0128] In one embodiment of the software configuration method of the present application, see Figure 4 , and can also include the following:
[0129] Step S401: preprocessing the configuration feature parameters using a hierarchical clustering algorithm, normalizing the configuration feature parameters to obtain a normalized feature vector, inputting the normalized feature vector into a support vector machine classifier, calculating a feature space mapping of the normalized feature vector based on a kernel function, and classifying the feature space mapping according to the maximum margin hyperplane principle to obtain a configuration category label;
[0130] Step S402: construct a mapping table structure in a relational database, set a feature parameter field and a category label field in the mapping table structure, write the configuration feature parameters and the configuration category labels into the mapping table structure in a one-to-one correspondence, and index the records in the mapping table structure to generate a mapping relationship table.
[0131] Optionally, this embodiment implements a configuration classification system based on machine learning, and its implementation process and technical principles are described in detail below.
[0132] This embodiment first uses a hierarchical clustering algorithm to preprocess the configuration features. Feature parameters include attributes such as the name, path, data type, update frequency, and access rights of the configuration item. For text features, the TF-IDF algorithm is used to extract keyword features; for numerical features, minimum-maximum normalization is performed. The hierarchical clustering process adopts a bottom-up agglomeration strategy, first treating each configuration item as an independent cluster, and then gradually merging similar clusters.
[0133] In terms of distance metric selection, this embodiment uses different distance calculation methods for different types of features. Cosine similarity is used for text features, Euclidean distance is used for numerical features, and Hamming distance is used for category features. By combining these distance metrics, a hybrid distance function is constructed to accurately evaluate the similarity between configuration items.
[0134] Feature standardization is a key step to ensure classification results. This embodiment implements an adaptive standardization processing mechanism. For features of different dimensions, Z-score standardization or minimum-maximum standardization is used. The standardization parameters are selected through cross-validation optimization to ensure that the processed feature distribution is suitable for subsequent classification. The standardization process takes into account the distribution characteristics of the features and performs logarithmic transformation on skewed distribution features.
[0135] This embodiment innovatively implements a method for constructing feature vectors. Different types of features are converted into numerical vectors of fixed dimensions to ensure the consistency of vector dimensions. For high-dimensional sparse features, principal component analysis is used to reduce the dimension and retain the main feature information. The vector construction process supports incremental updates, and newly added configuration features can be dynamically integrated into the existing feature space.
[0136] The core of the support vector machine classifier is the selection of kernel function. This embodiment uses radial basis function (RBF) as the kernel function, and maps the feature vector to a high-dimensional feature space through the kernel function. The kernel function parameters are optimized and selected through grid search and cross-validation to balance classification performance and generalization ability. For nonlinearly separable configuration features, the RBF kernel function can effectively capture the nonlinear relationship between features.
[0137] In the feature space mapping process, this embodiment implements a computational optimization mechanism. The kernel technique is used to avoid explicit calculation of high-dimensional feature space and reduce computational complexity. For large-scale data sets, random feature mapping is used to approximate kernel function calculation to improve processing efficiency. The feature mapping process supports parallel computing and fully utilizes multi-core processing capabilities.
[0138] The maximum margin hyperplane is constructed using the sequential minimum optimization algorithm. The optimal classification boundary is constructed by iteratively optimizing the weights of the support vectors. In order to deal with the problem of class imbalance, a weight factor is introduced to adjust the penalty parameters of different categories. The classification process uses a one-to-many strategy to deal with multi-category problems to ensure the accuracy of classification.
[0139] This embodiment adopts an innovative solution in the design of the mapping table structure. The table structure includes a feature vector field, a category label field, a confidence field, and a timestamp field. The feature vector adopts a compressed storage format to reduce the storage space occupied. The category label includes a primary label and a secondary label, and supports multi-level classification. The confidence field records the credibility of the classification result.
[0140] The storage of mapping relationships uses an efficient indexing mechanism. A joint index of feature vectors and category labels is established to support fast bidirectional queries. The index structure uses a B+ tree to optimize range query performance. For frequently accessed mapping relationships, a cache mechanism is implemented to reduce database access.
[0141] This embodiment implements a dynamic update mechanism for mapping relationships. When new configuration items are added, features are automatically extracted and classified, and mapping relationships are updated. The classification model is retrained regularly to adapt to changes in configuration features. The incremental learning strategy is used to avoid the overhead of full retraining.
[0142] To ensure the reliability of the mapping data, this embodiment implements a data synchronization mechanism. A two-phase commit protocol is used to ensure the consistency of the mapping relationship in a distributed environment. The mapping relationship is backed up regularly to support data recovery. For abnormal situations, a rollback mechanism is implemented to ensure data integrity.
[0143] The design of this embodiment effectively solves the accuracy and efficiency problems of configuration classification. The classification accuracy is improved through reasonable feature processing and classification algorithm selection; the query performance is optimized through efficient storage and indexing mechanisms; and the timeliness of the classification model is ensured through a dynamic update mechanism.
[0144] The combined application of these technologies has significantly improved the intelligence level of configuration management. The system can accurately identify and classify configuration items, providing intelligent decision support for configuration management. Especially in large-scale microservice architectures, this intelligent classification mechanism provides strong support for the organization and management of configurations.
[0145] In one embodiment of the software configuration method of the present application, see Figure 5 , and can also include the following:
[0146] Step S501: reading configuration information from the mapping relationship table, performing regular expression matching on the configuration information and a preset key configuration item template, extracting configuration item identifiers that have been matched successfully, classifying and aggregating the configuration item identifiers to obtain a key configuration item set, and assigning a unique identification code to each configuration item in the key configuration item set;
[0147] Step S502: Use a depth-first search algorithm to traverse the key configuration item set, parse the configuration content of each configuration item to extract the identifiers of other referenced configuration items, build a directed acyclic graph data structure to record the reference relationship between the configuration items, serialize the directed acyclic graph and write it into the dependency table of the distributed configuration database to generate a configuration item dependency tree.
[0148] Optionally, this embodiment implements a complete configuration dependency analysis system, and its implementation process and technical principles are described in detail below.
[0149] This embodiment first implements a configuration information reading mechanism. Configuration information is read in batches from the mapping relationship table, and a large amount of configuration data is processed in batches using a cursor. Local cache is used during the reading process to cache the most recently accessed configuration information and reduce database access overhead. To improve reading efficiency, an asynchronous pre-reading mechanism is implemented to preload the next batch of data while processing the current batch of data.
[0150] The design of key configuration item templates is the innovation of this embodiment. The template adopts a hierarchical structure, including basic templates and scenario-based templates. The basic template defines common configuration item features, such as database connection configuration, cache configuration, etc.; the scenario-based template defines proprietary features for specific business scenarios. The template uses regular expressions to describe the feature patterns of configuration items and supports complex matching rules.
[0151] In the regular expression matching process, this embodiment implements a pattern matching optimization mechanism. First, the regular expression is precompiled to improve the matching efficiency. A multi-pattern matching algorithm is used to match multiple template rules at the same time. For complex matching patterns, a state machine is used to improve matching performance. The matching process supports fault-tolerant processing and allows approximate matching of some features.
[0152] The classification and aggregation of configuration item identifiers adopts a hierarchical strategy. First, coarse-grained classification is performed based on the functional attributes of the configuration items, such as system configuration, business configuration, security configuration, etc. Then, fine-grained aggregation is performed within each category based on the dependencies of the configuration items. The aggregation process considers the importance and relevance of the configuration items to ensure the integrity of key configuration items.
[0153] This embodiment innovatively implements an identification code allocation mechanism. The identification code is designed in segments and includes a category identifier, a service identifier, and a serial number. The global uniqueness of the identification code is ensured by a distributed serial number generator. The identification code design takes readability into consideration for easy management and tracking. For hierarchical configuration items, the identification code reflects their hierarchical relationship.
[0154] The implementation of the depth-first search algorithm uses a combination of recursion and stack. Starting from each key configuration item, recursively traverse the configuration items it references. During the traversal process, access tags are used to avoid circular references, and the traversal path is recorded to build dependencies. In order to handle large-scale configuration items, traversal depth limit and timeout control are implemented.
[0155] Parsing of configuration content is the core of dependency analysis. This embodiment implements a multi-format parser that supports common configuration formats such as JSON, YAML, and Properties. The parser can identify variable references, function calls, and configuration paths in configuration values. For encrypted configurations, a decryption mechanism is implemented to ensure that dependencies in encrypted values are correctly parsed.
[0156] The construction of the directed acyclic graph adopts the adjacency list structure. The nodes in the graph represent configuration items, and the edges represent dependencies. The attributes of the edges include dependency type, weight, and timestamp. To ensure the acyclicity of the graph, a loop detection algorithm is implemented. When adding new edges, loop detection is performed to avoid circular dependencies.
[0157] This embodiment implements an innovative mechanism in the management of graph data structures. A sharding storage strategy is adopted to store graph data in shards according to the relevance of nodes. Incremental updates of graphs are implemented. When configuration dependencies change, only related subgraphs are updated. By establishing node indexes and edge indexes, the query performance of graphs is optimized.
[0158] The serialization process uses a custom serialization format. The serialized data contains the graph topology, node attributes, and edge attributes. A compression algorithm is used to reduce the size of the serialized data. The serialization format supports version control to ensure backward compatibility. A verification mechanism for serialized data is implemented to ensure data integrity.
[0159] The design of the dependency table adopts the graph database mode. The table structure optimizes the storage and query efficiency of graph data. It implements the optimization mechanism of graph traversal and path query. By establishing appropriate indexes, it supports fast dependency query and impact analysis.
[0160] The design of this embodiment effectively solves the complexity problem of configuration dependency analysis. Through precise template matching, key configuration items can be accurately identified; through efficient dependency analysis, a complete dependency graph can be constructed; through an optimized storage structure, dependency management of large-scale configuration systems can be supported.
[0161] The combined application of these technologies significantly improves the reliability of configuration management. The system can accurately analyze and manage the dependencies between configurations, and provide reliable impact assessment for configuration changes. Especially in the microservice architecture, this precise dependency management mechanism provides an important guarantee for the stable operation of the system. When the configuration is changed, the impact scope can be accurately assessed to avoid cascading failures and improve the reliability of the system.
[0162] In one embodiment of the software configuration method of the present application, see Figure 6 , and can also include the following:
[0163] Step S601: reading a configuration item dependency tree from a dependency table of a distributed configuration database, performing hierarchical traversal on the configuration item dependency tree to extract key configuration item identifiers, constructing a verification rule set according to the key configuration item identifiers, parsing the updated configuration content into configuration item key-value pairs, and performing item-by-item matching verification on the configuration item key-value pairs and the verification rule set;
[0164] Step S602: write the configuration item key-value pairs that pass the integrity check into the configuration content table of the distributed configuration database, create a configuration item index in the configuration content table, update the configuration version information in the configuration status table, and synchronize the configuration version information to the version control table.
[0165] Optionally, this embodiment implements a complete set of configuration content verification and synchronization mechanisms, and its implementation process and technical principles are described in detail below.
[0166] This embodiment first implements an efficient reading mechanism for the dependency tree. Distributed cache is used to preload hot dependencies to reduce database access. The reading process uses a read-write separation strategy and provides dependency query services through read-only replicas. To ensure data consistency, a cache synchronization mechanism is implemented to update the cache in a timely manner when dependencies change.
[0167] Hierarchical traversal uses a breadth-first search algorithm. During the traversal process, a queue is used to store the nodes to be processed, and the hierarchical information of the nodes is recorded. For each layer of nodes, its child nodes are processed in parallel to improve traversal efficiency. During the traversal process, access records are maintained to avoid repeated processing of the same node. For large-scale dependency trees, a batch processing mechanism is implemented.
[0168] This embodiment innovatively implements a method for constructing verification rules. Verification rules are automatically generated based on the characteristics and dependencies of configuration items. The rules include multiple dimensions such as data type verification, value range verification, and dependency integrity verification. Verification rules are described in a declarative manner and support complex logical combinations. The rule definition takes into account the business scenarios and usage constraints of configuration items.
[0169] The management of validation rule sets adopts a hierarchical structure. The basic layer contains general data formats and type validation; the business layer contains business rules for specific scenarios; and the association layer handles dependency validation between configuration items. Inheritance and combination are supported between rules to improve the reusability of rules. A dynamic loading mechanism for rules is implemented to support real-time updating of rules.
[0170] Configuration content parsing is a key step in the verification process. This embodiment implements a multi-format parser that supports configuration parsing of nested structures. Syntax checking is performed during the parsing process to identify incorrect formats in the configuration. For encrypted configurations, a secure decryption mechanism is implemented. The parsing results are normalized into a unified key-value pair format for easy subsequent processing.
[0171] Key-value pair matching verification adopts a multi-stage processing strategy. First, basic verification is performed to check the data type and format; then business rule verification is performed to ensure that the configuration meets business constraints; finally, dependency verification is performed to check the integrity of the configuration update. The verification process supports parallel processing to improve verification efficiency.
[0172] This embodiment implements an innovative transaction management mechanism during the configuration writing process. A two-phase commit protocol is used to ensure data consistency in a distributed environment. The write operation is first performed in the preparation area and is submitted to the formal storage area after verification. The atomicity of the write operation is achieved to avoid data inconsistency caused by partial updates.
[0173] The design of the configuration content table optimizes storage efficiency. It adopts a columnar storage structure to support efficient retrieval of configuration content. It implements a data compression mechanism to reduce storage overhead. The table structure supports version management of configuration content and retains the configuration history. The query performance is optimized through the partitioning strategy.
[0174] The index construction adopts a multi-level index strategy. The primary index is based on the configuration item identifier and supports precise query; the secondary index supports fuzzy query based on content. The index update adopts asynchronous mode to avoid affecting the write performance. The incremental update mechanism of the index is implemented, and only the index of the changed part is updated.
[0175] This embodiment implements a reliable mechanism for configuration state synchronization. Optimistic locks are used for state updates to handle concurrent update conflicts. Log records of state changes are implemented to support state backtracking. The state synchronization process supports retry upon failure to ensure the reliability of synchronization.
[0176] The update of the version control table adopts atomic operation. The version information contains metadata such as version number, timestamp, operator information, etc. The maintenance mechanism of the version chain is implemented to record the evolution relationship between versions. Version control supports branch management and adapts to complex configuration management requirements.
[0177] The design of this embodiment effectively solves the reliability problem of configuration updates. The correctness of configuration updates is ensured through a complete verification mechanism; the consistency of configuration data is guaranteed through a reliable storage mechanism; and effective management of configuration is supported through precise version control.
[0178] The combined application of these technologies significantly improves the reliability and efficiency of configuration management. The system can accurately verify the legitimacy of configuration updates, reliably store and synchronize configuration data, and provide strong support for the configuration management of distributed systems. Especially in the microservice architecture, this reliable configuration management mechanism provides an important guarantee for the stable operation of the system. When the configuration is updated, it can ensure data consistency and avoid system failures caused by incorrect configuration.
[0179] In one embodiment of the software configuration method of the present application, see Figure 7 , and can also include the following:
[0180] Step S701: read a configuration subscription module list from a distributed configuration database, obtain a subscription module identifier set in the configuration subscription module list, build a message queue channel according to the subscription module identifier set, encapsulate the configuration version number and the configuration update timestamp into a configuration update message, and deliver the configuration update message to the subscription module through the message queue channel;
[0181] Step S702: Create a configuration loading thread in the subscription module. The configuration loading thread listens to the message queue channel to receive configuration update messages, queries the configuration content table of the distributed configuration database according to the configuration version number in the configuration update message, reads the updated configuration content from the configuration content table and loads it into the memory cache of the subscription module.
[0182] Optionally, this embodiment implements a set of efficient configuration update notification and dynamic loading mechanisms, and its implementation process and technical principles are described in detail below.
[0183] This embodiment first implements a read mechanism for configuring a subscription list. Distributed cache is used to preload active subscription relationships to reduce database access overhead. The read process uses batch query optimization to obtain related subscription information at one time. To ensure data consistency, a regular synchronization mechanism for the subscription list is implemented to promptly reflect changes in subscription relationships.
[0184] The subscription module uses an efficient deduplication algorithm to process the identification set. Bloom filters are used for fast deduplication to reduce memory usage. For large-scale subscription relationships, a batch processing mechanism is implemented. Collection management supports dynamic updates, and changes in subscription relationships can be reflected in real time.
[0185] This embodiment innovatively implements a method for constructing a message queue channel. A topic partitioning strategy is adopted to route messages according to the characteristics of the subscription module. Each subscription module corresponds to an independent message partition, avoiding the performance overhead caused by message broadcasting. Channel construction supports dynamic expansion and can adapt to the increase or decrease of subscription modules.
[0186] Message encapsulation uses a lightweight serialization format. Configuration update messages contain key information such as version number, timestamp, and change range. A message compression mechanism is implemented to reduce network transmission overhead. The message format supports extended fields to facilitate future function expansion. For sensitive information, a message encryption mechanism is implemented.
[0187] This embodiment implements a reliable transmission mechanism for message delivery. A confirmation mechanism is used to ensure message delivery, and retries are performed for messages that fail to be delivered. Message priority management is implemented, and key configuration updates are delivered first. Through the flow control mechanism, message storms are prevented from impacting the system.
[0188] The design of the configuration loading thread adopts the producer-consumer model. The thread pool dynamically manages multiple loading threads and adjusts the number of threads according to the load. An elegant thread start and stop mechanism is implemented to ensure the reliability of configuration loading. Threads pass messages through lock-free queues to improve concurrent processing efficiency.
[0189] The message listener adopts an event-driven model. The listener uses non-blocking IO to improve message processing efficiency. A message filtering mechanism is implemented to only process relevant configuration update messages. The listener supports automatic reconnection to ensure service availability. For abnormal situations, a complete error handling mechanism is implemented.
[0190] This embodiment innovatively implements an optimization mechanism for configuration query. A multi-level cache strategy is adopted to obtain configuration content from the local cache first. The query process uses an asynchronous method to avoid blocking the main process. Local caching of query results is implemented to reduce repeated queries. Through the predictive loading mechanism, the configuration that may be needed is loaded in advance.
[0191] The configuration content is loaded using an incremental update strategy. First, the version information is compared and only the changed configuration items are loaded. An atomic update mechanism is implemented to ensure configuration consistency. The loading process supports rollback operations and can be restored to the previous state when the update fails.
[0192] The memory cache is managed using a segmented lock mechanism. The cache space is segmented according to the configuration type to reduce lock contention. A cache elimination mechanism is implemented to clean up expired configurations in a timely manner. The cache update uses a copy-on-write strategy to ensure the consistency of read operations.
[0193] This embodiment implements a complete mechanism for exception handling. For network failures, automatic reconnection and message retry are implemented. For configuration loading failures, rollback and recovery mechanisms are provided. A complete monitoring and alarm mechanism is implemented to detect and handle abnormal situations in a timely manner.
[0194] To ensure reliability, this embodiment implements a complete logging mechanism. The entire process of configuration update is recorded, including message delivery, configuration loading, and exception handling. Logs support hierarchical management to facilitate problem location and analysis. Asynchronous log writing is implemented to avoid affecting the performance of the main process.
[0195] The design of this embodiment effectively solves the complexity problem of dynamic configuration update. Through a reliable message notification mechanism, timely delivery of configuration updates is ensured; through an efficient loading mechanism, dynamic configuration updates are achieved; and through perfect exception handling, the reliability of the update process is guaranteed.
[0196] The combined application of these technologies significantly improves the efficiency and reliability of configuration updates. The system can quickly push configuration changes to related modules to ensure that the configuration takes effect in a timely manner. Especially in the microservice architecture, this efficient configuration update mechanism provides strong support for the dynamic adjustment of the system. When the configuration is updated, the relevant modules can be accurately notified to avoid inconsistencies caused by update delays.
[0197] In order to break through the limitations of traditional static configuration management and provide an intelligent and reliable configuration management solution for complex software systems, the present application provides an embodiment of a software configuration device for implementing all or part of the contents of the software configuration method, see Figure 8 , the software configuration device specifically includes the following contents:
[0198] The subscription storage module 10 is used to construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, and extract the subscription module identifier from the configuration change record table to generate a configuration subscription module list;
[0199] A mapping dependency module 20 is used to input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table according to the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree according to the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database;
[0200] The dynamic configuration module 30 is used to receive configuration update instructions, write current configuration data into a historical version library, perform syntax verification on the updated configuration content using a syntax analyzer, read a list of key configuration items from the configuration item dependency tree, perform integrity verification on the updated configuration content based on the list of key configuration items, write the updated configuration content that passes the verification into the distributed configuration database, send a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loads the updated configuration content from the distributed configuration database after receiving the configuration update message.
[0201] From the above description, it can be seen that the software configuration device provided in the embodiment of the present application can achieve traceability and real-time synchronization of configuration changes by constructing a distributed configuration database and a message publishing and subscription center. The machine learning classifier is innovatively introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration project template to effectively manage the complex dependencies between key configuration items. Accurate tracking of configuration status is achieved through the configuration version list and historical version library, and the reliability of configuration updates is ensured by combining a syntax analyzer and integrity check. This method breaks through the limitations of traditional static configuration management and provides an intelligent and reliable configuration management solution for complex software systems.
[0202] From the hardware level, in order to break through the limitations of traditional static configuration management and provide an intelligent and reliable configuration management solution for complex software systems, the present application provides an embodiment of an electronic device for implementing all or part of the content of the software configuration method, and the electronic device specifically includes the following content:
[0203] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the software configuration device and related devices such as the core business system, user terminal and related database; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the software configuration method and the embodiment of the software configuration device in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0204] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0205] In practical applications, part of the software configuration method can be executed on the electronic device side as described above, or all operations can be completed in the client device. The selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0206] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0207] Fig. 9 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig. 9 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig. 9 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0208] In one embodiment, the software configuration method function may be integrated into the central processing unit 9100. The central processing unit 9100 may be configured to perform the following control:
[0209] Step S101: construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, extract the subscription module identifier from the configuration change record table to generate a configuration subscription module list;
[0210] Step S102: input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table based on the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree based on the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database;
[0211] Step S103: receiving a configuration update instruction, writing the current configuration data into a historical version library, using a syntax analyzer to perform syntax verification on the updated configuration content, reading a list of key configuration items from the configuration item dependency tree, performing integrity verification on the updated configuration content based on the list of key configuration items, writing the updated configuration content that passes the verification into the distributed configuration database, sending a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loading the updated configuration content from the distributed configuration database after receiving the configuration update message.
[0212] As can be seen from the above description, the electronic device provided in the embodiment of the present application realizes the traceability and real-time synchronization of configuration changes by constructing a distributed configuration database and a message publishing and subscription center. The machine learning classifier is innovatively introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration item template to effectively manage the complex dependencies between key configuration items. Accurate tracking of configuration status is achieved through the configuration version list and the historical version library, and the reliability of configuration updates is ensured by combining the syntax analyzer and integrity check. This method breaks through the limitations of traditional static configuration management and provides an intelligent and reliable configuration management solution for complex software systems.
[0213] In another embodiment, the software configuration device may be configured separately from the central processing unit 9100. For example, the software configuration device may be configured as a chip connected to the central processing unit 9100, and the software configuration method function may be implemented under the control of the central processing unit.
[0214] like Fig. 9 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig. 9 In addition, the electronic device 9600 may also include Fig. 9 For components not shown, reference may be made to the prior art.
[0215] like Fig. 9 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0216] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0217] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0218] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0219] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0220] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0221] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0222] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the software configuration method in the above embodiment in which the execution subject is a server or a client. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the software configuration method in the above embodiment in which the execution subject is a server or a client are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0223] Step S101: construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, extract the subscription module identifier from the configuration change record table to generate a configuration subscription module list;
[0224] Step S102: input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table based on the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree based on the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database;
[0225] Step S103: receiving a configuration update instruction, writing the current configuration data into a historical version library, using a syntax analyzer to perform syntax verification on the updated configuration content, reading a list of key configuration items from the configuration item dependency tree, performing integrity verification on the updated configuration content based on the list of key configuration items, writing the updated configuration content that passes the verification into the distributed configuration database, sending a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loading the updated configuration content from the distributed configuration database after receiving the configuration update message.
[0226] As can be seen from the above description, the computer-readable storage medium provided in the embodiment of the present application realizes the traceability and real-time synchronization of configuration changes by constructing a distributed configuration database and a message publishing and subscription center. The machine learning classifier is innovatively introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration project template to effectively manage the complex dependencies between key configuration projects. Accurate tracking of configuration status is achieved through the configuration version list and the historical version library, and the reliability of configuration updates is ensured by combining the syntax analyzer and integrity check. This method breaks through the limitations of traditional static configuration management and provides an intelligent and reliable configuration management solution for complex software systems.
[0227] The embodiments of the present application also provide a computer program product capable of implementing all the steps of the software configuration method in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the software configuration method are implemented. For example, the computer program / instruction implements the following steps:
[0228] Step S101: construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, extract the subscription module identifier from the configuration change record table to generate a configuration subscription module list;
[0229] Step S102: input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table based on the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree based on the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database;
[0230] Step S103: receiving a configuration update instruction, writing the current configuration data into a historical version library, using a syntax analyzer to perform syntax verification on the updated configuration content, reading a list of key configuration items from the configuration item dependency tree, performing integrity verification on the updated configuration content based on the list of key configuration items, writing the updated configuration content that passes the verification into the distributed configuration database, sending a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loading the updated configuration content from the distributed configuration database after receiving the configuration update message.
[0231] As can be seen from the above description, the computer program product provided in the embodiment of the present application realizes the traceability and real-time synchronization of configuration changes by constructing a distributed configuration database and a message publishing and subscription center. The machine learning classifier is innovatively introduced to intelligently classify configuration features, and a configuration dependency tree is established based on the configuration project template to effectively manage the complex dependencies between key configuration projects. Accurate tracking of configuration status is achieved through the configuration version list and the historical version library, and the reliability of configuration updates is ensured by combining the syntax analyzer and integrity check. This method breaks through the limitations of traditional static configuration management and provides an intelligent and reliable configuration management solution for complex software systems.
[0232] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0233] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0234] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0235] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0236] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A software configuration method, characterized in that: The method comprises: Constructing a distributed configuration database, establishing a message publishing and subscription center, generating a configuration change record table in the message publishing and subscription center, writing configuration update history records into the configuration change record table, constructing a configuration version linked list based on the configuration change record table, synchronizing configuration status information to the distributed configuration database according to the configuration version linked list, and extracting a subscription module identifier from the configuration change record table to generate a configuration subscription module list; Input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table according to the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree according to the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database; Receive a configuration update instruction, write the current configuration data into a historical version library, use a syntax analyzer to perform syntax verification on the updated configuration content, read a list of key configuration items from the configuration item dependency tree, perform integrity verification on the updated configuration content based on the list of key configuration items, write the updated configuration content that passes the verification into the distributed configuration database, send a configuration update message to the subscription module according to the configuration subscription module list, and the subscription module loads the updated configuration content from the distributed configuration database after receiving the configuration update message.
2. The software configuration method according to claim 1, characterized in that: The generating of a configuration change record table in the message publishing and subscription center, writing configuration update history records into the configuration change record table, and constructing a configuration version linked list based on the configuration change record table includes: Constructing a configuration change record data structure, setting a configuration identification field, a change time field, a change content field, an operator field, an environment identification field, and a subscription module field in the data structure, creating a configuration change record table in a relational database according to the data structure, and performing version number auto-increment management on the records in the configuration change record table based on a trigger mechanism; A queue data structure is used to sort and store the change records in the configuration change record table, a chain reference relationship between configuration versions is established according to the version number, the chain reference relationship is written into a version control table, and the configuration versions in the version control table are traversed in chronological order to generate a configuration version chain list.
3. The software configuration method according to claim 1, characterized in that: The step of synchronizing the configuration status information to the distributed configuration database according to the configuration version linked list, and extracting the subscription module identifier from the configuration change record table to generate a configuration subscription module list includes: Traversing the version nodes in the configuration version linked list to obtain the configuration version number, reading the configuration status information from the version control table according to the configuration version number, storing the configuration status information in the cache layer in the form of key-value pairs, writing the configuration status information in the cache layer into the configuration status table of the distributed configuration database, and establishing a configuration item index in the configuration status table; The subscription module field value is read from the configuration change record table, the subscription module field value is deduplicated to obtain a subscription module identification set, a subscription relationship mapping table is established according to the subscription module identification set, and the subscription relationship mapping table is written into a distributed configuration database to generate a configuration subscription module list.
4. The software configuration method according to claim 1, characterized in that: The step of inputting the configuration feature parameters into a machine learning classifier for classification, generating a configuration category label, and establishing a mapping relationship table based on the configuration feature parameters and the configuration category label includes: A hierarchical clustering algorithm is used to preprocess the configuration feature parameters, the configuration feature parameters are standardized to obtain a normalized feature vector, the normalized feature vector is input into a support vector machine classifier, a feature space mapping of the normalized feature vector is calculated based on a kernel function, and the feature space mapping is classified according to a maximum margin hyperplane principle to obtain a configuration category label; Construct a mapping table structure in a relational database, set a feature parameter field and a category label field in the mapping table structure, write the configuration feature parameters and the configuration category labels into the mapping table structure in a one-to-one correspondence, and create an index for the records in the mapping table structure to generate a mapping relationship table.
5. The software configuration method according to claim 1, characterized in that: The matching and screening of the configuration information in the mapping relationship table based on the preset key configuration item template to obtain key configuration items, generating a configuration item dependency tree according to the reference relationship between the key configuration items, and writing the configuration item dependency tree into the distributed configuration database includes: Read configuration information from the mapping relationship table, perform regular expression matching on the configuration information and a preset key configuration item template, extract configuration item identifiers that have successfully matched, classify and aggregate the configuration item identifiers to obtain a key configuration item set, and assign a unique identification code to each configuration item in the key configuration item set; A depth-first search algorithm is used to traverse the key configuration item set, the configuration content of each configuration item is parsed to extract the identifiers of other referenced configuration items, a directed acyclic graph data structure is constructed to record the reference relationship between the configuration items, and the directed acyclic graph is serialized and written into the dependency table of the distributed configuration database to generate a configuration item dependency tree.
6. The software configuration method according to claim 1, characterized in that: The step of reading a list of key configuration items from the configuration item dependency tree, performing integrity verification on the updated configuration content based on the list of key configuration items, and writing the updated configuration content that passes the verification into the distributed configuration database includes: Reading a configuration item dependency tree from a dependency table of a distributed configuration database, performing hierarchical traversal on the configuration item dependency tree to extract key configuration item identifiers, constructing a verification rule set according to the key configuration item identifiers, parsing the updated configuration content into configuration item key-value pairs, and performing item-by-item matching verification on the configuration item key-value pairs and the verification rule set; The configuration item key-value pairs that pass the integrity check are written into the configuration content table of the distributed configuration database, a configuration item index is established in the configuration content table, the configuration version information in the configuration status table is updated, and the configuration version information is synchronized to the version control table.
7. The software configuration method according to claim 1, characterized in that: The sending of a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loading the updated configuration content from the distributed configuration database after receiving the configuration update message, comprises: Read a configuration subscription module list from a distributed configuration database, obtain a subscription module identifier set in the configuration subscription module list, build a message queue channel according to the subscription module identifier set, encapsulate the configuration version number and the configuration update timestamp into a configuration update message, and deliver the configuration update message to the subscription module through the message queue channel; A configuration loading thread is created in the subscription module. The configuration loading thread listens to the message queue channel to receive configuration update messages, queries the configuration content table of the distributed configuration database according to the configuration version number in the configuration update message, reads the updated configuration content from the configuration content table and loads it into the memory cache of the subscription module.
8. A software configuration device, characterized in that: The device comprises: A subscription storage module is used to construct a distributed configuration database, establish a message publishing and subscription center, generate a configuration change record table in the message publishing and subscription center, write the configuration update history record into the configuration change record table, construct a configuration version linked list based on the configuration change record table, synchronize configuration status information to the distributed configuration database according to the configuration version linked list, and extract a subscription module identifier from the configuration change record table to generate a configuration subscription module list; A mapping dependency module is used to input configuration feature parameters into a machine learning classifier for classification, generate configuration category labels, establish a mapping relationship table according to the configuration feature parameters and the configuration category labels, match and filter the configuration information in the mapping relationship table based on a preset key configuration item template to obtain key configuration items, generate a configuration item dependency tree according to the reference relationship between the key configuration items, and write the configuration item dependency tree into the distributed configuration database; The dynamic configuration module is used to receive configuration update instructions, write current configuration data into a historical version library, perform syntax verification on the updated configuration content using a syntax analyzer, read a list of key configuration items from the configuration item dependency tree, perform integrity verification on the updated configuration content based on the list of key configuration items, write the updated configuration content that passes the verification into the distributed configuration database, send a configuration update message to a subscription module according to the configuration subscription module list, and the subscription module loads the updated configuration content from the distributed configuration database after receiving the configuration update message.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the software configuration method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the software configuration method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Distributed-system software configuration management method and system
CN104065517A
Configuration parameter updating method and device for distributed cluster, apparatus and storage medium
CN110825420A