Project risk determination method and device, equipment and medium
Data is obtained through multiple agents and risk analysis is analyzed using dynamic decision-making models. Combined with Monte Carlo parameter sampling algorithm, the accurate warning problem of project risk management in massive data and dynamic changes is solved, and the reliability of project risk determination is improved.
Patent Information
- Application Number
- CN202510401214.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
AI Technical Summary
Existing project risk management methods are difficult to cope with massive data and dynamic changes, and cannot achieve accurate early warning.
The relevant data of the target project is obtained through multiple agents, the risk value is analyzed using a dynamic decision model (based on long and short-term memory network), and the execution plan is determined based on the Monte Carlo parameter sampling algorithm and continuous delivery process data.
It realizes accurate early warning and effective reduction of project risks, is suitable for massive data and dynamic changes scenarios, and improves the reliability of project risks determination.
Smart Images

Figure CN120258731A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of project management, and in particular, to a method, apparatus, device, and medium for determining project risks. Background Art
[0002] With the rapid development of automotive electronic technology, the complexity and R & D cycle of component development projects have been increasing continuously. The intensification of market competition has also put forward higher requirements for development efficiency and product quality, making the importance of project risk management increasingly prominent.
[0003] Currently, traditional risk management methods mainly rely on manual experience judgment or simple statistical analysis, making it difficult to cope with the challenges of massive data and dynamic changes in the development process, and unable to achieve real-time and accurate risk early warning.
[0004] In view of the above, how to solve the deficiencies of current project risk management in dealing with massive data and dynamic changes in development and unable to achieve accurate early warning is an urgent problem for those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, device, and medium for determining project risks to solve the problem that current project risk management has deficiencies in dealing with massive data and dynamic changes in development and is unable to achieve accurate early warning.
[0006] To solve the above technical problems, this application provides a method for determining project risks, including:
[0007] Obtaining relevant data of a target project from multiple data sources through multiple agents; where each agent corresponds to one data source; the relevant data includes at least a code quality report, requirement coverage, development cycle, and test results;
[0008] Extracting target features from the relevant data of the target project;
[0009] Inputting the target features into a pre-constructed dynamic decision model to output a risk value of the target project; where the dynamic decision model is a long short-term memory network model generated through feature extraction and supervised learning using historical project data;
[0010] Judging whether the risk value of the target project is greater than a preset threshold;
[0011] If so, obtaining target continuous integration / continuous delivery process data and historical project data corresponding to the target project;
[0012] Determining an execution plan for the target project according to the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm, and dynamic decision model.
[0013] On the one hand, relevant data of a target project is obtained from multiple data sources through multiple agents, including:
[0014] A distributed message queue is established, and a distributed consensus protocol is set among the agents;
[0015] Based on the distributed consensus protocol, each agent is controlled to obtain relevant data from the corresponding data source and store the relevant data in the distributed message queue.
[0016] On the other hand, target features are extracted from the relevant data of the target project, including:
[0017] The relevant data is subjected to data cleaning and normalization processing;
[0018] Features are extracted from the normalized relevant data through a random forest algorithm;
[0019] The importance scores of each feature are determined;
[0020] Target features with importance scores greater than a preset value are selected from each feature;
[0021] Among them, the target features at least include project code complexity, requirement completion rate, test coverage rate, and development working hour deviation rate.
[0022] On the other hand, the construction process of the dynamic decision model includes:
[0023] Historical continuous integration / continuous delivery process data and historical project data are obtained;
[0024] The historical continuous integration / continuous delivery process data and historical project data are preprocessed;
[0025] Feature data is extracted from the preprocessed historical continuous integration / continuous delivery process data and historical project data;
[0026] Based on a preset time window, the importance indicators of each feature data are calculated;
[0027] According to the importance indicators and activation functions of each feature data, weighted feature data corresponding to each feature data is generated;
[0028] An initial dynamic decision model is obtained, and risk labels are given through a supervised learning method;
[0029] The initial dynamic decision model is trained using the weighted feature data until the performance of the initial dynamic decision model meets the requirements to complete the construction of the dynamic decision model.
[0030] On the other hand, after obtaining the risk value of the target project, it further includes:
[0031] When the risk value is not higher than the first threshold, a risk assessment log of the target project is generated;
[0032] When the risk value is higher than the first threshold and not higher than the second threshold, a prompt message indicating that the target project has risks is output;
[0033] When the risk value is higher than the second threshold, the continuous integration / continuous delivery process of the target project is stopped, and a prompt message indicating that the target project has serious risks is output;
[0034] Wherein, the first threshold is less than the second threshold.
[0035] On the other hand, the preset threshold is the first threshold or the second threshold;
[0036] Correspondingly, according to the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm and dynamic decision-making model, determine the execution plan of the target project, including:
[0037] Perform Monte Carlo parameter sampling according to the target continuous integration / continuous delivery process data and historical project data to generate multiple initial execution plans for the target project;
[0038] Perform data preprocessing and feature extraction on each initial execution plan to generate feature data corresponding to each initial execution plan;
[0039] Input the feature data corresponding to each initial execution plan into the dynamic decision-making model respectively to generate the risk value of each initial execution plan;
[0040] Determine the candidate execution plans in each initial execution plan whose corresponding risk values are lower than the risk value of the target project;
[0041] Obtain the decision dimensions and constraint conditions of the execution plan of the target project; wherein, the decision dimensions at least include the risk reduction amplitude, resource consumption amplitude, delivery cycle compression rate and customer satisfaction; the constraint conditions at least include the development cost increase amplitude, delivery cycle and core function integrity;
[0042] According to the decision dimensions and constraint conditions, determine the execution plan of the target project among each candidate execution plan.
[0043] On the other hand, after determining the execution plan of the target project, it further includes:
[0044] Determine the schedule, resource allocation information and task decomposition information of the target project according to the execution plan;
[0045] Upload the schedule, resource allocation information and task decomposition information to the server.
[0046] To solve the above technical problems, the present application further provides a project risk determination device, including:
[0047] A first acquisition module, configured to acquire relevant data of a target project in a plurality of data sources through a plurality of agents; wherein, each agent corresponds to each data source one by one; the relevant data at least includes a code quality report, a requirements coverage rate, a development cycle, and a test result;
[0048] An extraction module, configured to extract target features from the relevant data of the target project;
[0049] A prediction module, configured to input the target features into a pre-constructed dynamic decision model to output a risk value of the target project; wherein, the dynamic decision model is a long short-term memory network model generated by feature extraction and supervised learning using historical project data;
[0050] A judgment module, configured to judge whether the risk value of the target project is greater than a preset threshold; if so, trigger a second acquisition module;
[0051] A second acquisition module, configured to acquire target continuous integration / continuous delivery process data and historical project data corresponding to the target project;
[0052] A determination module, configured to determine an execution plan of the target project according to the target continuous integration / continuous delivery process data, the historical project data, the Monte Carlo parameter sampling algorithm, and the dynamic decision model.
[0053] To solve the above technical problems, the present application further provides a project risk determination device, including:
[0054] A memory, configured to store a computer program;
[0055] A processor, configured to implement the steps of the above project risk determination method when executing the computer program.
[0056] To solve the above technical problems, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program implements the steps of the above project risk determination method when executed by a processor.
[0057] The project risk determination method provided by this application obtains relevant data of a target project from multiple data sources through multiple agents; among them, each agent corresponds to each data source one by one; the relevant data includes at least a code quality report, requirements coverage, development cycle, and test results; extract target features from the relevant data of the target project; input the target features into a pre-constructed dynamic decision model to output the risk value of the target project; among them, the dynamic decision model is a long short-term memory network model generated by feature extraction and supervised learning using historical project data; determine whether the risk value of the target project is greater than a preset threshold; if so, obtain the target continuous integration / continuous delivery process data and historical project data corresponding to the target project; according to the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm, and dynamic decision model, determine the execution plan of the target project. It can be seen that this solution can ensure the integrity and accuracy of project data acquisition by using multiple agents to obtain relevant data of the target project from multiple data sources respectively; using feature extraction technology, the target features from the relevant data of the target project can reflect the importance of the extracted target features to project risks; inputting the target features into a pre-constructed dynamic decision model to output the risk value of the target project realizes accurate project early warning, so as to determine the best execution strategy of the target project according to the size relationship between the risk value and the preset threshold, using the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm, and dynamic decision model, which can effectively reduce project execution risks, is applicable to massive data and dynamic change scenarios in project development, and improves the reliability of project risk determination.
[0058] In addition, this application also provides a project risk determination device, equipment, and medium, and the effects are the same as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0060] Figure 1 It is a flowchart of a project risk determination method provided by an embodiment of this application;
[0061] Figure 2 It is an application flowchart of a development project risk determination agent system provided by an embodiment of this application;
[0062] Figure 3 It is a training flowchart of a dynamic decision model provided by an embodiment of this application;
[0063] Figure 4 Schematic diagram of a project risk determination device provided by an embodiment of the present application;
[0064] Figure 5 Structural diagram of a project risk determination device provided by an embodiment of the present application. Specific implementation manners
[0065] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.
[0066] The core of the present application is to provide a project risk determination method, device, equipment and medium to solve the problem that the current project risk management has deficiencies in dealing with a large amount of data and dynamic changes during development and cannot achieve accurate early warning.
[0067] To enable those skilled in the art to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0068] Figure 1 Flowchart of a project risk determination method provided by an embodiment of the present application. As Figure 1 shown, the method includes:
[0069] S10: Obtain relevant data of the target project in multiple data sources through multiple agents.
[0070] Among them, each agent corresponds to each data source one by one, and the relevant data includes at least a code quality report, a requirements coverage rate, a development cycle, and a test result.
[0071] To achieve project risk determination, it is first necessary to obtain relevant data of the target project in multiple data sources through multiple agents. It should be noted that an agent is a system or program that can perceive the environment and make autonomous decisions. It can receive information, analyze information, make decisions, and then take actions. For example, it can mobilize tools to collect data, then use a large language model for analysis, and call tools to perform specific operations according to the analysis results.
[0072] In this embodiment, the main function of the agent is to obtain relevant data related to the target project from the corresponding data sources. For example, agent A obtains the issue status of the target project from the project and transaction tracking tool, and agent B extracts the static code analysis results of the target project from the quality assurance center, etc. It should also be noted that the issue status is the problems recorded during the project process, such as the severity level, whether it has been fixed, etc. The static code analysis result is a report obtained by checking and analyzing the source code without execution through a static analysis tool, such as syntax checking, quality metrics, and coding standard checking. Whether the static code check is executed and the quality of the results can indirectly reflect the quality of the code, thus mapping part of the risks of the project. It should also be noted that the relevant data includes at least the code quality report, requirement coverage, development cycle, and test results, and may also include other data, which is not limited in this embodiment. The specific number of agents and data sources in this embodiment is not limited and depends on the specific implementation situation.
[0073] S11: Extract the target features from the relevant data of the target project.
[0074] Furthermore, conduct in-depth analysis on the multi-dimensional relevant data, identify the non-linear relationships and cross-influences between the data of each dimension, extract the target features from the original relevant data through a feature extraction algorithm, and assign weights to the extracted features to reflect the importance of the extracted features to the project risks. The specific type and extraction process of the target features in this embodiment are not limited and depend on the specific implementation situation.
[0075] S12: Input the target features into the pre-constructed dynamic decision model to output the risk value of the target project.
[0076] Among them, the dynamic decision model is a long short-term memory network model generated through feature extraction and supervised learning using historical project data.
[0077] Subsequently, input the target features into the pre-constructed dynamic decision model to output the risk value of the target project. It should be noted that the dynamic decision model is a long short-term memory (LSTM) model generated through feature extraction and supervised learning using historical project data. The training process of the dynamic decision model in this embodiment is not limited.
[0078] It should be noted that the value range of the risk value is [0, 1]. Any continuous value between 0 and 1 can represent the current risk level of the project; 0 represents no risk or low risk, and 1 represents high risk.
[0079] S13: Determine whether the risk value of the target project is greater than a preset threshold; if so, proceed to step S14; if not, end.
[0080] S14: Obtain the target continuous integration / continuous delivery process data and historical project data corresponding to the target project.
[0081] S15: Determine the execution plan of the target project based on the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm, and dynamic decision-making model.
[0082] After obtaining the risk value of the target project, in order to implement the target project with low risk, it is also necessary to determine whether the risk value of the target project is greater than a preset threshold. In this embodiment, there is no limit to the size of the preset threshold, which depends on the specific implementation situation. If it is confirmed that the risk value of the target project is not greater than the preset threshold, it is considered that the current target project has a low risk and can be implemented normally. If it is confirmed that the risk value of the target project is greater than the preset threshold, it is confirmed that there is a certain risk in the current target project, and the risk needs to be minimized as much as possible during project implementation.
[0083] Specifically, obtain the target CI / CD process data and historical project data corresponding to the target project. It can be understood that the target CI / CD process data includes the code quality report, submission frequency, requirement coverage, development cycle, test results, etc. of the target project, and these data can reflect the current status and development trend of the target project. The historical project data includes the risk event records and project success / failure results of previous projects, which can help identify potential risk patterns. Further, determine the execution plan of the target project based on the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm, and dynamic decision-making model. It should be noted that Monte Carlo parameter sampling is a numerical calculation method based on random sampling, which is used to estimate the parameters of complex models. By randomly extracting a large number of samples from the prior distribution of the parameters and using these samples to calculate the posterior distribution of the model or the expected value of the objective function, the estimated value of the parameters can be approximately obtained. This method is applicable to high-dimensional, non-linear, and difficult-to-analytically-solve models. In this embodiment, there is no limit to the specific process of determining the execution plan of the target project.
[0084] In this embodiment, by using multiple agents to respectively obtain the relevant data of the target project in multiple data sources, the integrity and accuracy of project data acquisition can be ensured; by using feature extraction technology, the target features in the relevant data of the target project can reflect the importance of the extracted target features to project risks; inputting the target features into a pre-constructed dynamic decision model to output the risk value of the target project realizes precise project early warning, so that according to the size relationship between the risk value and the preset threshold, the best execution strategy of the target project can be determined by using the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm and dynamic decision model, which can effectively reduce the project execution risk, is applicable to the scenarios of massive data and dynamic changes in project development, and improves the reliability of project risk determination.
[0085] Figure 2 It is the application flow chart of the intelligent agent system for determining the risk of a development project provided by the embodiment of the present application. On the basis of the above embodiment, in some embodiments, as Figure 2 shown, obtaining the relevant data of the target project in multiple corresponding data sources through multiple agents includes:
[0086] S101: Establish a distributed message queue and set a distributed consensus protocol among the agents.
[0087] S102: Based on the distributed consensus protocol, control each agent to obtain the relevant data in the corresponding data source and store the relevant data in the distributed message queue.
[0088] Among them, the relevant data at least includes code quality reports, requirement coverage, development cycle and test results.
[0089] To solve the bottleneck of the centralized architecture, when collecting relevant data through agents, each agent is set to achieve asynchronous communication through a distributed message queue (such as Kafka) to handle the requirements of collecting a large amount of real-time data.
[0090] Specifically, each agent is deployed near the Continuous Integration / Continuous Delivery (CI / CD) process tools, and is respectively responsible for extracting corresponding data from these tools, such as obtaining task status in JIRA and code commit information in GitLab. To establish a distributed message queue, it is first necessary to deploy a distributed cluster so that the system can scale horizontally to handle a large amount of information. Further, distributed message queue topics are created based on different data types. For example, one topic can be used to store the measurement results of code quality, and another topic can be used to store task update information. Each agent acts as a message producer and sends the collected data to the corresponding distributed message queue topic. The downstream system forms a consumer cluster and asynchronously consumes messages from the distributed message queue; these consumers can run on different nodes and extract data from the specified topic for subsequent analysis and processing. In summary, through the distributed message queue, asynchronous communication between agents is established, which can effectively absorb and manage a large amount of instantaneous data streams, avoiding resource exhaustion of the background system; by loosely coupling data production and consumption, it is convenient to independently expand the acquisition and analysis components; at the same time, the distributed message queue provides a persistence mechanism to ensure that messages are not lost due to temporary failures when the consumption process comes back online or restarts.
[0091] Furthermore, to ensure the consistency of each agent in data processing and status update and avoid data conflicts, a distributed consensus protocol (such as the Raft algorithm) is also set among the agents in this embodiment. The following takes the Raft algorithm as an example for detailed description: The Raft algorithm is a commonly used consensus algorithm that ensures consensus among nodes by electing a leader and replicating logs. Specifically, in Raft, each agent can assume three roles: leader, follower, or candidate. When the system starts, all agents are followers; a leader is elected through an election mechanism, and it is responsible for processing data and coordinating other agents. The leader is responsible for receiving new data update requests and appending these updates as log entries to its own log. Subsequently, the leader replicates these log entries to other followers. Only when the majority of nodes agree on the new log entry, the entry is committed and applied to the state machine. If the current leader fails, the followers will initiate a vote, and a new leader is elected by a majority vote to ensure the continuous availability of the system. In addition, Raft can automatically handle node failures and ensure that there is always an active leader in the system through re-election.
[0092] In summary, during relevant data collection, each agent is controlled based on a distributed consensus protocol to obtain relevant data from corresponding data sources and store the relevant data in a distributed message queue, meeting the requirements for processing a large amount of real-time data collection, ensuring the consistency of each agent during data processing and status updates, and avoiding data conflicts.
[0093] In addition, in some embodiments, Webhook can be used to replace the distributed message queue to implement data push. Specifically, Webhook is a lightweight data push method that allows the system to actively send data to a predetermined URL through an HTTP POST request when a specific event occurs, eliminating the need for a centralized polling mechanism.
[0094] Based on the above embodiments, in some embodiments, extracting target features from the relevant data of the target project includes:
[0095] S111: Perform data cleaning and normalization on the relevant data.
[0096] S112: Extract features from the normalized relevant data through the random forest algorithm.
[0097] S113: Determine the importance scores of each feature.
[0098] S114: Select target features with corresponding importance scores greater than a preset value from each feature.
[0099] Among them, the target features at least include project code complexity, requirement completion rate, test coverage rate, and development man-hour deviation rate.
[0100] To extract the target features from the relevant data, in this embodiment, it is necessary to perform data cleaning and normalization on the relevant data. Specifically, since the measurement units of different types of data (such as numerical values, categories, ratios) are different, through normalization (such as the Min-Max algorithm), they can be converted into dimensionless relative values, enabling fair comparison and calculation between different data types.
[0101] Furthermore, features are extracted from the normalized relevant data through the random forest algorithm. For example, features are screened from the preprocessed CI / CD process data (code quality report, requirement coverage, development cycle, test results, etc.) and historical project data (risk event records, project success or failure results). The random forest algorithm is an ensemble learning method that improves the accuracy and stability of the model by constructing multiple independently trained decision trees. Each tree is trained based on a bootstrap sampled subset of the data and randomly selected features, and the result is determined by majority voting (for classification) or averaging (for regression) during prediction.
[0102] In addition, a Convolutional Neural Network (CNN) can be used to replace the random forest for feature screening. CNN is good at processing multi-dimensional data and can automatically identify local information and patterns in the data. For example, CNN can identify the structure and patterns in the code quality report through the convolutional layer and automatically learn specific feature representations. CNN can directly extract high-dimensional features from the original data without complex manual feature selection steps, and is particularly suitable for detecting complex non-linear relationships and converting multi-dimensional data into more representative features.
[0103] Subsequently, the importance scores of each feature are determined, and target features with corresponding importance scores greater than a preset value are selected from each feature. For example, the top ten target features with importance scores greater than the preset value are screened according to the importance scores, including at least the project code complexity, requirement completion rate, test coverage rate, and development time deviation rate, and other target features may also be included, which are not limited in this embodiment.
[0104] In this embodiment, the preprocessed relevant data is deeply analyzed to identify the non-linear relationships and cross-influences between the data in each dimension. Through the feature extraction algorithm, target features are extracted from the original data to facilitate predicting the risk value based on the target features, improving the accuracy of risk prediction.
[0105] Figure 3 This is the training flowchart of the dynamic decision-making model provided by the embodiments of this application. On the basis of the above embodiments, in some embodiments, as Figure 3 shown, the construction process of the dynamic decision-making model includes:
[0106] S121: Obtain historical continuous integration / continuous delivery process data and historical project data.
[0107] S122: Preprocess the historical continuous integration / continuous delivery process data and historical project data.
[0108] S123: Extract the feature data from the preprocessed historical continuous integration / continuous delivery process data and historical project data.
[0109] S124: Calculate the importance indicators of each feature data based on a preset time window.
[0110] S125: Generate weighted feature data corresponding to each feature data according to the importance indicators and activation function of each feature data.
[0111] S126: Obtain the initial dynamic decision-making model and assign risk labels through the supervised learning method.
[0112] S127: Train the initial dynamic decision model using the weighted feature data until the performance of the initial dynamic decision model meets the requirements, so as to complete the construction of the dynamic decision model.
[0113] To construct a dynamic decision model, specifically obtain historical CI / CD process data, such as code quality reports, submission frequencies, requirement coverage, development cycles, test results, etc.; these data can reflect the current status and development trends of the project. It is also necessary to obtain historical project data, including risk event records and project success / failure results of previous projects, which are used to help identify potential risk patterns.
[0114] Further preprocess the historical CI / CD process data and historical project data, including data denoising, filling missing values, and converting them to a unified dimension through Min-Max normalization. Extract the feature data from the preprocessed historical continuous integration / continuous delivery process data and historical project data. The specific process is the same as the feature extraction process in the above embodiments and will not be elaborated here.
[0115] Subsequently, calculate the importance index of each feature data based on a preset time window, and generate the weighted feature data corresponding to each feature data according to the importance index of each feature data and the activation function. For example, divide the time series data (i.e., historical CI / CD process data and historical project data) into windows of fixed length (each ten days is a time window). Within each window, recalculate the importance index of each feature. Output the importance score of each feature. Convert the importance score into weighted feature data through an activation function (such as the Softmax function). The weighted feature data is dynamically updated as the window slides, reflecting the change trend of the feature in the time dimension.
[0116] Furthermore, obtain the initial dynamic decision model and assign risk labels through a supervised learning method. Train the initial dynamic decision model using the weighted feature data until the performance of the initial dynamic decision model meets the requirements, so as to complete the construction of the dynamic decision model. The following is a specific description: Arrange the weighted feature data in time steps to construct a time series input sequence. For example, each time step corresponds to the weighted feature data within a sliding window. The input layer of the LSTM network of the initial dynamic decision model is used to receive the time series feature vector (dimension = number of features), the hidden layer contains LSTM units to capture time series dependencies (such as 2 layers of LSTM, 64 units in each layer), and the output layer consists of a fully connected layer and a Sigmoid activation function, which is used to output a risk value between 0 and 1. The final output is expressed as y = Sigmoid(W⋅ht + b); where ht is the hidden state of the last layer of the LSTM.
[0117] In summary, the construction of the dynamic decision model is achieved.
[0118] Based on the above embodiments, in some embodiments, after obtaining the risk value of the target project, it further includes:
[0119] S16: When the risk value is not higher than the first threshold, generate a risk assessment log for the target project.
[0120] S17: When the risk value is higher than the first threshold and not higher than the second threshold, output a prompt message indicating that there is a risk in the target project.
[0121] S18: When the risk value is higher than the second threshold, stop the continuous integration / continuous delivery process of the target project and output a prompt message indicating that there is a serious risk in the target project.
[0122] Wherein, the first threshold is less than the second threshold.
[0123] In order to enable the staff to better understand the risk situation of the target project, after obtaining the risk value of the target project, the obtained risk value can also be compared with a preset threshold. Specifically, when the risk value is not higher than the first threshold, it is considered that the project risk is relatively low at this time, and only a risk assessment log for the target project needs to be generated without further processing. When the risk value is higher than the first threshold and not higher than the second threshold, it is considered that there is a certain risk in the project at this time, and a prompt message indicating that there is a risk in the target project is output to prompt the staff to pay attention in time. When the risk value is higher than the second threshold, it is considered that the project is at high risk, and the CI / CD process of the target project needs to be stopped, and a prompt message indicating that there is a serious risk in the target project is output to prompt the staff to process it as soon as possible. It can be understood that the first threshold is less than the second threshold. In this embodiment, the specific sizes of the first threshold and the second threshold are not limited, and it is only necessary to ensure that their value ranges are (0, 1).
[0124] In some embodiments, the preset threshold is the first threshold or the second threshold; that is, when the risk value of the target project is higher than the first threshold or the second threshold, it is considered that there is a certain risk in the target project at this time, and the risk needs to be reduced as much as possible during the project implementation.
[0125] Correspondingly, in order to better implement the target project and reduce the possible risks, based on the above embodiments, in some embodiments, according to the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm, and dynamic decision-making model, determine the execution plan of the target project, including:
[0126] S151: Perform Monte Carlo parameter sampling based on the target continuous integration / continuous delivery process data and historical project data to generate multiple initial execution plans for the target project.
[0127] S152: Perform data preprocessing and feature extraction on each initial execution plan to generate the feature data corresponding to each initial execution plan.
[0128] S153: Input the feature data corresponding to each initial execution plan into the dynamic decision-making model respectively to generate the risk values of each initial execution plan.
[0129] S154: Determine the candidate execution plans in each initial execution plan whose corresponding risk values are lower than the risk value of the target project.
[0130] S155: Obtain the decision dimensions and constraint conditions of the execution plan of the target project.
[0131] Among them, the decision dimensions include at least the risk reduction amplitude, the resource consumption amplitude, the delivery cycle compression rate, and the customer satisfaction; the constraint conditions include at least the increase in development cost, the delivery cycle, and the integrity of core functions.
[0132] S156: Determine the execution plan of the target project among each candidate execution plan according to the decision dimensions and constraint conditions.
[0133] Specifically, perform Monte Carlo parameter sampling according to the target CI / CD process data and historical project data, and perform multiple random combinations of possible intervention strategies, such as "adding 1 - 3 developers" and "refactoring 20 - 50% of the modules", to generate multiple initial execution plans for the target project. It should be noted that Monte Carlo parameter sampling is a numerical calculation method based on random sampling, which is used to estimate the parameters of complex models. By randomly extracting a large number of samples from the prior distribution of the parameters and using these samples to calculate the posterior distribution of the model or the expected value of the objective function, the estimated value of the parameters can be approximately obtained. This method is applicable to high-dimensional, non-linear, and difficult-to-analytically-solve models.
[0134] Subsequently, perform data preprocessing and feature extraction on each initial execution plan to generate the feature data corresponding to each initial execution plan. The specific process is the same as the feature extraction process of data preprocessing in the above embodiment and will not be elaborated here. Input the feature data corresponding to each initial execution plan into the dynamic decision-making model respectively to generate the risk values of each initial execution plan, and determine the candidate execution plans in each initial execution plan whose corresponding risk values are lower than the risk value of the target project. For example, for a project with a risk of delay, simulate the strategy of "adding 2 developers + removing 30% of non-core requirements", and the result shows that the delivery cycle is shortened by 40% and the risk value drops from 0.8 to 0.4.
[0135] Furthermore, obtain the decision-making dimensions and constraints of the implementation plan for the target project. It should be noted that the decision-making dimensions at least include the risk reduction amplitude, resource consumption amplitude, delivery cycle compression rate, and customer satisfaction; the constraints at least include the increase in development cost, delivery cycle, and core function integrity. Other decision-making dimensions and constraints may also be included, which are not limited in this embodiment.
[0136] Finally, based on the decision-making dimensions and constraints, determine the implementation plan for the target project among the alternative implementation plans. For example, among the alternative implementation plans, select the one that meets the requirements of maximizing the risk reduction amplitude, minimizing the resource consumption increase, maximizing the delivery cycle compression rate, minimizing the impact on customer satisfaction, with the increase in development cost ≤ 30%, the delivery cycle ≥ 70% of the historical average level, and the core function integrity being 100% as the best implementation plan for the target project, so as to ensure the complete implementation of the target project.
[0137] Based on the above embodiments, in some embodiments, after determining the implementation plan for the target project, it further includes:
[0138] S19: Determine the schedule, resource allocation information, and task breakdown information for the target project according to the implementation plan.
[0139] S20: Upload the schedule, resource allocation information, and task breakdown information to the server.
[0140] In order to enable the staff to implement the target project more conveniently and accurately, after determining the implementation plan for the target project, it is also necessary to determine the schedule, resource allocation information, and task breakdown information for the target project according to the implementation plan, and then upload the schedule, resource allocation information, and task breakdown information to the server, so that the staff can promote the smooth execution of the project based on this information. The following are the specific methods and steps:
[0141] First, based on the schedule, use project management tools (such as Jira, Trello, Microsoft Project, etc.) to track the progress of each task in real time to ensure that the project progresses as planned. Regularly review the achievement of key milestones and evaluate whether the project is advancing on schedule. If there are delays, analyze the reasons in a timely manner and take corrective measures. During the project execution process, unforeseen situations may occur, resulting in changes in the progress. Adjust the schedule flexibly according to the actual situation, and re-prioritize and set deadlines for tasks. If a certain stage is delayed, it may be necessary to reallocate resources to speed up the progress and ensure that the overall project is completed on time.
[0142] Secondly, establish a resource pool based on the resource allocation information to dynamically manage human, material, and financial resources. Ensure the effective utilization of resources, avoid resource idleness or overuse. According to the skills and expertise of team members, reasonably allocate tasks to ensure that each task is assigned to the most suitable person. Use project management tools for resource scheduling to avoid situations where multiple tasks compete for the same resource simultaneously. According to the priority and urgency of tasks, reasonably arrange the order of resource use to ensure that critical tasks receive priority support.
[0143] Finally, based on the task decomposition information, ensure that each task and subtask has a clear responsible person, and establish an accountability mechanism. The responsible person is responsible for the completion quality and progress of the task. Make the task assignment public through project management tools so that team members can clearly understand their respective responsibilities and task requirements. Set task priorities according to the importance and urgency of tasks to ensure that critical tasks are completed first. Identify the dependencies between tasks to ensure that subsequent tasks can only start after the preceding tasks are completed, and avoid task blockages.
[0144] In summary, during the project implementation process, comprehensively utilize the schedule, resource allocation, and task decomposition, and use project management tools to integrate the schedule, resource allocation, and task decomposition information to achieve comprehensive management. Through the visualization function of the tool, team members can clearly see the overall progress of the project, resource usage, and task assignment to ensure that tasks are completed on time.
[0145] In the above embodiments, the project risk determination method is described in detail. The present application also provides corresponding embodiments of the project risk determination device.
[0146] Figure 4 It is a schematic diagram of a project risk determination device provided by an embodiment of the present application. As Figure 4 shown, the device includes:
[0147] A first acquisition module 10, configured to acquire relevant data of a target project from multiple data sources through multiple agents; wherein, each agent corresponds to each data source one by one; the relevant data at least includes a code quality report, a requirements coverage rate, a development cycle, and a test result.
[0148] An extraction module 11, configured to extract target features from the relevant data of the target project.
[0149] A prediction module 12, configured to input the target features into a pre-constructed dynamic decision model to output a risk value of the target project; wherein, the dynamic decision model is a long short-term memory network model generated by feature extraction and supervised learning using historical project data.
[0150] A judgment module 13, configured to judge whether the risk value of the target project is greater than a preset threshold; if so, trigger the second acquisition module.
[0151] A second acquisition module 14, configured to acquire target continuous integration / continuous delivery process data and historical project data corresponding to the target project.
[0152] A determination module 15, configured to determine an execution plan for the target project according to the target continuous integration / continuous delivery process data, historical project data, Monte Carlo parameter sampling algorithm, and dynamic decision-making model.
[0153] Since the embodiments of the device part correspond to the embodiments of the method part, for the embodiments of the device part, please refer to the description of the embodiments of the method part, which will not be elaborated here.
[0154] Figure 5 This is a structural diagram of a project risk determination device provided by an embodiment of the present application. As Figure 5 shown, the project risk determination device includes:
[0155] A memory 20, configured to store a computer program;
[0156] A processor 21, configured to implement the steps of the project risk determination method mentioned in the above embodiments when executing the computer program.
[0157] The project risk determination device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer, etc.
[0158] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the central processing unit (CPU); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an artificial intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.
[0159] The memory 20 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 20 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201. After the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the project risk determination method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the project risk determination method.
[0160] In some embodiments, the project risk determination device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0161] Those skilled in the art can understand that Figure 5 the structure shown in
[0162] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps recorded in the above method embodiments are implemented.
[0163] It can be understood that if the method in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage media include: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0164] The above has introduced in detail a project risk determination method, device, equipment, and medium provided by the present application. The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.
[0165] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the existence of additional identical elements in the process, method, article, or device comprising the element.
Claims
1. A method for determining project risks, characterized in that, Including: Obtaining relevant data of a target project from multiple data sources through multiple agents; wherein, each of the agents corresponds to one of the data sources; the relevant data at least includes a code quality report, requirement coverage, development cycle, and test results; Extracting target features from the relevant data of the target project; Inputting the target features into a pre-constructed dynamic decision model to output a risk value of the target project; wherein, the dynamic decision model is a long short-term memory network model generated by feature extraction and supervised learning using historical project data; Judging whether the risk value of the target project is greater than a preset threshold; If so, obtaining target continuous integration / continuous delivery process data and historical project data corresponding to the target project; Determining an execution plan for the target project according to the target continuous integration / continuous delivery process data, the historical project data, the Monte Carlo parameter sampling algorithm, and the dynamic decision model.
2. The project risk determination method according to claim 1, wherein Obtaining relevant data of a target project from multiple data sources through multiple agents includes: Establishing a distributed message queue and setting a distributed consensus protocol among the agents; Based on the distributed consensus protocol, controlling each of the agents to obtain the relevant data from the corresponding data source and storing the relevant data in the distributed message queue.
3. The project risk determination method according to claim 2, wherein Extracting target features from the relevant data of the target project includes: Performing data cleaning and normalization processing on the relevant data; Extracting features from the normalized relevant data through a random forest algorithm; Determining the importance scores of the features; Selecting the target features corresponding to the importance scores greater than a preset value from the features; Wherein, the target features at least include project code complexity, requirement completion rate, test coverage rate, and development man-hour deviation rate.
4. The project risk determination method according to claim 1, characterized in that The construction process of the dynamic decision model includes: Obtaining historical continuous integration / continuous delivery process data and historical project data; Performing preprocessing on the historical continuous integration / continuous delivery process data and the historical project data; Extracting feature data from the preprocessed historical continuous integration / continuous delivery process data and the historical project data; Calculating importance indicators of the feature data based on a preset time window; Generating weighted feature data corresponding to the feature data according to the importance indicators and activation functions of the feature data; Obtaining an initial dynamic decision model and assigning risk labels through a supervised learning method; Training the initial dynamic decision model using the weighted feature data until the performance of the initial dynamic decision model meets the requirements to complete the construction of the dynamic decision model.
5. The project risk determination method according to claim 1, wherein After obtaining the risk value of the target project, it further includes: When the risk value is not higher than the first threshold, generating a risk assessment log of the target project; When the risk value is higher than the first threshold and not higher than the second threshold, outputting a prompt message indicating that the target project has risks; When the risk value is higher than the second threshold, stop the continuous integration / continuous delivery process of the target project and output a prompt message indicating that there are serious risks in the target project; Among them, the first threshold is less than the second threshold.
6. The project risk determination method according to claim 5, characterized in that The preset threshold is the first threshold or the second threshold; Correspondingly, according to the target continuous integration / continuous delivery process data, the historical project data, the Monte Carlo parameter sampling algorithm, and the dynamic decision-making model, determine the execution plan of the target project, including: Perform Monte Carlo parameter sampling according to the target continuous integration / continuous delivery process data and the historical project data to generate multiple initial execution plans for the target project; Perform data preprocessing and feature extraction on each of the initial execution plans to generate feature data corresponding to each of the initial execution plans; Input the feature data corresponding to each of the initial execution plans into the dynamic decision-making model respectively to generate the risk value of each of the initial execution plans; Determine candidate execution plans in each of the initial execution plans whose corresponding risk values are lower than the risk value of the target project; Obtain the decision dimensions and constraint conditions of the execution plan of the target project; among them, the decision dimensions at least include the risk reduction amplitude, the resource consumption amplitude, the delivery cycle compression rate, and the customer satisfaction; the constraint conditions at least include the increase in development cost, the delivery cycle, and the integrity of core functions; According to the decision dimensions and the constraint conditions, determine the execution plan of the target project among each of the candidate execution plans.
7. The project risk determination method according to any one of claims 1 to 6, characterized in that After determining the execution plan of the target project, it further includes: Determine the schedule, resource allocation information, and task decomposition information of the target project according to the execution plan; Upload the schedule, the resource allocation information, and the task decomposition information to the server.
8. An apparatus for determining project risks, characterized in that, It includes: The first acquisition module is used to acquire relevant data of the target project in multiple data sources through multiple agents; among them, each agent corresponds to each data source one by one; the relevant data at least includes a code quality report, a requirements coverage rate, a development cycle, and a test result; The extraction module is used to extract the target features in the relevant data of the target project; The prediction module is used to input the target features into a pre-constructed dynamic decision-making model to output the risk value of the target project; among them, the dynamic decision-making model is a long short-term memory network model generated by feature extraction and supervised learning using historical project data; The judgment module is used to judge whether the risk value of the target project is greater than the preset threshold; if so, trigger the second acquisition module; The second acquisition module is used to acquire the target continuous integration / continuous delivery process data and historical project data corresponding to the target project; The determination module is used to determine the execution plan of the target project according to the target continuous integration / continuous delivery process data, the historical project data, the Monte Carlo parameter sampling algorithm, and the dynamic decision-making model.
9. A project risk determination device, characterized in that, It includes: A memory for storing a computer program; A processor, configured to implement the steps of the project risk determination method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the project risk determination method according to any one of claims 1 to 7 are implemented.