CN110855532B - Vehicle-mounted gateway testing method, device, equipment and storage medium - Google Patents

Vehicle-mounted gateway testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN110855532B
CN110855532B CN201911223683.6A CN201911223683A CN110855532B CN 110855532 B CN110855532 B CN 110855532B CN 201911223683 A CN201911223683 A CN 201911223683A CN 110855532 B CN110855532 B CN 110855532B
Authority
CN
China
Prior art keywords
vehicle
gateway
routing
test
equipment
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.)
Active
Application number
CN201911223683.6A
Other languages
Chinese (zh)
Other versions
CN110855532A (en
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.)
Anhui Jianghuai Automobile Group Corp
Original Assignee
Anhui Jianghuai Automobile 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 Anhui Jianghuai Automobile Group Corp filed Critical Anhui Jianghuai Automobile Group Corp
Priority to CN201911223683.6A priority Critical patent/CN110855532B/en
Publication of CN110855532A publication Critical patent/CN110855532A/en
Application granted granted Critical
Publication of CN110855532B publication Critical patent/CN110855532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a vehicle-mounted gateway testing method, device, equipment and storage medium, and belongs to the technical field of gateway testing. According to the method and the device, the test data and the plurality of routing network segments are obtained from the test request, the vehicle-mounted equipment corresponding to each routing network segment is obtained according to the vehicle-mounted gateway routing table, the test data are sent to each vehicle-mounted equipment to obtain the working state corresponding to each vehicle-mounted equipment, the equipment state table is generated according to the working state corresponding to each vehicle-mounted equipment and the routing network segment, the equipment state table is used as a test result, all tests are automatically sent to the corresponding vehicle-mounted equipment through each network segment, and the accuracy and the efficiency of the vehicle-mounted gateway test are improved.

Description

Vehicle-mounted gateway testing method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of gateway testing, in particular to a vehicle-mounted gateway testing method, device, equipment and storage medium.
Background
At present, the number of vehicle controllers is increased due to the increase of vehicle functions, the controllers need to communicate with each other through a vehicle-mounted network protocol, however, due to the rapid increase of the number of the controllers, the vehicle is often divided into a plurality of network segments for communication, and a gateway controller is needed to perform data interaction among the network segments. The gateway controller needs to test and verify the accuracy and reliability of functions after being developed, and because the number of signals of the gateway route is too large, the function test process is long, the accuracy of all route signal tests is difficult to guarantee through manual tests, and meanwhile, the manual test efficiency is low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a vehicle-mounted gateway testing method, and aims to solve the technical problems of low accuracy and low efficiency of manual gateway testing in the prior art.
In order to achieve the above object, the present invention provides a vehicle-mounted gateway testing method, which comprises the following steps:
acquiring test data and a plurality of routing network segments;
acquiring vehicle-mounted equipment corresponding to each routing network segment according to a vehicle-mounted gateway routing table;
sending the test data to each vehicle-mounted device to obtain a working state corresponding to each vehicle-mounted device;
and generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device.
Preferably, the step of obtaining the test data and the plurality of routing network segments specifically includes:
and receiving a test request, and extracting corresponding test data and a plurality of routing network segments from the test request.
Preferably, before the step of obtaining the vehicle-mounted device corresponding to each routing network segment according to the vehicle-mounted gateway routing table, the method further includes:
acquiring a network protocol of a target vehicle from a gateway database;
and generating a corresponding vehicle-mounted gateway routing table according to the network protocol.
Preferably, the step of obtaining the vehicle-mounted device corresponding to each routing network segment according to the vehicle-mounted gateway routing table specifically includes:
extracting an information routing table from a vehicle-mounted gateway routing table;
acquiring vehicle-mounted equipment identifications corresponding to each routing network segment from the information routing table through a preset algorithm;
and acquiring the vehicle-mounted equipment corresponding to each routing network segment according to the vehicle-mounted equipment identification.
Preferably, the step of sending the test data to each vehicle-mounted device to obtain the working state corresponding to each vehicle-mounted device specifically includes:
sending the test data to each vehicle-mounted device;
receiving message information fed back by each vehicle-mounted device according to the test data;
and acquiring the working state of each vehicle-mounted device according to the message information.
Preferably, the step of generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device specifically includes:
establishing an equipment state table according to the working state and the routing network segment corresponding to each vehicle-mounted equipment;
and taking the equipment state table as a test result.
Preferably, after the step of generating the test result according to the working state and the routing network segment corresponding to each vehicle-mounted device, the method further includes:
and when the working state of the vehicle-mounted equipment is a fault state, acquiring equipment information of the vehicle-mounted equipment corresponding to the fault state, and outputting fault prompt information according to the equipment information.
In addition, in order to achieve the above object, the present invention further provides a vehicle-mounted gateway testing apparatus, including:
the acquisition module is used for acquiring the test data and the plurality of routing network segments;
the extraction module is used for acquiring vehicle-mounted equipment corresponding to each routing network segment according to the vehicle-mounted gateway routing table;
the test module is used for sending the test data to each vehicle-mounted device so as to obtain the working state corresponding to each vehicle-mounted device;
and the output module is used for generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device.
Furthermore, to achieve the above object, the present invention also provides an electronic device, comprising: the system comprises a memory, a processor and an on-board gateway test program stored on the memory and operable on the processor, the on-board gateway test program being configured to implement the steps of the on-board gateway test method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, where a vehicle-mounted gateway testing program is stored, and the vehicle-mounted gateway testing program, when executed by a processor, implements the steps of the vehicle-mounted gateway testing method as described above.
According to the method and the device, the test data and the plurality of routing network segments are obtained from the test request, the vehicle-mounted equipment corresponding to each routing network segment is obtained according to the vehicle-mounted gateway routing table, the test data are sent to each vehicle-mounted equipment to obtain the working state corresponding to each vehicle-mounted equipment, the equipment state table is generated according to the working state corresponding to each vehicle-mounted equipment and the routing network segment, the equipment state table is used as a test result, all tests are automatically sent to the corresponding vehicle-mounted equipment through each network segment, and the accuracy and the efficiency of the vehicle-mounted gateway test are improved.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart of a first embodiment of a vehicle gateway testing method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a vehicle gateway testing method according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a vehicle gateway testing method according to the present invention;
fig. 5 is a block diagram of the first embodiment of the vehicle-mounted gateway testing apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a vehicle-mounted gateway testing device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and an in-vehicle gateway test program.
In the in-vehicle gateway test apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention may be disposed in the vehicle-mounted gateway testing device, and the electronic device calls the vehicle-mounted gateway testing program stored in the memory 1005 through the processor 1001 and executes the vehicle-mounted gateway testing method provided by the embodiment of the present invention.
An embodiment of the present invention provides a vehicle-mounted gateway testing method, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of a vehicle-mounted gateway testing method according to the present invention.
In this embodiment, the vehicle-mounted gateway testing method includes the following steps:
step S10: and acquiring test data and a plurality of routing network segments.
In this embodiment, the test data includes data related to vehicle signals, and is used to test a driving network, a comfort network, and an infotainment network of the vehicle, where the driving network is mainly used in a control system such as an engine, a transmission, a chassis, and an airbag, which affects vehicle power and safety, the comfort network is mainly used in vehicle body system control such as door and window control, light control, wiper control, central door lock control, air conditioning control, and electric seat control, and the infotainment network is mainly used in vehicle information display and vehicle infotainment system control, and the gateway communicates with the driving network, the comfort network, and the infotainment network of the vehicle through each CAN network on the vehicle, and the routing function is implemented by the vehicle gateway through a plurality of routing network segments.
It should be noted that before the test data and the plurality of routing network segments are obtained, a test request needs to be received, where the test request includes test data required by the test and a routing network segment to be tested, so that the corresponding test data and the plurality of routing network segments can be extracted from the test request, for example, lighting test data including turning-on time of a turn signal and brightness of a car light is extracted from the test request, and the routing network segments include 192.168.0.X network segments.
Step S20: and acquiring the vehicle-mounted equipment corresponding to each routing network segment according to the vehicle-mounted gateway routing table.
It should be noted that the vehicle-mounted gateway routing table is determined according to the performance index of the target vehicle, and different vehicle types and models have corresponding vehicle-mounted gateway routing tables, and the vehicle-mounted gateway routing table can be regarded as a routing division standard of the target vehicle, and the vehicle-mounted gateway communicates with each network of the vehicle according to the vehicle-mounted gateway routing table, so as to avoid network segment collision and communication data abnormality.
In addition, the vehicle-mounted gateway routing table includes a mapping relation between each routing network segment and the vehicle-mounted device, the vehicle-mounted gateway routes data and each vehicle-mounted device of the target vehicle according to the gateway routing table, and according to each routing network segment in the vehicle-mounted gateway, the vehicle-mounted device corresponding to each routing network segment can be obtained, for example, it is assumed that the routing network segment a is 192.168.0.X, the routing network segment B is 192.168.1.X, the network segment 192.168.0.X recorded in the vehicle-mounted gateway routing table corresponds to a window, and the network segment 192.168.1.X corresponds to an electric seat, so that the vehicle-mounted device corresponding to the routing network segment a is obtained according to the vehicle-mounted gateway routing table and is the window, and the vehicle-mounted device corresponding to the routing network segment B is the electric seat.
Step S30: and sending the test data to each vehicle-mounted device to obtain the working state corresponding to each vehicle-mounted device.
In a specific implementation, according to test data obtained from a test request, sending test data to each vehicle-mounted device, where the data is sent to the vehicle-mounted device corresponding to each network segment through each network segment, and obtaining a working state corresponding to each vehicle-mounted device when the test data is received, where the working state corresponding to the vehicle-mounted device is obtained from message information fed back by the vehicle-mounted device according to the test data, for example, for convenience of understanding, the test data obtained from the test request includes vehicle lamp test data and electric seat test data, the vehicle lamp test data includes a left turn indicator for turning on a vehicle and a right turn indicator for turning on the vehicle, the electric seat test data includes a fallen electric seat, assuming that a route corresponding to a vehicle lamp is 192.168.0.X, and a route segment corresponding to the electric seat is 192.168.1.X, when the test request is received, the vehicle-mounted gateway sends the test data to the vehicle lamp and the electric seat respectively according to the routing network segments corresponding to the vehicle lamp and the electric seat, and the vehicle lamp is assumed to receive the vehicle lamp test data and is started when the vehicle left turn indicator is turned on, the vehicle lamp receives the vehicle lamp test data and is started when the vehicle right turn indicator is turned on, the vehicle lamp right turn indicator is not turned on, the electric seat is switched into the lying state when the electric seat test data is received and is turned over, the working state of the left turn indicator of the vehicle can be obtained according to the test, the right turn indicator of the vehicle is not turned on, and the electric seat of the vehicle is in the lying state.
Step S40: and generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device.
In this embodiment, the specific process of generating the test result according to the working state and the routing network segment corresponding to each vehicle-mounted device is to establish a device state according to the working state and the routing network segment corresponding to each vehicle-mounted device, in the device state table, the working state and the routing network segment corresponding to each vehicle-mounted device have a one-to-one mapping relationship, for example, a vehicle lamp and an electric seat of a vehicle are tested, a routing network segment corresponding to the vehicle lamp is 192.168.0.X and a routing network segment corresponding to the electric seat is 192.168.1.X are obtained according to a test request, the vehicle working state is obtained through the test to be an unopened state, the electric seat working state is a lying state, and a device state table is generated according to the vehicle lamp working state, the electric seat working state and the corresponding routing network segment, as shown in table 1.
Routing network segment Vehicle-mounted device Working state
192.168.0.X Vehicle lamp Unopened state
192.168.1.X Electric seat Lying state
According to the embodiment, the test data and the multiple routing network segments are obtained from the test request, the vehicle-mounted equipment corresponding to each routing network segment is obtained according to the vehicle-mounted gateway routing table, the test data are sent to each vehicle-mounted equipment to obtain the working state corresponding to each vehicle-mounted equipment, the equipment state table is generated according to the working state corresponding to each vehicle-mounted equipment and the routing network segment, the equipment state table is used as a test result, all tests are automatically sent to the corresponding vehicle-mounted equipment through each network segment, and the accuracy and the efficiency of the vehicle-mounted gateway test are improved.
Referring to fig. 3, fig. 3 is a schematic flowchart of a second embodiment of a vehicle gateway testing method according to the present invention.
Based on the first embodiment, before the step S20, the method for testing a vehicle-mounted gateway in this embodiment further includes:
step S201: and acquiring the network protocol of the target vehicle from the gateway database.
Step S202: and generating a corresponding vehicle-mounted gateway routing table according to the network protocol.
In this embodiment, the vehicle-mounted gateway routing table is generated according to a network protocol of a target vehicle, the network protocol of the target vehicle is acquired from a gateway database, the gateway database includes a network table, a node table, an information table, and a signal table, the gateway data stores a message receiving and sending attribute of the vehicle-mounted gateway in the vehicle network protocol, and a message and a routing signal that need to be forwarded by the gateway, and the network protocol of the target vehicle can be analyzed according to the gateway database.
It should be noted that the network protocol of the target vehicle includes attributes of the network, the node, the message, the signal and their mutual relations, contents defined in the network protocol of the target vehicle are compared, a source message, a destination message and a signal to be routed are searched, a vehicle-mounted gateway routing table is automatically generated through a database programming technology, and vehicle-mounted gateway routing tables corresponding to different vehicle types are different.
Further, the step S20 specifically includes:
step S203: and extracting the information routing table from the vehicle-mounted gateway routing table.
In a specific implementation, an information routing table is extracted from a vehicle-mounted gateway routing table, and the information routing table comprises an information ID of a route, a receiving node address and a sending node address.
Step S204: and acquiring the vehicle-mounted equipment identification corresponding to each routing network segment from the information routing table through a preset algorithm.
Step S205: and acquiring the vehicle-mounted equipment corresponding to each routing network segment according to the vehicle-mounted equipment identification.
It is easy to understand that data routing is performed between the vehicle-mounted gateway and each vehicle-mounted device through a routing network segment corresponding to each vehicle-mounted device, the vehicle-mounted gateway and each vehicle-mounted device are identified through vehicle-mounted device identifiers, the routing information ID obtained from the vehicle-mounted gateway routing table includes vehicle-mounted device identifiers corresponding to each vehicle-mounted device, the vehicle-mounted gateway finds the vehicle-mounted devices corresponding to the vehicle-mounted identifiers through a preset algorithm according to the obtained vehicle-mounted device identifiers, the preset algorithm includes a sequential search algorithm, a binary search algorithm, a block sequential search algorithm, a block binary search algorithm and the like, the present embodiment is not limited, in order to improve the accuracy and efficiency of the vehicle-mounted gateway test, the preset algorithm in the present embodiment is preferably a block binary search algorithm, because the binary search algorithm has relatively high search accuracy and the time spent on query is also short, for example, for convenience of understanding, it is assumed that, for example, if the vehicle-mounted gateway receives a segment of network message, the total number of the received messages is Y, and the vehicle-mounted device identifier is ID6, the vehicle-mounted gateway searches for the vehicle-mounted device corresponding to the vehicle-mounted device identifier ID6 through a preset algorithm, according to the total number Y of the received messages, the search time corresponding to each algorithm in the preset algorithm can be obtained, and it is assumed that the blocking time is X, the search time corresponding to the sequential search algorithm is Y +1, and the search time corresponding to the binary search algorithm is log2Y, the searching time corresponding to the block sequential searching method is (Y +1)/2+ X, and the searching time corresponding to the block binary searching algorithm is log2Y + X, selecting a block and binary search algorithm with the shortest search time, so that the vehicle-mounted gateway vehicle-mounted equipment identifier passes through ID6 and is according to log2The vehicle-mounted equipment identification ID6 pair can be found by Y + X searching timeAnd (4) vehicle-mounted equipment.
In the embodiment, the network protocol of the target vehicle is acquired from the gateway database, the corresponding vehicle-mounted gateway routing table is generated according to the network protocol, the information routing table is extracted from the vehicle-mounted gateway routing table, and the vehicle-mounted equipment identifier corresponding to each routing network segment is acquired from the information routing table through the preset algorithm, so that the vehicle-mounted equipment corresponding to each routing network segment is acquired according to the vehicle-mounted equipment identifier, and the accuracy and the efficiency of vehicle-mounted gateway testing are improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a third embodiment of a vehicle gateway testing method according to the present invention.
Based on the first embodiment and the second embodiment, after the step S40, the method further includes:
and S401, when the working state of the vehicle-mounted equipment is a fault state, acquiring equipment information of the vehicle-mounted equipment corresponding to the fault state, and outputting fault prompt information according to the equipment information.
It is easy to understand that the working state of the vehicle-mounted device may be a fault state in the vehicle-mounted gateway testing process, therefore, when the fault state is obtained, the device information of the vehicle-mounted device corresponding to the fault state is obtained, and prompt information is output according to the device information, for example, when the vehicle lamp receives vehicle lamp testing data and turns on a left turn indicator of the vehicle, a left turn indicator of the vehicle lamp is turned on, when the vehicle lamp receives the vehicle lamp testing data and turns on a right turn indicator of the vehicle, the right turn indicator of the vehicle lamp is not turned on, it can be determined that the right turn indicator of the vehicle lamp is in the fault state according to the fact that the right turn indicator of the vehicle lamp is not turned on, the information of the right turn indicator of the vehicle lamp is obtained, and a user is prompted that the right turn indicator of the vehicle lamp has a fault in the testing process according to the information output of the right turn indicator of the vehicle lamp.
In this embodiment, when the working state of the vehicle-mounted device is the fault state, the device information of the vehicle-mounted device corresponding to the fault state is acquired, and the fault prompt information is output according to the device information, so that a user can clearly know the vehicle-mounted device with the fault in the test process, and the stability and the safety of the gateway test are improved.
Referring to fig. 5, fig. 5 is a block diagram illustrating a first embodiment of the vehicle-mounted gateway testing apparatus according to the present invention.
As shown in fig. 5, a vehicle-mounted gateway testing apparatus provided in an embodiment of the present invention includes:
the obtaining module 10 is configured to obtain test data and a plurality of routing network segments.
In this embodiment, the test data includes data related to vehicle signals, and is used to test a driving network, a comfort network, and an infotainment network of the vehicle, where the driving network is mainly used in a control system such as an engine, a transmission, a chassis, and an airbag, which affects vehicle power and safety, the comfort network is mainly used in vehicle body system control such as door and window control, light control, wiper control, central door lock control, air conditioning control, and electric seat control, and the infotainment network is mainly used in vehicle information display and vehicle infotainment system control, and the gateway communicates with the driving network, the comfort network, and the infotainment network of the vehicle through each CAN network on the vehicle, and the routing function is implemented by the vehicle gateway through a plurality of routing network segments.
It should be noted that before the test data and the plurality of routing network segments are obtained, a test request needs to be received, where the test request includes test data required by the test and a routing network segment to be tested, so that the corresponding test data and the plurality of routing network segments can be extracted from the test request, for example, lighting test data including turning-on time of a turn signal and brightness of a car light is extracted from the test request, and the routing network segments include 192.168.0.X network segments.
And the extraction module 20 is configured to obtain the vehicle-mounted device corresponding to each routing network segment according to the vehicle-mounted gateway routing table.
It should be noted that the vehicle-mounted gateway routing table is determined according to the performance index of the target vehicle, and different vehicle types and models have corresponding vehicle-mounted gateway routing tables, and the vehicle-mounted gateway routing table can be regarded as a routing division standard of the target vehicle, and the vehicle-mounted gateway communicates with each network of the vehicle according to the vehicle-mounted gateway routing table, so as to avoid network segment collision and communication data abnormality.
In addition, the vehicle-mounted gateway routing table includes a mapping relation between each routing network segment and the vehicle-mounted device, the vehicle-mounted gateway routes data and each vehicle-mounted device of the target vehicle according to the gateway routing table, and according to each routing network segment in the vehicle-mounted gateway, the vehicle-mounted device corresponding to each routing network segment can be obtained, for example, it is assumed that the routing network segment a is 192.168.0.X, the routing network segment B is 192.168.1.X, the network segment 192.168.0.X recorded in the vehicle-mounted gateway routing table corresponds to a window, and the network segment 192.168.1.X corresponds to an electric seat, so that the vehicle-mounted device corresponding to the routing network segment a is obtained according to the vehicle-mounted gateway routing table and is the window, and the vehicle-mounted device corresponding to the routing network segment B is the electric seat.
And the test module 30 is configured to send the test data to each vehicle-mounted device to obtain a working state corresponding to each vehicle-mounted device.
In a specific implementation, according to test data obtained from a test request, sending test data to each vehicle-mounted device, where the data is sent to the vehicle-mounted device corresponding to each network segment through each network segment, and obtaining a working state corresponding to each vehicle-mounted device when the test data is received, where the working state corresponding to the vehicle-mounted device is obtained from message information fed back by the vehicle-mounted device according to the test data, for example, for convenience of understanding, the test data obtained from the test request includes vehicle lamp test data and electric seat test data, the vehicle lamp test data includes a left turn indicator for turning on a vehicle and a right turn indicator for turning on the vehicle, the electric seat test data includes a fallen electric seat, assuming that a route corresponding to a vehicle lamp is 192.168.0.X, and a route segment corresponding to the electric seat is 192.168.1.X, when the test request is received, the vehicle-mounted gateway sends the test data to the vehicle lamp and the electric seat respectively according to the routing network segments corresponding to the vehicle lamp and the electric seat, and the vehicle lamp is assumed to receive the vehicle lamp test data and is started when the vehicle left turn indicator is turned on, the vehicle lamp receives the vehicle lamp test data and is started when the vehicle right turn indicator is turned on, the vehicle lamp right turn indicator is not turned on, the electric seat is switched into the lying state when the electric seat test data is received and is turned over, the working state of the left turn indicator of the vehicle can be obtained according to the test, the right turn indicator of the vehicle is not turned on, and the electric seat of the vehicle is in the lying state.
And the output module 40 is used for generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device.
In this embodiment, the specific process of generating the test result according to the working state and the routing network segment corresponding to each vehicle-mounted device is to establish a device state according to the working state and the routing network segment corresponding to each vehicle-mounted device, in the device state table, the working state and the routing network segment corresponding to each vehicle-mounted device have a one-to-one mapping relationship, for example, a vehicle lamp and an electric seat of a vehicle are tested, a routing network segment corresponding to the vehicle lamp is 192.168.0.X and a routing network segment corresponding to the electric seat is 192.168.1.X are obtained according to a test request, the vehicle working state is obtained through the test to be an unopened state, the electric seat working state is a lying state, and a device state table is generated according to the vehicle lamp working state, the electric seat working state and the corresponding routing network segment, as shown in table 1.
Figure BDA0002294151840000101
Figure BDA0002294151840000111
According to the embodiment, the test data and the multiple routing network segments are obtained from the test request, the vehicle-mounted equipment corresponding to each routing network segment is obtained according to the vehicle-mounted gateway routing table, the test data are sent to each vehicle-mounted equipment to obtain the working state corresponding to each vehicle-mounted equipment, the equipment state table is generated according to the working state corresponding to each vehicle-mounted equipment and the routing network segment, the equipment state table is used as a test result, all tests are automatically sent to the corresponding vehicle-mounted equipment through each network segment, and the accuracy and the efficiency of the vehicle-mounted gateway test are improved.
In an embodiment, the obtaining module 10 is further configured to receive a test request, and extract corresponding test data and a plurality of routing network segments from the test request.
In one embodiment, the system further comprises a generation module, configured to obtain the network protocol of the target vehicle from the gateway database; and generating a corresponding vehicle-mounted gateway routing table according to the network protocol.
In an embodiment, the extracting module 20 is further configured to extract an information routing table from the in-vehicle gateway routing table; acquiring vehicle-mounted equipment identifications corresponding to each routing network segment from the information routing table through a preset algorithm; and acquiring the vehicle-mounted equipment corresponding to each routing network segment according to the vehicle-mounted equipment identification.
In an embodiment, the test module 30 is further configured to send the test data to each vehicle-mounted device; receiving message information fed back by each vehicle-mounted device according to the test data; and acquiring the working state of each vehicle-mounted device according to the message information.
In an embodiment, the output module 40 is further configured to establish an equipment state table according to the working state and the routing network segment corresponding to each vehicle-mounted equipment; and taking the equipment state table as a test result.
In an embodiment, the vehicle-mounted device further includes a prompt module, configured to, when the working state of the vehicle-mounted device is a failure state, obtain device information of the vehicle-mounted device corresponding to the failure state, and output failure prompt information according to the device information.
In addition, an embodiment of the present invention further provides a storage medium, where a vehicle-mounted gateway test program is stored on the storage medium, and the vehicle-mounted gateway test program, when executed by a processor, implements the steps of the vehicle-mounted gateway test method described above.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the vehicle gateway testing method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A vehicle-mounted gateway testing method is characterized by comprising the following steps:
the method comprises the steps of obtaining test data and a plurality of routing network segments, wherein the test data comprises data related to vehicle signals and is used for testing a driving network, a comfort network and an infotainment network of a vehicle;
acquiring a network protocol of a target vehicle from a gateway database, and generating a corresponding vehicle-mounted gateway routing table according to the network protocol, wherein the vehicle-mounted gateway routing table is determined according to a performance index of the target vehicle;
acquiring vehicle-mounted equipment corresponding to each routing network segment according to a vehicle-mounted gateway routing table;
sending the test data to each vehicle-mounted device to obtain a working state corresponding to each vehicle-mounted device;
generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device;
the step of generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device specifically includes:
establishing an equipment state table according to the working state and the routing network segment corresponding to each vehicle-mounted equipment;
and taking the equipment state table as a test result.
2. The vehicle-mounted gateway testing method of claim 1, wherein the step of obtaining the test data and the plurality of routing network segments specifically comprises:
and receiving a test request, and extracting corresponding test data and a plurality of routing network segments from the test request.
3. The vehicle-mounted gateway testing method according to claim 1, wherein the step of obtaining the vehicle-mounted devices corresponding to each routing network segment according to the vehicle-mounted gateway routing table specifically comprises:
extracting an information routing table from a vehicle-mounted gateway routing table;
acquiring vehicle-mounted equipment identifications corresponding to each routing network segment from the information routing table through a preset algorithm;
and acquiring the vehicle-mounted equipment corresponding to each routing network segment according to the vehicle-mounted equipment identification.
4. The vehicle-mounted gateway testing method according to claim 1, wherein the step of sending the test data to each vehicle-mounted device to obtain the working state corresponding to each vehicle-mounted device specifically comprises:
sending the test data to each vehicle-mounted device;
receiving message information fed back by each vehicle-mounted device according to the test data;
and acquiring the working state of each vehicle-mounted device according to the message information.
5. The vehicle-mounted gateway testing method according to any one of claims 1 to 4, wherein after the step of generating the testing result according to the operating state and the routing network segment corresponding to each vehicle-mounted device, the method further comprises:
and when the working state of the vehicle-mounted equipment is a fault state, acquiring equipment information of the vehicle-mounted equipment corresponding to the fault state, and outputting fault prompt information according to the equipment information.
6. An on-board gateway testing apparatus, the apparatus comprising:
the system comprises an acquisition module, a routing module and a control module, wherein the acquisition module is used for acquiring test data and a plurality of routing network segments, and the test data comprises data related to vehicle signals and is used for testing a driving network, a comfort network and an infotainment network of a vehicle;
the acquisition module is further configured to acquire a network protocol of a target vehicle from a gateway database, and generate a corresponding vehicle-mounted gateway routing table according to the network protocol, where the vehicle-mounted gateway routing table is determined according to a performance index of the target vehicle;
the extraction module is used for acquiring vehicle-mounted equipment corresponding to each routing network segment according to the vehicle-mounted gateway routing table;
the test module is used for sending the test data to each vehicle-mounted device so as to obtain the working state corresponding to each vehicle-mounted device;
the output module is used for generating a test result according to the working state and the routing network segment corresponding to each vehicle-mounted device;
the output module is also used for establishing an equipment state table according to the working state and the routing network segment corresponding to each vehicle-mounted equipment; and taking the equipment state table as a test result.
7. An in-vehicle gateway test apparatus, the apparatus comprising: memory, a processor and an in-vehicle gateway test program stored on the memory and executable on the processor, the in-vehicle gateway test program being configured to implement the steps of the in-vehicle gateway test method according to any of the claims 1 to 5.
8. A storage medium having stored thereon a vehicle gateway test program, which when executed by a processor implements the steps of the vehicle gateway test method according to any one of claims 1 to 5.
CN201911223683.6A 2019-11-28 2019-11-28 Vehicle-mounted gateway testing method, device, equipment and storage medium Active CN110855532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911223683.6A CN110855532B (en) 2019-11-28 2019-11-28 Vehicle-mounted gateway testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911223683.6A CN110855532B (en) 2019-11-28 2019-11-28 Vehicle-mounted gateway testing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110855532A CN110855532A (en) 2020-02-28
CN110855532B true CN110855532B (en) 2021-11-26

Family

ID=69607685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911223683.6A Active CN110855532B (en) 2019-11-28 2019-11-28 Vehicle-mounted gateway testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110855532B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518034B (en) * 2021-05-07 2023-08-15 中国移动通信集团陕西有限公司 Method, device, equipment and storage medium for route detection
CN113612654B (en) * 2021-07-12 2023-05-26 东风汽车集团股份有限公司 Vehicle-mounted gateway function test method based on database
CN114915484B (en) * 2022-05-30 2023-04-25 重庆长安汽车股份有限公司 Safety detection system and detection method for vehicle-mounted gateway
CN117651012B (en) * 2024-01-25 2024-05-31 江铃汽车股份有限公司 Vehicle central gateway testing method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9559935B2 (en) * 2011-12-14 2017-01-31 Koninklijke Kpn N.V. Virtual interface applications
CN106850419A (en) * 2017-02-10 2017-06-13 北京汽车集团有限公司 Car borne gateway and the method for car borne gateway
CN106990726A (en) * 2017-04-18 2017-07-28 上海汽车集团股份有限公司 A kind of vehicle CAN network data access method
CN107332711A (en) * 2017-07-31 2017-11-07 北京新能源汽车股份有限公司 Vehicle diagnosis method and device
CN107659494A (en) * 2017-10-12 2018-02-02 宁波吉利汽车研究开发有限公司 Data processing method and intelligent vehicle-carried gateway
CN108334058A (en) * 2018-02-13 2018-07-27 安徽江淮汽车集团股份有限公司 A kind of diagnostic system and method based on car body controller
CN108683594A (en) * 2018-05-10 2018-10-19 宝沃汽车(中国)有限公司 Vehicle gateway method for routing, device, vehicle and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795587B (en) * 2012-11-02 2018-02-23 北汽福田汽车股份有限公司 A kind of gateway route test method and device
CN106230678A (en) * 2016-07-29 2016-12-14 北京新能源汽车股份有限公司 Information processing method based on vehicle-mounted gateway controller and gateway controller
CN108207039B (en) * 2016-12-19 2021-05-14 比亚迪股份有限公司 Safe transmission method of vehicle-mounted data, external equipment and vehicle-mounted gateway
CN110048910A (en) * 2019-04-24 2019-07-23 重庆长安汽车股份有限公司 A kind of vehicle-mounted ethernet gateway test macro and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9559935B2 (en) * 2011-12-14 2017-01-31 Koninklijke Kpn N.V. Virtual interface applications
CN106850419A (en) * 2017-02-10 2017-06-13 北京汽车集团有限公司 Car borne gateway and the method for car borne gateway
CN106990726A (en) * 2017-04-18 2017-07-28 上海汽车集团股份有限公司 A kind of vehicle CAN network data access method
CN107332711A (en) * 2017-07-31 2017-11-07 北京新能源汽车股份有限公司 Vehicle diagnosis method and device
CN107659494A (en) * 2017-10-12 2018-02-02 宁波吉利汽车研究开发有限公司 Data processing method and intelligent vehicle-carried gateway
CN108334058A (en) * 2018-02-13 2018-07-27 安徽江淮汽车集团股份有限公司 A kind of diagnostic system and method based on car body controller
CN108683594A (en) * 2018-05-10 2018-10-19 宝沃汽车(中国)有限公司 Vehicle gateway method for routing, device, vehicle and storage medium

Also Published As

Publication number Publication date
CN110855532A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN110855532B (en) Vehicle-mounted gateway testing method, device, equipment and storage medium
CN110750442B (en) Test case generation method, device, equipment and storage medium
US11436694B2 (en) Transportation system using odor preferences
US11170585B2 (en) Vehicle fault diagnosis and analysis based on augmented design failure mode and effect analysis (DFMEA) data
CN110445719B (en) Routing table management method, device, equipment and storage medium
CN111527389A (en) Vehicle diagnosis method, vehicle diagnosis device and storage medium
CN111104324A (en) Test case generation method, test case generation device and computer-readable storage medium
CN108733674B (en) A2L file merging method and device
CN115696266A (en) Vehicle-mounted controller upgrading method, device, equipment and storage medium
JP2013126802A (en) Method for downloading application software to on-board device, and the on-board device
CN110737662B (en) Data analysis method, device, server and computer storage medium
CN115348169B (en) Route configuration method, device, equipment and storage medium for vehicle-mounted gateway
CN116257451A (en) Interface testing method, device, equipment, storage medium and product
EP3340190A1 (en) Vehicle communication system
CN110933736B (en) Vehicle-mounted controller communication method, device, equipment and storage medium
CN113934198A (en) Vehicle diagnosis method, vehicle diagnosis device, electronic device, and storage medium
CN111983989B (en) Offline detection method and control equipment
CN113535730A (en) Index updating method and system for search engine, electronic equipment and storage medium
CN108093396B (en) Method and device for updating APN (Access Point name) of vehicle-mounted system
US12021879B2 (en) Verification of message patterns for vehicle ECUs
CN112416409B (en) Vehicle-mounted computer software upgrading method, device, equipment and storage medium
CN110794816B (en) Method, device, equipment and storage medium for adjusting fault tolerance of vehicle controller software
CN110260853B (en) Position information providing device and position information providing method
US20240202108A1 (en) Computer-implemented method for determining compatible system elements and system
CN117850378A (en) Vehicle bus checking method and related equipment

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
GR01 Patent grant
GR01 Patent grant