A software defect analysis method, electronic equipment and computer readable storage medium
By combining large language models and vector databases, the defect analysis method for automated vehicle software solves the problem of low efficiency in traditional manual analysis, and achieves efficient and accurate identification of the root cause of defects and self-learning capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional vehicle infotainment software defect analysis relies on manual processing, which is inefficient, easily influenced by personal experience, and lacks standardization, resulting in low efficiency and insufficient accuracy in software defect analysis.
By acquiring defect information from the vehicle's infotainment software, using a large language model to classify defects, obtaining analysis prompts, and combining historical defect analysis cases from a vector database, the system automatically performs defect analysis, including vectorization and similarity calculation to select appropriate analysis strategies, and uses a specific defect analysis engine for in-depth analysis.
It significantly improves the efficiency and accuracy of defect analysis, ensures the accuracy of defect root cause judgment, and improves self-learning ability and long-term stability by accumulating analytical knowledge through continuous database updates.
Smart Images

Figure CN122132281A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of car machine software, and more particularly, to a software defect analysis method, an electronic device and a computer readable storage medium in the technical field of car machine software. BACKGROUND
[0002] In the research and development process of the in-vehicle intelligent cockpit system, with the exponential growth of the functional complexity, the number and types of software defects (bugs) show the characteristics of diversification and complication. The traditional defect processing process highly depends on manual analysis. For example, the R&D personnel need to manually download and decompress the log package through the system, search for keywords line by line in thousands of lines of logs, combine with the code context to speculate the root cause, try to reproduce the problem, and finally write the analysis conclusion and backfill the work order. This process is not only highly repetitive, easily influenced by personal experience, and lacks standardization, resulting in low efficiency of software defect analysis. SUMMARY
[0003] The embodiments of the present application provide a software defect analysis method, an electronic device and a computer readable storage medium. The present application not only effectively solves the problem of low efficiency of traditional manual car machine software defect analysis, but also significantly improves the accuracy of root cause judgment of defects.
[0004] In a first aspect, a software defect analysis method is provided. The software defect analysis method includes: obtaining defect information of car machine software; determining a defect type of the car machine software based on the defect information; obtaining an analysis prompt word for defect analysis of the car machine software according to the defect type; and performing defect analysis on the car machine software according to the defect information, the analysis prompt word and a plurality of historical defect analysis cases in a vector database.
[0005] The present application classifies the problems of the car machine software through the defect information of the car machine software, obtains the defect type, then obtains the defect analysis prompt word matched with the defect type, and combines the defect information, the defect analysis prompt word and the historical defect analysis cases to automatically analyze the defects existing in the car machine software. The present application not only effectively solves the problem of low efficiency of the traditional manual analysis process, but also constrains the reasoning direction in the defect analysis process by taking the defect analysis prompt word and the historical defect analysis cases as context references, avoids the deviation of the defect analysis result from the actual situation, and thus significantly improves the accuracy of the root cause judgment of defects.
[0006] In a possible implementation, the determining the defect type of the car machine software based on the defect information comprises: generating a plurality of defect classification options; inputting the defect information and the plurality of defect classification options into a large language model to select a target defect classification option from the plurality of defect classification options by the large language model; and determining the defect type according to the target defect classification option, so that the defect of the car machine software is efficiently and accurately classified based on the defect information and the defect classification options.
[0007] In a possible implementation, the determining the defect type according to the target defect classification option comprises: determining whether the target defect classification option belongs to a preset classification option; if the target defect classification option is not the preset classification option, determining the target defect classification option as the defect type; and if the target defect classification option is the preset classification option, matching log content in the defect information with classification conditions corresponding to a plurality of sub-defect types under the preset classification option; and determining a sub-defect type corresponding to a classification condition satisfied by the log content as the defect type. By determining whether the target defect classification option belongs to the preset classification option, it is determined whether to perform fine classification on the defect of the car machine software based on the determination result, so that the accuracy of defect classification is improved.
[0008] In a possible implementation, the obtaining the analysis prompt word for participating in the defect analysis of the car machine software according to the defect type comprises: obtaining a mapping table of a preset defect type and a preset prompt word; and querying the mapping table based on the defect type to obtain the analysis prompt word. By designing the mapping table of the defect type and the prompt word, the software defect analysis tool can focus more on the key elements of a specific type of problem, which is beneficial to improving the accuracy of defect analysis.
[0009] In a possible implementation manner, the defect analysis on the car machine software according to the defect information, the analysis prompt word and the plurality of historical defect analysis cases in the vector database comprises: performing vectorization processing on the defect information to obtain target vector data; determining a similarity between the target vector data and historical vector data of the plurality of historical defect analysis cases to obtain a plurality of similarities; determining a target analysis strategy from a first defect analysis strategy and a second defect analysis strategy according to the plurality of similarities, wherein the first defect analysis strategy refers to a strategy of performing defect analysis on software by using the defect information, the analysis prompt word and a historical defect analysis case, and the second defect analysis strategy refers to a strategy of performing defect analysis on software by using the defect information and the analysis prompt word; and performing defect analysis on the car machine software according to the target analysis strategy, which realizes adaptive selection of different analysis paths for performing defect analysis on the car machine software, improves the analysis efficiency, and ensures the stability and reliability of the defect analysis result.
[0010] In a possible implementation manner, the determining of the target analysis strategy from the first defect analysis strategy and the second defect analysis strategy according to the plurality of similarities comprises: if the plurality of similarities are all less than a preset similarity, determining the second defect analysis strategy as the target analysis strategy; or if the plurality of similarities are not all less than the preset similarity, determining the first defect analysis strategy as the target analysis strategy.
[0011] In a possible implementation manner, the performing of the defect analysis on the car machine software according to the target analysis strategy comprises: obtaining a target defect analysis engine corresponding to the defect type; if the target analysis strategy is the first defect analysis strategy, determining a similarity greater than or equal to the preset similarity in the plurality of similarities as a target similarity; inputting the defect information, the analysis prompt word and a historical defect analysis case corresponding to the target similarity into the target defect analysis engine to output a defect analysis result of the car machine software by the target defect analysis engine; or if the target analysis strategy is the second defect analysis strategy, inputting the defect information and the analysis prompt word into the target defect analysis engine to output the defect analysis result of the car machine software by the target defect analysis engine. According to the present application, a corresponding defect analysis engine is selected to perform defect analysis on the car machine software according to the defect type, which not only guarantees the integrity of the analysis logic, but also improves the flexibility and analysis efficiency of the defect analysis.
[0012] In a possible implementation manner, after the performing of the defect analysis on the car machine software according to the target analysis strategy, the software defect analysis method further comprises: encapsulating the defect information and the defect analysis result of the car machine software as a defect analysis case, and updating the vector database by using the defect analysis case.
[0013] Secondly, a software defect analysis apparatus is provided, the software defect analysis apparatus comprising:
[0014] The information acquisition module is used to acquire defect information of the vehicle's infotainment software; A type classification module is used to determine the defect type of the vehicle infotainment software based on the defect information; The prompt word acquisition module is used to acquire analysis prompt words that participate in the defect analysis of the vehicle infotainment software according to the defect type. The defect analysis module is used to perform defect analysis on the vehicle infotainment software based on the defect information, the analysis prompts, and multiple historical defect analysis cases in the vector database.
[0015] In one possible implementation, the type classification module is specifically used to generate multiple defect classification options; input the defect information and the multiple defect classification options into a large language model, so that the large language model selects one defect classification option from the multiple defect classification options to obtain a target defect classification option; and determine the defect type based on the target defect classification option.
[0016] In one possible implementation, the type classification module is specifically used to determine whether the target defect classification option belongs to a preset classification option; if the target defect classification option is not the preset classification option, the target defect classification option is determined as the defect type; if the target defect classification option is the preset classification option, the log content in the defect information is matched with the classification conditions corresponding to multiple sub-defect types under the preset classification option; the sub-defect type corresponding to the classification conditions satisfied by the log content is determined as the defect type.
[0017] In one possible implementation, the prompt word acquisition module is specifically used to acquire a mapping table between preset defect types and preset prompt words; and to query the mapping table based on the defect type to obtain the analysis prompt word.
[0018] In one possible implementation, the defect analysis module is specifically used to vectorize the defect information to obtain target vector data; determine the similarity between the target vector data and the historical vector data of the multiple historical defect analysis cases to obtain multiple similarities; determine a target analysis strategy from a first defect analysis strategy and a second defect analysis strategy based on the multiple similarities, wherein the first defect analysis strategy refers to a strategy of performing defect analysis on the software using the defect information, the analysis prompt words, and the historical defect analysis cases, and the second defect analysis strategy refers to a strategy of performing defect analysis on the software using the defect information and the analysis prompt words; and perform defect analysis on the vehicle infotainment software according to the target analysis strategy.
[0019] In one possible implementation, the defect analysis module is specifically configured to determine the second defect analysis strategy as the target analysis strategy if all of the plurality of similarities are less than a preset similarity; and to determine the first defect analysis strategy as the target analysis strategy if the plurality of similarities are not less than the preset similarity.
[0020] In one possible implementation, the defect analysis module is specifically used to obtain the target defect analysis engine corresponding to the defect type; if the target analysis strategy is the first defect analysis strategy, the similarity among the plurality of similarities that is greater than or equal to the preset similarity is determined as the target similarity; the defect information, the analysis prompt words, and the historical defect analysis cases corresponding to the target similarity are input into the target defect analysis engine, so that the target defect analysis engine outputs the defect analysis result of the vehicle software; if the target analysis strategy is the second defect analysis strategy, the defect information and the analysis prompt words are input into the target defect analysis engine, so that the target defect analysis engine outputs the defect analysis result of the vehicle software.
[0021] In one possible implementation, the software defect analysis device further includes: The data update unit is used to encapsulate the defect information and the defect analysis results of the vehicle software into defect analysis cases, and update the vector database using the defect analysis cases. This update mechanism enables the software defect analysis tool to continuously accumulate high-quality defect analysis knowledge. When similar new defects appear in the future, the software defect analysis tool can more accurately recall relevant historical experience and provide effective reference for subsequent analysis. In this way, the automatic accumulation and iterative optimization of defect analysis knowledge is realized, which not only improves the coverage and timeliness of the historical software defect analysis tool, but also enhances the self-learning ability and long-term stability of the software defect analysis tool.
[0022] Thirdly, an electronic device is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the software defect analysis method of the first aspect or any possible implementation thereof.
[0023] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to execute the software defect analysis method in the first aspect or any possible implementation thereof.
[0024] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when run on a computer, causes the computer to perform the software defect analysis method of the first aspect or any possible implementation thereof. Attached Figure Description
[0025] Figure 1 A schematic flowchart of a software defect analysis method provided in an embodiment of this application is shown; Figure 2 This illustration shows another schematic flowchart of a software defect analysis method provided in an embodiment of this application; Figure 3 This paper shows a schematic diagram of the structure of a software defect analysis device provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0026] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0027] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0028] During the development of in-vehicle intelligent cockpit systems, with the exponential increase in functional complexity, the number and types of software defects (bugs) have become increasingly diverse and complex. Traditional defect handling processes heavily rely on manual analysis. For example, developers must manually download and decompress log packages from the system, search for keywords line by line in thousands of logs, then combine this with code context to infer the root cause, attempt to reproduce the problem, and finally write analysis conclusions and fill in the work order. This process is not only highly repetitive and easily influenced by personal experience, but also lacks standardization, resulting in low efficiency in software defect analysis.
[0029] To address the aforementioned issues, this application provides a software defect analysis method, an electronic device, and a computer-readable storage medium. This application categorizes problems in vehicle infotainment software based on defect information, identifies defect types, obtains defect analysis prompts matching the defect types, and then automatically analyzes the defects in the vehicle infotainment software by combining defect information, defect analysis prompts, and historical defect analysis cases. This not only solves the problem of low efficiency in traditional manual analysis but also significantly improves the accuracy of determining the root cause of defects by using defect analysis prompts and historical defect analysis cases as contextual references.
[0030] The following is an embodiment of a software defect analysis method provided in this application specification.
[0031] Figure 1 This illustration shows a schematic flowchart of a software defect analysis method provided in an embodiment of this application. The software defect analysis method is applied to a software defect analysis tool mounted in an electronic device, wherein the electronic device includes a computer, server, or other device with computing capabilities.
[0032] The software defect analysis method provided in this application includes the following solutions: S110: Obtain defect information of vehicle infotainment software.
[0033] In one exemplary embodiment, in addition to software defect analysis tools, the electronic device also carries the Jira system, which is an enterprise-level project management and defect tracking system used to record, track and manage various issue documents during the software development process.
[0034] When users encounter problems while using the in-vehicle infotainment software, they can submit a corresponding issue ticket through the Jira system. The software defect analysis tool interfaces with the Jira system through the Jira interface layer, automatically retrieving a list of issue tickets from Jira and extracting detailed information and submission notes for each issue ticket. Based on this information, the tool constructs the defect information for the corresponding in-vehicle infotainment software. The detailed information for each issue ticket includes the title, defect description, severity level, associated module, Uniform Resource Locator (URL) for the log, and attachments.
[0035] Next, the log content is downloaded from the URL of the log in the details of each issue ticket. Then, the details, submission notes, and downloaded log content of that issue ticket are cleaned to remove invalid characters, duplicate content, etc., resulting in cleaned data. Subsequently, the cleaned data undergoes structuring processing, that is, key fields (such as title, module, log content, severity level, etc.) are extracted to generate standardized structured information, thus obtaining the defect information of the vehicle infotainment software. In other words, the defect information of the vehicle infotainment software is structured information. For example, the defect information of the vehicle infotainment software can be organized in JSON format for easy subsequent storage and analysis.
[0036] S120: Determine the defect type of the vehicle infotainment software based on defect information.
[0037] After obtaining defect information from the vehicle infotainment software, the problems are automatically categorized based on this information to determine the defect type. The categorization process combines keyword matching, rule engines, and Large Language Model (LLM) semantic understanding technologies, comprehensively considering the title, defect description, log content fragments, and module information. The resulting defect type not only clarifies the nature of the software problem but also provides crucial information for generating subsequent analysis prompts. The defect type is one of several known types, including user interface (UI) issues, user experience (UE) issues, product requirement issues, third-party dependency issues, functional failures (i.e., code issues), vehicle signal anomalies, CAN communication issues, multi-screen (including driver's screen, passenger's screen, and rear ceiling-mounted screen) collaboration issues, digital video recorder (DVR) recording anomalies, and vehicle control command failures.
[0038] S130: Obtain analysis prompts for the vehicle infotainment software based on the defect type.
[0039] After obtaining the defect type of the vehicle infotainment software, analysis prompts (also known as defect analysis prompts) are obtained based on the defect type for defect analysis. The role of analysis prompts is to provide contextual information and reasoning guidance to the software defect analysis tool, enabling the tool to perform targeted analysis of the vehicle infotainment software defects, avoid deviations, and thus improve the accuracy of root cause location.
[0040] S140: Perform defect analysis on the vehicle infotainment software based on defect information, analysis prompts, and multiple historical defect analysis cases in the vector database.
[0041] Historical defect analysis cases refer to defect analysis records accumulated during the analysis, diagnosis, and repair of defects in in-vehicle infotainment software in the past. These records can be used for the diagnosis and decision-making of new defects. These historical defect analysis cases are stored in a vector database in the form of high-dimensional vector data. The vector database supports fast retrieval based on semantic similarity and is suitable for scenarios involving Retrieval-Augmented Generation (RAG).
[0042] After obtaining the corresponding analysis prompts for the vehicle infotainment software, a defect analysis is performed on the software by combining the software's defect information, the prompts, and multiple historical defect analysis cases from the vector database. This analysis yields the defect analysis results, including the root cause of the defect and the affected risk components. Based on these results, targeted remediation suggestions are automatically generated, including code modification directions, configuration adjustment suggestions, and mitigation measures, to support developers in quickly locating and resolving problems.
[0043] This application categorizes problems in vehicle infotainment software based on defect information to determine defect types. It then obtains defect analysis prompts matching the defect types and, by combining defect information, prompts, and historical defect analysis cases, automatically analyzes the defects in the vehicle infotainment software. This not only effectively solves the problem of low efficiency in traditional manual analysis processes but also constrains the reasoning direction during defect analysis by using prompts and historical cases as contextual references, preventing the results from deviating from reality and significantly improving the accuracy of determining the root cause of defects.
[0044] In one possible implementation, determining the defect type of the vehicle infotainment software based on defect information includes the following steps: Generate multiple defect classification options; Input the defect information and multiple defect classification options into the large language model, so that the large language model can select one defect classification option from the multiple defect classification options to obtain the target defect classification option; Determine the defect type based on the target defect classification options.
[0045] The process of classifying defects in vehicle infotainment software based on defect information includes: This application pre-configures a defect classification prompt template in the system's pre-set resource file. This template defines multiple standardized defect types and their corresponding semantic descriptions in natural language. The process of generating multiple defect classification options refers to: when classifying defects in the vehicle infotainment software, the system loads the defect classification prompt template from the pre-set resource file and uses the template content as the basis for structured classification. Through program parsing and prompt word concatenation, a set of clear, fixed, and selectable defect category options for a large language model is dynamically constructed, resulting in multiple defect classification options participating in the vehicle infotainment software defect classification. Notably, this application does not generate multiple defect classification options in real-time through an algorithm. Instead, it loads and injects predefined classification specifications (including defect types and corresponding semantic descriptions) into the classification prompts at runtime to form a structured and identifiable set of defect classification options.
[0046] After generating multiple defect classification options, such as UI issues (e.g., abnormal interface display, abnormal layout), UX issues (e.g., abnormal interaction logic, unreasonable user experience), product requirement issues (e.g., ambiguous or changed requirements), third-party dependency issues (e.g., abnormal framework or system service), and functional failures (e.g., crashes, unresponsiveness, code logic errors), the defect information is concatenated with the multiple defect classification options to form a complete classification prompt, which is then input into a large language model. The large language model performs semantic understanding of the defect information based on the classification prompt and scores the multiple defect classification options, obtaining a matching score. This matching score represents the degree of matching between the defect classification option and the problem existing in the vehicle infotainment software. The defect classification option with the highest matching score is then selected as the target defect classification option. Finally, the defect type of the vehicle infotainment software is determined based on the target defect classification option, achieving efficient and accurate classification of defects in the vehicle infotainment software based on defect information and defect classification options.
[0047] In one possible implementation, determining the defect type based on the target defect classification option includes the following steps: Determine whether the target defect classification option belongs to the preset classification option; If the target defect classification option is not the preset classification option, the target defect classification option will be determined as the defect type; If the target defect classification option is the preset classification option, the log content in the defect information will be matched with the classification conditions corresponding to multiple sub-defect types under the preset classification option; The sub-defect types corresponding to the classification conditions satisfied by the log content are determined as defect types.
[0048] Due to the complexity of in-vehicle infotainment software, its numerous modules, and the diverse forms of defects, there are many types of defects. Some defect types have fine-grained classifications, while others do not. To address this, this application designs a two-stage classification mechanism: coarse classification followed by fine classification. After coarse classification, a selective decision is made regarding whether to proceed with fine classification. Specifically, major defect categories with multiple sub-defect types are identified and marked as preset classification options. Then, after obtaining the target defect classification option, the accuracy of the fine classification is improved by determining whether the target defect classification option belongs to the preset classification options and using the result. If the target defect classification option does not belong to the preset classification options, it is identified as a defect type of the in-vehicle infotainment software. If the target defect classification option belongs to the preset classification options, the log content in the defect information is matched with the classification conditions corresponding to the multiple sub-defect types under the preset classification options. The sub-defect types corresponding to the classification conditions satisfied by the log content are identified as defect types of the in-vehicle infotainment software, thus completing the fine classification. By determining whether the target defect classification option belongs to the preset classification option, a decision is made on whether to further classify the defects of the vehicle software based on the judgment result, thereby improving the accuracy of defect classification.
[0049] For example, multiple defect classification options include UI issues, UX issues, product requirement issues, third-party dependency issues, and functional failures. Functional failures are a preset classification option, with sub-defect types including crashes, Application Not Responding (ANR) issues, memory leaks, low-level signal issues, and code logic errors. After inputting the vehicle infotainment software's defect information and these classification options into a large language model, if the target defect classification option output by the large language model is one of UI issues, UX issues, product requirement issues, or third-party dependency issues (e.g., if the target defect classification option is third-party dependency issues), then the defect type of the vehicle infotainment software is a third-party dependency issue, requiring no further sub-classification. If the target defect classification option output by the large language model is a functional failure, then sub-classification is required. The sub-classification process involves matching log fragments from the log content included in the defect information with the classification conditions corresponding to all sub-defect types under functional failures to obtain the defect type of the vehicle infotainment software.
[0050] Suppose that the classification condition 1 for a crash is: when the log contains both FATAL EXCEPTION and java.lang.NullPointerException, it is determined to be a crash; the classification condition 2 for an unresponsive problem is: when the log contains ANR in or main thread stack blocking timeout information, it is determined to be an ANR; the classification condition 3 for a memory leak problem is: when the log simultaneously detects a LeakCanary report, OutOfMemoryError, and traces of a specific object not being released, it is determined to be a memory leak, and so on. If the log content included in the defect information meets classification condition 3, then the defect type of the vehicle infotainment software is determined to be an unresponsive problem under functional failure.
[0051] In one possible implementation, the above-mentioned method of obtaining analysis prompts for defect analysis of vehicle infotainment software based on defect type includes the following steps: Obtain the mapping table between preset defect types and preset prompt words; Based on the defect type, the mapping table is queried to obtain analysis prompt words.
[0052] This application pre-designs a mapping table between defect types and warning words for different defect types, called the Preset Defect Type and Preset Warning Word Mapping Table. This mapping table includes multiple preset defect types and their corresponding preset warning words. For example, the preset defect types include Crash, Unresponsiveness, Memory Leak, and Low-Level Signal Issues. The preset warning words for each type include: For Crash, the warning words focus on main thread blocking, IPC calls, database operations, and file I / O; for Memory Leak, the warning words focus on object reference relationships, lifecycle management, static variables, and singleton patterns; for Crash, the warning words focus on stack information, exception types, null pointers, and array out-of-bounds errors; and for Low-Level Signal Issues, the warning words focus on HAL layer interfaces, AIDL communication, and system service calls. By designing this mapping table, software defect analysis tools can focus more on the key elements of specific types of problems, thus improving the accuracy of defect analysis.
[0053] After determining the defect type of the vehicle infotainment software, the analysis prompts can be obtained by querying the mapping table. For example, if the defect type of the vehicle infotainment software is a memory leak problem, then the analysis prompts will be the preset prompts corresponding to the memory leak problem.
[0054] In one possible implementation, the defect analysis of the vehicle infotainment software based on defect information, analysis prompts, and multiple historical defect analysis cases in the vector database includes the following steps: The defect information is vectorized to obtain target vector data; Determine the similarity between the target vector data and the historical vector data of multiple historical defect analysis cases to obtain multiple similarity values; The target analysis strategy is determined from the first and second defect analysis strategies based on multiple similarities. The first defect analysis strategy refers to the strategy of using defect information, analysis prompts and historical defect analysis cases to perform defect analysis on the software. The second defect analysis strategy refers to the strategy of using defect information and analysis prompts to perform defect analysis on the software. Defect analysis of vehicle infotainment software is performed based on target analysis strategies.
[0055] When performing defect analysis on in-vehicle infotainment software based on historical defect analysis cases, this application categorizes the analysis into two types: those requiring the introduction of historical defect analysis cases as contextual references and those not requiring such references. The decision on whether to incorporate historical defect analysis cases as contextual references involves calculating the similarity between each historical defect analysis case and the defect information of the in-vehicle infotainment software. The similarity calculation is as follows: Since multiple historical defect analysis cases are stored in a vector database as vector data, the vector data of these cases, referred to as historical vector data, can be obtained from the database. This, along with the defect information from the vehicle's infotainment software, is then vectorized to obtain target vector data. The similarity between the target vector data and the historical vector data of the multiple historical defect analysis cases is then calculated, yielding multiple similarity scores. For example, a cosine similarity algorithm can be used to calculate these similarities.
[0056] After obtaining multiple similarity scores, it's possible to select whether to use historical defect analysis cases as contextual references for defect analysis of the in-vehicle infotainment software. Specifically, an analysis strategy is determined from a first and a second defect analysis strategy based on multiple similarity scores and used as the target analysis strategy. The first defect analysis strategy refers to using defect information, analysis prompts, and historical defect analysis cases to analyze the software defects; that is, it requires using historical defect analysis cases as contextual references for defect analysis of the in-vehicle infotainment software. The second defect analysis strategy refers to using defect information and analysis prompts to analyze the software defects; that is, it does not require using historical defect analysis cases as contextual references for defect analysis of the in-vehicle infotainment software.
[0057] Specifically, the target analysis strategy is determined from the first and second defect analysis strategies based on multiple similarities. If multiple similarities are all less than the preset similarity, it means that multiple historical defect analysis cases in the vector database are not similar to the problems in the vehicle software. Using historical defect analysis cases as contextual references is not helpful for defect analysis of the vehicle software. Therefore, it is considered that it is not necessary to use historical defect analysis cases as contextual references for defect analysis of the vehicle software. Thus, the second defect analysis strategy is determined as the target analysis strategy.
[0058] If multiple similarity scores are all less than the preset similarity score, it means that some historical defect analysis cases in the vector database are similar to the problems that occur in the vehicle infotainment software. Using historical defect analysis cases that are similar to the problems that occur in the vehicle infotainment software as contextual references to perform defect analysis on the vehicle infotainment software can improve the accuracy of defect analysis. Therefore, it is considered that historical defect analysis cases should be used as contextual references to perform defect analysis on the vehicle infotainment software. Thus, the first defect analysis strategy will be determined as the target analysis strategy.
[0059] After obtaining the target analysis strategy, defect analysis of the vehicle software is then performed based on the target analysis strategy. This enables adaptive selection of different analysis paths for defect analysis of the vehicle software, which not only improves analysis efficiency but also ensures the stability and reliability of the defect analysis results.
[0060] In one possible implementation, the above-mentioned defect analysis of vehicle infotainment software based on the target analysis strategy includes the following steps: Obtain the target defect analysis engine corresponding to the defect type; If the target analysis strategy is the first defect analysis strategy, the similarity that is greater than or equal to the preset similarity among multiple similarities is determined as the target similarity; Input the defect information, analysis prompts, and historical defect analysis cases corresponding to the target similarity into the target defect analysis engine, so that the target defect analysis engine can output the defect analysis results of the vehicle software; If the target analysis strategy is the second defect analysis strategy, the defect information and analysis prompts are input into the target defect analysis engine, and the target defect analysis engine outputs the defect analysis results of the vehicle software.
[0061] This application designs a unified analysis engine interface, which supports the integration of various defect analysis engines. The various defect analysis engines, applicable scenarios, and advantages are shown in Table 1: Table 1
[0062] The first analysis engine refers to the Cursor client, the second analysis engine refers to the Google Gemini Command-Line Interface (Gemini CLI), the third analysis engine refers to the Claude Code, the fourth analysis engine refers to the Qoder client, the fifth analysis engine refers to the Ollam local model, and the sixth analysis engine refers to the cloud-based API (Cloud-based Application Programming Interface).
[0063] After obtaining the target analysis strategy, a defect analysis engine is first selected from various defect analysis engines in Table 1 based on the defect type of the vehicle infotainment software. This engine is then used as the target defect analysis engine to perform defect analysis on the vehicle infotainment software. In this application, selecting the appropriate defect analysis engine based on the defect type not only ensures the integrity of the analysis logic but also improves the flexibility and efficiency of the defect analysis.
[0064] Defect analysis of in-vehicle infotainment software based on a target defect analysis engine includes the following steps: If the target analysis strategy is the first defect analysis strategy, which requires using historical defect analysis cases for software defect analysis, then the similarity scores among multiple similarity scores that are greater than or equal to a preset similarity score are first determined as the target similarity scores. Then, the defect information, analysis prompts, and historical defect analysis cases corresponding to the target similarity scores are input into the target defect analysis engine, thereby performing in-depth defect analysis of the in-vehicle infotainment software through the target defect analysis engine. The historical defect analysis cases corresponding to the target similarity scores refer to historical defect analysis cases that are similar to the problems encountered in the in-vehicle infotainment software. If the target analysis strategy is the second defect analysis strategy, which does not require using historical defect analysis cases for software defect analysis, then the defect information and analysis prompts are input into the target defect analysis engine, thereby performing in-depth defect analysis of the in-vehicle infotainment software through the target defect analysis engine.
[0065] After performing in-depth defect analysis on the vehicle infotainment software, the target defect analysis engine outputs the defect analysis results and automatically generates targeted repair suggestions based on the results. The defect analysis results and repair suggestions are then linked to the corresponding issue tickets for the vehicle infotainment software, which are then backed up locally and sent to the relevant personnel's email or instant messaging client for easy access to the defect analysis results and repair suggestions for each vehicle infotainment software.
[0066] In one possible implementation, after performing defect analysis on the vehicle infotainment software according to the target analysis strategy, the software defect analysis method further includes the following steps: Defect information and defect analysis results from vehicle infotainment software are encapsulated into defect analysis cases, and these cases are used to update the vector database.
[0067] After completing the defect analysis of the vehicle's infotainment software, the defect information and the results of this analysis are structured and encapsulated to form a complete defect analysis case. This case not only records the problem phenomenon but also retains the original defect information, ensuring high traceability and reusability. After forming the defect analysis case, it undergoes vectorization, transforming it into high-dimensional vector data. This high-dimensional vector data, along with the defect analysis case itself, is stored in a vectorized database for continuous updates. This update mechanism allows the software defect analysis tool to continuously accumulate high-quality defect analysis knowledge. When similar new defects appear in the future, the tool can more accurately recall relevant historical experience, providing effective references for subsequent analysis. This achieves automatic accumulation and iterative optimization of defect analysis knowledge, improving not only the coverage and timeliness of the historical software defect analysis tool but also enhancing its self-learning ability and long-term stability.
[0068] The following is another embodiment of a software defect analysis method provided in this application specification.
[0069] Figure 2 This illustration shows another schematic flowchart of a software defect analysis method provided in an embodiment of this application. This software defect analysis method is applied to software defect analysis tools integrated into electronic devices. The software defect analysis method provided in this embodiment includes the following scheme: S210: Obtain the problem work order list from the Jira system, and obtain the i-th problem work order from the problem work order list. The problem work order list includes N problem work orders, and each problem work order corresponds to a vehicle infotainment software that has a problem. N≥1, 1≤i≤N; S211: Based on the detailed information and submission notes of the i-th issue work order, construct the defect information of the i-th vehicle system software corresponding to the i-th issue work order; S212: Generate multiple defect classification options, and input the defect information and multiple defect classification options into the large language model so that the large language model can select one defect classification option from the multiple defect classification options to obtain the target defect classification option; S213: Determine whether the target defect classification option belongs to the preset classification option. If not, execute S124; if yes, execute S215. S214: Determine the target defect classification option as the defect type of the i-th vehicle infotainment software, and execute S216; S215: Match the log content in the defect information with the classification conditions corresponding to multiple sub-defect types under the preset classification options, and determine the sub-defect type corresponding to the classification conditions satisfied by the log content as the defect type of the i-th vehicle infotainment software, and execute S216. S216: Obtain the mapping table between preset defect types and preset prompt words, query the mapping table based on the defect type, and obtain the analysis prompt word of the i-th vehicle software; S217: Vectorize the defect information to obtain target vector data; S218: Determine the similarity between the target vector data and the historical vector data of multiple historical defect analysis cases in the vector database, and obtain multiple similarity scores; S219: Determine whether multiple similarities are all less than the preset similarity. If yes, execute S2201; otherwise, execute S2210. S2201: The second defect analysis strategy is determined as the target analysis strategy, wherein the second defect analysis strategy refers to the strategy of using defect information and analysis prompt words to perform defect analysis on the software; S2202: Obtain the target defect analysis engine corresponding to the defect type, input the defect information and analysis prompt words into the target defect analysis engine, so that the target defect analysis engine outputs the defect analysis results of the vehicle software, and execute S230; S2210: The first defect analysis strategy is determined as the target analysis strategy, wherein the first defect analysis strategy refers to the strategy of using defect information, analysis prompt words and historical defect analysis cases to perform defect analysis on the software; S2211: Determine the similarity that is greater than or equal to the preset similarity among multiple similarities as the target similarity, and input the defect information, analysis prompt words and historical defect analysis cases corresponding to the target similarity into the target defect analysis engine so that the target defect analysis engine can output the defect analysis results of the vehicle software, and execute S230; S230: Encapsulate the defect information and the defect analysis results of the i-th vehicle infotainment software into a defect analysis case of the i-th vehicle infotainment software, and update the vector database using the defect analysis case of the i-th vehicle infotainment software.
[0070] Based on the technical solutions formed by S120 to S220 above, the software defect analysis method provided in this application embodiment can automatically perform defect analysis on multiple problematic vehicle infotainment software in sequence. This not only solves the problem of low efficiency in traditional manual analysis, but also significantly improves the accuracy of determining the root cause of defects in each vehicle infotainment software by using defect analysis prompts and historical defect analysis cases as contextual references.
[0071] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0072] Figure 3 This illustration shows a structural schematic diagram of a software defect analysis device provided in an embodiment of this application, such as... Figure 3 As shown, the software defect analysis device 300 includes: The information acquisition module 310 is used to acquire defect information of the vehicle infotainment software; The type classification module 320 is used to determine the defect type of the vehicle infotainment software based on the defect information; The prompt word acquisition module 330 is used to acquire analysis prompt words that participate in the defect analysis of the vehicle software according to the defect type. The defect analysis module 340 is used to perform defect analysis on the vehicle infotainment software based on the defect information, the analysis prompts, and multiple historical defect analysis cases in the vector database.
[0073] In one possible implementation, the type classification module 320 is specifically used to generate multiple defect classification options; input the defect information and the multiple defect classification options into a large language model, so that the large language model selects a defect classification option from the multiple defect classification options to obtain a target defect classification option; and determine the defect type based on the target defect classification option.
[0074] In one possible implementation, the type classification module 320 is specifically used to determine whether the target defect classification option belongs to a preset classification option; if the target defect classification option is not the preset classification option, the target defect classification option is determined as the defect type; if the target defect classification option is the preset classification option, the log content in the defect information is matched with the classification conditions corresponding to multiple sub-defect types under the preset classification option; the sub-defect type corresponding to the classification conditions satisfied by the log content is determined as the defect type.
[0075] In one possible implementation, the prompt word acquisition module 330 is specifically used to acquire a mapping table between preset defect types and preset prompt words; and to query the mapping table based on the defect type to obtain the analysis prompt word.
[0076] In one possible implementation, the defect analysis module 340 is specifically used to vectorize the defect information to obtain target vector data; determine the similarity between the target vector data and the historical vector data of the multiple historical defect analysis cases to obtain multiple similarities; determine a target analysis strategy from a first defect analysis strategy and a second defect analysis strategy based on the multiple similarities, wherein the first defect analysis strategy refers to a strategy of performing defect analysis on the software using the defect information, the analysis prompt words, and the historical defect analysis cases, and the second defect analysis strategy refers to a strategy of performing defect analysis on the software using the defect information and the analysis prompt words; and perform defect analysis on the vehicle system software according to the target analysis strategy.
[0077] In one possible implementation, the defect analysis module 340 is specifically used to determine the second defect analysis strategy as the target analysis strategy if all of the plurality of similarities are less than the preset similarity; and to determine the first defect analysis strategy as the target analysis strategy if the plurality of similarities are not less than the preset similarity.
[0078] In one possible implementation, the defect analysis module 340 is specifically used to obtain the target defect analysis engine corresponding to the defect type; if the target analysis strategy is the first defect analysis strategy, the similarity among the plurality of similarities that is greater than or equal to the preset similarity is determined as the target similarity; the defect information, the analysis prompt words, and the historical defect analysis cases corresponding to the target similarity are input into the target defect analysis engine, so that the target defect analysis engine outputs the defect analysis result of the vehicle software; if the target analysis strategy is the second defect analysis strategy, the defect information and the analysis prompt words are input into the target defect analysis engine, so that the target defect analysis engine outputs the defect analysis result of the vehicle software.
[0079] In one possible implementation, the software defect analysis device 300 further includes: The data update unit is used to encapsulate the defect information and the defect analysis results of the vehicle software into a defect analysis case, and update the vector database using the defect analysis case.
[0080] It should be noted that the software defect analysis device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the software defect analysis method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the software defect analysis device and the software defect analysis method embodiments provided in the above embodiments belong to the same concept. Therefore, for details not disclosed in the device embodiments of this application, please refer to the embodiments of the software defect analysis method of this application, which will not be repeated here.
[0081] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0082] Figure 4 This application provides a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 4 As shown, the electronic device 400 includes a memory 401 and a processor 402. The memory 401 stores executable program code 4011, and the processor 402 is used to call and execute the executable program code 4011 to perform a software defect analysis method.
[0083] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0084] When each functional module is divided according to its corresponding function, the electronic device may include: an information acquisition module, a type classification module, a prompt word acquisition module, a defect analysis module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0085] The electronic device provided in this embodiment is used to execute the above-described software defect analysis method, and therefore can achieve the same effect as the above-described implementation method.
[0086] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of relevant program code and data by the electronic device.
[0087] The processing module may be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0088] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the aforementioned related method steps to implement a software defect analysis method in the above embodiment.
[0089] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a software defect analysis method as described in the above embodiment.
[0090] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip execute a software defect analysis method in the above embodiments.
[0091] In this embodiment, the electronic device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding software defect analysis method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding software defect analysis method provided above, and will not be repeated here.
[0092] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0093] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0094] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A software defect analysis method, characterized in that, The software defect analysis method includes: Obtain defect information from the vehicle's infotainment system software; The defect type of the vehicle infotainment software is determined based on the defect information; Based on the defect type, obtain the analysis prompt words that participate in the defect analysis of the vehicle infotainment software; Based on the defect information, the analysis prompts, and multiple historical defect analysis cases in the vector database, defect analysis is performed on the vehicle infotainment software.
2. The software defect analysis method according to claim 1, characterized in that, The determination of the defect type of the vehicle infotainment software based on the defect information includes: Generate multiple defect classification options; The defect information and the multiple defect classification options are input into a large language model, so that the large language model selects a defect classification option from the multiple defect classification options to obtain the target defect classification option; The defect type is determined based on the target defect classification options.
3. The software defect analysis method according to claim 2, characterized in that, Determining the defect type based on the target defect classification option includes: Determine whether the target defect classification option belongs to the preset classification option; If the target defect classification option is not the preset classification option, the target defect classification option will be determined as the defect type. If the target defect classification option is the preset classification option, the log content in the defect information is matched with the classification conditions corresponding to multiple sub-defect types under the preset classification option; The sub-defect type corresponding to the classification conditions satisfied by the log content is determined as the defect type.
4. The software defect analysis method according to claim 1, characterized in that, The analysis prompts obtained based on the defect type for participating in defect analysis of the vehicle infotainment software include: Obtain the mapping table between preset defect types and preset prompt words; The analysis hints are obtained by querying the mapping table based on the defect type.
5. The software defect analysis method according to claim 1, characterized in that, The defect analysis of the vehicle infotainment software based on the defect information, the analysis prompts, and multiple historical defect analysis cases in the vector database includes: The defect information is vectorized to obtain target vector data; Determine the similarity between the target vector data and the historical vector data of the multiple historical defect analysis cases to obtain multiple similarities; Based on the multiple similarities, a target analysis strategy is determined from the first defect analysis strategy and the second defect analysis strategy, wherein the first defect analysis strategy refers to the strategy of performing defect analysis on the software using the defect information, the analysis prompt words, and historical defect analysis cases, and the second defect analysis strategy refers to the strategy of performing defect analysis on the software using the defect information and the analysis prompt words. Defect analysis is performed on the vehicle infotainment software based on the target analysis strategy.
6. The software defect analysis method according to claim 5, characterized in that, The step of determining the target analysis strategy from the first defect analysis strategy and the second defect analysis strategy based on the multiple similarities includes: If all of the aforementioned similarities are less than a preset similarity, the second defect analysis strategy will be determined as the target analysis strategy. If the multiple similarities are all less than the preset similarity, the first defect analysis strategy is determined as the target analysis strategy.
7. The software defect analysis method according to claim 6, characterized in that, The defect analysis of the vehicle software based on the target analysis strategy includes: Obtain the target defect analysis engine corresponding to the defect type; If the target analysis strategy is the first defect analysis strategy, the similarity among the plurality of similarities that is greater than or equal to the preset similarity is determined as the target similarity; The defect information, the analysis prompt words, and the historical defect analysis cases corresponding to the target similarity are input into the target defect analysis engine, so that the target defect analysis engine outputs the defect analysis results of the vehicle software; If the target analysis strategy is the second defect analysis strategy, the defect information and the analysis prompt words are input into the target defect analysis engine so that the target defect analysis engine outputs the defect analysis results of the vehicle software.
8. The software defect analysis method according to claim 7, characterized in that, After performing defect analysis on the vehicle infotainment software according to the target analysis strategy, the software defect analysis method further includes: The defect information and the defect analysis results of the vehicle infotainment software are encapsulated into a defect analysis case, and the vector database is updated using the defect analysis case.
9. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the electronic device to perform the software defect analysis method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the software defect analysis method as described in any one of claims 1 to 8.