Software workload evaluation method and device based on COSMIC and electronic equipment

Through the method based on the long short-term memory multi-head self-attention network, the software workload assessment is automatically processed, which solves the problem of manual dependence and lack of models in the COSMIC measurement method in the existing technology, and achieves efficient and accurate software workload assessment.

CN118796266AActive Publication Date: 2024-10-18CHINA MOBILE GROUP DESIGN INST +1

Patent Information

Application Number
CN202410102190.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2024-10-18
Estimated Expiration
2044-01-24

AI Technical Summary

Technical Problem

Existing software workload assessment technology relies on manual labor, is inefficient and cannot guarantee impartiality. It lacks available models based on the COSMIC measurement method and is difficult to adapt to current software assessment needs.

Method used

Using a method based on long-short-term memory multi-head self-attention network, the requirements document, COSMIC function point split table and previous data are processed independently, and the software workload is predicted by fusing the processing results of the three parts, and the class balance loss function is used to avoid data The problem of quantity imbalance.

Benefits of technology

It realizes automated software workload assessment, improves assessment efficiency and accuracy, enables more in-depth analysis of software assessment details, adapts to multi-view and multi-perspective analysis of different materials, and avoids the disadvantages of black-box learning of pure deep learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796266A_ABST
    Figure CN118796266A_ABST
Patent Text Reader

Abstract

The invention provides a software workload evaluation method and device based on COSMIC and electronic equipment, and relates to the technical field of code analysis, different models are used for respective analysis from three aspects of line data, preamble data and demand documents according to different characteristics of the three aspects, and the three aspects do not interfere with each other and supplement each other. Specifically, the method consists of three parts, namely demand document comparison, preamble and preamble data comparison and current line data analysis, and comprises the following steps of: respectively processing each independent part through a corresponding long short-term memory multi-head self-attention network by utilizing a combined reconstruction model of a long short-term memory network model; and the single-row workload is obtained by combining the result of each independent part. According to the method, the industry blank of a software workload evaluation scheme based on the AI model and the COSMIC rule is filled up, details of software evaluation work can be analyzed more deeply, and the defect that black box learning is performed by purely using a basic deep learning model is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of code analysis, and in particular to a method, device and electronic device for evaluating software workload based on COSMIC. Background Art

[0002] With the development of artificial intelligence, various fields have put forward the demand for automation and efficiency. At present, there are several shortcomings in the existing software workload assessment technology system:

[0003] 1. Under the current circumstances, since a large amount of evaluation work still relies entirely on manual work, the iterative progress of technology is limited by the improvement based on manual evaluation rules. In addition, relying entirely on manual evaluation work is time-consuming and labor-intensive, and fairness cannot be guaranteed.

[0004] 2. Currently, software workload assessment methods based on artificial intelligence algorithm models are rarely used. Most of them use existing general models, which are difficult to adapt to the characteristics and needs of current software assessment.

[0005] 3. The few existing software evaluation models are mainly based on the COCOMO measurement method, and there is a lack of available models for the COSMIC measurement method, which is inconsistent with the widespread application of the COSMIC measurement method in recent years. Summary of the invention

[0006] In view of the above problems, the present disclosure is proposed. The present disclosure provides a method, device and electronic device for evaluating software workload based on COSMIC, and correspondingly provides a computer-readable storage medium.

[0007] According to one aspect of the present disclosure, a COSMIC-based software workload evaluation method is provided, the evaluation method comprising:

[0008] Perform data processing on the requirement document and COSMIC function point splitting table respectively;

[0009] Based on the data processing results, different long short-term memory multi-head self-attention networks are used to independently process the demand document part, the bank data part, and the previous text data part;

[0010] The independent processing results of the three parts are integrated to output the prediction results of the software workload.

[0011] In addition, according to the COSMIC-based software workload evaluation method of one aspect of the present disclosure, the process of processing the data portion of the bank includes:

[0012] Vectorize the data processing results of the COSMIC function point splitting table and concatenate them to obtain sentence vectors;

[0013] The sentence vector is input into a trained first long short-term memory multi-head self-attention network and a first independent processing result is output, where the first independent processing result is used to evaluate the software workload according to the text content of this row of data.

[0014] In addition, according to the COSMIC-based software workload assessment method according to one aspect of the present disclosure, the process of processing the requirement document part includes:

[0015] Pre-set segment list thresholds;

[0016] Compare the number of segments in the requirement document with the segment list threshold;

[0017] After completing the segmented text list based on the comparison difference, each segment of the text in the segmented text list is vectorized to obtain a segment vector;

[0018] After concatenating the segment vector and the sentence vector, the segment vector is input into a trained second long short-term memory multi-head self-attention network and a second independent processing result is output, where the second independent processing result is used to evaluate the software workload in combination with the data information of the requirement document.

[0019] In addition, according to the COSMIC-based software workload evaluation method of one aspect of the present disclosure, the processing of the above data portion includes:

[0020] Pre-set the previous text range threshold;

[0021] After reading the previous text data according to the previous text range threshold, the previous text data list is vectorized row by row as a unit, and concatenated with the sentence vector;

[0022] The splicing result is combined with the relative distance information between the previous data and the current row data, and input into the trained third long short-term memory multi-head self-attention network to output a third independent processing result. The third independent processing result is used to evaluate the software workload by combining the information of the previous data and the relative row distance between the current row data and the previous data as index information.

[0023] In addition, according to the COSMIC-based software workload evaluation method according to one aspect of the present disclosure, the first long short-term memory multi-head self-attention network and the second long short-term memory multi-head self-attention network are both bidirectional long short-term memory multi-head self-attention networks; the third long short-term memory multi-head self-attention network is a time-aware bidirectional long short-term memory multi-head self-attention network.

[0024] In addition, according to the COSMIC-based software workload assessment method according to one aspect of the present disclosure, the output software workload prediction result includes:

[0025] The independent processing results of the three parts are fused and normalized, and then processed by the class balance loss function to obtain the prediction result.

[0026] In addition, according to the COSMIC-based software workload assessment method of one aspect of the present disclosure, the data processing of the requirement document and the COSMIC function point splitting table respectively includes:

[0027] Segmenting the body of the requirements document after text preprocessing; and,

[0028] Four columns of data of the COSMIC function point splitting table are obtained, wherein the four columns of data include: function process, sub-process description, data movement type, and data attribute; text preprocessing is performed on the function process, sub-process description, and data attribute, and the data movement type is processed by one-hot encoding; and the processed four columns of text are packaged into a list.

[0029] According to another aspect of the present disclosure, a COSMIC-based software workload evaluation device is provided, the evaluation device comprising:

[0030] The original data processing module is used to process the requirements document and the COSMIC function point splitting table respectively;

[0031] The sub-model processing module is used to independently process the requirement document part, the bank data part, and the previous text data part based on the data processing results using different long short-term memory multi-head self-attention networks;

[0032] The final result output module is used to integrate the independent processing results of the three parts and output the prediction results of the software workload.

[0033] In addition, according to the COSMIC-based software workload evaluation device in one aspect of the present disclosure, the sub-model processing module includes a data independent processing unit of the same bank, and the data independent processing unit of the same bank includes:

[0034] This line of sentence vector generation component is used to vectorize the data processing results of the COSMIC function point splitting table and concatenate them to obtain sentence vectors;

[0035] The first sub-model processing component is used to input the sentence vector into a trained first long short-term memory multi-head self-attention network and output a first independent processing result, wherein the first independent processing result is used to evaluate the software workload according to the text content of this line of data.

[0036] In addition, according to the COSMIC-based software workload assessment device in one aspect of the present disclosure, the sub-model processing module includes a requirement document independent processing unit, and the requirement document independent processing unit includes:

[0037] The paragraph quantity threshold setting component is used to pre-set the segment list threshold;

[0038] The paragraph quantity comparison component is used to compare the number of segments of the requirement document with the segment list threshold;

[0039] A text segment vector generation component is used to vectorize each segment of the text in the segment text list to obtain a segment vector after completing the segment text list based on the comparison difference;

[0040] The second sub-model processing component is used to concatenate the segment vector and the sentence vector, input them into a trained second long short-term memory multi-head self-attention network and output a second independent processing result, wherein the second independent processing result is used to evaluate the software workload in combination with the data information of the requirement document.

[0041] In addition, according to the COSMIC-based software workload evaluation device in one aspect of the present disclosure, the sub-model processing module includes a preamble data independent processing unit, and the preamble data independent processing unit includes:

[0042] A preceding range definition component is used to pre-set a preceding range threshold;

[0043] A previous text row vector generating component is used to read the previous text data according to the previous text range threshold, and then vectorize the previous text data list in units of rows to obtain a row vector;

[0044] The third sub-model processing component is used to concatenate the row vector and the sentence vector, combine the relative distance information between the previous text data and the current row data, input them into the trained third long short-term memory multi-head self-attention network and output a third independent processing result, and the third independent processing result is used to evaluate the software workload by combining the information of the previous text data and the relative row distance between the current row data and the previous text data as index information.

[0045] In addition, according to one aspect of the COSMIC-based software workload assessment device of the present disclosure, the first long short-term memory multi-head self-attention network and the second long short-term memory multi-head self-attention network are both configured as bidirectional long short-term memory multi-head self-attention networks; the third long short-term memory multi-head self-attention network is configured as a time-aware bidirectional long short-term memory multi-head self-attention network.

[0046] In addition, according to the COSMIC-based software workload evaluation device of one aspect of the present disclosure, the final result output module is configured to fuse and normalize the independent processing results of the three parts, and obtain the prediction result after processing by the class balance loss function.

[0047] In addition, according to the COSMIC-based software workload evaluation device in one aspect of the present disclosure, the original data processing module includes:

[0048] A requirement document preprocessing unit, used for segmenting the body of the requirement document after text preprocessing; and

[0049] The COSMIC function point splitting table preprocessing unit is used to obtain four columns of data of the COSMIC function point splitting table, wherein the four columns of data include: function process, sub-process description, data movement type, and data attribute; perform text preprocessing on the function process, sub-process description, and data attribute, and perform one-hot encoding on the data movement type; and list-pack the processed four columns of text.

[0050] According to another aspect of the present disclosure, an electronic device is provided, including: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions so that the electronic device executes the COSMIC-based software workload assessment method as described above.

[0051] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing computer-readable instructions. When the computer-readable instructions are executed by a processor, the processor executes the COSMIC-based software workload assessment method as described above.

[0052] As described in detail below, the software workload evaluation method, device, electronic device and computer-readable storage medium based on COSMIC according to the embodiment of the present disclosure mainly optimize and reconstruct the traditional supervised learning model, and use different models to analyze the different characteristics of the three aspects from the aspects of the current line data, the previous text data and the requirement document, so as to not interfere with each other and complement each other. Specifically, it consists of three parts: the comparison of the requirement document, the comparison of the previous text pre-data and the analysis of the current current line data. The model is reconstructed by combining the long short-term memory network model, and each individual part is processed by the corresponding long short-term memory multi-head self-attention network. Then, the single-line workload is obtained by combining the results of each individual part, and then the workload of each group of data to be evaluated can be obtained. Furthermore, before the final result is output, it is proposed that a class balance loss function can be used, which avoids the problem of model performance loss caused by the imbalance in the number of data in each category to a certain extent. The present disclosure mainly solves the problems in the prior art of artificial intelligence model work from scratch and from simple to deep, and at the same time changes the current situation of lack of algorithm models for COSMIC measurement methods.

[0053] The present disclosure fills the industry gap in software workload assessment solutions based on AI models and COSMIC rules. Compared with the supervised learning model based on COCOMO rules, the present disclosure can analyze the details of software assessment work more deeply, especially for different materials, multi-view and multi-perspective analysis and deduction can be performed to obtain software workload assessment results, avoiding the drawbacks of simply using basic deep learning models for black box learning.

[0054] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0056] Figure 1 It is a schematic diagram illustrating the main process of the COSMIC-based software workload assessment method according to an embodiment of the present disclosure.

[0057] Figure 2 It is a flowchart illustrating a method for independently processing bank data according to an embodiment of the present disclosure.

[0058] Figure 3 It is a flowchart illustrating a method for independently processing a requirement document according to an embodiment of the present disclosure.

[0059] Figure 4 It is a flowchart illustrating a method for independently processing the foregoing data according to an embodiment of the present disclosure.

[0060] Figure 5 is a functional block diagram illustrating a COSMIC-based software workload evaluation device according to an embodiment of the present disclosure.

[0061] Figure 6 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure.

[0062] Figure 7 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0064] First, refer to Figures 1 to 4 The following describes a COSMIC-based software workload evaluation method according to an embodiment of the present disclosure. Figure 1 It is a schematic diagram illustrating the main process of the COSMIC-based software workload assessment method according to an embodiment of the present disclosure. Figure 2 It is a flowchart further illustrating the method for independently processing bank data according to an embodiment of the present disclosure. Figure 3 It is a flowchart further illustrating the method for independently processing requirement documents according to an embodiment of the present disclosure. Figure 4 It is a flowchart further illustrating the method for independently processing the foregoing data according to an embodiment of the present disclosure.

[0065] Will refer to Figures 1 to 4 The software workload evaluation method based on COSMIC according to an embodiment of the present disclosure is described in detail, mainly including:

[0066] Step S1: perform data processing on the requirement document and the COSMIC function point splitting table respectively.

[0067] The original data processing in the first phase mainly targets the requirements document and COSMIC Function Point (CFP, COSMIC Function Point standard unit, equivalent to a data flow) split table. Among them, (1) for the requirements document, it specifically includes: firstly, generalized text pre-training processing is performed. The specific process includes conventional natural language processing methods such as word segmentation, part of speech restoration, stop word removal, etc. for the original text of the body of the requirements document. This process itself will not be elaborated in detail; then, the body of the requirements document is segmented according to actual needs. (2) For the COSMIC function point splitting table, first obtain four columns of data in the table: function process, sub-process description, data movement type, and data attribute; among them, the last three columns of sub-process description, data movement type, and data attribute are the three elements required for the three-element duplicate checking in the COSMIC evaluation rules, and the function process can be understood as a supplement or prerequisite to the sub-process description column, so it is also spliced ​​in this link; before the text splicing work, text preprocessing can also be performed, mainly for the three columns of function process, sub-process description, and data attribute text preprocessing (the specific process includes conventional natural language processing methods such as word segmentation, part of speech restoration, and stop word removal as mentioned above, which will not be repeated here), and for the data movement type, a one-hot encoding process can be performed to change it from E, X, R, W to a digital vector of 0, 1, 2, and 3. After the conventional preprocessing process is completed, the above four columns of text are packaged into lists and output to the next stage.

[0068] Step S2: Based on the data processing results, different long short-term memory multi-head self-attention networks are used to independently process the demand document part, the current bank data part, and the previous text data part.

[0069] It can be understood that the second stage is sub-model processing. The processing direction of this stage is mainly divided into three major parts: the requirement document part, the bank data part, and the previous data part. In combination with the supervised learning network model, each of the above parts can correspond to a different long short-term memory multi-head self-attention network for targeted independent processing.

[0070] (1) Combination Figure 2 , the independent processing of the bank's data includes:

[0071] Step S10, vectorizing the data processing results of the COSMIC function point splitting table, and concatenating them to obtain sentence vectors;

[0072] Step S11: input the sentence vector into a trained first long short-term memory multi-head self-attention network and output a first independent processing result, wherein the first independent processing result is used to evaluate the software workload according to the text content of this line of data.

[0073] Specifically, this row of data refers to the row of data that needs to be judged. Therefore, the main goal of this section is to use the first long short-term memory multi-head self-attention network to evaluate the workload value of this row according to the text content of this row of data. In actual operation, the data list packaged in the first stage is first vectorized in this section. Specifically, a pre-trained model (optional) can be used. For example, but not limited to, a pre-trained model based on BERT can be used. After vectorization, the text vectorization results of the functional process, sub-process description, and data attributes will be obtained respectively, and each vector is 768 dimensions; and the 1-dimensional digital vector of the data movement type data output in the first stage. Combined with the actual scenario, a 2305-dimensional vector can be spliced ​​in this step before being input into the first model as a sentence vector. Then, this sentence vector is input into the first long short-term memory multi-head self-attention network corresponding to this section for training and output the result to the subsequent third stage.

[0074] In some embodiments, for the data portion of this line, the first long short-term memory multi-head self-attention network disclosed in the present invention is preferably a bidirectional long short-term memory multi-head self-attention network (BiLSTM-MATT) for training and deduction. The specific references to this preferred network are as follows:

[0075] The first is the basic long short-term memory network model:

[0076] f t =sigmoid(W f ·[h t-1 ,x t ]+b f )

[0077] i t =sigmoid(W i ·[h t-1 ,x t ]+b i )

[0078] o t =sigmoid(W o ·[h t-1 ,x t ]+b o )

[0079]

[0080]

[0081] h t =o t ×tanh(c t )

[0082] In the basic long short-term memory network model, the input of each unit module is c t-1 、h t-1 and x t , the output of each unit module is c t and h t As the input of the next unit module, c t and h t The calculation process is as above.

[0083] On top of this, the bidirectional module is connected. The bidirectional module adds a reverse unit module to the basic model. The formula is as follows:

[0084] f t =sigmoid(W f ·[h t+1 ,x t ]+b f )

[0085] i t =sigmoid(W i ·[h t+1 ,x t ]+b i )

[0086] o t =sigmoid(W o ·[h t+1 ,x t ]+b o )

[0087]

[0088]

[0089] h t =o t ×tanh(c t )

[0090] On top of this, the bidirectional module will concatenate the results. In other words, it will superimpose a t+1 、h t+1 and x t As the input module; then the result of the forward time unit module is spliced ​​with the result of the reverse time unit module as the final result.

[0091] The sub-model is finally connected to the multi-head self-attention module. The function of this module is to give greater weight to the part that has a greater impact on the result for focused learning. The theoretical formula of multi-head self-attention is as follows:

[0092]

[0093]

[0094] MultiHead(Q,K,V)=Concat(head 1 ,head 2 ,...,head h )W O

[0095] It can be seen that the multi-head self-attention module is composed of multiple single-head attention splicing and combination, and the role of a single self-attention module is to express itself through the attention mechanism associated with itself and itself, so as to obtain a better expression. Through the attention mechanism, vectors of different distances in a sentence can be learned, and the knowledge dependency and word order structure of the sequence can be learned at a distance. In the above formula, the Attention (Q, K, V) formula is actually the theoretical formula of scaled dot-product attention, and self-attention is actually a special case of scaled dot-product attention, that is, Q = K = V. The difference between multi-head self-attention is that it divides the last dimension of the feature tensor and performs attention calculations separately, which can form multiple subspaces, so that the model can pay attention to information features in different aspects and better improve the effect of the model. It can be pointed out that the advantages of this function are more prominent for the software code analysis and evaluation scenario that this disclosure focuses on, because the data input in this scenario is quite complex, and there will be multiple feature points in each data, so the model needs to find multiple feature points for deduction separately.

[0096] (2) Combination Figure 3 , independent processing of requirement documents includes:

[0097] Step S20, pre-setting the segment list threshold;

[0098] Step S21, comparing the number of segments of the demand document with the segment list threshold;

[0099] Step S22, after completing the segmented text list based on the comparison difference, vectorize each segment of text in the segmented text list to obtain a segment vector;

[0100] Step S23: After concatenating the segment vector and the sentence vector, the concatenation is input into a trained second long short-term memory multi-head self-attention network and a second independent processing result is output, where the second independent processing result is used to evaluate the software workload in combination with the data information of the requirement document.

[0101] To expand, the main goal of this section is to assist in evaluating the workload value of this line in combination with the information provided by the requirements document. As mentioned above, the text of the requirements document has been divided into n paragraphs of text in the first stage of raw data processing. Therefore, in this section, each paragraph of text needs to be summarized and vectorized for output. The specific method is as follows: First, set the segment list threshold, here assuming that the threshold is 200; then examine the segmentation of the requirements document by directory or natural paragraph, if it is less than the threshold, fill the remaining list with null values, for example, if the requirements document is divided into 160 sections, 40 null values ​​need to be added to the segment text list; then, vectorize all paragraphs in the list, and the processing flow can refer to the data part of this line described above; then concatenate the vector formed by the requirements document with the sentence vector formed by the data of this line (from the first part), input it into the second long short-term memory multi-head self-attention network corresponding to this part for reasoning, and output the result to the subsequent third stage. It can be pointed out that the second long short-term memory multi-head self-attention network used in this part can be consistent with the basic architecture of the first long short-term memory multi-head self-attention network in the data part of this line, such as the bidirectional long short-term memory multi-head self-attention network, and the difference between the two lies in the different input data.

[0102] (3) Combination Figure 4 , the independent processing of the above data includes:

[0103] Step S30, presetting a previous text range threshold;

[0104] Step S31, after reading the previous text data according to the previous text range threshold, vectorize the previous text data list in rows as units to obtain row vectors;

[0105] Step S32: After concatenating the row vector and the sentence vector, the row vector and the sentence vector are combined and input into a trained third long short-term memory multi-head self-attention network to output a third independent processing result, which is used to evaluate the software workload by combining the information of the previous data and the relative row distance between the current row data and the previous data as index information.

[0106] To expand, the previous data part refers to the data from the first row to the n-1th row (the nth row represents the data of this row) in the COSMIC function point splitting table. The main goal of this part is to make the information provided by the previous data participate in the evaluation of the software workload (code scale). In this part, the previous range threshold m can be preset, because the value range of the previous data is nm rows to n-1 rows; for example, m=200 means that the data processed by the third long short-term memory multi-head self-attention network in this part is the first 200 rows of the current row data (nth row) as "previous text" for reasoning. Based on this, after reading the previous data according to the previous range threshold, the previous data list is vectorized in units of rows (optionally, using a pre-trained model). The sentence vector formed by the current row data (from the first part) and the previous data list vector are spliced, and combined with the relative distance between the previous data and the current row data, the three are input into the third long short-term memory multi-head self-attention network in this part for training and deduction, and the results are output to the subsequent third stage.

[0107] In some preferred embodiments, the architecture of the third long short-term memory multi-head self-attention network is different from the above two parts. It is preferred to use a time-aware bidirectional long short-term memory multi-head self-attention network (T-BiLSTM-MATT) for training and deduction. In combination with the above, it is not only different from the networks used in the other two parts, but also uses the relative row distance between the current row data and the previous data as index information. Among them, the time-aware long short-term memory network model can be referenced as follows:

[0108]

[0109]

[0110]

[0111]

[0112] f t =sigmoid(W f x t +U f h t-1 +b f )

[0113] i t =sigmoid(W i x t +U i h t-1 +b i )

[0114] o t =sigmoid(W o xt +U o h t-1 +b o )

[0115]

[0116]

[0117] h t =o t ×tanh(C t )

[0118] In this model, in addition to c t-1 、h t-1 and x t The input is increased by Δt as a time marker, and the output is still C t and h t , and used as the input of the next unit module. On top of this, as above, a bidirectional module and a multi-head self-attention module are superimposed to enhance performance.

[0119] This model can solve the problem of uneven time points. Its core method is to provide the model with the time points of past data and give different weights to long-term memory and short-term memory based on time intervals, thereby solving the above problems. In the field of concern of the present disclosure, there may also be related problems. Since there is a comparison with historical data (previous COSMIC function point splitting table) before this model, and the data source may contain data rows with a workload of 0, the data input into the model of the present disclosure is not the same relative to the "time distance". For example, the data rows that may be input into the model of the present disclosure are the 1st, 2nd, 4th, and 5th rows in the previous COSMIC function point splitting table, and the 3rd row of data has been removed in the early processing. For this special scenario, the early processing destroyed the originally evenly distributed data, which violated the principle of the basic long and short-term memory network model. Therefore, in the aforementioned preferred embodiment of the present disclosure, it is proposed to use a time-aware model and combine relative distance as a data index to simulate time points and time periods, so that data deduction can be better performed.

[0120] Step S3: integrate the independent processing results of the three parts and output the prediction result of the software workload.

[0121] The third stage is the final result output. Specifically, the results of the three parts of the second stage are literally spliced ​​forward and backward after the fully connected layer (FC), and after the three parts of the results are fused, they can be normalized (Softmax) to return to the interval [-1,1]. After that, the splicing result can be preferably passed through the class balance loss function (CB Loss) to obtain the workload prediction result and output it. The class balance loss function can be referred to as follows:

[0122]

[0123] Among them, n y Represents the number of data of category y in the training set; β = 0 means no reweighting; β → 1 corresponds to weighting using inverse frequency.

[0124] The class balance loss function preferably used in the third stage of the present disclosure is mainly used to solve the problem of imbalance in the quantity of each type of data (this line, previous text, and requirements). In the actual software scale assessment work, the CFP values ​​of the function point results of the COSMIC function point split table are divided into three categories: 0, 1 / 3, and 1, which may cause an imbalance in the quantity of different types of data (for example, most of them are 1 / 3 in a table, etc.); in this case, assuming that the output results of the three types of data (this line, previous text, and requirements) are configured with the same weight by default, then the final prediction result will be greatly affected, resulting in a decrease in the accuracy of the code scale assessment. Based on this, the present disclosure proposes that the class balance loss function can be preferably used before outputting the prediction result to solve this problem.

[0125] The above describes the COSMIC-based software workload evaluation method according to the embodiment of the present disclosure. The following further describes the COSMIC-based software workload evaluation device for implementing the above control method. Figure 5 is a functional block diagram illustrating a COSMIC-based software workload evaluation device according to an embodiment of the present disclosure.

[0126] like Figure 5 As shown, the COSMIC-based software workload evaluation device 500 according to an embodiment of the present disclosure includes:

[0127] The original data processing module 501 is used to process the demand document and the COSMIC function point splitting table respectively;

[0128] The sub-model processing module 502 is used to independently process the requirement document part, the current bank data part, and the previous text data part respectively using different long short-term memory multi-head self-attention networks based on the data processing results;

[0129] The final result output module 503 is used to integrate the independent processing results of the three parts and output the prediction result of the software workload.

[0130] Furthermore, the sub-model processing module includes a data independent processing unit for the same row, and the data independent processing unit for the same row includes:

[0131] This line of sentence vector generation component is used to vectorize the data processing results of the COSMIC function point splitting table and concatenate them to obtain sentence vectors;

[0132] The first sub-model processing component is used to input the sentence vector into a trained first long short-term memory multi-head self-attention network and output a first independent processing result, wherein the first independent processing result is used to evaluate the software workload according to the text content of this line of data.

[0133] Furthermore, the sub-model processing module includes a requirement document independent processing unit, and the requirement document independent processing unit includes:

[0134] The paragraph quantity threshold setting component is used to pre-set the segment list threshold;

[0135] The paragraph quantity comparison component is used to compare the number of segments of the requirement document with the segment list threshold;

[0136] A text segment vector generation component is used to vectorize each segment of the text in the segment text list to obtain a segment vector after completing the segment text list based on the comparison difference;

[0137] The second sub-model processing component is used to concatenate the segment vector and the sentence vector, input them into a trained second long short-term memory multi-head self-attention network and output a second independent processing result, wherein the second independent processing result is used to evaluate the software workload in combination with the data information of the requirement document.

[0138] Furthermore, the sub-model processing module includes a previous text data independent processing unit, and the previous text data independent processing unit includes:

[0139] A preceding range definition component is used to pre-set a preceding range threshold;

[0140] A previous text row vector generating component is used to read the previous text data according to the previous text range threshold, and then vectorize the previous text data list in units of rows to obtain a row vector;

[0141] The third sub-model processing component is used to concatenate the row vector and the sentence vector, combine the relative distance information between the previous text data and the current row data, input them into the trained third long short-term memory multi-head self-attention network and output a third independent processing result, and the third independent processing result is used to evaluate the software workload by combining the information of the previous text data and the relative row distance between the current row data and the previous text data as index information.

[0142] Furthermore, the first long short-term memory multi-head self-attention network and the second long short-term memory multi-head self-attention network are both configured as bidirectional long short-term memory multi-head self-attention networks; and the third long short-term memory multi-head self-attention network is configured as a time-aware bidirectional long short-term memory multi-head self-attention network.

[0143] Furthermore, the final result output module is configured to fuse and normalize the independent processing results of the three parts, and obtain the prediction result after processing by the class balance loss function.

[0144] Furthermore, the original data processing module includes:

[0145] A requirement document preprocessing unit, used for segmenting the body of the requirement document after text preprocessing; and

[0146] The COSMIC function point splitting table preprocessing unit is used to obtain four columns of data of the COSMIC function point splitting table, wherein the four columns of data include: function process, sub-process description, data movement type, and data attribute; perform text preprocessing on the function process, sub-process description, and data attribute, and perform one-hot encoding on the data movement type; and list-pack the processed four columns of text.

[0147] Figure 6 1 is a hardware block diagram of an electronic device 600 according to an embodiment of the present disclosure. The electronic device according to an embodiment of the present disclosure includes at least a processor; and a memory for storing computer-readable instructions. When the computer-readable instructions are loaded and executed by the processor, the processor executes the software workload evaluation method based on COSMIC as described above.

[0148] Figure 6The electronic device 600 shown specifically includes: a central processing unit (CPU) 601, a graphics processing unit (GPU) 602 and a main memory 603. These units are connected to each other via a bus 604. The central processing unit (CPU) 601 and / or the graphics processing unit (GPU) 602 can be used as the above-mentioned processor, and the main memory 603 can be used as the above-mentioned memory for storing computer-readable instructions. In addition, the electronic device 600 may also include a communication unit 605, a storage unit 606, an output unit 607, an input unit 608 and an external device 609, which are also connected to the bus 604.

[0149] Figure 7 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. Figure 7 As shown, a computer-readable storage medium 700 according to an embodiment of the present disclosure has computer-readable instructions 701 stored thereon. When the computer-readable instructions 701 are executed by a processor, the COSMIC-based software workload assessment method according to an embodiment of the present disclosure described with reference to the above figures is executed. The computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, an optical disk, a magnetic disk, etc.

[0150] In the above, the software workload evaluation method, device, electronic device and computer-readable storage medium based on COSMIC according to the embodiment of the present disclosure are described with reference to the accompanying drawings. The main idea is to optimize and reconstruct the traditional supervised learning model. From the three aspects of the current line data, the previous text data and the requirement document, different models are used to analyze the different characteristics of these three aspects respectively, which do not interfere with each other and complement each other. Specifically, it consists of three parts: the comparison of the requirement document, the comparison of the previous text pre-data and the analysis of the current current line data. The model is reconstructed by combining the long short-term memory network model, and each individual part is processed by the corresponding long short-term memory multi-head self-attention network. Then, the single-line workload is obtained by combining the results of each individual part, and then the workload of each group of data to be evaluated can be obtained. Furthermore, before the final result is output, it is proposed that a class balance loss function can be used, which avoids the problem of model performance loss caused by the imbalance in the number of data in each category to a certain extent. The present disclosure mainly solves the problems in the work of artificial intelligence models from scratch and from simple to deep in the prior art, and at the same time changes the current situation of lack of algorithm models for COSMIC measurement methods.

[0151] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0152] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0153] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0154] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0155] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0156] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0157] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0158] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A software workload evaluation method based on COSMIC, characterized in that: The evaluation methods include: Perform data processing on the requirement document and COSMIC function point splitting table respectively; Based on the data processing results, different long short-term memory multi-head self-attention networks are used to independently process the demand document part, the bank data part, and the previous text data part; The independent processing results of the three parts are integrated to output the prediction results of the software workload.

2. The COSMIC-based software workload evaluation method according to claim 1, characterized in that: The processing of the bank's data includes: Vectorize the data processing results of the COSMIC function point splitting table and concatenate them to obtain sentence vectors; The sentence vector is input into a trained first long short-term memory multi-head self-attention network and a first independent processing result is output, where the first independent processing result is used to evaluate the software workload according to the text content of this row of data.

3. The COSMIC-based software workload evaluation method according to claim 2, characterized in that: The processing of the requirements document includes: Pre-set segment list thresholds; Compare the number of segments in the requirement document with the segment list threshold; After completing the segmented text list based on the comparison difference, each segment of the text in the segmented text list is vectorized to obtain a segment vector; After concatenating the segment vector and the sentence vector, the segment vector is input into a trained second long short-term memory multi-head self-attention network and a second independent processing result is output, where the second independent processing result is used to evaluate the software workload in combination with the data information of the requirement document.

4. The COSMIC-based software workload evaluation method according to claim 3, characterized in that: The processing of the above data includes: Pre-set the previous text range threshold; After reading the previous text data according to the previous text range threshold, vectorizing the previous text data list in units of rows to obtain a row vector; After concatenating the row vector and the sentence vector, combined with the relative distance information between the previous data and the current row data, they are input into the trained third long short-term memory multi-head self-attention network and output a third independent processing result. The third independent processing result is used to evaluate the software workload by combining the information of the previous data and the relative row distance between the current row data and the previous data as index information.

5. The COSMIC-based software workload evaluation method according to claim 4, characterized in that: The first long short-term memory multi-head self-attention network and the second long short-term memory multi-head self-attention network are both bidirectional long short-term memory multi-head self-attention networks; the third long short-term memory multi-head self-attention network is a time-aware bidirectional long short-term memory multi-head self-attention network.

6. The COSMIC-based software workload evaluation method according to claim 1, characterized in that: The output software workload prediction results include: The independent processing results of the three parts are fused and normalized, and then processed by the class balance loss function to obtain the prediction result.

7. The COSMIC-based software workload evaluation method according to any one of claims 1 to 6, characterized in that: The data processing of the requirement document and the COSMIC function point splitting table respectively includes: Segmenting the body of the requirements document after text preprocessing; and, Four columns of data of the COSMIC function point splitting table are obtained, wherein the four columns of data include: function process, sub-process description, data movement type, and data attribute; text preprocessing is performed on the function process, sub-process description, and data attribute, and the data movement type is processed by one-hot encoding; and the processed four columns of text are packaged into a list.

8. A COSMIC-based software workload assessment device, characterized in that: The evaluation device comprises: The original data processing module is used to process the requirements document and the COSMIC function point splitting table respectively; The sub-model processing module is used to independently process the requirement document part, the bank data part, and the previous text data part based on the data processing results using different long short-term memory multi-head self-attention networks; The final result output module is used to integrate the independent processing results of the three parts and output the prediction results of the software workload.

9. An electronic device, characterized in that: include: a memory for storing computer readable instructions; as well as A processor is used to run the computer-readable instructions so that the electronic device executes the COSMIC-based software workload assessment method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium for storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the processor is caused to execute the COSMIC-based software workload estimation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for generating COSMIC workload evaluation document

    CN112347751A

  • Software development workload evaluation method and device and calculation equipment

    CN113011689A

  • Software system test demand evaluation method and device, electronic equipment and storage medium

    CN115185831A

  • Software development workload automatic evaluation method and device, storage medium and processor

    CN116774986A

  • Software general quality characteristic evaluation method and device

    CN116991746A

Cited By

  • Software workload assessment method, electronic equipment, device, medium and program product

    CN120315682A

  • Software engineering cost function point estimation method based on large language model

    CN121707595A