Software development upstream and downstream task parameter transmission and optimization method based on artificial intelligence
By constructing parameter knowledge graphs and using graph neural networks to process parameter transmission data, combined with hierarchical reinforcement learning strategies, the systematic modeling problem of parameter transmission and optimization in software development is solved, the automation and intelligence of parameter management is realized, and the efficiency and quality of software development are improved.
Patent Information
- Application Number
- CN202510984697.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-07-17
AI Technical Summary
The existing software development method lacks systematic modeling, and it is difficult to accurately reflect the parameter dependency and degree of influence. It relies on manual experience, lacks data-driven intelligent decision support, cannot generate optimal parameter adjustment solutions, and lacks closed-loop feedback mechanism for optimization experience.
Build a parameter knowledge graph, use the graph neural network to process the parameter transmission data, generate parameter dependency graphs, monitor parameter changes in real time, use a hierarchical reinforcement learning strategy to generate optimization solutions, establish a parameter optimization decision model, and realize the automation and intelligence of parameter management.
It realizes accurate modeling of parameter dependencies, quickly identify the impact range of parameter changes, improves optimization efficiency and software development quality, reduces the communication cost of the development team, and speeds up the iteration speed.
Smart Images

Figure CN120491935A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to artificial intelligence technology, and in particular to an artificial intelligence-based software development upstream and downstream task parameter transfer and optimization method. Background Art
[0002] In modern software development, as project scale and complexity continue to increase, development tasks are broken down into multiple interdependent upstream and downstream links, requiring frequent parameter transfer between these links. Parameters, as a key information carrier in software development, are used throughout every stage, from requirements analysis and system design to code implementation and testing and verification. Effectively managing and optimizing the transfer of these parameters is crucial for improving software development efficiency and ensuring software quality. In traditional software development, parameter transfer primarily relies on manual management and documentation. However, the advancement of artificial intelligence (AI), particularly knowledge graphs and graph neural networks, has provided new technical approaches for parameter transfer and optimization in software development.
[0003] However, existing software development parameter transfer and optimization methods have some obvious defects and deficiencies. First, the existing methods lack systematic modeling of parameter transfer paths, making it difficult to accurately reflect the dependency and impact of parameters between different development stages, resulting in the inability to effectively assess the scope of influence when parameters are changed, and often leading to problems where the chain reactions after parameter changes are not handled in a timely manner. Secondly, existing parameter optimization methods mostly rely on the experience of developers, lack data-driven intelligent decision-making support, and are unable to automatically generate the optimal parameter adjustment plan based on historical optimization experience and current project characteristics, making it difficult to cope with complex and changing development scenarios. In addition, existing technologies have not established a closed-loop feedback mechanism for parameter optimization, making it difficult to systematically accumulate and utilize optimization experience, resulting in the recurrence of similar problems and the inability to effectively inherit and apply parameter optimization knowledge. Summary of the Invention
[0004] The embodiments of the present invention provide an artificial intelligence-based software development upstream and downstream task parameter transfer and optimization method, which can solve the problems in the prior art.
[0005] A first aspect of an embodiment of the present invention provides an artificial intelligence-based method for transferring and optimizing parameters of upstream and downstream tasks in software development, including: Constructing a parameter knowledge graph for software development, which includes a parameter mapping knowledge base, a task dependency library, and an optimization experience library; Receive parameter transfer data during the software development process, process the parameter transfer data using a graph neural network, match and analyze the parameter transfer data with information in the parameter mapping knowledge base and the task dependency library, and generate a parameter dependency graph, wherein the parameter dependency graph is used to characterize the transfer path and influence intensity between parameters; Real-time monitoring of parameter transfer during software development. When a parameter change is detected, the impact range of the parameter change is analyzed based on the parameter dependency graph to obtain a set of affected parameter nodes. Constructing a parameter optimization decision model, wherein the parameter optimization decision model uses the affected parameter node set as state input, retrieves optimization solutions for similar scenarios from the optimization experience library as prior knowledge, and uses a hierarchical reinforcement learning strategy to generate parameter optimization solutions. The hierarchical reinforcement learning strategy includes a parameter selection layer and a parameter adjustment layer; the parameter selection layer determines the target parameters to be optimized, and the parameter adjustment layer generates specific parameter values; The parameter optimization scheme is executed, and the optimization effect is recorded and stored as new experience data in the optimization experience library.
[0006] In an optional embodiment, The steps of constructing a parameter knowledge graph for software development, wherein the parameter knowledge graph includes a parameter mapping knowledge base, a task dependency library, and an optimization experience library, include: Collect multi-source parameter data during the software development process, including parameter definition data in the code repository, parameter specification data in the development documents, and parameter transfer data in the operation log; construct the basic structure of the parameter knowledge graph based on the multi-source parameter data, taking parameters, tasks, and optimization solutions as graph entities, and taking the mapping relationship between parameters, the dependency relationship between tasks, the association relationship between parameters and tasks, and the interaction relationship between optimization solutions and parameters as edges in the graph, to form a multi-heterogeneous knowledge network structure; Standardize parameter names based on morphological restoration, calculate semantic similarity between parameters, determine parameter mapping relationships based on a preset similarity threshold, and generate a parameter mapping knowledge base; establish parameter format conversion rules and store them in the parameter mapping knowledge base; Extract the calling relationships and parameter flow paths between tasks to obtain static task dependencies, track the parameter transfer during runtime to obtain dynamic task association information, and use a weighted fusion method to calculate the coupling degree between tasks. The weighted fusion method comprehensively considers the parameter sharing degree and transfer frequency to generate a task dependency library. Formalize historical optimization plans, extract optimization rules, calculate the similarity between optimization plans, and generate an optimization experience database; The parameter knowledge graph is subjected to consistency check and integrity verification, and an incremental knowledge update mechanism is established.
[0007] In an optional embodiment, The steps of receiving parameter transfer data in the software development process, processing the parameter transfer data using a graph neural network, matching and analyzing the parameter transfer data with information in the parameter mapping knowledge base and the task dependency library, and generating a parameter dependency graph, wherein the parameter dependency graph is used to characterize the transfer path and influence intensity between parameters, include: Extracting parameter type codes, parameter name semantic codes, parameter value range codes, and parameter context feature codes from the parameter transfer data to generate a parameter feature vector; extracting transfer type, transfer frequency, and timing features from the parameter transfer data to generate a parameter transfer relationship feature; Matching the parameter feature vector with the information in the parameter mapping knowledge base, calculating the parameter semantic similarity, and determining the mapping relationship between the parameters based on the parameter semantic similarity; matching the parameter transfer relationship feature with the information in the task dependency relationship library, and calculating the task dependency strength; Constructing a graph structure, using the parameters with mapping relationships as nodes in the graph, using the parameter transfer relationship characteristics as attributes of the edges in the graph, and using the parameter feature vectors as initial features of the nodes; The constructed graph structure is processed using a graph neural network. Node messages are generated based on the parameter feature vectors of the nodes and the parameter transfer relationship features of the edges. The generated node messages are aggregated to obtain updated features of the nodes. The connection strength between nodes is calculated based on the updated features. A parameter dependency graph is generated based on the connection strength, where the parameter dependency graph represents the transfer path and influence strength between parameters, and the influence strength is determined by the parameter semantic similarity, the task dependency strength, and the connection strength.
[0008] In an optional embodiment, Generating node messages based on the parameter feature vectors of the nodes and the parameter transfer relationship features of the edges, aggregating the generated node messages to obtain updated features of the nodes; and calculating the connection strength between the nodes based on the updated features includes: Generate a node message based on the parameter feature vector and the parameter transfer relationship feature of the edge, calculate the attention weights of features of different dimensions, and multiply the attention weights by the feature conversion matrix to enhance the node message; The enhanced node messages are hierarchically aggregated. Local message aggregation is performed within the local neighborhood range. The node messages of local neighbor nodes are weightedly combined based on the local aggregation weight to obtain local aggregate features. Global message aggregation is performed globally. The local aggregate features of global neighbor nodes are weightedly combined based on the global aggregation weight. The local aggregate features and global aggregate features are balanced through the gating parameters to obtain the updated features of the node. The connection strength between nodes is calculated based on the updated features, and the connection strength is obtained based on a weighted combination of direct connection strength, indirect connection strength and task association strength, wherein the direct connection strength is calculated based on the similarity of node features, the indirect connection strength is calculated based on the importance of the transmission path between nodes, and the task association strength is calculated based on the dependency relationship of the tasks to which the nodes belong.
[0009] In an optional embodiment, The steps of monitoring parameter transfer in the software development process in real time and, when a parameter change is detected, analyzing the impact range of the parameter change based on the parameter dependency graph and obtaining the affected parameter node set include: Deploy a parameter change listener to capture parameter changes in real time through code submission hooks, configuration file monitoring, and runtime parameter tracking. When a parameter change is detected, the identifier, change type, and change value range of the changed parameter are recorded. The node corresponding to the changed parameter is located in the parameter dependency graph and marked as the change source node. Starting from the change source node, the parameter dependency graph is traversed, and the node influence coefficient is calculated based on the connection strength between nodes, where the node influence coefficient is the weighted product of all connection strengths on the path between the change source node and the node. For each traversed node, the sensitivity coefficient is calculated based on the parameter feature vector of the node, and the node influence coefficient is multiplied by the sensitivity coefficient to obtain the node influence value. When the influence value is greater than the preset influence threshold, the node is added to the affected node set.
[0010] In an optional embodiment, Constructing a parameter optimization decision model, wherein the parameter optimization decision model uses the affected parameter node set as state input, retrieves optimization solutions for similar scenarios from the optimization experience library as prior knowledge, and uses a hierarchical reinforcement learning strategy to generate parameter optimization solutions. The hierarchical reinforcement learning strategy includes a parameter selection layer and a parameter adjustment layer; the parameter selection layer determines the target parameters to be optimized, and the parameter adjustment layer generates specific parameter values, including the following steps: The parameter optimization decision model includes a hierarchical reinforcement learning architecture, which is composed of an upper parameter selection layer and a lower parameter adjustment layer in a shared state space and an independent action space, wherein the action output of the parameter selection layer serves as a constraint condition for the parameter adjustment layer; Converting the affected parameter node set into a state vector, using the state vector as input to the hierarchical reinforcement learning architecture, retrieving historical optimization solutions corresponding to similar states from the optimization experience library, and extracting decision results from the historical optimization solutions as prior knowledge for the current decision; The parameter selection layer evaluates the optimization importance of each affected parameter, calculates the optimization priority based on the parameter importance, change sensitivity and impact range, and selects the parameter subset with the highest priority as the target parameters to be optimized; Generate an adjustment value for each target parameter through the parameter adjustment layer, wherein the generation process of the adjustment value takes into account the dependency relationship between parameters, performance constraints and risk control factors; A hierarchical reward mechanism is used to update the parameter optimization decision model. The reward of the parameter selection layer is calculated based on the coverage and accuracy of the selected parameter set, and the reward of the parameter adjustment layer is calculated based on the performance improvement and stability after adjustment. The rewards of the parameter selection layer and the parameter adjustment layer are weightedly combined to form an overall optimization target.
[0011] In an optional embodiment, The reward of the parameter adjustment layer is calculated based on the performance improvement and stability after adjustment, including the following steps: Calculating dynamic influence coefficients between parameters, where the dynamic influence coefficients are calculated based on the product of the partial derivative of the parameter value with respect to the performance index and the ratio of the parameter value to the performance index, and forming a parameter influence matrix with the dynamic influence coefficients; calculating performance improvement rewards based on the parameter influence matrix, where the performance improvement rewards are weighted based on the dynamic influence coefficients and the performance change before and after the parameter adjustment; The timing impact characteristics of parameter adjustment are described by amplitude, attenuation coefficient, oscillation frequency, and phase offset. A timing contribution matrix is calculated based on the timing impact characteristics. The calculation process of the timing contribution matrix combines the parameter adjustment amount and the values of the timing impact characteristics at different time steps. The stability reward is calculated based on the timing contribution matrix. The stability reward is calculated based on the rate of change of parameter performance within the sliding time window. The time series contribution matrix is used to distribute the performance improvement reward and stability reward in time series, and the reward distribution results at different time steps are weighted and combined with historical optimization experience to generate the final parameter optimization reward; The parameter optimization strategy is updated based on the final parameter optimization reward. A parameter correlation constraint is introduced during the updating process of the parameter optimization strategy. The constraint is calculated based on the dynamic influence coefficient in the parameter influence matrix.
[0012] According to a second aspect of an embodiment of the present invention, an electronic device is provided, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0013] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0014] By constructing a parameter knowledge graph and using a graph neural network to process parameter transfer data, the present invention achieves accurate modeling of parameter dependencies during the software development process, can quickly identify the impact range of parameter changes, and reduces the manual analysis time and error rate in traditional methods.
[0015] The present invention adopts a hierarchical reinforcement learning strategy to construct a parameter optimization decision model, and hierarchically processes parameter selection and parameter adjustment. This not only improves the optimization efficiency, but also adaptively generates the optimal parameter solution based on historical experience and current status, significantly improving the quality and stability of software development.
[0016] The present invention establishes a complete closed-loop mechanism for parameter transfer and optimization. Through real-time monitoring, intelligent analysis and automatic optimization, it realizes the automation and intelligence of parameter management in the software development process, reduces the communication cost of the development team, speeds up software iteration and improves overall R&D efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of a method for transferring and optimizing parameters of upstream and downstream tasks in software development based on artificial intelligence according to an embodiment of the present invention; Figure 2 Flowchart of node feature update and connection strength calculation of the present invention; Figure 3 Performance comparison chart for different parameter optimization methods; Figure 4 Compare the performance improvements of different methods. DETAILED DESCRIPTION
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0019] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0020] Figure 1Schematic diagram of the process of transferring and optimizing parameters of upstream and downstream tasks in software development based on artificial intelligence according to an embodiment of the present invention. Figure 1 As shown, the method includes: Constructing a parameter knowledge graph for software development, which includes a parameter mapping knowledge base, a task dependency library, and an optimization experience library; Receive parameter transfer data during the software development process, process the parameter transfer data using a graph neural network, match and analyze the parameter transfer data with information in the parameter mapping knowledge base and the task dependency library, and generate a parameter dependency graph, wherein the parameter dependency graph is used to characterize the transfer path and influence intensity between parameters; Real-time monitoring of parameter transfer during software development. When a parameter change is detected, the impact range of the parameter change is analyzed based on the parameter dependency graph to obtain a set of affected parameter nodes. Constructing a parameter optimization decision model, wherein the parameter optimization decision model uses the affected parameter node set as state input, retrieves optimization solutions for similar scenarios from the optimization experience library as prior knowledge, and uses a hierarchical reinforcement learning strategy to generate parameter optimization solutions. The hierarchical reinforcement learning strategy includes a parameter selection layer and a parameter adjustment layer; the parameter selection layer determines the target parameters to be optimized, and the parameter adjustment layer generates specific parameter values; The parameter optimization scheme is executed, and the optimization effect is recorded and stored as new experience data in the optimization experience library.
[0021] In an optional embodiment, the steps of constructing a parameter knowledge graph for software development, wherein the parameter knowledge graph includes a parameter mapping knowledge base, a task dependency library, and an optimization experience library, include: Collect multi-source parameter data during the software development process, including parameter definition data in the code repository, parameter specification data in the development documents, and parameter transfer data in the operation log; construct the basic structure of the parameter knowledge graph based on the multi-source parameter data, taking parameters, tasks, and optimization solutions as graph entities, and taking the mapping relationship between parameters, the dependency relationship between tasks, the association relationship between parameters and tasks, and the interaction relationship between optimization solutions and parameters as edges in the graph, to form a multi-heterogeneous knowledge network structure; Standardize parameter names based on morphological restoration, calculate semantic similarity between parameters, determine parameter mapping relationships based on a preset similarity threshold, and generate a parameter mapping knowledge base; establish parameter format conversion rules and store them in the parameter mapping knowledge base; Extract the calling relationships and parameter flow paths between tasks to obtain static task dependencies, track the parameter transfer during runtime to obtain dynamic task association information, and use a weighted fusion method to calculate the coupling degree between tasks. The weighted fusion method comprehensively considers the parameter sharing degree and transfer frequency to generate a task dependency library. Formalize historical optimization plans, extract optimization rules, calculate the similarity between optimization plans, and generate an optimization experience database; The parameter knowledge graph is subjected to consistency check and integrity verification, and an incremental knowledge update mechanism is established.
[0022] For example, in the initial stages of building a parameter knowledge graph, source code files are retrieved through API calls or direct access to code repositories (such as Git repositories). Regular expression matching is used to extract parameter definition data, such as variable definitions and function parameter definitions. For example, for the Java code "public void processData(String inputPath, intmaxSize)", "inputPath" and "maxSize" are extracted as parameters. Simultaneously, text parsing techniques are used to extract parameter specification data from development documents (such as API documentation and design specifications), including parameter name, type, value range, and default value. Runtime logs are also parsed to capture the actual parameter passing during runtime, such as the parameter value and passing path in "2023-05-20 14:30:22 INFO: Function call: processData(filePath=' / data / input.txt', maxSize=1024)".
[0023] In the parameter knowledge graph, parameter entities contain attributes such as name, data type, default value, and value range; task entities contain task ID, name, and functional description; and optimization solution entities contain solution ID, target parameter set, and optimization rules. Edge relationships in the graph include: mappings between parameters (e.g., inputPath maps to filePath), dependencies between tasks (e.g., task A calls task B), associations between parameters and tasks (e.g., parameter maxSize is used by task processData), and interactions between optimization solutions and parameters (e.g., memory optimization solutions act on the heap size parameter).
[0024] To build a parameter mapping knowledge base, parameter names are standardized. Parameter names are converted to their basic form using lemmatization techniques, such as converting "files" to "file" and "processing" to "process." Parameters using camelCase are broken down into word sequences, such as "maxFileSize" into "max," "file," and "size." After processing, the semantic similarity between parameters is calculated using a combination of word embedding and edit distance. For example, the similarity between "inputPath" and "filePath" is 0.85, exceeding the preset threshold of 0.7, identifying them as a mapping relationship. Furthermore, format conversion rules are established based on parameter type and usage scenario, such as the conversion rule between string path formats between different operations: "C:\\data\\file.txt" ⟷ " / data / file.txt." These rules are stored in the parameter mapping knowledge base.
[0025] When building the task dependency library, static code analysis is used to extract the calling relationships between tasks. Function call statements in the code, such as "result = taskB(param1, param2)", indicate that the current task calls taskB. The parameter transfer paths between tasks are tracked to construct a parameter flow graph. During runtime, actual parameter transfers are captured through tracking or log analysis, recording the transfer frequency and timestamps. Based on static analysis and dynamic monitoring data, a weighted fusion method is used to calculate the coupling between tasks. This method comprehensively considers parameter sharing (the proportion of shared parameters between the two tasks to the total parameters) and transfer frequency (the number of parameter transfers per unit time). For example, if Task A and Task B share five parameters, accounting for 40% of the total parameters, and there are an average of three parameter transfers per minute, the calculated coupling is 0.65. These calculation results are stored in the task dependency library.
[0026] To build an optimization experience library, historical optimization solutions are formally represented. Each optimization solution is represented as a triple: <target parameter set, optimization operation, expected effect>. For example, a memory optimization solution can be represented as <{heapSize, cacheSize}, meaning "increase heap size and reduce cache size," which means "improve big data processing performance." Optimization rules are extracted from these representations, such as "increasing the heap size parameter value improves performance when processing large files." Similarity between optimization solutions is also calculated based on the overlap in target parameter sets and the similarity in optimization operations. Solutions with high similarity are grouped together to form optimization patterns. These optimization rules and patterns constitute the optimization experience library.
[0027] The constructed parameter knowledge graph is also subject to consistency and integrity verification. This consistency verification includes checking the transitivity of mapping relationships (if A maps to B, and B maps to C, then A should map to C) and symmetry. Integrity verification assesses the graph's coverage by checking for isolated nodes and dangling edges. An incremental knowledge update mechanism is also established. Whenever new code is submitted, documentation is updated, or runtime logs are generated, new information is automatically extracted and updated in the knowledge graph, ensuring its timeliness and accuracy.
[0028] The present invention realizes the centralized management of parameter mapping relationships, task dependencies and optimization experience through the collection of multi-source parameter data and the construction of knowledge graphs, establishes an incremental knowledge update mechanism, enables the continuous accumulation and optimization of parameter knowledge graphs, provides a comprehensive and reliable knowledge basis for subsequent parameter optimization, and improves the efficiency of knowledge utilization.
[0029] In an optional embodiment, receiving parameter transfer data during a software development process, processing the parameter transfer data using a graph neural network, matching and analyzing the parameter transfer data with information in the parameter mapping knowledge base and the task dependency library, and generating a parameter dependency graph, wherein the parameter dependency graph is used to characterize transfer paths and influence strengths between parameters, includes the following steps: Extracting parameter type codes, parameter name semantic codes, parameter value range codes, and parameter context feature codes from the parameter transfer data to generate a parameter feature vector; extracting transfer type, transfer frequency, and timing features from the parameter transfer data to generate a parameter transfer relationship feature; Matching the parameter feature vector with the information in the parameter mapping knowledge base, calculating the parameter semantic similarity, and determining the mapping relationship between the parameters based on the parameter semantic similarity; matching the parameter transfer relationship feature with the information in the task dependency relationship library, and calculating the task dependency strength; Constructing a graph structure, using the parameters with mapping relationships as nodes in the graph, using the parameter transfer relationship characteristics as attributes of the edges in the graph, and using the parameter feature vectors as initial features of the nodes; The constructed graph structure is processed using a graph neural network. Node messages are generated based on the parameter feature vectors of the nodes and the parameter transfer relationship features of the edges. The generated node messages are aggregated to obtain updated features of the nodes. The connection strength between nodes is calculated based on the updated features. A parameter dependency graph is generated based on the connection strength, where the parameter dependency graph represents the transfer path and influence strength between parameters, and the influence strength is determined by the parameter semantic similarity, the task dependency strength, and the connection strength.
[0030] For example, parameter passing data can be obtained by deploying a data collection module in the software development environment. This data includes parameter passing information during function calls, parameter interaction information between service interfaces, etc. For example, for an e-commerce company, data on parameters such as order ID, product ID, and quantity passed from the order service to the inventory service can be collected.
[0031] From the received parameter transfer data, we extract the parameter type encoding, such as encoding "int" as "001" and "string" as "010." We also extract the semantic encoding of the parameter name, such as mapping "productId" to a 128-dimensional vector using a word embedding model. We also extract the parameter value range encoding, such as encoding "positive integer" as "101." We also extract the parameter context feature encoding, including information such as the module to which the parameter belongs and the function location. For example, the feature vector of the product ID parameter can be represented as a 256-dimensional vector containing the above information. We also extract parameter transfer relationship features. Transfer types include value transfer and reference transfer, each encoded as a different identifier. Transfer frequency records the number of times parameter transfer occurs, such as "5 calls per hour." Time series features record the temporal pattern of parameter transfer, such as "scheduled trigger" or "event-driven." For example, the transfer relationship features of an order ID from the order service to the inventory service can be represented as: value transfer, an average of 3 times per minute, and event-driven.
[0032] The parameter semantic similarity is calculated by comparing the parameter feature vector with the information in the parameter mapping knowledge base. During the calculation, the similarity between the parameter feature vector and the records in the knowledge base is compared using methods such as vector cosine similarity. When the similarity exceeds a preset threshold (such as 0.85), the two parameters are confirmed to have a mapping relationship. For example, although "productId" and "goodsId" have different names, the semantic similarity calculation (score 0.92) confirms that they refer to the same parameter. The task dependency library records the dependencies and importance between various functional modules. The task dependency strength is calculated by comparing the module path of parameter transmission with the records in the task dependency library.
[0033] When constructing a parameter dependency graph, a set of graph nodes is created, with each node representing a parameter, such as "orderId" or "productId." Each node is assigned a globally unique identifier. The parameter feature vector generated in the previous step (including parameter type, name semantics, value range, and contextual feature encoding) is assigned to the corresponding node as the initial feature. After node initialization, graph edges are established based on the mapping relationship and transfer behavior between parameters. Edge attributes contain the parameter transfer relationship features extracted previously, specifically: transfer type (value transfer = 1, reference transfer = 2, etc.), transfer frequency (number of times / time unit), and timing characteristics (synchronous = 10, asynchronous = 20, etc.). For example, in the order processing process, an edge is established between the "orderId" parameter node from the order service to the payment service with the attributes {Transfer type: 1, Frequency: 10 times / hour, Timing characteristics: 10}, indicating a high-frequency synchronous value transfer relationship.
[0034] Using a graph convolutional network (GCN) or graph attention network (GAT), for each node, a node message is generated based on its feature vector and the features of neighboring nodes (nodes connected by edges). For example, for the "productId" node, a new node message is generated by combining its own features with the message from the "orderId" node. After the node message is generated, it is aggregated through methods such as weighted summation to obtain the node's updated features. The updated features reflect the importance and influence of the parameter in the entire transmission network. The connection strength between nodes is calculated based on the updated features.
[0035] Based on the calculated connection strengths, a parameter dependency graph is constructed, creating a directed graph structure and adding all parameter nodes to the graph. Edge weights are set based on the connection strengths, and edges with connection strengths above a threshold (e.g., 0.5) are retained in the graph. Influence strength is calculated using a weighted fusion approach: influence strength = α × parameter semantic similarity + β × task dependency strength + γ × connection strength, where α, β, and γ are weight coefficients, satisfying α + β + γ = 1. The weight coefficients can be dynamically adjusted based on different characteristics. For example, for data-intensive applications, the weight α for parameter semantic similarity can be increased.
[0036] In an e-commerce example, the impact strength of the product ID parameter (productId) on the inventory service (inventory) is calculated as: 0.76 = 0.3 × 0.92 (parameter semantic similarity) + 0.4 × 0.65 (task dependency strength) + 0.3 × 0.75 (connection strength), indicating that changes to the product ID parameter will have a significant impact on the inventory service. The dependency graph can be displayed using a graphical interface, with node size indicating parameter importance, edge thickness indicating impact strength, and color depth indicating change sensitivity. This graph allows developers to identify core parameters (such as order IDs with multiple high-strength outgoing edges) and critical transfer paths (such as the parameter transfer chain from order processing to payment), providing a basis for parameter optimization and refactoring.
[0037] The present invention adopts graph neural network to process parameter transfer data. Through feature encoding and multi-dimensional matching analysis, it accurately identifies the mapping relationship and transfer characteristics between parameters. The generated parameter dependency graph comprehensively reflects the transfer path and influence intensity between parameters, providing a reliable basis for subsequent impact analysis and optimization decision-making.
[0038] In an optional embodiment, generating node messages based on the parameter feature vectors of the nodes and the parameter transfer relationship features of the edges, aggregating the generated node messages to obtain updated features of the nodes; and calculating the connection strength between the nodes based on the updated features includes: Processing the constructed graph structure using a graph neural network, generating node messages based on the parameter feature vector and the parameter transfer relationship characteristics of the edge, calculating the attention weights of features of different dimensions, and multiplying the attention weights with the feature transformation matrix to enhance the node messages; The enhanced node messages are hierarchically aggregated. Local message aggregation is performed within the local neighborhood range. The node messages of local neighbor nodes are weightedly combined based on the local aggregation weight to obtain local aggregate features. Global message aggregation is performed globally. The local aggregate features of global neighbor nodes are weightedly combined based on the global aggregation weight. The local aggregate features and global aggregate features are balanced through the gating parameters to obtain the updated features of the node. The connection strength between nodes is calculated based on the updated features, and the connection strength is obtained based on a weighted combination of direct connection strength, indirect connection strength and task association strength, wherein the direct connection strength is calculated based on the similarity of node features, the indirect connection strength is calculated based on the importance of the transmission path between nodes, and the task association strength is calculated based on the dependency relationship of the tasks to which the nodes belong.
[0039] For example, combined Figure 2The present invention illustrates the node feature update and connection strength calculation flow chart. During the node message generation phase, the node message is generated by combining the node's parameter feature vector and the edge transfer relationship feature. For node i, its initial feature is hi, and its edge feature with neighbor node j is eij. The message for node i can be generated using a feature combination function. A feature concatenation method can be used to concatenate hi and eij, then transform them through a transformation matrix W to obtain the message mij. For example, if the initial feature of the parameter node "temperature threshold" is [0.8, 0.5, 0.3, 0.9], and its edge feature with the parameter "alarm" is [1.0, 0.75, 0.5], the concatenated features are [0.8, 0.5, 0.3, 0.9, 1.0, 0.75, 0.5]. After processing through the transformation matrix, the node message [0.65, 0.78, 0.42] can be obtained.
[0040] The feature enhancement stage introduces an attention mechanism to calculate the importance weights of features across different dimensions. The node message is decomposed into multiple dimensional features. For example, [0.65, 0.78, 0.42] is divided into three dimensions, and the attention score for each dimension is calculated. Normalization is performed to obtain the attention weights for each dimension, such as [0.35, 0.42, 0.23]. These attention weights are multiplied by a predefined feature transformation matrix to enhance the node message and increase the influence of important dimensions. In practice, the enhanced node message becomes [0.72, 0.82, 0.38].
[0041] The hierarchical aggregation process consists of two stages: local aggregation and global aggregation. Local aggregation is performed within the immediate neighborhood of a node. For each local neighbor node j, its influence weight αij on the current node i is calculated. This weight is based on the node feature similarity and the transitive strength of the edge. For example, for a node with three immediate neighbors, the local aggregation weights [0.5, 0.3, 0.2] are obtained. These weights are then weighted and combined with the messages from the corresponding neighbor nodes to produce the local aggregated features. Assuming that the messages of the three neighboring nodes are [0.7, 0.8, 0.4], [0.6, 0.7, 0.5] and [0.5, 0.6, 0.7] respectively, the local aggregated feature is [0.5×0.7+0.3×0.6+0.2×0.5, 0.5×0.8+0.3×0.7+0.2×0.6, 0.5×0.4+0.3×0.5+0.2×0.7], that is, [0.64, 0.74, 0.47].
[0042] Global aggregation is performed over a wider range, taking into account the influence of indirectly connected nodes. A global aggregation weight βik is calculated based on path importance and global structural information and is used to weightedly combine the local aggregate features of indirect nodes. For example, for three globally influential nodes, the global aggregation weights [0.4, 0.35, 0.25] are obtained. Assuming that the local aggregate features of these nodes are [0.65, 0.75, 0.45], [0.62, 0.72, 0.48], and [0.60, 0.70, 0.50], respectively, the global aggregate feature is [0.4×0.65+0.35×0.62+0.25×0.60, 0.4×0.75+0.35×0.72+0.25×0.70, 0.4×0.45+0.35×0.48+0.25×0.50], or [0.628, 0.728, 0.471].
[0043] To balance the influence of local and global information, a gating parameter γ is introduced, which is dynamically adjusted based on the node's position and importance in the graph. For example, for an important node at the center of the graph, setting γ = 0.6 means that local information accounts for 60% and global information accounts for 40%. The final updated features of node i are γ multiplied by the local aggregated features plus (1-γ) multiplied by the global aggregated features, that is, [0.6×0.64+0.4×0.628, 0.6×0.74+0.4×0.728, 0.6×0.47+0.4×0.471], resulting in [0.6352, 0.7352, 0.4704].
[0044] During the connection strength calculation phase, direct connection strength, indirect connection strength, and task association strength are comprehensively considered. Direct connection strength is calculated based on node feature similarity, such as the inner product of the feature vectors of nodes i and j divided by the product of the vector modulus, and the result ranges from 0 to 1. Indirect connection strength is based on the importance score of all paths between nodes. The shorter the path and the higher the importance of the intermediate node, the greater the indirect connection strength. Task association strength takes into account the dependencies between the tasks to which the nodes belong. Nodes with the same tasks or tasks with strong dependencies have higher task association strength. The final connection strength is calculated by weighted combination of the three strengths using coefficients w1, w2, and w3. Different weights can be set according to specific scenarios, such as w1=0.5, w2=0.3, and w3=0.2.
[0045] The present invention enhances node messages through the attention mechanism and adopts a hierarchical message aggregation strategy to effectively capture the complex dependencies between parameters locally and globally. The calculated connection strength comprehensively considers multiple dimensions such as direct connection, indirect transmission and task association, thereby improving the accuracy of dependency analysis.
[0046] In an optional embodiment, the parameter transfer during the software development process is monitored in real time. When a parameter change is detected, the impact range of the parameter change is analyzed based on the parameter dependency graph, and the step of obtaining the affected parameter node set includes: Deploy a parameter change listener to capture parameter changes in real time through code submission hooks, configuration file monitoring, and runtime parameter tracking. When a parameter change is detected, the identifier, change type, and change value range of the changed parameter are recorded. The node corresponding to the changed parameter is located in the parameter dependency graph and marked as the change source node. Starting from the change source node, the parameter dependency graph is traversed, and the node influence coefficient is calculated based on the connection strength between nodes, where the node influence coefficient is the weighted product of all connection strengths on the path between the change source node and the node. For each traversed node, the sensitivity coefficient is calculated based on the parameter feature vector of the node, and the node influence coefficient is multiplied by the sensitivity coefficient to obtain the node influence value. When the influence value is greater than the preset influence threshold, the node is added to the affected node set.
[0047] For example, to achieve real-time monitoring of parameter changes, a parameter change listener is deployed. The listener captures parameter changes through three channels: code submission hook, configuration file monitoring, and runtime parameter tracking. The code submission hook is triggered when the developer submits the code, automatically scanning the parameter definition and usage in the code to identify parameter changes. For example, when the developer changes the configuration parameter "CONNECTION_TIMEOUT" from 30 seconds to 60 seconds and submits the code, the code submission hook will capture this change. Configuration file monitoring continuously observes changes in the configuration file through the file monitoring mechanism, and immediately triggers a notification when the configuration file is modified. Runtime parameter tracking monitors the actual usage of parameters during operation through embedded points or agents, and records changes in parameter values.
[0048] When the listener detects a parameter change, it records the parameter's identifier, change type, and change range. Change types include adding a new parameter, deleting a parameter, modifying a parameter's default value, and modifying a parameter's value range. For example, if the performance tuning parameter "MAX_THREAD_POOL_SIZE" changes from "50" to "100," the identifier is recorded as "MAX_THREAD_POOL_SIZE," the change type is "modify parameter default value," and the change range is "from 50 to 100."
[0049] Locate the node corresponding to the changed parameter in the parameter dependency graph and mark it as the change source node. For example, for "MAX_THREAD_POOL_SIZE," find the node corresponding to this parameter in the parameter dependency graph and mark it as the change source node for this analysis.
[0050] Starting from the change source node, the parameter dependency graph is traversed using a breadth-first or depth-first algorithm. For each traversal path, the node influence coefficient is calculated based on the connection strengths between nodes. The node influence coefficient is the weighted product of all connection strengths along the path from the change source node. For example, if there are two edges on the path from the change source node "MAX_THREAD_POOL_SIZE" to the node "REQUEST_PROCESSING_TIME" with connection strengths of 0.8 and 0.7, respectively, the influence coefficient of the node "REQUEST_PROCESSING_TIME" is 0.8 multiplied by 0.7, which equals 0.56.
[0051] For each traversed node, the sensitivity coefficient is calculated based on the node's parameter feature vector. The parameter feature vector contains multi-dimensional features, and the sensitivity coefficient is calculated by the weighted sum of these feature values.
[0052] Multiply the node's influence coefficient by its sensitivity coefficient to obtain its impact value. When the impact value exceeds the preset impact threshold, the node is added to the affected node set. For example, if the node "REQUEST_PROCESSING_TIME" has an impact coefficient of 0.56 and a sensitivity coefficient of 0.67, its impact value is 0.56 multiplied by 0.67, which equals 0.3752. If the preset impact threshold is 0.3, the node is added to the affected node set.
[0053] In practice, different impact thresholds are set for different types of software projects. For example, for critical business, a lower impact threshold, such as 0.2, is set to ensure that more potential impacts are captured; for non-critical business, a higher impact threshold, such as 0.4, is set to reduce the analysis workload.
[0054] The present invention realizes real-time monitoring of parameter changes and precise analysis of the impact range. By calculating the node influence coefficient and sensitivity coefficient, the affected parameter nodes are accurately identified, thus avoiding omissions and redundancies in the impact analysis and improving the pertinence and efficiency of parameter optimization.
[0055] This invention enables real-time monitoring of parameter changes and precise analysis of their impact range. By calculating node influence coefficients and sensitivity coefficients, it accurately identifies affected parameter nodes, avoiding omissions and redundancies in impact analysis and improving the pertinence and efficiency of parameter optimization. This helps developers understand the impact range in advance when making parameter adjustments, reducing anomalies caused by parameter changes.
[0056] In an optional embodiment, a parameter optimization decision model is constructed. The parameter optimization decision model uses the affected parameter node set as state input, retrieves optimization solutions for similar scenarios from the optimization experience library as prior knowledge, and uses a hierarchical reinforcement learning strategy to generate parameter optimization solutions. The hierarchical reinforcement learning strategy includes a parameter selection layer and a parameter adjustment layer. The parameter selection layer determines the target parameters to be optimized, and the parameter adjustment layer generates specific parameter values. The steps include: The parameter optimization decision model includes a hierarchical reinforcement learning architecture, which is composed of an upper parameter selection layer and a lower parameter adjustment layer in a shared state space and an independent action space, wherein the action output of the parameter selection layer serves as a constraint condition for the parameter adjustment layer; Converting the affected parameter node set into a state vector, using the state vector as input to the hierarchical reinforcement learning architecture, retrieving historical optimization solutions corresponding to similar states from the optimization experience library, and extracting decision results from the historical optimization solutions as prior knowledge for the current decision; The parameter selection layer evaluates the optimization importance of each affected parameter, calculates the optimization priority based on the parameter importance, change sensitivity and impact range, and selects the parameter subset with the highest priority as the target parameters to be optimized; Generate an adjustment value for each target parameter through the parameter adjustment layer, wherein the generation process of the adjustment value takes into account the dependency relationship between parameters, performance constraints and risk control factors; A hierarchical reward mechanism is used to update the parameter optimization decision model. The reward of the parameter selection layer is calculated based on the coverage and accuracy of the selected parameter set, and the reward of the parameter adjustment layer is calculated based on the performance improvement and stability after adjustment. The rewards of the parameter selection layer and the parameter adjustment layer are weightedly combined to form an overall optimization target.
[0057] For example, the parameter optimization decision model can be implemented using a deep neural network. The parameter selection layer uses a Transformer network with a multi-head attention mechanism, which can capture long-range dependencies between parameters. The network input is the parameter state vector, and the output is the selection probability of each parameter. The parameter adjustment layer adopts an actor-critic architecture, with the actor network generating parameter adjustment actions and the critic network evaluating the value of these actions. The two layers share an encoder to extract state representations, but have independent policy and value heads. Model training is performed in stages, starting with supervised pre-training using historical optimization experience to establish a baseline policy, followed by reinforcement learning updates using new data collected through online interactions. The parameter selection layer is responsible for determining the target parameter to be optimized. Its action space is a binary choice space of all affected parameters: either selecting or not selecting each parameter. The parameter adjustment layer is responsible for generating specific adjustment values for the selected target parameter. Its action space is a continuous or discrete space of parameter values.
[0058] When converting the set of affected parameter nodes into a state vector, the features of each parameter node are extracted, including the parameter type, name semantics, current value, value range, influence coefficient, and sensitivity coefficient. For categorical parameters, one-hot encoding is used; for numeric parameters, normalization is performed; and for text parameters, word embedding technology is used to convert them into vectors. All parameter features are concatenated into a high-dimensional vector and input into the reinforcement learning model as the state vector. For example, a state vector containing five affected parameters is a 256-dimensional vector, with the first 50 dimensions representing the features of the first parameter, the next 50 dimensions representing the features of the second parameter, and so on.
[0059] When retrieving historical optimization solutions corresponding to similar states from the optimization experience library, a vector similarity calculation method is used. The cosine similarity between the current state vector and all historical state vectors in the experience library is calculated, and the top K historical states with the highest similarity and their corresponding optimization solutions are selected. For example, if there is a memory overflow scenario, the similarity between the state vector and a historical state in the experience library is 0.92, which exceeds the preset threshold of 0.85. The optimization solution corresponding to this historical state is extracted as prior knowledge. This prior knowledge includes the parameter subset selected by the parameter selection layer in the historical scenario and the parameter values generated by the parameter adjustment layer. Prior knowledge is integrated into the current decision-making process by adjusting the model's initial policy network parameters or adding bias terms.
[0060] The parameter selection layer evaluates the optimization importance of each affected parameter by comprehensively considering three factors: parameter importance, change sensitivity, and impact scope. Parameter importance is assessed based on the parameter's centrality to the system. For example, the database connection pool size parameter has an importance of 0.9, and the log level parameter has an importance of 0.6. Change sensitivity reflects the impact of a parameter change on behavior. For example, the thread timeout parameter has a sensitivity of 0.8, and the retry count parameter has a sensitivity of 0.5. Impact scope considers the number of components a parameter affects. For example, a parameter affecting five components has an impact score of 0.85, while a parameter affecting two components has a score of 0.4. These three factors are weighted to determine the final optimization priority. For example, if the weights are 0.4, 0.3, and 0.3, respectively, the optimization priority of a parameter is 0.4 × 0.9 + 0.3 × 0.8 + 0.3 × 0.85 = 0.865. Based on the optimization priority, the parameter selection layer selects the highest-priority parameter subset as the target parameters for optimization. This can be achieved using a greedy algorithm or by selecting the top N parameters after sorting.
[0061] The parameter adjustment layer generates specific adjustment values for each target parameter. The adjustment process is differentiated by parameter type: For discrete parameters, such as log levels (DEBUG / INFO / WARN / ERROR), a table lookup is used to select the optimal value from a pre-set set of available options. For continuous parameters, such as buffer size, new values are generated by incrementally increasing or decreasing them, for example, increasing the original value from 8MB to 10MB by 25%. The adjustment value generation considers three factors: First, dependencies between parameters are considered and predefined rules are applied to related parameters. For example, when increasing the thread pool size, the queue capacity is increased accordingly. Second, performance constraints are applied to ensure that parameters remain within a reasonable range, such as ensuring that the thread pool size does not exceed twice the number of cores. Finally, risk control checks are performed to limit adjustments that are too drastic, such as limiting memory parameter adjustments to 30% from the original value. The adjustment process adopts an incremental strategy, starting with small adjustments and observing the effects. For example, after a 10% improvement in response time, further adjustments are then decided.
[0062] The parameter selection layer's rewards are calculated based on the coverage and precision of the selected parameter set. Coverage measures whether the selected parameters cover the key influencing parameters, while precision measures the proportion of the selected parameters that actually require adjustment. For example, if there are 10 affected parameters and only 5 of them actually require adjustment, and the selection layer selects 4 parameters, 3 of which actually require adjustment, then the coverage is 3 / 5 = 0.6, and the precision is 3 / 4 = 0.75. The parameter selection layer's rewards can be expressed as the weighted sum of coverage and precision, for example, 0.5 × 0.6 + 0.5 × 0.75 = 0.675. The parameter adjustment layer's rewards are calculated based on the performance improvement and stability after the adjustment. Performance improvement is measured by comparing performance metrics before and after parameter adjustment. For example, a reduction in response time from 200 milliseconds to 150 milliseconds represents a 25% improvement. Stability is assessed using volatility metrics, for example, a reduction in standard deviation from 50 to 30 represents a 40% improvement. The reward for the parameter adjustment layer can be expressed as a weighted sum of performance improvement and stability improvement, for example, 0.7 × 25% + 0.3 × 40% = 29.5%. Ultimately, the rewards for the parameter selection layer and the parameter adjustment layer are weighted together to form the overall optimization target. For example, the total reward is 0.4 × 0.675 + 0.6 × 0.295 = 0.447. The model updates parameters by maximizing the total reward, achieving continuous optimization of the strategy.
[0063] Figure 3 The following figure compares the performance of different parameter optimization methods, comparing the optimization efficiency of traditional rule-based parameter tuning, single-layer reinforcement learning, and the proposed hierarchical reinforcement learning method in memory optimization, response time optimization, and throughput optimization scenarios. The data shows that the proposed hierarchical reinforcement learning method demonstrates significant advantages in all tested scenarios. In the memory optimization scenario, the optimization efficiencies of traditional rule-based parameter tuning, single-layer reinforcement learning, and hierarchical reinforcement learning were 36.0%, 48.0%, and 64.0%, respectively. In the response time optimization scenario, the optimization efficiencies of the three methods were 40.0%, 52.0%, and 68.0%, respectively. In the throughput optimization scenario, the optimization efficiencies of the three methods were 32.0%, 44.0%, and 60.0%, respectively. The hierarchical reinforcement learning method achieved an average improvement of approximately 28 percentage points over traditional rule-based parameter tuning and approximately 16 percentage points over single-layer reinforcement learning. These results demonstrate the effectiveness of the hierarchical reinforcement learning architecture for complex software parameter optimization problems. By separating the two decision-making tasks of parameter selection and parameter adjustment and incorporating historical optimization experience as prior knowledge, it can generate higher-quality parameter optimization solutions.
[0064] The hierarchical reinforcement learning architecture of this invention enables parameter optimization decision models to effectively address complex software parameter optimization problems. By separating the decision tasks of parameter selection and parameter adjustment, the problem complexity is reduced; by leveraging historical optimization experience as prior knowledge, the learning process is accelerated; and through a hierarchical reward mechanism, the comprehensiveness of parameter selection and the accuracy of parameter adjustment are balanced. This method can generate high-quality parameter optimization solutions for parameter transfer issues in software development, improving performance and ensuring stability, providing developers with intelligent parameter optimization support.
[0065] In an optional embodiment, the step of calculating the reward of the parameter adjustment layer based on the performance improvement and stability after adjustment includes: Calculating dynamic influence coefficients between parameters, where the dynamic influence coefficients are calculated based on the product of the partial derivative of the parameter value with respect to the performance index and the ratio of the parameter value to the performance index, and forming a parameter influence matrix with the dynamic influence coefficients; calculating performance improvement rewards based on the parameter influence matrix, where the performance improvement rewards are weighted based on the dynamic influence coefficients and the performance change before and after the parameter adjustment; The timing impact characteristics of parameter adjustment are described by amplitude, attenuation coefficient, oscillation frequency, and phase offset. A timing contribution matrix is calculated based on the timing impact characteristics. The calculation process of the timing contribution matrix combines the parameter adjustment amount and the values of the timing impact characteristics at different time steps. The stability reward is calculated based on the timing contribution matrix. The stability reward is calculated based on the rate of change of parameter performance within the sliding time window. The time series contribution matrix is used to distribute the performance improvement reward and stability reward in time series, and the reward distribution results at different time steps are weighted and combined with historical optimization experience to generate the final parameter optimization reward; The parameter optimization strategy is updated based on the final parameter optimization reward. A parameter correlation constraint is introduced during the updating process of the parameter optimization strategy. The constraint is calculated based on the dynamic influence coefficient in the parameter influence matrix.
[0066] For example, the dynamic influence coefficient between parameters reflects the sensitivity of parameter value changes to the performance indicator. It is calculated by multiplying the partial derivative of the parameter value with respect to the performance indicator by the ratio of the parameter value to the performance indicator. In actual implementation, the partial derivative can be calculated using the differential approximation method. That is, given a small change in the parameter, the change in the performance indicator is measured, and the ratio of the two is approximately the partial derivative. For example, increasing the thread pool size from 50 to 55 reduces the response time from 200 milliseconds to 190 milliseconds, and the partial derivative is approximately -2 milliseconds per thread. For a parameter value of 50 and a performance indicator of 200 milliseconds, the ratio is 0.25. The dynamic influence coefficient is calculated as the product of the partial derivative and the ratio, that is, -2 × 0.25 = -0.5, indicating that the thread pool size has a moderate negative correlation with the response time. The dynamic influence coefficient is calculated for all parameter pairs to form a parameter influence matrix. In the e-commerce system example, the parameter impact matrix shows that the thread pool size has a coefficient of -0.5 on response time and a coefficient of 0.65 on throughput; the connection timeout threshold has a coefficient of 0.3 on response time and a coefficient of -0.2 on throughput. This matrix comprehensively describes the interplay between parameters and provides a basis for calculating performance improvement rewards.
[0067] Performance improvement rewards are calculated based on a weighted dynamic impact coefficient, weighting the performance change before and after parameter adjustments. First, the performance metric change before and after the parameter adjustment is measured. For example, a decrease in response time from 200 milliseconds to 160 milliseconds represents a 20% improvement, while a 20% increase in throughput from 1000 TPS represents a 20% improvement. Weights are then assigned based on the importance of each performance metric, such as a weight of 0.6 for response time and 0.4 for throughput. The contribution of each parameter to the performance improvement is calculated using the impact coefficients in the parameter impact matrix. For example, the contribution of the thread pool size parameter is 0.6 × 20% × 0.5 + 0.4 × 20% × 0.65 = 13.2%, indicating that adjusting this parameter contributes 13.2% to the overall performance improvement. The contribution rates of all parameters are summed to determine the final performance improvement reward.
[0068] The temporal impact of parameter adjustments is characterized by four key metrics: amplitude, attenuation coefficient, oscillation frequency, and phase offset. Amplitude indicates the strength of the parameter adjustment's impact. For example, an amplitude of 0.8 for the thread pool size parameter indicates a significant impact. The attenuation coefficient indicates the rate at which the impact diminishes over time. For example, a attenuation coefficient of 0.3 for the connection pool parameter indicates a rapid decrease in impact. The oscillation frequency describes the periodicity of the impact's fluctuations. For example, an oscillation frequency of 0.05 for the cache size parameter indicates a complete fluctuation cycle every 20 time units. The phase offset indicates the delay in the impact's onset. For example, a phase offset of 5 for the log level parameter indicates that the impact of the adjustment takes five time units to manifest. Each element in the temporal contribution matrix represents the contribution of a specific parameter at a specific time step. For example, the contribution of the thread pool size parameter is 0.2 at the first time step, 0.8 at the fifth time step, 0.4 at the tenth time step, and 0.1 at the 20th time step. When calculating the timing contribution, the parameter adjustment amount is combined with the values of the timing impact characteristics at different time steps. For example, if the thread pool size increases from 50 to 80, an increase of 60%, and the impact is 0.8, the actual contribution at the peak impact period (the fifth time step) is 60% × 0.8 = 48%.
[0069] Stability rewards are calculated based on the rate of change of parameter performance within a sliding time window. An appropriate time window size is selected, such as 10 time units, and performance metrics such as the standard deviation and range are calculated within the window. For example, the response time values at 10 consecutive time points are [190, 185, 195, 180, 200, 190, 185, 190, 195, 185] milliseconds, with a standard deviation of approximately 5.8 milliseconds. Comparing the standard deviations before and after parameter adjustment reveals a 42% improvement, e.g., a 10 millisecond standard deviation before adjustment and a 5.8 millisecond standard deviation after adjustment. The stability reward is calculated based on the improvement rate, e.g., 42% × 0.5 = 21%, where 0.5 is the weighting factor for the stability reward.
[0070] Performance improvement rewards are concentrated in the early stages of tuning, while stability rewards are only reflected after the system stabilizes. Using the time series contribution matrix, different types of rewards are allocated to different time steps. For example, if the performance improvement reward is 25%, and the time series contribution at the fifth time step is 0.8, the performance reward allocated for that time step is 25% × 0.8 = 20%. If the stability reward is 21%, and the time series contribution at the 15th time step is 0.6, the stability reward allocated for that time step is 21% × 0.6 = 12.6%.
[0071] Retrieve the historical reward distribution for similar scenarios from the optimization experience database. For example, if the reward for the fifth time step in a historical scenario was 15% and the current calculated reward is 20%, a weighted average (e.g., 0.7 × 20% + 0.3 × 15% = 18.5%) can be used as the final reward for that time step. Perform a similar operation for all time steps and take the discounted sum of the rewards for each time step to obtain the final total reward for parameter optimization.
[0072] The parameter optimization strategy is updated based on the final parameter optimization reward. The policy gradient method is used to adjust the policy network parameters according to the reward signal. During the update process, a parameter correlation constraint is introduced. The constraint is calculated based on the dynamic influence coefficient in the parameter influence matrix. For highly correlated parameter pairs, such as thread pool size and queue capacity (correlation is 0.85), the constraint encourages these parameters to be adjusted in a coordinated manner to avoid performance fluctuations caused by individual adjustments. For example, while increasing the thread pool size, the queue capacity can be appropriately increased, rather than just increasing one of the parameters. The strength of the constraint can be dynamically adjusted according to the parameter correlation. The higher the correlation, the stronger the constraint. By introducing the constraint, the parameter optimization strategy can learn the interdependence between parameters and generate a more coordinated parameter adjustment plan.
[0073] Figure 4 A comparison chart of performance improvements calculated using different methods. The horizontal axis represents the time step (in minutes) after parameter adjustment, and the vertical axis represents the percentage of performance improvement. The proposed method (dynamic influence coefficient + time series contribution matrix) demonstrates significant advantages at all time steps, particularly in terms of rapid improvement in initial optimization results and stable high performance over the long term. This advantage is primarily attributed to the dynamic influence coefficient's ability to accurately quantify the mutual influence between parameters and the time series contribution matrix's ability to effectively capture the long-term effects of parameter adjustments.
[0074] The parameter adjustment layer reward calculation method proposed in this paper accurately quantifies the impact of parameters on performance through dynamic impact coefficients. It comprehensively captures the temporal effects of parameter adjustments through a temporal contribution matrix, incorporating performance improvement and system stability into a unified reward framework. It considers not only the immediate effects of parameter adjustments but also their long-term impacts, and improves the accuracy of reward estimates by integrating historical experience. The introduction of parameter correlation constraints enables optimization strategies to generate consistent parameter adjustment solutions, significantly improving the performance optimization and operational stability of software systems, and providing efficient and reliable technical support for automatic parameter tuning of complex software systems.
[0075] According to a second aspect of an embodiment of the present invention, an electronic device is provided, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0076] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0077] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An artificial intelligence-based software development upstream and downstream task parameter transfer and optimization method, characterized in that: include: Constructing a parameter knowledge graph for software development, which includes a parameter mapping knowledge base, a task dependency library, and an optimization experience library; Receive parameter transfer data during the software development process, process the parameter transfer data using a graph neural network, match and analyze the parameter transfer data with information in the parameter mapping knowledge base and the task dependency library, and generate a parameter dependency graph, wherein the parameter dependency graph is used to characterize the transfer path and influence intensity between parameters; Real-time monitoring of parameter transfer during software development. When a parameter change is detected, the impact range of the parameter change is analyzed based on the parameter dependency graph to obtain a set of affected parameter nodes. Constructing a parameter optimization decision model, wherein the parameter optimization decision model uses the affected parameter node set as state input, retrieves optimization solutions for similar scenarios from the optimization experience library as prior knowledge, and uses a hierarchical reinforcement learning strategy to generate parameter optimization solutions. The hierarchical reinforcement learning strategy includes a parameter selection layer and a parameter adjustment layer; the parameter selection layer determines the target parameters to be optimized, and the parameter adjustment layer generates specific parameter values; The parameter optimization scheme is executed, and the optimization effect is recorded and stored as new experience data in the optimization experience library.
2. The method according to claim 1, characterized in that The steps of constructing a parameter knowledge graph for software development, wherein the parameter knowledge graph includes a parameter mapping knowledge base, a task dependency library, and an optimization experience library, include: Collect multi-source parameter data during the software development process, including parameter definition data in the code repository, parameter specification data in the development documents, and parameter transfer data in the operation log; construct the basic structure of the parameter knowledge graph based on the multi-source parameter data, taking parameters, tasks, and optimization solutions as graph entities, and taking the mapping relationship between parameters, the dependency relationship between tasks, the association relationship between parameters and tasks, and the interaction relationship between optimization solutions and parameters as edges in the graph, to form a multi-heterogeneous knowledge network structure; Standardize parameter names based on morphological restoration, calculate semantic similarity between parameters, determine parameter mapping relationships based on a preset similarity threshold, and generate a parameter mapping knowledge base; establish parameter format conversion rules and store them in the parameter mapping knowledge base; Extract the calling relationships and parameter flow paths between tasks to obtain static task dependencies, track the parameter transfer during runtime to obtain dynamic task association information, and use a weighted fusion method to calculate the coupling degree between tasks. The weighted fusion method comprehensively considers the parameter sharing degree and transfer frequency to generate a task dependency library. Formalize historical optimization plans, extract optimization rules, calculate the similarity between optimization plans, and generate an optimization experience database; The parameter knowledge graph is subjected to consistency check and integrity verification, and an incremental knowledge update mechanism is established.
3. The method according to claim 1, characterized in that The steps of receiving parameter transfer data in the software development process, processing the parameter transfer data using a graph neural network, matching and analyzing the parameter transfer data with information in the parameter mapping knowledge base and the task dependency library, and generating a parameter dependency graph, wherein the parameter dependency graph is used to characterize the transfer path and influence intensity between parameters, include: Extracting parameter type codes, parameter name semantic codes, parameter value range codes, and parameter context feature codes from the parameter transfer data to generate a parameter feature vector; extracting transfer type, transfer frequency, and timing features from the parameter transfer data to generate a parameter transfer relationship feature; Matching the parameter feature vector with the information in the parameter mapping knowledge base, calculating the parameter semantic similarity, and determining the mapping relationship between the parameters based on the parameter semantic similarity; matching the parameter transfer relationship feature with the information in the task dependency relationship library, and calculating the task dependency strength; Constructing a graph structure, using the parameters with mapping relationships as nodes in the graph, using the parameter transfer relationship characteristics as attributes of the edges in the graph, and using the parameter feature vectors as initial features of the nodes; The constructed graph structure is processed using a graph neural network. Node messages are generated based on the parameter feature vectors of the nodes and the parameter transfer relationship features of the edges. The generated node messages are aggregated to obtain updated features of the nodes. The connection strength between nodes is calculated based on the updated features. A parameter dependency graph is generated based on the connection strength, where the parameter dependency graph represents the transfer path and influence strength between parameters, and the influence strength is determined by the parameter semantic similarity, the task dependency strength, and the connection strength.
4. The method according to claim 3, characterized in that Generating node messages based on the parameter feature vectors of the nodes and the parameter transfer relationship features of the edges, aggregating the generated node messages to obtain updated features of the nodes; and calculating the connection strength between the nodes based on the updated features includes: Generate a node message based on the parameter feature vector and the parameter transfer relationship feature of the edge, calculate the attention weights of features of different dimensions, and multiply the attention weights by the feature conversion matrix to enhance the node message; The enhanced node messages are hierarchically aggregated. Local message aggregation is performed within the local neighborhood range. The node messages of local neighbor nodes are weightedly combined based on the local aggregation weight to obtain local aggregate features. Global message aggregation is performed globally. The local aggregate features of global neighbor nodes are weightedly combined based on the global aggregation weight. The local aggregate features and global aggregate features are balanced through the gating parameters to obtain the updated features of the node. The connection strength between nodes is calculated based on the updated features, and the connection strength is obtained based on a weighted combination of direct connection strength, indirect connection strength and task association strength, wherein the direct connection strength is calculated based on the similarity of node features, the indirect connection strength is calculated based on the importance of the transmission path between nodes, and the task association strength is calculated based on the dependency relationship of the tasks to which the nodes belong.
5. The method according to claim 1, wherein The steps of monitoring parameter transfer in the software development process in real time and, when a parameter change is detected, analyzing the impact range of the parameter change based on the parameter dependency graph and obtaining the affected parameter node set include: Deploy a parameter change listener to capture parameter changes in real time through code submission hooks, configuration file monitoring, and runtime parameter tracking. When a parameter change is detected, the identifier, change type, and change value range of the changed parameter are recorded. The node corresponding to the changed parameter is located in the parameter dependency graph and marked as the change source node. Starting from the change source node, the parameter dependency graph is traversed, and the node influence coefficient is calculated based on the connection strength between nodes, where the node influence coefficient is the weighted product of all connection strengths on the path between the change source node and the node. For each traversed node, the sensitivity coefficient is calculated based on the parameter feature vector of the node, and the node influence coefficient is multiplied by the sensitivity coefficient to obtain the node influence value. When the influence value is greater than the preset influence threshold, the node is added to the affected node set.
6. The method according to claim 1, characterized in that Constructing a parameter optimization decision model, wherein the parameter optimization decision model takes the affected parameter node set as state input, retrieves optimization solutions for similar scenarios from the optimization experience library as prior knowledge, and uses a hierarchical reinforcement learning strategy to generate parameter optimization solutions, wherein the hierarchical reinforcement learning strategy includes a parameter selection layer and a parameter adjustment layer; The parameter selection layer determines the target parameters to be optimized, and the parameter adjustment layer generates specific parameter values, including: The parameter optimization decision model includes a hierarchical reinforcement learning architecture, which is composed of an upper parameter selection layer and a lower parameter adjustment layer in a shared state space and an independent action space, wherein the action output of the parameter selection layer serves as a constraint condition for the parameter adjustment layer; Converting the affected parameter node set into a state vector, using the state vector as input to the hierarchical reinforcement learning architecture, retrieving historical optimization solutions corresponding to similar states from the optimization experience library, and extracting decision results from the historical optimization solutions as prior knowledge for the current decision; The parameter selection layer evaluates the optimization importance of each affected parameter, calculates the optimization priority based on the parameter importance, change sensitivity and impact range, and selects the parameter subset with the highest priority as the target parameters to be optimized; Generate an adjustment value for each target parameter through the parameter adjustment layer, wherein the generation process of the adjustment value takes into account the dependency relationship between parameters, performance constraints and risk control factors; A hierarchical reward mechanism is used to update the parameter optimization decision model. The reward of the parameter selection layer is calculated based on the coverage and accuracy of the selected parameter set, and the reward of the parameter adjustment layer is calculated based on the performance improvement and stability after adjustment. The rewards of the parameter selection layer and the parameter adjustment layer are weightedly combined to form an overall optimization target.
7. The method according to claim 6, characterized in that The reward of the parameter adjustment layer is calculated based on the performance improvement and stability after adjustment, including the following steps: Calculating dynamic influence coefficients between parameters, where the dynamic influence coefficients are calculated based on the product of the partial derivative of the parameter value with respect to the performance index and the ratio of the parameter value to the performance index, and forming a parameter influence matrix with the dynamic influence coefficients; calculating performance improvement rewards based on the parameter influence matrix, where the performance improvement rewards are weighted based on the dynamic influence coefficients and the performance change before and after the parameter adjustment; The timing impact characteristics of parameter adjustment are described by amplitude, attenuation coefficient, oscillation frequency, and phase offset. A timing contribution matrix is calculated based on the timing impact characteristics. The calculation process of the timing contribution matrix combines the parameter adjustment amount and the values of the timing impact characteristics at different time steps. The stability reward is calculated based on the timing contribution matrix. The stability reward is calculated based on the rate of change of parameter performance within the sliding time window. The time series contribution matrix is used to distribute the performance improvement reward and stability reward in time series, and the reward distribution results at different time steps are weighted and combined with historical optimization experience to generate the final parameter optimization reward; The parameter optimization strategy is updated based on the final parameter optimization reward. A parameter correlation constraint is introduced during the updating process of the parameter optimization strategy. The constraint is calculated based on the dynamic influence coefficient in the parameter influence matrix.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
AI-based big data distributed computing task automatic optimization method and system
CN119576507A
Data stream-based runtime text downloading and downloading parameter transmission and task instance dynamic scheduling method
CN119578850A
Multi-mode-based software architecture intelligent design and optimization system
CN120104104A
Intelligent software development auxiliary system and use method
CN120179229A
Internet software development management system and method
CN120215889A
Cited By
Self-adaptive regulation generation method based on case reasoning and transfer learning
CN121212293A
A self-adaptive procedure generation method based on case-based reasoning and transfer learning
CN121212293B