Standardized application configuration specification detection method and device, equipment and storage medium

By parsing the format and prioritizing multiple configuration files, and combining them with preset detection item expressions for standardized detection, the problem of inflexible detection schemes in existing technologies is solved. This achieves good scalability for correlation detection and rule adjustment of multiple configuration files, and improves the standardization and ease of maintenance of detection.

CN120929648APending Publication Date: 2025-11-11CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511071023.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing technologies lack standardized and scalable detection solutions when testing application configuration compliance, making it difficult to accurately reflect conflicts or dependencies between multiple configuration files, resulting in omissions in detection results and high maintenance costs.

Method used

By obtaining the original content of multiple configuration files and parsing their formats, prioritizing and covering configuration items according to the application framework configuration information, generating a list of covered configuration items, and performing qualification screening and detection through preset detection item expressions, configuration suggestions are generated to achieve standardized application configuration specification detection.

Benefits of technology

It enables correlation analysis of multiple configuration files, supports adjustment of detection rules without modifying code logic, improves the standardization of detection, correlation analysis capabilities and ease of maintenance, and outputs detection results including configuration suggestions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929648A_ABST
    Figure CN120929648A_ABST
Patent Text Reader

Abstract

The invention discloses a standardized application configuration specification detection method and device, equipment and a storage medium, relates to the technical field of specification detection, and discloses a standardized application configuration specification detection method which comprises the following steps: obtaining original contents of a plurality of configuration files, and performing format analysis on the original contents to obtain initial configuration items; performing priority coverage on the initial configuration item according to the application framework configuration information to obtain a coverage configuration item list; performing qualification screening on the coverage configuration item list to obtain a configuration item list meeting conditions; generating configuration suggestions for the configuration items in the conforming condition configuration item list according to suggestion information in a preset detection item expression; and according to a preset detection item expression, detecting the configuration item list meeting the condition to obtain a target detection result, and according to the target detection result and the configuration suggestion, completing standardized application configuration specification detection. Standardized detection of application configuration specifications is achieved, and target detection results and configuration suggestions can be output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of standardized testing technology, and in particular to standardized application configuration standardized testing methods, apparatus, equipment and storage media. Background Technology

[0002] In modern software system development, application configuration files bear the critical responsibility of defining program runtime parameters, controlling logical behavior, and associating external dependencies. With the widespread adoption of technologies such as microservice architecture and container deployment, an application often relies on configuration files from multiple sources, and these configuration files have strict loading order and priority requirements. To ensure the stable operation of the system in multiple environments, developers and operations personnel typically establish a set of configuration specifications, including naming rules for configuration items, value ranges, dependencies, and version compatibility requirements. They also need to inspect configuration files to avoid runtime anomalies or security vulnerabilities caused by improper configuration.

[0003] Traditional configuration specification checks typically involve writing a detection program to parse the content of a configuration file, generating a list of configuration items and their values. Developers then implement a series of detection functions in code, relying on regular expressions and other methods to determine whether the configuration item values ​​meet the expected requirements. This approach generally only works on a single configuration file and fails to cover the priority parsing and correlation determination of configuration items across multiple files. Adding new detection items or adjusting the detection logic requires modifying existing code, resulting in high maintenance costs and poor flexibility. Especially when multiple configuration files are used together, it struggles to accurately reflect conflicts or dependencies between configuration items, leading to omissions in the specification target detection results.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a standardized method, apparatus, device and storage medium for testing application configuration specifications, aiming to solve the technical problem of lacking a standard, universal and highly scalable testing solution when testing application configuration specifications.

[0006] To achieve the above objectives, this application proposes a standardized application configuration specification detection method, the method comprising:

[0007] Obtain the original content of multiple configuration files, and parse the format of the original content to obtain the initial configuration items;

[0008] Prioritize the initial configuration items according to the application framework configuration information to obtain a list of covered configuration items;

[0009] The list of covered configuration items is screened for eligibility to obtain a list of configuration items that meet the criteria.

[0010] Based on the suggestion information in the preset detection item expression, configuration suggestions are generated for the configuration items in the list of qualified configuration items;

[0011] Based on the preset detection item expression, the list of qualified configuration items is detected to obtain the target detection result. Based on the target detection result and the configuration suggestion, the standardized application configuration specification detection is completed.

[0012] In one embodiment, the step of detecting the list of matching configuration items according to the preset detection item expression to obtain the target detection result includes:

[0013] Obtain the detection function, detection condition matching function, and detection condition selection function, and obtain the preset key configuration expression and preset suggested configuration expression based on the preset detection item expression;

[0014] The configuration items in the list of matching configuration items are matched by the detection condition matching function and the detection condition selection function to obtain the expression matching result.

[0015] Based on the expression matching result, a target expression is selected from the preset key configuration expression and the preset suggested configuration expression;

[0016] The list of qualified configuration items is tested according to the detection function and the target expression to obtain the target detection result.

[0017] In one embodiment, the step of performing expression matching on the configuration items in the list of matching configuration items using the detection condition matching function and the detection condition selection function to obtain the expression matching result includes:

[0018] The detection condition matching function determines whether the configuration items in the list of matching configuration items meet the expression matching logic.

[0019] When a configuration item in the list of eligible configuration items satisfies the expression matching logic, the configuration item in the list of eligible configuration items is subjected to expression matching according to the detection condition selection function to obtain the expression matching result.

[0020] In one embodiment, the step of detecting the list of matching configuration items according to the detection function and the target expression to obtain the target detection result includes:

[0021] The detection rule class and configuration item conflict class are obtained based on the detection function;

[0022] The configuration items in the list of eligible configuration items are detected according to the detection rule class to obtain the rule detection result;

[0023] The configuration items in the list of eligible configuration items are checked according to the configuration item conflict class to obtain the configuration item detection result;

[0024] The target detection result is obtained based on the detection results of the rules and the detection results of the configuration items.

[0025] In one embodiment, the step of prioritizing the initial configuration items according to the application framework configuration information to obtain a list of overridden configuration items includes:

[0026] The first configuration item and the second configuration item are obtained based on the application framework configuration information, and the initial configuration item is overridden based on the first configuration item to obtain an initial overridden item list;

[0027] Compare whether the configurations of the first configuration item and the second configuration item are the same;

[0028] When the configurations of the first configuration item and the second configuration item are the same, the initial overriding item list is overridden according to the second configuration item to obtain an overriding configuration item list.

[0029] In one embodiment, the step of performing qualification screening on the list of covered configuration items to obtain a list of configuration items that meet the conditions includes:

[0030] Get the preset application framework version range, dependency configuration item requirements, and expression syntax;

[0031] Based on the preset application framework version range and the expression syntax, an application framework version detection expression is generated;

[0032] The configuration item information is obtained from the list of overridden configuration items, and the current application framework version and current dependency configuration items are obtained from the configuration item information.

[0033] The current application framework version and the current dependency configuration item are screened for eligibility based on the application framework version detection expression and the dependency configuration item requirements, and the corresponding configuration items that pass the screening are added to the list of eligible configuration items.

[0034] In one embodiment, the step of performing qualification screening on the current application framework version and the current dependency configuration item according to the application framework version detection expression and the dependency configuration item requirements, and adding the corresponding configuration item that passes the qualification screening to the list of qualified configuration items includes:

[0035] Based on the application framework version detection expression, the current application framework version is matched and judged to obtain the version target detection result;

[0036] The current dependency configuration item is screened for eligibility based on the dependency configuration item requirements to obtain the dependency configuration item screening result.

[0037] When both the version target detection result and the dependency configuration item screening result are passed, the corresponding configuration item that passed the qualified screening will be added to the list of qualified configuration items.

[0038] Furthermore, to achieve the above objectives, this application also proposes a standardized application configuration specification detection device, which includes:

[0039] The content parsing module is used to obtain the original content of multiple configuration files and parse the format of the original content to obtain the initial configuration items;

[0040] The priority overriding module is used to override the initial configuration items according to the application framework configuration information to obtain a list of overriding configuration items.

[0041] The qualification screening module is used to perform qualification screening on the covered configuration item list to obtain a list of configuration items that meet the conditions.

[0042] The suggestion generation module is used to generate configuration suggestions for the configuration items in the list of qualified configuration items based on the suggestion information in the preset detection item expression;

[0043] The standardization detection module is used to detect the list of qualified configuration items according to the preset detection item expression, obtain the target detection result, and complete the standardized application configuration specification detection based on the target detection result and the configuration suggestion.

[0044] Furthermore, to achieve the above objectives, this application also proposes a standardized application configuration specification testing device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the standardized application configuration specification testing method described above.

[0045] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the standardized application configuration specification detection method described above.

[0046] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the standardized application configuration specification detection method described above.

[0047] One or more technical solutions proposed in this application have at least the following technical effects:

[0048] This approach addresses the shortcomings of existing technologies, such as the lack of a universally standardized approach to configuration specification detection, lack of support for correlation analysis based on configuration item reading priorities across multiple configuration files, and poor scalability and maintenance due to the need to modify code logic when adjusting detection rules. It achieves correlation analysis through multi-configuration file parsing and priority processing, and utilizes preset detection item expressions to enable code logic adjustments without modifying code logic. This results in a standard and universal application configuration specification detection method that supports multi-configuration file correlation detection, exhibits good scalability for detection rule adjustments, and outputs detection results including configuration suggestions. The method employs multiple configuration file correlation detection and priority processing to obtain a list of covered configuration items; performs qualification screening on the covered configuration item list to obtain a list of qualified configuration items; generates configuration suggestions for the configuration items in the list of qualified configuration items based on suggestion information in a preset detection item expression; and performs detection on the list of qualified configuration items based on priority coverage according to the preset detection item expression, thus completing a standardized application configuration specification detection method. Attached Figure Description

[0049] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A flowchart illustrating the standardization of the application configuration specification testing method provided in Example 1 of this application;

[0052] Figure 2 The detection function and base class diagram provided in Implementation Example 1 of the Standardized Application Configuration Specification Detection Method of this Application;

[0053] Figure 3 A schematic diagram of the detection condition class system provided in Embodiment 1 of the standardized application configuration specification detection method of this application;

[0054] Figure 4 A schematic diagram of the implementation class of the detection function expression provided in Embodiment 1 of the standardized application configuration specification detection method of this application;

[0055] Figure 5 A flowchart illustrating the second embodiment of the standardized application configuration specification testing method for this application;

[0056] Figure 6 A simplified flowchart illustrating the standardized application configuration specification detection method provided in Embodiment 2 of this application;

[0057] Figure 7 This is a schematic diagram of the module structure of the standardized application configuration specification detection device in the embodiments of this application;

[0058] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the standardized application configuration specification detection method in this application embodiment.

[0059] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0060] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0061] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0062] The main solution of this application embodiment is as follows: Obtain the original content of multiple configuration files and parse the format of the original content to obtain initial configuration items; perform priority coverage on the initial configuration items according to application framework configuration information to obtain a list of covered configuration items; perform qualification screening on the list of covered configuration items to obtain a list of qualified configuration items; generate configuration suggestions for the configuration items in the list of qualified configuration items according to the suggestion information in the preset detection item expression; perform detection on the list of qualified configuration items according to the preset detection item expression to obtain target detection results; and complete the standardized application configuration specification detection based on the target detection results and the configuration suggestions.

[0063] In this embodiment, for ease of description, the following description will focus on the detection equipment for identifying standardized application configuration specifications.

[0064] Because existing technologies lack standardized, universal, and highly scalable detection schemes for verifying application configuration compliance, this application provides a solution. This solution involves obtaining the original content of multiple configuration files, parsing the format of the original content to obtain initial configuration items; prioritizing and covering the initial configuration items according to application framework configuration information to obtain a covered configuration item list; screening the covered configuration item list to obtain a qualified configuration item list; generating configuration suggestions for the configuration items in the qualified configuration item list based on suggestion information in a preset detection item expression; and detecting the qualified configuration item list according to the preset detection item expression to obtain a target detection result. This invention addresses the shortcomings of existing technologies, such as the lack of a universally standardized approach to configuration specification detection, lack of support for correlation analysis based on the reading priority of multiple configuration files, and poor scalability and maintenance due to the need to modify code logic when adjusting detection rules. It achieves correlation analysis through multi-configuration file parsing and priority processing, and utilizes preset detection item expressions to allow for code logic adjustments without modifying code logic. This results in a standard and universal application configuration specification detection method that supports correlation detection across multiple configuration files, exhibits good scalability for rule adjustments, and outputs detection results including configuration suggestions. This improves the standardization, correlation analysis capabilities, and ease of maintenance of the detection process.

[0065] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, a standardized application configuration specification testing device, etc. The following description uses a standardized application configuration specification testing device as an example to illustrate this embodiment and the subsequent embodiments.

[0066] Based on this, the embodiments of this application provide a standardized method for detecting application configuration specifications, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the application configuration specification testing method standardized in this application.

[0067] In this embodiment, the standardized application configuration specification detection method includes steps S10 to S50:

[0068] Step S10: Obtain the original content of multiple configuration files, and parse the format of the original content to obtain the initial configuration items;

[0069] It should be noted that a configuration file is a file used to store the parameters and settings required for the application to run, and its content determines the behavior and functionality of the application. In this embodiment, the configuration file format can be YAML or Properties. YAML and Properties can record various configuration information in a standardized manner, making them easy to read and parse.

[0070] Additionally, the original content refers to the initial data in the configuration file before any processing, that is, all the information contained in the configuration file after it is created and written. This information exists in text form and directly reflects the initial settings of the configuration items.

[0071] Understandably, format parsing is the process of breaking down and extracting the original content according to the specific format rules of the configuration file. For YAML format configuration files, the relationships between configuration items are parsed based on their indentation and hierarchical structure; for properties format configuration files, they are parsed in key-value pair format to identify each configuration item and its corresponding value.

[0072] Furthermore, initial configuration items are a collection of configuration items extracted from the raw content of multiple configuration files after format parsing, and which have not yet undergone priority processing. Each initial configuration item contains a corresponding key and value, representing a specific setting that the application may use.

[0073] Additionally, it's understandable that this involves obtaining the raw content of multiple configuration files, which contains all the information originally recorded in those files. The raw content is then parsed according to the configuration file's format. For example, for YAML format configuration files, the keys and values ​​of each configuration item are extracted based on its hierarchical structure and indentation rules; for properties format configuration files, configuration items are extracted in key-value pairs. This parsing process yields the initial configuration items—all configuration items extracted from the various configuration files that haven't undergone priority processing. By parsing the raw content of multiple configuration files to obtain the initial configuration items, all possible configuration information that the application might involve can be comprehensively collected. This provides complete foundational data for subsequent priority processing and detection, ensuring that subsequent steps can be performed based on a comprehensive set of configuration items.

[0074] Step S20: Prioritize the initial configuration items according to the application framework configuration information to obtain a list of covered configuration items;

[0075] It should be noted that application framework configuration information is information about configuration files and configuration item processing rules in the framework that the application depends on. It clarifies the priority order between different configuration files, that is, it specifies which configuration file has higher overriding authority when the same configuration item exists.

[0076] Additionally, priority overriding refers to the process of replacing the configuration item value corresponding to the same key in the low-priority configuration file with the configuration item value in the high-priority configuration file, according to the priority order specified by the application framework configuration information, when multiple initial configuration items have the same key.

[0077] Furthermore, the overridden configuration item list is a collection of configuration items formed after priority overriding processing. Each configuration item is the one that takes effect after considering the priorities of multiple configuration files, representing the configuration settings that the application will actually use during runtime.

[0078] Understandably, when configuration items with the same key exist in the initial configuration items, they are processed according to this priority order; that is, the configuration item value in the higher-priority configuration file will override the configuration item value with the same key in the lower-priority configuration file. By prioritizing the initial configuration items through application framework configuration information, a list of overridden configuration items that actually take effect at runtime can be obtained. This resolves the problem of conflicting values ​​of the same configuration item in multiple configuration files, ensuring that the configuration items used for subsequent detection are accurate and consistent with the actual operation of the application.

[0079] In one feasible implementation, step S20 may include: obtaining a first configuration item and a second configuration item according to application framework configuration information, and overriding the initial configuration item according to the first configuration item to obtain an initial overriding item list; comparing whether the configurations of the first configuration item and the second configuration item are the same; when the configurations of the first configuration item and the second configuration item are the same, overriding the initial overriding item list according to the second configuration item to obtain an overriding configuration item list.

[0080] In this embodiment, the priority overriding rule can be that if multiple configuration files have the same configuration item, the configuration item value of the later configuration file will override the value of the same configuration item in the earlier configuration file, and the configuration item value that the application finally reads is the configuration item value of the last configuration file.

[0081] It should be noted that the first configuration item comes from the configuration file listed earlier in the list. In the order of multiple configuration files, it appears earlier and is read first. Conversely, the second configuration item comes from the configuration file listed later in the list. In the order of multiple configuration files, it appears later than the first configuration item and is read last.

[0082] Furthermore, the initial configuration items are a set of configuration items obtained after parsing the original content of multiple configuration files. The initial configuration items have not yet undergone priority overriding processing, retaining the original keys and values ​​from each configuration file. It can be understood that the initial overriding item list is a set of configuration items formed after the first configuration item overrides the initial configuration items. When a configuration item with the same key as the first configuration item exists in the initial configuration items, the value of the first configuration item will replace the corresponding value in the initial configuration item, thus forming this list.

[0083] Additionally, it can be understood that the overridden configuration item list is the final set of configuration items obtained after the initial overridden item list has been overridden by the second configuration item. It reflects the result of multiple configuration files being overridden sequentially, where the final value of the same configuration item is the value of the last appearing configuration item.

[0084] Understandably, the comparison involves checking if the first and second configuration items are identical, i.e., checking if their keys match. If the keys are the same, the configurations are considered identical; otherwise, they are considered different. The order of multiple configuration files is determined based on the application framework configuration information. The first configuration item is retrieved from the earlier-listed configuration file, and the second configuration item is retrieved from the later-listed configuration file. The first configuration item overrides the initial configuration item. When the first and second configuration items are identical (i.e., the keys are the same), the second configuration item overrides the initial override list according to the priority rules of the application framework configuration information. In other words, the value of the second configuration item replaces the value of the configuration item with the same key in the initial override list, resulting in the override list.

[0085] Step S30: Perform a qualification screening on the list of covered configuration items to obtain a list of configuration items that meet the conditions;

[0086] It should be noted that the qualification screening is a process of checking each configuration item in the covered configuration item list according to preset detection conditions to determine whether it meets the detection prerequisites. These detection conditions include whether the application framework version is within the specified range and whether the dependent configuration items exist or whether their values ​​meet the requirements, etc.

[0087] Furthermore, the list of eligible configuration items is a collection of all configuration items that meet the preset detection conditions after passing the qualification screening. Configuration items in this list are qualified to undergo further detection value expression testing.

[0088] Understandably, screening each configuration item in the coverage list requires checking whether the application framework version meets the version requirements of the detection criteria, and then checking whether the dependent configuration items meet the criteria. Only configuration items that meet both the application framework version and dependent configuration item requirements are retained to form the list of compliant configuration items. This screening process effectively identifies configuration items that meet the detection prerequisites, avoiding unnecessary testing of ineligible items, reducing the workload, improving efficiency, and ensuring the relevance and accuracy of subsequent detection processes.

[0089] Step S40: Generate configuration suggestions for the configuration items in the list of qualified configuration items based on the suggestion information in the preset detection item expression;

[0090] It should be noted that the preset detection item expression is a predefined rule expression used to detect whether configuration items conform to the specification. It includes the detection version ID, the configuration item key, the detection conditions, the detection measures, the detection value expression, and an explanation of the detection rules, comprehensively defining the detection requirements for configuration items. The content of the detection item can be illustrated in the following detection item diagram table:

[0091] Detection Items Diagram

[0092]

[0093] Understandably, configuration suggestions are generated for each configuration item in the list of eligible configuration items based on the suggested information in the preset detection item expression. The suggested information is the content of the suggested settings for the configuration item contained in the preset detection item expression. These suggestions are based on configuration specifications and best practices and are used to guide the reasonable setting of the configuration item.

[0094] Step S50: Detect the list of qualified configuration items according to the preset detection item expression to obtain the target detection result, and complete the standardized application configuration specification detection based on the target detection result and the configuration suggestion.

[0095] It should be noted that the target detection result is obtained by detecting the list of configuration items that meet the conditions according to the preset detection item expression, including information such as whether the configuration item passes the detection and the detection measures.

[0096] Understandably, standardized application configuration specification testing is a process of comprehensively testing application configuration items according to unified rules and procedures. It ensures consistency and standardization of testing by using preset test item expressions, and finally combines the target test results and configuration suggestions to determine whether the configuration items conform to the application configuration specification.

[0097] Additionally, it's understandable that the list of configuration items that meet the predefined detection item expressions is checked. This involves verifying whether the value of each configuration item meets the requirements of the detection value expression, such as whether the value is within a certain range or whether the prefix of the configuration item is correct. Based on the detection results, a target detection result is determined, such as passing the detection, blocking, or issuing a warning. Then, combining the target detection results with the generated configuration suggestions, a comprehensive judgment is made as to whether the configuration items conform to the application configuration specifications, thus completing the standardized application configuration specification detection.

[0098] In one feasible implementation, step S50 may include steps S51 to S54:

[0099] Step S51: Obtain the detection function, the detection condition matching function, and the detection condition selection function, and obtain the preset key configuration expression and the preset suggested configuration expression according to the preset detection item expression;

[0100] It should be noted that the detection function is a function used to implement specific detection logic. Its core function is to detect configuration items and generate detection results, and it can also record the detection results.

[0101] In this embodiment, the detection function has two implementation classes: a detection rule class and a configuration item conflict class. The detection rule class detects configuration items based on the expression of the detection rule entries, while the configuration item conflict class is used to detect whether there are duplicate configuration items among the input configuration items.

[0102] Additionally, the detection condition matching function is a function in the detection condition implementation class. It determines whether the detection data satisfies the detection condition expression of the detection item based on specific matching logic.

[0103] For example, for the application framework version detection condition, this function will determine whether the actual application framework version is within the range specified by the detection condition expression; for the dependency configuration item detection condition, it will determine whether the dependency configuration item exists or whether its value meets the requirements.

[0104] Additionally, the detection condition selection function is a function within the detection condition implementation class. Its purpose is to determine which detection condition implementation class should match the detection condition expression of a detection item.

[0105] For example, when the detection condition expression is about the application framework version, the function will select the corresponding application framework version detection condition implementation class; when it is about a dependency configuration item, it will select the corresponding dependency configuration item detection condition implementation class.

[0106] Furthermore, the preset critical configuration expression is an expression used in the preset detection item expression to perform mandatory detection on critical configuration items. The corresponding detection measure is usually blocking, that is, if the critical configuration item does not meet the requirements of the expression, blocking measures will be taken.

[0107] It is understandable that the detection function, detection condition matching function, and detection condition selection function are obtained. The detection function is used for subsequent specific detection and result recording, the detection condition selection function is used to determine the implementation class of the matching detection condition expression, and the detection condition matching function is used to determine whether the detection data meets the detection conditions. Preset key configuration expressions and preset suggested configuration expressions are extracted from the preset detection item expressions. It is understandable that the detection item expressions are illustrated in the following table:

[0108] Example table of expression for detection entries

[0109]

[0110] Additionally, the default suggested configuration expression is an expression in the default detection item expression used to provide suggestive detection for configuration items. The corresponding detection measure is usually a warning, that is, if the configuration item does not meet the suggestion of the expression, a warning will be issued.

[0111] Reference Figure 2 , Figure 2 The detection function and base class diagram of the first embodiment of the standardized application configuration specification detection method of this application are shown below;

[0112] The detection base class (BaseCheck) serves as the abstract base class for the entire detection system, defining common detection and recording behaviors. It includes core methods such as `check` (receives the application framework version and a set of configuration item key-value information, performs the detection, and returns the configuration item detection result) and `record` (receives the detection ID, detection data carrier, and detection result, and completes the detection result recording operation). The detection rule class (RulesCheck) inherits from BaseCheck, focusing on compliance checks of configuration items according to preset rules. It overrides and implements the base class's `check` (based on the input version and configuration item key-value information, judges compliance according to the rules) and `record` (records the detection ID, data, and result for rule-based detection scenarios). The configuration item conflict class (ConflictCheck) also inherits from BaseCheck, focusing on detecting conflicts between configuration items (such as duplicate keys). It overrides the `check` (analyzes the set of configuration items) method. The `checkConditionHandler` class handles conflict detection. It includes methods for `prefix` (returns the prefix identifier of the condition expression) and `match` (receives the condition expression, configuration item key placeholders, application framework version, and configuration item key-value set, determines whether the configuration item meets the condition, and returns a boolean value). The `checkValueExpressionHandler` class focuses on parsing and judging checkvalue expressions, implementing the matching logic between configuration item values ​​and expressions. It includes methods for `match` (determines whether the value matches a single expression and returns a boolean value) and `judge` (receives the configuration item value, key placeholders, expression, and configuration item set, comprehensively judges whether the value meets the expression requirements, and returns a boolean value).In terms of class diagram relationships and process logic, RulesCheck and ConflictCheck inherit from BaseCheck, reusing the base class's detection and recording capabilities to implement their own exclusive detection logic (rule / conflict detection). BaseCheckConditionHandler and BaseCheckExpressionHandler serve as basic processing classes, providing underlying support for condition parsing and value matching in the detection process. During detection, BaseCheck calls the subclass's check method. The subclass detection relies on BaseCheckConditionHandler to parse conditions and BaseCheckExpressionHandler to match value expressions. Finally, the detection result is output through the record method, forming a complete detection system of "base class defining process - subclass implementing logic - processing class supporting parsing". This clearly shows the code structure of the configuration detection function. The base class unifies the process, the subclasses divide the work (rule / conflict detection), and the processing classes solve the parsing problems of conditions and expressions, jointly supporting the compliance and conflict detection of configuration items.

[0113] Step S52: Perform expression matching on the configuration items in the list of configuration items that meet the conditions using the detection condition matching function and the detection condition selection function to obtain the expression matching result;

[0114] It should be noted that the list of eligible configuration items is a collection of all configuration items that meet the preset detection conditions after passing the qualification screening. Configuration items in the list of eligible configuration items are qualified to undergo further expression matching.

[0115] Furthermore, the expression matching result is obtained by matching the configuration items in the list of matching configuration items through the detection condition selection function and the detection condition matching function. It is used to indicate whether the configuration item meets the detection condition expression of the detection entry, and the result is usually "meets" or "does not meet".

[0116] Understandably, for each configuration item in the list of eligible configuration items, the first step is to use a condition selection function to determine which condition implementation class should handle the corresponding condition expression. Then, the condition matching function within that implementation class is called to determine whether the configuration item satisfies the condition expression based on specific matching logic. The condition selection function selects the corresponding application framework version condition implementation class and dependency configuration item condition implementation class, while the condition matching function checks whether the application framework version is within the required version number and whether the value of the dependency configuration item is correct.

[0117] In one feasible implementation, step S52 may include: determining whether the configuration items in the list of configuration items that meet the conditions satisfy the expression matching logic through the detection condition matching function; when the configuration items in the list of configuration items that meet the conditions satisfy the expression matching logic, performing expression matching on the configuration items in the list of configuration items that meet the conditions according to the detection condition selection function to obtain the expression matching result.

[0118] It should be noted that the expression matching logic is the judgment rule implied in the conditional expression. For example, it may determine whether it is necessary to determine whether the version number of the application framework is within the required version number range, or whether it is necessary to check whether the value of the dependent configuration item is the correct value, etc., to define whether the configuration item meets the detection conditions.

[0119] Understandably, for each configuration item in the list of eligible configuration items, a conditional matching function is called. Based on expression matching logic, the configuration item is evaluated. This function checks each configuration item's application framework version and dependent configuration items to see if they meet the logic, thus determining if the configuration item matches the conditional expression. When a configuration item in the list satisfies the expression matching logic, a conditional selection function is called to determine the specific implementation class that handles the conditional expression. This implementation class then performs expression matching on the configuration item to determine if it fully meets the requirements of the conditional expression, ultimately obtaining the expression matching result. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the detection condition class system of the first embodiment of the standardized application configuration specification detection method of this application.

[0120] The base class for condition detection (BaseCheckConditionHandler) is fundamental, containing methods such as `prefix` (returns a prefix identifier) ​​and `match` (receives an expression, placeholder, version, key, and a set of configuration items, determines whether the condition is met, and returns a boolean value). The base classes for condition detection based on framework version (BaseVersionCheckConditionExpression) and condition detection based on dependency configuration items (BaseRelyItemCheckConditionExpression) inherit from the base class and both have methods such as `match` (determines whether the expression matches) and `judge` (combines the expression with the version to make a judgment). Under the framework version branch, the classes for condition detection based on framework version (greater than or equal to) (VersionCheckConditionGreaterEqualExpression) and condition detection based on framework version (value range) (VersionCheckConditionRan) are also included. The `getExpression` class and the `VersionCheckConditionStarExpression` class, which are used to match the framework version, each handle the corresponding framework version condition using `match` and `judge`. Under the dependency configuration item branch, there are `RelyItemCheckConditionNotExistExpression`, `RelyItemCheckConditionOtherItemEqualExpression`, and `RelyItemCheckConditionOtherItemNotEqualExpression` classes, which handle dependency configuration item conditions using `match` and `judge`. Overall, the inheritance and functional division of the detection condition classes are presented to support the condition judgment logic in configuration detection. The detection condition - framework version has three implementation classes: VersionCheckConditionGreaterEqualExpression: greater than or equal to expression, such as: [version:>=5.9.20]; VersionCheckConditionRangeExpression: value range expression, such as: [version:5.9.0-5.9.19]; VersionCheckConditionStarExpression: full match expression, such as: [version:5.9.*], [version:*].The detection condition - dependency configuration item has three implementation classes: RelyItemCheckConditionNotExistExpression: an expression indicating that a configuration item does not exist, for example: [relyItem:!com.{Standardized Application Configuration Specification Detection}.datasource.type]; RelyItemCheckConditionOtherItemEqualExpression: an expression indicating that the configuration item value is equal to a certain value, for example: [relyItem:com.{Standardized Application Configuration Specification Detection}.datasource.type=abc]; RelyItemCheckConditionOtherItemNotEqualExpression: an expression indicating that the configuration item value is not equal to a certain value, for example: [relyItem:com.{Standardized Application Configuration Specification Detection}.datasource.type!=abc].

[0121] Step S53: Select the target expression from the preset key configuration expression and the preset suggested configuration expression based on the expression matching result;

[0122] It should be noted that the target expression is selected from the preset key configuration expressions and preset suggested configuration expressions, and is used to further detect configuration items that meet the conditions. The selection is based on the expression matching results; when a configuration item meets the detection conditions, the corresponding expression will be selected according to the detection measures.

[0123] Understandably, based on the expression matching results, if a configuration item meets the detection condition expression, the corresponding target expression is selected from the preset key configuration expression and the preset suggested configuration expression.

[0124] Step S54: Detect the list of qualified configuration items according to the detection function and the target expression to obtain the target detection result.

[0125] Understandably, the detection function is invoked to use a target expression to detect configuration items in the list of matching configuration items. The detection function checks whether the value of the configuration item meets the requirements of the target expression and generates a target detection result based on the detection result, such as pass detection, block, or warning.

[0126] In one feasible implementation, step S54 may include steps S541 to S544:

[0127] Step S541: Obtain the detection rule class and configuration item conflict class according to the detection function;

[0128] It should be noted that the detection rule class is the implementation class of the detection function. Its main function is to detect configuration items based on preset detection rule entry expressions. The detection rule class will determine whether the configuration item meets the corresponding specification requirements according to the predefined detection rules, and then obtain the detection result.

[0129] Additionally, the configuration item conflict class is the implementation class of the detection function. Its function is to detect whether there are duplicate configuration items among the input configuration items. When configuration items with the same key exist, it is determined that a conflict exists, and this situation is included as part of the detection result. (See reference...) Figure 4 , Figure 4 A schematic diagram of the implementation class of the detection function expression of the first embodiment of the standardized application configuration specification detection method of this application.

[0130] The base class (BaseCheckExpressionHandler) is fundamental for check value expressions, containing methods like `match` (determines if an expression matches) and `judge` (receives a configuration item value, key placeholders, the expression, and a set of configuration items, determines if the expression matches, and returns a boolean value). It also includes check value expression classes for: greater than (GreaterCheckExpressionHandler), greater than or equal to (GreaterEqualCheckExpressionHandler), less than (LessCheckExpressionHandler), and less than or equal to (LessEqualCheckExpressionHandler). The check value expression classes – Equal to (EqualCheckExpressionHandler), Not equal to (NotEqualCheckExpressionHandler), NoExist CheckExpressionHandler, and Prefix CheckExpressionHandler – all inherit from the base class. Each class implements the processing logic for check value conditions such as numerical comparison (greater than, greater than or equal to, etc.), existence judgment (non-existence of a configuration item), and prefix matching through the match and judge methods. Together, they constitute the classification and processing system of check value expressions, supporting the diverse needs of value matching in configuration checks. There are eight implementation classes: GreaterCheckExpressionHandler: Greater than expression, e.g., [[%%]>30000]; GreaterEqualCheckExpressionHandler: Greater than or equal to expression, e.g., [[%%]>=30000]; LessCheckExpressionHandler: Less than expression, e.g., [[%%]<500]; LessEqualCheckExpressionHandler: Less than or equal to expression, e.g., [[%%]<=500]; EqualCheckExpressionHandler: Equal to expression, e.g., [[%%]=500]; NotEqualCheckExpressionHandler: Not equal to expression, e.g., [[%%]!=500]; NoExistCheckExpressionHandler: Expression indicating that a configuration item does not exist, e.g.: <noexist>PrefixCheckExpressionHandler: Prefix expression, such as: [[%%]prefix:TEST_DB_].

[0131] Understandably, since the detection function contains the definitions related to implementing the specific detection logic, its two implementation classes can be obtained through this function: the detection rule class and the configuration item conflict class. This step prepares for subsequent use of these detection rule class and configuration item conflict class to perform different types of detection, ensuring that configuration items can be comprehensively detected according to different detection logics.

[0132] Step S542: Detect the configuration items in the list of qualified configuration items according to the detection rule class to obtain the rule detection result;

[0133] It should be noted that the rule detection result is obtained by the detection rule class after detecting the configuration items in the list of matching configuration items based on the preset detection rule entry expressions. The rule detection result reflects whether the configuration item meets each specific detection rule, such as whether the value of the configuration item is within a specified range or whether it satisfies a specific expression.

[0134] Understandably, the detection rule class will check each configuration item in the list of matching configuration items one by one according to the preset detection rule entry expression. For example, for a block in the detection rule entry expression: <exist>A rule like [[%%]=true] will have its corresponding configuration item value checked by the rule class. If the condition is met, the rule check is passed; otherwise, it fails. This process yields the final rule check result.

[0135] Step S543: Detect the configuration items in the list of qualified configuration items according to the configuration item conflict class, and obtain the configuration item detection result;

[0136] It should be noted that the configuration item detection result is obtained after the configuration item conflict class checks the list of configuration items that meet the conditions. It is mainly used to reflect whether there are duplicate conflicts among the configuration items. When configuration items with the same key exist, this result will record this conflict information; if they do not exist, it will be recorded as no conflict.

[0137] Understandably, the configuration item conflict class checks all configuration items in the list of eligible configuration items to see if any have the same key. For example, if the list contains two configuration items with the key "timeout" and values ​​of 3000 and 5000 respectively, the configuration item conflict class will determine that these two configuration items conflict. Through this detection, a configuration item detection result is obtained, which clearly shows whether a conflict exists and the specific configuration item involved in the conflict.

[0138] Step S544: Obtain the target detection result based on the rule detection result and the configuration item detection result.

[0139] Understandably, rule detection results and configuration item detection results are integrated. For example, if the rule detection result shows that a configuration item meets all detection rules, and the configuration item detection result shows that the configuration item has no conflicts, then the target detection result is that the configuration item conforms to the specification. If the rule detection result shows that a configuration item fails a key rule detection, and the configuration item detection result shows that it has a conflict, then the target detection result will combine both pieces of information to clarify that the configuration item does not conform to the specification and the specific reasons. Through this integration, the target detection result is obtained. The target detection result obtained by combining these two types of detection results comprehensively covers information on the rule compliance and conflict status of configuration items, providing a complete and accurate basis for judging whether configuration items conform to standardized application configuration specifications, and helping to fully understand the status of configuration items and take appropriate actions.

[0140] This embodiment provides a standardized method for application configuration specification detection. It obtains initial configuration items by acquiring the original content of multiple configuration files and parsing them. Priority overriding of these initial configuration items is performed based on application framework configuration information to handle conflicts between identical configuration items. The overridden configuration items undergo qualification screening to retain those that meet the application framework version and dependency requirements. Configuration suggestions are then generated by combining preset detection item expressions. Detection functions, detection condition matching and selection functions, various expressions and detection rule classes, and configuration item conflict classes are used to detect qualified configuration items, obtaining the target detection result and completing standardized detection based on the configuration suggestions. This method achieves comprehensive and standardized detection of application configurations, resolves the problem of multiple configuration file conflicts, filters out compliant configuration items, provides optimization suggestions, ensures application configuration conforms to specifications, and improves application stability and reliability.

[0141] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 5 The standardized application configuration specification detection method includes steps S31 to S34 in step S30:

[0142] Step S31: Obtain the preset application framework version range, dependency configuration item requirements, and expression syntax;

[0143] It should be noted that the preset application framework version range is a pre-defined valid range of application framework versions, used to limit the range of application framework versions applicable to configuration item detection. In this embodiment, this range can be a specific version range.

[0144] For example, it can be 5.9.0-5.9.19, or a combination of multiple ranges, such as 5.9.0-5.9.19, 5.10.0-5.10.15, or a version greater than or equal to a certain version, such as >= 5.9.20, or any version, i.e., *. This embodiment does not limit the specific value of the preset application framework version range.

[0145] Additionally, the dependency configuration item requirement is a specification for other configuration items associated with the configuration item to be detected. That is, the configuration item to be detected needs to meet conditions such as the existence, non-existence, or value of another configuration item.

[0146] Additionally, expression syntax is a set of rules used to construct various detection expressions. It contains multiple operators and special symbols to represent different logical relationships and detection conditions. Expression syntax can be illustrated in the following expression syntax diagram:

[0147] Expression Syntax Diagram

[0148]

[0149] Continuing from the previous expression syntax diagram

[0150]

[0151] Step S32: Generate an application framework version detection expression based on the preset application framework version range and the expression syntax;

[0152] It should be noted that the application framework version detection expression is an expression built based on a preset application framework version range and expression syntax, used to detect whether the application framework version meets the requirements. Its format is usually [version:specific range], where the specific range is generated according to the preset application framework version range and expression syntax.

[0153] Understandably, an application framework version detection expression is constructed based on a preset application framework version range and expression syntax. For example, if the preset application framework version range is 5.9.0-5.9.19 and 5.10.0-5.10.15, combined with the rules for representing multiple ranges in the expression syntax, the generated application framework version detection expression is [version:5.9.0-5.9.19,5.10.0-5.10.15]; if the preset range is any version, i.e., *, then the generated expression is [version:*]. Generating the application framework version detection expression by using the preset application framework version range and expression syntax transforms the abstract version range requirement into a concrete, executable detection expression, enabling subsequent screening of application framework versions to be performed according to unified rules, ensuring the accuracy and standardization of version detection.

[0154] Step S33: Obtain configuration item information according to the list of overriding configuration items, and obtain the current application framework version and current dependency configuration items according to the configuration item information;

[0155] It should be noted that the configuration item information covers the detailed content of each configuration item in the configuration item list, including the key, value and related information of the configuration item, such as application framework version information, other dependent configuration items, etc.

[0156] Additionally, the current application framework version is the version number of the application framework actually used by the application, recorded in the configuration item information; the current dependency configuration item is the actual existing configuration item associated with the configuration item to be detected in the configuration item information, including the keys and values ​​of these configuration items.

[0157] Understandably, the process involves extracting configuration item information for each item from the list of overridden configuration items. This information includes the various attributes of the configuration item. From this configuration item information, the current application framework version is selected, i.e., the framework version actually used by the application. The current dependent configuration items related to the configuration item to be detected are then extracted, i.e., the actual associated configuration items and their values.

[0158] Step S34: Perform qualification screening on the current application framework version and the current dependency configuration item according to the application framework version detection expression and the dependency configuration item requirements, and add the corresponding configuration item that passes the qualification screening to the qualified configuration item list.

[0159] Understandably, the application framework version detection expression checks the current application framework version to determine if it is within the preset version range. It also checks the current dependency configuration items according to the requirements of the dependency configuration items. For configuration items that pass both checks, they are added to the list of qualified configuration items.

[0160] In one feasible implementation, step S34 may include steps S341 to S343:

[0161] Step S341: Based on the application framework version detection expression, perform a matching judgment on the current application framework version to obtain the version target detection result;

[0162] It should be noted that the version target detection result is obtained by matching the current application framework version against the application framework version detection expression. It indicates whether the current application framework version meets the requirements of the application framework version detection expression, and the result is either "pass" or "fail". The application framework version detection expression can be illustrated in the following table:

[0163] Application framework version detection expression diagram

[0164]

[0165] It is understandable that the application framework version detection expression is used to match and determine the current application framework version. For example, if the application framework version detection expression is [version:5.10.0-5.10.15], and the current application framework version is 5.10.8, since 5.10.8 falls within the range of 5.10.0 to 5.10.15, the version target detection result is passed; if the current application framework version is 5.10.16, which exceeds this range, the version target detection result is failed. As another example, if the expression is [version:>=5.9.20], and the current application framework version is 5.9.25, which meets the requirement of being greater than or equal to 5.9.20, the version target detection result is passed. The expression values ​​in the application framework version detection expression illustration table and the expression values ​​in the examples are for illustrative purposes only; this embodiment does not specifically limit the application framework version.

[0166] By using application framework version detection expressions to match and judge the current application framework version, it is possible to quickly determine whether the current version meets the preset range. This provides a clear basis for subsequent qualification screening regarding whether the version meets the standards, ensuring that only configuration items that meet the version requirements can proceed to the next screening step, thus improving the targeting of the screening.

[0167] Step S342: Perform a qualification screening on the current dependency configuration item according to the dependency configuration item requirements to obtain the dependency configuration item screening result;

[0168] It should be noted that the dependency configuration item screening result is obtained after checking the current dependency configuration item according to the dependency configuration item requirements. It is used to indicate whether the current dependency configuration item meets the dependency configuration item requirements, and the result is divided into two types: pass and fail.

[0169] Understandably, the current dependency configuration item is screened for eligibility based on the dependency configuration item requirements. For example, the dependency configuration item requirement is [relyItem:!com.{Standardized Application Configuration Specification Detection}.demo.type], which means that the dependency configuration item must not exist.

[0170] If the dependency configuration item is indeed not present in the current dependency configuration list, the screening result is "pass". The dependency configuration item expressions are shown in the following table:

[0171] Dependency Configuration Item Expression Diagram

[0172]

[0173] Step S343: When both the version target detection result and the dependency configuration item screening result are passed, add the corresponding configuration item that passed the qualified screening to the list of qualified configuration items.

[0174] Understandably, the results of version target detection and dependency configuration item screening are used for comprehensive judgment. Only when both results are satisfactory will the corresponding configuration item be added to the list of eligible configuration items. For example, if the current application framework version of a configuration item passes the application framework version detection expression, and its current dependency configuration item meets the dependency configuration item requirements, then the configuration item will be added to the list of eligible configuration items; if either result is unsatisfactory, the configuration item will not be added to the list.

[0175] By screening configuration items based on both version and dependency configuration items, the system ensures that the configuration items in the list of eligible configuration items meet the requirements of both the application framework version and dependency configuration items. This provides qualified and reliable test targets for subsequent testing processes, improving the accuracy and effectiveness of the subsequent test results.

[0176] This embodiment provides a standardized application configuration specification detection method. It generates an application framework version detection expression by obtaining a preset application framework version range, dependency configuration item requirements, and expression syntax. Then, it retrieves the current application framework version and current dependency configuration items from the covered configuration item list. Based on the application framework version detection expression and dependency configuration item requirements, it performs qualification screening, including only configuration items that pass both requirements in the qualified configuration item list. This achieves precise screening of configuration items, ensuring that subsequent detection objects simultaneously meet both version and dependency configuration requirements, reducing invalid detections, and improving the targeting and accuracy of detection, laying a reliable foundation for standardized application configuration specification detection.

[0177] For example, to help understand the implementation process of the standardized application configuration specification detection method obtained in this embodiment in conjunction with the above embodiment one, please refer to... Figure 6 , Figure 6 A simplified flowchart of a standardized application configuration specification detection method is provided, specifically:

[0178] The input items include configuration files A, B, and C. Based on the reading priority, the final configuration items are formed. At the same time, the dependent configuration items and framework version are extracted as the original input for detection. In the detection phase, the configuration items, dependent configuration items, and framework version range are first used as detection conditions to determine whether the framework version range is met. If it is met, the condition is combined to generate a standard detection item expression, which is used to perform compliance detection on the input. After the output items pass the detection, the detection results are output, and a detection result record is generated and stored, which fully covers the process from configuration reading and condition verification to result output.

[0179] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the standardized application configuration specification detection method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0180] This application also provides a standardized application configuration specification testing device; please refer to [reference needed]. Figure 7 The standardized application configuration specification testing device includes:

[0181] The content parsing module 10 is used to obtain the original content of multiple configuration files and parse the original content to obtain the initial configuration items;

[0182] Priority coverage module 20 is used to prioritize the initial configuration items according to the application framework configuration information to obtain a list of covered configuration items;

[0183] The qualification screening module 30 is used to perform qualification screening on the covered configuration item list to obtain a list of configuration items that meet the conditions.

[0184] The suggestion generation module 40 is used to generate configuration suggestions for the configuration items in the list of qualified configuration items based on the suggestion information in the preset detection item expression;

[0185] The standardization detection module 50 is used to detect the list of qualified configuration items according to the preset detection item expression, obtain the target detection result, and complete the standardized application configuration specification detection according to the target detection result and the configuration suggestion.

[0186] The standardized application configuration specification detection device provided in this application, employing the standardized application configuration specification detection method in the above embodiments, can solve the technical problem of lacking a standard, universal, and highly scalable detection scheme when detecting application configuration compliance. Compared with the prior art, the beneficial effects of the standardized application configuration specification detection device provided in this application are the same as those of the standardized application configuration specification detection method provided in the above embodiments, and other technical features in the standardized application configuration specification detection device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0187] In one embodiment, the specification detection module 50 is further configured to acquire a detection function, a detection condition matching function, and a detection condition selection function; acquire a preset key configuration expression and a preset suggested configuration expression based on the preset detection item expression; perform expression matching on the configuration items in the list of compliant configuration items using the detection condition matching function and the detection condition selection function to obtain an expression matching result; select a target expression from the preset key configuration expression and the preset suggested configuration expression based on the expression matching result; and perform detection on the list of compliant configuration items based on the detection function and the target expression to obtain a target detection result.

[0188] In one embodiment, the specification detection module 50 is further configured to determine whether the configuration items in the list of compliant configuration items satisfy the expression matching logic through the detection condition matching function; when the configuration items in the list of compliant configuration items satisfy the expression matching logic, the module performs expression matching on the configuration items in the list of compliant configuration items according to the detection condition selection function to obtain the expression matching result.

[0189] In one embodiment, the specification detection module 50 is further configured to obtain a detection rule class and a configuration item conflict class according to the detection function; detect the configuration items in the list of qualified configuration items according to the detection rule class to obtain a rule detection result; detect the configuration items in the list of qualified configuration items according to the configuration item conflict class to obtain a configuration item detection result; and obtain a target detection result based on the rule detection result and the configuration item detection result.

[0190] In one embodiment, the priority coverage module 20 is further configured to obtain a first configuration item and a second configuration item according to the application framework configuration information, and cover the initial configuration item according to the first configuration item to obtain an initial coverage item list; compare whether the configurations of the first configuration item and the second configuration item are the same; when the configurations of the first configuration item and the second configuration item are the same, cover the initial coverage item list according to the second configuration item to obtain a coverage configuration item list.

[0191] In one embodiment, the qualification screening module 30 is further configured to: obtain a preset application framework version range, dependency configuration item requirements, and expression syntax; generate an application framework version detection expression based on the preset application framework version range and the expression syntax; obtain configuration item information based on the covered configuration item list, and obtain the current application framework version and the current dependency configuration item based on the configuration item information; perform qualification screening on the current application framework version and the current dependency configuration item based on the application framework version detection expression and the dependency configuration item requirements, and add the corresponding configuration item that passes the qualification screening to the qualified configuration item list.

[0192] In one embodiment, the qualification screening module 30 is further configured to: match and judge the current application framework version according to the application framework version detection expression to obtain a version target detection result; perform qualification screening on the current dependency configuration item according to the dependency configuration item requirements to obtain a dependency configuration item screening result; and when both the version target detection result and the dependency configuration item screening result are passed, add the corresponding configuration item that passed the qualification screening to the list of qualified configuration items.

[0193] This application provides a standardized application configuration specification testing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the standardized application configuration specification testing method in the first embodiment described above.

[0194] The following is for reference. Figure 8 This document illustrates a structural schematic diagram of a standardized application configuration specification testing device suitable for implementing embodiments of this application. The standardized application configuration specification testing device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 8 The standardized application configuration specification testing equipment shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0195] like Figure 8 As shown, the standardized application configuration specification testing device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the standardized application configuration specification testing device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the standardized application configuration specification testing equipment to communicate wirelessly or wiredly with other devices to exchange data. Although a standardized application configuration specification testing equipment with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0196] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0197] The standardized application configuration specification testing equipment provided in this application, employing the standardized application configuration specification testing method described in the above embodiments, can solve the technical problem of lacking a standard, universal, and highly scalable testing solution when testing application configuration compliance. Compared with the prior art, the beneficial effects of the standardized application configuration specification testing equipment provided in this application are the same as those of the standardized application configuration specification testing method provided in the above embodiments, and other technical features in this standardized application configuration specification testing equipment are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0198] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0199] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0200] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the standardized application configuration specification detection method in the above embodiments.

[0201] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), Erasable Programmable Read Only Memory (EPROM), optical fiber, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0202] The aforementioned computer-readable storage medium may be included in a standardized application configuration specification testing device; or it may exist independently and not be assembled into a standardized application configuration specification testing device.

[0203] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a standardized application configuration specification testing device, the standardized application configuration specification testing device performs the following: acquires the original content of multiple configuration files and parses the original content to obtain initial configuration items; prioritizes and covers the initial configuration items according to application framework configuration information to obtain a list of covered configuration items; performs qualification screening on the list of covered configuration items to obtain a list of qualified configuration items; generates configuration suggestions for the configuration items in the list of qualified configuration items according to the suggestion information in a preset detection item expression; and performs testing on the list of qualified configuration items according to the preset detection item expression to obtain a target detection result. Based on the target detection result and the configuration suggestions, the standardized application configuration specification testing is completed.

[0204] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a LAN (Local Area Network) or a WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0205] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0206] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0207] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned standardized application configuration specification detection method. This solves the technical problem of lacking a standard, universal, and highly scalable detection scheme when detecting application configuration compliance. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the standardized application configuration specification detection method provided in the above embodiments, and will not be elaborated upon here.

[0208] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the standardized application configuration specification detection method described above.

[0209] The computer program product provided in this application can solve the technical problem of lacking a standard, universal, and highly scalable detection scheme when detecting application configuration compliance. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the standardized application configuration compliance detection method provided in the above embodiments, and will not be repeated here.

[0210] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.< / exist> < / noexist>

Claims

1. A standardized application configuration specification detection method, characterized in that, The method includes: Obtain the original content of multiple configuration files, and parse the format of the original content to obtain the initial configuration items; Prioritize the initial configuration items according to the application framework configuration information to obtain a list of covered configuration items; The list of covered configuration items is screened for eligibility to obtain a list of configuration items that meet the criteria. Based on the suggestion information in the preset detection item expression, configuration suggestions are generated for the configuration items in the list of qualified configuration items; Based on the preset detection item expression, the list of qualified configuration items is detected to obtain the target detection result. Based on the target detection result and the configuration suggestion, the standardized application configuration specification detection is completed.

2. The method as described in claim 1, characterized in that, The steps for detecting the list of qualified configuration items according to the preset detection item expression to obtain the target detection result include: Obtain the detection function, detection condition matching function, and detection condition selection function, and obtain the preset key configuration expression and preset suggested configuration expression based on the preset detection item expression; The configuration items in the list of matching configuration items are matched by the detection condition matching function and the detection condition selection function to obtain the expression matching result. Based on the expression matching result, a target expression is selected from the preset key configuration expression and the preset suggested configuration expression; The list of qualified configuration items is tested according to the detection function and the target expression to obtain the target detection result.

3. The method as described in claim 2, characterized in that, The step of performing expression matching on the configuration items in the list of matching configuration items using the detection condition matching function and the detection condition selection function to obtain the expression matching result includes: The detection condition matching function determines whether the configuration items in the list of matching configuration items meet the expression matching logic. When a configuration item in the list of eligible configuration items satisfies the expression matching logic, the configuration item in the list of eligible configuration items is subjected to expression matching according to the detection condition selection function to obtain the expression matching result.

4. The method as described in claim 2, characterized in that, The step of detecting the list of qualified configuration items according to the detection function and the target expression to obtain the target detection result includes: The detection rule class and configuration item conflict class are obtained based on the detection function; The configuration items in the list of eligible configuration items are detected according to the detection rule class to obtain the rule detection result; The configuration items in the list of eligible configuration items are checked according to the configuration item conflict class to obtain the configuration item detection result; The target detection result is obtained based on the detection results of the rules and the detection results of the configuration items.

5. The method as described in claim 1, characterized in that, The step of prioritizing the initial configuration items according to the application framework configuration information to obtain a list of overridden configuration items includes: The first configuration item and the second configuration item are obtained based on the application framework configuration information, and the initial configuration item is overridden based on the first configuration item to obtain an initial overridden item list; Compare whether the configurations of the first configuration item and the second configuration item are the same; When the configurations of the first configuration item and the second configuration item are the same, the initial overriding item list is overridden according to the second configuration item to obtain an overriding configuration item list.

6. The method as described in claim 1, characterized in that, The step of performing a qualification screening on the list of covered configuration items to obtain a list of configuration items that meet the conditions includes: Get the preset application framework version range, dependency configuration item requirements, and expression syntax; Based on the preset application framework version range and the expression syntax, an application framework version detection expression is generated; The configuration item information is obtained from the list of overridden configuration items, and the current application framework version and current dependency configuration items are obtained from the configuration item information. The current application framework version and the current dependency configuration item are screened for eligibility based on the application framework version detection expression and the dependency configuration item requirements, and the corresponding configuration items that pass the screening are added to the list of eligible configuration items.

7. The method as described in claim 6, characterized in that, The step of performing qualification screening on the current application framework version and the current dependency configuration item according to the application framework version detection expression and the dependency configuration item requirements, and adding the corresponding configuration item that passes the qualification screening to the list of qualified configuration items includes: Based on the application framework version detection expression, the current application framework version is matched and judged to obtain the version target detection result; The current dependency configuration item is screened for eligibility based on the dependency configuration item requirements to obtain the dependency configuration item screening result. When both the version target detection result and the dependency configuration item screening result are passed, the corresponding configuration item that passed the qualified screening will be added to the list of qualified configuration items.

8. A standardized application configuration specification testing device, characterized in that, The device includes: The content parsing module is used to obtain the original content of multiple configuration files and parse the format of the original content to obtain the initial configuration items; The priority overriding module is used to override the initial configuration items according to the application framework configuration information to obtain a list of overriding configuration items. The qualification screening module is used to perform qualification screening on the covered configuration item list to obtain a list of configuration items that meet the conditions. The suggestion generation module is used to generate configuration suggestions for the configuration items in the list of qualified configuration items based on the suggestion information in the preset detection item expression. The standardization detection module is used to detect the list of qualified configuration items according to the preset detection item expression, obtain the target detection result, and complete the standardized application configuration specification detection based on the target detection result and the configuration suggestion.

9. A standardized application configuration specification testing device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the standardized application configuration specification detection method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the standardized application configuration specification detection method as described in any one of claims 1 to 7.