Label configuration method, system, device, equipment and product
By introducing a tag-based configuration service into the Nacos configuration center and establishing a mapping table between configuration files and tags, the problem of the lack of semantic tags in existing technologies is solved, enabling efficient one-click deployment and fine-grained management, and improving deployment efficiency and security.
Patent Information
- Application Number
- CN202511124321.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-11
AI Technical Summary
The existing Nacos configuration center lacks semantic tags, which leads to low efficiency for operations and maintenance personnel in canary deployment and emergency rollback scenarios. It is impossible to achieve one-click deployment of configuration versions with the same tags, which affects iteration efficiency.
By introducing a tag-based configuration service, a mapping table between configuration files and tags is established, allowing users to query and publish configuration versions in the form of tags, thus enabling one-click publishing.
It improves the efficiency of releasing configuration versions, reduces the steps of manually selecting version numbers, supports batch operations and fine-grained permission control, and reduces the risk of accidental operation.
Smart Images

Figure CN120935007A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed system configuration management technology, and in particular to a tag configuration method, system, device, equipment and product. Background Technology
[0002] Nacos (Dynamic Naming and Configuration Service), as a mainstream configuration center, supports version management and release of configurations, but existing technologies have the following limitations:
[0003] 1. Rigid Version Management: Configuration versions are identified only by numerical version numbers (e.g., v1.0.0), lacking semantic tags (e.g., stable, canary). In canary releases or emergency rollbacks, operations personnel must manually compare version numbers with business scenarios, which is inefficient and error-prone. For example, during the "Double Eleven" shopping festival, an e-commerce platform needs to manage multiple modules simultaneously, including promotional activity configurations and inventory service configurations. Each module may contain dozens of versions, and manually selecting the target version significantly increases the operational burden.
[0004] 2. Inefficient Deployment Process: Users must manually select version numbers for each deployment, making batch operations based on business tags impossible. This is especially problematic in complex scenarios with multiple namespaces and configuration files (e.g., each namespace contains hundreds of configuration files), where one-click deployment of configurations with the same tag is difficult. For example, a financial system's risk control module needs to simultaneously deploy configurations tagged with "prod" (Production Environment) to multiple sub-services. Existing technology requires this step-by-step operation, taking tens of minutes and severely impacting iteration efficiency.
[0005] 3. Insufficient release flexibility: Users need to manually select the version number to release, and batch operations based on business scenario tags are not possible. For example, if each module is associated with a corresponding namespace, and each namespace contains one or more configuration files, it is not possible to release configurations with the same tags with one click when each configuration file contains configuration versions with different tags. Summary of the Invention
[0006] The purpose of this invention is to provide a tag configuration method, system, device, equipment, and product to solve the problem that existing Nacos configuration versions lack semantic tags, require manual selection of version numbers for release, resulting in low efficiency and the inability to release the same tag configuration version with one click.
[0007] To achieve the above objectives, embodiments of the present invention provide a label configuration method, comprising:
[0008] Obtain the first request initiated by the user; wherein the first request is used to request the publication of a configuration file, and the first request includes a first tag for the requested configuration file;
[0009] Based on the first tag, query the configuration file of at least one configuration version that matches the first tag in the first relationship table; wherein, the first relationship table records the correspondence between multiple configuration files and their corresponding tags;
[0010] Obtain the first target configuration version of the user-requested release configuration file;
[0011] Publish the configuration file for the first target configuration version in the configuration file.
[0012] Optionally, the method, wherein querying a configuration file of at least one configuration version matching the first tag in a first relationship table, includes:
[0013] Based on the first tag, the tag query command of the tag configuration service interface is invoked to query at least one configuration version configuration file that matches the first tag in the first relationship table.
[0014] Optionally, the method further includes, before obtaining the first request initiated by the user:
[0015] Call the tag binding command of the tag configuration service interface to bind the multiple configuration files with the corresponding tags and save them to the first relationship table.
[0016] Optionally, the method, wherein publishing the configuration file of the first target configuration version in the configuration file includes:
[0017] The configuration file of the first target configuration version is activated by calling the publishConfig network publishing configuration parameter interface through the tag activation command of the tag configuration service interface;
[0018] By using the tag-based configuration service command of the tag interception interface, the first tag is bound to the configuration file of the activated first target configuration version according to the tag information corresponding to the first tag; wherein, the tag information is obtained according to the first request;
[0019] Publish the configuration file of the first target configuration version after the tag is bound.
[0020] Optionally, in the method, the first relation table includes one or more of the following:
[0021] Configure a unique identifier; wherein, the configuration unique identifier is a unique identifier for the configuration version;
[0022] Tag name; wherein each tag name is uniquely indexed and associated with each configuration unique identifier;
[0023] Tags are bound to timestamps.
[0024] Optionally, the method, wherein obtaining the first request initiated by the user includes:
[0025] Obtain the second tag entered by the user in the tag input box on the configuration publishing page; wherein the second tag is a tag set including at least two of the first tags;
[0026] The first request is generated based on the second tag.
[0027] Optionally, the method, wherein obtaining the first request initiated by the user, further includes:
[0028] Obtain the second tag selected by the user in the tag filter dropdown in the settings of the configuration and publishing page; wherein the second tag is a tag set including at least two of the first tags;
[0029] The first request is generated based on the second tag.
[0030] Optionally, the method, after obtaining the second tag selected by the user in the tag filter dropdown in the settings of the configuration publishing page, further includes:
[0031] By asynchronously requesting a tag query command via AJAX, the configuration file of at least one configuration version matching each of the first tags in the second tag is displayed on the configuration publishing page.
[0032] Optionally, the method further includes:
[0033] The first label is highlighted in the label details area of the configuration file for at least one configuration version displayed on the configuration release page.
[0034] Optionally, the method, wherein obtaining the first request initiated by the user, further includes:
[0035] Get the first tag that the user enters in the input box of the "Scroll Back by Tag" button on the history configuration page;
[0036] The first request is generated based on the first tag.
[0037] Optionally, the method further includes, after publishing the configuration file of the first target configuration version in the configuration file:
[0038] Invoke the tag audit configuration command to record user operations related to the first tag in the audit log.
[0039] Optionally, the method wherein the audit log includes one or more of the following:
[0040] The operation type of the user operation;
[0041] The operator corresponding to the user operation;
[0042] The tag name corresponding to the user operation;
[0043] The time information corresponding to the user operation.
[0044] Optionally, the method further includes:
[0045] Retrieve the query criteria entered by the user;
[0046] Based on the query criteria, filter the audit logs to select the first matching log.
[0047] Output the first log and the alarm rule matching the first log; wherein, the alarm rule is the reason why the user operation corresponding to the first log triggers the alarm;
[0048] The query conditions include one or more of the following:
[0049] The operator corresponding to the user operation;
[0050] The tag name corresponding to the user operation;
[0051] The time information corresponding to the user operation.
[0052] To achieve the above objectives, embodiments of the present invention provide a label configuration device, comprising:
[0053] The first acquisition module is used to acquire a first request initiated by the user; wherein the first request is used to request the publication of a configuration file, and the first request includes a first tag for the requested configuration file;
[0054] The first processing module is configured to query, based on the first tag, at least one configuration version of the configuration file that matches the first tag in the first relationship table; wherein, the first relationship table records the correspondence between multiple configuration files and their corresponding tags;
[0055] The second acquisition module is used to acquire the first target configuration version of the published configuration file requested by the user.
[0056] The second processing module is used to publish the configuration file of the first target configuration version in the configuration file.
[0057] To achieve the above objectives, embodiments of the present invention provide a network device, including: a transceiver, a processor, a memory, and a program or instructions stored in the memory and executable on the processor; wherein, when the processor executes the program or instructions, it implements the tag configuration method as described above.
[0058] To achieve the above objectives, embodiments of the present invention provide a readable storage medium having a program or instructions stored thereon, wherein the program or instructions, when executed by a processor, implement the steps in the tag configuration method described above.
[0059] To achieve the above objectives, embodiments of the present invention provide a computer program product, which includes computer instructions that, when executed by a processor, implement the steps of the tag configuration method described above.
[0060] The beneficial effects of the above-described technical solution of the present invention are as follows:
[0061] In this embodiment of the invention, based on a first request sent by a user with a first tag, the system queries a first relationship table for configuration versions that match the first tag. After obtaining the first target configuration version requested by the user, the system publishes the configuration file of the first target configuration version in the configuration file that matches the first tag. The system associates the first tag with the corresponding configuration version configuration file in the first relationship table, thereby enabling users to retrieve configuration versions based on tags. The tags can be set as semantic tags that are easy to understand. After retrieval, the system obtains the configuration file requested by the user and publishes it with one click, without the need to manually select a version number for publication, which greatly improves the publishing efficiency. Attached Figure Description
[0062] Figure 1 This is a schematic diagram of the label configuration method according to an embodiment of the present invention;
[0063] Figure 2 This is a schematic diagram of the tag configuration device according to an embodiment of the present invention. Detailed Implementation
[0064] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0065] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0066] In various embodiments of the present invention, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0067] In addition, the terms "system" and "network" are often used interchangeably in this article.
[0068] In the embodiments provided by this invention, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0069] For ease of understanding, the following describes some aspects of the embodiments of the present invention:
[0070] like Figure 1 As shown, an embodiment of the present invention provides a label configuration method, which includes:
[0071] S10, Obtain the first request initiated by the user; wherein, the first request is used to request the publication of a configuration file, and the first request includes a first tag of the requested publication of the configuration file;
[0072] It should be noted that after the user initiates the first request published by the first tag, the backend plugin determines the first tag in the first request.
[0073] S20, based on the first tag, query the configuration file of at least one configuration version that matches the first tag in the first relationship table; wherein, the first relationship table records the correspondence between multiple configuration files and their corresponding tags;
[0074] It should be noted that, based on the first tag, all configuration versions matching the first tag are queried in the first relationship table, and the configuration files of these configuration versions are displayed to the user in list form.
[0075] S30, obtain the first target configuration version of the release configuration file requested by the user;
[0076] It should be noted that the user requests the release of the first target configuration version in the configuration file.
[0077] S40, Publish the configuration file of the first target configuration version in the configuration file;
[0078] It should be noted that performing a one-click release on the configuration file of the first target configuration version avoids manually selecting the version number for one-click release, greatly improving release efficiency.
[0079] In this embodiment, based on the first request sent by the user with a first tag, the configuration file of the configuration version that matches the first tag is queried in the first relationship table. After obtaining the first target configuration version requested by the user, the configuration file of the first target configuration version in the configuration file that matches the first tag is published. The first tag is associated with the configuration file of the corresponding configuration version in the first relationship table, so that the user can retrieve the configuration version according to the tag. The tag can be set as a semantic tag that is easy to understand. After the retrieval, the configuration file requested by the user is obtained and published with one click. There is no need to manually select the version number for publication, which greatly improves the publication efficiency.
[0080] Optionally, the method, wherein step S20 includes:
[0081] Based on the first tag, the tag query command of the tag configuration service interface is invoked to query at least one configuration version configuration file that matches the first tag in the first relationship table.
[0082] In this embodiment, the backend plugin extends the native service interface through Nacos's SPI (Service Provider Interface) mechanism, setting up a TaggedConfigService interface to extend the tag management interface, which inherits from the Nacos native configuration service (ConfigService). Based on the first tag, the TaggedConfigService interface's tag query command (queryByTag) is invoked, displaying the data as a string tag. The plugin queries the configuration file of at least one configuration version that matches the first tag in the first relationship table, returning a list of configuration versions sorted in descending order of version number.
[0083] Optionally, the method further includes, prior to step S10:
[0084] Call the tag binding command of the tag configuration service interface to bind the multiple configuration files with the corresponding tags and save them to the first relationship table.
[0085] In this embodiment, the bindTag command of the TaggedConfigService interface is invoked to bind the multiple configuration files with corresponding tags, which are displayed in the form of configuration identifier, configuration group, configuration version, and configuration tag (String dataId, String group, long version, String tag) and saved to the first relationship table. The tag is bound to the specified configuration version, and the binding relationship is persisted to the configuration tag (config_tag) table.
[0086] Optionally, the method, wherein step S40 includes:
[0087] The configuration file of the first target configuration version is activated by calling the publishConfig network publishing configuration parameter interface through the tag activation command of the tag configuration service interface;
[0088] By using the tag-based configuration service command of the tag interception interface, the first tag is bound to the configuration file of the activated first target configuration version according to the tag information corresponding to the first tag; wherein, the tag information is obtained according to the first request;
[0089] Publish the configuration file of the first target configuration version after the tag is bound.
[0090] In this embodiment, the tag activation (activateByTag) command of the TaggedConfigService interface is used to display the configuration identifier, configuration group, and configuration tag (String dataId, String group, String tag) and call the publishConfig network publishing configuration parameter interface to activate the configuration file of the first target configuration version.
[0091] The `TaggedConfigService.bindTag` command, which uses the `ConfigPublishInterceptor` interface of the `TagInterceptor` class, retrieves the tag information corresponding to the first tag based on the first request. It then binds the first tag to the configuration file of the first target configuration version. The tag information (e.g., `X-Config-Tags:canary,dev`) of the first tag is extracted from the HTTP request header or form parameters. Finally, the `TaggedConfigService.bindTag` method is called to bind the tag to the currently published configuration version.
[0092] After binding the tags to the configuration file of the first target configuration version through the tag interceptor, the release is performed.
[0093] Before publishing the configuration file of the first target configuration version, the publishing of the configuration file of the first target configuration version is intercepted by the set tag interceptor. It is necessary to bind the first tag to the configuration file of the first target configuration version before publishing the configuration file of the first target configuration version. This ensures that the published configuration file of the first target configuration version is bound to the first tag, so that the configuration file of the first target configuration version can always carry the first tag in the subsequent process.
[0094] Optionally, in the method, the first relation table includes one or more of the following:
[0095] Configure a unique identifier; wherein, the configuration unique identifier is a unique identifier for the configuration version;
[0096] Tag name; wherein each tag name is uniquely indexed and associated with each configuration unique identifier;
[0097] Tags are bound to timestamps.
[0098] In this embodiment, a first relationship table (config_tag, configuration tag table) is created using an independent table approach to store the many-to-many relationship between configuration IDs (config_id) and tags (tag). The first relationship table contains the following fields:
[0099] Configure a unique identifier (config_id): the configuration ID associated with the configuration information (config_info) in the main table to ensure data integrity.
[0100] Tag: Tag name, with a maximum length of 128 characters, allowing semantic naming (such as prod, v1.2.0).
[0101] Tag-bound timestamp (created_time): Tag-bound timestamps are used for auditing and version tracking.
[0102] When two tables (the first relation table and the main table containing the configuration file in this invention) are linked via a foreign key, the linked field (usually the primary key of the main table) must have a unique index (such as a primary key index or a unique index). The database verifies the uniqueness of the linked data through the unique index, avoiding duplicate references. The unique index (uk_configid_tag) (combined with the unique key config_id + tag) ensures that tags for the same configuration are not duplicated. This embodiment of the invention avoids version compatibility issues that may arise from directly modifying the native table configuration information (config_info), while supporting flexible multi-tag binding and efficient querying.
[0103] Optionally, the method, wherein step S10 includes:
[0104] Obtain the second tag entered by the user in the tag input box on the configuration publishing page; wherein the second tag is a tag set including at least two of the first tags;
[0105] The first request is generated based on the second tag.
[0106] In this embodiment, a label input box is added to the Nacos native console through front-end extension, optimizing the user interaction experience. This allows users to input multiple first labels (such as stable, stable version or prod, production environment) in a comma-separated manner in the multi-label input component embedded in the form area of the configuration and release page as the second label. The input box integrates an auto-completion function, dynamically prompting based on historical label records to avoid duplicate entry, thereby generating the first request.
[0107] Optionally, the method, wherein step S10 further includes:
[0108] Obtain the second tag selected by the user in the tag filter dropdown in the settings of the configuration and publishing page; wherein the second tag is a tag set including at least two of the first tags;
[0109] The first request is generated based on the second tag.
[0110] In this embodiment, by setting a tag filter, users can select the second tag from the tag filter drop-down box added to the top navigation bar of the configuration publishing page, and the second tag can be used as a component of multiple first tags to generate the first request.
[0111] Optionally, the method, after obtaining the second tag selected by the user in the tag filter dropdown in the settings of the configuration publishing page, further includes:
[0112] By asynchronously requesting a tag query command via AJAX, the configuration file of at least one configuration version matching each of the first tags in the second tag is displayed on the configuration publishing page.
[0113] In this embodiment, after obtaining the second tag selected by the user in the tag filter drop-down box of the settings on the configuration publishing page, the tag query (queryByTag) command is invoked via asynchronous network request AJAX to display in real time a list of configuration files that match at least one configuration version for each of the first tags in the second tag.
[0114] Optionally, the method further includes:
[0115] The first label is highlighted in the label details area of the configuration file for at least one configuration version displayed on the configuration release page.
[0116] In this embodiment, the first tag is highlighted or otherwise prominently displayed in the tag details area of the configuration file displaying the at least one configuration version.
[0117] Optionally, the method, wherein step S10 further includes:
[0118] Get the first tag that the user enters in the input box of the "Scroll Back by Tag" button on the history configuration page;
[0119] The first request is generated based on the first tag.
[0120] In this embodiment, an "Associated Tags" column is added to the historical configuration page to display a list of tags bound to each historical configuration version. By adding a "Roll Back by Tag" button, after obtaining the first tag entered by the user in the input box of the "Roll Back by Tag" button on the historical configuration page, the `activateByTag` interface is called on the front end to automatically locate and activate the configuration file of the historical configuration version selected by the user for rollback. A secondary confirmation pop-up is set in the rollback operation to prevent accidental operation, so that after the user confirms, the selected historical configuration version is rolled back.
[0121] Optionally, the method further includes, after publishing the configuration file of the first target configuration version in the configuration file:
[0122] Invoke the tag audit configuration command to record user operations related to the first tag in the audit log.
[0123] In this embodiment, the tag audit configuration command is invoked to record user operations related to the first tag in a separate tag configuration audit table (config_tag_audit), i.e., the audit log.
[0124] Optionally, the method wherein the audit log includes one or more of the following:
[0125] The operation type of the user operation;
[0126] The operator corresponding to the user operation;
[0127] The tag name corresponding to the user operation;
[0128] The time information corresponding to the user operation.
[0129] In this embodiment, the fields of the audit log include the operation type (action) of the user operation, the operator (operator account) corresponding to the user operation, the tag name (tag) corresponding to the user operation, the time information corresponding to the user operation, and the information of the configured tag (data_id configured unique identifier and group_id configured unique group identifier).
[0130] Optionally, the method further includes:
[0131] Retrieve the query criteria entered by the user;
[0132] Based on the query criteria, filter the audit logs to select the first matching log.
[0133] Output the first log and the alarm rule matching the first log; wherein, the alarm rule is the reason why the user operation corresponding to the first log triggers the alarm;
[0134] The query conditions include one or more of the following:
[0135] The operator corresponding to the user operation;
[0136] The tag name corresponding to the user operation;
[0137] The time information corresponding to the user operation.
[0138] In this embodiment, queries are performed using multi-dimensional query conditions, including: filtering logs by time range (i.e., the time information corresponding to the user operation), operator (i.e., the operator corresponding to the user operation), and tag type (i.e., the tag name corresponding to the user operation). Alarms are jointly generated when exporting logs: the first log is exported in CSV format, and alarm rules can be configured (e.g., triggering an alarm if the prod tag is modified more than 3 times within 1 hour).
[0139] It should be noted that this embodiment of the invention also extends the fine-grained permissions for tag operations based on Nacos' native RBAC (Role-Based Access Control) model:
[0140] Hierarchical access control: Tag operations are divided into three levels: READ, WRITE, and DELETE. For example, developers only have READ permission, while operations and maintenance personnel have WRITE permission.
[0141] Contextual restrictions: Modification operations on production environment tags (such as prod) are restricted to specific roles (such as SRE (Site Reliability Engineering)).
[0142] Batch operation interception: Prevent unauthorized users from performing batch deletion of tags to prevent accidental deletion of critical configurations.
[0143] This invention employs a tag-based version management mechanism: tag relationships are stored in an independent table, supporting dynamic binding and efficient querying; non-intrusive integration: based on the Nacos SPI (Serial Peripheral Interface, a synchronous serial communication protocol) extension interface, it is compatible with mainstream versions and requires no source code modification; tag-based publishing and rollback: combining front-end interaction and back-end logic, it achieves one-click scenario-based publishing; fine-grained permissions and auditing: extending the RBAC model and recording full operation logs to ensure compliance; high availability design: supporting data migration scripts and index optimization to avoid performance bottlenecks. It achieves the following: efficiency improvements: tag-based filtering reduces version release time by more than 50%; enhanced security: fine-grained permission control reduces the risk of accidental operations, and audit logs meet international standards for information security management systems; seamless compatibility: plug-in design adapts to Nacos versions, reducing enterprise upgrade costs.
[0144] like Figure 2 As shown, to achieve the above objectives, embodiments of the present invention provide a label configuration device, comprising:
[0145] The first acquisition module 201 is used to acquire a first request initiated by the user; wherein the first request is used to request the publication of a configuration file, and the first request includes a first tag of the requested configuration file.
[0146] The first processing module 202 is configured to query, based on the first tag, at least one configuration version of the configuration file that matches the first tag in the first relationship table; wherein, the first relationship table records the correspondence between multiple configuration files and their corresponding tags;
[0147] The second acquisition module 203 is used to acquire the first target configuration version of the published configuration file requested by the user.
[0148] The second processing module 204 is used to publish the configuration file of the first target configuration version in the configuration file.
[0149] Optionally, in the apparatus, the first processing module 202 includes:
[0150] The first processing unit is configured to invoke the tag query command of the tag-based configuration service interface according to the first tag, and query at least one configuration version configuration file that matches the first tag in the first relationship table.
[0151] Optionally, the device further includes:
[0152] The third processing module is used to call the tag binding command of the tag configuration service interface to bind the multiple configuration files with the corresponding tags and save them to the first relationship table.
[0153] Optionally, in the aforementioned apparatus, the second processing module 204 includes:
[0154] The second processing unit is used to activate the configuration file of the first target configuration version by calling the publishConfig network publishing configuration parameter interface through the tag activation command of the tag configuration service interface.
[0155] The third processing unit is used to bind the first tag to the configuration file of the activated first target configuration version according to the tag information corresponding to the first tag through the tag interception interface; wherein, the tag information is obtained according to the first request;
[0156] The fourth processing unit is used to publish the configuration file of the first target configuration version after the tag is bound.
[0157] Optionally, in the aforementioned apparatus, the first relation table includes one or more of the following:
[0158] Configure a unique identifier; wherein, the configuration unique identifier is a unique identifier for the configuration version;
[0159] Tag name; wherein each tag name is uniquely indexed and associated with each configuration unique identifier;
[0160] Tags are bound to timestamps.
[0161] Optionally, in the apparatus, the first acquisition module 201 includes:
[0162] The first acquisition unit is used to acquire a second tag entered by the user in the tag input box on the configuration publishing page; wherein the second tag is a tag set including at least two of the first tags;
[0163] The first generation unit is used to generate the first request based on the second tag.
[0164] Optionally, in the aforementioned apparatus, the first acquisition module 201 further includes:
[0165] The second acquisition unit is used to acquire the second tag selected by the user in the tag filter drop-down box of the settings on the configuration publishing page; wherein the second tag is a tag set including at least two of the first tags;
[0166] The second generation unit is used to generate the first request based on the second tag.
[0167] Optionally, the device further includes:
[0168] The fourth processing module is used to invoke the tag query command via asynchronous network request AJAX to display at least one configuration version of the configuration file that matches each of the first tags in the second tag on the configuration publishing page.
[0169] Optionally, the device further includes:
[0170] The fifth processing module is used to highlight the first tag in the tag details area of the configuration file of at least one configuration version displayed on the configuration release page.
[0171] Optionally, in the aforementioned apparatus, the first acquisition module 201 further includes:
[0172] The third acquisition unit is used to acquire the first tag entered by the user in the input box of the tag rollback button on the history configuration page;
[0173] The third generation unit is used to generate the first request based on the first tag.
[0174] Optionally, the device further includes:
[0175] The sixth processing module is used to call the tag audit configuration command to record user operations related to the first tag in the audit log.
[0176] Optionally, in the aforementioned apparatus, the audit log includes one or more of the following:
[0177] The operation type of the user operation;
[0178] The operator corresponding to the user operation;
[0179] The tag name corresponding to the user operation;
[0180] The time information corresponding to the user operation.
[0181] Optionally, the device further includes:
[0182] The third acquisition module is used to acquire the query conditions entered by the user;
[0183] The seventh processing module is used to filter the first matching log in the audit log according to the query conditions;
[0184] The eighth processing module is used to output the first log and the alarm rule matching the first log; wherein, the alarm rule is the reason for the user operation corresponding to the first log to trigger the alarm;
[0185] The query conditions include one or more of the following:
[0186] The operator corresponding to the user operation;
[0187] The tag name corresponding to the user operation;
[0188] The time information corresponding to the user operation.
[0189] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0190] To achieve the above objectives, embodiments of the present invention provide a network device, including: a transceiver, a processor, a memory, and a program or instructions stored in the memory and executable on the processor; wherein, when the processor executes the program or instructions, it implements the tag configuration method as described above.
[0191] To achieve the above objectives, embodiments of the present invention provide a readable storage medium having a program or instructions stored thereon, wherein the program or instructions, when executed by a processor, implement the steps in the tag configuration method described above.
[0192] To achieve the above objectives, embodiments of the present invention provide a computer program product, which includes computer instructions that, when executed by a processor, implement the steps of the tag configuration method described above.
[0193] It should be further noted that the terminals described in this specification include, but are not limited to, smartphones, tablets, etc., and many of the functional components described are referred to as modules in order to emphasize the independence of their implementation.
[0194] In this embodiment of the invention, the module can be implemented in software so that it can be executed by various types of processors. For example, an identified executable code module may include one or more physical or logical blocks of computer instructions, which may be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but may include different instructions stored in different locations, which, when logically combined, constitute the module and achieve the module's intended purpose.
[0195] In practice, an executable code module can be a single instruction or many instructions, and can even be distributed across multiple different code segments, different programs, and across multiple memory devices. Similarly, operational data can be identified within the module and can be implemented in any suitable form and organized within any suitable type of data structure. This operational data can be collected as a single dataset or distributed across different locations (including different storage devices), and can exist, at least in part, solely as electronic signals within the system or network.
[0196] When a module can be implemented using software, considering the current level of hardware technology, modules that can be implemented in software can be implemented using hardware circuits by those skilled in the art to achieve the corresponding functions, without considering cost. These hardware circuits include conventional very-large-scale integrated circuits (VLSI) or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules can also be implemented using programmable hardware devices, such as field-programmable gate arrays, programmable array logic, and programmable logic devices.
[0197] The exemplary embodiments described above are with reference to the accompanying drawings. Many different forms and embodiments are feasible without departing from the spirit and teachings of the invention. Therefore, the invention should not be construed as limiting the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided to make the invention complete and convey the scope of the invention to those skilled in the art. In these drawings, component dimensions and relative dimensions may be exaggerated for clarity. The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. As used herein, unless clearly indicated otherwise, the singular forms “a,” “an,” and “the” are intended to include all such forms. It will be further understood that the terms “comprising” and / or “including”, when used in this specification, indicate the presence of the stated features, integers, steps, operations, components, and / or elements, but do not exclude the presence or addition of one or more other features, integers, steps, operations, components, and / or groups thereof. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of the range and any subranges in between.
[0198] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A label configuration method, characterized in that, include: Obtain the first request initiated by the user; wherein the first request is used to request the publication of a configuration file, and the first request includes a first tag for the requested configuration file; Based on the first tag, query the configuration file of at least one configuration version that matches the first tag in the first relationship table; wherein, the first relationship table records the correspondence between multiple configuration files and their corresponding tags; Obtain the first target configuration version of the user-requested release configuration file; Publish the configuration file for the first target configuration version in the configuration file.
2. The method according to claim 1, characterized in that, Based on the first tag, query the configuration file of at least one configuration version that matches the first tag in the first relationship table, including: Based on the first tag, the tag query command of the tag configuration service interface is invoked to query at least one configuration version configuration file that matches the first tag in the first relationship table.
3. The method according to claim 1, characterized in that, Before obtaining the first request initiated by the user, the method further includes: Call the tag binding command of the tag configuration service interface to bind the multiple configuration files with the corresponding tags and save them to the first relationship table.
4. The method according to claim 1, characterized in that, Publish the configuration file of the first target configuration version in the configuration file, including: The configuration file of the first target configuration version is activated by calling the publishConfig network publishing configuration parameter interface through the tag activation command of the tag configuration service interface; By using the tag-based configuration service command of the tag interception interface, the first tag is bound to the configuration file of the activated first target configuration version according to the tag information corresponding to the first tag; wherein, the tag information is obtained according to the first request; Publish the configuration file of the first target configuration version after the tag is bound.
5. The method according to claim 1, characterized in that, The first relation table includes one or more of the following: Configure a unique identifier; wherein, the configuration unique identifier is a unique identifier for the configuration version; Tag name; wherein each tag name is uniquely indexed and associated with each configuration unique identifier; Tags are bound to timestamps.
6. The method according to claim 1, characterized in that, Obtain the first request initiated by the user, including: Obtain the second tag entered by the user in the tag input box on the configuration publishing page; wherein the second tag is a tag set including at least two of the first tags; The first request is generated based on the second tag.
7. The method according to claim 1, characterized in that, Obtaining the first request initiated by the user also includes: Obtain the second tag selected by the user in the tag filter dropdown in the settings of the configuration and publishing page; wherein the second tag is a tag set including at least two of the first tags; The first request is generated based on the second tag.
8. The method according to claim 7, characterized in that, After obtaining the second tag selected by the user in the tag filter dropdown in the settings on the configuration and publishing page, the method further includes: By asynchronously requesting a tag query command via AJAX, the configuration file of at least one configuration version matching each of the first tags in the second tag is displayed on the configuration publishing page.
9. The method according to claim 8, characterized in that, The method further includes: The first label is highlighted in the label details area of the configuration file for at least one configuration version displayed on the configuration release page.
10. The method according to claim 1, characterized in that, Obtaining the first request initiated by the user also includes: Get the first tag that the user enters in the input box of the "Scroll Back by Tag" button on the history configuration page; The first request is generated based on the first tag.
11. The method according to claim 1, characterized in that, After publishing the configuration file of the first target configuration version in the configuration file, the method further includes: Invoke the tag audit configuration command to record user operations related to the first tag in the audit log.
12. The method according to claim 11, characterized in that, The audit log includes one or more of the following: The operation type of the user operation; The operator corresponding to the user operation; The tag name corresponding to the user operation; The time information corresponding to the user operation.
13. The method according to claim 12, characterized in that, The method further includes: Retrieve the query criteria entered by the user; Based on the query criteria, filter the audit logs to select the first matching log. Output the first log and the alarm rule matching the first log; wherein, the alarm rule is the reason why the user operation corresponding to the first log triggers the alarm; The query conditions include one or more of the following: The operator corresponding to the user operation; The tag name corresponding to the user operation; The time information corresponding to the user operation.
14. A label configuration device, characterized in that, include: The first acquisition module is used to acquire a first request initiated by the user; wherein the first request is used to request the publication of a configuration file, and the first request includes a first tag for the requested configuration file; The first processing module is configured to query, based on the first tag, at least one configuration version of the configuration file that matches the first tag in the first relationship table; wherein, the first relationship table records the correspondence between multiple configuration files and their corresponding tags; The second acquisition module is used to acquire the first target configuration version of the published configuration file requested by the user. The second processing module is used to publish the configuration file of the first target configuration version in the configuration file.
15. A network device, comprising: A transceiver, a processor, a memory, and a program or instructions stored in the memory and executable on the processor; characterized in that, when the processor executes the program or instructions, it implements the tag configuration method as described in any one of claims 1-13.
16. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps in the tag configuration method as described in any one of claims 1-13.
17. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the tag configuration method as described in any one of claims 1-13.