Method, apparatus and computer device for extracting evaluation indexes of software quality

By obtaining sample data tables and screening software quality evaluation indicators using random forest algorithms, the problem of long and low efficiency of software quality evaluation in the existing technology is solved, and more efficient and accurate evaluation is achieved.

CN115080413BActive Publication Date: 2025-07-22PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210731855.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-25
Publication Date
2025-07-22
Estimated Expiration
2042-06-25

AI Technical Summary

Technical Problem

In the prior art, software quality evaluation indicators are numerous and contain useless data, which leads to excessively long and low efficiency.

Method used

By obtaining the sample data table of the sample software, counting the form indicator information, using the random forest algorithm to calculate the index weight value, filtering out the evaluation indicators used to build the software quality classification module, combining the basic indicator information and form indicator information, reducing the amount of data, and improving the evaluation efficiency and accuracy.

Benefits of technology

It effectively reduces the amount of data used in the software quality evaluation process, improves evaluation efficiency and accuracy, and helps optimize the development of subsequent software code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080413B_ABST
    Figure CN115080413B_ABST
Patent Text Reader

Abstract

The present application provides a method, an apparatus, and a computer device for extracting software quality evaluation indicators. A sample data table of a sample software is obtained; form index information related to the sample data table is statistically analyzed based on the sample data table; target index information is constructed based on the form index information and the basic index information of the sample software, and index weight values of each piece of target index information are obtained through a random forest algorithm; according to the index weight values corresponding to each piece of target index information, software quality evaluation indicators for constructing a software quality classification module are screened out from the target index information, so as to realize adding and considering form index information representing the complexity of data processed by the software on the basis of the basic index information of the software, and further screening out software quality evaluation indicators for evaluating software quality from the basic index information and the form index information, while improving the accuracy of software quality evaluation, reducing the amount of data used in software quality evaluation, and improving the efficiency of software quality evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a method, apparatus, computer device, and computer-readable storage medium for extracting evaluation indicators of software quality. Background Art

[0002] Software quality is the synthesis of features related to the ability of software to meet specified or implied requirements; ensuring software quality is an important issue throughout the entire software life cycle. And effectively evaluating software quality has increasingly become an important means to ensure software quality. In the prior art, there are numerous indicators for evaluating software quality, such as data indicators like the number of source code lines, execution time, code coverage, etc. However, evaluation indicators with a huge amount of data often contain useless data indicators, and it leads to an overly long time-consuming and low-efficiency process in evaluating software quality. Summary of the Invention

[0003] Based on this, it is necessary to provide a method, apparatus, computer device, and computer-readable storage medium for extracting evaluation indicators of software quality in view of the above technical problems.

[0004] In a first aspect, this application provides a method for extracting evaluation indicators of software quality, the method comprising:

[0005] Obtain a sample data table of a sample software;

[0006] Based on the sample data table, count form indicator information related to the sample data table, where the form indicator information includes at least one of the number of sample data tables, the number of key values in the sample data table, the number of processing channels of the key values in the sample data table, and the number of source channels of the key values in the sample data table;

[0007] Based on the form indicator information and the basic indicator information of the sample software, construct target indicator information, and obtain the indicator weight values of each target indicator information through a random forest algorithm;

[0008] According to the indicator weight values corresponding to each target indicator information, screen out the software quality evaluation indicators for constructing a software quality classification module from the target indicator information.

[0009] In some embodiments of this application, based on the sample data table, counting the form indicator information related to the sample data table includes:

[0010] Extract the key values of each column key of the sample data table;

[0011] According to the key values, count the number of key values in the sample data table;

[0012] Obtain the source code of the sample software, and determine the data objects corresponding to the key values and the reference relationships of the data objects from the source code;

[0013] Obtain the number of processing channels for sample data table key values and the number of source channels for sample data table key values according to the reference relationship of data objects.

[0014] In some embodiments of the present application, target metric information is constructed based on form metric information and basic metric information of a sample software, including:

[0015] Select any two target metric information from the basic metric information and the form metric information in sequence as a pair of metric information;

[0016] Obtain the association relationship between the pairs of metric information according to the source code of the sample software;

[0017] Based on the association relationship of the pairs of metric information, screen the target metric information from the basic metric information and the form metric information.

[0018] In some embodiments of the present application, after screening the software quality evaluation metrics for constructing the software quality classification module from the target metric information according to the metric weight values corresponding to each target metric information, it further includes:

[0019] Use the data values of the sample software on the software quality evaluation metrics as input and the software quality level of the sample software as output to fit a software quality evaluation model.

[0020] In some embodiments of the present application, after fitting the software quality evaluation model, it further includes:

[0021] Obtain the target data values of the target software on the software quality evaluation metrics;

[0022] Input the target data values into the software quality evaluation model to obtain the software quality level of the target software.

[0023] In some embodiments of the present application, the sample software is a payment software; the sample data table includes at least one of a payment order table, a refund transaction table, and a cash withdrawal transaction table of the payment software.

[0024] In some embodiments of the present application, the basic metric information includes but is not limited to at least one of the line error ratio, construction cost method, code coverage rate, code cohesion, code coupling, annotation density, cyclomatic complexity, instruction path length, interface category quantity, source code line number, execution time, loading time, and binary length of the sample software.

[0025] In a second aspect, the present application provides an apparatus for extracting software quality evaluation metrics, and the apparatus includes:

[0026] A data table acquisition module, configured to acquire a sample data table of the sample software;

[0027] A form index acquisition module, configured to statistically calculate form index information related to a sample data table based on the sample data table, where the form index information includes at least one of the number of sample data tables, the number of sample data table key values, the number of processing channels of the sample data table key values, and the number of source channels of the sample data table key values;

[0028] An index weight acquisition module, configured to construct target index information based on the form index information and the basic index information of the sample software, and obtain the index weight values of each target index information through a random forest algorithm;

[0029] An index screening module, configured to screen software quality evaluation indexes for constructing a software quality classification module from the target index information according to the index weight values corresponding to each target index information.

[0030] Thirdly, the present application further provides a computer device, which includes:

[0031] One or more processors;

[0032] A memory; and

[0033] One or more applications, where one or more applications are stored in the memory and are configured to be executed by the processor to implement the method for extracting evaluation indexes of software quality.

[0034] Fourthly, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is loaded by the processor to execute the steps in the method for extracting evaluation indexes of software quality.

[0035] Fifthly, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in the first aspect above.

[0036] The above method, device, computer equipment, and computer-readable storage medium for extracting evaluation indicators of software quality obtain a sample data table of a sample software; statistically analyze form indicator information related to the sample data table based on the sample data table, where the form indicator information includes at least one of the number of sample data tables, the number of key values in the sample data table, the number of processing channels for the key values in the sample data table, and the number of source channels for the key values in the sample data table; construct target indicator information based on the form indicator information and the basic indicator information of the sample software, and obtain the indicator weight values of each target indicator information through a random forest algorithm; according to the indicator weight values corresponding to each target indicator information, screen out software quality evaluation indicators for constructing a software quality classification module from the target indicator information. By obtaining form indicator information related to the sample data table and calculating indicator weight values related to software quality evaluation corresponding to each form indicator information or basic indicator information, a number of software quality evaluation indicators for evaluating software quality are screened out, reducing the amount of data used in the software quality evaluation process and improving the evaluation efficiency of software quality. At the same time, by adding form indicator information considering the complexity of the data processed by the software, the accuracy of software quality evaluation is improved, which is beneficial for developers to optimize subsequent software code according to software quality and improve development efficiency. Brief Description of the Drawings

[0037] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for description in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0038] Figure 1 is a scenario schematic diagram of the method for extracting evaluation indicators of software quality in an embodiment of the present application;

[0039] Figure 2 is a flowchart of the method for extracting evaluation indicators of software quality in an embodiment of the present application;

[0040] Figure 3 is a flowchart of the step for obtaining form indicator information in an embodiment of the present application;

[0041] Figure 4 is a structural schematic diagram of the device for extracting evaluation indicators of software quality in an embodiment of the present application;

[0042] Figure 5 is a structural schematic diagram of the computer equipment in an embodiment of the present application. Detailed Description of the Embodiments

[0043] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.

[0044] In the description of the present application, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality of" means two or more, unless otherwise specifically defined.

[0045] In the description of the present application, the term "for example" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "for example" in the present application is not necessarily construed as being more preferred or having more advantages than other embodiments. In order for any person skilled in the art to implement and use the present invention, the following description is given. In the following description, details are set forth for purposes of explanation. It should be understood that those skilled in the art can recognize that the present invention can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope that conforms to the principles and features disclosed in the present application.

[0046] Figure 1 It is an application environment diagram of the method for obtaining an interface class file in an embodiment. The method for extracting evaluation indicators of software quality can be applied to a computer device, and the computer device can be a server or a terminal. As Figure 1As shown, taking the computer device as the server 100 as an example, the server 100 obtains the sample data table of the sample software; based on the sample data table, it statistically analyzes the form index information related to the sample data table, and the form index information includes at least one of the number of sample data tables, the number of sample data table key values, the number of processing channels of the sample data table key values, and the number of source channels of the sample data table key values; based on the form index information and the basic index information of the sample software, it constructs the target index information, and obtains the index weight values of each target index information through the random forest algorithm; according to the index weight values corresponding to each target index information, it screens out the software quality evaluation indexes used to construct the software quality classification module from the target index information, realizing that on the basis of the basic index information of the software foundation, considering the complexity of the data processed by the software, increasing the comprehensiveness of the index information for software description, and then calculating the index weight values corresponding to each form index information and the sample software and related to software quality evaluation, so as to screen out several software quality evaluation indexes for evaluating software quality, reducing the amount of data used in the software quality evaluation process, improving the evaluation efficiency of software quality, while improving the accuracy of software quality evaluation, which is beneficial for developers to optimize the subsequent software code according to software quality and improve development efficiency.

[0047] Those skilled in the art can understand that Figure 1 the application environment shown in Figure 1 is only one application scenario of the solution of this application, and does not constitute a limitation on the application scenario of the solution of this application. Other application environments may also include more or fewer computer devices than Figure 1 shown in Figure 1 . For example, only 1 server is shown in

[0048] . It can be understood that this exception code processing system may also include one or more other servers, which are not specifically limited here. In addition, as Figure 1 shown, this exception code processing system may also include a memory for storing data, such as source code, index information, etc.

[0048] It should also be noted that Figure 1 the scenario schematic diagram of the exception code processing system shown is only an example. The exception code processing system and scenario described in the embodiments of the present invention are for more clearly explaining the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art know that with the evolution of the exception code processing system and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.

[0049] Referring to Figure 2 , the embodiments of the present application provide a method for extracting software quality evaluation indexes, mainly taking the application of this method to the above Figure 1Taking the server in [ID] as an example, the method includes steps S210 to S240, which are specifically as follows:

[0050] S210, obtain the sample data table of the sample software.

[0051] Among them, the sample software refers to an application program, such as a financial software, a payment software, a social software, etc.

[0052] Among them, the sample data table refers to the storage unit of the data processed by the sample software. It can be understood that when the sample software implements different functions, it processes different demand data, and these demand data are often stored in the sample data table. Specifically, the sample data table can be a two-dimensional structure composed of rows and columns. One row represents a record, and a record includes different fields, indicating different attribute indicators recorded in this record.

[0053] In one embodiment, taking the sample software as a payment software as an example, the sample data table includes at least one of the payment order table, the refund transaction table, and the cash withdrawal transaction table of the payment software.

[0054] S220, based on the sample data table, count the form metric information related to the sample data table. The form metric information includes at least one of the number of sample data tables, the number of sample data table key values, the number of processing channels of the sample data table key values, and the number of source channels of the sample data table key values.

[0055] Among them, the form metric refers to the attributes corresponding to the sample data table and the data information contained in the sample data table in each statistical dimension.

[0056] Among them, the form metric information includes the sample data table, as well as the data information contained in the sample data table in different statistical dimensions and the statistical values in different statistical dimensions; specifically, the form metrics include but are not limited to the number of sample data tables, the number of sample data table key values, the number of processing channels of the sample data table key values, and the number of source channels of the sample data table key values.

[0057] It can be understood that the form metric information can be used to reflect the complexity of the sample software in the data processing dimension when implementing the application function. Adding the form metric information in the process of evaluating the software quality, that is, adding the consideration of the complexity of the software in the data processing dimension, and the complexity of the software in the data processing dimension is a data metric that cannot be artificially constructed deliberately. Therefore, the accuracy of the evaluation of the software architecture quality can be improved.

[0058] Specifically, when the sample software implements different functions, it processes different requirement data, and the requirement data is stored in the sample data table. After obtaining the sample data table, information statistics are performed on different statistical dimensions (i.e., sample data table metrics) to obtain at least one of the number of sample data tables, the number of sample data table key values, the number of processing channels for sample data table key values, and the number of source channels for sample data table key values as form metric information. Among them, the number of sample data tables refers to the number of sample data tables, the number of sample data table key values refers to the number of all key values in all sample data tables, the number of processing channels for sample data table key values refers to the number of processing methods for the data corresponding to a certain sample data table key value, and the number of source channels for sample data table key values refers to the number of acquisition methods for the data corresponding to a certain sample data table key value.

[0059] Taking the sample software as the payment software and the sample data table as the payment order table of the payment software as an example, the payment order table contains the following key values: order number, paying user, receiving user, amount, payment channel, etc. For example, assuming that there is a function in the payment software that processes the data corresponding to the "order number" key value, the total number of processing channels for "order number" is 1; another example, assuming that the payment channels (or payment methods) in the payment software include bank card payment, financial platform payment, and digital currency payment, a total of 3 payment channels, and there are 3 acquisition methods for the data corresponding to the "payment channel" key value, that is, the number of source channels for the "payment channel" key value is 3.

[0060] Further, as Figure 3 shown, in one embodiment, form metric information related to the sample data table is statistically analyzed based on the sample data table, including:

[0061] S310, extracting the key values of each column key of the sample data table;

[0062] S320, statistically analyzing the number of sample data table key values according to the key values;

[0063] S330, obtaining the source code of the sample software, and determining the data object corresponding to the key value and the reference relationship of the data object from the source code;

[0064] S340, obtaining the number of processing channels for sample data table key values and the number of source channels for sample data table key values according to the reference relationship of the data object.

[0065] Among them, different columns in the sample data table include different attributes or different types of data. In the above example, the payment order table includes different columns: order number, paying user, receiving user, amount, payment channel, etc. A key refers to a column used to identify a certain column in the sample data table, and a key value refers to the field information corresponding to the column in the sample data table. For example, "payment channel" is the key value of a certain column in the payment order table.

[0066] By obtaining each key value of the sample data table, the attributes or type information of the data processed by the sample software is determined. After obtaining each key value in the sample data table, duplicate key values can be removed, and then the total number of key values in all sample data tables is counted to obtain the number of key values in the sample data table.

[0067] It can be understood that the key values in the sample data table often correspond to an object or an instantiated object of a class in the source code. After obtaining the key values, the corresponding data object can be searched for among the objects defined in the source code; specifically, the character sequences of the key values and each object in the source code can be obtained for comparison to determine the object with the same character sequence as the key value as the data object corresponding to the key value.

[0068] Among them, the reference relationship of the data object refers to the information that the object is referenced or called by different functions in the source code; during the execution of the source code, the object defined in a certain execution step is often referenced or called by different function codes or assigned values by different function codes.

[0069] Specifically, after obtaining the source code, the reference relationships of each object in the source code can be traversed, and then the number of times the data object corresponding to each key value is called and the number of times it is assigned a value can be calculated based on the reference relationship; furthermore, the number of processing channels of the key values in the sample data table is obtained based on the number of times the data object corresponding to the key value is called, and the number of source channels of the key values in the sample data table is obtained based on the number of times the data object corresponding to the key value is assigned a value.

[0070] After obtaining the number of key values in the sample data table, the number of processing channels of the key values in the sample data table, and the number of source channels of the key values in the sample data table, form index information can be constructed based on the number of sample data tables, the number of key values in the sample data table, the number of processing channels of the key values in the sample data table, and the number of source channels of the key values in the sample data table.

[0071] S230, construct target index information based on the form index information and the basic index information of the sample software, and obtain the index weight values of each target index information through the random forest algorithm.

[0072] Among them, the basic indicator information refers to the basic indicators used to measure software quality, including but not limited to the line error ratio of the sample software, the construction cost method, the code coverage rate, the code cohesion degree, the code coupling degree, the annotation density, the cyclomatic complexity, the instruction path length, the number of interface categories, the number of source code lines, the execution time, the loading time, and the binary length. The target indicator information is constructed by the form indicator information and the basic indicator information of the sample software, so that in the subsequent software quality evaluation process, the basic indicator information directly used to measure software quality and the form indicator information used to measure the data complexity processed by the software are introduced at the same time, in order to improve the rationality and accuracy of the software quality evaluation.

[0073] After obtaining the basic indicator information and the form indicator information, the basic indicator information and the form indicator information can be directly used as the software target indicator information; or the correlation analysis can be performed on the basic indicator information and the form indicator information first. Based on the correlation relationship between the basic indicator information and the form indicator information, some indicator information is selected from the basic indicator information and the form indicator information as the software target indicator information to reduce the redundancy of data indicators and the amount of data processed subsequently.

[0074] Specifically, in one embodiment, step S220 includes: sequentially selecting any two target indicator information from the basic indicator information and the form indicator information as an indicator information pair; obtaining the correlation relationship between the indicator information pairs according to the source code of the sample software; and screening the target indicator information from the basic indicator information and the form indicator information based on the correlation relationship of the indicator information pairs.

[0075] Among them, after obtaining the basic indicator information and the form indicator information, any two indicator information can be selected from the basic indicator information and the form indicator information as an indicator information pair, and the correlation relationship between the two, that is, the degree of association, can be calculated through the software source code. When the degree of association between the two is relatively high, one of the indicator information pairs can be selected as the target indicator information.

[0076] After obtaining the target indicator information, the indicator weight values of each target indicator information can be obtained through the random forest algorithm; among them, the indicator weight value refers to the importance degree of the target indicator information in evaluating software quality, which can be the sum of the importance degrees of each decision tree in the random forest model when evaluating software quality.

[0077] Specifically, a random forest model can be constructed based on the target metric information first, and the prediction result of the software quality level of the prediction sample software can be obtained, and the first error between the prediction result and the label value of the software quality level of the sample software can be calculated; then, for the target metric information in the sample software, a target metric information can be randomly selected, noise can be added to the target metric information, and then a random forest model can be constructed again based on all the target metric information after adding noise, and the second error between the prediction result of the random forest model and the label value of the software quality level can be obtained; the metric weight value of the target metric information can be determined according to the difference between the first error and the second error, and by repeating the above steps, different target metric information can be determined as the target metric information to obtain the metric weight values of all the target metric information. It can be understood that the larger the difference, the larger the metric weight value of the target metric information; the smaller the difference, the smaller the metric weight value of the target metric information.

[0078] S240. According to the metric weight values corresponding to the respective target metric information, screen out the software quality evaluation metrics for constructing the software quality classification module from the target metric information.

[0079] Specifically, the target metric information can be sorted according to the metric weight values corresponding to each target metric information, such as sorting from large to small, and then screen out the target metric information with the top preset number in the sorting as the software quality evaluation metrics; alternatively, the target metric information with the metric weight value greater than the preset weight threshold can be determined as the software quality evaluation metrics.

[0080] In the above method for extracting the evaluation metrics of software quality, obtain the sample data table of the sample software; based on the sample data table, count the form metric information related to the sample data table, and the form metric information includes at least one of the number of sample data tables, the number of sample data table key values, the number of processing channels of the sample data table key values, and the number of source channels of the sample data table key values; construct the target metric information based on the form metric information and the basic metric information of the sample software, and obtain the metric weight values of the respective target metric information through the random forest algorithm; according to the metric weight values corresponding to the respective target metric information, screen out the software quality evaluation metrics for constructing the software quality classification module from the target metric information. By obtaining the form metric information related to the sample data table and calculating the metric weight values related to the evaluation of software quality corresponding to each form metric information or basic metric information, several software quality evaluation metrics for evaluating software quality are screened out, while reducing the amount of data used in the software quality evaluation process and improving the evaluation efficiency of software quality, and by adding the form metric information for representing the complexity of the data processed by the software, the accuracy of software quality evaluation is improved, which is beneficial for developers to optimize the subsequent software code according to the software quality and improve the development efficiency.

[0081] In one embodiment, after screening out software quality evaluation indicators for constructing a software quality classification module from the target indicator information according to the indicator weight values corresponding to the respective target indicator information, it further includes: using the data values of the sample software on the software quality evaluation indicators as inputs and the software quality level of the sample software as outputs to fit a software quality evaluation model.

[0082] In this embodiment, a specific application method of the evaluation indicator information is provided. Using the values of the sample software on the evaluation indicator information and the software quality level of the sample software as training data to train and fit a software quality evaluation model for evaluating the software quality level of the target software can effectively improve the evaluation efficiency of software quality and improve the development efficiency. Specifically, the software quality evaluation model can be a machine learning model, such as a random forest model.

[0083] In one embodiment, after fitting the software quality evaluation model, it further includes: obtaining the target data values of the target software on the software quality evaluation indicators; inputting the target data values into the software quality evaluation model to obtain the software quality level of the target software.

[0084] Among them, the target software refers to the software to be evaluated. By obtaining the data values of the target software on the software quality evaluation indicators, and then inputting the target data values into the pre-trained software quality evaluation model, the software quality of the target software is predicted and evaluated through the software quality evaluation model.

[0085] To better implement the software quality evaluation indicator extraction method provided in the embodiments of the present application, based on the software quality evaluation indicator extraction method provided in the embodiments of the present application, an apparatus for extracting software quality evaluation indicators is further provided in the embodiments of the present application, as Figure 4 shown. The apparatus 400 for extracting software quality evaluation indicators includes:

[0086] A data table acquisition module 410, configured to acquire a sample data table of the sample software;

[0087] A form indicator acquisition module 420, configured to statistically obtain form indicator information related to the sample data table based on the sample data table. The form indicator information includes at least one of the number of sample data tables, the number of sample data table key values, the number of processing channels of the sample data table key values, and the number of source channels of the sample data table key values;

[0088] An indicator weight acquisition module 430, configured to construct target indicator information based on the form indicator information and the basic indicator information of the sample software, and obtain the indicator weight values of the respective target indicator information through a random forest algorithm;

[0089] An indicator screening module 440, configured to screen software quality evaluation indicators for constructing a software quality classification module from the target indicator information according to the indicator weight values corresponding to the respective target indicator information.

[0090] In some embodiments of the present application, the form indicator acquisition module is specifically configured to extract the key values of each column key of the sample data table; count the number of key values of the sample data table according to the key values; obtain the source code of the sample software, and determine the data objects corresponding to the key values and the reference relationships of the data objects from the source code; obtain the number of processing channels of the key values of the sample data table and the number of source channels of the key values of the sample data table according to the reference relationships of the data objects.

[0091] In some embodiments of the present application, the indicator weight acquisition module is specifically configured to sequentially select any two target indicator information from the basic indicator information and the form indicator information as an indicator information pair; obtain the association relationship between the indicator information pairs according to the source code of the sample software; and screen the target indicator information from the basic indicator information and the form indicator information based on the association relationship of the indicator information pair.

[0092] In some embodiments of the present application, the software quality evaluation indicator extraction device 400 further includes an evaluation model construction module, configured to use the data values of the sample software on the software quality evaluation indicators as inputs and the software quality level of the sample software as outputs to fit a software quality evaluation model.

[0093] In some embodiments of the present application, the evaluation model construction module is specifically further configured to: obtain the target data values of the target software on the software quality evaluation indicators; input the target data values into the software quality evaluation model to obtain the software quality level of the target software.

[0094] In some embodiments of the present application, the sample software is a payment software; the sample data table includes at least one of a payment order table, a refund transaction table, and a cash withdrawal transaction table of the payment software.

[0095] In some embodiments of the present application, the basic indicator information includes, but is not limited to, at least one of the line error ratio, construction cost method, code coverage rate, code cohesion, code coupling, annotation density, cyclomatic complexity, instruction path length, number of interface categories, number of source code lines, execution time, loading time, and binary length of the sample software.

[0096] For the specific limitations of the software quality evaluation index extraction device, reference can be made to the limitations of the software quality evaluation index extraction method in the foregoing text, which will not be elaborated here. Each module in the above software quality evaluation index extraction device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.

[0097] In some embodiments of the present application, the software quality evaluation index extraction device 400 can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 5 . In the memory of the computer device, each program module constituting the software quality evaluation index extraction device 400 can be stored. For example, Figure 4 the data table acquisition module 410, form index acquisition module 420, index weight acquisition module 430, and index screening module 440 shown. The computer program constituted by each program module enables the processor to execute the steps in the software quality evaluation index extraction method of each embodiment of the present application described in this specification.

[0098] For example, Figure 5 the computer device shown can execute step S210 through the data table acquisition module 410 in the software quality evaluation index extraction device 400 shown in 4. The computer device can execute step S220 through the form index acquisition module 420. The computer device can execute step S230 through the index weight acquisition module 430. The computer device can execute step S240 through the index screening module 440. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external computer device through a network connection. When the computer program is executed by the processor, a software quality evaluation index extraction method is implemented.

[0099] Those skilled in the art can understand that Figure 5 the structure shown in is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0100] In some embodiments of the present application, a computer device is provided, including one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to perform the following steps:

[0101] Obtain a sample data table of the sample software;

[0102] Based on the sample data table, count form metric information related to the sample data table, where the form metric information includes at least one of the number of sample data tables, the number of sample data table key values, the number of processing channels of the sample data table key values, and the number of source channels of the sample data table key values;

[0103] Based on the form metric information and the basic metric information of the sample software, construct target metric information, and obtain the metric weight values of each target metric information through a random forest algorithm;

[0104] According to the metric weight values corresponding to each target metric information, screen out software quality evaluation metrics for constructing a software quality classification module from the target metric information.

[0105] In some embodiments of the present application, when the processor executes the computer program, the following steps are further implemented: extract the key values of each column key of the sample data table; count the number of sample data table key values according to the key values; obtain the source code of the sample software, and determine the data objects corresponding to the key values and the reference relationships of the data objects from the source code; obtain the number of processing channels of the sample data table key values and the number of source channels of the sample data table key values according to the reference relationships of the data objects.

[0106] In some embodiments of the present application, when the processor executes the computer program, the following steps are further implemented: sequentially select any two target metric information from the basic metric information and the form metric information as a pair of metric information; according to the source code of the sample software, obtain the association relationship between the pair of metric information; based on the association relationship of the pair of metric information, screen out target metric information from the basic metric information and the form metric information.

[0107] In some embodiments of the present application, when the processor executes the computer program, the following steps are further implemented: use the data values of the sample software on the software quality evaluation metrics as inputs and the software quality level of the sample software as outputs to fit a software quality evaluation model.

[0108] In some embodiments of the present application, when the processor executes the computer program, the following steps are further implemented: obtain the target data values of the target software on the software quality evaluation metrics; input the target data values into the software quality evaluation model to obtain the software quality level of the target software.

[0109] In some embodiments of the present application, a computer-readable storage medium is provided, storing a computer program, which is loaded by a processor, so that the processor executes the following steps:

[0110] Obtain the sample data table of the sample software;

[0111] Based on the sample data table, count the form index information related to the sample data table, where the form index information includes at least one of the number of sample data tables, the number of key values in the sample data table, the number of processing channels of the key values in the sample data table, and the number of source channels of the key values in the sample data table;

[0112] Based on the form index information and the basic index information of the sample software, construct the target index information, and obtain the index weight values of each target index information through the random forest algorithm;

[0113] According to the index weight values corresponding to each target index information, screen out the software quality evaluation indexes for constructing the software quality classification module from the target index information.

[0114] In some embodiments of the present application, when the computer program is executed by the processor, the following steps are further implemented: extract the key values of each column key of the sample data table; count the number of key values in the sample data table according to the key values; obtain the source code of the sample software, and determine the data object corresponding to the key value and the reference relationship of the data object from the source code; obtain the number of processing channels of the key values in the sample data table and the number of source channels of the key values in the sample data table according to the reference relationship of the data object.

[0115] In some embodiments of the present application, when the computer program is executed by the processor, the following steps are further implemented: sequentially select any two target index information from the basic index information and the form index information as an index information pair; according to the source code of the sample software, obtain the association relationship between the index information pairs; based on the association relationship of the index information pairs, screen out the target index information from the basic index information and the form index information.

[0116] In some embodiments of the present application, when the computer program is executed by the processor, the following steps are further implemented: use the data value of the sample software on the software quality evaluation index as the input, and use the software quality level of the sample software as the output to fit the software quality evaluation model.

[0117] In some embodiments of the present application, when the computer program is executed by the processor, the following steps are further implemented: obtain the target data value of the target software on the software quality evaluation index; input the target data value into the software quality evaluation model to obtain the software quality level of the target software.

[0118] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above various methods. Any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0119] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0120] The above has introduced in detail a method, apparatus, computer device, and computer-readable storage medium for extracting evaluation indicators of software quality provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for extracting evaluation indicators of software quality, characterized in that Including: Obtain a sample data table of the sample software, where the sample data table is a storage unit for the data processed by the sample software; Statistically calculate form index information related to the sample data table based on the sample data table, where the form index information includes at least one of the number of sample data tables, the number of key values in the sample data table, the number of processing channels for the key values in the sample data table, and the number of source channels for the key values in the sample data table; Construct target index information based on the form index information and the basic index information of the sample software, and obtain the index weight values of each target index information through a random forest algorithm; According to the index weight values corresponding to each target index information, screen out software quality evaluation indicators for constructing a software quality classification module from the target index information; Among them, the statistically calculating form index information related to the sample data table based on the sample data table includes: Extract the key values of each column key of the sample data table; Statistically calculate the number of key values in the sample data table according to the key values; Obtain the source code of the sample software, and determine the data object corresponding to the key value and the reference relationship of the data object from the source code; Obtain the number of processing channels for the key values in the sample data table and the number of source channels for the key values in the sample data table according to the reference relationship of the data object; Among them, the constructing target index information based on the form index information and the basic index information of the sample software includes: Select any two target index information from the basic index information and the form index information in sequence as an index information pair; According to the source code of the sample software, obtain the association relationship between the index information pairs; Based on the association relationship of the index information pairs, screen out target index information from the basic index information and the form index information.

2. The method according to claim 1, characterized in that, After screening out software quality evaluation indicators for constructing a software quality classification module from the target index information according to the index weight values corresponding to each target index information, it further includes: Use the data value of the sample software on the software quality evaluation indicator as the input and the software quality level of the sample software as the output to fit a software quality evaluation model.

3. The method according to claim 2, wherein After fitting the software quality evaluation model, it further includes: Obtain the target data value of the target software on the software quality evaluation indicator; Input the target data value into the software quality evaluation model to obtain the software quality level of the target software.

4. The method according to any one of claims 1 to 3, characterized in that The sample software is a payment software; the sample data table includes at least one of the payment order table, refund transaction table, and cash withdrawal transaction table of the payment software.

5. The method according to any one of claims 1 to 3, characterized in that, The basic index information includes at least one of the line error ratio, construction cost method, code coverage rate, code cohesion, code coupling, annotation density, cyclomatic complexity, instruction path length, number of interface categories, number of source code lines, execution time, loading time, and binary length of the sample software.

6. An apparatus for extracting evaluation indexes of software quality, characterized in that, The device includes: A data table acquisition module for obtaining a sample data table of the sample software, where the sample data table is a storage unit for the data processed by the sample software; A form index acquisition module, configured to statistically obtain form index information related to a sample data table based on the sample data table, where the form index information includes at least one of the number of sample data tables, the number of key values of the sample data table, the number of processing channels of the key values of the sample data table, and the number of source channels of the key values of the sample data table; An index weight acquisition module, configured to construct target index information based on the form index information and the basic index information of the sample software, and obtain the index weight values of each target index information through a random forest algorithm; An index screening module, configured to screen software quality evaluation indexes for constructing a software quality classification module from the target index information according to the index weight values corresponding to each target index information; Among them, the form index acquisition module is used for: Extracting the key values of each column key of the sample data table; Statistically obtaining the number of key values of the sample data table according to the key values; Obtaining the source code of the sample software, and determining the data object corresponding to the key value and the reference relationship of the data object from the source code; Obtaining the number of processing channels of the key values of the sample data table and the number of source channels of the key values of the sample data table according to the reference relationship of the data object; Among them, the index weight acquisition module is used for: Sequentially selecting any two target index information from the basic index information and the form index information as an index information pair; Obtaining the association relationship between the index information pairs according to the source code of the sample software; Based on the association relationship of the index information pairs, screening target index information from the basic index information and the form index information.

7. A computer device, characterized in that, The computer device includes: One or more processors; A memory; and One or more application programs, where the one or more application programs are stored in the memory and are configured to be executed by the processor to implement the software quality evaluation index extraction method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the software quality evaluation index extraction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Software quality evaluation method, device and equipment and computer readable storage medium

    CN110968512A

  • Multi-target object evaluation factor screening method and related equipment thereof

    CN112365202A