Gateway routing test system and application method thereof
Through the automated testing method of the gateway routing test system, the problem of long development cycle of gateway controller and prone to errors in testing is solved, and efficient performance testing of message routing and signal routing is realized, which improves testing efficiency and accuracy.
Patent Information
- Application Number
- CN202510546243.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, the development cycle of gateway controllers is lengthy, manual testing is prone to errors, and it is impossible to effectively take into account the performance test of message routing and signal routing.
The gateway routing test system is adopted, including the actuator, the gateway to be tested, the bus test tool and the host computer. The gateway controller is automatically tested through the routing information analysis module, the recorder module and the oscilloscope module to generate an analysis report to evaluate the rationality of message routing and signal routing.
It shortens the development cycle, reduces the possibility of errors, improves testing efficiency, and ensures the rationality and accuracy of software development of the gateway controller application layer.
Smart Images

Figure CN120474968A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network testing, and in particular, relates to a gateway routing testing system and an application method thereof. Background Art
[0002] The gateway controller is responsible for protocol conversion and data routing between different communication networks (such as CAN networks), ensuring the efficient and coordinated transmission of multiple signals in routing segments such as the power system, chassis control, and infotainment. Each routing segment is connected to several ECU (electronic control unit) controllers.
[0003] With the rapid development of the automotive electronics industry, in-vehicle bus networks are becoming increasingly complex. Gateways are needed to forward messages and signals between different network segments, enabling information exchange between them. To ensure that the gateway can forward relevant messages and signals in a timely and accurate manner, it is necessary to test and verify the gateway before installation.
[0004] At the same time, the entire vehicle communicates with multiple network segments via the CAN network. The CAN network carries a large amount of routing information, which can be divided into message routing and signal routing. The gateway controller implements the exchange of routing information between different network segments. After the gateway controller application layer software is developed, a reasonable and efficient verification method is required to test the rationality of message routing and signal routing.
[0005] Traditionally, OEMs install gateways on prototype vehicles or test benches, but most testing is done manually. Repeated testing during gateway software development results in lengthy development cycles and hinders project progress. Waiting for prototype testing delays project timelines, while manual bench testing is prone to errors.
[0006] To this end, the present invention proposes a gateway routing test system and an application method thereof. Summary of the Invention
[0007] The present invention aims to overcome the deficiencies of the prior art and proposes a gateway routing test system and its application method to achieve the following objectives: taking into account the performance testing of both message routing and signal routing, reducing the possibility of errors in the development phase, shortening the development cycle, and improving testing efficiency.
[0008] In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a gateway routing test system, the system includes an actuator, a gateway to be tested, a bus testing tool, and a host computer, wherein: the gateway to be tested includes a bus interface and a gateway controller, the actuator is connected to the gateway controller through the bus interface; the bus testing tool is connected to the bus interface; the host computer includes a routing information analysis module, a recorder module and an oscilloscope module, the routing information analysis module is connected to the recorder module, and the bus testing tool is connected to the oscilloscope module, the recorder module, and the routing information analysis module.
[0009] Preferably, the bus testing tool is a CAN bus testing tool.
[0010] This application proposes an application method of a gateway routing test system, which is applied to a message routing test and includes the following steps:
[0011] Step S11, obtaining the message routing table and importing it into the routing information analysis module;
[0012] Step S12: the routing information analysis module generates a test case according to the message routing table and tests the gateway to be tested through the bus test tool;
[0013] Step S13: The test results are sent to the recorder through the bus test tool for storage;
[0014] Step S14: the routing information analysis module obtains the test results stored in the recorder and generates an analysis report;
[0015] Step S15: Determine whether the analysis report meets the preset specifications; if so, end the test; if not, re-evaluate and adjust the gateway controller application layer software and then return to step S11.
[0016] Preferably, the message routing table includes attributes of the source network segment and the target network segment of the gateway to be tested, and the attributes include message name, ID, period, and network segment channel.
[0017] Preferably, the analysis report includes the attributes of the source network segment and target network segment of the gateway to be tested, the frame loss rate of each network segment, the average receiving delay of the source network segment, the average sending delay of the target network segment, and the maximum load rate of each network segment.
[0018] Preferably, the preset specifications include: the average sending delay of the target network segment does not exceed the average receiving delay of the source network segment under a preset ratio; the frame loss rate of each network segment is not greater than the preset frame loss rate threshold; the maximum load rate of each network segment does not exceed the preset load rate threshold.
[0019] At the same time, the present application also proposes an application method of the gateway routing test system, which is applied to the test of signal routing and includes the following steps:
[0020] Step S21: the execution mechanism sends the routing information of the source network segment to the gateway to be tested;
[0021] Step S22: the gateway to be tested processes the routing information of the source network segment to obtain the routing information of the target network segment and forwards it to the target network segment;
[0022] Step S23: the bus test tool obtains the routing information of the target network segment and sends it to the oscilloscope module for observation;
[0023] Step S24: determine whether the signal routing logic of the gateway to be tested complies with the forwarding logic required by the target network segment based on the observation results of the oscilloscope module; if so, end the test; if not, re-evaluate and adjust the gateway controller application layer software and return to step S22.
[0024] Preferably, the judgment conditions of step S24 include:
[0025] a. Whether the routing information of the target network segment meets the attribute requirements of the target network segment, the attribute requirements include message name, ID, period, and network segment channel;
[0026] b. Whether the routing information of the target network segment meets the requirements of the target network segment for flag bit configuration and flag bit arrangement during continuous transmission;
[0027] When both conditions a and b are satisfied, it is determined that the signal routing logic of the gateway to be tested complies with the forwarding logic required by the target network segment.
[0028] Preferably, in step S21, the routing information of the source network segment is also simulated by the routing information analysis module.
[0029] Preferably, the routing information of the source network segment simulated by the routing information analysis module must meet the following requirements at the same time:
[0030] The routing information of the simulated source network segment meets the attribute requirements of the source network segment, and the attribute requirements include message name, ID, period, and network segment channel;
[0031] The routing information of the simulated source network segment complies with the flag bit configuration of the source network segment and the flag bit arrangement requirements during continuous transmission.
[0032] The technical effects of the present invention are:
[0033] (1) The system structure of the present invention is simple and easy to implement. The routing information analysis module, recorder module, and oscilloscope module provided in the host computer are used to test and analyze the gateway to be tested. This is mainly used to verify the rationality and performance of the message routing and signal routing logic of the gateway controller application layer software development, thereby promptly discovering problems and ensuring the rationality of the gateway controller application layer software development.
[0034] (2) When testing message routing, the present invention quickly generates test cases through the routing information analysis module, thereby improving the reusability of the gateway routing test method; at the same time, by generating an analysis report, it quickly locates the unreasonable situations in the current test case and promptly feeds back to the software engineer to troubleshoot the gateway controller application layer software, thereby reducing the possibility of errors in the development stage, shortening the development cycle, greatly reducing the workload of the test engineer, and improving the test efficiency.
[0035] (3) When testing the signal routing, the present invention connects the actuator to the gateway to be tested or simulates sending a signal to the gateway to be tested, and uses the oscilloscope module to check whether the routing sequence of the signal routing sent by the gateway to be tested is required by the target network segment, thereby locating possible logical problems more quickly, shortening the application layer software development cycle, and improving work efficiency to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A structural diagram of a gateway routing test system provided by an embodiment of the present invention;
[0037] Figure 2 A flow chart of an application method of a gateway routing test system for message routing testing provided by an embodiment of the present invention;
[0038] Figure 3 This is a flow chart of an application method of a gateway routing test system for signal routing testing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The following is a further detailed description of the specific embodiments of the present invention through the description of the embodiments with reference to the accompanying drawings. The purpose is to help those skilled in the art have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention and to facilitate its implementation. It should be noted that the terms "first" and "second" described in this application are only used to facilitate the description of the technical solution to distinguish different components and are not intended to limit this application. To make the technical solution of the present invention clearer, the present invention is explained through the following embodiments.
[0040] The gateway's primary function is routing, which can be categorized into two types: message routing and signal routing. Message routing involves the gateway forwarding received messages directly to the designated network without processing them. Signal routing involves parsing messages, extracting the signals to be forwarded, then repackaging these signals and sending them to the designated network at a specified interval.
[0041] In order to perform rationality detection on the message routing and signal routing of the gateway, this embodiment proposes a gateway routing test system, such as Figure 1 As shown, a gateway routing test system includes an actuator, a gateway to be tested, a bus testing tool, and a host computer, wherein: the gateway to be tested includes a bus interface and a gateway controller, the actuator is connected to the gateway controller via the bus interface; the bus testing tool is connected to the bus interface; the host computer includes a routing information analysis module, a recorder module, and an oscilloscope module, the routing information analysis module is connected to the recorder module, and the bus testing tool is connected to the oscilloscope module, the recorder module, and the routing information analysis module. The gateway controller is indirectly connected to the host computer via the bus testing tool, that is, the gateway controller can communicate with the host computer via the bus testing tool to share the message routing table generated by the gateway controller application layer software with the routing information analysis module, the oscilloscope module, etc.
[0042] The entire system is simple and easy to implement. The routing information analysis module, recorder module, and oscilloscope module installed in the host computer are used to test and analyze the gateway under test. This is mainly used to verify the rationality and performance of the message routing and signal routing logic developed in the gateway controller application layer software, thereby promptly identifying problems and ensuring the rationality of the gateway controller application layer software development.
[0043] This embodiment is applied to a complete vehicle. ECUs (electronic control units) in a vehicle typically communicate data using a CAN network. Accordingly, the bus test tool utilizes a CAN bus test tool. CAN bus test tools, as a state-of-the-art technology, are widely used for complete vehicle CAN bus testing. They offer advantages such as high development, diverse testing capabilities, accurate signal detection, and ease of operation. Directly applying these tools to the system of this embodiment avoids secondary development and improves test efficiency and accuracy.
[0044] Based on the above-mentioned gateway routing test system, this embodiment first provides an application method of the gateway routing test system, which is applied to message routing test, such as Figure 2 As shown, the method includes the following steps:
[0045] Step S11: Obtain the message routing table and import it into the routing information analysis module.
[0046] The message routing table contains the attributes of the source and target network segments of the gateway under test, including the message name, ID, period, and network channel. The source network segment refers to the network segment to be routed, and the target network segment refers to the network segment to which the route is directed. Based on this message routing table, the bus interfaces of the gateway under test can use routing to transfer data between different devices.
[0047] Step S12: The routing information analysis module generates a test case based on the message routing table and tests the gateway under test using the bus test tool. After the test case is sent to the bus test tool, the bus test tool parses the test case to control each bus interface of the gateway under test (each bus interface represents a network segment) to perform message routing transmission according to the message routing table, thereby testing the message routing performance. During the test, the status of each bus interface is monitored and messages are collected as test results. The status includes load rate, delay, frame loss rate, etc.
[0048] Step S13: The test results are sent to the recorder module through the bus test tool for storage. The recorder module stores the collected messages and bus interface status in the form of logs for easy viewing by developers.
[0049] Step S14, the routing information analysis module obtains the test results stored in the recorder and generates an analysis report, that is, the routing information analysis module integrates and analyzes the test results, determines the required data according to the needs of software engineers, and lists them in the form of an analysis report, which is more intuitive and efficient.
[0050] The analysis report in this embodiment includes the attributes of the source and target network segments of the gateway under test, the frame loss rate of each network segment, the average receiving delay of the source network segment, the average sending delay of the target network segment, and the maximum load rate of each network segment. This data fully reflects the packet routing performance of the gateway under test and is a key indicator for verifying the rationality of the gateway controller application layer software development.
[0051] Step S15: Based on the analysis report, determine whether it meets preset specifications; if so, terminate the test; if not, re-evaluate and adjust the gateway controller application layer software before returning to step S11. The preset specifications include: the average sending delay of the target network segment does not exceed the average receiving delay of the source network segment at a preset ratio; the frame loss rate of each network segment does not exceed a preset frame loss rate threshold; and the maximum load rate of each network segment does not exceed a preset load rate threshold.
[0052] In this embodiment, the average transmission delay does not exceed 10% of the average reception delay; the frame loss rate does not exceed 2%; and the maximum network segment load factor does not exceed 70-75%. If these conditions are met, the gateway controller application layer software under test is reasonable, and the test ends. Otherwise, the gateway controller application layer software is re-evaluated and adjusted, and the process returns to step S11. In specific implementations, the preset values can be flexibly set based on actual needs.
[0053] When testing message routing, this embodiment uses a routing information analysis module to quickly generate test cases, thereby improving the reusability of the gateway routing test method. At the same time, by generating an analysis report, it quickly locates unreasonable situations in the current test case and provides timely feedback to software engineers to troubleshoot problems in the gateway controller application layer software, thereby reducing the possibility of errors in the development phase, shortening the development cycle, greatly reducing the workload of test engineers, and improving test efficiency.
[0054] At the same time, this embodiment also proposes an application method of the gateway routing test system, such as Figure 3 As shown, the method is applied to the test of signal routing, comprising the following steps:
[0055] Step S21: The actuator sends routing information of the source network segment to the gateway under test. The actuator comprises a vehicle-mounted component that can send messages to the source network segment of the gateway under test and can be recognized by the gateway under test. Connecting the actuator to the gateway under test simulates the vehicle's message sending logic and sends routing information of the source network segment to the gateway under test.
[0056] In step S22, the gateway under test processes the routing information of the source network segment to obtain routing information of the target network segment and forwards it to the target network segment. Signal routing testing requires the gateway to process routing information before sending it. Typically, the routing information of the source network segment is obtained through the bus interface of the receiving end and sent to the gateway controller for signal processing. After processing, the routing information of the target network segment is obtained and sent to the target network segment through the bus interface of the sending end.
[0057] In step S23, the bus test tool obtains the routing information of the target network segment and sends it to the oscilloscope module for observation. To detect the signal routing performance of the gateway under test, that is, whether the routing information of the target network segment obtained through signal processing meets the requirements, it is necessary to collect the routing information of the target network segment. In this embodiment, the oscilloscope module is used for collection and observation, which is more intuitive and easier to detect signal routing problems.
[0058] Step S24: Determine whether the signal routing logic of the gateway under test complies with the forwarding logic required by the target network segment based on the observation results of the oscilloscope module; if so, terminate the test; if not, re-evaluate and adjust the gateway controller application layer software before returning to step S22. Specifically, the conditions for determining whether the signal routing logic of the gateway under test complies with the forwarding logic required by the target network segment include:
[0059] a. Check whether the routing information of the target network segment meets the target network segment's attribute requirements, including the message name, ID, period, and network segment channel. Obviously, the processed routing information received by the target network segment must meet its attributes. If it does not, the target network segment may not receive the corresponding routing information, resulting in data loss and affecting subsequent data processing.
[0060] b. Whether the routing information of the target network segment meets the target network segment's requirements for flag bit configuration and flag bit arrangement during continuous transmission. The routing information of the target network segment involves a continuous routing sequence. In this case, it is necessary to understand which flag bits are configured to configure the routing sequence required by the target network segment and the order in which these flag bits are arranged in the routing sequence in order to make a judgment.
[0061] For example, the routing sequence sent by the actuator is A1 A1 A1 A1 A1; A1 represents a flag. The target network segment requires a routing sequence of B A2 A2 BBB; B represents a standby flag, and A2 represents the flag required by the target network segment. The gateway under test's role is to convert the routing sequence sent by the actuator. The converted routing sequence must have the same flag configuration and arrangement as the routing sequence required by the target network segment. Otherwise, the target network segment may not receive the corresponding routing information, resulting in data loss and affecting subsequent data processing.
[0062] Therefore, only when both conditions a and b are met can the signal routing logic of the gateway under test be determined to conform to the forwarding logic required by the target network segment. The target network segment's attribute requirements are obtained from the message routing table. The oscilloscope module is responsible for observing whether the signal routing flag configuration and flag bit arrangement requirements during continuous transmission meet the relevant requirements of the initial application layer software development.
[0063] Furthermore, in step S21 of this embodiment, in the event that the execution mechanism is unavailable, the routing information of the source network segment can also be simulated by the routing information analysis module, that is, the routing information analysis module simulates the execution mechanism and sends the routing information of the source network segment to the gateway under test. The simulated routing information of the source network segment must simultaneously meet the following requirements:
[0064] The routing information of the simulated source network segment meets the attribute requirements of the source network segment, and the attribute requirements include message name, ID, period, and network segment channel;
[0065] The simulated source network segment's routing information complies with the source segment's flag configuration and flag bit alignment requirements for continuous transmission. Similarly, the source segment's attribute requirements are obtained from the message routing table. The oscilloscope module is responsible for observing whether the signal routing's flag bit configuration and flag bit alignment requirements for continuous transmission meet the relevant requirements of the initial application layer software development.
[0066] In this embodiment, when testing signal routing, the actuator is connected to the gateway to be tested or a signal is simulated to be sent to the gateway to be tested. The oscilloscope module is used to check whether the routing sequence of the signal routing sent by the gateway to be tested is required by the target network segment, thereby locating possible logical problems more quickly, shortening the application layer software development cycle, and improving work efficiency to a certain extent.
[0067] The present invention has been described above with reference to the accompanying drawings. Obviously, the specific implementation of the present invention is not limited to the above-described method. Any non-substantial improvements made using the method concepts and technical solutions of the present invention, or any direct application of the above-described concepts and technical solutions to other situations without modification, fall within the scope of protection of the present invention.
Claims
1. A gateway routing test system, characterized by: The system includes an actuator, a gateway to be tested, a bus testing tool, and a host computer, wherein: the gateway to be tested includes a bus interface and a gateway controller, the actuator is connected to the gateway controller through the bus interface; the bus testing tool is connected to the bus interface; the host computer includes a routing information analysis module, a recorder module, and an oscilloscope module, the routing information analysis module is connected to the recorder module, and the bus testing tool is connected to the oscilloscope module, the recorder module, and the routing information analysis module.
2. An application method of the gateway routing test system according to claim 1, characterized in that: The bus test tool adopts a CAN bus test tool.
3. An application method of the gateway routing test system according to any one of claims 1-2, characterized in that: The method is applied to message routing testing and includes the following steps: Step S11, obtaining the message routing table and importing it into the routing information analysis module; Step S12: the routing information analysis module generates a test case according to the message routing table and tests the gateway to be tested through the bus test tool; Step S13: The test results are sent to the recorder through the bus test tool for storage; Step S14: the routing information analysis module obtains the test results stored in the recorder and generates an analysis report; Step S15: Determine whether the analysis report meets the preset specifications; if so, end the test; if not, re-evaluate and adjust the gateway controller application layer software and then return to step S11.
4. The application method of the gateway routing test system according to claim 3, characterized in that: The message routing table includes attributes of the source network segment and the target network segment of the gateway to be tested, and the attributes include message name, ID, period, and network segment channel.
5. The application method of the gateway routing test system according to claim 3 or 4, characterized in that: The analysis report includes the attributes of the source network segment and the target network segment of the gateway to be tested, the frame loss rate of each network segment, the average receiving delay of the source network segment, the average sending delay of the target network segment, and the maximum load rate of each network segment.
6. The application method of the gateway routing test system according to claim 5, characterized in that: The preset specifications include: the average sending delay of the target network segment does not exceed the average receiving delay of the source network segment under the preset ratio; the frame loss rate of each network segment does not exceed the preset frame loss rate threshold; the maximum load rate of each network segment does not exceed the preset load rate threshold.
7. An application method of the gateway routing test system according to any one of claims 1-2, characterized in that: The method is applied to the test of signal routing and comprises the following steps: Step S21: the execution mechanism sends the routing information of the source network segment to the gateway to be tested; Step S22: the gateway to be tested processes the routing information of the source network segment to obtain the routing information of the target network segment and forwards it to the target network segment; Step S23: the bus test tool obtains the routing information of the target network segment and sends it to the oscilloscope module for observation; Step S24: determine whether the signal routing logic of the gateway to be tested complies with the forwarding logic required by the target network segment based on the observation results of the oscilloscope module; if so, end the test; if not, re-evaluate and adjust the gateway controller application layer software and return to step S22.
8. The application method of the gateway routing test system according to claim 7, characterized in that: The judgment conditions of step S24 include: a. Whether the routing information of the target network segment meets the attribute requirements of the target network segment, the attribute requirements include message name, ID, period, and network segment channel; b. Whether the routing information of the target network segment meets the requirements of the target network segment for flag bit configuration and flag bit arrangement during continuous transmission; When both conditions a and b are satisfied, it is determined that the signal routing logic of the gateway to be tested complies with the forwarding logic required by the target network segment.
9. The application method of the gateway routing test system according to claim 7 or 8, characterized in that: In the step S21, the routing information of the source network segment is also simulated and obtained by the routing information analysis module.
10. The application method of the gateway routing test system according to claim 9, characterized in that: The routing information of the source network segment simulated by the routing information analysis module must meet the following requirements: The routing information of the simulated source network segment meets the attribute requirements of the source network segment, and the attribute requirements include message name, ID, period, and network segment channel; The routing information of the simulated source network segment complies with the flag bit configuration of the source network segment and the flag bit arrangement requirements during continuous transmission.