Automobile software code change influence analysis method and system
By constructing a multi-source unified vector-enhanced knowledge graph, and combining syntactic/structural dependencies, semantic similarity, interface contracts, and requirement/defect tracing paths, the problem of inconsistent and inefficient analysis of the impact of code changes in automotive software development is solved, achieving deep automated analysis and efficient software quality improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA FAW CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-28
AI Technical Summary
In automotive software development, the analysis of the impact of code changes is inconsistent, superficial, and inefficient due to the low efficiency of manual analysis, making it difficult to discover potential problems.
We construct a unified vector-enhanced knowledge graph from multiple sources, and conduct impact propagation analysis through four paths: syntactic/structural dependencies, semantic similarity, interface contracts, and requirement/defect tracing, generating a structured contextual report.
It enables automated and in-depth code change impact analysis, improving software quality and development efficiency, supporting intelligent analysis of large models, reducing unnecessary full regression, and saving costs.
Smart Images

Figure CN121935154A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development, and in particular to a method and system for analyzing the impact of changes to automotive software code. Background Technology
[0002] In current automotive code development, code changes have adverse effects on automotive software. For example, the testing context for automotive software is inconsistent: requirements, architecture models (ARXML), code, test cases, and defect data are scattered across different tools, lacking a unified framework; analysis is superficial: traditional static code analysis can only identify syntactic dependencies, failing to understand semantic relationships and the impact of service contracts under SOA architecture; manual analysis of the impact of software changes is inefficient: change testing can only be based on manually designed new feature test cases and regression analysis of existing test cases, making it difficult to discover potential new problems caused by transitive dependencies.
[0003] Therefore, there is a need for an automotive software change impact analysis strategy based on multi-source fusion vector-enhanced knowledge graphs. This strategy should be able to automatically, comprehensively, and deeply analyze the impact of a code change on the entire automotive software map, and provide context-rich structured reports for subsequent large-scale intelligent analysis or manual review, thereby significantly improving software quality and development efficiency. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for analyzing the impact of changes to automotive software code, thereby solving at least one of a number of technical problems.
[0005] Issues include inconsistent testing contexts in automotive software testing; superficial analysis; and low efficiency of manual analysis of the impact of software changes.
[0006] This invention provides the following solution:
[0007] According to a first aspect of the present invention, a method for analyzing the impact of changes to automotive software code is provided, comprising:
[0008] Step S1: Construct a multi-source unified vector-enhanced knowledge graph data index;
[0009] This includes performing data extraction and parsing on the codebase, ARXML files, and requirements and defect documents, and establishing corresponding indexes;
[0010] Among them, a unified graph data model is established based on the extracted entities and relationships, and a semantic vector is generated for each entity node to achieve the fusion of graph and vector;
[0011] Step S2, Multipath Impact Propagation Analysis;
[0012] This includes analyzing code differences in version control systems and locating the initial set of changed code nodes;
[0013] Impact propagation analysis is conducted through four impact paths: syntax / structure dependency, semantic similarity, interface contract, and requirement / defect tracing.
[0014] The analysis process for the four impact paths is executed by the impact propagation engine, which is called upon by the analysis path planning engine.
[0015] Step S3, backtracking and iterative analysis;
[0016] Once a high-order impact node is discovered through semantic similarity, interface contract, and requirement / defect tracing path based on step S2, the analysis path planning engine initiates backtracking to find other code nodes that implement the high-order impact node and include them in the analysis scope.
[0017] The influence propagation analysis in step S2 is performed iteratively, starting with the newly discovered node, until no new node is added, thus forming the final influence set.
[0018] The analysis path planning engine terminates completed impact paths in a timely manner during the analysis process;
[0019] Step S4: Generate a structured analysis context;
[0020] This includes outputting a list of analysis results categorized by the four influencing paths in step S2;
[0021] The relevant contextual information is packaged for the key nodes in the final impact set, forming structured data including bound vector data and an intuitively readable report.
[0022] Furthermore, including:
[0023] The codebase-related index construction process in step S1, which involves data extraction and parsing, is as follows:
[0024] Generate Abstract Syntax Trees (ASTs) from C / C++ / Java source code;
[0025] Extract functions, variables, types, call relationships, containment relationships, entities and relationships, as well as dependencies between multiple repositories.
[0026] Furthermore, including:
[0027] The ARXML-related index construction process in step S1, which involves data extraction and parsing, is as follows:
[0028] Parse the AUTOSAR description file, extract the entities of software components SWC, ports, and interfaces, and their connection relationships, and construct a structured dependency graph.
[0029] Furthermore, including:
[0030] The process of building the index related to the requirements and defects documents in the data extraction and parsing stage of step S1 is as follows:
[0031] Extract the text description, ID, and status information of requirement items and defect reports from requirement management tools and defect tracking systems;
[0032] Content is segmented by chapter and its relationships are recorded.
[0033] Furthermore, including:
[0034] The semantic vector is generated in step S1 as follows:
[0035] Using a domain-pretrained model, the semantic information of nodes is embedded into a high-dimensional vector space;
[0036] Semantic information includes function name, code, requirement text, interface name, description of the problem function, and problem repair record.
[0037] Furthermore, including:
[0038] In step S1, when fusing the graph and vector, the key requirement nodes corresponding to the AST source code are identified and associated, and the requirement content is embedded into the vector and added to the AST file node.
[0039] Furthermore, including:
[0040] The specific propagation mechanisms of the four influence paths in step S2 are as follows:
[0041] Syntax / Structure Dependency Path: Traditional dependency analysis based on call and inclusion relationships using vector-enhanced knowledge graphs;
[0042] Semantic similarity path: Calculate the similarity between the vectors of nodes in the initial change code node set and the vectors of other nodes in the graph, and mark the potentially influential nodes whose similarity exceeds the threshold;
[0043] Interface contract path: The impact is passed from the code through the implementation relationship to the ARXML interface node, and then through the connection relationship to all components that consume the interface;
[0044] Requirements / Defects Traceability Path: Locate the corresponding requirement node by affecting the code node, trace upwards to the requirement and defect, and assess the impact of the change on functional commitments and issue fixes.
[0045] Furthermore, including:
[0046] The relevant context information for packaging the key nodes of the final impact set in step S4 includes:
[0047] The differences between the current and previous versions of the code snippet, the implementation of the natural language requirements description, the relevant ARXML interface definitions, the associated test cases, and the historical defect records.
[0048] Furthermore, including:
[0049] The structured data generated in step S4 supports API calls and semantic similarity retrieval, and is compatible with external tools for large models and manual analysis system calls.
[0050] According to a second aspect of the present invention, an automotive software code change impact analysis system is provided, comprising:
[0051] The index building module is used to extract and parse data from the code repository, ARXML files, and requirements and defects documents, and to build corresponding indexes.
[0052] Among them, a unified graph data model is established based on the extracted entities and relationships, and a semantic vector is generated for each entity node to achieve the fusion of graph and vector;
[0053] The propagation analysis module is used to analyze code differences in version control systems and locate the initial set of changed code nodes.
[0054] Impact propagation analysis is conducted through four impact paths: syntax / structure dependency, semantic similarity, interface contract, and requirement / defect tracing.
[0055] The analysis process for the four impact paths is executed by the impact propagation engine, which is called upon by the analysis path planning engine.
[0056] The backtracking iteration module is used to initiate backtracking by the analysis path planning engine after a high-order impact node is discovered through semantic similarity, interface contract, and requirement / defect tracing path. This allows the engine to find other code nodes that implement the high-order impact node and include them in the analysis scope.
[0057] The influence propagation analysis is iteratively performed starting from newly discovered nodes until no new nodes are added, forming the final influence set.
[0058] The analysis path planning engine terminates completed impact paths in a timely manner during the analysis process;
[0059] The context generation module is used to output a list of analysis results categorized by the four impact paths;
[0060] The relevant contextual information is packaged for the key nodes in the final impact set, forming structured data including bound vector data and an intuitively readable report.
[0061] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0062] The memory stores computer programs, which, when executed by a processor, cause the processor to perform steps such as those in an automotive software code change impact analysis method.
[0063] According to a second aspect of the present invention, a computer-readable storage medium is provided storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform steps such as a method for analyzing the impact of changes in automotive software code.
[0064] According to a second aspect of the present invention, an automotive software development platform is provided, comprising:
[0065] Electronic devices used to implement steps such as methods for analyzing the impact of changes to automotive software code.
[0066] The processor runs programs, and when the program runs, it executes steps such as the impact analysis method of automotive software code change from the data output by the electronic device.
[0067] Storage medium used to store programs that, when run, perform steps such as an impact analysis method for changes in automotive software code on data output from electronic devices.
[0068] The above solution achieves the following beneficial technical effects:
[0069] This application introduces vector augmentation technology to enable the graph to have semantic understanding capabilities, discover hidden similarity dependencies, and achieve an analysis depth far exceeding that of rule-based methods.
[0070] This application, through a high degree of automation, frees engineers from tedious cross-tool traceability, accurately defines the test scope, avoids unnecessary full regression, and saves costs.
[0071] This application provides intelligent context for comprehensive intelligent R&D by generating a structured context package that is perfectly adapted to the next-generation software engineering intelligent agent (AIAgent) based on large models. Attached Figure Description
[0072] Figure 1 This is a flowchart of a method for analyzing the impact of changes in automotive software code, provided by one or more embodiments of the present invention.
[0073] Figure 2 This is a structural diagram of an automotive software code change impact analysis system provided by one or more embodiments of the present invention.
[0074] Figure 3 This is a schematic diagram of a closed-loop analysis system architecture from data to insight provided in a specific embodiment of the present invention.
[0075] Figure 4 This is a block diagram of an electronic device structure, which is one of the automotive software code change impact analysis methods provided in one or more embodiments of the present invention. Detailed Implementation
[0076] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0077] Figure 1 This is a flowchart of a method for analyzing the impact of changes in automotive software code, provided by one or more embodiments of the present invention.
[0078] like Figure 1 The methods for analyzing the impact of automotive software code changes shown include:
[0079] Step S1: Construct a multi-source unified vector-enhanced knowledge graph data index;
[0080] This includes performing data extraction and parsing on the codebase, ARXML files, and requirements and defect documents, and establishing corresponding indexes;
[0081] Among them, a unified graph data model is established based on the extracted entities and relationships, and a semantic vector is generated for each entity node to achieve the fusion of graph and vector;
[0082] Step S2, Multipath Impact Propagation Analysis;
[0083] This includes analyzing code differences in version control systems and locating the initial set of changed code nodes;
[0084] Impact propagation analysis is conducted through four impact paths: syntax / structure dependency, semantic similarity, interface contract, and requirement / defect tracing.
[0085] The analysis process for the four impact paths is executed by the impact propagation engine, which is called upon by the analysis path planning engine.
[0086] Step S3, backtracking and iterative analysis;
[0087] Once a high-order impact node is discovered through semantic similarity, interface contract, and requirement / defect tracing path based on step S2, the analysis path planning engine initiates backtracking to find other code nodes that implement the high-order impact node and include them in the analysis scope.
[0088] The influence propagation analysis in step S2 is performed iteratively, starting with the newly discovered node, until no new node is added, thus forming the final influence set.
[0089] The analysis path planning engine terminates completed impact paths in a timely manner during the analysis process;
[0090] Step S4: Generate a structured analysis context;
[0091] This includes outputting a list of analysis results for classifying the four influencing paths according to step S2;
[0092] The relevant contextual information is packaged for the key nodes in the final impact set, forming structured data including bound vector data and an intuitively readable report.
[0093] Specifically, version control systems like Git are a collection of tools for managing changes to files such as code and documents. Git is the most commonly used among them, and similar tools include SVN and Mercurial. Their core function is to track file modification history, record change details (e.g., modified content, modifier, and time), support version comparison and rollback, and facilitate code synchronization during collaborative development. In this application, its core purpose is to analyze the differences between old and new versions of code (Diff), accurately pinpointing which code nodes have changed, forming an initial set of changed code nodes, C_initial, providing a starting point for subsequent impact propagation analysis.
[0094] In this embodiment, it includes:
[0095] The codebase-related index construction process in step S1, which involves data extraction and parsing, is as follows:
[0096] Generate Abstract Syntax Trees (ASTs) from C / C++ / Java source code;
[0097] Extract functions, variables, types, call relationships, containment relationships, entities and relationships, as well as dependencies between multiple repositories.
[0098] In this embodiment, it includes:
[0099] The ARXML-related index construction process in step S1, which involves data extraction and parsing, is as follows:
[0100] Parse the AUTOSAR description file, extract the entities of software components SWC, ports, and interfaces, and their connection relationships, and construct a structured dependency graph.
[0101] In this embodiment, it includes:
[0102] The process of building the index related to the requirements and defects documents in the data extraction and parsing stage of step S1 is as follows:
[0103] Extract the text description, ID, and status information of requirement items and defect reports from requirement management tools and defect tracking systems;
[0104] Content is segmented by chapter and its relationships are recorded.
[0105] In this embodiment, it includes:
[0106] The semantic vector is generated in step S1 as follows:
[0107] Using a domain-pretrained model, the semantic information of nodes is embedded into a high-dimensional vector space;
[0108] Semantic information includes function name, code, requirement text, interface name, description of the problem function, and problem repair record.
[0109] Specifically, domain-specific pre-trained models are AI models that are pre-trained for the automotive software development field (covering professional scenarios such as code, requirement documents, and ARXML interface definitions). Compared to general models, they have a better understanding of the professional semantics and knowledge logic of this field.
[0110] In this application, its core function is to transform the semantic information of each entity node in the knowledge graph (such as function names and codes, requirement text, interface names, etc.) into high-dimensional semantic vectors, enabling the graph to have the ability to calculate semantic similarity, and providing core technical support for discovering implicit dependencies through "semantic similarity paths".
[0111] In this embodiment, it includes:
[0112] In step S1, when fusing the graph and vector, the key requirement nodes corresponding to the AST source code are identified and associated, and the requirement content is embedded into the vector and added to the AST file node.
[0113] In this embodiment, it includes:
[0114] The specific propagation mechanisms of the four influence paths in step S2 are as follows:
[0115] Syntax / Structure Dependency Path: Traditional dependency analysis based on call and inclusion relationships using vector-enhanced knowledge graphs;
[0116] Semantic similarity path: Calculate the similarity between the vectors of nodes in the initial change code node set and the vectors of other nodes in the graph, and mark the potentially influential nodes whose similarity exceeds the threshold;
[0117] Interface contract path: The impact is passed from the code through the implementation relationship to the ARXML interface node, and then through the connection relationship to all components that consume the interface;
[0118] Requirements / Defects Traceability Path: Locate the corresponding requirement node by affecting the code node, trace upwards to the requirement and defect, and assess the impact of the change on functional commitments and issue fixes.
[0119] In this embodiment, it includes:
[0120] The relevant context information for packaging the key nodes of the final impact set in step S4 includes:
[0121] The differences between the current and previous versions of the code snippet, the implementation of the natural language requirements description, the relevant ARXML interface definitions, the associated test cases, and the historical defect records.
[0122] In this embodiment, it includes:
[0123] The structured data generated in step S4 supports API calls and semantic similarity retrieval, and is compatible with external tools for large models and manual analysis system calls.
[0124] Figure 2 This is a structural diagram of an automotive software code change impact analysis system provided by one or more embodiments of the present invention.
[0125] like Figure 2 The automotive software code change impact analysis system shown includes:
[0126] The index building module is used to extract and parse data from the code repository, ARXML files, and requirements and defects documents, and to build corresponding indexes.
[0127] Among them, a unified graph data model is established based on the extracted entities and relationships, and a semantic vector is generated for each entity node to achieve the fusion of graph and vector;
[0128] The propagation analysis module is used to analyze code differences in version control systems and locate the initial set of changed code nodes.
[0129] Impact propagation analysis is conducted through four impact paths: syntax / structure dependency, semantic similarity, interface contract, and requirement / defect tracing.
[0130] The analysis process for the four impact paths is executed by the impact propagation engine, which is called upon by the analysis path planning engine.
[0131] The backtracking iteration module is used to initiate backtracking by the analysis path planning engine after a high-order impact node is discovered through semantic similarity, interface contract, and requirement / defect tracing path. This allows the engine to find other code nodes that implement the high-order impact node and include them in the analysis scope.
[0132] The influence propagation analysis is iteratively performed starting from newly discovered nodes until no new nodes are added, forming the final influence set.
[0133] The analysis path planning engine terminates completed impact paths in a timely manner during the analysis process;
[0134] The context generation module is used to output a list of analysis results categorized by the four impact paths;
[0135] The relevant contextual information is packaged for the key nodes in the final impact set, forming structured data including bound vector data and an intuitively readable report.
[0136] It is worth noting that although this system / device only discloses the above-mentioned modules / units, it does not mean that this system / device is limited to the above-mentioned basic functional modules. On the contrary, what this invention intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. It cannot be assumed that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules just because this embodiment only discloses a few basic functional modules.
[0137] In one specific embodiment, the following is disclosed: Figure 3 The closed-loop analysis system shown is based on the automotive software development process and the outputs of each stage, and integrates multi-source knowledge such as code and documents into a vector-enhanced knowledge graph.
[0138] Constructing a unified multi-source "vector-augmented knowledge graph" data index
[0139] Data extraction and analysis:
[0140] Code repository indexing: From source code such as C / C++ / Java code, an Abstract Syntax Tree (AST) is generated to extract entities and relationships such as functions, variables, types, call relationships, containment relationships, and dependencies between multiple repositories.
[0141] ARXML Index: Parses the AUTOSAR description file, extracts entities such as software components (SWC), ports, and interfaces, and their connections, and constructs a structured dependency graph.
[0142] Requirements and Defect Document Index: Extract text descriptions, IDs, statuses, and other information from requirements management tools and defect tracking systems, segment the content according to dimensions such as chapters, and record the relationships between them.
[0143] Graph pattern and vector fusion:
[0144] Establish a unified graph data model and define the aforementioned entity types and relationship types.
[0145] Key innovation: Generating a semantic vector for each entity node. A domain-pre-trained model is used to embed the semantic information of nodes (such as function names and codes, requirement text, interface names, problem function descriptions, and problem repair records) into a high-dimensional vector space. This enables the graph to calculate semantic similarity.
[0146] For the required functions corresponding to the source code AST, key requirement nodes are identified and associated. The requirement content is embedded into vectors and added to the AST file nodes, which can be used to identify the scope of impact.
[0147] Multi-path impact propagation analysis based on changed code files
[0148] Initial location: Analyze the code differences in version control systems such as Git, and accurately locate the set of code nodes that have changed, C_initial.
[0149] Multipath propagation mechanism:
[0150] Path 1 (Syntax / Structure Dependencies): Traditional dependency analysis based on graph-based calls, inclusions, and other relationships.
[0151] Path 2 (Semantic Similarity): (Core Innovation) Calculates the similarity between the changed node vector and other node vectors in the graph. If the similarity exceeds a threshold, it is marked as a potentially influential node, effectively discovering implicit dependencies that are "functionally similar but not directly invoked".
[0152] Path 3 (Interface Contract): (Key innovation for SOA / AUTOSAR) The impact is passed from the code to the ARXML interface node through the implementation relationship, and then to all components that consume the interface through the connection relationship, ensuring worry-free service compatibility analysis.
[0153] Path 4 (Requirement / Defect Tracing): Analyze the corresponding requirement nodes through the impact code nodes identified in the previous steps, locate the requirements and defects upwards, and assess the impact of changes on functional commitments and problem fixes.
[0154] Initial path branch analysis: Identify the affected paths from code changes and hand them over to the analysis path planning engine for backtracking and iterative analysis machine mechanisms.
[0155] Backtracking and Iterative Analytical Machine Mechanism
[0156] When a new higher-order impact node (such as a requirement) is discovered through paths 2, 3, and 4, the analysis path planning engine initiates backtracking: it searches for other code nodes that implement the requirement and includes them in the analysis. Subsequently, the algorithm iteratively propagates from the newly discovered node until no new nodes are added to the final impact set C_final. This mechanism ensures the completeness of the analysis.
[0157] The path planning engine calls the influence propagation engine to analyze the impact paths and decision-making of specific paths, and terminates completed paths in a timely manner.
[0158] Generate structured "analysis context" sub-path impact reports: The system automatically generates a list categorized by impact path, making the scope of impact clear at a glance.
[0159] Enriching the structural context construction: (Core value output) Dynamically packaging key nodes in C_final (such as an affected function) and informing the relevant context:
[0160] Code snippet (Diff between current and older versions).
[0161] The implementation of natural language requirements description.
[0162] The relevant ARXML interface definition.
[0163] Related test cases and historical defect records.
[0164] The context provides hierarchical structured data, including bound vector data, enabling API calls and semantic similarity retrieval for use with external tools for large models and for manual analysis systems. Based on this structured data, intuitive and easy-to-read rich text reports can also be generated.
[0165] Figure 4 This is a block diagram of an electronic device structure, which is one of the automotive software code change impact analysis methods provided in one or more embodiments of the present invention.
[0166] like Figure 4 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0167] The memory stores a computer program that, when executed by a processor, causes the processor to perform steps of a method for analyzing the impact of changes to automotive software code.
[0168] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the automotive software code change impact analysis method.
[0169] This application also provides a software development platform, including:
[0170] Electronic equipment used to implement the steps of an automotive software code change impact analysis method;
[0171] The processor runs a program, and when the program runs, it executes the steps of the automotive software code change impact analysis method based on the data output from the electronic device.
[0172] Storage medium used to store programs that, when running, execute steps of an automotive software code change impact analysis method on data output from electronic devices.
[0173] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0174] The electronic device comprises a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control the electronic device through processes, such as Linux, Unix, Android, iOS, or Windows. Furthermore, in this embodiment of the invention, the electronic device can be a smartphone, tablet computer, or other handheld device, or a desktop computer, portable computer, or other electronic device; there is no particular limitation in this embodiment.
[0175] In this embodiment of the invention, the executing entity for electronic device control can be an electronic device itself, or a functional module within an electronic device capable of calling and executing a program. The electronic device can obtain the firmware corresponding to the storage medium. This firmware is provided by the supplier, and different storage media may have the same or different firmware; no limitation is made here. After obtaining the firmware corresponding to the storage medium, the electronic device can write this firmware into the storage medium; specifically, it burns the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and will not be elaborated upon in this embodiment of the invention.
[0176] Electronic devices can also obtain reset commands corresponding to storage media. These reset commands are provided by the supplier, and the reset commands for different storage media can be the same or different, which is not limited here.
[0177] At this time, the storage medium of the electronic device is a storage medium on which the corresponding firmware has been written. The electronic device can respond to the reset command corresponding to the storage medium on which the corresponding firmware has been written, thereby resetting the storage medium on which the corresponding firmware has been written according to the reset command. The process of resetting the storage medium according to the reset command can be implemented by existing technology and will not be described in detail in this embodiment of the invention.
[0178] For ease of description, the above devices are described separately by function as various units and modules. Of course, in implementing this application, the functions of each unit and module can be implemented in one or more software and / or hardware.
[0179] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.
[0180] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0181] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for analyzing the impact of automotive software code changes, characterized in that, The method for analyzing the impact of automotive software code changes includes: Step S1: Construct a multi-source unified vector-enhanced knowledge graph data index; This includes performing data extraction and parsing on the codebase, ARXML files, and requirements and defect documents, and establishing corresponding indexes; Among them, a unified graph data model is established based on the extracted entities and relationships, and a semantic vector is generated for each entity node to achieve the fusion of graph and vector; Step S2, Multipath Impact Propagation Analysis; This includes analyzing code differences in version control systems and locating the initial set of changed code nodes; Impact propagation analysis is conducted through four impact paths: syntax / structure dependency, semantic similarity, interface contract, and requirement / defect tracing. The analysis process for the four influence paths is executed by the influence propagation engine, which is called by the analysis path planning engine. Step S3, backtracking and iterative analysis; Once a high-order impact node is discovered through semantic similarity, interface contract, and requirement / defect tracing path based on step S2, the analysis path planning engine initiates backtracking to find other code nodes that implement the high-order impact node and include them in the analysis scope. The influence propagation analysis in step S2 is performed iteratively, starting with the newly discovered node, until no new node is added, thus forming the final influence set. The analysis path planning engine terminates completed impact paths in a timely manner during the analysis process; Step S4: Generate a structured analysis context; This includes outputting a list of analysis results categorized according to the four influencing paths described in step S2; The relevant contextual information is packaged for the key nodes in the final impact set, forming structured data including bound vector data and an intuitively readable report.
2. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: The codebase-related index construction process in step S1, which involves data extraction and parsing, is as follows: Generate Abstract Syntax Trees (ASTs) from C / C++ / Java source code; Extract functions, variables, types, call relationships, containment relationships, entities and relationships, as well as dependencies between multiple repositories.
3. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: The ARXML-related index construction process in step S1, which involves data extraction and parsing, is as follows: Parse the AUTOSAR description file, extract the entities of software components SWC, ports, and interfaces, and their connection relationships, and construct a structured dependency graph.
4. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: The process of building the index related to the requirements and defects documents in the data extraction and parsing stage of step S1 is as follows: Extract the text description, ID, and status information of requirement items and defect reports from requirement management tools and defect tracking systems; Content is segmented by chapter and its relationships are recorded.
5. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: The semantic vector is generated in step S1 as follows: Using a domain-pretrained model, the semantic information of nodes is embedded into a high-dimensional vector space; The semantic information includes function name, code, requirement text, interface name, description of the problem function, and problem repair record.
6. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: In step S1, when fusing the graph and vector, the key requirement nodes corresponding to the AST source code are identified and associated, and the requirement content is embedded into the vector and added to the AST file node.
7. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: The specific propagation mechanisms of the four influence paths in step S2 are as follows: Syntax / Structure Dependency Path: Traditional dependency analysis based on call and inclusion relationships using vector-enhanced knowledge graphs; Semantic similarity path: Calculate the similarity between the vectors of nodes in the initial change code node set and the vectors of other nodes in the graph, and mark the potentially influential nodes whose similarity exceeds the threshold; Interface contract path: The impact is passed from the code through the implementation relationship to the ARXML interface node, and then through the connection relationship to all components that consume the interface; Requirements / Defects Traceability Path: Locate the corresponding requirement node by affecting the code node, trace upwards to the requirement and defect, and assess the impact of the change on functional commitments and issue fixes.
8. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: The relevant context information for packaging the key nodes of the final impact set in step S4 includes: The differences between the current and previous versions of the code snippet, the implementation of the natural language requirements description, the relevant ARXML interface definitions, the associated test cases, and the historical defect records.
9. The method for analyzing the impact of automotive software code changes according to claim 1, characterized in that, include: The structured data generated in step S4 supports API calls and semantic similarity retrieval, and is compatible with external tools for large models and manual analysis system calls.
10. A system for analyzing the impact of automotive software code changes, characterized in that, The automotive software code change impact analysis system includes: The index building module is used to extract and parse data from the code repository, ARXML files, and requirements and defects documents, and to build corresponding indexes. Among them, a unified graph data model is established based on the extracted entities and relationships, and a semantic vector is generated for each entity node to achieve the fusion of graph and vector; The propagation analysis module is used to analyze code differences in version control systems and locate the initial set of changed code nodes. Impact propagation analysis is conducted through four impact paths: syntax / structure dependency, semantic similarity, interface contract, and requirement / defect tracing. The analysis process for the four influence paths is executed by the influence propagation engine, which is called by the analysis path planning engine. The backtracking iteration module is used to initiate backtracking by the analysis path planning engine after a high-order impact node is discovered through semantic similarity, interface contract, and requirement / defect tracing path. This allows the engine to find other code nodes that implement the high-order impact node and include them in the analysis scope. The influence propagation analysis is iteratively performed starting from newly discovered nodes until no new nodes are added, forming the final influence set. The analysis path planning engine terminates completed impact paths in a timely manner during the analysis process; The context generation module is used to output a list of analysis results classified according to the four influence paths; The relevant contextual information is packaged for the key nodes in the final impact set, forming structured data including bound vector data and an intuitively readable report.