Software quality evaluation method based on AHP and entropy evaluation method
By adopting the evaluation method combined with AHP and entropy value method in software quality evaluation, the subjectivity, efficiency and data uniformity in traditional evaluation methods are solved, and automated and multi-dimensional software quality evaluation is realized, which improves the objectiveness of evaluation. Sex and accuracy.
Patent Information
- Application Number
- CN202411253919.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional software quality evaluation methods have problems such as strong subjectivity, low efficiency, inconsistent data, fuzzy evaluation standards and low degree of automation, and cannot meet the needs of modern software development for high quality and efficiency.
The software quality evaluation method based on AHP and entropy value method is adopted, and software quality data is automatically collected and standardized by connecting multiple code scanning tools. The evaluation model is constructed using AHP and entropy value method to achieve objective and accurate evaluation of software quality.
It effectively solves the subjectivity, low efficiency, and inconsistent data of traditional manual evaluation, provides strong technical support for software quality assurance, and realizes automated and multi-dimensional software code quality evaluation.
Smart Images

Figure CN119396677A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an intelligent software quality assessment method, and more specifically to a software quality assessment method based on AHP and entropy method. The system establishes a complete quality indicator system by integrating multiple industry-leading static code analysis tools. By deeply mining and integrating the output results of the tools, an automated and multi-dimensional assessment of software code quality is achieved. The system can provide accurate quality feedback to the software development team, helping it to continuously improve software quality. Background Art
[0002] Traditional software quality measurement methods mainly rely on manual work, which has the following significant problems:
[0003] 1. High subjectivity: The quality assessment results are highly dependent on the engineer’s experience and mastery of the tools. The assessment results of different engineers may vary greatly.
[0004] 2. Inefficiency: Manual code review is inefficient and cannot cope with the quality assessment of large-scale code bases.
[0005] 3. Inconsistent data: The output results of different static code scanning tools are in inconsistent formats, making it difficult to conduct unified analysis and comparison.
[0006] 4. Fuzzy evaluation criteria: The lack of objective and quantitative quality evaluation criteria leads to unconvincing evaluation results.
[0007] 5. Low degree of automation: The quality assessment process has a low degree of automation, making it difficult to achieve continuous quality monitoring.
[0008] Summary: Traditional methods have deficiencies in objectivity, efficiency, data consistency, evaluation criteria, and degree of automation, and cannot meet the urgent needs of modern software development for high quality and high efficiency. Summary of the invention
[0009] In view of the problems existing in the prior art, the present invention proposes a software quality evaluation method based on AHP and entropy method, which is a brand-new software quality evaluation method. By connecting multiple code scanning tools in series, the software quality data is automatically collected and standardized, and then the evaluation model is constructed using AHP and entropy method to achieve objective and accurate evaluation of software quality. This method effectively solves the problems of subjectivity, low efficiency, and inconsistent data in traditional manual evaluation, and provides strong technical support for software quality assurance.
[0010] Glossary:
[0011] 1. AHP: Analytic Hierarchy Process, a multi-criteria decision analysis method, was proposed by American operations researcher Thomas L. Saaty in the late 1970s. AHP decomposes decision problems into multiple levels and elements by establishing a hierarchical model, and then determines the relative importance of each element through pairwise comparison, and then conducts comprehensive evaluation and decision-making.
[0012] 2. Entropy method: Entropy method is an objective weighting method that determines the weight of an indicator by calculating the degree of variation of the indicator. The core idea is that the greater the degree of variation of the indicator, the more information it provides, the greater the role it plays in the comprehensive evaluation, and therefore the greater the weight should be.
[0013] 3. Code cloning: copy a copy of the code from the remote repository to the local one.
[0014] 4. SonarQube: An open source code quality management platform that is mainly used to detect code quality and provide corresponding feedback and suggestions. It supports more than 25 programming languages including Java, C#, C / C++, JavaScript, Python, etc.
[0015] 5. CheckStyle: A code standard checking tool, mainly used to check whether the Java code is written in accordance with the coding standards.
[0016] 6. PMD (Programming Mistake Detector): A Java code checking tool that is mainly used to check potential problems and bad practices in the code.
[0017] 7. SpotBugs: A static analysis tool for finding potential problems in compiled bytecodes. It statically analyzes bytecodes to find bugs in Java programs that may not show up until the actual run, but may have a negative impact on the correctness, stability, and performance of the program.
[0018] 8. GitStats: A tool for analyzing Git repositories that can generate various statistics and compare them in the form of charts.
[0019] 9. Jacoco: An open source Java code coverage detection tool used to detect code unit test coverage.
[0020] 10. DependencyCheck: An open source tool for identifying known public vulnerabilities in project dependencies.
[0021] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions: a software quality evaluation method based on AHP and entropy method, based on the ISO 25010 standard, combines AHP and entropy method, and evaluates software quality by constructing a multi-level evaluation system; the AHP is mainly used to determine the importance weight of each quality characteristic, and the entropy law objectively calculates the weight of each indicator at the characteristic level based on the degree of variation of the indicator.
[0022] Furthermore, it can realize the automatic collection of software quality indicators and store the metric metadata persistently;
[0023] The specific steps are as follows:
[0024] Step 1: Code cloning and scanning:
[0025] (11) Clone the source code of the target software;
[0026] (12) Use SonarQube, CheckStyle, PMD, SpotBugs, GitStats, Jacoco, and DependencyCheck static code scanning tools in turn to perform a comprehensive scan of the cloned code;
[0027] Step 2: Report generation and analysis:
[0028] (21) Each scanning tool generates a corresponding software quality report;
[0029] (22) Analyze these reports and extract useful quality indicator data;
[0030] (23) Clean the extracted data to remove redundant or abnormal data;
[0031] (24) The cleaned data is stored to provide a basis for subsequent analysis.
[0032] Further, step three, build a hierarchical model:
[0033] (31) Target layer: software quality;
[0034] (32) Criteria layer: Determine multiple quality characteristics for evaluating software quality;
[0035] (33) Indicator layer: Select specific and quantifiable indicators for each quality characteristic;
[0036] Step 4: Establish a judgment matrix and calculate the weights:
[0037] (41) AHP method: Invite multiple experts to compare the characteristics of the criterion layer in pairs and construct a judgment matrix; by calculating the maximum eigenvalue and eigenvector, the weight of each characteristic is obtained;
[0038] (42) Consistency check: Perform consistency check on the judgment matrix to ensure the consistency of expert judgment;
[0039] Step 5: Calculate indicator weights:
[0040] (51) Entropy method: Based on the actual data of the indicator, the entropy value of each indicator is calculated to reflect the degree of dispersion of the indicator. The smaller the entropy value, the greater the amount of information provided by the indicator and the higher the weight.
[0041] (52) Normalization: Normalize the entropy value to obtain the weight of each indicator;
[0042] Step 6: Comprehensive calculation:
[0043] (61) Weighted summation: multiply the weight of each characteristic by the corresponding indicator weight to obtain the comprehensive weight of each indicator;
[0044] (62) Comprehensive evaluation: Calculate the comprehensive quality score of each software project based on the comprehensive weight and actual score of each indicator.
[0045] Furthermore, the quality characteristics include maintainability, testability, reliability, reusability, supportability and security.
[0046] Compared with the prior art, the beneficial effects of the present invention are:
[0047] First: Automated evaluation:
[0048] Automated data collection: Through automated scripts or interfaces, multiple code scanning tools can be called to automatically obtain quality data.
[0049] Automated calculation: Use computer programs to automatically calculate indicator weights, comprehensive scores, etc., reducing human intervention.
[0050] Automatic report generation: Automatically generate clear and intuitive quality assessment reports for developers to review and analyze.
[0051] Second: Establishment of evaluation model:
[0052] Hierarchical model: Establish a hierarchical quality evaluation model to decompose software quality into multiple levels to facilitate layer-by-layer analysis.
[0053] Comprehensive evaluation: Based on the weights calculated by AHP and entropy method, each indicator is weighted and summed to obtain the final software quality score.
[0054] Dynamic adjustment: As software development progresses, the evaluation model can be dynamically adjusted to adapt to changing needs.
[0055] Third: Standardization:
[0056] Multi-tool integration: By integrating multiple code scanning tools such as SonarQube and Checkstyle, it is possible to collect software quality data from multiple dimensions, such as code complexity, code coverage, potential defects, etc.
[0057] Data standardization: Unify the data generated by different tools and establish a standardized data model to facilitate subsequent analysis and comparison.
[0058] Data richness: Multi-tool integration makes the acquired data richer, thus reflecting software quality more comprehensively.
[0059] Fourth: The organic combination of AHP and entropy method:
[0060] Determine weights using the AHP method: By using expert scoring, the importance of different quality characteristics (such as maintainability, testability, etc.) is quantified using the AHP method to determine the weight of each characteristic. This makes the evaluation results more consistent with human subjective cognition.
[0061] Objective evaluation by entropy method: The entropy method objectively calculates the weight of each indicator based on the degree of variation of the indicator, thus avoiding interference from human factors.
[0062] Complementary advantages: The combination of AHP and entropy method not only takes into account the subjective judgment of experts, but also utilizes objective data, making the evaluation results more comprehensive and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 The invention discloses a software quality index collection system for a software quality evaluation method based on AHP and entropy value method.
[0064] Figure 2 The invention discloses an AHP hierarchical analysis method flow chart of a software quality evaluation method based on AHP and entropy value method.
[0065] Figure 3 The invention discloses a software quality evaluation model of a software quality evaluation method based on AHP and entropy value method. DETAILED DESCRIPTION
[0066] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0067] The present invention provides a software quality index collection system for a software quality evaluation method based on AHP and entropy value method. The specific steps are as follows. Figure 1 .
[0068] Step 1: Get the code: Clone the code from the remote repository to the local development environment.
[0069] Step 2: Configuration initialization: Execute the automated script to configure the code development environment according to project requirements.
[0070] Step 3. Static scanning: Use multiple static code analysis tools such as SonarQube, CheckStyle, PMD, SpotBugs, GitStats, Jacoco, DependencyCheck, etc. to perform in-depth code scanning to detect potential code quality issues.
[0071] Step 4: Report Generation: Each tool generates a detailed report containing code quality indicators.
[0072] Step 5: Data cleaning and integration: Clean and convert the report data generated by each tool into a standardized quality data format.
[0073] Step 6. Data storage: Store the cleaned quality data in the database for subsequent analysis and comparison.
[0074] The present invention also provides an AHP hierarchical analysis process design of a software quality evaluation method based on AHP and entropy value method. The specific steps are as follows. Figure 2 .
[0075] Step 1: Metric model configuration
[0076] Determine the evaluation goal: clarify the purpose of this measurement and evaluate the software quality.
[0077] Construct a hierarchical model: Decompose the evaluation objectives into multiple levels, such as the objective level, the criteria level, and the indicator level. The criteria level represents the various aspects that affect the evaluation objectives, and the indicator level is the specific quantifiable indicators.
[0078] Select metrics: Select appropriate metrics based on the evaluation objectives and hierarchy.
[0079] Step 2: Normalize the measurement data
[0080] Data Collection: Collect data related to the selected metrics, such as lines of code, number of defects, response time, etc.
[0081] Data preprocessing: Clean and denoise the raw data to ensure the accuracy and reliability of the data.
[0082] Data normalization: Unify data of different dimensions to the same scale for easy comparison and calculation. The normalization method uses minimum-maximum normalization.
[0083] Step 3: Pairwise comparison of metrics
[0084] Construct a judgment matrix: For each element (indicator) at the same level, compare them one by one to determine their importance. Usually a 1-9 scale is used, where 1 means that two elements are equally important and 9 means that one element is much more important than the other.
[0085] Construct a judgment matrix: The results of pairwise comparisons are combined into a judgment matrix.
[0086] Step 4: Determine the weight of the matrix and use the eigenvalue method to calculate the maximum eigenvalue and corresponding eigenvector of the judgment matrix to obtain the weight of each element.
[0087] Step 5: Consistency Check
[0088] Consistency index CI: Calculate the consistency index CI to determine the consistency of the judgment matrix.
[0089] Random consistency index RI: Refer to the random consistency index table to obtain the RI value corresponding to the order of the judgment matrix.
[0090] Consistency ratio CR: Calculate the consistency ratio CR = CI / RI. If CR is less than 0.1, the judgment matrix is considered to have satisfactory consistency.
[0091] Step 6: Hierarchical sorting
[0092] Calculate weights layer by layer: Starting from the bottom layer, calculate the weight of each element layer by layer until the weight of the target layer is obtained.
[0093] Comprehensive weight: Add the weights of each level to obtain the comprehensive weight of each indicator.
[0094] Step 7: Measure the results
[0095] Comprehensive evaluation: The comprehensive score of software quality is calculated based on the comprehensive weight and actual score of each indicator.
[0096] Result visualization: Use radar charts to visualize quality scores and present the quality status of the system more intuitively.
[0097] This embodiment also provides a software quality evaluation model based on the software quality evaluation method of AHP and entropy value method, see Figure 3This model is based on ISO 25010 and integrates empirical data from more than 800 open source projects to build a multi-dimensional software quality evaluation system. The specific software quality evaluation model is as follows:
[0098] 1. Maintainability
[0099] Scale indicators: measure the size and complexity of the code base, including the number of lines of code, comment ratio, average number of lines of code for classes and functions, etc. These indicators can reflect the understandability and difficulty of modification of the code.
[0100] Complexity indicators: evaluate the complexity of the code, such as cyclomatic complexity, cognitive complexity, etc. Highly complex code is often difficult to understand and modify.
[0101] Code smell: refers to bad design patterns or coding habits in the code that may affect maintainability, such as overly long functions, duplicated code, etc.
[0102] 2. Testability
[0103] Coverage: refers to the proportion of code covered by test cases. The higher the coverage, the more comprehensive the test and the more guaranteed the quality of the software.
[0104] 3. Reliability
[0105] Defect quantity and density: directly reflects the number of defects and defect distribution of the software.
[0106] Error density: refers to the number of errors in a unit of code, which can more intuitively reflect the reliability of the software.
[0107] 4. Reusability
[0108] Code duplication: measures the degree of code reuse. Too much duplicated code will increase maintenance costs and reduce the reusability of the code.
[0109] 5. Supportability
[0110] Submission records: reflect the activity of the project and the participation of developers.
[0111] Project age: Older projects are likely to have accumulated more technical debt.
[0112] Number of developers: Projects involving multiple developers may have problems such as inconsistent code styles.
[0113] Active days: reflects the development cycle and stability of the project.
[0114] 6. Security
[0115] Security vulnerabilities: refers to vulnerabilities in the code that may be exploited, such as SQL injection, cross-site scripting attacks, etc.
[0116] Vulnerability density: A measure of the number of vulnerabilities per unit of code.
[0117] Third-party dependency vulnerabilities: refers to vulnerabilities in third-party libraries or components that the software depends on.
[0118] The software quality evaluation method based on AHP and entropy method described in this embodiment achieves the following effects:
[0119] Comprehensiveness: It covers multiple dimensions of software quality and can conduct a comprehensive assessment of software quality.
[0120] Quantitativeness: Through a series of metrics, software quality is converted into quantifiable data for easy comparison and analysis.
[0121] Objectivity: Evaluation is based on objective data to reduce the impact of human factors.
[0122] Operability: By analyzing the evaluation results, the software quality can be improved in a targeted manner.
[0123] Practicality: This model can be directly applied to enterprise software project quality assessment.
[0124] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A software quality evaluation method based on AHP and entropy method, characterized by: Based on the ISO 25010 standard, the AHP and entropy methods are combined to evaluate software quality by building a multi-level evaluation system; the AHP is mainly used to determine the importance weight of each quality characteristic, while the entropy method objectively calculates the weight of each indicator at the characteristic level based on the degree of variation of the indicator.
2. The software quality evaluation method based on AHP and entropy method according to claim 1 is characterized in that: It can realize automatic software quality indicator collection and store the metric metadata persistently; The specific steps are as follows: Step 1: Code cloning and scanning: (11) Clone the source code of the target software; (12) Use SonarQube, CheckStyle, PMD, SpotBugs, GitStats, Jacoco, and DependencyCheck static code scanning tools in turn to perform a comprehensive scan of the cloned code; Step 2: Report generation and analysis: (21) Each scanning tool generates a corresponding software quality report; (22) Analyze these reports and extract useful quality indicator data; (23) Clean the extracted data to remove redundant or abnormal data; (24) The cleaned data is stored to provide a basis for subsequent analysis.
3. The software quality evaluation method based on AHP and entropy method according to claim 2 is characterized in that: Step 3: Build a hierarchical model: (31) Target layer: software quality; (32) Criteria layer: Determine multiple quality characteristics for evaluating software quality; (33) Indicator layer: Select specific and quantifiable indicators for each quality characteristic; Step 4: Establish a judgment matrix and calculate the weights: (41) AHP method: Invite multiple experts to compare the characteristics of the criterion layer in pairs and construct a judgment matrix; by calculating the maximum eigenvalue and eigenvector, the weight of each characteristic is obtained; (42) Consistency check: Perform consistency check on the judgment matrix to ensure the consistency of expert judgment; Step 5: Calculate indicator weights: (51) Entropy method: Based on the actual data of the indicator, the entropy value of each indicator is calculated to reflect the degree of dispersion of the indicator. The smaller the entropy value, the greater the amount of information provided by the indicator and the higher the weight. (52) Normalization: Normalize the entropy value to obtain the weight of each indicator; Step 6: Comprehensive calculation: (61) Weighted summation: multiply the weight of each characteristic by the corresponding indicator weight to obtain the comprehensive weight of each indicator; (62) Comprehensive evaluation: Calculate the comprehensive quality score of each software project based on the comprehensive weight and actual score of each indicator.
4. The software quality evaluation method based on AHP and entropy method according to claim 1 is characterized in that: The quality characteristics include maintainability, testability, reliability, reusability, supportability and security.
Citation Information
Cited By
Software development quality evaluation system based on big data
CN121434054A