CN111343051A - Message routing test method, device and storage medium - Google Patents

Message routing test method, device and storage medium Download PDF

Info

Publication number
CN111343051A
CN111343051A CN202010146521.3A CN202010146521A CN111343051A CN 111343051 A CN111343051 A CN 111343051A CN 202010146521 A CN202010146521 A CN 202010146521A CN 111343051 A CN111343051 A CN 111343051A
Authority
CN
China
Prior art keywords
message
target
bus
routing
gateway
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010146521.3A
Other languages
Chinese (zh)
Inventor
李玉发
李长龙
孙琦
汤利顺
刘丽敏
赵萌
边泽宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FAW Group Corp
Original Assignee
FAW Group Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FAW Group Corp filed Critical FAW Group Corp
Priority to CN202010146521.3A priority Critical patent/CN111343051A/en
Publication of CN111343051A publication Critical patent/CN111343051A/en
Priority to PCT/CN2021/079319 priority patent/WO2021175314A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Abstract

The invention discloses a message routing test method, a message routing test device and a storage medium. The method comprises the following steps: acquiring a message identifier to determine a target message meeting the test requirement; sequentially sending the target message to a gateway through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway; judging whether the target message is received through other CAN buses, and generating a routing table according to the judgment result; and determining the message routing test result of the gateway according to the routing table, realizing the generation of the routing table by a self-learning method, and determining whether the message routing function of the gateway is abnormal or not according to the generated routing table, so that the problem of test omission in the related technology can be avoided, and the accuracy and the comprehensiveness of the message routing test are improved.

Description

Message routing test method, device and storage medium
Technical Field
The embodiment of the invention relates to a test technology, in particular to a message routing test method, a message routing test device and a storage medium.
Background
With the rapid development of the automotive electronics industry, the vehicle bus network is more and more complex, and a hybrid multi-path bus network is often adopted to develop an electronic and electrical architecture. And the gateways are required to forward messages and signals among different network segments, so that information interaction among different network segments is realized. In order to ensure that the gateway can correctly forward the relevant messages and signals in time, the gateway needs to be tested and verified.
In the gateway routing test process in the related art, each routing record in the message routing table is tested one by one according to the message routing table of the gateway so as to test the routing correctness. The inventor finds out that the message routing test scheme of the related technology has the problem of missing detection in the following conditions in the process of realizing the invention: firstly, a message sent from a CAN (Controller area network) bus is routed to a CAN bus that should not be routed through a gateway; second, there is a possibility that messages that should not be routed are routed by the gateway to other CAN buses. With the application of the vehicle-mounted Ethernet, the vehicle-mounted information security becomes extremely important, and the existence of the missed detection problem brings great loopholes to the vehicle-mounted information security.
Disclosure of Invention
The invention provides a message routing test method, a message routing test device and a storage medium, which can improve the message routing test scheme of the related technology and solve the problem that the safety of vehicle-mounted information is influenced due to missing detection.
In a first aspect, an embodiment of the present invention provides a message routing test method, including:
acquiring a message identifier to determine a target message meeting the test requirement;
sequentially sending the target message to a gateway through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway;
judging whether the target message is received through other CAN buses, and generating a routing table according to the judgment result, wherein the other CAN buses are the CAN buses connected with the gateway except the CAN bus for sending the target message;
and determining a message routing test result of the gateway according to the routing table.
Optionally, the obtaining of the packet identifier to determine the target packet meeting the test requirement includes:
acquiring a message identifier;
judging whether the message identification is in the identification range of the test requirement;
and if so, acquiring a target message corresponding to the message identifier.
Optionally, the sending the target packet to the gateway sequentially through one of the controller area network CAN buses includes:
determining a Control Area Network (CAN) bus for sending the target message according to the priority sequence;
and sending the target message to a gateway one by one through the determined CAN bus.
Optionally, the determining whether the target packet is received through another CAN bus, and generating a routing table according to a determination result includes:
judging whether the target message is received through each other CAN bus one by one;
and if so, generating a routing table according to the other CAN buses receiving the target message, the CAN bus sending the target message and the message identifier of the target message.
Optionally, the generating a routing table according to the other CAN buses that receive the target packet, the CAN bus that sends the target packet, and the packet identifier of the target packet includes:
predefining a table structure of a routing table, and generating an empty routing table according to the table structure;
generating a routing record according to the other CAN buses which receive the target message, the CAN bus which sends the target message and the message identifier of the target message;
adding the routing record to the routing table.
Optionally, before determining, one by one, whether the target packet is received through each of the other CAN buses, the method further includes:
and acquiring the target message sent in the CAN bus clock period with the set multiple on the CAN bus.
Optionally, the determining, one by one, whether the target packet is received through each of the other CAN buses includes:
determining any one message in the target messages as a current message;
and respectively judging whether the current message is received through each other CAN bus.
Optionally, determining a message routing test result of the gateway according to the routing table includes:
acquiring a message routing table of the gateway;
and when the generated routing table is inconsistent with the message routing table, determining that the routing function of the gateway is abnormal.
In a second aspect, an embodiment of the present invention further provides a device for testing a packet route, where the device includes:
the message acquisition module is used for acquiring the message identifier and determining a target message meeting the test requirement;
the message sending module is used for sending the target message to a gateway sequentially through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway;
the routing table generation module is used for judging whether the target message is received through other CAN buses or not and generating a routing table according to the judgment result, wherein the other CAN buses are the CAN buses connected with the gateway except the CAN bus for sending the target message;
and the test result determining module is used for determining the message routing test result of the gateway according to the routing table.
Optionally, the message obtaining module is specifically configured to:
acquiring a message identifier;
judging whether the message identification is in the identification range of the test requirement;
and if so, acquiring a target message corresponding to the message identifier.
Optionally, the message sending module is specifically configured to:
determining a Control Area Network (CAN) bus for sending the target message according to the priority sequence;
and sending the target message to a gateway one by one through the determined CAN bus.
Optionally, the routing table generating module includes:
the message judgment submodule is used for judging whether the target message is received through each other CAN bus one by one;
and the routing table generation submodule is used for generating a routing table according to the other CAN buses which receive the target message, the CAN bus which sends the target message and the message identifier of the target message if the target message is received.
Optionally, the routing table generating sub-module is specifically configured to:
predefining a table structure of a routing table, and generating an empty routing table according to the table structure;
generating a routing record according to the other CAN buses which receive the target message, the CAN bus which sends the target message and the message identifier of the target message;
adding the routing record to the routing table.
Optionally, the method further includes:
and the message receiving module is used for acquiring the target message sent in a CAN bus clock period with a set multiple on the CAN bus before judging whether the target message is received by each other CAN bus one by one.
Optionally, the message judgment sub-module is specifically configured to:
determining any one message in the target messages as a current message;
and respectively judging whether the current message is received through each other CAN bus.
Optionally, the test result determining module is specifically configured to:
acquiring a message routing table of the gateway;
and when the generated routing table is inconsistent with the message routing table, determining that the routing function of the gateway is abnormal.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the message routing test method according to any embodiment of the present invention.
The embodiment of the invention provides a message routing test scheme, which comprises the steps of determining a target message meeting test requirements by acquiring a message identifier; sequentially sending the target message to a gateway through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway; judging whether the target message is received through other CAN buses, and generating a routing table according to the judgment result; and determining a message routing test result of the gateway according to the routing table. By executing the embodiment of the invention, the generation of the routing table by the self-learning method is realized, and the generated routing table is used for determining whether the message routing function of the gateway is abnormal or not, so that the problem of test omission in the related technology can be avoided, and the accuracy and the comprehensiveness of the message routing test are improved.
Drawings
Fig. 1 is a flowchart of a method for testing a message routing according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating connection between a test device and a gateway in a message routing test method according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for testing a message route according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for determining a routing packet in a message routing test method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a message routing test apparatus according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a method for testing a message route according to an embodiment of the present invention, where the embodiment is applicable to a message route test scenario of a motor vehicle gateway, and the method may be executed by a message route testing apparatus, and the apparatus may be implemented by software and/or hardware. As shown in fig. 1, the method includes:
and step 110, obtaining the message identification to determine the target message meeting the test requirement.
The packet identifier is information for identifying a packet, and may be, for example, a packet identifier or referred to as a packet ID.
In the embodiment of the invention, the test requirement is to test by adopting the message with the message identifier within a specific range, and the test is not carried out by using the message with the message identifier beyond the specific range. The message with the message identifier in the specific range is called a target message. Wherein, the specific range is a numerical range set according to the test requirement.
Illustratively, a message identifier is obtained; judging whether the message identification is in the identification range of the test requirement; if yes, the target message corresponding to the message identification is obtained. If the message identification exceeds the identification range of the test requirement, the test is ended. It should be noted that, it is determined one by one whether the packet is a target packet, if yes, the current target packet is sent, 1 is accumulated on the basis of the packet ID of the current target packet to obtain a new packet ID, whether the new packet ID is within the identification range required by the test is determined, if yes, the packet corresponding to the new packet ID is determined to be the target packet, the target packet is sent, and the above steps are repeated until the packet ID is not within the identification range required by the test.
And step 120, sequentially sending the target message to a gateway through one of the Controller Area Network (CAN) buses, so as to route the target message to the corresponding CAN bus through the gateway.
Fig. 2 is a schematic diagram illustrating a connection between a test device and a gateway in a message routing test method according to an embodiment of the present invention. As shown in fig. 2, the test equipment and the gateway are connected through a plurality of CAN buses. The type of the CAN bus between the test device and the gateway is not particularly limited in the embodiments of the present invention, and may include, for example, a power bus, a vehicle body bus, an information bus, a ground bus, and a driving assistance bus. One of the power bus, the vehicle body bus, the information bus, the ground bus and the driving auxiliary bus CAN be sequentially selected according to a set sequence to send a target message to the gateway, so that the target message is routed to the corresponding CAN bus through the gateway.
Exemplarily, a Control Area Network (CAN) bus for transmitting the target message is determined according to the priority sequence; and sending target messages to a gateway one by one through the determined CAN buses so as to route the target messages to the corresponding CAN buses through the gateway. The CAN bus that sends the target message within a certain time period may be used as the source bus. The priority order may be specified by a tester, or determined according to the rate of the bus, or determined according to the importance of data transmitted on the bus, or the like.
It should be noted that, in the message routing test process, in order to test the message comprehensively and avoid omission, one of all the CAN buses is sequentially controlled to be used as a source bus to send a target message.
And step 130, judging whether the target message is received through other CAN buses, and generating a routing table according to the judgment result.
And the other CAN buses are connected with the gateway except the CAN bus for sending the target message. Referring to fig. 2, if the target message is transmitted through the power bus, the body bus, the information bus, the floor bus, and the driving assistance bus are all other buses.
Illustratively, all target messages received within a CAN bus clock period of a set multiple on a CAN bus are acquired. Judging whether the target message is received through other CAN buses one by one; and if so, generating a routing table according to the other CAN buses receiving the target message, the CAN bus sending the target message and the message identifier of the target message.
Optionally, the manner of generating the routing table may be to pre-define a table structure of the routing table, and generate an empty routing table according to the table structure; generating a routing record according to the other CAN buses which receive the target message, the CAN bus which sends the target message and the message identifier of the target message; adding the routing record to the routing table.
The source bus continuously sends the target message, the target message is routed to the corresponding CAN bus through the gateway, and then the target message is transmitted back to the test equipment. The test equipment can periodically acquire the target message within a period of time for testing. For example, all target messages sent through the CAN bus in ten times of the bus period are acquired, and the target message is received by which CAN bus according to the messages received by other CAN buses in the same time period. For example, referring to fig. 2, assuming that a target message is sent by a power bus, for any target message sent in ten times of bus cycles, it is first determined whether the target message is received through a body bus, if so, the body bus is used as a target domain, the power bus is used as a source domain, a routing record is determined according to a message ID of the target message, the source domain and the target domain, and the routing record is recorded in a routing table. And then, judging whether the target message is received through the information bus, and if not, continuously judging other CAN buses. According to the method, whether the target message is received through other CAN buses is judged respectively, if yes, the corresponding CAN bus is used as a target domain, the power bus is used as a source domain, a route record is determined according to the message ID, the source domain and the target domain of the target message, and the route record is recorded into a route table.
Then, the vehicle body bus, the information bus, the ground bus and the driving auxiliary bus are respectively used as source buses, and whether the target message is received through other CAN buses is judged in a similar mode. And then, generating a routing table according to the message ID, the source domain and the target domain of the target message.
And step 140, determining a message routing test result of the gateway according to the routing table.
Illustratively, a message routing table of a gateway is obtained; and when the generated routing table is inconsistent with the message routing table, determining that the routing function of the gateway is abnormal. The message routing table of the gateway is designed by designers according to the gateway function, the message routing table is arranged in the gateway, and the gateway determines the routing path of the message through the message routing table.
The routing table generated by the method of the invention is compared with the message routing table in the gateway, if the routing table and the message routing table are not consistent, the routing function of the gateway is abnormal. Wherein the reason for the dysfunction includes at least one of the following conditions:
the gateway routes the message which should not be routed;
the message is routed to the CAN bus which is not to be routed by the gateway;
the route is broken.
If the routing table generated by the method of the present invention contains the routing record of the message ID which is not contained in the message routing table, it indicates that the gateway has routed the message which should not be routed.
For the messages with the same message ID and the same source domain, if the target domain in the routing table generated by the method of the invention is different from the target domain in the message routing table, the gateway routes the message to the CAN bus which is not to be routed.
If the route record in the route table generated by the method of the invention is less than the route record in the message route table, the disconnection of part of the route is indicated.
It can be understood that the above listed routing function abnormality is only a practical one, and is not limited, and practical applications may include more routing function abnormality situations, and the routing function abnormality situations may be determined by comparing the generated routing table with the message routing table in the gateway.
According to the technical scheme of the embodiment, the target message meeting the test requirement is determined by acquiring the message identifier; sequentially sending the target message to a gateway through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway; judging whether the target message is received through other CAN buses, and generating a routing table according to the judgment result; and determining a message routing test result of the gateway according to the routing table. By executing the embodiment of the invention, the generation of the routing table by the self-learning method is realized, and the generated routing table is used for determining whether the message routing function of the gateway is abnormal or not, so that the problem of test omission in the related technology can be avoided, and the accuracy and the comprehensiveness of the message routing test are improved.
Fig. 3 is a flowchart of another method for testing a message routing according to an embodiment of the present invention, and as shown in fig. 3, the method includes:
step 310, begin.
Step 320, obtaining the message ID.
And 330, judging whether the message ID is in the identification range required by the test, if so, executing the step 340, otherwise, executing the step 380.
It should be noted that, the message whose message ID is within the identification range of the test requirement is determined as the target message.
And step 340, sequentially sending the target message corresponding to the message ID to a gateway through one of the CAN buses.
And 350, receiving a target message routed by the gateway, and judging whether the received target message is a routing message, if so, executing the step 360, otherwise, executing the step 370.
In the embodiment of the invention, if the target message sent by the source bus is received by other CAN buses, the target message is a routing message.
Step 360, determining a routing record, recording the routing record into a routing table, and executing step 370.
Illustratively, a CAN bus receiving a target message is used as a target domain, a CAN bus sending the target message is used as a source domain, a routing record is determined according to a message ID of the target message, the source domain and the target domain, and the routing record is recorded into a routing table. Assuming that a target message sent by a source bus (CAN1) is routed to 2 CAN buses (CAN3 and CAN5), two corresponding routing records are determined and recorded to a routing table respectively.
Table 1 is a routing table
Message ID Source domain Target domain
1 CAN1 CAN3
1 CAN1 CAN5
…… …… ……
Step 370, adding 1 to the message identifier, and executing step 320.
And step 380, ending.
Fig. 4 is a flowchart of a method for determining a routing packet in a packet routing test method according to an embodiment of the present invention. As shown in fig. 4, the method includes:
step 410, begin.
And step 420, acquiring all target messages sent by the source bus in the CAN bus clock period with the set multiple.
The target message comprises a routing message and a non-routing message.
And step 430, judging whether the CAN bus to be detected is the CAN bus needing to be judged, if so, executing step 440, otherwise, executing step 470.
It should be noted that exactly one of the other CAN buses is used as the CAN bus to be detected.
And taking other buses different from the CAN bus which currently sends the target message as the CAN bus which needs to be judged.
Step 440, judging whether the CAN bus to be detected contains the target message, if so, executing step 450, otherwise, executing step 460.
For example, messages received through the CAN bus to be detected are acquired, and any one of the messages is sequentially acquired as a current message. And comparing the current message received through the CAN bus to be detected with the target message sent by the source bus, and if the current message is consistent with the target message sent by the source bus, determining that the target message is received through the CAN bus to be detected, namely determining that the target message is contained on the CAN bus to be detected.
Step 450, determining that the current message is a routing message, determining a routing record according to the current message, recording the routing record into a routing table, and executing step 460.
And determining that the current message (namely the target message) is a routing message as the target message sent by the source bus is received by the CAN bus to be detected. And determining a routing record according to the message ID of the target message, the source bus and the CAN bus to be detected. Optionally, an Excel format and a table structure are predefined, and the table structure includes a packet ID, a routing table of a source domain and a routing table of a target domain. The determined route is then recorded into the defined routing table.
Step 460, acquiring the message on any one of the other CAN buses, and executing step 430.
And step 470, ending.
Fig. 5 is a schematic structural diagram of a message routing test apparatus according to an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware, and may avoid a problem of missing test by executing a message routing test method.
As shown in fig. 5, the apparatus includes:
a message obtaining module 510, configured to obtain a message identifier and determine a target message meeting a test requirement;
a message sending module 520, configured to send the target message to a gateway sequentially through one of the controller area network CAN buses, so as to route the target message to a corresponding CAN bus through the gateway;
a routing table generating module 530, configured to determine whether the target packet is received through another CAN bus, and generate a routing table according to a determination result, where the another CAN bus is a CAN bus connected to the gateway, except for a CAN bus that sends the target packet;
and a test result determining module 540, configured to determine a message routing test result of the gateway according to the routing table.
The message routing test device provided by the embodiment of the invention generates the routing table by a self-learning method, and determines whether the message routing function of the gateway is abnormal or not by the generated routing table, so that the problem of test omission in the related technology can be avoided, and the accuracy and the comprehensiveness of the message routing test are improved.
Optionally, the message obtaining module 510 is specifically configured to:
acquiring a message identifier;
judging whether the message identification is in the identification range of the test requirement;
and if so, acquiring a target message corresponding to the message identifier.
Optionally, the message sending module 520 is specifically configured to:
determining a Control Area Network (CAN) bus for sending the target message according to the priority sequence;
and sending the target message to a gateway one by one through the determined CAN bus.
Optionally, the routing table generating module 530 includes:
the message judgment submodule is used for judging whether the target message is received through each other CAN bus one by one;
and the routing table generation submodule is used for generating a routing table according to the other CAN buses which receive the target message, the CAN bus which sends the target message and the message identifier of the target message if the target message is received.
Optionally, the routing table generating sub-module is specifically configured to:
predefining a table structure of a routing table, and generating an empty routing table according to the table structure;
generating a routing record according to the other CAN buses which receive the target message, the CAN bus which sends the target message and the message identifier of the target message;
adding the routing record to the routing table.
Optionally, the method further includes:
and the message receiving module is used for acquiring the target message sent in a CAN bus clock period with a set multiple on the CAN bus before judging whether the target message is received by each other CAN bus one by one.
Optionally, the message judgment sub-module is specifically configured to:
determining any one message in the target messages as a current message;
and respectively judging whether the current message is received through each other CAN bus.
Optionally, the test result determining module 540 is specifically configured to:
acquiring a message routing table of the gateway;
and when the generated routing table is inconsistent with the message routing table, determining that the routing function of the gateway is abnormal.
Embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a message routing test method, where the method includes:
acquiring a message identifier to determine a target message meeting the test requirement;
sequentially sending the target message to a gateway through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway;
judging whether the target message is received through other CAN buses, and generating a routing table according to the judgment result, wherein the other CAN buses are the CAN buses connected with the gateway except the CAN bus for sending the target message;
and determining a message routing test result of the gateway according to the routing table.
Of course, the storage medium provided by the embodiment of the present invention includes computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the message routing test method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the message routing test apparatus, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A message routing test method is characterized by comprising the following steps:
acquiring a message identifier to determine a target message meeting the test requirement;
sequentially sending the target message to a gateway through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway;
judging whether the target message is received through other CAN buses, and generating a routing table according to the judgment result, wherein the other CAN buses are the CAN buses connected with the gateway except the CAN bus for sending the target message;
and determining a message routing test result of the gateway according to the routing table.
2. The method of claim 1, wherein the obtaining the packet identifier to determine the target packet meeting the testing requirement comprises:
acquiring a message identifier;
judging whether the message identification is in the identification range of the test requirement;
and if so, acquiring a target message corresponding to the message identifier.
3. The method of claim 1, wherein said sending the target message to a gateway sequentially over one of the Controller Area Network (CAN) buses comprises:
determining a Control Area Network (CAN) bus for sending the target message according to the priority sequence;
and sending the target message to a gateway one by one through the determined CAN bus.
4. The method of claim 1, wherein the determining whether the target packet is received via another CAN bus and generating a routing table according to the determination result comprises:
judging whether the target message is received through each other CAN bus one by one;
and if so, generating a routing table according to the other CAN buses receiving the target message, the CAN bus sending the target message and the message identifier of the target message.
5. The method of claim 4, wherein generating a routing table according to the other CAN bus that receives the target packet, the CAN bus that sends the target packet, and the packet identifier of the target packet comprises:
predefining a table structure of a routing table, and generating an empty routing table according to the table structure;
generating a routing record according to the other CAN buses which receive the target message, the CAN bus which sends the target message and the message identifier of the target message;
adding the routing record to the routing table.
6. The method of claim 4, further comprising, before determining, on a case-by-case basis, whether the destination message is received via each of the other CAN buses:
and acquiring the target message sent in the CAN bus clock period with the set multiple on the CAN bus.
7. The method of claim 4, wherein said determining, on a case-by-case basis, whether the destination message is received via each of the other CAN buses comprises:
determining any one message in the target messages as a current message;
and respectively judging whether the current message is received through each other CAN bus.
8. The method of claim 4, wherein determining the message routing test result of the gateway according to the routing table comprises:
acquiring a message routing table of the gateway;
and when the generated routing table is inconsistent with the message routing table, determining that the routing function of the gateway is abnormal.
9. A message routing test apparatus, comprising:
the message acquisition module is used for acquiring the message identifier and determining a target message meeting the test requirement;
the message sending module is used for sending the target message to a gateway sequentially through one of the CAN buses of the controller area network so as to route the target message to the corresponding CAN bus through the gateway;
the routing table generation module is used for judging whether the target message is received through other CAN buses or not and generating a routing table according to the judgment result, wherein the other CAN buses are the CAN buses connected with the gateway except the CAN bus for sending the target message;
and the test result determining module is used for determining the message routing test result of the gateway according to the routing table.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a message routing test method according to any one of claims 1 to 8.
CN202010146521.3A 2020-03-05 2020-03-05 Message routing test method, device and storage medium Pending CN111343051A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010146521.3A CN111343051A (en) 2020-03-05 2020-03-05 Message routing test method, device and storage medium
PCT/CN2021/079319 WO2021175314A1 (en) 2020-03-05 2021-03-05 Message routing testing method and device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010146521.3A CN111343051A (en) 2020-03-05 2020-03-05 Message routing test method, device and storage medium

Publications (1)

Publication Number Publication Date
CN111343051A true CN111343051A (en) 2020-06-26

Family

ID=71187380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010146521.3A Pending CN111343051A (en) 2020-03-05 2020-03-05 Message routing test method, device and storage medium

Country Status (2)

Country Link
CN (1) CN111343051A (en)
WO (1) WO2021175314A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333038A (en) * 2020-09-29 2021-02-05 北京软慧科技有限公司 Vehicle gateway detection method and device
WO2021175314A1 (en) * 2020-03-05 2021-09-10 中国第一汽车股份有限公司 Message routing testing method and device, and storage medium
CN113965503A (en) * 2021-10-21 2022-01-21 奇瑞商用车(安徽)有限公司 Automobile CAN gateway routing bench test method and system
CN114760227A (en) * 2021-03-16 2022-07-15 广州汽车集团股份有限公司 Message sending delay test method, test upper computer and storage medium
CN115022225A (en) * 2022-05-31 2022-09-06 东风电驱动系统有限公司 Message forwarding method, device, equipment and readable storage medium
CN115225556A (en) * 2022-05-19 2022-10-21 中国第一汽车股份有限公司 Detection method, device, equipment and storage medium
CN115225481A (en) * 2021-12-09 2022-10-21 广州汽车集团股份有限公司 Gateway diagnosis route configuration method, device, vehicle-mounted gateway, vehicle and medium
CN115242689A (en) * 2022-07-14 2022-10-25 南京芯驰半导体科技有限公司 Vehicle-mounted gateway testing method and system and computer readable storage medium
CN115378834A (en) * 2022-08-10 2022-11-22 东风柳州汽车有限公司 Multi-network-segment gateway routing test method and device based on hardware-in-the-loop equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114035539B (en) * 2021-10-25 2023-12-05 东风商用车有限公司 Method, device, equipment and storage medium for generating communication matrix of instantiated vehicle type
CN114374583B (en) * 2022-01-17 2023-06-30 南京芯驰半导体科技有限公司 Automobile gateway controller and control method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873310A (en) * 2012-12-10 2014-06-18 北汽福田汽车股份有限公司 Gateway testing method and system for CAN network
CN106059932A (en) * 2016-08-08 2016-10-26 杭州华三通信技术有限公司 Routing table item generation method and device
KR20170051768A (en) * 2015-10-30 2017-05-12 주식회사 경신 Apparatus and method for evaluating gateway function
CN109639535A (en) * 2019-01-18 2019-04-16 广州小鹏汽车科技有限公司 A kind of routing relation detection method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8130759B2 (en) * 2005-07-29 2012-03-06 Opnet Technologies, Inc. Routing validation
CN106254177A (en) * 2016-07-29 2016-12-21 浙江吉利控股集团有限公司 A kind of diagnosis method for routing based on standalone gateway and system
KR101956604B1 (en) * 2017-12-08 2019-03-11 현대오트론 주식회사 Dynamic routing apparatus for can message of vehicle and method thereof
CN110445719B (en) * 2019-07-16 2021-08-17 中国第一汽车股份有限公司 Routing table management method, device, equipment and storage medium
CN111343051A (en) * 2020-03-05 2020-06-26 中国第一汽车股份有限公司 Message routing test method, device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873310A (en) * 2012-12-10 2014-06-18 北汽福田汽车股份有限公司 Gateway testing method and system for CAN network
KR20170051768A (en) * 2015-10-30 2017-05-12 주식회사 경신 Apparatus and method for evaluating gateway function
CN106059932A (en) * 2016-08-08 2016-10-26 杭州华三通信技术有限公司 Routing table item generation method and device
CN109639535A (en) * 2019-01-18 2019-04-16 广州小鹏汽车科技有限公司 A kind of routing relation detection method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何丹丹,等: "网关控制器平台化设计", 《车辆与动力技术》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021175314A1 (en) * 2020-03-05 2021-09-10 中国第一汽车股份有限公司 Message routing testing method and device, and storage medium
CN112333038A (en) * 2020-09-29 2021-02-05 北京软慧科技有限公司 Vehicle gateway detection method and device
CN114760227B (en) * 2021-03-16 2023-02-28 广州汽车集团股份有限公司 Message sending delay test method, test upper computer and storage medium
CN114760227A (en) * 2021-03-16 2022-07-15 广州汽车集团股份有限公司 Message sending delay test method, test upper computer and storage medium
CN113965503A (en) * 2021-10-21 2022-01-21 奇瑞商用车(安徽)有限公司 Automobile CAN gateway routing bench test method and system
CN115225481A (en) * 2021-12-09 2022-10-21 广州汽车集团股份有限公司 Gateway diagnosis route configuration method, device, vehicle-mounted gateway, vehicle and medium
CN115225481B (en) * 2021-12-09 2024-03-22 广州汽车集团股份有限公司 Gateway diagnosis route configuration method and device, vehicle-mounted gateway, vehicle and medium
CN115225556A (en) * 2022-05-19 2022-10-21 中国第一汽车股份有限公司 Detection method, device, equipment and storage medium
CN115022225A (en) * 2022-05-31 2022-09-06 东风电驱动系统有限公司 Message forwarding method, device, equipment and readable storage medium
CN115022225B (en) * 2022-05-31 2023-11-10 东风电驱动系统有限公司 Message forwarding method, device, equipment and readable storage medium
CN115242689A (en) * 2022-07-14 2022-10-25 南京芯驰半导体科技有限公司 Vehicle-mounted gateway testing method and system and computer readable storage medium
CN115242689B (en) * 2022-07-14 2023-08-01 南京芯驰半导体科技有限公司 Vehicle-mounted gateway testing method, system and computer readable storage medium
CN115378834A (en) * 2022-08-10 2022-11-22 东风柳州汽车有限公司 Multi-network-segment gateway routing test method and device based on hardware-in-the-loop equipment
CN115378834B (en) * 2022-08-10 2024-01-09 东风柳州汽车有限公司 Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment

Also Published As

Publication number Publication date
WO2021175314A1 (en) 2021-09-10

Similar Documents

Publication Publication Date Title
CN111343051A (en) Message routing test method, device and storage medium
EP3745271B1 (en) Abnormality determination device, abnormality detection model creation server, and program
EP3852313B1 (en) Network communication system, fraud detection electronic control unit and anti-fraud handling method
US10574348B2 (en) Method for time synchronization between communication nodes in network
CN113691432B (en) Method and device for monitoring automobile CAN network message, computer equipment and storage medium
CN103312818A (en) Vehicle diagnostic method and server
CN104272663A (en) Vehicle-specific network communication management device and communication management method
US10862668B2 (en) Method and apparatus for synchronization of communication nodes using multiple domains in vehicle network
CN112514351A (en) Abnormality detection method and apparatus
CN110855532B (en) Vehicle-mounted gateway testing method, device, equipment and storage medium
WO2020162075A1 (en) Abnormality determination method, abnormality determination device, and program
CN112953802A (en) Data communication method and device
US11477746B2 (en) Method and apparatus for synchronization of communication nodes using multiple domains in vehicle network
CN109076081B (en) Method for monitoring the safety of a communication connection of a vehicle
CN112242938B (en) Detection method, device, electronic equipment and computer readable storage medium
CN113268050A (en) Vehicle diagnosis method and device
CN113282070A (en) Bus port fault judgment method and system
CN111988194A (en) Method and device for diagnosing automobile line
US20200036738A1 (en) Method and device for detecting anomalies in a computer network
CN115225481B (en) Gateway diagnosis route configuration method and device, vehicle-mounted gateway, vehicle and medium
CN110753912A (en) Method for detecting an interruption in a communication system of a vehicle by checking for an abnormality in the communication
CN110650045B (en) Diagnosis positioning device and method for MVB network port address conflict
CN112333038A (en) Vehicle gateway detection method and device
KR20170051768A (en) Apparatus and method for evaluating gateway function
CN110177032B (en) Message routing quality monitoring method and gateway controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626