Task and working hour estimation model training method, task and working hour estimation method and task and working hour estimation device
By constructing a directed weighted task dependency graph and a Stacked GAT model, the accuracy problem of task dependency relationships in time estimation is solved, the task dependency chain is effectively captured, and the accuracy and applicability of time estimation are improved.
Patent Information
- Application Number
- CN202610076570.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-21
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2046-01-21
AI Technical Summary
Existing time estimation methods cannot accurately handle task dependencies, resulting in significant discrepancies between time estimation results and actual project execution, especially in agile development and cross-team collaboration scenarios.
A task time estimation method based on the Stacked GAT model is adopted. By constructing a directed weighted task dependency graph, integrating task attributes and dependencies, and using a multi-head attention mechanism to capture the influence of dependency strength, the task time can be accurately estimated.
It improves the accuracy of time estimation in software development projects, adapts to different types of software project scenarios, supports agile development and large-scale project management, and reduces the estimation deviation rate.
Smart Images

Figure CN121543639A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the interdisciplinary field of software development project management and artificial intelligence, and specifically relates to a training method for task time estimation models, a task time estimation method and apparatus. Background Technology
[0002] In software development project management, accurate estimation of task duration is a core prerequisite for project schedule planning, human resource allocation, cost control, and risk warning. Current mainstream time estimation methods suffer from significant technical bottlenecks, as detailed below: Expert experience method: relies on the subjective judgment of project managers or senior developers, which is subject to individual cognitive biases, has poor stability of predicted results, cannot be adapted to the multi-task parallel scenarios of large-scale projects, and does not have the ability to be standardized and promoted.
[0003] Analogy estimation method: It uses historical similar tasks as a reference, but it lacks a quantitative "task similarity assessment model", cannot distinguish the differences in task attributes (such as technology stack, complexity) and dependencies, and has extremely poor adaptability to cross-domain projects.
[0004] Traditional modeling methods, such as the CCM II model, require manual configuration of 20+ cost driver factors, have long parameter calibration cycles, and are designed for macro-level project-level estimations, making them unsuitable for agile development scenarios with short cycles (1-14 days) and fine granularity (such as interface development and unit testing).
[0005] Existing time estimation methods generally treat each task to be estimated as an independent evaluation entity, failing to construct and introduce a quantifiable technical mechanism to characterize the core influencing factor of "task dependency network topology." Consequently, they cannot effectively characterize and incorporate the implicit time disturbances caused by this topology into the evaluation—for example, the additional rework time loss due to the delay of preceding related tasks, and the increase in communication and coordination time derived from cross-team collaboration dependencies. At the same time, due to the above technical deficiencies, existing time estimation methods also lack the ability to capture and quantify the "dependency chain propagation effect" (i.e., the phenomenon of time deviation of a task spreading and propagating to other related tasks along its related dependency chain). Ultimately, this leads to a significant deviation between the time estimation results and the actual time consumption in the project execution, making it difficult to meet the time estimation accuracy requirements of software development projects. Summary of the Invention
[0006] To address the aforementioned issues, this application provides a method for training a task time estimation model, a method for estimating task time, and an apparatus for doing so, which can improve the accuracy of time estimation in software development projects.
[0007] This application provides a method for training a task time estimation model, including: Based on the historical project database, the dependencies and dependency types between tasks in each project are determined, as well as the feature vector and actual working hours of each task. The feature vector of a task includes: basic attribute features, code association features, and text features. Using tasks as nodes and dependencies as directed edges, weights are assigned to the directed edges according to the dependency type to construct a directed weighted task dependency graph for each project. Each node contains a task ID and a feature vector of the task, and the weights are used to quantify the impact of dependency strength on working hours. The feature vectors of all tasks are combined to form a feature matrix, and the actual working hours of each task are extracted separately to form an actual working hour vector. Training and testing sets are constructed using the directed weighted task dependency graphs, feature matrices, and actual work time vectors of each project. The Stacked GAT model is then trained and evaluated using the training and testing sets to obtain the task work time prediction model. The Stacked GAT model includes: a stacked graph attention convolutional layer, a global feature aggregation layer, and a fully connected prediction layer; Stacked graph attention convolutional layers are used to compute multiple sets of attention coefficients in parallel using a multi-head attention mechanism. Based on each set of attention coefficients, the input features are weighted and aggregated to obtain the corresponding output features. Then, the output features are concatenated to obtain local features. The global feature aggregation layer is used to aggregate local features using a combination of mean pooling and max pooling to obtain global features. The fully connected prediction layer is used to map global features to obtain the estimated work hours.
[0008] Furthermore, the basic attribute features include: task type, task priority and technical complexity; code association features include: estimated code volume and defect risk coefficient; text features include: task description semantics.
[0009] Furthermore, the feature vector for each task is determined, including: Each feature of each task is encoded in the following way, and the encoded vectors are concatenated to obtain the feature vector for each task: One-hot encoding is used for task type; ordered encoding is used for task priority; normalized encoding is used for technical complexity; normalized encoding is used for estimated code volume; statistical calculation encoding is used for defect risk coefficient; and the semantics of task description are encoded by inputting into the Word2Vec model and then performing mean pooling.
[0010] Furthermore, the stacked graph attention convolutional layer includes three graph attention convolutional layers with 4, 2, and 1 attention heads, respectively.
[0011] Furthermore, the global feature aggregation layer consists of two cascaded fully connected layers.
[0012] This application also provides a method for estimating task time, including: Obtain the dependencies and dependency types of each task to be estimated in the project, as well as the feature vectors of each task to be estimated; Using the tasks to be predicted as nodes, the dependencies as directed edges, and the weights of the edges as the dependency types, a directed weighted task dependency graph of all tasks to be predicted is constructed. Each node contains the ID of the task to be predicted and the feature vector of the task to be predicted. The feature vectors of all tasks to be predicted are combined to form the feature matrix of all tasks to be predicted; Input the directed weighted task dependency graph of all tasks to be estimated and the feature matrix of all tasks to be estimated into the trained task time estimation model to obtain the estimated time list of each task to be estimated in the project. The trained task time estimation model is obtained using the training method described above.
[0013] This application also provides a training device for a task time prediction model, including: The determination module is used to determine the dependencies and dependency types between tasks in each project based on the historical project database, as well as the feature vector and actual working hours of each task. The feature vector of a task includes: basic attribute features, code association features, and text features. The feature vectors of all tasks are combined to form a feature matrix, and the actual working hours of each task are extracted separately to form an actual working hour vector. The graph construction module is used to construct a directed weighted task dependency graph for each project, with tasks as nodes, dependencies as directed edges, and weights assigned to the directed edges according to the dependency type. Each node contains a task ID and a feature vector of the task, and the weights are used to quantify the impact of dependency strength on working hours. The training and evaluation module is used to construct training and testing sets using the directed weighted task dependency graphs, feature matrices and actual work time vectors of each project. The training and testing sets are used to train and evaluate the Stacked GAT model to obtain the task work time prediction model. The Stacked GAT model includes: a stacked graph attention convolutional layer, a global feature aggregation layer, and a fully connected prediction layer; Stacked graph attention convolutional layers are used to compute multiple sets of attention coefficients in parallel using a multi-head attention mechanism. Based on each set of attention coefficients, the input features are weighted and aggregated to obtain the corresponding output features. Then, the output features are concatenated to obtain local features. The global feature aggregation layer is used to aggregate local features using a combination of mean pooling and max pooling to obtain global features. The fully connected prediction layer is used to map global features to obtain the estimated work hours.
[0014] This application also provides a task time estimation device, including: The acquisition module is used to determine the dependencies and dependency types of each task to be estimated in the project, as well as the feature vector of each task to be estimated; and to combine the feature vectors of all tasks to be estimated to form a feature matrix of all tasks to be estimated. The graph construction module is used to construct a directed weighted task dependency graph of all tasks to be estimated, with the tasks to be estimated as nodes, the dependencies as directed edges, and the weights assigned to the edges according to the dependency type. Each node contains the ID of the task to be estimated and the feature vector of the task to be estimated. The prediction module is used to input the directed weighted task dependency graph of all tasks to be predicted and the feature matrix of all tasks to be predicted into the trained task time prediction model to obtain the list of predicted time for each task to be predicted in the project. The trained task time prediction model is obtained by using the task time prediction model training device.
[0015] This application also provides an electronic device, including: Memory, which stores execution instructions; and The processor executes the instructions stored in memory, causing the processor to perform the methods described above.
[0016] This application also provides a readable storage medium storing executable instructions, which are executed by a processor to implement the above-described method.
[0017] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0018] Compared with the prior art, this application has the following advantages: 1. A "task-dependency" dual-dimensional feature modeling scheme is proposed, which integrates task attributes and dependency relationships into graph structure data, and for the first time quantifies the impact of dependency strength and topological features on working hours; 2. Design an attention-based stacked graph convolutional network (Stacked GAT) to capture global features within the K-hop dependency range through multi-layer message passing, solving the modeling problem of remote dependency effects and improving the accuracy of time estimation in software development projects; 3. Construct a fully automated system for the entire process of "data preprocessing - model training - work time estimation service - result interpretation", supporting incremental model training and interpretability analysis of prediction results.
[0019] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart of a task time estimation method for stacked graph convolutional networks based on an attention mechanism according to an embodiment of this application is shown; Figure 2 Another flowchart of a task time estimation method for stacked graph convolutional networks based on an attention mechanism according to an embodiment of this application is shown; Figure 3 An example diagram of a Stacked GAT model constructed according to an embodiment of this application is shown; Figure 4 A build task dependency graph according to an embodiment of this application is shown; Figure 5 A loss reduction curve is shown according to an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] like Figure 1 and Figure 2 The diagram shows a flowchart of a task time estimation method for stacked graph convolutional networks based on an attention mechanism according to an embodiment of this disclosure, which includes the following steps: Step 1: Data Acquisition: Collect data from multiple sources.
[0024] The collected multi-source data is divided into two categories: one is the full data of historical projects, which includes task attributes / dependencies / actual working hours from project management tools such as Jira and ZenTao, code volume / defect data from Git code repositories, and task description documents from Confluence, as shown in Table 1; the other is the task data of new projects to be estimated (the format is the same as the historical data, but there is no actual working hour field).
[0025] Table 1
[0026] Step 2: Data preprocessing and graph modeling: Transform the collected data into graph structure data that can be recognized by the Stacked GAT model.
[0027] Step 2 specifically includes the following three steps: Step 1: Data cleaning: Deduplicat by task ID, fill in missing values for complexity and priority, and filter out outliers; For example, the complexity level is set to level 3 by default, the priority level is set to P2 by default, and invalid tasks with a time requirement of less than 0.5 person-hours are removed.
[0028] Step 2: Feature Engineering: After calculating the basic attribute features, code association features and extracting the text semantic features, we concatenate them to construct a feature vector; Among them, basic attribute features, code association feature calculation and text semantic features are three feature categories of task attributes. The specific feature extraction methods, feature dimensions and feature descriptions of each feature category are shown in Table 2. According to the rules shown in Table 2, a 140-dimensional task feature vector can be constructed.
[0029] Table 2
[0030] The core of the second step in feature vector construction focuses on feature encoding and dependency weight calculation, ensuring the standardization of feature quantization and the interpretability of dependencies. The key formulas are as follows: 1. One-Hot Encoding Formula for Task Types: For the eight core task types—frontend, backend, database, testing, design, documentation, deployment, and others—one-hot encoding is used to convert discrete types into binary vectors. The formula is as follows:
[0031] in: It is an 8-dimensional feature vector for task types, where 1 indicates that the task belongs to the corresponding category and 0 indicates that it does not, ensuring the orthogonality of features for different task types.
[0032] 2. Task Priority Ordered Encoding Formula: Map priorities P0-P4 to ordered values from 0-4, then perform normalization. The formula is as follows:
[0033] in: The normalized priority. map(P) This is a priority mapping function that converts text priorities into integers, divides them by 4, and normalizes the feature values to the [0,1] interval, maintaining consistency with the dimensions of other features.
[0034] 3. Normalization formula for technical complexity: This formula linearly maps complexity levels 1-5 to the interval [0.2, 1.0], as follows:
[0035] in: For normalized technical complexity, C The technical complexity level (levels 1-5) is multiplied by 0.2 to achieve equal-interval normalization, which preserves the level differences while unifying the dimensions.
[0036] 4. Defect risk coefficient calculation formula: based on the average defect rate and defect severity of similar historical tasks. The calculation formula is as follows:
[0037] in: This is the historical defect rate (number of defects / total number of tasks) for this task type. This represents the average severity of defects for this type of task (severity: fatal = 4, high = 3, medium = 2, low = 1), with a range of [0, 4]. A larger value indicates a higher defect risk.
[0038] 5. Dependency weight calculation formula: Assign fixed weights based on dependency type. The formula is:
[0039] in: The weight values of the dependent edges are determined by expert experience and historical data to identify the weight differences for different dependency types, thereby quantifying the impact of dependency strength on working hours.
[0040] Step 3: Graph Construction: Using tasks as nodes and dependencies as directed edges, assign weights to the edges according to dependency types to construct a directed weighted task dependency graph G, and generate a feature matrix and actual working hour labels.
[0041] The task includes task attribute feature vectors and task information; it can be assigned a weight of 1.0 / 0.7 / 0.5 according to strong / weak / associative dependencies.
[0042] Based on Table 2, the final generated feature vector is organized into an N×140 feature matrix X, and the actual working hours are organized into an N×1 label vector Y, where N is the number of tasks.
[0043] The established task dependency graph model can be shown in Table 3.
[0044] Table 3
[0045] Step 3: Stacked GAT model construction and training: Use the constructed graph structure data to train the Stacked GAT model to obtain a trained task time prediction model.
[0046] like Figure 3 As shown, this is an example of a constructed Stacked GAT model, which includes: a stacked graph attention convolutional layer, a global feature aggregation layer, and a fully connected prediction layer; Stacked graph attention convolutional layers are used to compute multiple sets of attention coefficients in parallel using a multi-head attention mechanism. Based on each set of attention coefficients, the input features are weighted and aggregated to obtain the corresponding output features. Then, the output features are concatenated to obtain local features. The global feature aggregation layer is used to aggregate local features using a combination of mean pooling and max pooling to obtain global features. The fully connected prediction layer is used to map global features to obtain the estimated work hours.
[0047] Training and testing sets are constructed using the directed weighted task dependency graphs, feature matrices, and actual work time vectors of each project. The Stacked GAT model is then trained and evaluated using the training and testing sets to create a task work time prediction model.
[0048] The process for graph-structured data to enter the model training layer is as follows: First, divide the dataset: Divide the historical data into a training set (for model parameter updates), a validation set (for intermediate evaluation), and a test set (for final performance verification) in a 7:2:1 ratio. Retrain the Stacked GAT model: Load the initialized 3-layer stacked graph attention network and iteratively train it for 100 rounds using the Adam optimizer and Huber loss function; Synchronous evaluation: After each round of training, the MAE, R² and other indicators are calculated using the validation set, and the model with the best R² is saved; if the R² of the test set is ≥0.85 (meets the standard), proceed to the next stage; if it does not meet the standard, return to readjust the model parameters (such as the number of attention heads and the learning rate) and train.
[0049] The output of this stage is: the best model after training and the model evaluation report (including the loss curve and various indicators).
[0050] The parameter configuration of the model is shown in Table 4 below.
[0051] Table 4
[0052] The core of the Stacked GAT model lies in the message-passing mechanism of the graph attention convolutional layer. By calculating the attention coefficients between nodes, it strengthens the weights of important dependencies. The key formula is as follows: 1. Attention Coefficient Calculation: For node i's neighbor node j, its attention coefficient is... The contribution of node j to the feature update of node i is represented by the following formula:
[0053] in: For nodes i The input feature vector (dimension 140). For nodes j The input feature vector (dimension 140). W It is a linear transformation matrix (first-level dimension 140×64). The attention weight vector (dimension 128, due to...) (Dimensions are 128) Let i be the set of neighboring nodes. This indicates a vector concatenation operation.
[0054] 2. Multi-head attention feature update: To improve the model's expressive power, a multi-head attention mechanism is used to compute multiple sets of attention coefficients in parallel. The output features of each set are then concatenated (in the first two layers). The last layer uses average pooling, with the following formula:
[0055] in: For nodes i The updated multi-head attention features K The number of attention heads (K=4 for the first layer, K=2 for the second layer, and K=1 for the third layer). For the first k Attention coefficient based on size For the first k The linear transformation matrix of the size, This indicates a feature concatenation operation. This indicates that the output features from the 1st head to the Kth head are concatenated.
[0056] 3. Global Feature Aggregation in the Readout Layer: To obtain global features from the task dependency graph, a combination of mean pooling and max pooling is used, with the following formula:
[0057] in: The global feature vector of the graph (dimension 128). N denoted as the number of nodes in the graph, and concat as the feature concatenation operation. Combining mean and max pooling can simultaneously capture global statistical information and local key features.
[0058] 4. Work Hour Prediction Output: Global features are mapped using a fully connected layer to ultimately output the task work hour prediction result. The formula is:
[0059] in: This is the first layer fully connected matrix (dimension 128×32). This is the second layer fully connected matrix (32×1 dimension). , The corresponding bias term is the bias term. The Sigmoid function (compresses the output to [0, 1]) is multiplied by 100 to scale the work hour range (adapting to task scenarios of 0-100 people per hour).
[0060] 5. Loss Function Design (Huber Loss): To improve the model's resilience to outliers, the Huber loss function is adopted, with the following formula:
[0061] in: y For actual working hours, To estimate the time required, δ is a threshold (δ=5.0 in this application). When the error is small (≤δ), MSE loss is used to ensure gradient stability, and when the error is large, MAE loss is used to reduce the impact of outliers.
[0062] 6. Model Evaluation Metrics Formulas: Four core metrics are used to evaluate model performance, and the formulas are as follows: Mean Absolute Error (MAE): Measures the difference between the predicted value and the actual value. The mean absolute deviation, the smaller the value, the higher the precision:
[0063] Where M represents the total number of samples, This represents the true value of the i-th sample. This represents the estimated value for the i-th sample.
[0064] Mean Square Error (MSE): Amplifies the effect of larger errors, reflecting the squared mean of the errors.
[0065] Coefficient of determination (R²): Measures the model's ability to explain variance, with a value ranging from [0,1]. The closer to 1, the better the fit.
[0066] in, This is the mean of the true values.
[0067] Maximum relative error (MRE): Measures the prediction bias under extreme conditions and reflects the stability of the model. .
[0068] Step 4: Service Prediction: Use the trained model to predict the working hours of each task in the new item.
[0069] The trained model enters the prediction service layer, with the input being the new project task data to be predicted. The processing steps are as follows: Repeat the "preprocessing + graph modeling" process for the new project data to generate the task dependency graph G' and feature matrix X' for the new project; Load the saved trained model, input G' and X' into the model, and calculate the estimated time vector for each task through forward propagation. .
[0070] The output of this step is: the estimated working hours for each task in the new project.
[0071] Step 5: Output: Present the predicted results in multiple formats.
[0072] Finally, the output layer is entered, which outputs three types of content: Estimated Results Table: Clearly define the ID, name, and estimated working hours for each task; Dependency graph visualization: Use different colors to mark basic tasks and key tasks, and show the task dependencies and weights; Critical path analysis identifies the dependency chains that have the greatest impact on project time, providing a basis for schedule optimization.
[0073] The proposed solution utilizes historical data to support model training, the model supports the prediction of new projects, and the prediction results can be fed back into the historical data pool for incremental model training, thereby improving the accuracy of subsequent predictions and achieving a closed-loop process.
[0074] The following are examples of actual business scenarios. 1. Overview of Simulated Dataset Construction To verify the feasibility and effectiveness of the technical solution, four typical software projects were constructed (Project A backend development, Project A frontend development, data interface development, and unit testing), totaling 150 tasks. Data generation followed these principles: Dependency design: A directed acyclic graph (DAG) structure is used to ensure no circular dependencies.
[0075] Work hours distribution: Based on historical project statistics, the work hours range of 5-80 person-hours conforms to a normal distribution. Complexity annotation: The annotation was done independently by 3 senior developers and the results were consistent.
[0076] Data partitioning: The training set (105 records), validation set (30 records), and test set (15 records) are randomly partitioned in a 7:2:1 ratio to ensure that the proportions of each type of task are consistent.
[0077] The data fields fully cover the core data items defined in Table 1, including basic task information, dependencies, actual working hours, and technical complexity.
[0078] 2. Input original data example The specifics are shown in Table 5.
[0079] Table 5
[0080] 3. Implementation Results of Task Attribute Characteristics Engineering Taking the core task T001 as an example, feature calculation is based on historical statistical information from the simulated dataset: Historical defect rate calculation: Based on 50 historical backend tasks in the simulated dataset, there are a total of 9 defects, with a defect rate of 18%.
[0081] Mean severity of defects: The severity of the 9 defects are [2,1,2,1,1,2,1,1,2], with a mean of 1.3.
[0082] Maximum code size benchmark: The maximum code size of a historical backend task is 800 lines, which is used as the normalization benchmark.
[0083] Text feature extraction: Using a Word2Vec model pre-trained in the field of software engineering, the vocabulary covers technical terms.
[0084] The generation of task attribute feature vectors strictly follows the rules in Table 2 to ensure the consistency of the dimensions of each feature and the stability of the values. The relevant final values are shown in Table 6.
[0085] Table 6
[0086] 4. Task Dependency Graph Construction and Visualization Ten core tasks from the management system backend V1.0 project were selected to construct a task dependency graph (the entire 150-node graph follows the same rules: no self-loops, weak connectivity, and directed weighting). The visualization results are as follows. Figure 4 As shown, Figure 4 The task dependencies and weight distribution are clearly displayed. Figure 4 The middle arrow indicates the dependency type and weight: strong dependency weight 1.0, weak dependency weight 0.7, and related dependency weight 0.5.
[0087] 5. Model Training and Evaluation Results 5.1 Training Parameter Configuration The following model parameters were used: 3-layer Stacked GAT (hidden layer dimension [64,64,64]), number of multi-head attention heads (4,2,1), optimizer Adam (learning rate 0.001, weight decay 5e-4), batch size 32, 100 iterations, Huber loss (δ=5.0, robust to outlier interference).
[0088] 5.2 Loss Curve Analysis: Figure 5 The loss curve analysis graph is shown. From... Figure 5 As can be seen, the model enters a convergent state after 60 rounds, with the training loss stabilizing at around 2.0 and the validation loss stabilizing at around 2.5. The difference between the two is always less than 0.5, indicating no obvious overfitting phenomenon, which proves that the model has good generalization ability.
[0089] 5.3 The evaluation metrics for the test set are shown in Table 7 below.
[0090] Table 7
[0091] The beneficial effects of this application are as follows: 1. Innovative Dependency Modeling: For the first time, task dependencies are quantified as directed weighted graphs, and the influence of different dependency strengths is captured through attention mechanisms, thus solving the bottleneck of traditional methods that ignore the "dependency chain propagation effect".
[0092] 2. Comprehensive feature fusion: It integrates structured attributes, code association features and text semantic features to construct a 140-dimensional multi-dimensional feature vector, which increases the feature dimension by more than 3 times compared with traditional models and reduces the information loss rate by 60%.
[0093] 3. Excellent model generalization ability: Stacked GAT captures global features through multi-layer message passing, achieving an R² of 0.89 on the test set, which is 43.5% higher than the COCOMO II model, and is suitable for time estimation scenarios of different types of software projects.
[0094] 4. Highly efficient engineering deployment: Provides a fully automated module with a single request response time of ≤50ms, supports incremental training (no need to retrain the full model when adding new data), and is suitable for large-scale enterprise applications.
[0095] The technical solution of this application can be applied in the following scenarios: 1) Agile and waterfall development scenarios: Provides high-precision time estimation for fine-grained tasks with iteration cycles within 2 weeks (such as interface development and unit testing), and supports daily stand-up meeting progress tracking and risk warning.
[0096] 2) Large-scale project management scenario: For complex projects with 1000+ tasks, the critical path can be located through dependency graph visualization, which helps project managers to allocate resources and optimize schedule.
[0097] 3) Outsourcing project quotation scenario: Based on historical similar task time data and dependencies, quickly generate objective outsourcing quotation schemes and reduce quotation deviation rate (from the traditional 30% to less than 10%).
[0098] 4) Newcomer training scenario: Based on the work hour prediction results output by the model, newcomers are assigned tasks that match their abilities, and work hour references are provided based on historical data to accelerate the growth of newcomers.
[0099] Corresponding to the model training methods described in steps 1 to 3 above, this disclosure also provides a task time prediction model training apparatus, comprising: The determination module is used to determine the dependencies and dependency types between tasks in each project based on the historical project database, as well as the feature vector and actual working hours of each task. The feature vector of a task includes: basic attribute features, code association features, and text features. The feature vectors of all tasks are combined to form a feature matrix, and the actual working hours of each task are extracted separately to form an actual working hour vector. The graph construction module is used to construct a directed weighted task dependency graph for each project, with tasks as nodes, dependencies as directed edges, and weights assigned to the directed edges according to the dependency type. Each node contains a task ID and a feature vector of the task, and the weights are used to quantify the impact of dependency strength on working hours. The training and evaluation module is used to construct training and testing sets using the directed weighted task dependency graphs, feature matrices and actual work time vectors of each project. The training and testing sets are used to train and evaluate the Stacked GAT model to obtain the task work time prediction model. The Stacked GAT model includes: a stacked graph attention convolutional layer, a global feature aggregation layer, and a fully connected prediction layer; Stacked graph attention convolutional layers are used to compute multiple sets of attention coefficients in parallel using a multi-head attention mechanism. Based on each set of attention coefficients, the input features are weighted and aggregated to obtain the corresponding output features. Then, the output features are concatenated to obtain local features. The global feature aggregation layer is used to aggregate local features using a combination of mean pooling and max pooling to obtain global features. The fully connected prediction layer is used to map global features to obtain the estimated work hours.
[0100] Corresponding to the time estimation method described in steps 4 to 5 above, this disclosure also provides a task time estimation device, comprising: The acquisition module is used to determine the dependencies and dependency types of each task to be estimated in the project, as well as the feature vector of each task to be estimated; and to combine the feature vectors of all tasks to be estimated to form a feature matrix of all tasks to be estimated. The graph construction module is used to construct a directed weighted task dependency graph of all tasks to be estimated, with the tasks to be estimated as nodes, the dependencies as directed edges, and the weights assigned to the edges according to the dependency type. Each node contains the ID of the task to be estimated and the feature vector of the task to be estimated. The prediction module is used to input the directed weighted task dependency graph of all tasks to be predicted and the feature matrix of all tasks to be predicted into the trained task time prediction model to obtain the list of predicted time for each task to be predicted in the project. The trained task time prediction model is obtained by using the task time prediction model training device.
[0101] This disclosure also provides an electronic device, including: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, causing the processor to perform any of the storage methods described above.
[0102] The hardware architecture of electronic devices / devices can be implemented using a bus architecture. A bus architecture can include any number of interconnect buses and bridges, depending on the specific application and overall design constraints of the hardware. A bus connects various circuits, including one or more processors, memories, and / or hardware modules. A bus can also connect various other circuits such as peripherals, voltage regulators, power management circuits, external antennas, etc. Buses can be Industry Standard Architecture (ISA) buses, Peripheral Component Interconnect (PCI) buses, or Extended Industry Standard Component (EISA) buses, etc. Buses can be categorized as address buses, data buses, control buses, etc.
[0103] For ease of explanation, certain steps of the above method are described in relation to modules. It should be understood that the corresponding module performing one or more steps of the above method may be one or more hardware modules specifically configured to perform the corresponding step, or implemented by a processor configured to perform the corresponding step, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination thereof.
[0104] The specific implementation of each module in the above-mentioned device can be referred to the implementation process of the corresponding steps in the above-mentioned method implementation method of this disclosure, and will not be repeated here.
[0105] This disclosure also provides a readable storage medium storing a computer program that, when executed by a processor, is used to implement the methods described above. A "readable storage medium" can be any means capable of containing, storing, communicating, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples of a readable storage medium include: an electrical connection with one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable read-only memory (CDROM), etc.
[0106] This disclosure also provides a computer program product, the methods of which can be implemented wholly or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, all or part of the processes or functions of this disclosure are performed.
[0107] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for training a task time prediction model, characterized in that, include: Based on the historical project database, the dependencies and dependency types between tasks in each project are determined, as well as the feature vector and actual working hours of each task. The feature vector of a task includes: basic attribute features, code association features, and text features. Using tasks as nodes and dependencies as directed edges, weights are assigned to the directed edges according to the dependency type to construct a directed weighted task dependency graph for each project. Each node contains a task ID and a feature vector of the task, and the weights are used to quantify the impact of dependency strength on working hours. The feature vectors of all tasks are combined to form a feature matrix, and the actual working hours of each task are extracted separately to form an actual working hour vector. Training and testing sets are constructed using the directed weighted task dependency graphs, feature matrices, and actual work time vectors of each project. The Stacked GAT model is then trained and evaluated using the training and testing sets to obtain the task work time prediction model. The Stacked GAT model includes: a stacked graph attention convolutional layer, a global feature aggregation layer, and a fully connected prediction layer; Stacked graph attention convolutional layers are used to compute multiple sets of attention coefficients in parallel using a multi-head attention mechanism. Based on each set of attention coefficients, the input features are weighted and aggregated to obtain the corresponding output features. Then, the output features are concatenated to obtain local features. The global feature aggregation layer is used to aggregate local features using a combination of mean pooling and max pooling to obtain global features. The fully connected prediction layer is used to map global features to obtain the estimated work hours.
2. The method according to claim 1, characterized in that, The basic attribute features include: task type, task priority and technical complexity; code association features include: estimated code volume and defect risk coefficient; text features include: task description semantics.
3. The method according to claim 2, characterized in that, Determine the feature vector for each task, including: Each feature of each task is encoded in the following way, and the encoded vectors are concatenated to obtain the feature vector for each task: One-hot encoding is used for task type; ordered encoding is used for task priority; normalized encoding is used for technical complexity; normalized encoding is used for estimated code volume; statistical calculation encoding is used for defect risk coefficient; and the semantics of task description are encoded by inputting into the Word2Vec model and then performing mean pooling.
4. The method according to claim 1, characterized in that, The stacked graph attention convolutional layer includes three graph attention convolutional layers with 4, 2 and 1 attention heads, respectively.
5. The method according to claim 1, characterized in that, The global feature aggregation layer consists of two cascaded fully connected layers.
6. A method for estimating task time, characterized in that, include: Obtain the dependencies and dependency types of each task to be estimated in the project, as well as the feature vectors of each task to be estimated; Using the tasks to be predicted as nodes, the dependencies as directed edges, and the weights of the edges as the dependency types, a directed weighted task dependency graph of all tasks to be predicted is constructed. Each node contains the ID of the task to be predicted and the feature vector of the task to be predicted. The feature vectors of all tasks to be predicted are combined to form the feature matrix of all tasks to be predicted. The directed weighted task dependency graphs of all tasks to be estimated and the feature matrices of all tasks to be estimated are input into the trained task time estimation model to obtain the estimated time list of each task to be estimated in the project. The trained task time estimation model is obtained using the training method described in claim 1.
7. A training device for a task time prediction model, characterized in that, include: The determination module is used to determine the dependencies and dependency types between tasks in each project based on the historical project database, as well as the feature vector and actual working hours of each task. The feature vector of a task includes: basic attribute features, code association features, and text features. The feature vectors of all tasks are combined to form a feature matrix, and the actual working hours of each task are extracted separately to form an actual working hour vector. The graph construction module is used to construct a directed weighted task dependency graph for each project, with tasks as nodes, dependencies as directed edges, and weights assigned to the directed edges according to the dependency type. Each node contains a task ID and a feature vector of the task, and the weights are used to quantify the impact of dependency strength on working hours. The training and evaluation module is used to construct training and testing sets using the directed weighted task dependency graphs, feature matrices and actual work time vectors of each project. The training and testing sets are used to train and evaluate the Stacked GAT model to obtain the task work time prediction model. The Stacked GAT model includes: a stacked graph attention convolutional layer, a global feature aggregation layer, and a fully connected prediction layer; Stacked graph attention convolutional layers are used to compute multiple sets of attention coefficients in parallel using a multi-head attention mechanism. Based on each set of attention coefficients, the input features are weighted and aggregated to obtain the corresponding output features. Then, the output features are concatenated to obtain local features. The global feature aggregation layer is used to aggregate local features using a combination of mean pooling and max pooling to obtain global features. The fully connected prediction layer is used to map global features to obtain the estimated work hours.
8. A task time estimation device, characterized in that, include: The acquisition module is used to determine the dependencies and dependency types of each task to be estimated in the project, as well as the feature vectors of each task to be estimated. The feature vectors of all tasks to be predicted are combined to form the feature matrix of all tasks to be predicted. The graph construction module is used to construct a directed weighted task dependency graph of all tasks to be estimated, with the tasks to be estimated as nodes, the dependencies as directed edges, and the weights assigned to the edges according to the dependency type. Each node contains the ID of the task to be estimated and the feature vector of the task to be estimated. The prediction module is used to input the directed weighted task dependency graph of all tasks to be predicted and the feature matrix of all tasks to be predicted into the trained task time prediction model to obtain the list of predicted time for each task to be predicted in the project. The trained task time prediction model is obtained by using the task time prediction model training device.
9. An electronic device, characterized in that, include: The memory stores execution instructions; as well as A processor that executes execution instructions stored in the memory, causing the processor to perform the method of any one of claims 1 to 6.
10. A readable storage medium, characterized in that, The readable storage medium stores execution instructions, which, when executed by a processor, are used to implement the method of any one of claims 1 to 6.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Spark operation time prediction method and device based on graph convolution network
CN111126668A
Property task scheduling method and device, equipment and medium
CN113822606A
Method and device for determining multi-task processing sequence
CN114841664A
Multi-task time sequence prediction method based on graph attention network
CN117349636A
Flexible job shop scheduling method and device and readable storage medium
CN118195263A