Configuration constraint extraction and generation method based on evolution history

By extracting and generating configuration constraints based on evolutionary history, the problem of incomplete software configuration constraint inspection is solved, efficient configuration guidance is achieved, and the stability and reliability of the system are improved.

CN120335859AActive Publication Date: 2025-07-18NAT UNIV OF DEFENSE TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510506939.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-07-18
Estimated Expiration
2045-04-22

AI Technical Summary

Technical Problem

In the prior art, the problem of incomplete software configuration constraint inspection leads to system instability and insufficient reliability, the user manual guidance effect is not ideal, the automated configuration constraint analysis method is limited to specific types or sources, and the amount of configuration item information is insufficient.

Method used

By obtaining the evolution data and metadata of the configuration items, generating evolution corpus, using the language model to generate configuration constraints and setting guidance, and combining evolution history information to optimize prompt word templates, automatic extraction and generation of configuration constraints are realized.

Benefits of technology

Improve user configuration efficiency, comprehensive and in-depth guidance on user configuration, avoid configuration errors, and improve system stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335859A_ABST
    Figure CN120335859A_ABST
Patent Text Reader

Abstract

The invention provides a configuration constraint extraction and generation method based on evolution history, and the method comprises the steps: obtaining configuration item evolution data and metadata according to a configuration item of a target configuration of an application, and updating the metadata according to the configuration item evolution data; determining an evolution description text through the configuration item evolution data, and generating an evolution corpus according to the evolution description text and the metadata; determining a cue word template according to the evolution corpus and the configuration constraint; a language model is employed through cue templates to evolve a corpus to generate configuration constraints and setup guidance for the target configuration. The method has the beneficial effects that by mining the configuration constraint information implied in the evolution history and aiming at the limitation of the result of a single cue word, the cue word is optimized by further utilizing the evolution knowledge and the evolution information, so that the configuration constraint funny automatic extraction and guidance generation are realized, and the application configuration efficiency of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method for extracting and generating configuration constraints based on the evolution history. Background Art

[0002] Software configuration constraints are a series of rules and restrictive conditions that need to be observed during the configuration process of a software system to ensure the correctness, reliability, and security of the system. These constraints may include the configuration items themselves or the requirements for the hardware, software, network, and other environmental aspects during runtime. If these constraint conditions are violated, it may lead to system instability, errors, or failures, thereby affecting the usability and reliability of the system.

[0003] When developers design and implement configurations, they cannot conduct comprehensive inspections. Even worse, they may directly allow the configuration values set by users to be passed in and propagated in the program without any inspection. Currently, the configuration code of software is far from sufficient to conduct a complete and comprehensive inspection of configuration items. At present, the main source for users to obtain configuration constraints is the user manual (including configuration files and official user manuals). However, the effect of guiding users to configure using the user manual is not ideal. The reasons include: the user manual contains a large amount of content irrelevant to configuration, and the query is relatively complex; the constraint content for configuration is less, and the amount of information is insufficient.

[0004] To solve the problem of difficult use of user documentation, the prior art uses automated configuration constraint analysis and extraction methods to help users better understand configuration constraints. However, these works mainly target specific types of constraints (such as type constraints) or extract constraints from a single source (such as log information inclusion constraints). A large number of configuration items do not have corresponding user documentation added synchronously when they are first introduced. At the same time, relevant research shows that the quality of configuration-related logs also urgently needs to be strengthened. Summary of the Invention

[0005] The main purpose of the embodiments of the present invention is to propose a method for extracting and generating configuration constraints based on the evolution history, which improves the configuration efficiency of application programs.

[0006] One aspect of the present invention provides a method for extracting and generating configuration constraints based on the evolution history, characterized by including:

[0007] Obtain configuration item evolution data and metadata according to the configuration items of the target configuration of the application, and update the metadata according to the configuration item evolution data;

[0008] Determine an evolution description text based on the configuration item evolution data, and generate an evolution corpus according to the evolution description text and the metadata;

[0009] Determine a prompt word template according to the evolution corpus and configuration constraints;

[0010] Using the prompt template and the evolved corpus, a language model is employed to generate the configuration constraints and setting guidelines for the target configuration.

[0011] According to the method for extracting and generating configuration constraints based on the evolutionary history, by applying the configuration items of the target configuration, configuration item evolution data and metadata are obtained, and the metadata is updated according to the configuration item evolution data, including:

[0012] Identified by the name of the configuration item, obtain the historical commit logs of the target configuration;

[0013] Determine the metadata according to the historical commit logs, perform a forward screening on the historical commit logs to obtain the configuration item evolution data, and each time screening is performed, the metadata is updated according to the changes in the historical commit logs, where the metadata includes configuration items, configuration name variables, default value name constants, default values, and configuration variables.

[0014] According to the method for extracting and generating configuration constraints based on the evolutionary history, where the evolutionary description text is determined according to the configuration item evolution data, and the evolved corpus is generated according to the evolutionary description text and the metadata, including:

[0015] Obtain the issue number of the screened historical commit logs, and obtain the evolutionary description text of the historical commit logs according to the issue number;

[0016] According to the proportion of the name identifier of the configuration item in the evolutionary description text, those with a proportion exceeding the preset value are added to the evolved corpus.

[0017] According to the method for extracting and generating configuration constraints based on the evolutionary history, where according to the proportion of the name identifier of the configuration item in the evolutionary description text, those with a proportion exceeding the preset value are added to the evolved corpus, including:

[0018] Split the keywords in the name identifier of the configuration item, search from the evolutionary description text according to the keywords of the name identifier, and when any keyword in the evolutionary description text exceeds the preset value or includes the name identifier of the configuration item, the evolutionary description text is added to the corpus, where the preset value is 50%.

[0019] According to the method for extracting and generating configuration constraints based on the evolutionary history, where the prompt template is determined according to the evolved corpus and the configuration constraints, including:

[0020] Determine the configuration constraints according to the semantic information, modification necessity, legal value range, operating environment, and load of the configuration item, and generate a prompt template according to the configuration constraints;

[0021] Optimize the prompt template using imperative words according to the evolved corpus and configuration item evolution data.

[0022] According to the method for extracting and generating configuration constraints based on the evolution history, wherein the configuration constraints and setting guidelines for generating the target configuration are generated by using a language model with the evolved corpus through the prompt template, including:

[0023] Determine the hidden constraint text according to the evolved corpus, where the hidden constraint text includes values, requirements, scenarios, results, and imperative words;

[0024] Combine the hidden constraint text to obtain combined features, where the combined features include the results that may be caused when reaching a specific environmental load, the developer knowledge for modifying configuration values when applying the load, and the configuration values of user requirements;

[0025] Generate prompt content through the combined features, examples of the combined features, and the prompt template, and use a language model to generate configuration constraints and setting guidelines according to the prompt content.

[0026] According to the method for extracting and generating configuration constraints based on the evolution history, wherein the language model includes:

[0027] Using GPT as the model engine, and obtaining it through few-shot learning with the evolved description text as the context.

[0028] The beneficial effects of the present invention are as follows: By mining the configuration constraint information hidden in the evolution history, aiming at the limitations of the results of a single prompt, further optimize the prompt using evolution knowledge and evolution information, realize the efficient automatic extraction of configuration constraints and the generation of guidance, and improve the configuration efficiency of users for applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and / or additional aspects and advantages of the present invention will become apparent and easy to understand from the description of the embodiments in conjunction with the following drawings, wherein:

[0030] Figure 1 is a schematic flowchart of the method for extracting and generating configuration constraints based on the evolution history according to an embodiment of the present invention.

[0031] Figure 2 is a schematic flowchart of the extraction process of configuration item evolution data according to an embodiment of the present invention.

[0032] Figure 3 is a schematic flowchart of the evolved corpus generation process according to an embodiment of the present invention.

[0033] Figure 4 is an example diagram of a differential segment touching a specific configuration according to an embodiment of the present invention.

[0034] Figure 5 It is a schematic diagram of the prompting word template generation process according to an embodiment of the present invention.

[0035] Figure 6 It is a schematic diagram of the prompting word template optimization process according to an embodiment of the present invention.

[0036] Figure 7 It is a schematic diagram of the framework and working process of EvoConf according to an embodiment of the present invention.

[0037] Figure 8 It is a comparison diagram of the constraint extraction ratios of EvoConf and existing work for different types according to an embodiment of the present invention.

[0038] Figure 9 It is an effect diagram of the constraint extraction of prompting words with different optimization levels according to an embodiment of the present invention.

[0039] Figure 10 It is a diagram of the configuration constraint extraction and generation analysis device based on the evolution history according to an embodiment of the present invention. Detailed implementation manners

[0040] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. In the following description, the suffixes such as "module", "component" or "unit" used to represent elements are only for the convenience of describing the present invention, and they have no specific meaning by themselves. Therefore, "module", "component" or "unit" can be used interchangeably. "First", "second", etc. are only used to distinguish technical features and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence of the indicated technical features. In the following description, the consecutive numbering of the method steps is for the convenience of review and understanding. Combining the overall technical solution of the present invention and the logical relationship between the steps, adjusting the implementation order between the steps will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.

[0041] Term explanation:

[0042] EvoConf, a tool for extracting and generating configuration constraints based on the evolution history proposed in an embodiment of the present invention.

[0043] Commit log, the information recorded at the time of submission, which is used to record the change content of the code, the submitter, the submission time, etc., to help developers track the history of code changes and conduct code reviews.

[0044] Issue description, a document used to record task or problem information.

[0045] Reference Figure 1 , Figure 1 is a schematic diagram of the configuration constraint extraction and generation method based on the evolution history, which includes but is not limited to steps S100 to S400:

[0046] S100, obtain the configuration item evolution data and metadata according to the configuration items of the application target, and update the metadata according to the configuration item evolution data.

[0047] In some embodiments, referring to Figure 2 the schematic diagram of the extraction process of the configuration item evolution data shown, which includes but is not limited to steps S110 to S120:

[0048] S110, obtain the historical commit logs of the target configuration with the name identifier of the configuration item;

[0049] S120, determine the metadata according to the historical commit logs, perform a forward screening on the historical commit logs to obtain the configuration item evolution data, and update the metadata according to the changes in the historical commit logs each time screening is performed.

[0050] In some embodiments, the metadata includes configuration items, configuration name variables, default value name constants, default values, and configuration variables.

[0051] In some embodiments, taking the HBase configuration item hbase.hregion.memstore.chunkpool.maxsize as an example, its code structure is as follows:

[0052] 1 / *MemStoreLAB.java* /

[0053] 2 / / Configuration name constant (derived from the configuration item)

[0054] 3String CHUNK_POOL_MAXSIZE_KEY=

[0055] 4”hbase.hregion.memstore.chunkpool.maxsize”;

[0056] 5 / / Default value name constant and default value

[0057] 6float POOL_MAX_SIZE_DEFAULT=1.0f;

[0058] 7 / *HRegionServer.java* /

[0059] 8 / / Configure variables (read from configuration items by configuration name)

[0060] 9float poolSizePercentage =

[0061] 10conf.getFloat(CHUNK_POOL_MAXSIZE_KEY, POOL_MAX_SIZE_DEFAULT);

[0062] Among them, the configuration item is passed a configuration name constant, and the use and modification of the configuration both refer to this configuration name constant. Through the configuration parsing API (conf.getFloat in the example), the value of the configuration is passed in and stored in the configuration variable poolSizePercentage, and then this variable enters the data flow / control flow to affect the software operation.

[0063] It can be understood that the application of the embodiments of the present invention follows this configuration to implement programming specifications. For new software, the corresponding programming specifications can be matched by modifying the regular expression template.

[0064] S200, determine the evolution description text through the configuration item evolution data, and generate an evolution corpus according to the evolution description text and metadata.

[0065] In some embodiments, referring to Figure 3 the schematic diagram of the evolution corpus generation process shown, it includes but is not limited to steps S210 to S220:

[0066] S210, obtain the issue number of the filtered historical commit log, and obtain the evolution description text of the historical commit log according to the issue number;

[0067] S220, add those with a ratio exceeding the preset value to the evolution corpus according to the ratio of the name identifier of the configuration item in the evolution description text.

[0068] In some embodiments, by splitting the keywords in the name identifier of the configuration item, searching from the evolution description text according to the keywords of the name identifier, when the keyword in any evolution description text exceeds the preset value or includes the name identifier of the configuration item, the evolution description text is added to the corpus, where the preset value is 50%.

[0069] In some embodiments, referring to Figure 4 the example diagram of the difference segment touching a specific configuration, where Figure 4 (a) in it is that the code difference segment touches the configuration name constant, Figure 4 (b) in it is that the code difference segment touches the configuration variable.

[0070] Among them, Figure 4 in (a), the code for throwing an exception is added, and the code contains the configuration name constant. Figure 4 In (b), the use of this configuration item (through the configuration variable poolSizePercentage) is newly added after the configuration item has been introduced for many years. Neither of these two situations can be obtained by directly using the configuration item name as the keyword for screening. In the specific implementation, since these several configuration metadata may be continuously modified during the evolution process, EvoConf filters the commit history in ascending order and always matches the configuration parsing code that may generate changes, and then updates the metadata in a timely manner. For the screened commits, EvoConf will link to the relevant issue interface according to the issue number and obtain the descriptions, release information, and developer discussions in it as the evolution corpus. In the specific implementation, EvoConf will split the configuration item name into keywords (the naming convention of the configuration item naturally supports keyword splitting). For example, the configuration item name hbase.hregion.memstore.chunkpool.maxsize will be split into {"hregion", "memstore", "chunkpool", "maxsize"} (where "hbase" indicates the software and is not considered here). If a text segment in an embodiment of the present invention directly contains the configuration item name or contains more than 50% of the keywords, then this text segment is added to the evolution corpus of this configuration item.

[0071] S300. Determine the prompt word template according to the evolution corpus and configuration constraints.

[0072] In some embodiments, referring to Figure 5 the schematic diagram of the prompt word template generation process shown, it includes but is not limited to steps S310 to S320:

[0073] S310. Determine the configuration constraints according to the semantic information, modification necessity, legal value range, operating environment, and load of the configuration item, and generate a prompt word template according to the configuration constraints;

[0074] In some embodiments, the semantic information #1 of the configuration item is important information describing the semantic category and function of the configuration item, which can help users quickly understand the background knowledge of the configuration item and its related software functions. For example, for the configuration item P, the obtained prompt word template is: "What is the semantic meaning of p?"

[0075] In some embodiments, for the necessity of modification #2, the default values of configuration items meet the basic requirements of software operation in most cases. Therefore, in most cases (about 54.1%), users do not actively modify the values of the configuration. Even for users familiar with the software system, frequently modifying the values of the configuration may introduce configuration errors. Therefore, the first prompt template in EvoConf focuses on the necessity of configuration modification, that is, in what circumstances does the user need to modify the value of this configuration item. For the configuration item p, its template is: "When does the user need to change the default value of p?"

[0076] In some embodiments, most configuration items have specific value ranges #3 (especially for numerical and enumerated configuration items). Violating the value range constraints will cause serious consequences to the software and damage the reliability of the software. Therefore, this prompt template focuses on the legal value range of the configuration, which is also the most basic constraint of the configuration item. For the configuration item p, its template is: "What is the value type of p and what are the legal values?"

[0077] In some embodiments, for the operating environment and load #4, that is, the configuration often contains complex dynamic constraints. Different from the previous prompt, the setting of this type of configuration item needs to consider the dynamic information during software operation, so its constraints are difficult to obtain by traditional static program analysis methods. This prompt template focuses on the software operating environment and load that need to be comprehensively considered when setting the configuration, and assists the user to comprehensively consider their actual operating conditions. For the configuration item p, its template is: "What hardware and software environments need to be considered when setting p, and what are the typical workloads that may cause configuration errors?"

[0078] S320. According to the evolutionary corpus and configuration item evolution data, use imperative words to optimize the prompt template.

[0079] It can be understood that informing the above constraint information, for users who do not understand the software system, it is still sometimes difficult for them to reasonably set the configuration items. Specifically, the user manual sometimes contains simple adjustment suggestions, which are usually in the form of imperative sentences, such as "If we need to use compressed memory storage for the system table, please set this property to BASIC / EAGER". However, such prompts are often not comprehensive enough and only contain setting suggestions in common cases. This template requires evolutionary information support to give reasonable suggestions for specific configuration items. For the configuration item p, its template is: "Optimize the previous answer and provide some setting suggestions for the following text: "Text""

[0080] The above optimization of the prompt template is to optimize the prompt through the evolutionary history information of the configuration item #5, so that the large language model generates corresponding constraint guidance for the evolutionary history information of specific configuration items.

[0081] In some embodiments, referring to Figure 6 the schematic diagram of the prompting word template optimization process shown in

[0082] S321, determine the hidden constraint text according to the evolutionary corpus, where the hidden constraint text includes values, requirements, scenarios, results, and imperative words.

[0083] S322, combine the hidden constraint text to obtain combined features;

[0084] Among them, the combined features include the possible results when reaching a specific environmental load, the developer's knowledge of modifying configuration values when applying the load, and the configuration values of user requirements.

[0085] S323, generate the prompting word content through the combined features, examples of the combined features, and the prompting word template, and use the language model to generate configuration constraints and setting guides according to the prompting word content.

[0086] In some embodiments, T1 - T3 are combinations of hidden constraint texts, that is, combined features, as shown in Table 1 below:

[0087] Table 1 Implicit Constraint Text Types and Examples

[0088]

[0089] Prompting words: There are three types of sentences containing specifications / constraints here:

[0090] Type #1: This sentence describes the scenario and the consequences in a specific situation, and the value has been set.

[0091] Specification / Constraint Example #1: "T1 example"

[0092] Specification / Constraint Example #1: "More T1 examples"

[0093] Specification / Constraint Example #1: "More T1 examples"

[0094] Type #2: This sentence describes what value should be used in a specific scenario by using an imperative word.

[0095] Specification / Constraint Example #2: "T2 example"

[0096] Specification / Constraint Example #2: "More T2 examples"

[0097] Specification / Constraint Example #2: "More T2 examples"

[0098] Type #3: This sentence uses an imperative word to describe the requirements in a specific scenario.

[0099] Specification / Constraint Example #3: "T3 example"

[0100] Specification / Constraint Example #3: "More T3 Examples"

[0101] Specification / Constraint Example #3: "More T3 Examples"

[0102] Select sentences from the sentence set that meet the following conditions according to the previous types and examples, which may include the specifications / constraints in the following text:

[0103] Sentence Settings:

[0104] Sentence #1: "Evolutionary Information Text"

[0105] Sentence #2: "Evolutionary Information Text"

[0106] Sentence #3: "Evolutionary Information Text"

[0107] The above "Evolutionary Information Text" is the evolutionary corpus. Further, these selected sentences that may include constraints will be used as supplementary evolutionary information context for the original prompt (prompt optimization example). For example, for the configuration item hbase.regionserver.hfilecleaner.large.thread.count, providing its evolutionary history information (developer discussion) can improve the above prompt (prompt optimization example) and be iteratively generated according to the specific needs of the user.

[0108] The specific process is as follows:

[0109] Optimize the previous answer and provide some setting suggestions based on the following content, including:

[0110] Text: "Due to the change in business access rate, we observed more than 1.8PB of data in the online archive directory, and this proposal is one of the necessary changes required. "In our example, the speed is quite fast. After we open 25 threads (large and small file deletion) for each thread, there is no obvious change in the NN metrics. With 50 threads, it should be fast enough to complete one cycle."

[0111] Output: Based on the information provided, if there is at least 1.8PB of data in the online archive directory and the developer finds that using up to 50 threads for large file cleaning and small file deletion is sufficient to complete one cycle quickly without any obvious impact on the NN metrics. As a starting point, you can set the value of this parameter to 50 and monitor the performance of the HFileCleaner to determine whether this value provides the best performance without negatively affecting other RegionServer tasks. If you find that the performance is not optimal or other tasks are affected, you can adjust the value of this parameter up or down accordingly.

[0112] Prompt: What if there is 0.9 PB of data in the online archive directory?

[0113] Output: If there is 0.9 PB of data in the online archive directory, a lower value can be used for the "hbase.regionserver.hfilecleor.larg.thread.count" parameter. As a starting point, you can set the value of this parameter to a lower value, such as 25, and monitor the performance of the HFileCleaner.

[0114] S400, using the prompt template to evolve the corpus with a language model to generate configuration constraints and setting guides for the target configuration.

[0115] In some embodiments, GPT is used as the model engine, and few-shot learning is obtained by using the evolved description text as the context.

[0116] EvoConf in the embodiments of the present invention uses a large language model to generate constraints and guides for corresponding configuration items. EvoConf selects GPT3.5 as the model engine. Traditional text classification models can also be applied to this task (judging which one contains constraints from the developer discussion), however, this requires a large amount of training data to ensure the accuracy of classification. For the evolution of configuration items, the amount of data for its evolution behavior is often insufficient to support such a training process. In the specific implementation of the embodiments of the present invention, since EvoConf puts the evolution information into the prompt as context knowledge for context learning, there is no need to perform additional fine-tuning on the model. This can save the overhead of complicated iterative training and avoid the occurrence of overfitting. The distribution of configuration items of different software used for training is shown in Table 2 below:

[0117] Table 2 Selection of software and distribution of selected configuration items

[0118] Software Description #Boolean #Numeric #String #Enumeration HDFS Distributed File System 13 18 6 6 HBase Distributed Database 12 16 4 6 Spark Big Data Processing 10 20 6 8 Cassandra Distributed Database 11 14 8 3 ZooKeeper Configuration Management System 14 12 6 7 Total - 60 80 30 30

[0119] In some embodiments, refer to Figure 7The schematic diagram of the framework and workflow of EvoConf is shown. Its input is specific configuration items and a prompt template (the prompt template has been designed according to the evolutionary history research in the embodiments of the present invention and can also be adjusted by users), and the output is configuration constraints and specific setting guidance. EvoConf mainly includes three modules: evolutionary information extraction, prompt design and optimization, and constraint guidance generation. Among them, evolutionary information extraction obtains the evolutionary information in it to support the optimization of prompts by identifying the evolutionary history of specific configuration items. The prompt template of EvoConf is adopted, and the prompts are optimized using the evolutionary information. Finally, EvoConf generates configuration item constraints and guidance based on the prompts through a large language model.

[0120] In some embodiments, the embodiments of the present invention extracted 200 configuration items from 5 widely used open-source softwares (HDFS, HBase, Spark, Cassandra, ZooKeeper) for testing. Table 3 shows the comparison of the extraction constraint effects of EvoConf of the present invention with the prior arts Spex, ConfinLog, and PracExtractor. The reasons for selecting these softwares are as follows:

[0121] 1) They are widely used open-source softwares and have rich evolutionary histories;

[0122] 2) They contain a large number of configuration items and a wide variety of configuration item types, and users are prone to configuration errors when configuring the softwares;

[0123] 3) They are long-running basic service softwares and have high requirements for reliability and performance. The embodiments of the present invention selected configuration items for different data types, mainly including boolean, numerical, string, and enumeration configuration items. Since the quantity distribution of the configuration item types themselves is not uniform, and the constraints for numerical configuration items are often more complex than those for other types of configuration items, each type was not evenly selected during the experiment. Finally, the embodiments of the present invention selected a total of 200 configuration items, including 60 boolean configurations, 80 numerical configurations, 30 string configurations, and 30 enumeration configurations. These configuration items are all configuration items of the software's core modules and are still used in the latest version.

[0124] Table 3 Comparison of extraction constraint effects

[0125]

[0126] The overall comparison results are given in reference to Table 3. Among them, the extraction effectiveness of different types of constraints for different types of configuration items by EvoConf is 83.3%-100%, and it exceeds the effectiveness of existing tools in 9 / 10 categories.

[0127] As Figure 8 shown in the figure of the extraction ratio of different types of constraints by EvoConf and existing work, for specific types of constraints, the extraction efficiency of EvoConf for environmental load constraints is 2.1 times that of existing work. And it exceeds existing tools in the extraction of various types of constraints. For Spex, its main method is to perform static program analysis on the code, so its extraction effect for specific types of constraints is relatively prominent, such as configuration type constraints (in Java programs, when configuration values are passed into program variables, the data types need to be specified). However, the program analysis method cannot accurately obtain more complex constraint types. ConfinLog and PracExtractor introduce natural language knowledge, so more complex constraints can be analyzed from them. However, they are both limited by the availability of constraint sources. Not all configuration items contain corresponding log information or user documentation records, so they lose the ability to comprehensively extract constraints for specific configuration items. EvoConf utilizes the rich dataset behind the large model and the correction and optimization of evolutionary information, so it is not limited to a single type of constraint source, and at the same time includes complex constraints hidden in the evolutionary history, so it can provide users with comprehensive and in-depth configuration guidance.

[0128] Refer to Figure 9 shown in the constraint extraction effects of different optimization level prompts, which are large language model + single prompt, large language model + prompts designed based on evolutionary learning, and large language model + prompt optimization supported by evolutionary information. And the extracted constraints and the generated guidance results are manually verified. It can be seen that the large language model combined with a single prompt can already extract type constraints relatively completely. After designing the prompt template in combination with the key points concerned by developers and users in the evolutionary history, the extraction effects of value range constraints and environmental load constraints have both improved. For specific guidance (the guidance statement contains quantitative analysis, or clearly defines the function and component name), after adding evolutionary information, the ability of the large language model has increased by 3.3 times compared with the initial stage. Comparing the generated guidance with the user documentation The ultimate goal of EvoConf is to guide users to comprehensively and in-depth understand the configuration to avoid possible configuration errors. Compared with source code and logs, user documentation is the direct source of information that users refer to when configuring software, which includes configuration files and official user manuals. For example, the configuration file of HBase is hbasedefault.xml, and its user manual is configuration.adoc. For the 200 selected configuration items, 64 of them do not have configuration documentation. For the remaining 136 configuration items, the guidance content extracted by EvoConf exceeds the content of the user documentation by 100% (that is, it contains constraint type content that does not exist in the user documentation).

[0129] Figure 10It is a diagram of the apparatus for extracting and generating configuration constraints based on the evolution history according to an embodiment of the present invention. The apparatus includes a first module 1010, a second module 1020, a third module 1030, and a fourth module 1040.

[0130] Among them, the first module is used to obtain configuration item evolution data and metadata according to the configuration items of the target configuration of the application, and update the metadata according to the configuration item evolution data; the second module is used to determine the evolution description text through the configuration item evolution data, and generate an evolution corpus according to the evolution description text and the metadata; the third module is used to determine the prompt word template according to the evolution corpus and the configuration constraints; the fourth module is used to use the language model with the evolution corpus through the prompt word template to generate the configuration constraints and setting guidance of the target configuration.

[0131] Exemplarily, with the cooperation of the first module, the second module, the third module, and the fourth module in the apparatus, the embodiment apparatus can implement any one of the foregoing methods for extracting and generating configuration constraints based on the evolution history, that is, obtain configuration item evolution data and metadata according to the configuration items of the target configuration of the application, and update the metadata according to the configuration item evolution data; determine the evolution description text through the configuration item evolution data, and generate an evolution corpus according to the evolution description text and the metadata; determine the prompt word template according to the evolution corpus and the configuration constraints; use the language model with the evolution corpus through the prompt word template to generate the configuration constraints and setting guidance of the target configuration. The beneficial effects of the present invention are: by mining the configuration constraint information hidden in the evolution history, aiming at the limitations of the results of a single prompt word, further using the evolution knowledge and evolution information to optimize the prompt word, realizing the efficient automatic extraction of configuration constraints and guiding generation, and improving the configuration efficiency of users for the application.

[0132] An embodiment of the present invention further provides an electronic device, which includes a processor and a memory;

[0133] The memory stores a program;

[0134] The processor executes the program to execute the foregoing method for extracting and generating configuration constraints based on the evolution history; the electronic device has the function of carrying and running the software system for extracting and generating configuration constraints based on the evolution history provided by the embodiment of the present invention. For example, a personal computer, a minicomputer, a mainframe, a workstation, a network or a distributed computing environment, a separate or integrated computer platform, or communicating with charged particle tools or other imaging devices, etc.

[0135] An embodiment of the present invention further provides a computer-readable storage medium, the storage medium stores a program, and the program is executed by a processor to implement the method for extracting and generating configuration constraints based on the evolution history as described above.

[0136] In some alternative embodiments, the functions / operations recited in the block diagrams may not occur in the order presented in the operational illustrations. For example, depending on the functions / operations involved, two blocks shown in succession may actually be executed substantially simultaneously or the blocks may sometimes be executed in the reverse order. Further, the embodiments presented and described in the flowcharts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are envisioned in which the order of various operations is altered and in which sub-operations described as part of a larger operation are executed independently.

[0137] Embodiments of the present invention also disclose a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device may read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the foregoing method for extracting and generating configuration constraints based on an evolutionary history.

[0138] In addition, although the present invention has been described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features described may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It should also be understood that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the module will be understood within the ordinary skill of an engineer, given the attributes, functions, and internal relationships of the various functional modules in the devices disclosed herein. Thus, those of ordinary skill in the art can implement the present invention as set forth in the claims without undue experimentation. It should also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0139] If the above-described functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0140] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a predefined sequence of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0141] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0142] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0143] In the description of this specification, the descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0144] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the claims and their equivalents.

[0145] The above has specifically described the preferred embodiments of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for extracting and generating configuration constraints based on evolutionary history, characterized in that, It includes: Configuration items configured according to the goals of the application, obtaining configuration item evolution data and metadata, and updating the metadata according to the configuration item evolution data; Determining an evolution description text through the configuration item evolution data, and generating an evolution corpus according to the evolution description text and the metadata; Determining a prompt template according to the evolution corpus and configuration constraints; Generating the configuration constraints and setting guidance for the target configuration by using the language model with the evolution corpus through the prompt template.

2. The method for extracting and generating configuration constraints based on the evolutionary history according to claim 1, wherein The configuration items configured according to the goals of the application, obtaining configuration item evolution data and metadata, and updating the metadata according to the configuration item evolution data, includes: Taking the name identifier of the configuration item to obtain the historical commit logs of the target configuration; Determining metadata according to the historical commit logs, performing a forward screening on the historical commit logs to obtain configuration item evolution data, and updating the metadata according to the changes in the historical commit logs each time, where the metadata includes configuration items, configuration name variables, default value name constants, default values, and configuration variables.

3. The configuration constraint extraction and generation method based on the evolutionary history according to claim 2, wherein The configuration item evolution data determines an evolution description text, and generating an evolution corpus according to the evolution description text and the metadata, includes: Obtaining the issue number of the historical commit logs obtained by screening, and obtaining the evolution description text of the historical commit logs according to the issue number; Adding those with a ratio exceeding a preset value to the evolution corpus according to the ratio of the name identifier of the configuration item in the evolution description text.

4. The method for extracting and generating configuration constraints based on evolutionary history according to claim 3, characterized in that, Adding those with a ratio exceeding a preset value to the evolution corpus according to the ratio of the name identifier of the configuration item in the evolution description text, includes: Splitting the keywords in the name identifier of the configuration item, searching from the evolution description text according to the keywords of the name identifier, and adding the evolution description text to the corpus when any keyword in the evolution description text exceeds the preset value or includes the name identifier of the configuration item, where the preset value is 50%.

5. The method for extracting and generating configuration constraints based on evolutionary history according to claim 1, wherein Determining a prompt template according to the evolution corpus and configuration constraints, includes: Determining the configuration constraints according to the semantic information, modification necessity, legal value range, operating environment, and load of the configuration item, and generating a prompt template according to the configuration constraints; Optimizing the prompt template by using imperative words according to the evolution corpus and configuration item evolution data.

6. The method for extracting and generating configuration constraints based on evolutionary history according to claim 1, wherein Generating the configuration constraints and setting guidance for the target configuration by using the language model with the evolution corpus through the prompt template, includes: Determining a hidden constraint text according to the evolution corpus, where the hidden constraint text includes values, requirements, scenarios, results, and imperative words; Combining the hidden constraint texts to obtain combined features, where the combined features include the results that may be caused when reaching a specific environmental load, the knowledge of developers who modify the configuration values when applying the load, and the configuration values of user requirements; Generating prompt content through the combined features, examples of the combined features, and the prompt template, and generating configuration constraints and setting guidance by using the language model according to the prompt content.

7. The method for extracting and generating configuration constraints based on evolutionary history according to claim 6, wherein The language model includes: Using GPT as the model engine, obtained through few-shot learning with the evolved descriptive text as the context.

Citation Information

Patent Citations

  • Intelligent parameter configuration method and device based on association mining

    CN114327668A

  • Configuration fault prediction method based on program semantics

    CN115562645A

  • Large language model cue word generation method and system, terminal equipment and medium

    CN118093838A

  • Method for creating text, device, apparatus, and storage medium

    JP2021106017A

  • Method and device for processing information

    WO2020052061A1