All-in-one domain control software model and code consistency test method and related equipment

CN122946302APending Publication Date: 2026-10-20SONKWO COM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611408418.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]现有方法多基于规则匹配或简单对比,只能发现参数类型不匹配、接口名称不一致等显性问题,无法识别边界条件差异、跨模块逻辑协同异常、数据传输时序偏差、依赖链路隐性断裂等深层次问题,而且多合一控制器模块间存在大量直接与间接依赖路径,现有技术缺乏系统化的跨模块依赖建模方法,仅对孤立接口进行点对点校验,导致依赖链路完整性校验存在盲区

Benefits of technology

[0055]本申请实施例的一种多合一域控软件模型与代码一致性测试方法及相关设备,能够提取模型与代码的语义特征、结构特征和逻辑特征,所述代码特征包括语法特征、调用特征和数据交互特征并进行跨模态对齐,为一致性校验提供了覆盖功能与实现双视角的细粒度比对基础;基于功能模块、数据交互和调用关系构建跨模块依赖拓扑图,将各模块间的直接与间接依赖链路显式化,从而弥补了现有孤立接口校验所导致的依赖完整性盲区,通过拓扑图执行逻辑一致性、接口兼容性、数据传输准确性和依赖链路完整性四维校验,使跨模块协同异常、时序偏差及隐性链路断裂等深层次差异得以准确定位与追溯,生成的差异报告将隐蔽的不一致风险转化为可验证的检测结果,保障了多合一控制器在高度集成耦合条件下的软件可靠性与正确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application relates to the field of software testing for automotive electronic control systems, and in particular to a method and related equipment for testing the consistency of multi-module domain controller software models and code. The method includes acquiring multi-module model files and corresponding code files; extracting model features from the multi-module model files and code features from the code files; aligning the model features and code features to obtain an aligned cross-modal feature set; constructing a cross-module dependency topology graph based on the functional modules, data interaction features, and call features in the cross-modal feature set; performing consistency verification on the cross-modal feature set based on the cross-module dependency topology graph to obtain a consistency difference set; and generating a difference report based on the consistency difference set. This method has the advantages of being able to detect deep-seated consistency problems between the model and code, effectively modeling cross-module dependencies, improving testing accuracy, and reducing false alarms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software testing for automotive electronic control systems, and in particular to a method and related equipment for testing the consistency of multi-domain control software models and code. Background Technology

[0002] With the integrated development of electronic and electrical architectures in new energy vehicles, all-in-one domain controllers integrate multiple core functional modules such as vehicle control, motor control, battery management, and thermal management into a single baseboard architecture. Frequent data interactions and highly coupled control logic between these modules lead to a sharp increase in software complexity. Currently, all-in-one controller software generally adopts a "model building—automatic code generation" development model. This involves designing functional models using graphical modeling tools and then automatically converting them into code. While this model improves development efficiency, it also introduces the risk of inconsistency between the model and the code.

[0003] Existing model-code consistency testing techniques have the following main shortcomings:

[0004] Existing methods are mostly based on rule matching or simple comparison, which can only find explicit problems such as parameter type mismatch and inconsistent interface names. They cannot identify deeper problems such as differences in boundary conditions, abnormal cross-module logical coordination, data transmission timing deviations, and implicit breaks in dependency links. Moreover, there are a large number of direct and indirect dependency paths between multi-function controller modules. Existing technologies lack a systematic method for cross-module dependency modeling and only perform point-to-point verification on isolated interfaces, resulting in blind spots in dependency link integrity verification.

[0005] Therefore, there is an urgent need for a consistency detection method for cross-module dependencies to make up for the shortcomings of existing technologies. Summary of the Invention

[0006] This application provides a method and related equipment for testing the consistency between a multi-functional domain controller software model and code. It can detect deep-seated consistency issues between the model and code, effectively model cross-module dependencies, improve testing accuracy, and reduce false alarms.

[0007] On one hand, embodiments of this application provide a method for testing the consistency of an all-in-one domain controller software model and code, including:

[0008] Obtain multi-module model files and corresponding code files, wherein the multi-module model file is a graphical model file containing multiple functional modules generated during the development of the all-in-one domain controller software;

[0009] Extract model features from the multi-module model file and code features from the code file, wherein the model features include semantic features, structural features, and logical features, and the code features include syntax features, call features, and data interaction features;

[0010] Align the model features and the code features to obtain an aligned cross-modal feature set;

[0011] Construct a cross-module dependency topology graph based on the functional modules, data interaction features, and call features in the cross-modal feature set;

[0012] Based on the cross-module dependency topology graph, the cross-modal feature set is subjected to consistency verification to obtain a consistency difference set. The consistency verification includes logical consistency verification, cross-module interface compatibility verification, data transmission accuracy verification, and dependency link integrity verification.

[0013] A difference report is generated based on the consistency difference set.

[0014] Furthermore, the extraction of model features from the multi-module model file and code features from the corresponding code file includes:

[0015] The model features and the code features are extracted using a hybrid network, wherein the hybrid network includes a CNN module, an LSTM module and an SE-Net module cascaded in sequence;

[0016] The CNN module is used to extract the structural features of model logic blocks in multi-module model files and the syntactic features of code statement segments in code files;

[0017] The LSTM module is used to extract semantic features, logical features, and call features and data interaction features of the call chain in the code file from the logical execution flow of the multi-module model file.

[0018] The SE-Net module is used to perform channel attention recalibration on all feature channels of the structural features, syntax features, semantic features, logical features, call features, and data interaction features, in order to enhance feature channels related to consistency verification and suppress non-critical feature channels.

[0019] Furthermore, aligning the model features and the code features includes:

[0020] The model features and code features are aligned across modalities using a dynamic time warping algorithm to obtain the cross-modal feature set.

[0021] Furthermore, the consistency check of the cross-modal feature set based on the cross-module dependency topology graph includes:

[0022] Based on a bidirectional LSTM network, sequence modeling is performed on logical features, calling features, and data interaction features to obtain the first temporal feature sequence on the model side and the second temporal feature sequence on the code side.

[0023] Calculate the similarity between the first time-series feature sequence and the second time-series feature sequence, and perform logical consistency verification based on the similarity.

[0024] The feature vectors of cross-module interface nodes are extracted based on graph neural networks, and the consistency of the feature vectors is compared based on graph matching algorithms to perform cross-module interface compatibility verification. The feature vectors include interface parameters and calling formats.

[0025] Symbolic execution technology is used to construct constraints for the data transmission path. Based on the constraints, the parameter transmission path is traversed and the consistency of data type, boundary value and timing characteristics is verified to check the accuracy of data transmission.

[0026] An association matrix is ​​constructed based on the dependencies between modules. The integrity and rationality of the dependency links are verified based on the association matrix, and implicit dependency breakage issues are identified.

[0027] Furthermore, before generating the difference report based on the consistency difference set, the method further includes:

[0028] The consistency difference set is filtered based on the trained false alarm feature learning model to remove invalid and false differences.

[0029] The false alarm feature learning model is trained using a Bayesian optimization algorithm, based on historical verification data, protocol constraints, and dependencies in a cross-module dependency topology graph.

[0030] Furthermore, generating a difference report based on the consistency difference set includes:

[0031] Obtain the consistency difference set and the cross-module dependency topology graph;

[0032] Each difference item in the consistency difference set is used as a failure node;

[0033] The failed nodes are marked in the cross-module dependency topology graph to generate a failure-marked dependency topology graph.

[0034] For the failure marker-dependent topology graph, the propagation probability and influence radius of each failure node are calculated based on the random walk algorithm to obtain the differential influence propagation map;

[0035] Based on the propagation probability and influence radius in the difference impact propagation map, the difference items in the consistency difference set are weighted and sorted to obtain the difference repair priority queue.

[0036] The difference repair priority queue and the corresponding features in the cross-modal feature set are associated to obtain the model element position of each difference item in the multi-module model file and the code line interval in the code file;

[0037] A difference location table is generated based on the model element positions and the code line intervals;

[0038] A structured difference report is generated based on the difference impact propagation map, the difference repair priority queue, and the difference location table. The report includes a difference list arranged by priority, the impact wave and range of each difference, a bidirectional traceability link from model elements to lines of code, and a minimized repair verification path determined based on the difference impact propagation map.

[0039] Furthermore, it also includes:

[0040] Real-time acquisition of updates to multi-module model files and corresponding code files;

[0041] The scope of the iteration's impact is determined based on the updated content;

[0042] A minimum regression test set is generated based on the aforementioned iterative influence range;

[0043] The test cases in the minimum regression test set are optimized using a genetic algorithm to obtain optimized test cases;

[0044] Regression tests are automatically triggered based on the optimized test case set to verify the consistency between the updated content and other content with dependencies.

[0045] On the other hand, embodiments of this application provide a multi-functional domain controller software model and code consistency testing device, the device comprising:

[0046] The acquisition module is used to acquire multi-module model files and corresponding code files, wherein the multi-module model file is a graphical model file containing multiple functional modules generated during the development of the all-in-one domain controller software;

[0047] An extraction module is used to extract model features from the multi-module model file and code features from the code file, wherein the model features include semantic features, structural features, and logical features, and the code features include syntax features, call features, and data interaction features;

[0048] An alignment module is used to align the model features and the code features to obtain an aligned cross-modal feature set;

[0049] The construction module is used to construct a cross-module dependency topology graph based on the functional modules, data interaction features, and call features in the cross-modal feature set;

[0050] The verification module is used to perform consistency verification on the cross-modal feature set based on the cross-module dependency topology graph to obtain a consistency difference set. The consistency verification includes logical consistency verification, cross-module interface compatibility verification, data transmission accuracy verification, and dependency link integrity verification.

[0051] A generation module is used to generate a difference report based on the consistency difference set.

[0052] In another aspect, embodiments of this application provide an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0053] When the processor executes the computer program instructions, it implements a method for testing the consistency of an all-in-one domain controller software model and code as described in any one of the first aspects.

[0054] In another aspect, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement a method for testing the consistency of an all-in-one domain controller software model and code as described in any one of the first aspects.

[0055] This application discloses a method and related equipment for testing the consistency of a multi-functional domain controller software model and code. This method extracts semantic, structural, and logical features from the model and code. The code features include syntax features, call features, and data interaction features, which are then aligned across modalities. This provides a fine-grained comparison basis covering both functional and implementation perspectives for consistency verification. A cross-module dependency topology graph is constructed based on functional modules, data interactions, and call relationships, making the direct and indirect dependency links between modules explicit. This compensates for the dependency integrity blind spots caused by existing isolated interface verification. The topology graph performs four-dimensional verification of logical consistency, interface compatibility, data transmission accuracy, and dependency link integrity. This allows for accurate location and tracing of deep-seated differences such as cross-module collaboration anomalies, timing deviations, and hidden link breaks. The generated difference report transforms hidden inconsistency risks into verifiable detection results, ensuring the software reliability and correctness of the multi-functional controller under highly integrated and coupled conditions. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating a method for testing the consistency of a multi-functional domain controller software model and code in an embodiment of this application;

[0057] Figure 2 This is a structural block diagram illustrating a multi-functional domain controller software model and code consistency testing device in the embodiments of this application;

[0058] Figure 3This is a structural block diagram illustrating an electronic device in the embodiments of this application. Detailed Implementation

[0059] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0060] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0061] With the integrated development of the electronic and electrical architecture of new energy vehicles, multi-functional domain controllers integrate multiple core functional modules such as vehicle control, motor control, battery management, and thermal management onto a single baseboard architecture. Frequent data interaction and highly coupled control logic between modules lead to a sharp increase in software complexity. Currently, multi-functional controller software generally adopts a model-automatic code generation development model. While this model improves development efficiency, it also introduces consistency risks between the model and the code. Traditional model-code consistency testing techniques are mostly based on rule matching or simple comparison, which can only detect explicit problems such as parameter type mismatches and inconsistent interface names. They cannot identify deeper problems such as differences in boundary conditions, abnormal cross-module logic coordination, data transmission timing deviations, and implicit breaks in dependency links. Furthermore, there are numerous direct and indirect dependency paths between modules in multi-functional controllers. Existing technologies lack systematic cross-module dependency modeling methods, only performing point-to-point verification on isolated interfaces, resulting in blind spots in dependency link integrity verification.

[0062] To address the problems in the prior art, embodiments of this application provide a method and related equipment for testing the consistency of a multi-functional domain controller software model and code. The following section first introduces the method for testing the consistency of a multi-functional domain controller software model and code provided in this application.

[0063] Figure 1 This illustration shows a flowchart of a method for testing the consistency of a multi-functional domain controller software model and code, according to an embodiment of this application. Figure 1 As shown in the embodiments of this application, a method for testing the consistency of an all-in-one domain controller software model and code includes the following steps:

[0064] S101. Obtain the multi-module model file and the corresponding code file.

[0065] The multi-module model file is a graphical model file containing multiple functional modules generated during the development of the all-in-one domain control software. For example, the functional modules include a motor control module, a battery management module, a thermal management module, and a vehicle control module. The graphical model file includes the interrelationships between the functional modules. In this embodiment, the multi-module model file and the corresponding code file can be obtained in various ways. For example, the user can manually specify the storage path of the multi-module model file and the code file, and load the multi-module model file and the corresponding code file according to the specified storage path. Alternatively, a preset file directory can be scanned periodically to identify and load files that conform to specific naming rules or file types. In addition, the latest submitted multi-module model file and the corresponding code file can be obtained through the interface of the version control system.

[0066] S102. Extract model features from multi-module model files and code features from code files. Model features include semantic features, structural features, and logical features, while code features include syntax features, call features, and data interaction features.

[0067] Specifically, a hybrid network is used to extract model features and code features. The hybrid network includes a cascaded CNN module, an LSTM module, and an SE-Net module. The CNN module is used to extract the structural features of model logic blocks in the multi-module model file and the syntactic features of code statement segments in the code file. The LSTM module is used to extract the semantic features and logical features of the logic execution flow in the multi-module model file, and the call features and data interaction features of the call chain in the code file. The SE-Net module is used to perform channel attention recalibration on all feature channels of structural features, syntactic features, semantic features, logical features, call features, and data interaction features to enhance feature channels related to consistency verification and suppress non-critical feature channels.

[0068] Hybrid networks are deep learning models that combine multiple neural network architectures. In this embodiment, the hybrid network uses cascaded CNN, LSTM, and SE-Net modules. The CNN module can be a one-dimensional convolutional neural network that slides convolutional kernels of different sizes across the representation sequences of model logic blocks in multi-module model files or the text sequences of code statement segments in code files to capture local patterns and structural information. For example, for model logic blocks, it can identify connection patterns or component layouts; for code statement segments, it can identify syntactic structures such as keywords and operator combinations. In addition, multiple layers of convolutional layers can be stacked and combined with pooling layers to gradually extract more abstract and stable structural and syntactic features. For example, through multiple convolutions, structural features of different granularities, such as the boundaries of statement blocks and function call patterns, can be learned from the original model graph structure or code text.

[0069] In this embodiment, the LSTM module can employ a bidirectional long short-term memory network. For example, for the model execution flow of multi-module model files, it can understand the transition logic of the state machine or the transmission order of the data flow; for code call chains, it can identify the context of function calls and the path of parameter passing; the LSTM module can also employ multi-layer LSTM stacking, for example, from the semantics of a single operation to the logical behavior of the entire functional module and from a single function call to the data interaction mode across modules.

[0070] In this embodiment, the SE-Net module compresses the global spatial information of each feature channel into a channel descriptor through a Squeeze operation, such as global average pooling. Through an Excitation operation, such as two fully connected layers and a Sigmoid activation function, it learns the weights of each channel and multiplies these weights back onto the original feature channels to achieve adaptive channel recalibration. In addition, more complex attention mechanisms can be added to the Excitation operation, such as using the self-attention mechanism in Transformer to calculate channel weights, or combining a gating mechanism to control the activation level of channels, thereby enhancing key features and suppressing noise.

[0071] In this embodiment, the CNN module performs preliminary extraction of the structural features of the model's logic blocks and the syntactic features of the code statement segments to capture local patterns. The LSTM module utilizes its ability to model long-distance dependencies in sequential data to mine the semantic and logical features of the model's logic execution flow, as well as the call features and data interaction features of the code call chain, thereby capturing the semantic associations and temporal dependencies between the model and the code. The SE-Net module enhances the feature channels related to consistency verification through the channel attention recalibration mechanism, while suppressing non-critical feature channels that may introduce noise or interference, thus improving the quality of feature extraction to a certain extent and avoiding the problems of insufficient semantic association capture and noise interference caused by simple feature extraction methods.

[0072] S103. Align the model features and code features to obtain the aligned cross-modal feature set.

[0073] Specifically, the model features and code features are aligned across modalities using the dynamic time warping algorithm to obtain a cross-modal feature set.

[0074] Dynamic time warping (RTW) is an algorithm used to measure the similarity between two time series. In this embodiment, RTD can be implemented in various ways. For example, a global constraint-based RTD can be used, which introduces global constraints such as Sakoe-Chiba bands or Itakura bands to limit the search range of the warped path, thereby improving computational efficiency and avoiding unreasonable alignment results. A weighted RTD can also be used, which weights the distance metric based on the importance of model features or code features or contextual information when calculating the warped path. For example, key logic nodes in the model or core function calls in the code are given higher weights, making them more important in the alignment process, thereby improving the accuracy of alignment. In addition, a multidimensional RTD can be used, which considers the similarity of all dimensions for alignment when model features and code features are multidimensional vectors, integrating multiple dimensions of information such as semantic features, structural features, logical features, syntactic features, call features, and data interaction features.

[0075] In other alternative implementations, the Z-score normalization algorithm can be used to eliminate the dimensional differences between code features and model features. The normalized code features and model features are then aligned across modalities to obtain a cross-modal feature set. The cross-modal feature set contains several feature triples, each of which consists of a model-side feature vector, a code-side feature vector, and their alignment confidence.

[0076] In this embodiment, a dynamic time warping algorithm is used to perform non-linear mapping between model features and code features to find the optimal alignment path, ensuring that logical nodes in the model and corresponding statement segments in the code match on the time axis or logical axis.

[0077] S104. Construct a cross-module dependency topology graph based on the functional modules, data interaction features, and call features in the cross-modal feature set.

[0078] In this embodiment, a directed graph is generated manually or through a simple script based on the module names identified in the cross-modal feature set and the data flow and function call relationships between them. For example, if the data output of module A is connected to the data input of module B, or if module A calls a function of module B, a dependency edge is established from A to B in the topology graph to obtain a cross-module dependency topology graph.

[0079] S105. Based on the cross-module dependency topology graph, perform consistency verification on the cross-modal feature set to obtain a consistency difference set. The consistency verification includes logical consistency verification, cross-module interface compatibility verification, data transmission accuracy verification, and dependency link integrity verification.

[0080] Specifically, a bidirectional LSTM network is used to perform sequence modeling of logical features, call features, and data interaction features, resulting in a first temporal feature sequence on the model side and a second temporal feature sequence on the code side. The similarity between the first and second temporal feature sequences is calculated, and logical consistency is verified based on the similarity. Feature vectors of cross-module interface nodes are extracted using a graph neural network, and the consistency of feature vectors is compared using a graph matching algorithm to verify cross-module interface compatibility. The feature vectors include interface parameters and call formats. Symbolic execution technology is used to construct constraints for data transmission paths. Based on these constraints, the parameter transmission paths are traversed, and the consistency of data types, boundary values, and temporal characteristics is verified to check the accuracy of data transmission. An association matrix is ​​constructed based on inter-module dependencies. The integrity and rationality of dependency links are verified based on the association matrix, and implicit dependency breakage issues are identified.

[0081] Among them, the bidirectional LSTM network is a neural network that can process sequential data. Sequence modeling is the process of converting discrete or continuous data point sequences into structured representations to capture time dependencies and patterns. For example, the logical execution steps in the model, the function call chain in the code, and the data interaction events are encoded as input sequences and processed by the bidirectional LSTM network to obtain a sequence representation that reflects its dynamic behavior. This sequence representation can be a fixed-length vector that summarizes the features of the entire sequence, or it can be a variable-length sequence that retains detailed information at each time step, thus obtaining the first temporal feature sequence on the model side and the second temporal feature sequence on the code side.

[0082] In this embodiment, the similarity between the first temporal feature sequence and the second temporal feature sequence can be calculated using cosine similarity, the reciprocal of Euclidean distance, or dynamic time warping algorithms. The logical consistency check is a process of verifying whether the logical execution flow and behavior defined in the model are reproduced in the code. When the similarity is lower than a preset threshold, it is determined that there is a logical inconsistency, and the specific time point or event in the sequence that caused the difference is located. The preset threshold is set as needed and is not specifically limited.

[0083] Graph neural networks (GNNs) are a type of neural network specifically designed for processing graph-structured data. They learn representations of nodes and edges by aggregating information from neighboring nodes. Cross-module interface nodes are points of interaction or communication between different functional modules, such as function calls, data access points, or message queues. Each interface node is represented as a node in a graph, and its feature vector includes information such as interface parameters and call format. For example, GNNs learn features such as interface name, parameter type, parameter order, and return value type, and encode them into high-dimensional feature vectors. Graph matching algorithms are used to find the correspondence between nodes and / or edges between two or more graphs, aiming to maximize similarity. Through graph matching algorithms, the structural and attribute consistency of interface nodes in the model and code is compared, thereby performing cross-module interface compatibility verification and ensuring the compatibility of communication between modules. For example, algorithms such as maximum common subgraph detection or graph edit distance calculation can be used to compare the interface graphs of the model and code to identify the consistency of corresponding nodes and their attributes.

[0084] Symbolic execution is a program analysis method that uses symbolic input instead of concrete input to execute programs. It represents program variables as symbolic expressions and explores all possible execution paths. The constraints of data transmission paths are the logical conditions or rules that data must meet when flowing through different parts of the system. In this embodiment, the constraints include type, range, and timing requirements. For example, constraints can be automatically derived from variable declarations, type definitions, range specifications, and timing annotations. Traversing parameter passing paths involves exploring all operations and assignment sequences that affect parameter values ​​and states. Through symbolic execution, all possible paths of data from source to destination are traced, and the data type, boundary values, and timing characteristics are verified to meet the preset constraints, thereby verifying the accuracy of data transmission and detecting errors that may occur during data transmission.

[0085] In this context, inter-module dependency refers to the relationship where the functionality, data, or service of one module depends on another module. An association matrix is ​​a square matrix used to represent a finite graph, where the elements of the matrix indicate whether there are edges between nodes, i.e., dependencies. For example, a matrix can be constructed where rows and columns represent modules, and non-zero entries represent dependencies from one module to another. By comparing the dependency matrices derived from the model and code, the integrity and rationality of dependency chains can be verified, and implicit dependency breaks can be identified, i.e., there are breaks in the dependencies between modules that are not explicitly declared but actually exist.

[0086] The Analytic Hierarchy Process (AHP) is used to optimize the weight allocation of logical consistency verification, cross-module interface compatibility verification, data transmission accuracy verification, and dependency link integrity verification. AHP is a structured decision analysis technique that decomposes decisions into hierarchical structures and determines the weight of each standard by pairwise comparisons. For example, based on expert experience or preset strategies, the importance of each verification is compared pairwise to construct a comparison matrix and calculate the weight of each verification.

[0087] In this embodiment, a bidirectional LSTM network is used to perform sequence modeling of logical features, call features, and data interaction features, capturing the temporal dependencies between the model and code in the execution flow. By calculating the similarity between the first and second temporal feature sequences, the problem of static comparison failing to identify dynamic logical execution deviations is solved. Feature vectors of interface nodes are extracted through graph neural networks and combined with graph matching algorithms to transform complex cross-module interface interactions into structured feature comparisons, thereby identifying inconsistencies between interface parameters and call formats and ensuring the compatibility of inter-module communication. Symbolic execution technology is used to construct constraints for data transmission paths. By traversing the parameter transmission path, the type, boundaries, and characteristics of data during transmission are verified, making up for the blind spots of traditional testing methods in data flow verification. Based on the inter-module dependencies, an association matrix is ​​constructed, which can sort out and verify the integrity of dependency links, thereby identifying implicit dependency breakage problems and preventing systemic failures caused by inter-module coupling.

[0088] S106. Generate a difference report based on the consistency difference set.

[0089] Before generating a difference report based on the consistency difference set, the process also includes: filtering the consistency difference set based on a trained false alarm feature learning model to remove invalid and false differences; wherein, the false alarm feature learning model adopts a Bayesian optimization algorithm and is trained with historical verification data, protocol constraints and dependencies in the cross-module dependency topology graph.

[0090] In this embodiment, the false alarm feature learning model is a machine learning model. This model learns patterns from historical data to distinguish which differences are genuine defects and which are false alarms caused by limitations of testing tools, differences in model expression, or code implementation details. For example, the false alarm feature learning model can be a supervised learning-based classification model, such as a support vector machine, random forest, or gradient boosting tree, trained using manually labeled historical difference data. Alternatively, a deep learning model, such as a convolutional neural network or recurrent neural network, can be used. For instance, the false alarm feature learning model can output a confidence score, indicating the probability that a difference is a false alarm, and remove high-confidence false alarms based on a preset threshold. The preset threshold can be set as needed and is not specifically limited. Alternatively, the false alarm feature learning model can directly classify differences into genuine defects, invalid differences, or false differences, and only report genuine defects.

[0091] Bayesian optimization is a global optimization algorithm. For example, a Gaussian process can be used as a surrogate model to fit the posterior distribution of the objective function. The next evaluation point can be selected using the acquisition function, such as the expected improvement EI or the confidence upper limit UCB, thereby efficiently finding the optimal combination of hyperparameters. In addition to Gaussian processes, random forests, tree-based Parzen estimators (TPEs) can also be used as surrogate models. The optimization objective can be the model's F1 score, accuracy, recall, and other performance metrics.

[0092] Historical verification data comprises all verification results generated during past model-code consistency testing. This data includes original discrepancies, manual classifications of these discrepancies (real defects, false positives, etc.), and related contextual information. Historical verification data can be stored in a database. It includes multi-module model files, code files, consistency discrepancy sets, and manually annotated discrepancy processing results for each test. Protocol constraints are explicit rules in the system design, such as interface specifications, data formats, communication protocols, and timing requirements. These constraints define the legal boundaries of system behavior. For example, protocol constraints can be described in formal languages ​​such as UML state diagrams, timing diagrams, and OCL constraint specifications. Dependencies in the cross-module dependency topology diagram represent the interdependencies between different functional modules in the entire all-in-one domain controller software system, including calls, data flows, and control flows. These relationships constitute the system's architectural skeleton and can be extracted using static code analysis and model analysis tools, and stored in a graph database.

[0093] The process of generating a difference report based on a consistency difference set includes: obtaining a consistency difference set and a cross-module dependency topology graph; using each difference item in the consistency difference set as a failure node; marking the failure nodes in the cross-module dependency topology graph to generate a failure-marked dependency topology graph; for the failure-marked dependency topology graph, calculating the propagation probability and influence radius of each failure node based on a random walk algorithm to obtain a difference influence propagation map; weighting and sorting the difference items in the consistency difference set based on the propagation probability and influence radius in the difference influence propagation map to obtain a difference repair priority queue; associating the difference repair priority queue with the corresponding features in the cross-modal feature set to obtain the model element position of each difference item in the multi-module model file and the code line interval in the code file; generating a difference location table based on the model element position and code line interval; and generating a structured difference report based on the difference influence propagation map, the difference repair priority queue, and the difference location table. The report includes a difference list arranged by priority, the influence wave and range of each difference, a bidirectional traceability link from the model element to the code line, and a minimized repair verification path determined based on the difference influence propagation map.

[0094] The consistency difference set is the collection of all inconsistencies found during the model-code consistency verification process. The cross-module dependency topology graph represents the graphical structure of the dependencies between various functional modules and components within a module in an all-in-one domain controller. In this embodiment, the unique identifier of each difference item can be associated with a specific module, interface, or data flow in the topology graph, or a virtual node can be created for each difference item and connected to the affected actual node in the topology graph.

[0095] In this embodiment, on the cross-module dependency topology graph, the differences identified as failure nodes are highlighted or associated visually or in other forms to intuitively show the distribution of differences. The marking method can be achieved by changing the color or shape of the failure node or adding specific attributes, or by generating a new copy of the topology graph containing additional information about the failure node.

[0096] The random walk algorithm is an algorithm that simulates random path traversal on a graph structure to evaluate the importance or influence of a node in the graph. Its role is to quantify the probability and range of the spread of differences in complex dependent networks. The propagation probability represents the likelihood that a failed node will affect other nodes or the entire system, measuring the potential harm of the difference. In this embodiment, it can be calculated based on the frequency of node visits or the reciprocal of the path length in the random walk algorithm, or by weighting the calculation based on the strength and type of the dependency. The influence radius represents the range or distance of other nodes that a failed node can influence, defining the boundary of the difference's influence. It can be defined as the set of all nodes that can be reached within a certain number of steps from the failed node during the random walk, or determined based on the shortest path or reachability analysis in graph theory. The difference influence propagation graph is a visualization or data structure that shows the propagation probability and influence radius of each difference item, as well as their potential influence paths in the system. The difference influence propagation graph can be a topology map with color coding or varying size to visually display the propagation probability and influence radius, or it can be a data table containing difference items, propagation probabilities, influence radii, and a list of affected nodes.

[0097] The weighted ranking prioritizes differences based on their propagation probability and influence radius, ensuring developers address the most impactful and critical differences first. In this embodiment, a linear weighted model can be used, multiplying the propagation probability and influence radius by preset weights and summing the results to obtain a comprehensive score for ranking. The preset weights are set as needed and are not specifically limited. Alternatively, a multi-criteria decision analysis method, such as the Analytic Hierarchy Process (AHP) or TOPSIS, can be used to comprehensively consider multiple influencing factors for ranking. The difference repair priority queue is a list of differences arranged from highest to lowest urgency or importance.

[0098] In this embodiment, the purpose of association is to establish a mapping relationship between the difference item and its specific location in the original model and code, thereby locating the difference. In this embodiment, the model element ID and code line number corresponding to the difference item can be recorded when generating the consistency difference set, or during association, a pre-established model-code mapping table or a feature matching algorithm can be used to match the difference item with the location information in the cross-modal feature set. The model element location is the specific location of the difference item in the multi-module model file, such as the name of the model block, port number, parameter path, etc., which is used to guide developers to locate and modify at the model level. It can be an XPath path in the model file or a unique identifier of the model element. The code line interval is the start line number and end line number corresponding to the difference item in the code file, which is used to guide developers to locate and modify at the code level. It can be in the format of file path: start line number-end line number, or a structure containing file path, start line, and end line. The difference location table is a table or data structure that records the specific location of each difference item in the model and code, providing bidirectional traceability of differences and facilitating developers to quickly switch locations between the model and code.

[0099] In this embodiment, the difference report can be an HTML, PDF, or XML document. The difference list arranged by priority is a list of difference items presented in the report according to the order of repair priority, guiding developers to focus on the most important differences first. The impact wave and range of each difference are descriptions of the propagation probability and impact radius of each difference item in the report, helping developers understand the potential harm and impact boundary of the difference. The bidirectional traceability link from model elements to code lines is a clickable or queryable link provided in the report, allowing developers to jump directly from the difference report to the corresponding element in the model or the corresponding line in the code, realizing rapid location of differences and context switching. The minimized repair verification path is a set of test paths or test cases recommended for each difference item based on the difference impact propagation map, which can verify the repair effect and has the smallest scope, guiding developers to conduct efficient regression testing and avoid unnecessary comprehensive testing. The minimized repair verification path is determined by: starting from the failure node, performing reverse topological sorting along the dependency edges within the impact radius, and selecting the shortest path set covering all affected nodes.

[0100] This embodiment also includes the following:

[0101] Specifically, the system acquires the updated content of multi-module model files and corresponding code files in real time; determines the scope of iterative impact based on the updated content; generates a minimum regression test set based on the scope of iterative impact; optimizes the test cases in the minimum regression test set using a genetic algorithm to obtain optimized test cases; and automatically triggers regression tests based on the optimized test case set to verify the consistency between the updated content and other content with dependencies.

[0102] In this embodiment, changes to model files and code files are captured in real time by file system monitoring and version control hooks. By comparing the old and new versions of the model and code, the specific module parameters, function interfaces, or variable types that have been modified are identified.

[0103] In this embodiment, a cross-module dependency topology graph is used to start from a specific module or code point involved in the update and traverse the graph along the dependency relationships represented in the topology graph, such as function call relationships, data flow relationships, and interface dependency relationships, thereby identifying all modules, interfaces, and functional points that are directly or indirectly affected by this update. In addition, static code analysis tools can be used to perform in-depth analysis of the updated code, identify its call chain and data flow, and map them to the functional modules in the model, thereby determining the affected model elements and code regions.

[0104] In this embodiment, the existing test case library is matched with the determined scope of influence of the iteration, and test cases that can cover the modules, interfaces or functional points within the scope of influence are selected. Furthermore, the traceability relationship between test cases and code or model elements can be used to trace back to all relevant test cases based on the determined scope of influence.

[0105] Among them, the genetic algorithm, as a global optimization algorithm, can be used to optimize the execution order of test cases. For example, it can prioritize the execution of test cases that are easier to find defects or cover the critical path. It can also be used to optimize the parameter combination of test cases to generate more representative test data or test data that are more likely to trigger boundary conditions. It can also be used to select a subset of test cases to minimize the number of test cases while ensuring a certain coverage, thereby shortening the test time.

[0106] In this embodiment, the optimized test case set is integrated into the automated testing platform, and tests are automatically executed after code submission or model update.

[0107] In this embodiment, real-time acquisition of updated content ensures that the testing process always keeps pace with the development progress, avoiding lag. Based on the updated content, the scope of iterative impact is determined. Using the previously constructed cross-module dependency topology graph, the affected modules and interfaces are identified by analyzing the propagation path of change points in the topology, thereby narrowing the testing scope from the entire system to a locally related area. A minimum regression test set is generated based on the iterative impact scope. By eliminating test cases unrelated to the current change, the test scale is minimized, ensuring that the testing process focuses on potential risks caused by the change. A genetic algorithm is used to optimize the test cases in the minimum regression test set. Utilizing the global optimization capability of the genetic algorithm, the execution order, coverage path, and weight of the test cases are dynamically adjusted, which improves the execution efficiency and defect detection rate of the test cases to a certain extent. Regression tests are automatically triggered based on the optimized test case set, realizing closed-loop automation from change identification to verification execution, ensuring the consistency between the updated content and other dependent modules in the system.

[0108] Based on the multi-domain controller software model and code consistency testing method provided in the above embodiments, this application also provides a specific implementation of a multi-domain controller software model and code consistency testing device. Please refer to the following embodiments.

[0109] First see Figure 2 The multi-functional domain controller software model and code consistency testing device 200 provided in this application embodiment includes the following:

[0110] The acquisition module 201 is used to acquire a multi-module model file and the corresponding code file, wherein the multi-module model file is a graphical model file containing multiple functional modules generated during the development of the all-in-one domain controller software;

[0111] Extraction module 202 is used to extract model features from multi-module model files and code features from code files. The model features include semantic features, structural features, and logical features, while the code features include syntax features, call features, and data interaction features.

[0112] Alignment module 203 is used to align model features and code features to obtain an aligned cross-modal feature set;

[0113] Module 204 is used to construct a cross-module dependency topology graph based on functional modules, data interaction features, and call features in the cross-modal feature set.

[0114] The verification module 205 is used to perform consistency verification on the cross-modal feature set based on the cross-module dependency topology graph to obtain a consistency difference set. The consistency verification includes logical consistency verification, cross-module interface compatibility verification, data transmission accuracy verification, and dependency link integrity verification.

[0115] Generation module 206 is used to generate a difference report based on the consistency difference set.

[0116] As an optional implementation in this embodiment, the extraction module 202 is specifically used for:

[0117] A hybrid network is used to extract model features and code features. The hybrid network includes a cascaded CNN module, an LSTM module, and an SE-Net module. The CNN module is used to extract the structural features of the model logic blocks in the multi-module model file and the syntactic features of the code statement segments in the code file. The LSTM module is used to extract the semantic features and logical features of the logic execution flow in the multi-module model file, and the call features and data interaction features of the call chain in the code file. The SE-Net module is used to perform channel attention recalibration on all feature channels of structural features, syntactic features, semantic features, logical features, call features, and data interaction features to enhance feature channels related to consistency verification and suppress non-critical feature channels.

[0118] As an optional implementation in this embodiment, the alignment module 203 is specifically used for:

[0119] The model features and code features are aligned across modalities using the dynamic time warping algorithm to obtain a cross-modal feature set.

[0120] As an optional implementation in this embodiment, the verification module 205 is specifically used for:

[0121] Sequence modeling of logical features, call features, and data interaction features is performed using a bidirectional LSTM network to obtain a first temporal feature sequence on the model side and a second temporal feature sequence on the code side. The similarity between the first and second temporal feature sequences is calculated, and logical consistency is verified based on this similarity. Feature vectors of cross-module interface nodes are extracted using a graph neural network, and the consistency of these feature vectors is compared using a graph matching algorithm to verify cross-module interface compatibility. The feature vectors include interface parameters and call formats. Symbolic execution technology is used to construct constraints for data transmission paths. Based on these constraints, the parameter transmission paths are traversed, and the consistency of data types, boundary values, and temporal characteristics is verified to check data transmission accuracy. An association matrix is ​​constructed based on inter-module dependencies. The integrity and rationality of dependency links are verified based on the association matrix, and implicit dependency breakage issues are identified.

[0122] As an optional implementation in this embodiment, the all-in-one domain controller software model and code consistency testing device 200 further includes:

[0123] The elimination module is used to filter the consistency difference set based on the consistency difference set before generating the difference report, and to eliminate invalid and false differences based on the trained false alarm feature learning model. The false alarm feature learning model adopts the Bayesian optimization algorithm and is trained with historical verification data, protocol constraints and dependencies in the cross-module dependency topology graph.

[0124] As an optional implementation in this embodiment, the generation module 206 is specifically used for:

[0125] Obtain a consistency difference set and a cross-module dependency topology graph; use each difference item in the consistency difference set as a failure node; mark the failure nodes in the cross-module dependency topology graph to generate a failure-marked dependency topology graph; for the failure-marked dependency topology graph, calculate the propagation probability and influence radius of each failure node based on a random walk algorithm to obtain a difference influence propagation map; weight and sort the difference items in the consistency difference set based on the propagation probability and influence radius in the difference influence propagation map to obtain a difference repair priority queue; associate the difference repair priority queue with the corresponding features in the cross-modal feature set to obtain the model element position of each difference item in the multi-module model file and the code line interval in the code file; generate a difference location table based on the model element position and code line interval; generate a structured difference report based on the difference influence propagation map, the difference repair priority queue, and the difference location table, wherein the report includes a difference list arranged by priority, the influence wave and range of each difference, a bidirectional traceability link from the model element to the code line, and a minimum repair verification path determined based on the difference influence propagation map.

[0126] As an optional implementation in this embodiment, the all-in-one domain controller software model and code consistency testing device 200 further includes:

[0127] The update content acquisition module is used to acquire the update content of multiple module model files and corresponding code files in real time.

[0128] The scope determination module is used to determine the scope of the iteration's impact based on the updated content;

[0129] The test set generation module is used to generate a minimum regression test set based on the iterative influence range.

[0130] The optimization module is used to optimize the test cases in the minimum regression test set using a genetic algorithm to obtain optimized test cases.

[0131] The verification module is used to automatically trigger regression tests based on the optimized test case set to verify the consistency between the updated content and other content with dependencies.

[0132] Figure 3A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.

[0133] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.

[0134] Specifically, the processor 301 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0135] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 302 may include removable or non-removable (or fixed) media, or memory 302 may be non-volatile solid-state memory. Memory 302 may be internal or external to the integrated gateway disaster recovery device.

[0136] In one instance, memory 302 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0137] Memory 302 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the multi-domain controller software model and code conformance testing method according to the first aspect of this disclosure.

[0138] The processor 301 reads and executes computer program instructions stored in the memory 302 to achieve... Figure 1 The embodiment shown illustrates a method for testing the consistency between an all-in-one domain controller software model and its code.

[0139] In one example, the electronic device may also include a communication interface 303 and a bus 304. For example, Figure 3 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 304 and complete communication with each other.

[0140] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0141] Bus 304 includes hardware, software, or both, that couples components of an electronic device together. For example, and not as a limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 304 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0142] This electronic device can execute the multi-in-one domain controller software model and code consistency testing method described in this application, thereby achieving a combination of Figures 1-2 The method and apparatus described are for testing the consistency of an all-in-one domain controller software model and its code.

[0143] Furthermore, in conjunction with the multi-in-one domain controller software model and code consistency testing methods described in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the multi-in-one domain controller software model and code consistency testing methods described in the above embodiments.

[0144] In an optional embodiment, in conjunction with the all-in-one domain controller software model and code consistency testing method in the above embodiments, this application embodiment can provide a computer program product to implement the method. The instructions in the computer program product are executed by the processor of an electronic device, enabling the electronic device to implement any of the all-in-one domain controller software model and code consistency testing methods in the above embodiments.

[0145] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0146] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0147] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0148] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0149] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for testing the consistency between an all-in-one domain controller software model and its code, characterized in that, include: Obtain multi-module model files and corresponding code files, wherein the multi-module model file is a graphical model file containing multiple functional modules generated during the development of the all-in-one domain controller software; Extract model features from the multi-module model file and code features from the code file, wherein the model features include semantic features, structural features, and logical features, and the code features include syntax features, call features, and data interaction features; Align the model features and the code features to obtain an aligned cross-modal feature set; Construct a cross-module dependency topology graph based on the functional modules, data interaction features, and call features in the cross-modal feature set; Based on the cross-module dependency topology graph, the cross-modal feature set is subjected to consistency verification to obtain a consistency difference set. The consistency verification includes logical consistency verification, cross-module interface compatibility verification, data transmission accuracy verification, and dependency link integrity verification. A difference report is generated based on the consistency difference set.

2. The method for testing the consistency between a multi-functional domain controller software model and its code according to claim 1, characterized in that, The extraction of model features from the multi-module model files and code features from the corresponding code files includes: The model features and the code features are extracted using a hybrid network, wherein the hybrid network includes a CNN module, an LSTM module and an SE-Net module cascaded in sequence; The CNN module is used to extract the structural features of model logic blocks in multi-module model files and the syntactic features of code statement segments in code files; The LSTM module is used to extract semantic features, logical features, and call features and data interaction features of the call chain in the code file from the logical execution flow of the multi-module model file. The SE-Net module is used to perform channel attention recalibration on all feature channels of the structural features, syntax features, semantic features, logical features, call features, and data interaction features, in order to enhance feature channels related to consistency verification and suppress non-critical feature channels.

3. The method for testing the consistency between a multi-domain controller software model and its code according to claim 1, characterized in that, The alignment of the model features and the code features includes: The model features and code features are aligned across modalities using a dynamic time warping algorithm to obtain the cross-modal feature set.

4. The method for testing the consistency between a multi-domain controller software model and its code according to claim 1, characterized in that, The consistency check of the cross-modal feature set based on the cross-module dependency topology graph includes: Based on a bidirectional LSTM network, sequence modeling is performed on logical features, calling features, and data interaction features to obtain the first temporal feature sequence on the model side and the second temporal feature sequence on the code side. Calculate the similarity between the first time-series feature sequence and the second time-series feature sequence, and perform logical consistency verification based on the similarity. The feature vectors of cross-module interface nodes are extracted based on graph neural networks, and the consistency of the feature vectors is compared based on graph matching algorithms to perform cross-module interface compatibility verification. The feature vectors include interface parameters and calling formats. Symbolic execution technology is used to construct constraints for the data transmission path. Based on the constraints, the parameter transmission path is traversed and the consistency of data type, boundary value and timing characteristics is verified to check the accuracy of data transmission. An association matrix is ​​constructed based on the dependencies between modules. The integrity and rationality of the dependency links are verified based on the association matrix, and implicit dependency breakage issues are identified.

5. The method for testing the consistency between a multi-functional domain controller software model and its code according to claim 1, characterized in that, Before generating the difference report based on the consistent difference set, the method further includes: The consistency difference set is filtered based on the trained false alarm feature learning model to remove invalid and false differences. The false alarm feature learning model is trained using a Bayesian optimization algorithm, based on historical verification data, protocol constraints, and dependencies in a cross-module dependency topology graph.

6. The method for testing the consistency between a multi-domain controller software model and its code according to claim 1, characterized in that, The generation of a difference report based on the consistent difference set includes: Obtain the consistency difference set and the cross-module dependency topology graph; Each difference item in the consistency difference set is used as a failure node; The failed nodes are marked in the cross-module dependency topology graph to generate a failure-marked dependency topology graph. For the failure marker-dependent topology graph, the propagation probability and influence radius of each failure node are calculated based on the random walk algorithm to obtain the differential influence propagation map; Based on the propagation probability and influence radius in the difference impact propagation map, the difference items in the consistency difference set are weighted and sorted to obtain the difference repair priority queue. The difference repair priority queue and the corresponding features in the cross-modal feature set are associated to obtain the model element position of each difference item in the multi-module model file and the code line interval in the code file; A difference location table is generated based on the model element positions and the code line intervals; A structured difference report is generated based on the difference impact propagation map, the difference repair priority queue, and the difference location table. The report includes a difference list arranged by priority, the impact wave and range of each difference, a bidirectional traceability link from model elements to lines of code, and a minimized repair verification path determined based on the difference impact propagation map.

7. The method for testing the consistency between a multi-functional domain controller software model and its code according to claim 1, characterized in that, Also includes: Real-time acquisition of updates to multi-module model files and corresponding code files; The scope of the iteration's impact is determined based on the updated content; A minimum regression test set is generated based on the aforementioned iterative influence range; The test cases in the minimum regression test set are optimized using a genetic algorithm to obtain optimized test cases; Regression tests are automatically triggered based on the optimized test case set to verify the consistency between the updated content and other content with dependencies.

8. A multi-functional domain controller software model and code consistency testing device, characterized in that, The device includes: The acquisition module is used to acquire multi-module model files and corresponding code files, wherein the multi-module model file is a graphical model file containing multiple functional modules generated during the development of the all-in-one domain controller software; An extraction module is used to extract model features from the multi-module model file and code features from the code file, wherein the model features include semantic features, structural features, and logical features, and the code features include syntax features, call features, and data interaction features; An alignment module is used to align the model features and the code features to obtain an aligned cross-modal feature set; The construction module is used to construct a cross-module dependency topology graph based on the functional modules, data interaction features, and call features in the cross-modal feature set; The verification module is used to perform consistency verification on the cross-modal feature set based on the cross-module dependency topology graph to obtain a consistency difference set. The consistency verification includes logical consistency verification, cross-module interface compatibility verification, data transmission accuracy verification, and dependency link integrity verification. A generation module is used to generate a difference report based on the consistency difference set.

9. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements a method for testing the consistency of a multi-domain controller software model and code as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement a method for testing the consistency of a multi-domain controller software model and code as described in any one of claims 1-7.