Software development demand prediction method and electronic equipment

Through the prediction model combining knowledge graphs and semi-supervised learning of the convolutional Boltzmann machine module, the problem of unreasonable demand in software development is solved, accurate development demand prediction is achieved, and project quality and efficiency are improved.

CN119127127APending Publication Date: 2024-12-13CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411352977.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In software development, due to the differences in developer skills and experience, the development needs formulated are often unreasonable, resulting in frequent project delays, cost overruns and quality problems.

Method used

Using a software development requirement prediction method, the target development requirement is predicted by obtaining project information of the software to be developed and inputting a pre-trained development requirement prediction model, using the objective function trained with labels and without labels, to predict the target development requirement, combined with Knowledge graphs, flexible graph convolutional layers, convolutional Boltzmann machine modules are used to perform semi-supervised learning to improve prediction accuracy.

Benefits of technology

Accurately predicting the target development needs of the software to be developed, avoiding developers from formulating unreasonable needs based on experience or subjective judgment, improving data utilization and model prediction accuracy and generalization capabilities, and reducing project risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127127A_ABST
    Figure CN119127127A_ABST
Patent Text Reader

Abstract

The invention provides a software development demand prediction method and electronic equipment, and relates to the technical field of software development, and the method comprises the following steps: obtaining project information of to-be-developed software; inputting the project information into a pre-trained development demand prediction model, and predicting to obtain a target development demand of the to-be-developed software; the development demand prediction model is obtained by taking a target function as a loss function and training on the basis of sample data with labels and sample data without labels. According to the method, the target development demand of the to-be-developed software can be accurately predicted, the situation that developers make unreasonable demands according to experience or subjective judgment is avoided, in addition, the sample data with the labels and the sample data without the labels are used for learning, and the prediction precision and generalization ability of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of software development, and in particular to a method for predicting software development requirements and electronic equipment. Background Art

[0002] With the rapid development of information technology, software development has become a key component of the core competitiveness of enterprises. ALM (Application Lifecycle Management) is a comprehensive management method covering the entire software development and operation and maintenance process, covering various stages such as requirements analysis, design and development, testing and verification, and deployment and operation and maintenance. Although ALM has improved development efficiency and quality to a certain extent, due to differences in the skill levels and experience of developers, the development requirements formulated are often unreasonable or unnecessary, which in turn leads to project delays, cost overruns and frequent quality problems.

[0003] Therefore, a new method for predicting software development requirements is urgently needed. Summary of the invention

[0004] In view of the above problems, the embodiments of the present application provide a method and electronic device for predicting software development requirements, so as to overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect of the present application, a method for predicting software development requirements is provided, the method comprising:

[0006] Obtain project information of the software to be developed;

[0007] Inputting the project information into a pre-trained development demand prediction model to predict the target development demand of the software to be developed;

[0008] The development demand prediction model is based on an objective function as a loss function and is trained based on labeled sample data and unlabeled sample data, wherein the objective function is jointly determined by a first objective sub-function determined based on the labeled sample data and a second objective sub-function determined based on the labeled sample data and the unlabeled sample data, and the labeled sample data includes project information and development demand associated with the project information.

[0009] Optionally, determining the second target sub-function based on the labeled sample data and the unlabeled sample data includes:

[0010] Combining sample data in pairs to obtain multiple sample data groups;

[0011] Calculating the similarity weights of the plurality of sample data groups respectively, and obtaining the feature vectors of the two sample data in each sample data group;

[0012] Determine the Laplacian matrices of the plurality of sample data groups according to the calculated similarity weights of the plurality of sample data groups, determine the constraint conditions according to the Laplacian matrices, and determine the spatial distance between the two sample data in each of the sample data groups according to the respective eigenvectors of the two sample data in each of the sample data groups;

[0013] The second target sub-function is determined according to the spatial distance between two sample data in each sample data group and the constraint condition.

[0014] Optionally, determining the spatial distance between two sample data in each sample data group according to respective feature vectors of two sample data in each sample data group comprises:

[0015] According to the respective feature vectors of two sample data in any sample data group, respectively determine a first distance and a second distance between the two sample data in the sample data group, wherein the first distance is the distance between the two sample data in the sample data group in the initial space, and the second distance is the distance between the two sample data in the sample data group in the high-dimensional space;

[0016] Determining the second target sub-function according to the spatial distance between two sample data in each sample data group and the constraint condition comprises:

[0017] performing regularization processing on the first distance and the second distance of two sample data in each sample data group respectively to obtain a regularization processing result;

[0018] The second objective sub-function is determined according to the regularization processing result and the constraint condition.

[0019] Optionally, determining the Laplacian matrices of the plurality of sample data groups according to the calculated similarity weights of the plurality of sample data groups comprises:

[0020] constructing an adjacency matrix of the plurality of sample data groups according to the similarity weights of the plurality of sample data groups;

[0021] The Laplacian matrix is ​​calculated based on the adjacency matrices of the multiple sample data groups.

[0022] Optionally, before inputting the project information into a pre-trained development demand prediction model, the prediction method further includes:

[0023] Obtaining a pre-built knowledge graph, wherein the knowledge graph includes project information associated with development requirements and project information not associated with development requirements;

[0024] The project information associated with the development demand is used as sample data with labels, and the project information not associated with the development demand is used as sample data without labels, and a preset model is trained to obtain a prediction result;

[0025] Determining an objective function value based on the prediction result and the objective function;

[0026] When the objective function value meets the preset prediction accuracy requirement, the training is terminated, and the current preset model is used as the development demand prediction model;

[0027] When the objective function value does not meet the prediction accuracy requirement, the model parameters of the preset model are adjusted, and the iterative training of the adjusted preset model is continued.

[0028] Optionally, the project information in the knowledge graph is used as a model input, and the preset model is trained to obtain a prediction result, including:

[0029] Input any item information in the knowledge graph into the word embedding layer of the preset model to obtain a first-level feature vector of the item information;

[0030] Inputting the first-level feature vector into the flexible graph convolution layer of the preset model to obtain a second-level feature vector of the project information;

[0031] Input the second-level feature vector into the convolutional Boltzmann machine module of the preset model to obtain a third-level feature vector of the project information, and use the third-level feature vector as the prediction result;

[0032] The vector dimensions of the first-level feature vector, the second-level feature vector and the third-level feature vector increase gradually.

[0033] Optionally, the convolutional Boltzmann machine module includes a one-dimensional convolutional layer and a restricted Boltzmann machine, and the step of inputting the second-level feature vector into the convolutional Boltzmann machine module of the preset model to obtain a third-level feature vector of the project information includes:

[0034] Inputting the second-level feature vector into the one-dimensional convolution layer, performing a one-dimensional convolution operation on the second-level feature vector to obtain high-dimensional features of the second-level feature vector;

[0035] The high-dimensional features of the second-level feature vector are input into the restricted Boltzmann machine to obtain the third-level feature vector.

[0036] Optionally, the flexible graph convolution layer includes a graph convolution module and a multi-head attention mechanism module, and the step of inputting the first-level feature vector into the flexible graph convolution layer of the preset model to obtain a second-level feature vector of the project information includes:

[0037] Inputting the first-level feature vector into the graph convolution module, and calculating the cosine similarity of the first-level feature vector;

[0038] Setting an adjacency matrix of the graph convolution module according to the cosine similarity of the first-level feature vectors;

[0039] Input the adjacency matrix into the multi-head attention mechanism module to update the adjacency matrix

[0040] Constructing a symmetric normalized Laplace matrix of the first-level eigenvectors according to the updated adjacency matrix;

[0041] Performing eigendecomposition on the symmetric normalized Laplace matrix to obtain the second-level eigenvector.

[0042] Optionally, after obtaining the second-level feature vector, the prediction method further includes:

[0043] Inputting the second-level feature vector into the pooling layer of the preset model, and performing a pooling operation on the second-level feature vector;

[0044] Based on the result of the pooling operation on the second-level feature vector, a linear transformation is performed to obtain a linear transformation value of the second-level feature vector.

[0045] In a second aspect of the present application, a system for predicting software development requirements is provided, the system comprising:

[0046] An acquisition module, used for acquiring project information of the software to be developed, wherein the project information is used for representing a first text description of the software to be developed;

[0047] A prediction module, used for inputting the project information into a pre-trained development demand prediction model to predict the target development demand of the software to be developed, where the development demand is used to characterize the second text description of the software to be developed;

[0048] The development demand prediction model is based on an objective function as a loss function and is trained based on labeled sample data and unlabeled sample data, wherein the objective function is jointly determined by a first objective sub-function determined based on the labeled sample data and a second objective sub-function determined based on the labeled sample data and the unlabeled sample data, and the labeled sample data includes project information and development demand associated with the project information.

[0049] Optionally, the system further comprises:

[0050] A combination submodule, used for combining sample data in pairs to obtain multiple sample data groups;

[0051] A calculation and acquisition submodule, used to respectively calculate the similarity weights of the plurality of sample data groups, and to obtain the feature vectors of the two sample data in each of the sample data groups;

[0052] A first determination submodule, configured to determine the Laplacian matrices of the plurality of sample data groups according to the calculated similarity weights of the plurality of sample data groups;

[0053] A second determination submodule, used to determine a constraint condition according to the Laplace matrix;

[0054] A third determination submodule, configured to determine a spatial distance between two sample data in each sample data group according to respective feature vectors of the two sample data in each sample data group;

[0055] The fourth determination submodule is used to determine the second target subfunction according to the spatial distance between two sample data in each sample data group and the constraint condition.

[0056] Optionally, the determining of the spatial distance between the two sample data in each sample data group according to the respective feature vectors of the two sample data in each sample data group, the third determining submodule comprises:

[0057] A first determining subunit is used to determine a first distance and a second distance between two sample data in any sample data group according to respective feature vectors of two sample data in the sample data group, wherein the first distance is the distance between the two sample data in the sample data group in an initial space, and the second distance is the distance between the two sample data in the sample data group in a high-dimensional space;

[0058] The second target sub-function is determined according to the spatial distance between two sample data in each sample data group and the constraint condition, and the system further comprises:

[0059] A regularization subunit, used for performing regularization processing on the first distance and the second distance of two sample data in each sample data group respectively to obtain a regularization processing result;

[0060] The second determination subunit is used to determine the second objective subfunction according to the regularization processing result and the constraint condition.

[0061] Optionally, the Laplacian matrices of the plurality of sample data groups are determined according to the calculated similarity weights of the plurality of sample data groups, and the first determining submodule includes:

[0062] A first construction subunit is used to construct an adjacency matrix of the plurality of sample data groups according to the similarity weights of the plurality of sample data groups;

[0063] The first calculation subunit is used to calculate the Laplacian matrix according to the adjacency matrices of the multiple sample data groups.

[0064] Optionally, the system further comprises:

[0065] An acquisition submodule, used to acquire a pre-built knowledge graph, wherein the knowledge graph includes project information associated with development requirements and project information not associated with development requirements;

[0066] A model training submodule is used to use the project information associated with the development demand as sample data with labels, and the project information not associated with the development demand as sample data without labels, to perform model training on a preset model to obtain a prediction result;

[0067] A fifth determination submodule, configured to determine an objective function value based on the prediction result and the objective function;

[0068] When the objective function value meets the preset prediction accuracy requirement, the training is terminated, and the current preset model is used as the development demand prediction model;

[0069] When the objective function value does not meet the prediction accuracy requirement, the model parameters of the preset model are adjusted, and the iterative training of the adjusted preset model is continued.

[0070] Optionally, the project information in the knowledge graph is used as a model input, and the preset model is trained to obtain a prediction result. The model training submodule includes:

[0071] A first input subunit, used to input any item information in the knowledge graph into the word embedding layer of the preset model to obtain a first-level feature vector of the item information;

[0072] A second input subunit is used to input the first-level feature vector into the flexible graph convolution layer of the preset model to obtain a second-level feature vector of the project information;

[0073] The third input subunit is used to input the second-level feature vector into the convolutional Boltzmann machine module of the preset model to obtain the third-level feature vector of the project information, and use the third-level feature vector as the prediction result; the vector dimensions of the first-level feature vector, the second-level feature vector and the third-level feature vector increase step by step.

[0074] Optionally, the convolutional Boltzmann machine module includes a one-dimensional convolutional layer and a restricted Boltzmann machine, the second-level feature vector is input into the convolutional Boltzmann machine module of the preset model to obtain a third-level feature vector of the project information, and the third input subunit includes:

[0075] a fourth input subunit, configured to input the second-level feature vector into the one-dimensional convolution layer, perform a one-dimensional convolution operation on the second-level feature vector, and obtain high-dimensional features of the second-level feature vector;

[0076] The fifth input subunit is used to input the high-dimensional features of the second-level feature vector into the restricted Boltzmann machine to obtain the third-level feature vector.

[0077] Optionally, the flexible graph convolution layer includes a graph convolution module and a multi-head attention mechanism module, the first-level feature vector is input into the flexible graph convolution layer of the preset model to obtain a second-level feature vector of the project information, and the second input subunit includes:

[0078] A second calculation subunit, configured to input the first-level feature vector into the graph convolution module, and calculate the cosine similarity of the first-level feature vector;

[0079] A setting subunit, configured to set an adjacency matrix of the graph convolution module according to the cosine similarity of the first-level feature vectors;

[0080] An updating subunit, used to input the adjacency matrix into the multi-head attention mechanism module to update the adjacency matrix

[0081] A second construction subunit is used to construct a symmetric normalized Laplace matrix of the first-level eigenvector according to the updated adjacency matrix;

[0082] The eigendecomposition subunit is used to perform eigendecomposition on the symmetric normalized Laplace matrix to obtain the second-level eigenvector.

[0083] Optionally, the system further comprises:

[0084] A pooling submodule, used for inputting the second-level feature vector into the pooling layer of the preset model and performing a pooling operation on the second-level feature vector;

[0085] The linear transformation submodule is used to perform a linear transformation based on the result of the pooling operation on the second-level feature vector to obtain a linear transformation value of the second-level feature vector.

[0086] In a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method for predicting software development requirements as described in the first aspect of the present application.

[0087] Beneficial effects of this application:

[0088] The present application provides a method for predicting software development requirements, the method comprising: obtaining project information of software to be developed; inputting the project information into a pre-trained development requirement prediction model to predict the target development requirements of the software to be developed; the development requirement prediction model is based on an objective function as a loss function, and is trained based on labeled sample data and unlabeled sample data, wherein the objective function is jointly determined by a first objective sub-function determined based on labeled sample data and a second objective sub-function determined based on labeled sample data and unlabeled sample data, and the labeled sample data includes project information and development requirements associated with the project information. The present application can accurately predict the target development requirements of the software to be developed by training the development requirement prediction model, avoiding the situation where developers make unreasonable requirements based on experience or subjective judgment. In addition, when training the development requirement prediction model, not only labeled sample data but also unlabeled sample data are used for learning, which not only improves the utilization rate of data, but also improves the prediction accuracy and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0090] Figure 1It is a schematic diagram of the steps of a method for predicting software development requirements provided in an embodiment of the present application;

[0091] Figure 2 It is a flowchart of the training steps for developing a demand prediction model provided by an embodiment of the present application;

[0092] Figure 3 It is a structural schematic diagram of a development demand prediction model based on a knowledge-enhanced semi-supervised graph adaptive network provided in an embodiment of the present application;

[0093] Figure 4 A software development demand prediction system provided by an embodiment of the present application;

[0094] Figure 5 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0095] The exemplary embodiments of the present application will be described in more detail below in conjunction with the accompanying drawings in the embodiments of the present application. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to enable the scope of the present application to be fully communicated to those skilled in the art.

[0096] Based on the above problems, the first aspect of the embodiment of the present application provides a method for predicting software development requirements, such as Figure 1 As shown, the method includes:

[0097] Step S101, obtaining project information of the software to be developed.

[0098] In some examples, project information of the software to be developed is obtained, and the project information is used to characterize a first text description of the software to be developed. In actual applications, the project information may include multiple dimensions, such as project name, version number, development time, technology stack, business rules, user roles, performance indicators and security requirements, etc. In addition, project requirements are used to characterize a second text description of the software to be developed. In actual applications, the first text description can be used to construct the second text description, that is, the project requirements of the software project to be developed can be constructed through at least one of the above project information.

[0099] Step S102: inputting the project information into a pre-trained development demand prediction model to predict the target development demand of the software to be developed.

[0100] In the present application, a development demand prediction model is based on an objective function as a loss function and is trained based on labeled sample data and unlabeled sample data, wherein the objective function is determined by a first objective sub-function determined based on the labeled sample data and a second objective sub-function determined based on the labeled sample data and the unlabeled sample data, and the labeled sample data includes project information and development demand associated with the project information.

[0101] In some examples, the acquired project information is input into a pre-trained development demand prediction model, and the development demand prediction model predicts the target development demand of the software to be developed based on the input project information. In practical applications, the target development demand is represented in the form of text description.

[0102] In one embodiment, there is provided a Figure 2 The training steps for developing a demand forecasting model are shown, including:

[0103] Step S1, obtaining a pre-built knowledge graph, the knowledge graph including project information associated with development requirements and project information not associated with development requirements;

[0104] First, obtain the pre-built knowledge graph. In practical applications, natural language processing technology and information extraction technology can be used to extract key information from text data such as software development documents and detailed design documents. This information includes project entities such as project name, version number, development time, technology stack, business rules, user roles, performance indicators, security requirements, and development requirements. Among them, project information such as project name, version number, development time, technology stack, business rules, user roles, performance indicators, and security requirements are respectively associated with development requirements. Therefore, based on project information and development requirements associated with project information, project entity pairs are constructed, and these project entity pairs are combined to obtain a knowledge graph. It should be noted that in some special cases, there may be project information that is not associated with development requirements. Therefore, in the knowledge graph, there is project information that is not associated with development requirements.

[0105] Step S2, using the project information associated with the development requirements as sample data with labels, and using the project information not associated with the development requirements as sample data without labels, to train the preset model and obtain prediction results;

[0106] The project information associated with development requirements and the project information not associated with development requirements in the knowledge graph are used as sample data to train the preset model. In practical applications, the project information associated with development requirements is used as sample data with labels, and the project information not associated with development requirements is used as sample data without labels. During the model training process, the project information is input into the preset model, and the prediction results of the development requirements are generated based on the input project information. During the model training process, since the sample data includes sample data with labels and sample data without labels, the prediction results will have two forms, namely the prediction results of sample data with labels: these results correspond to the development requirement labels in the samples, and are used to evaluate the prediction ability of the model when there are clear requirement labels. Prediction results of sample data without labels: these results are applicable to samples without clear development requirement labels.

[0107] Step S3, determining the objective function value based on the prediction result and the objective function;

[0108] Since the sample data includes labeled sample data and unlabeled sample data, the prediction results will have two forms of expression, namely the prediction results of labeled sample data: these results correspond to the development demand labels in the samples, and are used to evaluate the prediction ability of the model when there are clear demand labels. Prediction results of unlabeled sample data: These results are applicable to samples without clear development demand labels. Since some data lack clear development demand labels and cannot be directly used for supervised learning, this application introduces a semi-supervised learning method. Semi-supervised learning not only uses labeled data to optimize the model, but also effectively uses unlabeled data to improve the generalization ability of the model. The semi-supervised cycle loss function is the objective function, which is used to process labeled and unlabeled data at the same time. In the case of labels, the traditional supervised loss is calculated to evaluate the gap between the prediction results and the actual labels; in the case of no labels, the prediction of unlabeled samples is self-supervised by the model, that is, the model generates pseudo-labels, and uses these pseudo-labels to calculate the loss of predictions and pseudo-labels, thereby guiding model learning. It should be noted that the objective functions in this application are all semi-supervised cycle loss functions.

[0109] Based on the above learning process, a semi-supervised reincarnation loss function value, i.e., the objective function value, is calculated. This value combines the errors of labeled data and unlabeled data, reflecting the overall prediction ability of the model. Through this loss value, the performance of the model when processing labeled and unlabeled samples can be measured, providing a basis for subsequent model optimization.

[0110] By calculating the semi-supervised cyclic loss function, the model can not only utilize labeled data, but also learn from unlabeled data, thereby improving the prediction accuracy of the model. Especially in the absence of clear labels, it can still provide valuable development demand predictions.

[0111] Step S4, when the objective function value meets the preset prediction accuracy requirement, the training is terminated and the current preset model is used as the development demand prediction model;

[0112] Step S5, when the objective function value does not meet the prediction accuracy requirement, adjust the model parameters of the preset model, and continue to iterate the training of the adjusted preset model.

[0113] In step S3, the semi-supervised reincarnation loss function value has been calculated, which combines the errors of labeled data and unlabeled data. At this time, this loss value is used to measure the current performance of the model, and the goal is to optimize the model parameters by reducing the loss. Use optimization algorithms (such as gradient descent, Adam optimizer, etc.) to adjust the model parameters to reduce the loss function value. The specific optimization process includes:

[0114] Gradient calculation: Based on the value of the loss function, calculate the gradient of the loss relative to each model parameter, that is, how the parameters need to be adjusted in the direction of reducing the loss.

[0115] Parameter update: According to the calculated gradient value, update the model parameters such as weights and biases to enable the model to better fit labeled and unlabeled data.

[0116] By continuously iteratively updating model parameters, the model gradually improves its ability to predict development needs, especially its generalization ability when processing labeled and unlabeled data.

[0117] After the optimization process is completed, if the semi-supervised reincarnation loss function value meets the prediction accuracy requirements, the training is terminated, and the current preset model is used as the development demand prediction model. At this time, the model has been trained and parameter optimized for multiple entity samples, and can generate accurate development demand forecasts based on the input project information (such as project name, version number, technology stack, etc.). This model can provide powerful demand forecasting support based on project information during the software development process, improve the efficiency of project planning and demand analysis; if the semi-supervised reincarnation loss function value does not meet the prediction accuracy requirements, the model parameters of the preset model are adjusted, and the adjusted preset model continues to be iteratively trained. It should be noted that once the development demand prediction model mentioned in this application is trained, it can be reused many times.

[0118] In one embodiment, the project information in the knowledge graph is used as a model input, and a preset model is trained to obtain a prediction result, including:

[0119] Input any item information in the knowledge graph into the word embedding layer of the preset model to obtain the first-level feature vector of the item information;

[0120] Input the first-level feature vector into the flexible graph convolution layer of the preset model to obtain the second-level feature vector of the project information;

[0121] The second-level feature vector is input into the convolutional Boltzmann machine module of the preset model to obtain the third-level feature vector of the project information, and the third-level feature vector is used as the prediction result;

[0122] The vector dimensions of the first-level eigenvector, the second-level eigenvector, and the third-level eigenvector increase gradually.

[0123] In some examples, first, the project information in the knowledge graph (such as project name, version number, technology stack, etc.) is input into the word embedding layer of the model. The word embedding layer maps text data into a low-dimensional vector representation, namely the first-level feature vector, so that different types of text data can be represented in the same vector space. This vector captures the semantic characteristics of the project information.

[0124] Furthermore, the first-level feature vector output by the word embedding layer is used as input and further passed to the flexible graph convolution layer of the model. The flexible graph convolution layer captures the complex relationship and structural information between project information by performing convolution operations on the nodes and their relationships in the knowledge graph. This process generates a second-level feature vector, which is more expressive than the first-level feature vector and contains the topological information between project information.

[0125] Furthermore, the second-level feature vector is then input into the convolutional Boltzmann machine module of the model, which further processes the input vector, extracts deeper features, and generates a third-level feature vector. This vector integrates the information of all previous feature layers and has a high expressive power.

[0126] Finally, the third-level feature vector is used as the final prediction result, that is, the model's prediction of the output development demand corresponding to the input project information.

[0127] In this embodiment, the dimension of the feature vector increases step by step. That is, as the feature extraction level deepens, from the first-level feature vector to the second-level feature vector, and then to the third-level feature vector, its vector dimension and feature representation ability are continuously enhanced. This design enables the model to gradually capture subtle features in project information and more complex graph relationships, thereby improving the accuracy of development demand prediction.

[0128] In a preferred embodiment, the flexible graph convolution layer includes a graph convolution module and a multi-head attention mechanism module, and the first-level feature vector is input into the flexible graph convolution layer of the preset model to obtain the second-level feature vector of the project information, including:

[0129] Input the first-level feature vector into the graph convolution module and calculate the cosine similarity of the first-level feature vector;

[0130] According to the cosine similarity of the first-level feature vectors, the adjacency matrix of the graph convolution module is set;

[0131] Feed the adjacency matrix into the multi-head attention mechanism module to update the adjacency matrix

[0132] According to the updated adjacency matrix, construct the symmetric normalized Laplacian matrix of the first-level eigenvectors;

[0133] Perform eigendecomposition on the symmetric normalized Laplacian matrix and obtain the second-level eigenvectors.

[0134] In some examples, the first-level feature vector of the project information is first input into the graph convolution module, which is used to capture the relationship between the project information. In the graph convolution module, the cosine similarity of the first feature vector of the project information in the knowledge graph is first calculated and set as the adjacency matrix of the graph convolution.

[0135] Furthermore, the adjacency matrix is ​​input into the multi-head attention mechanism module. The multi-head attention mechanism can focus on different feature dimensions through different attention heads, update and optimize the adjacency matrix, so that the model can capture more complex relationships.

[0136] Further, based on the updated adjacency matrix, a symmetric normalized Laplace matrix of the first eigenvector of the project information is constructed. The symmetric normalized Laplace matrix helps to ensure the smoothness of the eigenvector while retaining important structural information, wherein the symmetric normalized Laplace matrix is ​​shown in the following formula (1):

[0137]

[0138] in, represents the symmetric normalized Laplace matrix, D~ represents the degree matrix of the first eigenvector, and is composed of the adjacency matrix A ij Calculated; L represents the regularized Laplace matrix.

[0139] Furthermore, the symmetric normalized Laplacian matrix is ​​subjected to eigendecomposition, and the result of the eigendecomposition is the second-level eigenvector, which contains the deep feature representation of the input eigenvector by the graph convolution module and the multi-head attention mechanism module. Compared with the first-level eigenvector, the second-level eigenvector has increasingly enhanced vector dimensions and feature representation capabilities. The symmetric normalized Laplacian matrix after eigendecomposition is shown in the following formula (2):

[0140]

[0141] in, is a column vector belonging to the node vector space, that is, is the eigenvalue matrix of the regularized Laplace matrix L. The regularized Laplace matrix L can be obtained by the adjacency matrix A of the first-level eigenvectors ij Find: Among them, I N Represents the identity matrix. is the eigenvalue matrix of the regularized Laplace matrix L.

[0142] The obtained second-level eigenvector Z i , as shown in the following formula (3):

[0143]

[0144] Among them, X i represents the input features of the i-th layer graph convolution module, where X i ∈R n×k , n represents the number of nodes, and k represents the dimension of the point-wise space vector. represents the filter, h represents the filter function, W i ∈R k×k Represents a linear transformation matrix.

[0145] The process of adaptively updating the adjacency matrix of the multi-head attention module can be described as follows:

[0146]

[0147] Among them, A represents the cosine similarity matrix, A (t) represents the cosine similarity matrix of the t-th position learned by the multi-head attention module, W i Q ∈R d×d and W i K ∈R d×d They represent the linear transformation matrices of the attention mechanism, Q and K represent the feature vectors of the previous layer, and T represents the transpose.

[0148] In a preferred embodiment, after obtaining the second-level feature vector, the method further includes:

[0149] Input the second-level feature vector into the pooling layer of the preset model, and perform a pooling operation on the second-level feature vector;

[0150] Based on the result of the pooling operation on the second-level feature vector, a linear transformation is performed to obtain a linear transformation value of the second-level feature vector.

[0151] In some examples, after obtaining the second-level feature vector, the second-level feature vector needs to be input into the pooling layer, and the pooling operation is performed through the pooling layer. In practical applications, the pooling layer uses N parallel pooling layers, and the pooling process is shown in the following formula (5):

[0152]

[0153] Among them, Z pool represents the second eigenvector after pooling, W represents the linear transformation matrix of the pooling process, It represents the second eigenvector before pooling, and bias represents the bias of the pooling process.

[0154] The process of linear transformation is shown in the following formula (6):

[0155] Z comb =W comb Z out +b comb (6)

[0156] Among them, Z comb Represents the output value of the linear transformation, Z out =[Z (1) ;…;Z (N) ] represents the output of N parallel pooling layers; b comb is the bias vector of the linear transformation.

[0157] In one embodiment, the convolutional Boltzmann machine module includes a one-dimensional convolutional layer and a restricted Boltzmann machine, and the second-level feature vector is input into the convolutional Boltzmann machine module of the preset model to obtain the third-level feature vector of the project information, including:

[0158] The second-level feature vector is input into the one-dimensional convolution layer, and a one-dimensional convolution operation is performed on the second-level feature vector to obtain the high-dimensional features of the second-level feature vector;

[0159] The high-dimensional features of the second-level feature vector are input into the restricted Boltzmann machine to obtain the third-level feature vector.

[0160] In some examples, the convolutional Boltzmann machine includes a one-dimensional convolutional layer and a restricted Boltzmann machine.

[0161] First, the second-level feature vector from the flexible graph convolution layer is input into the one-dimensional convolution layer. In the one-dimensional convolution layer, the convolution kernel performs a convolution operation on the second-level feature vector, extracts local features and increases the feature dimension, generating high-dimensional features of the second-level feature vector. This operation can not only capture more complex feature information, but also improve the expressiveness of the features, so that they can provide deeper semantic information in subsequent steps.

[0162] The process of extracting high-dimensional features by a one-dimensional convolutional layer is shown in the following formula (7):

[0163] ζ a =ReLU(Φ*(ReLU(g θ *Z comb ))) (7)

[0164] Among them, a Represents the high-dimensional features of the second-level feature vector; * represents the standard convolution operation, g θ *Z comb represents the one-dimensional convolution process, g θ represents the convolution kernel; Φ represents the parameters of the convolution kernel, and ReLU represents the activation function.

[0165] Furthermore, after the one-dimensional convolution operation, the generated high-dimensional features are input into the restricted Boltzmann machine, and the high-dimensional features are iteratively updated multiple times to finally generate the third-level feature vector. s () represents the operation of the high-dimensional feature vector of the second-level feature vector, then the feature vector ζ a , the output of the restricted Boltzmann machine can be expressed as h s (ζ a ), which is also the output of the entire model.

[0166] In one embodiment, the semi-supervised reincarnation loss function, i.e., the objective function, is determined by the following steps:

[0167] Obtain labeled sample data and unlabeled sample data respectively;

[0168] Determine a first target sub-function according to the sample data with labels;

[0169] Determine a second target subfunction according to the sample data with labels and the sample data without labels;

[0170] According to the first objective sub-function and the second objective sub-function, a semi-supervised round-trip loss function, i.e., an objective function, is determined.

[0171] In some examples, sample data with labels and sample data without labels are obtained respectively. The labeled data includes clearly marked development requirements, while the unlabeled data does not have clear development requirement labels. A first objective sub-function is defined based on the labeled sample data. A second objective sub-function is defined based on the labeled sample data and the unlabeled sample data. The second objective sub-function aims to make full use of the unlabeled data through semi-supervised learning.

[0172] Furthermore, the first objective sub-function and the second objective sub-function are combined to finally determine the semi-supervised cycle loss function. This loss function not only utilizes the label information in supervised learning, but also enhances the learning ability of the model through unlabeled data. The semi-supervised cycle loss function is shown in the following formula (8):

[0173]

[0174] in, represents the first objective subfunction; represents the second objective subfunction; f(x i ) represents the sample data x i The output value after the entire preset model, f(x j ) represents the sample data x j The output value after the entire preset model, y represents the target value, w ij represents the similarity weight between samples, L represents the number of sample data with labels, and U represents the number of sample data without labels.

[0175] In one embodiment, determining the second target sub-function based on the labeled sample data and the unlabeled sample data includes:

[0176] Combining sample data in pairs to obtain multiple sample data groups;

[0177] Calculate the similarity weights of the multiple sample data groups respectively, and obtain the feature vectors of the two sample data in each sample data group;

[0178] Determine the Laplace matrices of the multiple sample data groups according to the calculated similarity weights of the multiple sample data groups, determine the constraint conditions according to the Laplace matrices, and determine the spatial distance between the two sample data in each sample data group according to the respective eigenvectors of the two sample data in each sample data group;

[0179] The second target sub-function is determined according to the spatial distance between two sample data in each sample data group and the constraint conditions.

[0180] In some examples, a method for optimizing the second objective subfunction is also provided, specifically: for all sample data, including sample data with labels and sample data without labels, multiple sample data groups are constructed. Each sample data group is composed of any two sample data. By comparing the features of the sample data, the similarity weights of the two samples in each sample data group are calculated. The similarity weight can reflect the similarity between the two samples based on indicators such as the distance of the feature vectors and the cosine similarity.

[0181] Furthermore, based on all the calculated similarity weights, a Laplace matrix is ​​constructed. The Laplace matrix is ​​a symmetric matrix that describes the connection relationship between nodes, i.e., sample data, in a graph structure. The larger the similarity weight, the stronger the connection between two samples in the sample data group. The construction of the Laplace matrix helps the model capture the local structure between data groups.

[0182] Furthermore, based on the calculated Laplacian matrix of the sample data group, corresponding constraints are set. These constraints are intended to ensure that similar samples remain close in the feature space, and heterogeneous samples should maintain a certain distance in the feature space. The constraints can be expressed by the following formula (9):

[0183] st S ij ≥0, rank(L s )=L+Uc (9)

[0184] Among them, st represents the constraint condition, s ij =w ij , represents the similarity weight between two samples, rank represents the rank of the adjacency matrix, and c represents the number of connected components of the connected graph formed by the adjacency matrix.

[0185] Further, for two samples in any sample data group, their respective feature vectors are extracted. In this embodiment, the feature vector is a high-dimensional vector generated during the previous model training process. The feature vector is used to calculate the spatial distance between two samples in any sample data group. Finally, based on the calculated spatial distances in all sample data groups and the previously set constraints, the optimized second objective subfunction is determined. The optimized second objective subfunction ensures that the model can effectively use labeled and unlabeled data for learning by minimizing the distance between similar samples, maximizing the distance between heterogeneous samples, and following the Laplace matrix and constraints. Therefore, the second objective subfunction can also be expressed by the following formula (10):

[0186]

[0187] Among them, ||x i -x j|| 2 Represents sample data x i And sample data x j The spatial distance between Represents the coefficient.

[0188] In one embodiment, determining the Laplacian matrices of the plurality of sample data groups according to the calculated similarity weights of the plurality of sample data groups includes:

[0189] Constructing an adjacency matrix of the plurality of sample data groups according to similarity weights of the plurality of sample data groups;

[0190] The Laplace matrix is ​​calculated based on the adjacency matrices of the multiple sample data groups.

[0191] In some examples, after calculating the similarity weights of all sample data groups, an adjacency matrix is ​​constructed based on the similarity weights of all sample data groups, and then the Laplacian matrices of these sample data groups are calculated based on the adjacency matrix.

[0192] In one embodiment, determining the spatial distance between two sample data in each sample data group according to the respective feature vectors of the two sample data in each sample data group includes:

[0193] According to the respective eigenvectors of two sample data in any sample data group, respectively determine the first distance and the second distance between the two sample data in the sample data group, the first distance being the distance between the two sample data in the sample data group in the initial space, and the second distance being the distance between the two sample data in the sample data group in the high-dimensional space;

[0194] According to the spatial distance between two sample data in each sample data group and the constraint conditions, a second objective sub-function is determined, including:

[0195] Regularizing the first distance and the second distance of two sample data in each sample data group respectively to obtain a regularized processing result;

[0196] The second objective sub-function is determined according to the regularization processing result and the constraint conditions.

[0197] In some examples, the process of determining the spatial distance between two sample data in a sample data group and constructing a second objective subfunction is further refined. Specifically, for two sample data in any sample data group, a first distance and a second distance between the two sample data in the sample data group are respectively determined, wherein the first distance is the distance between the two sample data in the sample data group in an initial space. In practical applications, the initial space may be an original input space or a low-dimensional embedding space, and the second distance is the distance between the two sample data in the sample data group in a high-dimensional space.

[0198] The first distance can be expressed by the following formula (11):

[0199] d ij =||x i -x j || 2 (11)

[0200] Among them, d ij Represents sample data x i And sample data x j The first distance between.

[0201] The second distance can be expressed by the following formula (12):

[0202] p ij =||p i -p j || 2 (12)

[0203] Among them, p ij Represents sample data x i And sample data x j The second distance between i Represents sample data x i The high-dimensional feature vector, p j Represents sample data x j high-dimensional feature vector.

[0204] Furthermore, the first distance and the second distance are respectively regularized. The purpose of regularization is to ensure the comparability between distance metrics of different scales and reduce the impact of extreme distance values ​​on model training. The regularization method can be normalization, compressing the distance value into a specific range, or balancing the contribution of different distances by weighting.

[0205] The process of regularizing the first distance is shown in the following formula (13):

[0206]

[0207] Among them, di =[d i1 ,d i2 ,...,d in ] represents the sample data x i The set of first distances with other sample data, Represents sample data x j The set of first distances with other sample data, p i =[p i1 ,p i2 ,...,p in ] represents the sample data x i The set of second distances between the high-dimensional feature vector of and other sample data’s high-dimensional feature vectors, Represents sample data x j The set of second distances between the high-dimensional feature vector and the high-dimensional feature vectors of other sample data.

[0208] Finally, combining the regularization processing results and the constraints, another expression of the second objective subfunction is obtained, as shown in the following formula (14):

[0209]

[0210] Combining the above formula (8) and formula (14), we can get the final semi-supervised reincarnation loss function (15):

[0211]

[0212] Among them, L semicirc represents the semi-supervised reincarnation loss function.

[0213] In one embodiment, there is provided a Figure 3 The structural diagram of the development demand prediction model based on the knowledge-enhanced semi-supervised graph adaptation network shown in the figure includes: word embedding layer, flexible graph convolution layer, convolutional Boltzmann machine module, and after the convolutional Boltzmann machine module, the output result is passed to the semi-supervised reincarnation loss function. Among them, the flexible graph convolution layer contains multiple parallel layers, each of which contains a graph convolution module and a multi-head attention module; the convolutional Boltzmann machine module includes a one-dimensional convolution layer and a restricted Boltzmann machine.

[0214] The specific model training process is as follows: Through knowledge engineering technology, key entities such as project name, version number, development time, technology stack, business rules, user roles, performance indicators, and security requirements are extracted from text data such as software development documents and detailed design documents, and these entities are used as model inputs, and development requirements are used as model outputs. The relationship between these entities is expressed by constructing a knowledge graph, covering the entire process of software development. The knowledge graph is mapped to a high-dimensional space through a word embedding layer to facilitate subsequent calculations. The flexible graph convolution layer is used to capture the graph topology features in the knowledge graph and learn the representation of entities and their relationships. Then, the convolutional Boltzmann machine processes the high-dimensional data to mine potential features and enhance model performance.

[0215] Since the labels of some development demand entities are unclear, this embodiment adopts a semi-supervised learning strategy, that is, a semi-supervised round-trip loss function is introduced. The objective function is defined by jointly defining the labeled and unlabeled sample data to alleviate the problem of insufficient labels and improve the generalization ability of the model. In addition, this function further improves the accuracy of the model in evaluating development demand by increasing the feature distance of development demand samples of different categories and decreasing the feature distance of samples of the same category.

[0216] The present application provides a method for predicting software development requirements, the method comprising: obtaining project information of the software to be developed; inputting the project information into a pre-trained development requirement prediction model to predict the target development requirements of the software to be developed; the development requirement prediction model is based on the objective function as the loss function, and is trained based on labeled sample data and unlabeled sample data, wherein the objective function is jointly determined by a first objective sub-function determined based on the labeled sample data, and a second objective sub-function determined based on the labeled sample data and the unlabeled sample data, and the labeled sample data includes project information and development requirements associated with the project information. The present application can accurately predict the target development requirements of the software to be developed by training the development requirement prediction model, avoiding the situation where developers make unreasonable requirements based on experience or subjective judgment. In addition, when training the development requirement prediction model, a semi-supervised cyclic loss function is introduced, so that the model can not only use labeled sample data, but also use unlabeled sample data for learning, which not only improves the utilization rate of data, but also improves the prediction accuracy and generalization ability of the model.

[0217] This application can accurately predict the target development requirements of the software to be developed by training the development demand prediction model, avoiding the situation where developers make unreasonable requirements based on experience or subjective judgment. In addition, when training the development demand prediction model, a semi-supervised recurrent loss function is introduced, so that the model can not only use labeled sample data, but also use unlabeled sample data for learning, which not only improves the utilization rate of data, but also improves the prediction accuracy and generalization ability of the model.

[0218] Based on the same inventive concept, the second aspect of the present application provides a prediction system for software development requirements, such as Figure 4 As shown, the system includes an acquisition module 201 and a prediction module 202:

[0219] Among them, the system obtains the project information of the software to be developed through the acquisition module 201 and inputs the project information into the pre-trained development demand prediction model through the prediction module 202, and predicts the target development demand of the software to be developed; wherein, in the training process of the development demand prediction model, the first objective sub-function is determined based on the labeled sample data, the second objective sub-function is determined based on the labeled sample data and the unlabeled sample data, and the objective function of the development demand prediction model is determined according to the first objective sub-function and the second objective sub-function, and the labeled sample data includes the project information and the development demand associated with the project information.

[0220] Optionally, the system of the present application further includes: a combining submodule, a calculating and acquiring submodule, a first determining submodule, a second determining submodule, a third determining submodule and a fourth determining submodule;

[0221] Among them, the system combines sample data in pairs through a combination submodule to obtain multiple sample data groups; calculates the similarity weights of each of the multiple sample data groups through a calculation and acquisition submodule, and obtains the characteristic vectors of each of the two sample data in each of the sample data groups; determines the Laplacian matrix of the multiple sample data groups according to the similarity weights of the multiple sample data groups calculated through a first determination submodule; determines the constraint conditions according to the Laplacian matrix through a second determination submodule; determines the spatial distance between the two sample data in each of the sample data groups according to the characteristic vectors of the two sample data in each of the sample data groups through a third determination submodule; determines the second target subfunction according to the spatial distance between the two sample data in each of the sample data groups and the constraint conditions through a fourth determination submodule.

[0222] Optionally, the third determination submodule of the system of the present application further includes: a first determination subunit;

[0223] The first determining subunit can determine the first distance and the second distance between the two sample data in any sample data group according to the respective feature vectors of the two sample data in any sample data group, the first distance being the distance between the two sample data in the sample data group in the initial space, and the second distance being the distance between the two sample data in the sample data group in the high-dimensional space;

[0224] In addition, the system of the present application further includes: a regularization subunit, a second determination subunit;

[0225] Among them, the regularization subunit performs regularization processing on the first distance and the second distance of two sample data in each sample data group respectively to obtain a regularization processing result; and the second determination subunit determines the second target subfunction according to the regularization processing result and the constraint condition.

[0226] Optionally, the first determination submodule of the system of the present application includes: a first construction subunit and a first calculation subunit;

[0227] The system constructs adjacency matrices of multiple sample data groups according to similarity weights of the multiple sample data groups through a first construction subunit; and calculates a Laplace matrix according to the adjacency matrices of the multiple sample data groups through a first calculation subunit.

[0228] Optionally, the system of the present application further includes: a second acquisition submodule, a model training submodule, and a fifth determination submodule;

[0229] The system obtains a pre-built knowledge graph through the second acquisition submodule, and the knowledge graph includes project information associated with development requirements and project information not associated with development requirements; the system uses the project information associated with development requirements as sample data with labels and the project information not associated with development requirements as sample data without labels to train the preset model and obtain the prediction result; and the system determines the objective function value based on the prediction result and the objective function through the fifth determination submodule;

[0230] Wherein, when the objective function value meets the preset prediction accuracy requirement, the training is terminated and the current preset model is used as the development demand prediction model;

[0231] When the objective function value does not meet the prediction accuracy requirement, the model parameters of the preset model are adjusted, and the iterative training of the adjusted preset model is continued.

[0232] Optionally, the model training submodule of the system of the present application includes: a first input subunit, a second input subunit, and a third input subunit;

[0233] Among them, the system inputs any item information in the knowledge graph into the word embedding layer of the preset model through the first input subunit to obtain the first-level feature vector of the item information; inputs the first-level feature vector into the flexible graph convolution layer of the preset model through the second input subunit to obtain the second-level feature vector of the item information; and inputs the second-level feature vector into the convolutional Boltzmann machine module of the preset model through the third input subunit to obtain the third-level feature vector of the item information, and uses the third-level feature vector as the prediction result; the vector dimensions of the first-level feature vector, the second-level feature vector and the third-level feature vector increase step by step.

[0234] Optionally, the third input subunit of the system of the present application includes: a fourth input subunit and a fifth input subunit;

[0235] Among them, the system inputs the second-level feature vector into the one-dimensional convolution layer through the fourth input subunit, performs a one-dimensional convolution operation on the second-level feature vector, and obtains the high-dimensional features of the second-level feature vector; and inputs the high-dimensional features of the second-level feature vector into the restricted Boltzmann machine through the fifth input subunit to obtain the third-level feature vector.

[0236] Optionally, the second input subunit of the system of the present application includes: a second calculation subunit, a setting subunit, an updating subunit, and a feature decomposition subunit;

[0237] Among them, the system inputs the first-level feature vector into the graph convolution module through the second calculation subunit to calculate the cosine similarity of the first-level feature vector; sets the adjacency matrix of the graph convolution module according to the cosine similarity of the first-level feature vector through the setting subunit; inputs the adjacency matrix into the multi-head attention mechanism module through the updating subunit to update the adjacency matrix; and constructs the symmetric normalized Laplace matrix of the first-level feature vector according to the updated adjacency matrix through the second construction subunit; and performs eigendecomposition on the symmetric normalized Laplace matrix through the eigendecomposition subunit to obtain the second-level eigenvector.

[0238] Optionally, the system of the present application further includes: a pooling submodule, a linear transformation submodule;

[0239] Among them, the system inputs the second-level feature vector into the pooling layer of the preset model through the pooling submodule, and performs a pooling operation on the second-level feature vector; and performs a linear transformation based on the result of the pooling operation on the second-level feature vector through the linear transformation submodule to obtain the linear transformation value of the second-level feature vector.

[0240] Based on the same inventive concept, the third aspect of the present application provides a Figure 5The electronic device 100 shown includes a memory 110, a processor 120, and a computer program stored in the memory 110. The processor 120 executes the computer program to implement the method for predicting software development requirements as described in the first aspect of the present application.

[0241] Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other.

[0242] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0243] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0244] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0245] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0246] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0247] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0248] The above is a detailed introduction to a method for predicting software development needs and an electronic device. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for predicting software development requirements, characterized in that: The method comprises: Obtain project information of the software to be developed; Inputting the project information into a pre-trained development demand prediction model to predict the target development demand of the software to be developed; The development demand prediction model is based on an objective function as a loss function and is trained based on labeled sample data and unlabeled sample data, wherein the objective function is jointly determined by a first objective sub-function determined based on the labeled sample data and a second objective sub-function determined based on the labeled sample data and the unlabeled sample data, and the labeled sample data includes project information and development demand associated with the project information.

2. The method for predicting software development requirements according to claim 1, characterized in that: Determining the second target sub-function based on the labeled sample data and the unlabeled sample data includes: Combining sample data in pairs to obtain multiple sample data groups; Calculating the similarity weights of the plurality of sample data groups respectively, and obtaining the feature vectors of the two sample data in each sample data group; Determine the Laplacian matrices of the plurality of sample data groups according to the calculated similarity weights of the plurality of sample data groups, determine the constraint conditions according to the Laplacian matrices, and determine the spatial distance between the two sample data in each of the sample data groups according to the respective eigenvectors of the two sample data in each of the sample data groups; The second target sub-function is determined according to the spatial distance between two sample data in each sample data group and the constraint condition.

3. The method for predicting software development requirements according to claim 2, characterized in that: Determining the spatial distance between the two sample data in each sample data group according to the respective feature vectors of the two sample data in each sample data group includes: According to the respective feature vectors of two sample data in any sample data group, respectively determine a first distance and a second distance between the two sample data in the sample data group, wherein the first distance is the distance between the two sample data in the sample data group in the initial space, and the second distance is the distance between the two sample data in the sample data group in the high-dimensional space; Determining the second target sub-function according to the spatial distance between two sample data in each sample data group and the constraint condition comprises: performing regularization processing on the first distance and the second distance of two sample data in each sample data group respectively to obtain a regularization processing result; The second objective sub-function is determined according to the regularization processing result and the constraint condition.

4. The method for predicting software development requirements according to claim 2, characterized in that: Determining the Laplacian matrices of the plurality of sample data groups according to the calculated similarity weights of the plurality of sample data groups comprises: constructing an adjacency matrix of the plurality of sample data groups according to the similarity weights of the plurality of sample data groups; The Laplacian matrix is ​​calculated based on the adjacency matrices of the multiple sample data groups.

5. The method for predicting software development requirements according to any one of claims 1 to 4, characterized in that: Before inputting the project information into the pre-trained development demand forecasting model, the forecasting method further includes: Obtaining a pre-built knowledge graph, wherein the knowledge graph includes project information associated with development requirements and project information not associated with development requirements; The project information associated with the development demand is used as sample data with labels, and the project information not associated with the development demand is used as sample data without labels, and a preset model is trained to obtain a prediction result; Determining an objective function value based on the prediction result and the objective function; When the objective function value meets the preset prediction accuracy requirement, the training is terminated, and the current preset model is used as the development demand prediction model; When the objective function value does not meet the prediction accuracy requirement, the model parameters of the preset model are adjusted, and the iterative training of the adjusted preset model is continued.

6. The method for predicting software development requirements according to claim 5, characterized in that: The project information in the knowledge graph is used as a model input, and the preset model is trained to obtain a prediction result, including: Input any item information in the knowledge graph into the word embedding layer of the preset model to obtain a first-level feature vector of the item information; Inputting the first-level feature vector into the flexible graph convolution layer of the preset model to obtain a second-level feature vector of the project information; The second-level feature vector is input into the convolutional Boltzmann machine module of the preset model to obtain the third-level feature vector of the project information, and the third-level feature vector is used as the prediction result; the vector dimensions of the first-level feature vector, the second-level feature vector and the third-level feature vector increase step by step.

7. The method for predicting software development requirements according to claim 6, characterized in that: The convolutional Boltzmann machine module includes a one-dimensional convolutional layer and a restricted Boltzmann machine, and the second-level feature vector is input into the convolutional Boltzmann machine module of the preset model to obtain the third-level feature vector of the project information, including: Inputting the second-level feature vector into the one-dimensional convolution layer, performing a one-dimensional convolution operation on the second-level feature vector to obtain high-dimensional features of the second-level feature vector; The high-dimensional features of the second-level feature vector are input into the restricted Boltzmann machine to obtain the third-level feature vector.

8. The method for predicting software development requirements according to claim 6, characterized in that: The flexible graph convolution layer includes a graph convolution module and a multi-head attention mechanism module, and the first-level feature vector is input into the flexible graph convolution layer of the preset model to obtain the second-level feature vector of the project information, including: Inputting the first-level feature vector into the graph convolution module, and calculating the cosine similarity of the first-level feature vector; Setting an adjacency matrix of the graph convolution module according to the cosine similarity of the first-level feature vectors; Inputting the adjacency matrix into the multi-head attention mechanism module to update the adjacency matrix; Constructing a symmetric normalized Laplace matrix of the first-level eigenvectors according to the updated adjacency matrix; Performing eigendecomposition on the symmetric normalized Laplace matrix to obtain the second-level eigenvector.

9. The method for predicting software development requirements according to claim 8, characterized in that: After obtaining the second-level feature vector, the prediction method further includes: Inputting the second-level feature vector into the pooling layer of the preset model, and performing a pooling operation on the second-level feature vector; Based on the result of the pooling operation on the second-level feature vector, a linear transformation is performed to obtain a linear transformation value of the second-level feature vector.

10. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method for predicting software development requirements according to any one of claims 1 to 9.