Method and system for testing application message routing function and storage medium

By generating simulated application messages and monitoring the CAN bus data of the gateway controller under test in real time, and comparing the forwarded application messages, the problem of low efficiency in gateway routing testing in the existing technology is solved, and efficient and accurate gateway routing testing is achieved.

CN120880944APending Publication Date: 2025-10-31FAW CAR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511147324.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing gateway routing tests are inefficient and lack accuracy, especially with the increased load on automotive CAN buses, making it difficult for testers to guarantee both accuracy and efficiency.

Method used

By generating simulation application messages, the CAN bus data of the gateway controller under test is monitored in real time. Based on the comparison between the simulation and the forwarded application messages, abnormal message forwarding is identified. Voltage information is obtained through the programmable power supply module to determine the working status of the gateway controller.

Benefits of technology

It realizes automated testing of gateway CAN bus application message routing function, improves testing efficiency and accuracy, simplifies technical architecture, and facilitates application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880944A_ABST
    Figure CN120880944A_ABST
Patent Text Reader

Abstract

The invention provides a method and system for testing an application message routing function and a storage medium, and the method comprises the steps: simulating an application message, needing to be routed, of a tested gateway controller, and generating a simulation application message; monitoring CAN bus data of the gateway controller to be tested in real time, and acquiring a forwarding application message of the gateway controller to be tested; and based on the simulation application message and the forwarding application message, determining a message forwarding abnormal condition of the tested gateway controller. According to the test method of the application message routing function, the dependence on manpower is reduced, and the test efficiency is improved; front and back dual-channel message analysis can be realized, so that the whole technical architecture is relatively simple and convenient to apply; according to the method, the simulation application message is generated, the CAN bus data of the gateway controller to be tested are monitored in real time, the message forwarding abnormal condition is determined based on the simulation application message and the forwarding application message, and compared with a manual comparison scheme, the method has higher accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of gateway routing testing technology, and more specifically, to a testing method, system, and storage medium for application message routing functions. Background Technology

[0002] With the rapid development of the automotive industry, various automotive domains, such as intelligent driving and infotainment, are gradually shifting towards automation and intelligence. Furthermore, the strong national promotion of vehicle electrification and the inclusion of new energy domains have further increased the load on the automotive CAN bus. As the core and hub of the vehicle controller, the gateway's inability to properly route application packets would be a catastrophic problem.

[0003] Existing gateway routing application message routing tests are inefficient and mainly rely on testers comparing message information before and after forwarding by the gateway controller. This raises concerns about accuracy, especially given the increasing load on automotive CAN buses. As the number of application messages that the gateway controller needs to forward surges, the workload for testers becomes increasingly heavy, making it difficult to guarantee both test accuracy and efficiency. Summary of the Invention

[0004] The purpose of this invention is to provide a testing method, system, and storage medium for application message routing functions, so as to solve at least one of the technical problems in the prior art that make it difficult to guarantee the accuracy and efficiency of application message routing testing.

[0005] To address the aforementioned technical problems, the first aspect of this invention provides a testing method for application message routing functionality, comprising: simulating application messages that the gateway controller under test needs to route, generating simulated application messages; monitoring the CAN bus data of the gateway controller under test in real time, acquiring the forwarded application messages of the gateway controller under test; and determining message forwarding anomalies of the gateway controller under test based on the simulated application messages and the forwarded application messages.

[0006] Further, based on the simulated application packets and the forwarded application packets, determining the packet forwarding anomaly of the gateway controller under test includes: comparing the simulated application packets and the forwarded application packets routed by the gateway controller under test, and determining the packet forwarding anomaly based on the comparison result.

[0007] Furthermore, the information in the simulated application message includes at least one of ID identifier, data length, data bytes, period, data payload, and timestamp; corresponding to the simulated application message, the information in the forwarded application message includes at least one of ID identifier, data length, data bytes, period, data payload, and timestamp.

[0008] Furthermore, after real-time monitoring of the CAN bus data of the gateway controller under test and obtaining the forwarded application messages of the gateway controller under test, the method further includes: performing information checks on the CAN bus data based on the imported routing table to determine whether the gateway controller under test forwards the application messages according to the routing table.

[0009] Furthermore, it also includes: acquiring the voltage information of the gateway controller under test; and determining the operating status of the gateway controller under test based on the voltage information.

[0010] Furthermore, determining the operating status of the gateway controller under test based on the voltage information includes: determining that the gateway controller under test is operating normally when the voltage information is within the normal voltage range; and determining that the gateway controller under test is operating abnormally when the voltage information is outside the normal voltage range.

[0011] Furthermore, the step of comparing the simulated application packet with the forwarded application packet routed by the gateway controller under test, and determining the packet forwarding anomaly based on the comparison result, includes: when the comparison result of the simulated application packet and the forwarded application packet is consistent, it is determined that the packet forwarding is not abnormal; when the comparison result of the simulated application packet and the forwarded application packet is inconsistent, it is determined that the packet forwarding is abnormal.

[0012] A second aspect of the present invention provides a test system for application message routing function, comprising: a gateway controller under test; a host computer for executing a test program; a simulation and data interaction module for responding to the test program to simulate application messages that the gateway controller under test needs to route, and generate simulated application messages; and for monitoring the CAN bus data of the gateway controller under test in real time to obtain the forwarded application messages of the gateway controller under test; and an inspection module for responding to the test program to determine message forwarding abnormalities of the gateway controller under test based on the simulated application messages and the forwarded application messages.

[0013] Furthermore, it also includes: a programmable power supply module, used to supply power to the gateway controller under test in response to the test program, and to feed back the voltage information of the gateway controller under test.

[0014] A third aspect of the present invention provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the test methods described above.

[0015] The testing method for application message routing function in this invention automates the testing of gateway CAN bus application message routing function, eliminating the need for manual comparison of message information before and after forwarding, thus improving testing efficiency. It enables dual-channel message parsing (generating simulated application messages to send to the gateway controller under test, and receiving forwarded application messages from the gateway controller under test), resulting in a simpler overall technical architecture and easier application. By generating simulated application messages and monitoring the CAN bus data of the gateway controller under test in real time, this invention determines message forwarding anomalies based on the simulated and forwarded application messages, achieving higher accuracy compared to manual comparison methods.

[0016] The application message routing function test system of this invention can implement the above-mentioned test method, thereby realizing automated testing of the gateway CAN bus application message routing function. It eliminates the need for manual comparison of message information before and after forwarding, improving test efficiency. The simulation and data interaction module can realize dual-channel message parsing (it can both generate simulated application messages and send them to the gateway controller under test, and receive and acquire forwarded application messages sent by the gateway controller under test), making the overall technical architecture relatively simple and easy to apply. This invention generates simulated application messages and monitors the CAN bus data of the gateway controller under test in real time. Then, the inspection module determines message forwarding anomalies based on the simulated application messages and forwarded application messages, which has higher accuracy compared to the manual comparison method.

[0017] In the storage medium of this invention, the computer program stored therein, when executed by a processor, can implement the above-mentioned testing method, thereby realizing automated testing of the gateway CAN bus application message routing function. This eliminates the need for manual comparison of message information before and after forwarding, improving testing efficiency. It enables dual-channel message parsing (generating simulated application messages to send to the gateway controller under test, and receiving forwarded application messages from the gateway controller under test), resulting in a simpler overall technical architecture and easier application. By generating simulated application messages and monitoring the CAN bus data of the gateway controller under test in real time, this invention determines message forwarding anomalies based on the simulated application messages and forwarded application messages, achieving higher accuracy compared to manual comparison methods. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram illustrating the steps of the test method for the application message routing function provided by the present invention;

[0020] Figure 2 A simplified structural diagram of the test system for application message routing function provided by this invention;

[0021] Figure 3 This is a logical diagram illustrating the testing method for the application message routing function provided by the present invention.

[0022] The above figures include the following reference numerals:

[0023] 1. Gateway controller under test; 2. Host computer; 3. Simulation and data interaction module; 4. Inspection module; 5. Programmable power supply module; 6. Report generation module. Detailed Implementation

[0024] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this disclosure will be apparent to those skilled in the art.

[0025] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present disclosure and, together with the general description of the disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.

[0026] These and other features of this disclosure will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0027] It should also be understood that although this disclosure has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this disclosure, which have the features described in the claims and are therefore all within the scope of protection defined herein.

[0028] The above and other aspects, features and advantages of this disclosure will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0029] Specific embodiments of this disclosure are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this disclosure, which may be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure this disclosure. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely to serve as the basis and representative basis for the claims to teach those skilled in the art to use this disclosure in a variety of substantially any suitable detailed structures.

[0030] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in still another embodiment,” all of which may refer to one or more of the same or different embodiments according to this disclosure.

[0031] The first aspect of this invention provides a testing method for application message routing functions. Preferably, this testing method is developed based on the CAPL language and combined with… Figure 1 As shown, it includes:

[0032] S100: Simulate the application packets that the gateway controller under test needs to route, and generate simulated application packets.

[0033] S200. Monitor the CAN bus data of the gateway controller under test in real time and obtain the forwarding application messages of the gateway controller under test.

[0034] S300. Based on the simulated application message and the forwarded application message, determine the abnormal message forwarding situation of the gateway controller under test.

[0035] Specifically, before step S100, the method further includes: supplying power to the gateway controller under test.

[0036] In this way, the gateway controller under test is powered on and off, meeting the prerequisites for starting the test. Furthermore, the gateway controller under test can be powered by a programmable power supply module, allowing the programmable power supply module to be controlled via a test program or other programs.

[0037] In step S100, the application packets that the gateway controller under test needs to route are simulated, and simulated application packets are generated. Here, the application packets required by the gateway controller under test can be simulated based on the imported routing table, and then the simulated application packets can be generated and sent to the gateway controller under test.

[0038] Furthermore, the information in the simulated application message includes at least one of ID identifier, data length, data bytes, period, data payload, and timestamp; corresponding to the simulated application message, the information in the forwarded application message includes at least one of ID identifier, data length, data bytes, period, data payload, and timestamp.

[0039] For example, the ID identifier is a unique identifier for a message, distinguishing messages of different types or origins; the data length is the number of bytes in the message; the data bytes are the actual data in each byte; the period is the time interval or frequency at which messages are sent in the network; the data payload is the specific data content carried in the message; and the timestamp records the time when the message was sent or received. Generally speaking, the information in the simulated application message should correspond one-to-one with the information in the forwarded application message. That is, if the simulated application message includes, for example, an ID identifier, the forwarded application message should also include an ID identifier.

[0040] This enables fully automated comparison and analysis of these key parameters, which can improve the accuracy and efficiency of application packet routing tests.

[0041] In step S200, the CAN bus data of the gateway controller under test is monitored in real time to obtain the forwarding application messages of the gateway controller under test.

[0042] Specifically, the CAN bus data of the gateway controller under test includes emulated application messages received by the gateway controller and forwarded application messages sent by the gateway controller. After receiving the emulated application messages, the gateway controller processes them to obtain the forwarded application messages for transmission. Monitoring the CAN bus data and obtaining the forwarded application messages of the gateway controller under test is crucial for using this data in subsequent steps.

[0043] Furthermore, after real-time monitoring of the CAN bus data of the gateway controller under test and obtaining the forwarded application messages of the gateway controller under test, the method further includes:

[0044] The CAN bus data is checked based on the imported routing table to determine whether the gateway controller under test forwards application messages according to the routing table.

[0045] Specifically, by identifying the application messages in the CAN bus data after routing by the gateway controller under test, it can be determined whether they meet the requirements of the routing table. If the requirements are met, it is determined that the gateway controller under test forwards the application messages according to the routing table; if the requirements are not met, it is determined that the gateway controller under test does not forward the application messages according to the routing table. The routing table typically specifies information about the application messages, such as the source subnet, destination subnet, FDF flag, data length, and data bytes. The information check specifically includes checking whether the subnet of the routed application message is the destination subnet specified in the routing table.

[0046] Preferably, the test method further includes:

[0047] Obtain the voltage information of the gateway controller under test;

[0048] The operating status of the gateway controller under test is determined based on the voltage information.

[0049] Specifically, voltage information can be obtained directly from power supply devices such as programmable power supply modules, and the operating status of the gateway controller under test can be determined by the specific value of the voltage information.

[0050] Furthermore, when the voltage information is within the normal voltage range, it is determined that the gateway controller under test is working normally;

[0051] When the voltage information is outside the normal voltage range, it is determined that the gateway controller under test is malfunctioning.

[0052] In this way, both the voltage signal and the bus signal of the gateway controller under test are collected, realizing cross-validation of the test results and improving the reliability of the test results.

[0053] In step S300, based on the simulated application message and the forwarded application message, the abnormal message forwarding situation of the gateway controller under test is determined.

[0054] The gateway controller under test receives simulated application packets and then sends forwarded application packets. Based on the simulated application packets and the forwarded application packets, it can be determined whether there are any abnormalities in the packet forwarding.

[0055] Specifically, step S300, based on the simulated application message and the forwarded application message, determines the message forwarding anomaly of the gateway controller under test, including:

[0056] The simulated application message is compared with the forwarded application message routed by the gateway controller under test.

[0057] For example, the information in the simulation application message includes the first ID identifier, the first data length, the first data byte, the first period, etc., while the information in the forwarded application message includes the second ID identifier, the second data length, the second data byte, the second period, etc. By comparing the information in the simulation application message and the information in the forwarded application message one by one, the abnormal situation of message forwarding can be determined.

[0058] Furthermore, the comparison between the simulated application packet and the forwarded application packet routed by the gateway controller under test, and the determination of packet forwarding anomalies based on the comparison result, includes:

[0059] When the comparison results of the simulated application message and the forwarded application message are consistent, it is determined that there is no abnormality in the message forwarding;

[0060] When the comparison results between the simulated application message and the forwarded application message are inconsistent, it is determined that an anomaly has occurred in message forwarding.

[0061] Specifically, the information in the simulation application message includes ID identifier, data length, data bytes, period, data payload, and timestamp. Correspondingly, the information in the forwarded application message also includes ID identifier, data length, data bytes, period, data payload, and timestamp. These pieces of information are compared one by one to determine if they are consistent. If the comparison results are consistent, it can be determined that the message forwarding is not abnormal; if the comparison results are inconsistent, it can be determined that the message forwarding is abnormal.

[0062] Furthermore, the testing method also includes: summarizing the information in the simulated application message, the information in the forwarded application message, the comparison results of the simulated application message and the forwarded application message, and the results of the message forwarding anomaly to generate a test report.

[0063] Specifically, the test report can summarize the above-mentioned application message information, comparison results, and results of abnormal message forwarding, so as to help test engineers analyze test data, locate the time point of failure, determine the cause of failure, and provide assistance.

[0064] Furthermore, the testing methods also include:

[0065] The test report is generated by summarizing the voltage information and operating status of the gateway controller under test.

[0066] Specifically, voltage information can be obtained directly from power supply devices such as programmable power supply modules, and the operating status of the gateway controller under test can be determined by the specific value of the voltage information.

[0067] For example, when the voltage information is within the normal voltage range, it is determined that the gateway controller under test is working normally;

[0068] When the voltage information is outside the normal voltage range, it is determined that the gateway controller under test is malfunctioning.

[0069] In this way, both the voltage signal and the bus signal of the gateway controller under test are collected, realizing cross-validation of the test results, improving the reliability of the test results, and making it easier for test engineers to judge the test results.

[0070] The testing method for application message routing function in this invention automates the testing of gateway CAN bus application message routing function, eliminating the need for manual comparison of message information before and after forwarding, thus improving testing efficiency. It enables dual-channel message parsing (generating simulated application messages to send to the gateway controller under test, and receiving forwarded application messages from the gateway controller under test), resulting in a simpler overall technical architecture and easier application. By generating simulated application messages and monitoring the CAN bus data of the gateway controller under test in real time, this invention determines message forwarding anomalies based on the simulated and forwarded application messages, achieving higher accuracy compared to manual comparison methods.

[0071] The second aspect of this invention provides a test system for applying message routing functionality, combined with Figure 2 As shown, it includes:

[0072] Gateway controller under test 1;

[0073] Host computer 2 is used to execute the test program;

[0074] The simulation and data interaction module 3 is used to respond to the test program to simulate the application messages that the gateway controller under test 1 needs to route, generate simulated application messages, and monitor the CAN bus data of the gateway controller under test 1 in real time to obtain the forwarded application messages of the gateway controller under test 1.

[0075] Inspection module 4 is used in response to the test program to determine the packet forwarding anomaly of the gateway controller 1 under test based on the simulated application packet and the forwarded application packet.

[0076] Specifically, the gateway controller under test (DUT) 1 is the gateway controller whose routing function needs to be verified; the host computer 2 can be a computer, which stores the test program and can be executed by the processor; the simulation and data interaction module 3 can be connected to the CAN bus of the DUT 1 via a wiring harness interface. When the host computer 2 starts running the test program, the simulation and data interaction module 3 simulates the application messages that the DUT 1 needs to route, generates simulated application messages, and sends the simulated application messages to the DUT 1. At the same time, it also monitors the CAN bus data of the DUT 1 in real time (equivalent to the simulation and data interaction module 3 also receiving the forwarded application messages sent by the DUT 1). The CAN bus data includes the DUT 1's... The device 1 receives the simulated application message and sends the forwarded application message (the information in the simulated application message includes at least one of ID identifier, data byte, data length, period, data payload and timestamp; corresponding to the simulated application message, the information in the forwarded application message includes at least one of ID identifier, data length, data byte, period, data payload and timestamp); the inspection module 4 can be connected to the host computer 2 via a wiring harness. When the host computer 2 starts running the test program, the inspection module 4 can perform certain calculations based on the simulated application message and the forwarded application message (for example, comparing the simulated application message and the forwarded application message after routing by the gateway controller 1 under test, and determining the message forwarding anomaly based on the comparison result), and determine the message forwarding anomaly of the gateway controller 1 under test.

[0077] Furthermore, the testing system also includes:

[0078] The programmable power supply module 5 is used to supply power to the gateway controller 1 under test in response to the test program, and to feed back the voltage information of the gateway controller 1 under test.

[0079] Specifically, when the host computer 2 starts running the test program, the programmable power supply module 5 supplies power according to the settings of the test program, so that the gateway controller 1 under test is powered on and off.

[0080] Furthermore, the testing system also includes:

[0081] The report generation module 6 is used to summarize the information in the simulated application message, the information in the forwarded application message, the comparison results of the simulated application message and the forwarded application message, and the results of the message forwarding anomaly to generate a test report.

[0082] In this way, the testing system can summarize the above results into a test report for test engineers to review.

[0083] Preferably, the programmable power supply module 5 is also used to provide voltage information so that the host computer 2 can obtain the voltage information;

[0084] The inspection module 4 is also used to determine the operating status of the gateway controller under test based on the voltage information in response to the test procedure;

[0085] The report generation module 6 is also used to summarize the voltage information and operating status results of the tested gateway controller to generate the test report.

[0086] In this way, both the voltage signal and the bus signal of the gateway controller under test are collected, realizing cross-validation of the test results, improving the reliability of the test results, and making it easier for test engineers to judge the test results.

[0087] Combination Figure 2 and Figure 3 As shown, after the host computer in the test system starts running the test program, it achieves... Figure 3 The steps in the process.

[0088] Specifically, when the comparison results of the simulated application message and the forwarded application message are consistent, it is determined that there is no abnormality in the message forwarding;

[0089] When the comparison results between the simulated application message and the forwarded application message are inconsistent, it is determined that an anomaly has occurred in message forwarding.

[0090] Once it is confirmed that there are no abnormalities in message forwarding, the test engineer can summarize the relevant information (including the application message information, comparison results, results of message forwarding anomalies, voltage information, operating status, etc.) to generate a qualified report (i.e., the test report conclusion is qualified) as needed. Once it is confirmed that there are abnormalities in message forwarding, the test engineer can summarize the relevant information (including the application message information, comparison results, results of message forwarding anomalies, voltage information, operating status, etc.) to generate a unqualified report (i.e., the test report conclusion is unqualified) as needed.

[0091] The application message routing function test system of this invention can implement the above-mentioned test method, thereby realizing automated testing of the gateway CAN bus application message routing function. It eliminates the need for manual comparison of message information before and after forwarding, improving test efficiency. The simulation and data interaction module 3 can realize dual-channel message parsing (it can generate simulated application messages and send them to the gateway controller under test, and it can also receive and acquire forwarded application messages sent by the gateway controller under test), making the overall technical architecture simple and easy to apply. This invention generates simulated application messages and monitors the CAN bus data of the gateway controller under test in real time. Then, the inspection module 4 determines message forwarding anomalies based on the simulated application messages and forwarded application messages. Compared with the manual comparison method, this method has higher accuracy.

[0092] A third aspect of the present invention provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described test methods, including at least:

[0093] S100, Generate simulation application message;

[0094] S200. Monitor and save the CAN bus data of the gateway controller under test in real time, wherein the CAN bus data includes the simulated application messages received by the gateway controller under test and the forwarded application messages sent by the gateway controller under test.

[0095] S300. Based on the comparison between the simulated application message and the forwarded application message, an abnormal message forwarding situation is determined.

[0096] In the storage medium of this invention, the computer program stored therein, when executed by a processor, can implement the above-mentioned testing method, thereby realizing automated testing of the gateway CAN bus application message routing function. This eliminates the need for manual comparison of message information before and after forwarding, improving testing efficiency. It enables dual-channel message parsing (generating simulated application messages to send to the gateway controller under test, and receiving forwarded application messages from the gateway controller under test), resulting in a simpler overall technical architecture and easier application. By generating simulated application messages and monitoring the CAN bus data of the gateway controller under test in real time, this invention determines message forwarding anomalies based on the simulated application messages and forwarded application messages, achieving higher accuracy compared to manual comparison methods.

[0097] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0098] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0099] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0100] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0101] If the integrated module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-described embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various motor torque control method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0102] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A test method for applying message routing functionality, characterized in that, include: Simulate the application packets that the gateway controller under test needs to route, and generate simulated application packets. Real-time monitoring of the CAN bus data of the gateway controller under test, and acquisition of the forwarded application messages of the gateway controller under test; Based on the simulated application messages and the forwarded application messages, the abnormal message forwarding situation of the gateway controller under test is determined.

2. The test method according to claim 1, characterized in that, Based on the simulated application packets and the forwarded application packets, determine the packet forwarding anomalies of the gateway controller under test, including: The simulated application packets are compared with the forwarded application packets routed by the gateway controller under test, and the abnormal packet forwarding situation is determined based on the comparison results.

3. The test method according to claim 2, characterized in that, The information in the simulated application message includes at least one of ID identifier, data length, data bytes, period, data payload, and timestamp; corresponding to the simulated application message, the information in the forwarded application message includes at least one of ID identifier, data length, data bytes, period, data payload, and timestamp.

4. The test method according to claim 1, characterized in that, After real-time monitoring of the CAN bus data of the gateway controller under test and obtaining the forwarded application messages of the gateway controller under test, the method further includes: The CAN bus data is checked based on the imported routing table to determine whether the gateway controller under test forwards application messages according to the routing table.

5. The test method according to claim 1, characterized in that, Also includes: Obtain the voltage information of the gateway controller under test; The operating status of the gateway controller under test is determined based on the voltage information.

6. The test method according to claim 5, characterized in that, The method of determining the operating status of the gateway controller under test based on the voltage information includes: When the voltage information is within the normal voltage range, it is determined that the gateway controller under test is working normally; When the voltage information is outside the normal voltage range, it is determined that the gateway controller under test is malfunctioning.

7. The test method according to claim 2, characterized in that, The step of comparing the simulated application packets with the forwarded application packets routed by the gateway controller under test, and determining the packet forwarding anomaly based on the comparison result, includes: When the comparison results of the simulated application message and the forwarded application message are consistent, it is determined that there is no abnormality in the message forwarding; When the comparison results between the simulated application message and the forwarded application message are inconsistent, it is determined that an anomaly has occurred in message forwarding.

8. A test system for applying message routing functionality, characterized in that, include: The gateway controller under test; The host computer is used to execute the test program; The simulation and data interaction module is used to respond to the test program to simulate the application messages that the gateway controller under test needs to route, generate simulated application messages, and monitor the CAN bus data of the gateway controller under test in real time to obtain the forwarded application messages of the gateway controller under test. The inspection module is used to respond to the test program to determine the packet forwarding anomaly of the gateway controller under test based on the simulated application packets and the forwarded application packets.

9. The testing system according to claim 8, characterized in that, Also includes: The programmable power supply module is used to supply power to the gateway controller under test in response to the test program, and to provide feedback on the voltage information of the gateway controller under test.

10. A storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the test method according to any one of claims 1 to 7.