SOME / IP-based vehicle communication test method, device and equipment
By realizing SOME/IP message processing and return on the communication test device, SOME/IP protocol communication is performed directly, which solves the testing difficulties of the HIL test bench when there is a lack of conversion nodes, and shortens the test cycle through simulated handpieces, improving the Test efficiency and reliability.
Patent Information
- Application Number
- CN202411027875.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, when HIL test bench performs SOME/IP communication test, the vehicle's own VDCM module needs to be processed for protocol, and in the absence of SOME/IP conversion nodes, the test requirements cannot be met, and the vehicle is tested. There is a need to wait for the handpiece to develop, resulting in an extended test cycle.
By running the SOME/IP-based vehicle communication test method on the communication test device, the processing and return of SOME/IP messages is realized, and SOME/IP protocol communication is performed directly, reducing the processing flow of additional nodes, and simulating handpieces to perform vehicles Communication testing to avoid delays in the test cycle caused by handpiece development.
The data interaction process between the communication test device and the vehicle is simplified, communication reliability, flexibility and compatibility are improved, and testing cycles are reduced.
Smart Images

Figure CN119135582A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle testing, and in particular relates to a vehicle communication testing method, device and equipment based on SOME / IP. Background Art
[0002] Hardware-in-the-loop testing, also known as HIL testing, is a semi-physical simulation testing method. The HIL test bench usually simulates the operating state of the controlled object by running the relevant simulation model through a real-time processor.
[0003] When the HIL test bench is testing with the vehicle under test, data exchange needs to be carried out through a protocol. The communication protocol includes a SOME / IP communication protocol. The SOME / IP communication protocol has the characteristics of high reliability, flexible scalability, and good compatibility. Therefore, its importance in automotive Ethernet is gradually increasing. Many cars have also begun to use the SOME / IP communication protocol.
[0004] In the prior art, although the SOME / IP communication protocol is used, the vehicle's own VDCM vehicle dynamic control module is often required to process the protocol, and then communicate with the HIL test bench and perform testing. Although this method uses the communication method of the SOME / IP communication protocol and also takes advantage of the SOME / IP communication protocol, it requires the vehicle to provide an additional SOME / IP parsing node for signal processing. In some scenarios where the HIL test bench needs to directly test the device under test that does not have a SOME / IP communication protocol conversion node, and both the HIL test and the device under test cannot process the SOME / IP communication protocol message, the HIL test bench cannot meet the test requirements.
[0005] Furthermore, in some other existing technologies, when a vehicle is undergoing SOME / IP communication testing, it is necessary to wait for the development of counterparty for internal vehicle testing to be completed, which slows down the vehicle testing cycle. Summary of the invention
[0006] Therefore, the present invention proposes a vehicle communication test method, device and equipment based on SOME / IP. By running the vehicle communication test method for SOME / IP on the communication test device, the SOME / IP message is processed and the test SOME / IP message is returned, so that the communication test device and the device under test can directly perform SOME / IP protocol communication without the need for additional nodes to process the data. At the same time, the communication test device equipped with this method can also simulate the vehicle communication test of the opponent, avoiding the delay of the test cycle caused by the development of the opponent.
[0007] The content of the present invention is achieved through the following technical solutions:
[0008] In a first aspect, the present invention provides a vehicle communication test method based on SOME / IP, which is applied to a communication test device, and the method comprises:
[0009] Establish a connection with the current vehicle through the SOME / IP protocol and obtain the request instruction of the current vehicle;
[0010] Intercept and judge the request instruction and generate an event trigger flag;
[0011] Generate a trigger flag value according to the event trigger flag and the time trigger flag set by the timer module;
[0012] According to the trigger flag value, a test data packet is sent to the current vehicle.
[0013] By adding a vehicle communication test method based on SOME / IP to the communication test device, the communication test device has the functions of intercepting the SOME / IP protocol, periodic judgment processing, and returning the SOME / IP protocol test message, thereby reducing the processing flow of the SOME / IP protocol message by the additional node, simplifying the data interaction process between the communication test device and the current vehicle, enabling the communication test device to directly communicate with the current vehicle through the SOME / IP protocol, and replacing the traditional communication such as the CAN bus through the SOME / IP protocol communication, so that the communication test device and the current vehicle have the characteristics of high reliability, flexible scalability, good compatibility, etc. Further, the communication test device equipped with this method can also simulate the counterpart of the vehicle internal test, thereby avoiding the development of the counterpart and delaying the vehicle test cycle.
[0014] In some implementations, the request instruction includes a SOME / IP protocol message, the test data packet includes a SOME / IP protocol test message,
[0015] When the communication test device communicates with the current vehicle via SOME / IP, it usually directly transmits SOME / IP protocol messages without the need for additional node processing. In the returned test data packets, SOME / IP protocol test messages are also directly transmitted without the need for additional node processing, thereby reducing the communication process between the communication test device and the current vehicle, making data transmission more reliable, flexible, scalable, and compatible.
[0016] In some implementations, establishing a connection with the current vehicle via the SOME / IP protocol to obtain a request instruction from the current vehicle includes:
[0017] Configure the Ethernet interface of the current vehicle and the communication test device, and obtain the request instruction of the current vehicle through the Ethernet interface.
[0018] The communication test equipment receives SOME / IP protocol messages through the Ethernet interface. Therefore, before transmission, it is necessary to configure the relevant Ethernet interface to make the communication test equipment consistent with the Ethernet of the current vehicle to ensure that the communication test equipment can communicate normally with the current vehicle.
[0019] In some implementations, intercepting and judging the request instruction, generating an event trigger mark, and obtaining a time trigger mark generated by the system periodically include:
[0020] The method comprises: extracting a required field value from the SOME / IP protocol message, and generating an event trigger flag according to the required field value;
[0021] Obtain a first count value generated in a period, and divide the first count value by a preset first set value, and set the remainder obtained as a second count value;
[0022] Determine whether the second count value is the same as a preset second set value, if so, generate a time trigger mark, otherwise no processing is performed;
[0023] The first count value is accumulated in the timer according to a preset sampling period.
[0024] By intercepting the required field value of the SOME / IP protocol message and processing it, after obtaining the required field value, an event trigger flag is generated to represent that the required field value of the message has been obtained, and the next step can be taken. The sampling period is obtained through the built-in timer of the device to set the time trigger mark; thus, intervals can be set between messages to avoid information blocking caused by simultaneous output at the same time.
[0025] In some implementations, generating a trigger flag value according to an event trigger flag and a time trigger flag includes:
[0026] If both the event trigger flag and the time trigger flag are obtained at the same time, a trigger flag value is generated.
[0027] After obtaining the event trigger flag and the time trigger flag at the same time, a trigger flag value is generated. The trigger flag value represents that the required field value has been intercepted and the sending cycle has been reached, which further represents that the processing of the request instruction has been completed and feedback on the request instruction is requested.
[0028] In some implementations, sending a test data packet to the current vehicle according to the trigger flag value includes:
[0029] According to the trigger flag value, the required field value is defined, the SOME / IP protocol test message is obtained, integrated into a test data packet, and the test data packet is sent to the current vehicle.
[0030] Through the trigger flag value, it is concluded that the request instruction has been processed, which also means that the required field value has been intercepted. Further, through the required field value, the SOME / IP protocol test message is defined and fed back to the current vehicle to realize the message interaction between the communication test device and the current vehicle.
[0031] In a second aspect, the present invention provides a communication test device, comprising:
[0032] The data receiving module is used to establish a connection with the current vehicle through the SOME / IP protocol and obtain the request instruction of the current vehicle;
[0033] The data interception judgment module intercepts and judges the request instruction, generates an event trigger mark, and obtains the time trigger mark generated by the system period;
[0034] The event trigger module is used to generate a trigger flag value according to the event trigger flag and the time trigger flag; the test data module is used to send a test data packet to the current vehicle.
[0035] The hardware test module is used to establish a hardware connection with the current vehicle through the SOME / IP protocol and run the SOME / IP-based test method proposed in the first aspect.
[0036] Through the hardware test module, a connection is established with the current vehicle through the SOME / IP protocol on the hardware, and the data receiving module, the data interception judgment module, the event triggering module, and the test data module are loaded to perform the first aspect of the SOME / IP-based test method to realize direct SOME / IP protocol communication between the communication test device and the current vehicle.
[0037] In a third aspect, the present invention provides a communication test device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0038] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the vehicle communication testing method based on SOME / IP as described in any one of the first aspects.
[0039] In some embodiments, the communication test equipment includes a hardware-in-the-loop test bench, the memory stores a SOME / IP model, and the operation of the SOME / IP-based vehicle communication test method as described in any one of the first aspects is performed through the SOME / IP model.
[0040] By setting up a SOME / IP model, the SOME / IP model includes at least a data receiving module, a data interception judgment module, an event triggering module, and a test data module so that the SOME / IP model executes a test method based on SOME / IP. The SOME / IP model can be designed according to different software so that multiple software can process SOME / IP, and then when the model is loaded onto the hardware-in-the-loop test bench body, the SOME / IP model established by the software can execute a test method based on SOME / IP, and realize the SOME / IP protocol interaction between the communication test device and the current vehicle.
[0041] In a fourth aspect, the present invention proposes a computer-readable storage medium, comprising at least one execution instruction stored in the storage medium, and when the executable instruction is run on a communication test device such as the second aspect or any one of the second aspects, the device executes a SOME / IP-based test method such as any one of the first aspect.
[0042] The beneficial effects of the vehicle communication test method, device and equipment based on SOME / IP of the present invention are:
[0043] By applying a vehicle communication test method based on SOME / IP on a communication test device, the communication test device can perform phase judgment processing on a request instruction transmitted based on the SOME / IP protocol and generate an event trigger flag; and generate a trigger flag value according to the event trigger flag and the time trigger mark set by the timer module; and send a test data packet to the current vehicle according to the trigger flag value. Through the above method, the communication test device can process the request instruction based on the SOME / IP protocol and return the test data packet, thereby realizing direct testing of the communication test device and the current vehicle, reducing the processing nodes of the SOME / IP protocol and simplifying the test transmission process. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0045] Figure 1 It is a flow chart of the vehicle communication test method based on SOME / IP;
[0046] Figure 2 A flow chart for generating event trigger flags and time trigger flags;
[0047] Figure 3 A framework diagram of a communication test device;
[0048] Figure 4 It is a framework diagram of a communication test equipment;
[0049] Figure 5 It is the configuration flow chart of the hardware-in-the-loop test bench and the device under test;
[0050] Figure 6 Configuration steps for the hardware-in-the-loop test platform based on dSPACE software;
[0051] Figure 7 It is a test method based on SOME / IP communication for the hardware-in-the-loop test platform of dSPACE software. DETAILED DESCRIPTION
[0052] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0053] Embodiment 1:
[0054] like Figure 1-2 As shown, the present invention proposes a vehicle communication test method based on SOME / IP, which is applied to a communication test device, and the method includes:
[0055] Step 101: Establish a connection with the current vehicle through the SOME / IP protocol to obtain a request instruction of the current vehicle;
[0056] Specifically, a connection is established through the SOME / IP protocol of the communication test device, and after the connection is confirmed, the request instruction of the current vehicle is obtained. Furthermore, the communication test device must be configured first to confirm that the connection can be made. The configuration includes hardware configuration, Ethernet network configuration, etc. to achieve normal communication between the device under test and the communication test device.
[0057] Step 102: intercept and judge the request instruction, generate an event trigger mark, and obtain the time trigger mark generated by the system period;
[0058] Specifically, the request instruction is intercepted and judged to obtain valid information of the request instruction, including time, ID, content, event, version and other data required for communication interaction. The valid information is determined according to the test program, and an event trigger flag is sent after interception. The time trigger mark is obtained through a period to avoid information channel blockage caused by a large number of messages being sent at the same time.
[0059] Step 103: Generate a trigger flag value according to the event trigger flag and the time trigger flag;
[0060] Specifically, a trigger flag value is generated according to the event trigger flag and the time trigger mark obtained by the timer period.
[0061] Step 104: Send a test data packet to the current vehicle according to the trigger flag value.
[0062] Specifically, after obtaining the trigger flag value, a test data packet is defined and sent to the vehicle. The test data packet is defined to determine the content of the test based on the valid fields obtained. For example, if the time is tested, the valid field is time. The test can be defined as the modified test time of the time, and the SOME / IP protocol message is compiled and further sent out in the form of a test data packet. Furthermore, the communication test device equipped with this method can also simulate the counterpart of the vehicle internal test by loading the vehicle communication test method based on SOME / IP, thereby avoiding the development of the counterpart and slowing down the vehicle test cycle. At the same time, by changing the configuration, the communication test equipment can be adapted to a variety of vehicles and replace different counterparts.
[0063] In some embodiments, the request instruction includes a SOME / IP protocol message, and the test data packet includes a SOME / IP protocol test message.
[0064] When the communication test device communicates with the current vehicle via SOME / IP, it usually directly transmits SOME / IP protocol messages without the need for additional node processing. In the returned test data packets, SOME / IP protocol test messages are also directly transmitted without the need for additional node processing, thereby reducing the communication process between the communication test device and the current vehicle, making data transmission more reliable, flexible, scalable, and compatible.
[0065] In some embodiments, the current vehicle establishes a connection through the SOME / IP protocol to obtain a request instruction of the current vehicle; including:
[0066] Configure the Ethernet interface of the current vehicle and the communication test device, and obtain the request instruction of the current vehicle through the Ethernet interface.
[0067] When communicating with the SOME / IP protocol, Ethernet communication is usually used. Therefore, the Ethernet communication interface needs to be configured before communication to determine the communication interface. And because the Ethernet networks of the communication test device and the device under test are often different, the network needs to be adjusted to be consistent through configuration.
[0068] The communication test equipment receives SOME / IP protocol messages through the Ethernet interface. Therefore, before transmission, it is necessary to configure the relevant Ethernet interface to make the communication test equipment consistent with the Ethernet of the current vehicle to ensure that the communication test equipment can communicate normally with the current vehicle.
[0069] In some embodiments, intercepting and judging the request instruction, generating an event trigger mark; intercepting and judging the request instruction, generating an event trigger mark, and obtaining a time trigger mark generated by the system period; including the following steps:
[0070] Step 1021: extracting a required field value from the SOME / IP protocol message, and generating an event trigger flag according to the required field value;
[0071] Specifically, according to the intercepted required field value, after obtaining the valid required field value, after being able to determine that the required field value has been obtained based on the data type, length, flag bit, etc. of the required field value, an event trigger flag is generated. The event trigger flag can be a register value such as a transition from 0 to 1, or a change in a flag bit, or a change in a variable, or sending a related message to notify or announce the next step of the program.
[0072] Step 1022: Obtain a first count value generated periodically, and divide the first count value by a preset first setting value, and set the remainder obtained as a second count value;
[0073] Specifically, the first count value is generated according to the time period, and the time period can be set according to the actual situation, for example, in the form of 1ms, increasing by 1 each time, or a time period. The second count value is the desired time length, and can also be a specific value set according to certain parameters of the vehicle or the protocol time, such as 20ms, or according to the time value defined by the OfferService in the SOME / IP protocol communication; the remainder obtained by dividing the first count value by the first set value is recorded as the second count value.
[0074] Step 1023: determine whether the second count value is the same as a preset second setting value, if so, generate a time trigger mark, otherwise no processing is performed;
[0075] Specifically, by comparing the second count value and the second set value, the second set value is the confirmation sending value of the remainder, that is, the sending node. For example, when the second set value is 10, then as set in the above steps, the time node for sending information is 10ms, 30ms, 50ms, 70ms and so on.
[0076] The first count value is accumulated in the timer according to a preset sampling period. The sampling period set by the timer can be set according to time or according to a self-set time interval.
[0077] Through the above method, the interval of sending nodes can be set, so that the test information can be sent at intervals to avoid sending multiple information at the same time. By intercepting the required field value of the SOME / IP protocol message and processing it, after obtaining the required field value, an event trigger flag is generated to represent that the required field value of the message has been obtained, and the next step can be taken. Through the built-in timer of the device, the sampling period is obtained to set the time trigger mark; thus, intervals can be set between messages to avoid simultaneous output at the same time, causing information blocking.
[0078] In some embodiments, generating a trigger flag value according to an event trigger flag and a time trigger flag includes:
[0079] If both the event trigger flag and the time trigger flag are obtained at the same time, a trigger flag value is generated.
[0080] When sending a trigger flag value, the trigger flag value is usually generated only after the event trigger flag and the time trigger flag are obtained at the same time, thereby reducing the generation of multiple trigger flag values during sending, causing data disorder, leading to sending errors or blockages.
[0081] After obtaining the event trigger flag and the time trigger flag at the same time, a trigger flag value is generated. The trigger flag value represents that the required field value has been intercepted and the sending cycle has been reached, which further represents that the processing of the request instruction has been completed and feedback on the request instruction is requested.
[0082] In some embodiments, according to the trigger flag value, sending a test data packet to the current vehicle includes:
[0083] According to the trigger flag value, the required field value is defined, the SOME / IP protocol test message is obtained, integrated into a test data packet, and the test data packet is sent to the current vehicle.
[0084] Specifically, the test data packet includes a SOME / IP protocol test message and other messages, which may be other protocol messages or other data interactions.
[0085] Through the trigger flag value, it is concluded that the request instruction has been processed, which also means that the required field value has been intercepted. Further, through the required field value, the SOME / IP protocol test message is defined and fed back to the current vehicle to realize the message interaction between the communication test device and the current vehicle.
[0086] By adding a vehicle communication test method based on SOME / IP to a communication test device, the communication test device has the functions of intercepting the SOME / IP protocol, periodic judgment processing, and returning the SOME / IP protocol test message, thereby reducing the processing flow of the SOME / IP protocol message by an additional node, simplifying the data interaction process between the communication test device and the current vehicle, enabling the communication test device to directly communicate with the current vehicle via the SOME / IP protocol, and replacing traditional communication such as the CAN bus with the SOME / IP protocol communication, so that the communication test device and the current vehicle have the characteristics of high reliability, flexibility, scalability, good compatibility, etc.
[0087] Embodiment 2:
[0088] like Figure 3 As shown, based on Embodiment 1, the present invention proposes a communication test device 200, comprising:
[0089] The data receiving module 201 is used to establish a connection with the current vehicle through the SOME / IP protocol and obtain the request instruction of the current vehicle; this module is used to execute step 101;
[0090] The data interception judgment module 202 is used to intercept and judge the request instruction, generate an event trigger mark, and obtain a time trigger mark generated by the system period; this module is used to execute step 102;
[0091] An event trigger module 203, used to generate a trigger flag value according to the event trigger flag and the time trigger flag; this module is used to execute step 103;
[0092] The test data module 204 is used to send a test data packet to the current vehicle. This module is used to execute step 104.
[0093] In some embodiments, the following modules are also included:
[0094] The hardware testing module 205 is used to establish a hardware connection with the current vehicle through the SOME / IP protocol and run the SOME / IP-based testing method proposed in Example 1.
[0095] The above modules are used to execute the method mentioned in any one of the embodiments of Example 1.
[0096] Through the hardware test module, a connection is established with the current vehicle through the SOME / IP protocol on the hardware, and the data receiving module, the data interception judgment module, the event triggering module, and the test data module are loaded to perform the first aspect of the SOME / IP-based test method to realize direct SOME / IP protocol communication between the communication test device and the current vehicle.
[0097] Embodiment 3:
[0098] like Figure 4-5 As shown, based on Embodiment 1, the present invention proposes a communication test device, comprising:
[0099] The communication test device may include: a processor (processor) 301 , a communication interface (Communication interface) 304 , a memory (memory) 302 , and a communication bus 305 .
[0100] The processor 301, the communication interface 304, and the memory 302 communicate with each other through the communication bus 305. The communication interface 304 is used to communicate with other devices such as client or other server network elements. The processor 301 is used to execute the program 303, which can specifically execute the relevant steps in the above embodiment 1.
[0101] Specifically, the program 303 may include program codes, which include computer-executable instructions.
[0102] The processor 301 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the communication test equipment may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0103] The memory 302 is used to store the program 303. The memory 302 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0104] In some embodiments, the communication test equipment includes a hardware-in-the-loop test bench, and the memory stores a SOME / IP model, and the operation of the SOME / IP-based vehicle communication test method described in any one of Example 1 is performed through the SOME / IP model.
[0105] Specifically, the hardware-in-the-loop test bench is provided with a hardware-in-the-loop test bench body and a host computer, wherein an Ethernet board and a real-time machine are provided inside the hardware-in-the-loop test bench body, a processor 301 is provided inside the Ethernet board, and the host computer and the real-time machine are stored in the memory 406. The model software and management software are provided inside the host computer, the model software designs a SOME / IP model, and is loaded into the real-time machine through the management software, so that the real-time machine can perform the operation of the vehicle communication test method based on SOME / IP in Example 1. Among them, external communication is performed through a communication interface, which is generally an Ethernet interface, and in order to match the device to be tested, the Ethernet interface can be configured through the management software, and the Ethernet interface is network adapted so that the Ethernet interface is adapted to the device to be tested.
[0106] Further, according to the hardware-in-the-loop test bench, the device configuration with the device under test includes the following steps:
[0107] Step 401: Designing a SOME / IP communication model through the host computer model software, which can receive, parse and send network messages of the SOME / IP protocol;
[0108] Step 402: receiving and loading the SOME / IP communication model provided by the upper computer model software through the upper computer management software, and the management software provides an interface for changing and observing the SOME / IP communication model data and network configuration;
[0109] Step 403: Connect the host computer and the hardware-in-the-loop test bench. The hardware-in-the-loop test bench real-time machine receives and executes the SOME / IP communication model provided by the host computer, and modifies the relevant configuration according to the configuration parameters provided by the host computer. The hardware-in-the-loop test bench is connected to the device under test through the Ethernet interface to perform SOME / IP communication.
[0110] By setting up a SOME / IP model, the SOME / IP model includes at least a data receiving module, a data interception judgment module, an event triggering module, and a test data module so that the SOME / IP model executes a test method based on SOME / IP. The SOME / IP model can be designed according to different software so that multiple software can process SOME / IP, and then when the model is loaded onto the hardware-in-the-loop test bench body, the SOME / IP model established by the software can execute a test method based on SOME / IP, and realize the SOME / IP protocol interaction between the communication test device and the current vehicle.
[0111] Embodiment 4:
[0112] like Figure 6-7As shown, based on Example 1, Example 2 and Example 3, this embodiment specifically proposes a hardware-in-the-loop test platform based on dSPACE software according to the above embodiments, and builds a SOME / IP communication system of a hardware-in-the-loop test bench, and the steps are as follows:
[0113] According to step 401 to step 403 of embodiment 3, the hardware device is preliminarily configured, wherein the model software in the host computer is Simu link, and the management software is dSAPCE Control Desk and Configuration Desk. The SOME / IP communication system model can be designed based on Simu link, the model data can be modified and tested based on Control Desk, and the network configuration can be modified based on Configuration Desk.
[0114] Step 501: Based on Simu link, a SOME / IP communication system model can be designed to receive, parse and send network messages of the SOME / IP protocol;
[0115] Among them, SOME / IP network message data can be composed through Simu link, mainly defining the Header (including Service ID, Method ID / Event ID, Length, Client ID, Session ID, Protocol Version, Interface Version, Message Type, Return Code) and Payload, etc.
[0116] Step 502: This part of the data module connects to the Ethernet data transmission interface module in dSPACE Simu link, and loads the model into the management software and the dSPACE hardware-in-the-loop bench real-time machine.
[0117] Step 503: After modifying the relevant network configuration, the SOME / IP protocol data can be output.
[0118] Among them, the test bench Ethernet interface can be connected to the device under test, and the message with the protocol SOME / IP can be observed through the network packet capture software, and the relevant information of the message (address, port, etc.) is consistent with the network configuration information, which means that the hardware-in-the-loop test bench and the device under test can be connected normally. And when modifying the relevant network configuration, since the test bench interface output is standard Ethernet, the standard Ethernet is converted to vehicle Ethernet through Vector VN5620 combined with AEcab le 2Y wiring harness and connected to the device under test (ECU), ensuring that the hardware-in-the-loop SOME / IP system can communicate normally with the ECU.
[0119] The effect of steps 501 to 503 is to illustrate that the hardware-in-the-loop test bench SOME / IP system of the present invention can send network messages of the SOME / IP protocol.
[0120] Based on Example 1 and Example 2, the above-configured device is used to perform a test method based on SOME / IP, including:
[0121] Step 601: Define the OfferService in the SOME / IP protocol in the system model, and then the system receives the relevant SOME / IP protocol message fed back by the ECU, which is the request instruction.
[0122] Step 602: the system model data interception module intercepts and parses relevant fields to determine whether SubscribeEventGroup is received, and if so, generates an event trigger flag;
[0123] Step 603: the system model trigger flag module determines the SubscribeEventGroupACK message generation trigger flag value in the SOME / IP protocol according to the event trigger flag and the periodically obtained time trigger flag.
[0124] Wherein, the trigger flag value is generated, after the SubscriptEventGroup message is intercepted to obtain the required field value, the SOME / IP protocol test message is defined according to the required field value, and the SOME / IP protocol test message is integrated into the test data packet and sent to the test vehicle. If multiple SOME / IP protocol messages are obtained at the same time, the SOME / IP protocol test message data defined by the multiple SOME / IP protocol messages are integrated into the test data packet and sent to the test measurement. It should be noted that when judging the generation of the trigger flag value, even if multiple SOME / IP protocol messages are obtained, a certain segment of a message in a request instruction is usually used as the generation judgment of the trigger flag value, such as the SubscriptEventGroup message in this case, rather than multiple SOME / IP protocol messages generating the trigger flag value judgment at the same time; further, the other source SOME / IP data is I MU (Inertial Measurement Unit, Inertial Measurement Unit) node data, and after the relevant SOME / IP protocol data is interacted between the system and the ECU, the relevant I MU node of the ECU internal information is checked to be started. For example, in a real vehicle, if the queried OfferService sending cycle is 2S, the first setting value can be set to 2000, and further, the sending node, that is, the time of the second setting value can be confirmed to be 1000.
[0125] Step 604: According to the trigger flag value, a test data packet of the SOME / IP protocol is sent to the current vehicle.
[0126] The device under test may be an ECU.
[0127] Through the above method, the hardware-in-the-loop test platform based on dSPACE software and the device under test are completed, including direct SOME / IP protocol communication of the ECU.
[0128] Embodiment 5:
[0129] Based on Example 1, Example 2, and Example 3, the present invention proposes a computer-readable storage medium, including at least one execution instruction stored in the storage medium, and when the executable instruction is run on a communication test device or equipment such as any one of Examples 2 and 3, the device executes any one of the SOME / IP-based test methods in Example 1.
[0130] The executable instruction can be specifically used to enable the communication test device\equipment to perform the following operations:
[0131] Establish a connection with the current vehicle through the SOME / IP protocol to obtain the request instruction of the current vehicle;
[0132] Intercept and judge the request instruction, generate an event trigger mark, and obtain the time trigger mark generated by the system cycle;
[0133] Generate a trigger flag value according to the event trigger flag and the time trigger flag;
[0134] According to the trigger flag value, a test data packet is sent to the current vehicle.
[0135] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.
[0136] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.
[0137] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
[0138] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A vehicle communication test method based on SOME / IP, characterized in that: Applied to a communication test device, the method comprises: Establish a connection with the current vehicle through the SOME / IP protocol to obtain the request instruction of the current vehicle; The request instruction is intercepted and judged, an event trigger mark is generated, and a time trigger mark generated by a system period is obtained; Generate a trigger flag value according to the event trigger flag and the time trigger flag; According to the trigger flag value, a test data packet is sent to the current vehicle.
2. The vehicle communication test method based on SOME / IP according to claim 1, characterized in that: The request instruction includes a SOME / IP protocol message, and the test data packet includes a SOME / IP protocol test message.
3. The vehicle communication test method based on SOME / IP according to claim 2, characterized in that: Establish a connection with the current vehicle through the SOME / IP protocol to obtain the request instructions of the current vehicle; including: The Ethernet interfaces of the current vehicle and the communication test device are configured, and the request instruction of the current vehicle is obtained through the Ethernet interface.
4. The vehicle communication test method based on SOME / IP according to claim 2, characterized in that: The interception and judgment processing of the request instruction is performed to generate an event trigger mark, and a time trigger mark generated by a system period is obtained; including: The method comprises: extracting a required field value from the SOME / IP protocol message, and generating an event trigger flag according to the required field value; Obtain a first count value generated in a period, and divide the first count value by a preset first set value, and set the remainder obtained as a second count value; Determine whether the second count value is the same as a preset second set value, if so, generate a time trigger mark, otherwise no processing is performed; The first count value is accumulated in the timer according to a preset sampling period.
5. The vehicle communication test method based on SOME / IP according to claim 4, characterized in that: The step of generating a trigger flag value according to the event trigger flag and the time trigger flag comprises: If the event trigger flag and the time trigger flag are obtained at the same time, a trigger flag value is generated.
6. The vehicle communication test method based on SOME / IP according to claim 4, characterized in that: The step of sending a test data packet to the current vehicle according to the trigger flag value comprises: According to the trigger flag value, the required field value is defined to obtain a SOME / IP protocol test message, which is integrated into the test data packet and sent to the current vehicle.
7. A communication test device, characterized in that: include: The data receiving module is used to establish a connection with the current vehicle through the SOME / IP protocol and obtain the request instruction of the current vehicle; A data interception judgment module, used to perform interception judgment processing on the request instruction and generate an event triggering flag; An event trigger module, used to generate a trigger flag value according to the event trigger flag and the time trigger mark set by the timer module; A test data module is used to send a test data packet to the current vehicle.
8. A communication test device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the vehicle communication test method based on SOME / IP as described in any one of claims 1-6.
9. The communication test device according to claim 8, characterized in that: The communication test equipment includes a hardware-in-the-loop test bench, and the memory stores a SOME / IP model. The operation of the vehicle communication test method based on SOME / IP as described in any one of claims 1 to 6 is performed through the SOME / IP model.
10. A computer-readable storage medium, characterized in that: The storage medium includes at least one execution instruction stored therein, and when the executable instruction is executed on the communication test device\equipment as described in any one of claims 7 to 9, the device executes the SOME / IP-based test method as described in any one of claims 1 to 6.
Citation Information
Cited By
Method and device for testing vehicle abnormity, electronic equipment and storage medium
CN120583009A
