Embedded software compiling error intelligent collection method and system

By listening to the compilation process, obtaining error information, establishing an error knowledge base, and building a neural network model to predict error types, it solves the problem of incomplete compilation error information and inconsistent format in embedded software, and realizes efficient and accurate compilation error handling, improving the Development efficiency and software quality.

CN119396688APending Publication Date: 2025-02-07SINO TRUK JINAN POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411367337.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, the compile-time error information of embedded software compilers is not detailed enough, and it is difficult to determine the exact location or cause of the error. The differences between different hardware platforms and compilers lead to inconsistent error information formats, which increases the complexity of analysis.

Method used

By listening to the compilation process, obtain error information and related metadata, establish an error knowledge base, and build a neural network model for compiling error recognition, use the error knowledge base to train the neural network model, predict error types, and analyze the association of error types. and code patterns and compile settings that cause specific errors.

Benefits of technology

It realizes efficient and precise processing and resolution of compilation errors in embedded software development, improves development efficiency, software quality and security, reduces the burden of manual inspection, quickly locates error sources, and shortens repair time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396688A_ABST
    Figure CN119396688A_ABST
Patent Text Reader

Abstract

The invention provides a method and a system for intelligently collecting compiling errors of embedded software. The method comprises the following steps: acquiring error information and related metadata generated in a compiling process by monitoring the compiling process; establishing an error knowledge base by utilizing the error information and the related metadata; constructing a neural network model for compiling error recognition, and training the neural network model by using the error knowledge base to obtain a trained neural network model; inputting the preprocessed compiling error information features into the trained neural network model, and outputting a predicted error type; and analyzing the predicted error types, determining relevance between software compiling errors, and finding out code modes and compiling settings which cause specific errors. Based on the method, the invention further provides a system for intelligently collecting the compiling errors of the embedded software. According to the method, compiling errors in the embedded software development process can be efficiently and accurately processed and solved, so that the development efficiency, the software quality and the safety are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer software, and in particular relates to an embedded software compilation error intelligent collection method and system. Background Art

[0002] Currently, with the increasing complexity of systems, the scale and quality of embedded software have become critical. Embedded software often contains tens of thousands or even hundreds of thousands of lines of code, involving multiple programming languages ​​and libraries, which increases the possibility of errors and the complexity of detection. The development cycle is tight, and companies need to iterate products quickly, while manually finding and fixing compilation errors consumes a lot of time and resources. Embedded software often needs to be compiled across multiple hardware platforms and operating systems. Each platform may have different compilers and tool chains, which increases the complexity of error management.

[0003] The compile-time error information of the embedded software compiler disclosed in the prior art is not detailed enough, making it difficult to determine the exact location or cause of the error, which poses a challenge to solving compilation problems; differences between different hardware platforms and compilers may lead to inconsistent error message formats, increasing the complexity of analysis; compilation errors may change due to software updates or environmental changes, and the system needs to be able to adapt to these dynamic conditions; and the user interface is not intuitive enough, making it difficult for non-professional users to understand and utilize the analysis results provided by the system. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes an embedded software compilation error intelligent collection method and system, which can efficiently and accurately process and solve compilation errors in the embedded software development process to improve development efficiency, software quality and security.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] An embedded software compilation error intelligent collection method comprises the following steps:

[0007] Acquire error information and related metadata generated during the compilation process by monitoring the compilation process; and establish an error knowledge base using the error information and related metadata;

[0008] Constructing a neural network model for compiling error recognition, and training the neural network model using the error knowledge base to obtain a trained neural network model;

[0009] The preprocessed compilation error information features are input into the trained neural network model to output the predicted error type; and the predicted error type is analyzed to determine the correlation between software compilation errors and find out the code pattern and compilation setting that cause specific errors.

[0010] Furthermore, the method also includes: sending the predicted error type and the result of the error type analysis to the developer, and providing the developer with error explanation and repair guidance.

[0011] Furthermore, the method also includes, when an unrecognized error is re-recognized or an existing error is resolved, notifying relevant personnel in real time to improve response speed.

[0012] Furthermore, the neural network model includes an input layer, a hidden layer and an output layer;

[0013] The input layer is used to receive the features of the compilation error information; the features of the compilation error information include error message text, file path, compiler version, error location and context code snippet

[0014] The hidden layer includes a plurality of fully connected layers for extracting features and learning nonlinear relationships;

[0015] The output layer is used to output the predicted error type.

[0016] Furthermore, the process of analyzing the predicted error type includes:

[0017] Classify the compilation error information, analyze the order in which the compilation error information appears, and view the context information provided in the compilation error information to analyze the location relationship of different errors in the code and determine whether there are related modules or function call chains.

[0018] Further, the process of finding the code pattern that causes the specific error includes:

[0019] Identify common error patterns, conduct code reviews, and compare and analyze normal code with similar functions to identify incorrect code patterns.

[0020] Further, find out which compilation settings cause a specific error, including:

[0021] Check the compiler version, check the compilation options, and make sure that all dependent libraries are correctly installed and found by the compiler, check whether the library version is compatible with the software, and whether the library path is correctly set in the compilation environment.

[0022] Furthermore, the method also includes converting the ambiguous error information into a clear error category, specifically:

[0023] Extract key features from fuzzy error messages to construct fuzzy sets, each of which represents the typical features of the category;

[0024] Calculate the degree of membership of each ambiguous error message to each clear error category, that is, the degree to which the error message belongs to a certain category;

[0025] According to the degree of membership, it is decided to classify the ambiguous error information into which clear error category;

[0026] The definition of fuzzy sets is adjusted according to the result feedback of error handling to improve the accuracy of classification.

[0027] Furthermore, the method also includes adopting a hierarchical anomaly detection algorithm to analyze errors from local to global levels and identify potential complex error patterns.

[0028] The present invention also proposes an embedded software compilation error intelligent collection system, including an acquisition module, a model building module and a search module;

[0029] The acquisition module is used to acquire error information and related metadata generated during the compilation process by monitoring the compilation process; and to establish an error knowledge base using the error information and related metadata;

[0030] The model building module is used to build a neural network model for compiling error recognition, and train the neural network model using the error knowledge base to obtain a trained neural network model;

[0031] The search module is used to input the pre-processed compilation error information features into the trained neural network model, output the predicted error type; and analyze the predicted error type to determine the correlation between software compilation errors and find out the code pattern and compilation settings that cause specific errors.

[0032] The effects provided in the content of the invention are only the effects of the embodiments, not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:

[0033] The present invention proposes an embedded software compilation error intelligent collection method and system, the method comprising the following steps: obtaining error information and related metadata generated in the compilation process by monitoring the compilation process; establishing an error knowledge base using the error information and related metadata; constructing a neural network model for compilation error recognition, training the neural network model using the error knowledge base, and obtaining a trained neural network model; inputting the preprocessed compilation error information features into the trained neural network model, outputting the predicted error type; and analyzing the predicted error type, determining the correlation between software compilation errors, and finding out the code pattern and compilation settings that cause specific errors. Based on an embedded software compilation error intelligent collection method, an embedded software compilation error intelligent collection system is also proposed. The present invention can efficiently and accurately process and solve compilation errors in the embedded software development process to improve development efficiency, software quality and security.

[0034] The present invention uses an automated tool to monitor the compilation process in real time, discover and report errors immediately, and reduce the burden of manual inspection. Through intelligent analysis technology, the source of the error can be quickly located, helping developers to quickly understand the cause of the error and shorten the repair time. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flow chart of an embedded software compilation error intelligent collection method proposed in Embodiment 1 of the present invention;

[0036] Figure 2 This is a schematic diagram of an embedded software compilation error intelligent collection system proposed in Example 2 of the present invention. DETAILED DESCRIPTION

[0037] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits the description of known components and processing techniques and processes to avoid unnecessary limitations on the present invention.

[0038] Example 1

[0039] Embodiment 1 of the present invention proposes an embedded software compilation error intelligent collection method, which is used to solve the technical problems existing in the compilation error search in the prior art. Figure 1 This is a flow chart of an embedded software compilation error intelligent collection method proposed in Example 1 of the present invention.

[0040] In step S100, the process starts.

[0041] In step S110, the error information and related metadata generated in the compilation process are obtained by monitoring the compilation process. The related metadata includes code location, compilation parameters, etc. The compilation process is monitored by a local agent, error and warning information and related metadata are captured, and these data are stored on a preset secure cloud platform.

[0042] The present invention provides a real-time and accurate error monitoring method, which greatly improves the efficiency and timeliness of error discovery compared to the traditional reliance on developers to manually find errors.

[0043] The preset secure cloud platform receives and stores compilation error data collected from various development environments. The collected data is preprocessed to remove redundant information and standardize the format. This enables centralized management of data across development environments. Preprocessing data to remove redundant information and standardize the format provides a high-quality data foundation for subsequent analysis and processing.

[0044] In this application, fuzzy logic technology is used to deal with the uncertainty of compilation errors and convert fuzzy error information into clear error categories.

[0045] During the compilation process, error messages often have certain uncertainties, which are mainly manifested in the following aspects:

[0046] Imprecise descriptions: Error messages may not be clear enough, such as "undefined symbol", "type mismatch", etc. These descriptions may correspond to multiple situations.

[0047] Lack of context: Error messages may lack sufficient context to determine the exact location or cause of the error.

[0048] Multiple factors: Some errors may be caused by multiple factors, and the error message may only mention some of them.

[0049] Language differences: Error messages generated by different compilers or tool chains may differ slightly, making it more difficult to handle them uniformly.

[0050] In order to better handle these vague error messages, they can be classified into several clear error categories for subsequent analysis and resolution. These clear error categories can include:

[0051] Syntax error: refers to the violation of the language's grammatical rules in the code, such as mismatched brackets, misspelling of keywords, etc.

[0052] Type error: involves a mismatch in the types of variables or functions, such as assigning an integer to a floating-point variable.

[0053] Link errors: Errors that occur during the link phase, such as undefined external symbols, duplicate definitions, etc.

[0054] Resource error: This refers to problems with file or resource access, such as file not found, insufficient permissions, etc.

[0055] Configuration error: An error caused by improper compilation or linking option settings, such as not specifying the correct header file path.

[0056] Runtime error: Although the program can be compiled, errors occur during program execution, such as array out of bounds, null pointer reference, etc.

[0057] Use fuzzy logic to handle compilation errors. Fuzzy logic is a mathematical tool for dealing with uncertainty and ambiguity, and can be used to deal with the uncertainty of compilation error information. Here are the steps on how to use fuzzy logic to handle compilation errors:

[0058] Feature extraction: Extract key features from ambiguous error messages, such as keywords in the error message, the file name and line number where the error occurred, etc.

[0059] Construct fuzzy sets: For each clear error category, fuzzy sets are established, and each set represents the typical characteristics of that category.

[0060] Membership calculation: Calculate the membership of each fuzzy error message to each clear error category, that is, the degree to which the error message belongs to a certain category.

[0061] Decision making: Based on the degree of membership, decide which clear error category to classify the ambiguous error information into.

[0062] Feedback adjustment: The definition of fuzzy sets is adjusted based on the feedback from error handling results to improve classification accuracy.

[0063] Example:

[0064] Suppose there is a vague error message: "error: 'func' was not declared in thisscope". This error message can be classified into multiple categories, such as "syntax error", "type error" or "link error".

[0065] Feature extraction: Extract key information, such as "func" is not declared.

[0066] Construct fuzzy sets:

[0067] Syntax error: contains keywords such as "undeclared" and "missing".

[0068] Type error: contains keywords such as "type" and "mismatch".

[0069] Link error: contains keywords such as "undefined" and "linkage".

[0070] Membership calculation: The membership of the error message to each category is calculated based on the keywords. For example, the membership to “grammar error” is higher.

[0071] Decision Making: Based on the degree of membership, classify the error message into the “syntax error” category.

[0072] Feedback adjustment: Adjust the definition of the fuzzy set according to the actual processing results. For example, if it is found that "func" is actually defined in other files, the fuzzy set of "link error" should be adjusted to more accurately reflect this situation.

[0073] In this way, fuzzy logic technology can help convert vague error information into clear error categories, thereby improving the efficiency of error diagnosis and repair.

[0074] In step S120, an error knowledge base is established using the error information and related metadata.

[0075] The present invention establishes a shared and continuously updated error knowledge base. The error knowledge base allows development team members to jointly view, discuss and solve errors. This breaks the isolation of error information in traditional development and promotes collaboration among development team members. The way of jointly viewing, discussing and solving errors improves the speed and quality of problem solving.

[0076] In step S130, a neural network model for compiling error recognition is constructed, and the neural network model is trained using the error knowledge base to obtain a trained neural network model;

[0077] The neural network model in the present invention adopts decision tree, random forest, support vector machine or deep learning model, etc.

[0078] The neural network model in the present invention includes an input layer, a hidden layer and an output layer;

[0079] The input layer is used to receive the features of the compilation error information; the features of the compilation error information include the error message text, file path, compiler version, error location and context code snippet

[0080] The hidden layer includes multiple fully connected layers for extracting features and learning nonlinear relationships;

[0081] The output layer is used to output the predicted error type.

[0082] Characteristics of compilation error messages include:

[0083] Error message text: Use word embedding technology to convert text information into numerical form.

[0084] File path: file name, file path, etc.

[0085] Compiler Version: Compiler version information used.

[0086] Error location: The file line and column number where the error occurred.

[0087] Contextual code snippet: The code snippet around the error can be represented using code embedding technology.

[0088] The process of deep learning model prediction includes:

[0089] Dataset construction: Collect a large number of compilation error instances and their corresponding correct error types as training data.

[0090] Data preprocessing: cleaning data, extracting features, dividing into training sets and test sets, etc.

[0091] Label encoding: One-hot encoding or other encoding methods are used to encode error types for easier model processing.

[0092] Model building:

[0093] Model selection: Choose an appropriate deep learning model architecture, such as convolutional neural network (CNN), recurrent neural network (RNN), or long short-term memory network (LSTM).

[0094] Parameter setting: Adjust hyperparameters such as learning rate and batch size according to specific application requirements.

[0095] Training process:

[0096] Initialization: Initialize model parameters.

[0097] Forward propagation: input data and calculate the predicted output through the model.

[0098] Loss calculation: Calculate the gap between the predicted output and the actual label, usually using the cross entropy loss function.

[0099] Backpropagation: Update the model parameters according to the gradient of the loss function.

[0100] Iterative training: Repeat the forward propagation, loss calculation, and backpropagation process until a predetermined number of training rounds is reached or a stopping condition is met.

[0101] Model Evaluation:

[0102] Validation set evaluation: Evaluate the performance of the model on an independent validation set.

[0103] Test set evaluation: Evaluate the generalization ability of the model on the final test set.

[0104] Performance metrics: Use metrics such as accuracy, recall, and F1 score to evaluate the performance of the model.

[0105] Model tuning:

[0106] Hyperparameter adjustment: Adjust the model’s structure, learning rate and other hyperparameters based on the evaluation results.

[0107] Iterative training: Repeat the training process until satisfactory performance is achieved.

[0108] In step S140, the pre-processed compilation error information features are input into the trained neural network model to output the predicted error type; and the predicted error type is analyzed to determine the correlation between software compilation errors and find out the code pattern and compilation setting that cause the specific error.

[0109] 1. Analyze the predicted error types and determine the correlation between software compilation errors, including:

[0110] 1. Error message classification

[0111] First, read each compilation error message carefully and classify them into different categories, such as syntax errors, type mismatches, undefined symbols, etc.

[0112] Observe whether there are certain errors that occur frequently or have similar characteristics, which may indicate a common root cause of the problem.

[0113] 2. Order of error occurrence

[0114] Pay attention to the order in which compilation errors occur. Sometimes, one error can lead to a series of subsequent errors. If certain errors always appear after certain other errors, consider resolving the earlier errors first to see if that eliminates the subsequent errors.

[0115] 3. Wrong context

[0116] Check the context information provided in the error message, such as the file and line number where the error occurred. Analyze the location relationship of different errors in the code to see if there are related modules or function call chains.

[0117] The process of finding the code pattern that causes a specific error involves:

[0118] 1. Common error patterns

[0119] For syntax errors, check for missing brackets, semicolons, or quotation marks, etc.

[0120] Type mismatch errors can be caused by incorrect variable types, mismatched function parameter types, or improper type casting.

[0121] Undefined symbol errors can be caused by forgetting to include necessary header files, incorrect variable or function declarations, etc.

[0122] 2. Code Review

[0123] Carefully review the area of ​​code where the error occurred, looking for possible error patterns.

[0124] Pay attention to the declaration and use of variables, parameter passing in function calls, the logic of loops and conditional statements, etc.

[0125] 3. Compare with normal code

[0126] If there is normal code with similar functions, you can conduct a comparative analysis to find out the differences, which helps to find incorrect code patterns.

[0127] Finding out what build settings are causing a specific error involves:

[0128] 1. Compiler version

[0129] Confirm that the compiler version you are using is consistent with the version required by the software. Different versions of compilers may have different requirements for the code.

[0130] 2. Compile options

[0131] Check compilation options, such as optimization level, warning level, etc. Some options may cause the compiler to check the code more strictly, thus exposing more errors.

[0132] Try adjusting the compilation options to see if that eliminates or reduces the error.

[0133] 3. Dependent libraries and paths

[0134] Make sure all dependencies are installed correctly and found by the compiler.

[0135] Check whether the version of the library is compatible with the software and whether the path to the library is correctly set in the compilation environment.

[0136] This application also uses a hierarchical anomaly detection algorithm to analyze software compilation errors from local to global levels, which can help identify potential complex compilation error patterns. This method can effectively discover problems that cannot be revealed by single error information by performing multi-level analysis on compilation error information.

[0137] Hierarchical anomaly detection is a method of identifying anomalies through multi-level processing. This method first detects local anomalies at a lower level and then gradually moves up to higher levels to identify more complex anomaly patterns. Hierarchical anomaly detection algorithms usually include the following steps:

[0138] Local anomaly detection: detects a single abnormal event at the lowest level, such as a single compilation error.

[0139] Middle-layer aggregation: aggregate local anomalies to form higher-level anomaly patterns.

[0140] Global anomaly detection: Identifies anomalous patterns at the highest level across the entire system.

[0141] The advantage of this approach is that it can identify anomalies at different levels of granularity, thereby improving the accuracy and efficiency of anomaly detection.

[0142] Potential complex software compilation error patterns are those problems that cannot be easily identified by a single compilation error message. These problems are often caused by multiple factors, and a single error message is not enough to reveal the entire problem. These patterns can include:

[0143] Cross-file dependency issues: These are situations where multiple files depend on each other but are inconsistent.

[0144] Configuration incompatibility issues: Issues caused by incompatible compilation options or environment configurations.

[0145] Resource conflict issues: such as memory leaks, resource competition, etc. These problems may not appear immediately, but will gradually be exposed after a long period of operation.

[0146] Performance bottleneck problem: Performance bottleneck that occurs during the compilation process, such as long compilation time, excessive resource consumption, etc.

[0147] Coding style consistency issues: Inconsistent coding styles may lead to compilation errors or warnings, such as inconsistent indentation, inconsistent naming rules, etc.

[0148] The process of analyzing software compilation errors from local to global using a hierarchical anomaly detection algorithm is as follows:

[0149] Local anomaly detection

[0150] Feature extraction: Extract key features from a single compilation error message, such as error type, error location, etc.

[0151] Anomaly Identification: Use anomaly detection algorithms (such as statistical-based methods, cluster analysis, etc.) to identify individual anomalous events.

[0152] Middle layer aggregation:

[0153] Correlation analysis: Analyze the correlation between different compilation errors, such as whether the errors occur in the same file, whether they are related to the same compilation options, etc.

[0154] Pattern recognition: Use pattern recognition techniques (such as association rule mining, sequence pattern mining, etc.) to identify abnormal patterns.

[0155] Global anomaly detection:

[0156] Aggregate analysis: Aggregate local anomalies and intermediate-level patterns to form higher-level anomaly patterns.

[0157] Complex pattern recognition: Use higher-level analysis methods (such as deep learning, graph neural networks, etc.) to identify potential complex compilation error patterns.

[0158] In step S150, the predicted error type and the result of the error type analysis are sent to the developer, and the developer is provided with error explanation and repair guidance.

[0159] Provide developers with a friendly error overview and detailed information, including error statistics, trend analysis, etc. Integrate AI chatbots to explain the meaning of errors and provide repair guidance through natural language interaction.

[0160] The present invention presents the results of the error classification and analysis module to developers in a friendly manner, and provides error explanations and repair guidance to developers by integrating an AI chatbot. Developers can interact with the system through this module, feedback problems and solutions, and further promote the update of the collaborative error database and the continuous improvement of the system. Providing a friendly error overview and detailed information, as well as integrating an AI chatbot for natural language interaction, provides developers with a convenient way to understand errors and provide repair guidance. This humanized interaction method greatly improves the developer's user experience and problem-solving efficiency.

[0161] In step S160, when an unidentified error is re-identified or an existing error is resolved, relevant personnel are notified in real time to improve response speed, which helps to maintain the timeliness and effectiveness of the system and continuously improve the quality of the development process.

[0162] In step S170, the process ends.

[0163] The embedded software compilation error intelligent collection method proposed in Embodiment 1 of the present invention can efficiently and accurately process and solve the compilation errors in the embedded software development process, so as to improve the development efficiency, software quality and security.

[0164] The first embodiment of the present invention provides an embedded software compilation error intelligent collection method, which monitors the compilation process in real time through an automated tool, instantly discovers and reports errors, and reduces the burden of manual inspection. Through intelligent analysis technology, the error source is quickly located, helping developers quickly understand the cause of the error and shorten the repair time.

[0165] Example 2

[0166] Based on the embedded software compilation error intelligent collection method proposed in the first embodiment of the present invention, the second embodiment of the present invention further proposes an embedded software compilation error intelligent collection system. Figure 2A schematic diagram of an embedded software compilation error intelligent collection system proposed in Embodiment 2 of the present invention, the system comprising: an acquisition module, a model building module and a search module;

[0167] The acquisition module is used to acquire error information and related metadata generated during the compilation process by monitoring the compilation process; and to establish an error knowledge base using the error information and related metadata;

[0168] The model building module is used to build a neural network model for compiling error recognition, and train the neural network model using the error knowledge base to obtain a trained neural network model;

[0169] The search module is used to input the pre-processed compilation error information features into the trained neural network model and output the predicted error type; and to analyze the predicted error type, determine the correlation between software compilation errors and find out the code patterns and compilation settings that cause specific errors.

[0170] The system also includes: an interaction module and an improvement module;

[0171] The interactive module is used to send the predicted error type and the result of the error type analysis to the developer, and provide the developer with error explanation and repair guidance.

[0172] The improvement module is used to notify relevant personnel in real time when an unrecognized error is re-recognized or an existing error is resolved, thereby improving the response speed.

[0173] The neural network model in the model building module of this application includes an input layer, a hidden layer, and an output layer;

[0174] The input layer is used to receive features of compilation error information; the features of the compilation error information include error message text, file path, compiler version, error location and context code snippet;

[0175] The hidden layer includes multiple fully connected layers for extracting features and learning nonlinear relationships;

[0176] The output layer is used to output the predicted error type.

[0177] The process of analyzing the predicted error type includes: classifying the compilation error information, analyzing the order in which the compilation error information appears, and viewing the context information provided in the compilation error information to analyze the position relationship of different errors in the code and determine whether there is a related module or function call chain.

[0178] The process of finding the code pattern that causes a specific error includes: determining common error patterns, performing code reviews, and performing comparative analysis on normal code with similar functions to determine the erroneous code pattern; finding the compilation settings that cause a specific error specifically includes: checking the compiler version, checking the compilation options, and ensuring that all dependent libraries are correctly installed and found by the compiler, checking whether the library version is compatible with the software, and whether the library path is correctly set in the compilation environment.

[0179] The fuzzy error messages are converted into clear error categories, specifically: key features are extracted from the fuzzy error messages to construct fuzzy sets, each of which represents the typical features of the category; the membership degree of each fuzzy error message to each clear error category is calculated, that is, the degree to which the error message belongs to a certain category; based on the degree of membership, it is decided to classify the fuzzy error message into which clear error category; the definition of the fuzzy set is adjusted according to the feedback of the error processing results to improve the accuracy of classification.

[0180] A hierarchical anomaly detection algorithm is used to analyze errors from local to global levels and identify potential complex error patterns.

[0181] An embedded software compilation error intelligent collection system proposed in Embodiment 2 of the present invention can efficiently and accurately process and resolve compilation errors in the embedded software development process to improve development efficiency, software quality and security.

[0182] The second embodiment of the present invention provides an embedded software compilation error intelligent collection system, which monitors the compilation process in real time through an automated tool, instantly discovers and reports errors, and reduces the burden of manual inspection. Through intelligent analysis technology, the error source is quickly located, helping developers quickly understand the cause of the error and shorten the repair time.

[0183] The description of the relevant parts of an embedded software compilation error intelligent collection system provided in Example 2 of the present application can be found in the detailed description of the corresponding parts of an embedded software compilation error intelligent collection method provided in Example 1 of the present application, and will not be repeated here.

[0184] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment that includes a series of elements are inherent to the elements. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or equipment that includes the elements. In addition, the above-mentioned technical solution provided in the embodiment of the present application is consistent with the corresponding technical solution in the prior art in principle, and the part is not described in detail, so as not to repeat too much.

[0185] Although the above describes the specific implementation of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. For those skilled in the art, other different forms of modifications or deformations can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. On the basis of the technical solution of the present invention, various modifications or deformations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.

Claims

1. An intelligent collection method for embedded software compilation errors, characterized in that: The following steps are involved: Acquire error information and related metadata generated during the compilation process by monitoring the compilation process; and establish an error knowledge base using the error information and related metadata; Constructing a neural network model for compiling error recognition, and training the neural network model using the error knowledge base to obtain a trained neural network model; Input the preprocessed compilation error information features into the trained neural network model and output the predicted error type; And analyze the predicted error types, determine the correlation between software compilation errors and find out the code patterns and compilation settings that cause specific errors.

2. The method for intelligently collecting embedded software compilation errors according to claim 1, characterized in that: The method further includes: sending the predicted error type and the result of the error type analysis to the developer, and providing the developer with error explanation and repair guidance.

3. The method for intelligently collecting embedded software compilation errors according to claim 1, characterized in that: The method also includes, when an unrecognized error is re-recognized or an existing error is resolved, notifying relevant personnel in real time to improve response speed.

4. The method for intelligently collecting embedded software compilation errors according to claim 1, characterized in that: The neural network model includes an input layer, a hidden layer and an output layer; The input layer is used to receive the features of the compilation error information; the features of the compilation error information include error message text, file path, compiler version, error location and context code snippet The hidden layer includes a plurality of fully connected layers for extracting features and learning nonlinear relationships; The output layer is used to output the predicted error type.

5. The method for intelligently collecting compilation errors of embedded software according to claim 1, characterized in that: The process of analyzing the predicted error type includes: Classify the compilation error information, analyze the order in which the compilation error information appears, and view the context information provided in the compilation error information to analyze the location relationship of different errors in the code and determine whether there are related modules or function call chains.

6. The method for intelligently collecting embedded software compilation errors according to claim 1, characterized in that: The process of finding the code pattern that causes a specific error includes: Identify common error patterns, conduct code reviews, and compare and analyze normal code with similar functions to identify incorrect code patterns.

7. The method for intelligently collecting embedded software compilation errors according to claim 1, characterized in that: Finding out what build settings are causing a specific error involves: Check the compiler version, check the compilation options, and make sure that all dependent libraries are correctly installed and found by the compiler, check whether the library version is compatible with the software, and whether the library path is correctly set in the compilation environment.

8. The method for intelligently collecting compilation errors of embedded software according to claim 1, characterized in that: The method also includes converting vague error information into clear error categories, specifically: Extract key features from fuzzy error messages to construct fuzzy sets, each of which represents the typical features of the category; Calculate the degree of membership of each ambiguous error message to each clear error category, that is, the degree to which the error message belongs to a certain category; According to the degree of membership, it is decided to classify the ambiguous error information into which clear error category; The definition of fuzzy sets is adjusted according to the result feedback of error handling to improve the accuracy of classification.

9. The method for intelligently collecting embedded software compilation errors according to claim 1, characterized in that: The method also includes using a hierarchical anomaly detection algorithm to analyze errors from local to global levels and identify potential complex error patterns.

10. An embedded software compilation error intelligent collection system, characterized in that: Includes acquisition module, model building module and search module The acquisition module is used to acquire error information and related metadata generated during the compilation process by monitoring the compilation process; and to establish an error knowledge base using the error information and related metadata; The model building module is used to build a neural network model for compiling error recognition, and train the neural network model using the error knowledge base to obtain a trained neural network model; The search module is used to input the pre-processed compilation error information features into the trained neural network model and output the predicted error type; And analyze the predicted error types, determine the correlation between software compilation errors and find out the code patterns and compilation settings that cause specific errors.