A method and system for end-cloud collaborative code defect detection based on ensemble learning
By deploying multiple defect detection models and user-side code vectorization tools in the cloud, end-cloud collaborative code defect detection is achieved, solving intellectual property protection issues and improving detection accuracy.
Patent Information
- Application Number
- CN202210107064.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-28
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-01-28
AI Technical Summary
Existing code defect detection tools have shortcomings in intellectual property protection. User-side deployment tools are easily cracked, and cloud-based deployment cannot protect user code assets.
By adopting an end-cloud collaboration method based on ensemble learning, multiple defect detection models and code vectorization tools are deployed on the cloud, combined with code vectorization and feature analysis on the user side, to achieve end-cloud collaborative code defect detection.
It effectively protects the intellectual property rights of users and the cloud, while improving the accuracy of code defect detection.
Smart Images

Figure CN114490397B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of code defect detection and end-cloud collaboration technology, and more specifically, to a method and system for end-cloud collaborative code defect detection based on ensemble learning. Background Art
[0002] Ensemble learning is a machine learning paradigm that trains multiple base learners to solve the same problem. Bagging, Boosting, and Stacking are three ensemble learning algorithms that approach machine learning problems from different perspectives and each has its own unique characteristics.
[0003] Cloud-native code defect detection tools built on cloud platforms have many advantages, including: reducing computing costs through virtualization technology and achieving economical utilization of computing resources; being able to meet computing needs of different scales and frequencies, and supporting elastic expansion and dynamic scaling of resources; facilitating the deployment, update, and automatic upgrade of detection tools and models; and being able to protect the intellectual property rights of both the detection tool side and the user side to the greatest extent.
[0004] In the field of software defect detection, researchers have developed code defect detection tools for various languages, which play an important role in improving software stability and security. However, current tools for code defect detection still have some problems.
[0005] Current static detection tools are deployed primarily in two ways: one involves installing detection software on the user's end, which doesn't require an internet connection. The other involves providing cloud-based detection services, requiring users to upload code for analysis and view the results. This approach, however, fails to effectively protect the intellectual property rights of detection tools, as they are easily hacked, potentially exposing the tool's designers to losses. Cloud-based deployment also fails to protect user intellectual property rights, as users must upload code to the cloud, a crucial company asset. Therefore, how to conduct defect detection while protecting the intellectual property rights of both parties is a worthy research and exploration. Summary of the Invention
[0006] In response to the problems encountered by existing static analysis methods in intellectual property protection, the present invention intends to conduct in-depth research on code defect detection algorithms based on deep learning, organically integrate multiple models and algorithms, construct hierarchical detection algorithms and models, maximize the integration of deep learning technology and cloud computing technology, improve the accuracy of code defect detection, and construct a code defect detection method and system based on end-cloud collaboration.
[0007] To achieve the above technical objectives, this application provides a method for detecting code defects in a collaborative end-to-end environment based on ensemble learning, including the following steps:
[0008] Collecting a first defect code of a first test sample, obtaining a first defect feature of the first defect code and a second test sample corresponding to the first defect feature;
[0009] Based on the similarity between the code to be tested and the second test sample, obtaining a third test sample and a second defect feature of the third test sample;
[0010] Obtaining a recognition accuracy rate of the code to be tested according to the second defect feature and the first defect feature corresponding to the third test sample;
[0011] Based on the recognition accuracy, a third defect feature of the second defect code is obtained by collecting the second defect code of the code to be tested, wherein the third defect feature is used to represent the code defect of the code to be tested;
[0012] The first defect feature, the second defect feature, the third defect feature, the first test sample, the second test sample, the first defect code, and the second defect code are deployed in the cloud. The user end analyzes the defect features of the code to be tested and uploads them to the cloud. The cloud end is used to obtain the code defects of the code to be tested by identifying the defect features and transmits them back to the user end.
[0013] Preferably, in the process of collecting the first defect code of the first test sample, the first test sample is detected by using several code defect detection tools to obtain the first defect code, wherein the first test sample includes several code defects.
[0014] Preferably, in the process of obtaining the first defect code, the first test sample is annotated by a manual annotation method, and the annotation result is compared with each code defect to obtain the first defect feature and the second test sample.
[0015] Preferably, in the process of obtaining the third test sample and the second defect feature of the third test sample, the similarities are ranked from high to low, and the second test sample with the highest similarity is obtained as the third test sample;
[0016] Obtaining a first defect feature corresponding to the third test sample as a fourth defect feature;
[0017] Detecting the third test sample using a code defect detection tool corresponding to the fourth defect feature to obtain the second defect feature;
[0018] The recognition accuracy is obtained according to the fourth defect feature and the second defect feature.
[0019] Preferably, the expression of recognition accuracy is:
[0020]
[0021] Where N represents the number of the third test samples, A(k,i) represents the recognition accuracy of code defect detection tool k for the i-th defect, and V(k,j,i) represents the first accurate recognition result of code defect detection tool k for the i-th defect of the j-th test sample.
[0022] Preferably, in the process of obtaining the third defect feature of the second defect code, the code to be tested is tested by a code defect detection tool to obtain the second defect code and a second accurate recognition result corresponding to the second defect code;
[0023] The second accurate recognition result and the recognition accuracy are weightedly summed, and a third defect feature is obtained based on the weighted summation result, wherein the weighted summation result corresponding to the third defect feature is greater than a preset threshold.
[0024] Preferably, the expression of weighted summation is:
[0025]
[0026] Wherein, E(k,new,i) represents the test result of the code defect detection tool k for the i-th defect of the code to be tested new, and new represents the code to be tested.
[0027] A device-cloud collaborative code defect detection system based on ensemble learning. The device-cloud collaborative code defect detection system is set up in the cloud and includes:
[0028] A data acquisition module, configured to acquire a first test sample and a code to be tested;
[0029] A first data processing module is configured to obtain a first defect code of a first test sample, obtain a first defect feature of the first defect code, and a second test sample corresponding to the first defect feature;
[0030] A similarity acquisition module is used to obtain the similarity between the code to be tested and the second test sample;
[0031] A second data processing module is configured to obtain a third test sample and a second defect feature of the third test sample based on the similarity;
[0032] A first data analysis module is configured to obtain a recognition accuracy rate of the code to be tested based on the second defect feature and the first defect feature corresponding to the third test sample;
[0033] The second data analysis module is configured to acquire a third defect feature of the second defect code by collecting the second defect code of the code to be tested based on the recognition accuracy, wherein the third defect feature is used to represent the code defect of the code to be tested.
[0034] Preferably, the code defect detection system further includes:
[0035] A data storage module, configured to store a first defect code, a second defect code, a first defect feature, a second defect feature, and a third defect feature;
[0036] A first display module is configured to display a third defect characteristic in the code to be tested by changing a display format of display content, wherein the display format includes bolding the font, changing the font color, and changing the font background color;
[0037] The second display module is used to display the third defect feature, wherein the second display module overlaps with the first display module and does not overlap with the code to be tested; the second display module is also used to display the defect code of the code to be tested corresponding to the third defect feature on the first display module by selecting the third defect feature of the second display module.
[0038] A computer system program is applied to a cloud system and is used to implement a code defect detection method when the system program is executed.
[0039] The present invention discloses the following technical effects:
[0040] The present invention utilizes end-cloud collaborative technology to distribute code vectorization tools to users and deploy detection models in the cloud. By separating the two steps of code vectorization and model detection, it effectively protects the intellectual property rights of the user end and the cloud, and can achieve a higher defect detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 Schematic diagram of the detailed detection process of the present invention;
[0043] Figure 2 This is a schematic diagram of the end-cloud collaborative deployment architecture described in the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0045] like Figure 1-2 As shown, the present invention provides a method for detecting code defects in a terminal-cloud collaborative manner based on ensemble learning, comprising the following steps:
[0046] Collecting a first defect code of a first test sample, obtaining a first defect feature of the first defect code and a second test sample corresponding to the first defect feature;
[0047] Based on the similarity between the code to be tested and the second test sample, obtaining a third test sample and a second defect feature of the third test sample;
[0048] Obtaining a recognition accuracy rate of the code to be tested according to the second defect feature and the first defect feature corresponding to the third test sample;
[0049] Based on the recognition accuracy, a third defect feature of the second defect code is obtained by collecting the second defect code of the code to be tested, wherein the third defect feature is used to represent the code defect of the code to be tested;
[0050] The first defect feature, the second defect feature, the third defect feature, the first test sample, the second test sample, the first defect code, and the second defect code are deployed in the cloud. The user end analyzes the defect features of the code to be tested and uploads them to the cloud. The cloud end is used to obtain the code defects of the code to be tested by identifying the defect features and transmits them back to the user end.
[0051] Further preferably, in the process of collecting the first defect code of the first test sample, the first test sample is detected by using several code defect detection tools to obtain the first defect code, wherein the first test sample includes several code defects.
[0052] Further preferably, in the process of obtaining the first defect code, the first test sample is annotated by a manual annotation method, and the annotation result is compared with each code defect to obtain the first defect feature and the second test sample.
[0053] Further preferably, in the process of obtaining the third test sample and the second defect feature of the third test sample, the similarities are ranked from high to low, and the second test sample with the highest similarity is obtained as the third test sample;
[0054] Obtaining a first defect feature corresponding to the third test sample as a fourth defect feature;
[0055] Detecting the third test sample using a code defect detection tool corresponding to the fourth defect feature to obtain the second defect feature;
[0056] The recognition accuracy is obtained according to the fourth defect feature and the second defect feature.
[0057] Further preferably, the expression of recognition accuracy is:
[0058]
[0059] Where N represents the number of the third test samples, A(k,i) represents the recognition accuracy of code defect detection tool k for the i-th defect, and V(k,j,i) represents the first accurate recognition result of code defect detection tool k for the i-th defect of the j-th test sample.
[0060] Further preferably, in the process of obtaining the third defect feature of the second defect code, the code to be tested is tested by a code defect detection tool to obtain the second defect code and a second accurate recognition result corresponding to the second defect code;
[0061] The second accurate recognition result and the recognition accuracy are weightedly summed, and a third defect feature is obtained based on the weighted summation result, wherein the weighted summation result corresponding to the third defect feature is greater than a preset threshold.
[0062] Further preferably, the expression of weighted summation is:
[0063]
[0064] Wherein, E(k,new,i) represents the test result of the code defect detection tool k for the i-th defect of the code to be tested new, and new represents the code to be tested.
[0065] A device-cloud collaborative code defect detection system based on ensemble learning. The device-cloud collaborative code defect detection system is set up in the cloud and includes:
[0066] A data acquisition module, configured to acquire a first test sample and a code to be tested;
[0067] A first data processing module is configured to obtain a first defect code of a first test sample, obtain a first defect feature of the first defect code, and a second test sample corresponding to the first defect feature;
[0068] A similarity acquisition module is used to obtain the similarity between the code to be tested and the second test sample;
[0069] A second data processing module is configured to obtain a third test sample and a second defect feature of the third test sample based on the similarity;
[0070] A first data analysis module is configured to obtain a recognition accuracy rate of the code to be tested based on the second defect feature and the first defect feature corresponding to the third test sample;
[0071] The second data analysis module is configured to acquire a third defect feature of the second defect code by collecting the second defect code of the code to be tested based on the recognition accuracy, wherein the third defect feature is used to represent the code defect of the code to be tested.
[0072] Further preferably, the code defect detection system further includes:
[0073] A data storage module, configured to store a first defect code, a second defect code, a first defect feature, a second defect feature, and a third defect feature;
[0074] A first display module is configured to display a third defect characteristic in the code to be tested by changing a display format of display content, wherein the display format includes bolding the font, changing the font color, and changing the font background color;
[0075] The second display module is used to display the third defect feature, wherein the second display module overlaps with the first display module and does not overlap with the code to be tested; the second display module is also used to display the defect code of the code to be tested corresponding to the third defect feature on the first display module by selecting the third defect feature of the second display module.
[0076] A computer system program is applied to a cloud system and is used to implement a code defect detection method when the system program is executed.
[0077] Example 1: The overall architecture of this invention is divided into two parts: the user end and the cloud. Multiple defect detection models are deployed in the cloud. Multiple detection models may be used for the same defect, and different models may be used for different defects. Furthermore, the cloud provides a large number of code vectorization tools that support code vectorization in various languages. The vectorization technologies used include, but are not limited to, attribute character-based, abstract syntax tree-based, and graph neural network-based vectorization.
[0078] Users first download a vectorization tool that matches their code and run it to vectorize and extract features. This process is irreversible, so the code cannot be restored from the vectorization results. The vectorized representation of the code is then uploaded to the cloud.
[0079] The cloud uses various models to analyze and test the code based on user input and generate corresponding output reports. Multiple reports are generated and consolidated, making them available for users to view online or download. Because cloud-based models are transparent to users, they enable continuous improvement of detection methods and the construction of new models, ultimately enhancing the quality of code defect detection. Cloud-based model deployment fully leverages the advantages of the cloud computing platform, enabling on-demand, on-demand use and high scalability, eliminating the hassles of user-side installation and deployment.
[0080] During code testing, static analysis tools and vectorization tools are distributed to users, and confidence prediction models and ensemble learning models are deployed in the cloud. This protects user intellectual property rights while also achieving a high defect detection accuracy rate. The specific processing steps include the following:
[0081] Step 1: Select multiple available code defect detection tools T1, T2, ..., T K , which can be open source or commercial tools;
[0082] Step 2: Target multiple code defects D1, D2, ..., D I , select or manually write a certain number of test programs C1, C2, ..., C from the actual code J ,These test cases may or may not have defects;
[0083] Step 3: Manually label all test cases. The specific method is as follows: j There is some defect D i When , it is marked as L(j,i)=1, otherwise it is marked as L(j,i)=0;
[0084] Step 4: Use each tool to test each test program and record the test results of each test case. k For a test case C j About Defect D i If the test result is positive, then E(k,j,i)=1, otherwise it is recorded as E(k,j,i)=0;
[0085] Step 5: Compare the tool test results with the manual annotation results. Specifically, for each defect, compare the tool test results with the manual annotation results. If the tool test results are the same as the manual annotation results, that is, L(j,i) = E(k,j,i), it means that the tool test is correct, recorded as V(k,j,i) = 1. Otherwise, it means that the tool test is wrong, that is, L(j,i) = E(k,j,i), recorded as V(k,j,i) = 0. All comparison results are stored in the database.
[0086] Step 6: For the new code under test C new , calculate the tested code and each test case C j The similarity of can be measured by using the currently known attribute counting-based method, structure measurement-based method, a combination of the two, and a neural network-based method.
[0087] Step 7: Rank the similarities from high to low and select the N most similar test cases;
[0088] Step 8: Based on the test results of each tool for N test cases, calculate the test accuracy of each tool one by one according to the defect category. The specific method is: read the comparison results of N test cases from the database, and for tool T k About the calculation accuracy of defect Di:
[0089]
[0090] Step 9: Use each tool to test the new code under test C new Perform the test and record the corresponding test results. A positive test result is recorded as E(k, new, i) = 1, and a negative test result is recorded as E(k, new, i) = -1;
[0091] Step 10: Based on the test accuracy of each tool for N test cases, perform weighted summation on the test results of the new code to obtain the comprehensive test results. The specific steps are as follows:
[0092]
[0093] Where A(k,i) represents the tool T k About Defect D i The test accuracy of tool T is E(k,new,i). k About new test case C new The test results.
[0094] Step 11: The user determines the new test case C based on the comprehensive test result S(i) new Is there any defect D i,When the comprehensive test result S(i) is larger, it means that the possibility of defects is greater.
[0095] Example 2: In order to solve the problem of user-side intellectual property protection, the present invention proposes a detection solution for end-cloud collaboration based on ensemble learning, such as Figure 2 As shown, the code vectorization tool TV is first distributed to users, and defect detection models M1, M2, …, Mk are deployed in the cloud. Users use the code vectorization tool TV to vectorize the source code S to obtain V. They then upload the vectorized code representation V to the cloud platform. The detection models M1, M2, …, Mk are then used to perform detection, generating a test result. Multiple results are then merged, deduplicated, and sorted to generate a test report, which is then returned to the user. Since the cloud only provides the vectorized code representation as input, users can review the content before uploading. This leverages the computing power of the cloud platform while protecting user intellectual property.
[0096] Users can download and use the appropriate code vectorization tool based on their needs. Code vectorization tools are packaged in containers for easy download, execution, and use. Users can also select one or more cloud-based models for testing based on cost needs.
[0097] The detection model can be any defect detection model built based on machine learning or deep learning. Each model is encapsulated in a container and automatically deployed and run according to the detection tasks submitted by the user.
[0098] When the system is running, the code vectorization tool can be packaged into a Docker container and placed in the container image repository. Users can use it by following the steps below:
[0099] Step 1: Download the Docker container and run it;
[0100] Step 2: The user uses a vectorization tool to generate a vectorized representation V of the code;
[0101] Step 3: Upload the vectorized representation V of the code to the cloud;
[0102] Step 4: Multiple base models A1, A2, ..., AK in the cloud take the vectorized representation V of the uploaded code as input and output code detection reports R1, R2, ..., RK;
[0103] Step 5: The cloud merges, removes duplicates, and sorts the model's detection reports R1, R2, ..., RK;
[0104] Step 6: The cloud generates a test report and sends it back to the user.
[0105] The present invention specifically includes the following steps of a code defect detection algorithm: Step 1: selecting open source tools BIT, WAP, Rips and a commercial tool Fortify as detection tools;
[0106] Step 2: For eight types of defects in PHP programs, including OS command injection, SQL injection, and LDAP injection, select some test cases from the published standard test cases and manually write a certain number of test cases;
[0107] Step 3: Manually label all test cases;
[0108] Step 4: Test each test program using BIT, WAP, Rips, and Fortify respectively, and record the test results of each test case;
[0109] Step 5: Compare the tool test results with the manual annotation results and record them in the database;
[0110] Step 6: For the new code under test, calculate the similarity between the code under test and each test case;
[0111] Step 7: Rank the similarities from high to low and select the 100 test cases with the highest similarity
[0112] Step 8: Calculate the test accuracy of BIT, WAP, Rips, and Fortify based on the test results of each tool for 100 test cases;
[0113] Step 9: Use BIT, WAP, Rips, and Fortify to test the new code and record the corresponding test results;
[0114] Step 10: Based on the test accuracy of each tool for 100 test cases, perform weighted summation on the test results of the new code to obtain the comprehensive test results;
[0115] Step 11: Give the final test results based on the comprehensive test results and the preset threshold.
[0116] The present invention proposes a deep learning-based end-cloud collaborative code defect detection method and system, which can, on the one hand, improve the accuracy of code defect detection, and on the other hand, solve the intellectual property issues of the user end and the cloud, so that users can obtain a higher code defect detection accuracy without directly providing the code.
Claims
1. A method for detecting code defects in a terminal-cloud collaborative manner based on ensemble learning, characterized in that: The following steps are involved: Collecting a first defect code of a first test sample, obtaining a first defect feature of the first defect code and a second test sample corresponding to the first defect feature; Based on the similarity between the code to be tested and the second test sample, obtaining a third test sample and a second defect feature of the third test sample; Obtaining a recognition accuracy rate of the code to be tested according to the second defect feature and the first defect feature corresponding to the third test sample; Based on the recognition accuracy, acquiring a second defect code of the code to be tested to obtain a third defect feature of the second defect code, wherein the third defect feature is used to represent a code defect of the code to be tested; The first defect characteristic, the second defect characteristic, the third defect characteristic, the first test sample, the second test sample, the first defect code, and the second defect code are deployed on the cloud. The user terminal analyzes the defect characteristics of the code to be tested and uploads them to the cloud. The cloud terminal is configured to obtain the code defect of the code to be tested by identifying the defect characteristics and transmit the obtained code defect back to the user terminal. In the process of collecting the first defect code of the first test sample, the first test sample is detected by using several code defect detection tools to obtain the first defect code, wherein the first test sample includes several code defects; In the process of obtaining the first defect code, the first test sample is annotated by a manual annotation method, and the first defect feature and the second test sample are obtained by comparing the annotated result with each of the code defects; In the process of obtaining the third test sample and the second defect feature of the third test sample, ranking the similarities from high to low, and obtaining the second test sample with the highest similarity as the third test sample; obtaining the first defect feature corresponding to the third test sample as a fourth defect feature; detecting the third test sample according to the code defect detection tool corresponding to the fourth defect feature to obtain the second defect feature; Obtaining the recognition accuracy rate according to the fourth defect feature and the second defect feature; In the process of obtaining the third defect feature of the second defect code, the code to be tested is tested by the code defect detection tool to obtain the second defect code and a second accurate recognition result corresponding to the second defect code; The second accurate recognition result and the recognition accuracy rate are weightedly summed, and the third defect feature is obtained according to the weighted summation result, wherein the weighted summation result corresponding to the third defect feature is greater than a preset threshold.
2. The method for detecting code defects in a terminal-cloud collaborative manner based on ensemble learning according to claim 1, characterized in that: The expression of the recognition accuracy is: Where, represents the number of the third test samples, Indicates the code defect detection tool k for the The recognition accuracy of the defects Represents a code defect detection tool For the first The first test sample The first accurate identification result of the defect.
3. The method for detecting code defects in a terminal-cloud collaborative manner based on ensemble learning according to claim 1, characterized in that: The expression of the weighted summation is: in, Represents a code defect detection tool For the code under test No. The test results of the defect Represents the code to be tested.
4. A terminal-cloud collaborative code defect detection system based on ensemble learning, characterized by: The end-cloud collaborative code defect detection system is set up in the cloud and includes: A data acquisition module, configured to acquire a first test sample and a code to be tested; a first data processing module, configured to obtain a first defect code of a first test sample, obtain a first defect feature of the first defect code, and a second test sample corresponding to the first defect feature; A similarity acquisition module, configured to acquire the similarity between the code to be tested and the second test sample; A second data processing module is configured to obtain a third test sample and a second defect feature of the third test sample based on the similarity; a first data analysis module, configured to obtain a recognition accuracy rate of the code to be tested based on the second defect feature and the first defect feature corresponding to the third test sample; a second data analysis module, configured to acquire, based on the recognition accuracy, a second defect code of the code to be tested and obtain a third defect feature of the second defect code, wherein the third defect feature is used to indicate a code defect of the code to be tested; The first defect characteristic, the second defect characteristic, the third defect characteristic, the first test sample, the second test sample, the first defect code, and the second defect code are deployed on the cloud. The user terminal analyzes the defect characteristics of the code to be tested and uploads them to the cloud. The cloud terminal is configured to obtain the code defect of the code to be tested by identifying the defect characteristics and transmit the obtained code defect back to the user terminal. In the process of collecting the first defect code of the first test sample, the first test sample is detected by using several code defect detection tools to obtain the first defect code, wherein the first test sample includes several code defects; In the process of obtaining the first defect code, the first test sample is annotated by a manual annotation method, and the first defect feature and the second test sample are obtained by comparing the annotated result with each of the code defects; In the process of obtaining the third test sample and the second defect feature of the third test sample, ranking the similarities from high to low, and obtaining the second test sample with the highest similarity as the third test sample; obtaining the first defect feature corresponding to the third test sample as a fourth defect feature; detecting the third test sample according to the code defect detection tool corresponding to the fourth defect feature to obtain the second defect feature; Obtaining the recognition accuracy rate according to the fourth defect feature and the second defect feature; In the process of obtaining the third defect feature of the second defect code, the code to be tested is tested by the code defect detection tool to obtain the second defect code and a second accurate recognition result corresponding to the second defect code; The second accurate recognition result and the recognition accuracy rate are weightedly summed, and the third defect feature is obtained according to the weighted summation result, wherein the weighted summation result corresponding to the third defect feature is greater than a preset threshold.
5. The end-cloud collaborative code defect detection system based on ensemble learning according to claim 4 is characterized by: The code defect detection system further includes: A data storage module, configured to store the first defect code, the second defect code, the first defect feature, the second defect feature, and the third defect feature; a first display module, configured to display the third defect characteristic in the code to be tested by changing a display format of display content, wherein the display format includes bolding the font, changing the font color, and changing the font background color; The second display module is used to display the third defect feature, wherein the second display module overlaps with the first display module and does not overlap with the code to be tested; the second display module is also used to display the defect code of the code to be tested corresponding to the third defect feature on the first display module by selecting the third defect feature of the second display module.
6. A computer system program, applied to a cloud system, characterized in that: When the system program is executed, it is used to implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Code defect detection method and device based on cross validation
CN108763092A
Vehicle-mounted computing power network user demand prediction method, system, device and medium
CN113435472A