Communication simulation test method and device, equipment and storage medium

Connecting the test ECU to the computer through Python software and network cables or adapter cables is solved, and the cost of SOMEIP communication simulation testing tools is realized, low-cost communication testing verification is achieved, and operation and maintenance is simplified, and it is suitable for the field of smart cars.

CN120455344APending Publication Date: 2025-08-08CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510824765.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing SOMEIP communication simulation test tools are expensive and difficult to operate, maintain and manage, making it difficult to achieve low-cost communication test verification.

Method used

By connecting the test ECU to the computer using Python software and network cables or adapters, the extraction, data encapsulation and simulation test of communication service matrix files is realized, and the dependence on expensive equipment is avoided.

Benefits of technology

It realizes low-cost SOMEIP communication test verification, simplifies the operation process, reduces the difficulty of equipment maintenance and management, and is suitable for communication simulation testing in the field of smart cars.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455344A_ABST
    Figure CN120455344A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a communication simulation test method and device, equipment and a storage medium, and is applied to electronic equipment, and the communication simulation test method comprises the following steps: in response to a received communication service matrix file, extracting service data from the communication service matrix file; generating initial encapsulation data according to the service data; in response to the received simulation test type, acquiring simulation electronic control unit information, tested electronic control unit information and simulation service information; establishing communication connection with the tested electronic control unit according to the information of the simulation electronic control unit and the information of the tested electronic control unit; obtaining corresponding simulation service interface parameters according to the simulation test type and the simulation service information; generating a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data; and based on the communication simulation test message, executing a communication simulation test on the to-be-tested electronic control unit which establishes the communication connection. According to the method, the low-cost, simple and feasible communication simulation test can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication testing technology, and in particular to a communication simulation testing method and device, an electronic device, and a storage medium. Background Art

[0002] The SOMEIP protocol (Scalable Service-Oriented Middleware over IP) is currently one of the most widely used middleware protocols in the intelligent automotive sector. It enables efficient service exchange and remote calls within the vehicle's internal network, supporting complex communication requirements between vehicle components and particularly well-suited for scenarios with high data throughput. Functional testing and verification of SOMEIP's basic communication services are crucial throughout the development and testing process. This verification primarily verifies that the SOME / IP protocol stack implementation complies with protocol specifications, ensuring interoperability and reliability within the automotive Ethernet network. It also ensures that all defined services, interfaces, and related data structures adhere to company standards. Identifying issues early and preventing them from reaching the actual vehicle or the market significantly improves production efficiency and reduces risk.

[0003] Currently, the most commonly used simulation tools for verifying SOMEIP's basic communication service functions are VN devices, such as the VN5620, VN5640, and VN5650. VN devices are used for automotive network development and testing, supporting various functions such as online simulation, capture, and media conversion. However, using VN devices as simulation tools also has drawbacks such as high cost and difficulty in operation, maintenance, and management.

[0004] Therefore, how to achieve simple and feasible communication test verification without consuming a lot of costs has become an urgent problem to be solved. Summary of the Invention

[0005] The embodiment of the present application provides a communication simulation test method to solve the problem that a large amount of money needs to be invested in purchasing simulation tools during the communication simulation test process and the equipment is difficult to operate, maintain and manage.

[0006] Correspondingly, an embodiment of the present application also provides a communication simulation test device, an electronic device and a storage medium to ensure the implementation and application of the above method.

[0007] In order to solve the above problems, an embodiment of the present application discloses a communication simulation test method applied to an electronic device, the method comprising: In response to the received communication service matrix file, extracting service data from the communication service matrix file; generating initial packaging data according to the service data; In response to the received simulation test type, obtaining simulation electronic control unit information, tested electronic control unit information and simulation service information; the simulation service information is extracted from the service data; Establishing a communication connection between the electronic device and the electronic control unit under test according to the simulated electronic control unit information and the electronic control unit under test information; Obtain corresponding simulation service interface parameters according to the simulation test type and the simulation service information; Generate a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data; Based on the communication simulation test message, a communication simulation test is performed on the electronic control unit under test with which a communication connection is established.

[0008] Optionally, in response to receiving the communication service matrix file, extracting service data from the communication service matrix file includes: In response to the received communication service matrix file, verifying the validity of the communication service matrix file; If the verification of the validity of the communication service matrix file is invalid, generating an error message; In a case where the validity of the communication service matrix file is verified to be valid, the service data is extracted from the communication service matrix file.

[0009] Optionally, the service data includes simulation service information, service interface information, and data type data, and each piece of simulation service information is associated with corresponding service interface information; and generating initial encapsulation data according to the service data includes: Encapsulating the associated simulation service information and the service interface information to generate service and interface encapsulation information; Disassembling non-basic type data in the data type data in a serialized order to generate non-basic type disassembly data; the data type data includes non-basic type data and basic type data; The basic type data and the non-basic type disassembled data are encapsulated into classes to generate data type encapsulation information.

[0010] Optionally, the acquiring of the simulated electronic control unit information, the tested electronic control unit information, and the simulated service information in response to the received simulation test type includes: receiving the simulation test type as input; When the received simulation test type is an automatic test, prompting the user to input the information of the electronic control unit under test; extracting the relevant simulation service information from the service data according to the received information of the electronic control unit under test; querying the corresponding simulation electronic control unit information according to the extracted simulation service information; the service data includes the simulation electronic control unit information corresponding to the simulation service information; When the received simulation test type is manual control, the user is prompted to input the tested electronic control unit information, the simulated electronic control unit information and the simulation service information; and the input tested electronic control unit information, the simulated electronic control unit information and the simulation service information are received.

[0011] Optionally, the initial encapsulation data includes the service and interface encapsulation information; and generating a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data includes: Reorganize the service and interface encapsulation information according to the simulation service interface parameters to obtain service and interface reorganization information; the service and interface reorganization information includes a reorganized message header and a reorganized payload; encoding the reassembled payload; A communication simulation test message is generated according to the reassembled message header and the encoded reassembled payload.

[0012] Optionally, performing a communication simulation test on the electronic control unit under test that has established a communication connection based on the communication simulation test message includes: Sending the communication simulation test message to the electronic control unit under test; Receive and display the response message returned by the electronic control unit under test; In the event that the electronic control unit under test responds in timeout or the response message cannot be recognized, an error message is displayed and an error report is generated.

[0013] Optionally, the simulation test type includes automatic testing and manual control; and obtaining corresponding simulation service interface parameters according to the simulation test type and the simulation service information includes: In the case where the received simulation test type is an automatic test, determining the simulation service information according to the information of the electronic control unit under test; locating the corresponding simulation service interface according to the simulation service information; and querying the default parameters of the simulation service interface as simulation service interface parameters; When the received simulation test type is manual control, the corresponding simulation service interface is located according to the simulation service information; the parameter structure of the simulation service interface is displayed and the user is prompted to enter the corresponding parameter information; the simulation service interface parameters are obtained according to the parameter information entered by the user.

[0014] The present application also discloses a communication simulation test device, which is applied to electronic equipment. The device includes: an extraction module for extracting service data from the communication service matrix file in response to the received communication service matrix file; An initial encapsulation data generating module, configured to generate initial encapsulation data according to the service data; an acquisition module, configured to acquire, in response to the received simulation test type, simulation electronic control unit information, tested electronic control unit information, and simulation service information; the simulation service information is extracted from the service data; a communication connection establishing module, configured to establish a communication connection between the electronic device and the electronic control unit under test according to the simulated electronic control unit information and the electronic control unit under test information; A simulation service interface parameter acquisition module, configured to obtain corresponding simulation service interface parameters according to the simulation test type and the simulation service information; A communication simulation test message generation module, configured to generate a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data; An execution module is used to perform a communication simulation test on the electronic control unit under test with which a communication connection is established based on the communication simulation test message.

[0015] An embodiment of the present application also discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the communication simulation test method as described in one or more embodiments of the present application.

[0016] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes the communication simulation test method as described in one or more embodiments of the present application.

[0017] Compared with the prior art, the embodiments of the present application have the following advantages: In an embodiment of the present application, in response to a received communication service matrix file, service data is extracted from the communication service matrix file, initial packaging data can be generated based on the extracted service data, and in response to a received simulation test type, simulation electronic control unit information, tested electronic control unit information, and simulation service information can be obtained, and a communication connection with the tested electronic control unit can be established based on the obtained simulation electronic control unit information and tested electronic control unit information, and corresponding simulation service interface parameters can be obtained based on the simulation test type and the simulation service information, and then a communication simulation test message is generated based on the simulation service interface parameters and the initial packaging data, and based on the communication simulation test message, a communication simulation test is performed on the tested electronic control unit with which the communication connection is established. Without relying on expensive third-party equipment, a communication simulation test can be performed on the tested electronic control unit, and the test process is simple and feasible, and does not require excessive requirements on the tester or the test environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1 This is a system block diagram of a communication simulation test device provided by one embodiment of the present application; Figure 2 This is a flowchart of the steps of an embodiment of a communication simulation test method of the present application; Figure 3 is a flowchart of another embodiment of a communication simulation test method of the present application; Figure 4 This is a structural block diagram of an embodiment of a communication simulation test device of the present application. DETAILED DESCRIPTION

[0020] To make the above-mentioned purposes, features, and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and specific embodiments. It is apparent that the embodiments described are only a portion of the embodiments of this application, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments in this application without inventive effort are also within the scope of protection of this application.

[0021] The SOMEIP protocol is an extensible, service-oriented middleware protocol based on the Internet Protocol (IP), primarily used for service communication in automotive electronic systems. It enables dynamic service configuration and efficient communication through mechanisms such as data serialization and deserialization, service discovery, service publishing and subscription, and remote service invocation. It offers advantages such as high bandwidth, low latency, flexible scalability, and strong compatibility. In related technologies, VN devices are often used as simulation tools to test and verify SOMEIP's basic communication service functions. However, VN devices are relatively expensive and require additional power when using Ethernet ports, which is inconvenient to operate. The hardware also requires high maintenance and management requirements. Furthermore, VN devices rely on databases such as ARXML or VCDL, which presents significant challenges for users who lack access to these databases.

[0022] In response to the above-mentioned problems of using VN equipment as a communication simulation test tool for SOMEIP, such as high price, difficulty in operation, maintenance and management, this application proposes a communication simulation test method that does not require other test equipment and can achieve SOMEIP communication test verification with only a network cable or adapter cable. Figure 1, is a system block diagram of a communication simulation test device provided in one embodiment of the present application. The device includes an ECU (Electronic Control Unit) under test, a network cable or adapter cable, and a computer. The ECU under test is connected to the computer via the network cable or adapter cable. The computer can provide network configuration for communication with the ECU under test. The computer is installed with Python software, corresponding to a Python console. Python software can modify information such as the computer's MAC (Media Access Control) address, VLAN ID (Virtual Local Area Network Identifier), and IP address. The Python console includes an input module, a data verification module, a data processing module, a data format conversion module, a visualization interface, and a communication module. The input module can be used to input a SOMEIP communication service matrix file. The data verification module can be used to verify whether the input SOMEIP communication service matrix file meets the requirements. The data processing module can extract valid data from a SOMEIP communication service matrix file that meets the requirements and perform serialization processing for use in communication simulation testing. The data format conversion module can perform encoding and decoding operations. When data needs to be sent to the bus, it encodes and packages the data provided by the data processing module and sends it to the ECU under test. When data needs to be received from the bus, it can also decode the data received from the communication module to obtain the original data. The visualization module allows users to input various parameters during the communication simulation test, and can also display test data, test results, and error messages. The communication module can transmit data to the ECU under test and simultaneously monitor and receive data sent by the ECU under test. Using the above-mentioned communication simulation test device, it is only necessary to connect the ECU under test to the computer using a network cable or an adapter cable. There is no need to spend a lot of money to purchase external equipment to perform SOMEIP communication test verification. This solves the problems of existing simulation test equipment being resource-scarce, expensive, and difficult to maintain.

[0023] Reference Figure 2 , is a step flow chart of an embodiment of a communication simulation test method of the present application, which is applied to electronic devices, including but not limited to: smartphones, tablet computers, e-book readers, laptop computers, car computers, desktop computers, wearable devices, etc.

[0024] The communication simulation test method provided in one embodiment of the present application may include the following steps: Step 201: In response to a received communication service matrix file, extract service data from the communication service matrix file; The communication service matrix file can be an Excel file representing the SOMEIP service matrix to be tested. The service data in the communication service matrix file may include: simulated service information, service interface information, data type information, communication information between the server and client, SOMEIP-SD (Scalable Service-Oriented Middleware over IP-Service Discovery) definitions, and basic ECU information. Simulated service information may include the service name and service ID. Service interface information may include the interface name, interface type, method ID, message type, transport protocol, and data structure. Data type information may include the interface data type. Communication information between the server and client may include: communication service name, communication service ID, VLAN ID, server ECU name, client ECU name, server port, client port, server IP address, client IP address, and instance ID. SOMEIP-SD definitions may include: multicast IP addresses and ports for the server and client, and unicast IP addresses and ports for the server and client. The basic information of the ECU may include: MAC address, time parameter definition of the SOMEIP-SD state machine, etc.

[0025] Step 202: Generate initial encapsulation data according to the service data; The initial packaged data may be packaged based on the simulated service information and corresponding service interface information in the extracted service data. The service interface may be an API (Application Programming Interface).

[0026] Step 203: In response to the received simulation test type, obtain simulation electronic control unit information, tested electronic control unit information, and simulation service information; the simulation service information is extracted from the service data; The simulated ECU refers to the ECU that needs to be simulated by an electronic device to communicate with the ECU under test during the communication simulation test. The ECU under test refers to the ECU subject to the communication simulation test. The simulated ECU information can correspond to the client ECU information, while the ECU under test information can correspond to the server ECU information. The simulated service information corresponds to the vehicle communication services available during the simulation test and can include information such as the service name, service ID, and method ID.

[0027] Step 204: establishing a communication connection between the electronic device and the electronic control unit under test according to the simulated electronic control unit information and the electronic control unit under test information; Step 205: Obtain corresponding simulation service interface parameters according to the simulation test type and the simulation service information; The simulation service interface parameters are corresponding parameters of the service interface information corresponding to the selected simulation service information.

[0028] Step 206: Generate a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data; Step 207: Based on the communication simulation test message, perform a communication simulation test on the electronic control unit under test with which a communication connection is established.

[0029] In response to the received communication service matrix file, the service data is extracted from the communication service matrix file. For example, Python software programming can be used to extract the SOMEIP service matrix content. Figure 3, shows a step flow chart of another communication simulation test method embodiment of the present application, the user can start the Python project, and then load the communication service matrix file to be simulated tested. Exemplarily, the communication service matrix file can be an excel file of the SOMEIP service matrix, and the file format can be xlsx. The SOMEIP service matrix xlsx file can be uploaded by the user or selected locally. Then, the initial packaged data is generated based on the extracted data. The user can select the type of simulation test to be performed in the visualization window, and the simulated electronic control unit information, the tested electronic control unit information and the simulation service information can be obtained in response to the received simulation test type. Then, based on the simulated electronic control unit information and the tested electronic control unit information, a communication connection can be established between the electronic device of the execution subject and the tested electronic control unit. According to the simulation test type and the simulation service information, the corresponding simulation service interface parameters are obtained. According to the obtained simulation service interface parameters, the initial packaged data can be repackaged to generate a communication simulation test message. Based on the generated communication simulation test message, a communication simulation test can be performed on the tested electronic control unit for which a communication connection has been established. According to the above implementation process, communication simulation testing of the electronic control unit under test can be achieved without relying on expensive third-party equipment. The test process is simple and feasible and does not require excessive requirements on the tester or the test environment.

[0030] In one embodiment of the present application, in response to receiving the communication service matrix file, extracting service data from the communication service matrix file includes: In response to the received communication service matrix file, verifying the validity of the communication service matrix file; If the verification of the validity of the communication service matrix file is invalid, generating an error message; In a case where the validity of the communication service matrix file is verified to be valid, the service data is extracted from the communication service matrix file.

[0031] In response to the received communication service matrix file, the validity of the file can be verified. If the validity of the communication service matrix file is invalid, an error message can be generated and an error notification can be sent to the client. If the validity of the communication service matrix file is valid, the service data can be extracted from the communication service matrix file.

[0032] For example, an Excel template specifying service matrix file design rules can be pre-configured. After receiving a user-selected SOMEIP service matrix Excel file, the system can automatically verify whether the file is designed according to the template. If the received Excel file complies with the Excel template rules, the file is deemed valid. If not, the file is deemed invalid. If the received SOMEIP service matrix Excel file is found to be invalid, an error message is generated and displayed to the user in a visual window, and the communication simulation test process is terminated. The visual window can be a GUI (Graphical User Interface). A GUI is an interface display format for human-computer communication that allows users to use input devices such as a mouse to manipulate on-screen icons or menu options to select commands, call files, start programs, or execute programs. Using a GUI allows users to more conveniently perform communication simulation testing. If the received SOMEIP service matrix Excel file is found to be valid, the service data is extracted from the received SOMEIP service matrix Excel file. Based on the above implementation, the received communication service matrix file can be quickly error-checked. The verification results help maintain data integrity and validity, reducing potential errors during subsequent communication simulation testing.

[0033] After extracting service data from the communication service matrix file, the extracted service data can be further verified for accuracy. For example, the extracted service data can be checked for duplicate service names or service IDs, duplicate method IDs for the same service, RPC (Remote Procedure Call) types that do not meet requirements, or incomplete data type definitions. If errors are detected in the service data, the verification fails, an error message can be generated and displayed to the user in a visualization window, and the communication simulation test process can be terminated.

[0034] Reference Figure 3 The illustrated process flow of another embodiment of a communication simulation test method of the present application involves loading an .xlsx file containing a SOMEIP service matrix into a Python project. The process then determines whether the .xlsx file meets the template requirements. If not, the process ends. If it does, data such as the service and data type, and basic communication information are extracted from the .xlsx file. The validity of the extracted data is then determined. If invalid data is found in the extracted data, an error message is fed back to the GUI, causing it to display an error message.

[0035] In one embodiment of the present application, the service data includes simulation service information, service interface information, and data type data, and each simulation service information is associated with corresponding service interface information; generating initial encapsulation data based on the service data includes: Encapsulating the associated simulation service information and the service interface information to generate service and interface encapsulation information; The data structure information within the service interface information can be used to construct the interface parameters of the service interface and is associated with the data type corresponding to the service interface. Each service interface can be associated with one or more data types. The service and interface encapsulation information is obtained by encapsulating the simulated service information of each service and the service interface information of its corresponding API interface into a SOMEIP message, including the header and payload. Message types include request, response, and notification.

[0036] Disassembling non-basic type data in the data type data in a serialized order to generate non-basic type disassembly data; the data type data includes non-basic type data and basic type data; Among them, the serialization order refers to the arrangement rules of each data field being converted into a byte stream during the object serialization process. The non-basic type data in the data type data is disassembled according to the serialization order, that is, the non-basic type data is disassembled according to the arrangement rules of each field being converted into a byte stream during the serialization process. The data type data can be used to identify different types of structures or formats for storing data and define the operations that can be performed on the corresponding data. In this application, the data type data can be an interface data type. Basic type data can include integer type (int), Boolean type (bool), floating point type (double), character type (char), void type (void), etc. Non-basic type data can include pointer type (type*), array type (type[]), reference type (double&), structure (struct), enumeration type (enum), etc.

[0037] The basic type data and the non-basic type disassembled data are encapsulated into classes to generate data type encapsulation information.

[0038] The generated data type encapsulation information is associated with the service and interface encapsulation information of the corresponding service interface.

[0039] Exemplarily, after obtaining the service data, the valid service data can be classified and managed, including: classification management of services and API interfaces, classification management of data types, and classification management of the underlying parameters of both communicating parties. Among them, for classification management of services and API interfaces, each service in the service data and an API interface associated with the service can be classified and stored in the form of simulated service information plus service interface information. A service may correspond to multiple API interfaces, and each API interface must be associated and stored accordingly. For classification management of data types, data type data can be classified according to non-basic types and basic types, and then all non-basic type data in the data type data can be disassembled layer by layer into basic type data in serialized order, and non-basic type data can be converted into a data structure reorganized by multiple basic types to generate non-basic type disassembled data. No additional processing is required for basic type data. Ultimately, all data stored is basic type data. For classification management of the underlying parameters of both communicating parties, each service and its corresponding protocol layer parameter information of both communicating parties can be classified and stored. The protocol layer parameter information of both communicating parties may include the server ECU name and the client ECU name, IP, MAC, VLAN, port, etc. Reference Figure 3 The step flow of another communication simulation test method embodiment of the present application is shown. When it is determined that invalid data exists in the extracted data, the extracted data can be classified and stored, including storing service + interface parameters, storing the data type of the interface parameters, and storing the basic information of the two communicating parties, which respectively correspond to the three types of classification management of service data mentioned above.

[0040] Reference Figure 3 The steps of another embodiment of the communication simulation test method of the present application are shown, which can convert all stored data types into basic data types and encapsulate them into classes. The header (message header) and payload of the service + single interface are encapsulated according to the SOMEIP serialization method.

[0041] The data type data after classification management is processed into a class. The class contains all elements related to the data type, and the class is the basic data type for implementing information encapsulation, excluding arrays and structures. When operating on the data later, only one layer of class needs to be modified, and there is no need to deal with nested situations. The original non-basic type data will become an integration of multiple basic type data when encapsulated. For example, the class processing of MyInterger_1 of the uint32 basic type and MyBool_1 of the uint8 basic type is as follows: class DynamicLength: def __init__(self): self.DynamicLength = '00000000' def list_all_member(self): retval = [] for name, value in vars(self).items(): retval.append(value) return retval class MyInterger_1: def __init__(self): self.MyInterger_1 = "00000000"# uint32 def list_all_member(self): retval = [] for name, value in vars(self).items(): retval.append(value) return retval class MyBool_1: def __init__(self): self.MyBool_1 = "00"# uint8 def list_all_member(self): retval = [] for name, value in vars(self).items(): retval.append(value) return retval Integrate the classes involved in the data structures of each interface. For example, an API interface MyInterface_1 is a structure containing two elements, MyInterger_1 of type uint32 and MyBool_1 of type uint8. After integrating the API, MyInterface_1 becomes two basic data types, MyInterger_1 and MyBool_1. If the API interface MyInterface_1 is an API interface (Method ID = 0x0001) of the service MyService_1 (Service ID = 0x4400), the result of integrating the service and API interface is as follows: MyInterface_1_44000001_payload = [ ] MyInterface_1_44000001_payload.append ( MyInterger_1() ) MyInterface_1_44000001_payload.append (MyBool_1() ) The associated simulation service information and service interface information are encapsulated to generate service and interface encapsulation information. For example, after the valid service data is classified and managed, each service in the service data has been associated with its corresponding API interface, and all services and their corresponding API interfaces can be organized and encapsulated, including the header and payload encapsulation. A service may correspond to multiple API interfaces. In this case, each API interface corresponding to the service needs to be encapsulated separately. The input data type of each API interface can also be encapsulated accordingly. For example, a service is named "someip_serv1", service ID = 0x4000, and the service contains 2 Request-Response API interfaces, namely "RR1" and "RR2", and the corresponding Method IDs are 0x0001 and 0x0002, and the input data types are "datatype_1" and "datatype_2" respectively; after organization, the following encapsulation structure is obtained: The header of Method ID = 0x0001 is encapsulated as follows: #****************** someip_serv1 header************************ / RR1_header_in = SomeipHeader() RR1_header_in.ServiceID = "4000" / / Service ID RR1_header_in.MethodID = "0001" / / Method ID RR1_header_in.Message_Type = "00" / / Message type request Method ID = 0x0001 Payload encapsulation #****************0x4000_0x0001_R / R Method_REQUEST************ / someip_serv1_40000001_payload = [] someip_serv1_40000001_payload.append(DynamicLength()) / / dynamic length someip_serv1_40000001_payload.append(MyInterger_1()) / / data type The header of Method ID = 0x0002 is encapsulated as follows: #****************** someip_serv1 header************************ / RR2_header_in = SomeipHeader() RR2_header_in.ServiceID = "4000" / / Service ID RR2_header_in.MethodID = "0002" / / Method ID RR2_header_in.Message_Type = "00" / / Message type request Method ID = 0x0002 Payload encapsulation #****************0x4000_0x0002_R / R Method_REQUEST************ / someip_serv1_40000002_payload = [] someip_serv1_40000002_payload.append(DynamicLength()) / / dynamic length someip_serv1_40000002_payload.append(MyInterger_1()) / / data type The content of SomeipHeader() is as follows: Contains someip protocol header information class SomeipHeader: def __init__(self): self.ServiceID = '0000' / / Replace according to the actual value self.MethodID = '0000' / / Replace according to the actual value self.Length = '00000000' / / Replace according to the actual value self.ClientID = '0000' / / Replace according to the actual value self.SessionID = '0001' / / Replace according to the actual value self.Someip_Version = '01' self.Interface_Version = '01' self.Message_Type = '00' # 00-request 01-ff 02-notification 80-response 81-error / / Replace according to actual value self.Return_Code = '00' def list_all_member(self): retval = [] for name, value in vars(self).items():# return element value retval.append(value) return retval For example, after encapsulating the service and interface encapsulation information, the underlying protocol can be encapsulated by obtaining the IP, MAC, VLAN, port, and transport protocol information of both communicating parties based on the transport protocol of each API interface and the communication behavior of the server and client. This allows the computer's network configuration to be automatically modified based on the service ID and method ID, completing the underlying communication protocol connection and associating and sending the upper-level API interface encapsulation data. During subsequent communication simulation testing, real-time simulation can be achieved by simply inputting the service information to be simulated, the corresponding interface information, and the communication data.

[0042] In one embodiment of the present application, the acquiring of the simulated electronic control unit information, the tested electronic control unit information, and the simulation service information in response to the received simulation test type includes: receiving the simulation test type as input; The simulation test type can be automatic test or manual control.

[0043] When the received simulation test type is an automatic test, prompting the user to input the information of the electronic control unit under test; extracting the relevant simulation service information from the service data according to the received information of the electronic control unit under test; querying the corresponding simulation electronic control unit information according to the extracted simulation service information; the service data includes the simulation electronic control unit information corresponding to the simulation service information; When the received simulation test type is manual control, the user is prompted to input the tested electronic control unit information, the simulated electronic control unit information and the simulation service information; and the input tested electronic control unit information, the simulated electronic control unit information and the simulation service information are received.

[0044] After receiving the simulation test type input by the user, different methods can be used to obtain the simulation electronic control unit information, the tested electronic control unit information and the simulation service information according to different simulation test types. For example, during the test process of the communication simulation test, refer to Figure 3 The GUI interface prompts the user to select the type of simulation test to be performed, including automatic test and manual control. If the automatic test simulation test type instruction is received, the GUI interface continues to prompt the user to enter the server ECU name, corresponding to the electronic control unit under test information in the above steps. Then, based on the received ECU name, an item of simulation service information associated with the ECU name is selected from the extracted service data, including the service name and service ID. Based on the selected simulation service information, the corresponding client ECU name, that is, the simulation electronic control unit information, is determined.

[0045] If a manual control simulation test type instruction is received, the user is prompted to enter the server ECU name, client ECU name, service name and service ID on the GUI interface, and then the server ECU name, client ECU name, service name and service ID entered by the user are received. Figure 3 , when the simulation test type selected by the user is manual control, the user can be prompted to enter the simulation ECU, test ECU, simulation service ID and Method ID. According to the service and interface ID information fed back by the GUI interface, the corresponding service interface can be located, and the data structure corresponding to the service interface can be used as the data structure of the simulation API, and then the data structure of the simulation API can be fed back to the GUI interface. The GUI interface prompts the user to input parameters according to the API data structure, and then feeds back the input parameters of the simulation API data structure. The data structure of the simulation API is associated with the data type data corresponding to the service interface, and the input parameters of the corresponding simulation API data structure must also correspond to the associated data type. Based on the above implementation process, this application provides two test options: automatic testing and manual control. It is easy to operate and allows users to choose the appropriate type for testing according to actual needs, which can effectively improve user experience and reduce testing difficulty.

[0046] In one embodiment of the present application, the initial encapsulation data includes the service and interface encapsulation information; and generating a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data includes: Reorganize the service and interface encapsulation information according to the simulation service interface parameters to obtain service and interface reorganization information; the service and interface reorganization information includes a reorganized message header and a reorganized payload; The reassembled message header may include information such as message ID, transmission protocol, API interface name, message type, service ID, method ID, length identifier, etc. The reassembled payload may include information such as simulation service interface parameters, data type, and data length.

[0047] encoding the reassembled payload; A communication simulation test message is generated according to the reassembled message header and the encoded reassembled payload.

[0048] After obtaining the simulation service interface parameters to be used in this communication simulation test, the service and interface encapsulation information corresponding to the service information used this time is modified according to the received simulation service interface parameters. That is, the payload information part in the reorganized service and interface encapsulation information is modified, and the interface parameters in the payload are modified to the received simulation service interface parameters to obtain the service and interface reorganization information. The modified reorganized payload is encoded, and the reorganized payload after encoding the reorganized message header is repackaged and encapsulated to obtain the SOMEIP message, which is the communication simulation test message to be used in this communication simulation test. Reference Figure 3 ,In the communication simulation test of the manual control type, the ,payload data can be repacked according to the input interface data ,information fed back by the GUI interface, and the repacked payload data can ,be encoded and packaged into a SOMEIP message.

[0049] In one embodiment of the present application, performing a communication simulation test on the electronic control unit under test that has established a communication connection based on the communication simulation test message includes: Sending the communication simulation test message to the electronic control unit under test; Receive and display the response message returned by the electronic control unit under test; In the event that the electronic control unit under test responds in timeout or the response message cannot be recognized, an error message is displayed and an error report is generated.

[0050] After the communication simulation test message is generated, the communication simulation test message can be sent to the electronic control unit under test. For example, the transmission protocol, simulation end Port, and test end Port corresponding to the service ID and Method ID in the simulation test message can be associated and set, and the encapsulated SOMEIP message can be sent to the ECU under test through the corresponding transmission protocol and port. Among them, the transmission protocol corresponding to the service can be TCP (Transmission Control Protocol) or UDP (User Datagram Protocol). When the transmission protocol is TCP, the TCP communication behavior is automatically associated with the corresponding service interface. When the transmission protocol is UDP, the UDP communication behavior is automatically associated with the corresponding service interface. Reference Figure 3 , which can encode the encapsulated data into a byte stream before sending it.

[0051] The ECU under test will generate a corresponding response message based on the simulation test message sent. It can monitor the information on the bus in real time, receive the response message returned by the ECU under test, parse the response message to obtain SOMEIP data, and then display it to the user on the GUI interface. For example, after obtaining the decoded response message, the corresponding service and interface encapsulation information can be found based on the extracted service ID and Method ID. Figure 3 , the bus byte stream can be decoded and restored when receiving data. When receiving data, the received bus data payload data structure can be parsed by loading the data into the data structure of the service and interface encapsulation information, and the parsed results can be fed back to the GUI interface for display to the user. The GUI interface can parse and display the sending and receiving data structures. If the response time of the ECU under test exceeds the preset time threshold or the response message returned by the ECU under test cannot be recognized, the corresponding failure or error information can be generated and displayed to the user on the GUI interface, and the corresponding error report can be generated for the user to review, and then the communication simulation test process is ended. After completing all the processes of this communication simulation test, a complete communication simulation test report can also be generated for the user to review. According to the above implementation process, real-time sending, receiving and parsing of SOMEIP data can be achieved.

[0052] In one embodiment of the present application, the simulation test type includes automatic testing and manual control; and obtaining corresponding simulation service interface parameters according to the simulation test type and the simulation service information includes: In the case where the received simulation test type is an automatic test, determining the simulation service information according to the information of the electronic control unit under test; locating the corresponding simulation service interface according to the simulation service information; and querying the default parameters of the simulation service interface as simulation service interface parameters; When the received simulation test type is manual control, the corresponding simulation service interface is located according to the simulation service information; the parameter structure of the simulation service interface is displayed and the user is prompted to enter the corresponding parameter information; the simulation service interface parameters are obtained according to the parameter information entered by the user.

[0053] In the case where the simulation test type selected by the user is automatic testing, the corresponding simulation service information can be found in the service data based on the information of the electronic control unit under test input by the user, and then the corresponding simulation service interface can be found from the packaged service and interface package information based on the simulation service information, the corresponding simulation service interface can be located, and the default parameter values pre-set for the service can be obtained as simulation service interface parameters. An electronic control unit under test can correspond to one or more simulation services, and a service can correspond to one or more simulation electronic control units and simulation service interfaces. In the case where the simulation test type is automatic testing, the corresponding simulation service interface and simulation electronic control unit in the service data can be traversed based on the received information of the electronic control unit under test to perform a communication simulation test.

[0054] For example, if the user selects an automatic test as the simulation test type, the service name and service ID associated with the ECU under test entered by the user can be searched from the service data. The associated interface name and interface type can then be searched based on the service name and service ID to locate the associated interface. At the same time, the computer's network parameters can be automatically configured to the network parameters corresponding to the current client ECU based on the client ECU corresponding to the currently automatically selected service and interface name. The default parameter values pre-set for the interface are then obtained, and the initial packaged data is reassembled based on the obtained default parameter values to generate a new SOMEIP message. The generated SOMEIP message is then sent to the ECU under test in accordance with the corresponding transmission protocol of the API interface. This process continues until all services associated with the ECU under test and their corresponding simulation ECUs and API interfaces are traversed, terminating the current automatic simulation test process. The pre-set default parameter values for the interface can be set to one or more groups based on actual needs, and this application does not impose specific restrictions on this.

[0055] When the simulation test type selected by the user is manual control, the corresponding simulation service interface is searched from the packaged service and interface package information according to the simulation service information input by the user, the corresponding simulation service interface is located, and the parameter structure corresponding to the service interface is fed back to the GUI interface, which is displayed on the GUI interface and prompts the user to enter the numerical value of the relevant interface parameters, and the parameter information entered by the user is used as the simulation service interface parameters.

[0056] For example, after entering the parameter information, the user can click the start button on the GUI interface to send the simulation test start instruction. In addition, the GUI interface may also have other control components such as a pause button for controlling the pause of the simulation test, which is not limited in this application. Figure 3Upon receiving the start command, the underlying function automatically completes the computer's network configuration and target network parameter settings based on the input simulated ECU and ECU under test information. It automatically updates the computer's network configuration to the simulated ECU (client ECU) communication parameters and sets the target network parameters to the ECU under test (server ECU) communication parameters. Communication parameters can include IP, MAC, VLAN, and port information. Based on the service ID and method ID entered by the user in the GUI, the underlying function also determines the API interface's transport protocol, simulation port, and test port from the associated underlying parameters of both communication parties. It automatically associates the service with the TCP / UDP communication transport, sets the source port (simulation port) and target port (test port) based on the acquired association information, and automatically configures the corresponding TCP or UDP transport protocol as the interface's transport protocol. The user-entered parameters are then used to automatically reassemble the initial encapsulated data corresponding to the user-selected service and interface, repackaging the service and interface encapsulation information to generate a communication simulation test message and send it to the ECU under test. Upon receiving a response message from the ECU under test, the manual control simulation test process concludes.

[0057] It should be noted that for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0058] On the basis of the above embodiments, this embodiment further provides a communication simulation test device, which is applied to electronic devices such as terminal devices and servers.

[0059] Reference Figure 4 , shows a structural block diagram of an embodiment of a communication simulation test device of the present application, which is applied to electronic equipment and may specifically include the following modules: An extraction module 401 is configured to extract service data from a received communication service matrix file in response to the received communication service matrix file; An initial encapsulation data generating module 402 is configured to generate initial encapsulation data according to the service data; An acquisition module 403 is configured to acquire, in response to the received simulation test type, simulation electronic control unit information, tested electronic control unit information, and simulation service information; the simulation service information is extracted from the service data; a communication connection establishing module 404, configured to establish a communication connection between the electronic device and the electronic control unit under test according to the simulated electronic control unit information and the electronic control unit under test information; A simulation service interface parameter acquisition module 405 is configured to obtain corresponding simulation service interface parameters according to the simulation test type and the simulation service information; A communication simulation test message generating module 406 is configured to generate a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data; The execution module 407 is configured to execute a communication simulation test on the electronic control unit under test with which the communication connection is established based on the communication simulation test message.

[0060] The extraction module is further configured to: In response to the received communication service matrix file, verifying the validity of the communication service matrix file; If the verification of the validity of the communication service matrix file is invalid, generating an error message; In a case where the validity of the communication service matrix file is verified to be valid, the service data is extracted from the communication service matrix file.

[0061] The service data includes simulation service information, service interface information and data type data, each of which is associated with a corresponding service interface information; the initial package data generation module further includes: A service and interface encapsulation information generating submodule, configured to encapsulate the associated simulation service information and the service interface information to generate service and interface encapsulation information; a disassembly submodule, configured to disassemble the non-basic type data in the data type data in a serialized order to generate non-basic type disassembled data; the data type data includes non-basic type data and basic type data; The data type encapsulation information generating submodule is used to perform class encapsulation on the basic type data and the non-basic type disassembled data to generate data type encapsulation information.

[0062] The acquisition module is further configured to: receiving the simulation test type as input; When the received simulation test type is an automatic test, prompting the user to input the information of the electronic control unit under test; extracting the relevant simulation service information from the service data according to the received information of the electronic control unit under test; querying the corresponding simulation electronic control unit information according to the extracted simulation service information; the service data includes the simulation electronic control unit information corresponding to the simulation service information; When the received simulation test type is manual control, the user is prompted to input the tested electronic control unit information, the simulated electronic control unit information and the simulation service information; and the input tested electronic control unit information, the simulated electronic control unit information and the simulation service information are received.

[0063] The initial encapsulation data includes the service and interface encapsulation information; the communication simulation test message generation module also includes A service and interface reorganization information generating submodule is used to reorganize the service and interface encapsulation information according to the simulation service interface parameters to obtain service and interface reorganization information; the service and interface reorganization information includes a reorganized message header and a reorganized payload; an encoding submodule, configured to encode the recombined payload; The communication simulation test message generation submodule is used to generate a communication simulation test message according to the reassembled message header and the encoded reassembled effective load.

[0064] The execution module also includes: A sending submodule, configured to send the communication simulation test message to the electronic control unit under test; A response message receiving and displaying submodule, configured to receive and display the response message returned by the electronic control unit under test; The error report generation submodule is used to display error information and generate an error report when the response of the electronic control unit under test times out or the response message cannot be recognized.

[0065] The simulation test types include automatic testing and manual control; the simulation service interface parameter acquisition module is further used to: In the case where the received simulation test type is an automatic test, determining the simulation service information according to the information of the electronic control unit under test; locating the corresponding simulation service interface according to the simulation service information; and querying the default parameters of the simulation service interface as simulation service interface parameters; When the received simulation test type is manual control, the corresponding simulation service interface is located according to the simulation service information; the parameter structure of the simulation service interface is displayed and the user is prompted to enter the corresponding parameter information; the simulation service interface parameters are obtained according to the parameter information entered by the user.

[0066] A communication simulation test device provided by an embodiment of the present application can extract service data from a communication service matrix file in response to a received communication service matrix file, generate initial packaging data based on the extracted service data, obtain simulation electronic control unit information, tested electronic control unit information and simulation service information in response to a received simulation test type, establish a communication connection with the tested electronic control unit based on the obtained simulation electronic control unit information and tested electronic control unit information, obtain corresponding simulation service interface parameters based on the simulation test type and the simulation service information, generate a communication simulation test message based on the simulation service interface parameters and the initial packaging data, and perform a communication simulation test on the tested electronic control unit with which a communication connection is established based on the communication simulation test message. Without relying on expensive third-party equipment, a communication simulation test can be performed on the tested electronic control unit, and the test process is simple and feasible, without placing excessive demands on the tester or the test environment.

[0067] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0068] The present application also provides one or more electronic devices, including a processor and a memory storing executable code. When the executable code is executed, the processor performs one or more of the methods described in the above embodiments. In the present application, the electronic devices include various types of devices, such as terminal devices and servers (clusters).

[0069] The present application provides one or more computer-readable storage media having executable code stored thereon. When the executable code is executed, the processor executes the method described in one or more of the above embodiments. The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. Similar parts between the various embodiments can be referred to in conjunction with each other.

[0070] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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, an embedded processor, or other programmable communication simulation test terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable communication simulation test terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0071] These computer program instructions can also be stored in a computer readable memory that can guide a computer or other programmable communication simulation test terminal device to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including an instruction device, which is implemented in the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0072] These computer program instructions can also be loaded onto a computer or other programmable communication simulation test terminal device, so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0073] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0074] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0075] The above is a detailed introduction to a communication simulation test method and device, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A communication simulation test method, characterized in that: Applied to electronic equipment, the method includes: In response to the received communication service matrix file, extracting service data from the communication service matrix file; generating initial packaging data according to the service data; In response to the received simulation test type, obtaining simulation electronic control unit information, tested electronic control unit information and simulation service information; the simulation service information is extracted from the service data; Establishing a communication connection between the electronic device and the electronic control unit under test according to the simulated electronic control unit information and the electronic control unit under test information; Obtain corresponding simulation service interface parameters according to the simulation test type and the simulation service information; Generate a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data; Based on the communication simulation test message, a communication simulation test is performed on the electronic control unit under test with which a communication connection is established.

2. The method according to claim 1, characterized in that The extracting service data from the communication service matrix file in response to the received communication service matrix file comprises: In response to the received communication service matrix file, verifying the validity of the communication service matrix file; If the verification of the validity of the communication service matrix file is invalid, generating an error message; In a case where the validity of the communication service matrix file is verified to be valid, the service data is extracted from the communication service matrix file.

3. The method according to claim 1, characterized in that The service data includes simulation service information, service interface information and data type data, and each simulation service information is associated with a corresponding service interface information; Generating initial encapsulation data according to the service data includes: Encapsulating the associated simulation service information and the service interface information to generate service and interface encapsulation information; Disassembling non-basic type data in the data type data in a serialized order to generate non-basic type disassembly data; the data type data includes non-basic type data and basic type data; The basic type data and the non-basic type disassembled data are encapsulated into classes to generate data type encapsulation information.

4. The method according to claim 1, wherein The step of obtaining the simulated electronic control unit information, the tested electronic control unit information and the simulated service information in response to the received simulation test type includes: receiving the simulation test type as input; When the received simulation test type is an automatic test, prompting the user to input the information of the electronic control unit under test; extracting the relevant simulation service information from the service data according to the received information of the electronic control unit under test; querying the corresponding simulation electronic control unit information according to the extracted simulation service information; the service data includes the simulation electronic control unit information corresponding to the simulation service information; When the received simulation test type is manual control, the user is prompted to input the tested electronic control unit information, the simulated electronic control unit information and the simulation service information; and the input tested electronic control unit information, the simulated electronic control unit information and the simulation service information are received.

5. The method according to claim 1, wherein The initial encapsulation data includes the service and interface encapsulation information; The generating of the communication simulation test message according to the simulation service interface parameters and the initial encapsulation data includes: Reorganize the service and interface encapsulation information according to the simulation service interface parameters to obtain service and interface reorganization information; the service and interface reorganization information includes a reorganized message header and a reorganized payload; encoding the reassembled payload; A communication simulation test message is generated according to the reassembled message header and the encoded reassembled effective load.

6. The method according to claim 1, characterized in that The performing of a communication simulation test on the electronic control unit under test that establishes a communication connection based on the communication simulation test message includes: Sending the communication simulation test message to the electronic control unit under test; Receive and display the response message returned by the electronic control unit under test; In the event that the electronic control unit under test responds in timeout or the response message cannot be recognized, an error message is displayed and an error report is generated.

7. The method according to claim 1, characterized in that The simulation test type includes automatic test and manual control; the corresponding simulation service interface parameters are obtained according to the simulation test type and the simulation service information, including: In the case where the received simulation test type is an automatic test, determining the simulation service information according to the information of the electronic control unit under test; locating the corresponding simulation service interface according to the simulation service information; and querying the default parameters of the simulation service interface as simulation service interface parameters; When the received simulation test type is manual control, the corresponding simulation service interface is located according to the simulation service information; the parameter structure of the simulation service interface is displayed and the user is prompted to enter the corresponding parameter information; the simulation service interface parameters are obtained according to the parameter information entered by the user.

8. A communication simulation test device, characterized in that: Applied to electronic equipment, the device comprises: an extraction module for extracting service data from the communication service matrix file in response to the received communication service matrix file; An initial encapsulation data generating module, configured to generate initial encapsulation data according to the service data; an acquisition module, configured to acquire, in response to the received simulation test type, simulation electronic control unit information, tested electronic control unit information, and simulation service information; the simulation service information is extracted from the service data; a communication connection establishing module, configured to establish a communication connection between the electronic device and the electronic control unit under test according to the simulated electronic control unit information and the electronic control unit under test information; A simulation service interface parameter acquisition module, configured to obtain corresponding simulation service interface parameters according to the simulation test type and the simulation service information; A communication simulation test message generation module, configured to generate a communication simulation test message according to the simulation service interface parameters and the initial encapsulation data; An execution module is used to perform a communication simulation test on the electronic control unit under test with which a communication connection is established based on the communication simulation test message.

9. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the communication simulation test method according to one or more of claims 1-7.

10. A computer-readable storage medium having executable codes stored thereon, which, when executed, causes a processor to execute the communication simulation test method according to one or more of claims 1-7.