Test method, apparatus, device, storage medium, and program product

CN122970013APending Publication Date: 2026-10-23BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510511300.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0002]目前对车载控制器进行以太网性能测试,需要独立的上位机连接车载控制器,以及通过网络测试工具(iPerf)来完成测试,并且需要手动频繁修改硬件连接关系,以实现以太网测试,这种非自动化测试方式,测试时间较长以及测试效率低下

Benefits of technology

[0009]本公开实施例的技术方案,第一控制单元,通过车载控制器中的第一设定传输路径,与第二控制单元之间交互以太网报文;其中,第一设定传输路径包括第一控制单元和第二控制单元之间的交换机和以太网物理层芯片;第一控制单元和第二控制单元位于车载控制器中;第一控制单元,获取以太网报文交互过程中的路径状态信息,并根据路径状态信息确定测试结果。本实施例,车载控制器中的第一控制单元和第二控制单元按照第一设定传输路径交互以太网报文的方式,相对现有技术,无需依赖外部设备进行以太网报文交互以及无需人工参与,可以实现对车载控制器的以太网性能的自动化测试,提高了测试效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122970013A_ABST
    Figure CN122970013A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a test method, device, equipment, storage medium and program product. The method comprises: a first control unit interacts with a second control unit through a first set transmission path in a vehicle-mounted controller to transmit an Ethernet message; the first set transmission path comprises a switch and an Ethernet physical layer chip between the first control unit and the second control unit; the first control unit and the second control unit are located in the vehicle-mounted controller; the first control unit acquires path state information in an Ethernet message interaction process, and determines a test result according to the path state information. In the embodiment, the first control unit and the second control unit in the vehicle-mounted controller interact with the Ethernet message in the first set transmission path, which can realize automatic testing of the Ethernet performance of the vehicle-mounted controller, and improve the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing technology, and in particular to a testing method, apparatus, equipment, storage medium, and program product. Background Technology

[0002] Currently, Ethernet performance testing of vehicle controllers requires a separate host computer connected to the vehicle controller and the use of network testing tools (iPerf) to complete the test. It also requires frequent manual modification of hardware connection relationships to achieve Ethernet testing. This non-automated testing method results in long testing time and low testing efficiency. Summary of the Invention

[0003] This invention provides a testing method, apparatus, equipment, storage medium, and program product that can automate the testing of vehicle controllers, reduce testing time, and improve testing efficiency.

[0004] In a first aspect, this disclosure provides a testing method, comprising: a first control unit, which exchanges Ethernet packets with a second control unit through a first predetermined transmission path in an in-vehicle controller; wherein the first predetermined transmission path includes a switch and an Ethernet physical layer chip between the first control unit and the second control unit; the first control unit and the second control unit are located in the in-vehicle controller; the first control unit acquires path status information during the Ethernet packet exchange process and determines a test result based on the path status information.

[0005] Secondly, this disclosure also provides a testing device, comprising: an interaction module for a first control unit to exchange Ethernet packets with a second control unit via a first predetermined transmission path in an onboard controller; wherein the first predetermined transmission path includes a switch and an Ethernet physical layer chip between the first and second control units; the first control unit and the second control unit are located in the onboard controller; and a test result determination module for the first control unit to acquire path status information during the Ethernet packet exchange process and determine the test result based on the path status information.

[0006] Thirdly, this disclosure also provides an electronic device, the electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the testing method as described in this disclosure.

[0007] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the test methods as described in embodiments of this disclosure.

[0008] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the testing method as described in embodiments of this disclosure.

[0009] The technical solution of this embodiment discloses a first control unit that exchanges Ethernet packets with a second control unit through a first predetermined transmission path in the vehicle controller. The first predetermined transmission path includes a switch and an Ethernet physical layer chip between the first and second control units. The first and second control units are located within the vehicle controller. The first control unit acquires path status information during the Ethernet packet exchange process and determines the test result based on the path status information. In this embodiment, the first and second control units in the vehicle controller exchange Ethernet packets according to the first predetermined transmission path. Compared to existing technologies, this method eliminates the need for external devices for Ethernet packet exchange and requires no manual intervention, enabling automated testing of the Ethernet performance of the vehicle controller and improving testing efficiency. Attached Figure Description

[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0011] Figure 1 This is a schematic diagram of a testing method provided in an embodiment of the present invention;

[0012] Figure 2 This is a schematic diagram of another testing method provided in an embodiment of the present invention;

[0013] Figure 3 This is a schematic diagram of another testing method provided in an embodiment of the present invention;

[0014] Figure 4 A schematic diagram of the functional architecture of the vehicle controller provided in an embodiment of the present invention.

[0015] Figure 5 This is a schematic diagram of a testing device structure provided in an embodiment of the present disclosure;

[0016] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0018] It should be understood that the various steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect. The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". It should be noted that the concepts of "first," "second," etc., mentioned in this disclosure are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies. It should be noted that the modifications "a" and "a plurality" mentioned in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless explicitly indicated otherwise in the context, they should be understood as "one or more". It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of data) shall comply with the requirements of applicable laws, regulations, and relevant provisions.

[0019] Figure 1 This is a schematic flowchart of a testing method provided by an embodiment of the present invention. This embodiment is applicable to situations where Ethernet performance testing of an in-vehicle controller is performed. It should be noted that Ethernet performance testing can be performed simultaneously with aging testing of the in-vehicle controller, saving testing time and improving testing efficiency. This method can be executed by a testing device, which can be implemented in software and / or hardware, optionally through an electronic device, which can be the in-vehicle controller. Figure 1 As shown, the method includes:

[0020] S110, the first control unit, exchanges Ethernet messages with the second control unit through the first preset transmission path in the vehicle controller.

[0021] The vehicle controller can be a hardware device that implements automotive electronic control functions. In this embodiment, no specific limitation is placed on the vehicle controller; for example, it can be an Electronic Control Unit (ECU) or an automotive electronic domain controller. In this embodiment, no specific limitation is placed on the automotive electronic domain controller; it can be any type of domain controller within the vehicle control domain, such as a powertrain domain controller, infotainment domain controller, or autonomous driving domain controller.

[0022] The first control unit and the second control unit are control units in the vehicle controller.

[0023] In this embodiment, the first control unit and the second control unit can be any kind of hardware device in the vehicle controller, such as a microcontroller (MCU) or system on chip (SOC) in the ECU / automotive electronic domain controller.

[0024] In one embodiment, the first control unit may be an MCU and the second control unit may be a SOC.

[0025] In one embodiment, the first control unit may be a SOC and the second control unit may be a MCU.

[0026] The first control unit may include a first test function module, which can be understood as a software module implemented within the first control unit. The second control unit may include a second test function module, which can be understood as a software module implemented within the second control unit. In this embodiment, the first test function module configured in the first control unit exchanges Ethernet messages with the second test function module configured in the second control unit through a first preset transmission path in the vehicle controller.

[0027] In one embodiment, the first control unit can be a test client, and the second control unit can be a test server.

[0028] In one embodiment, the first control unit can be a test server, and the second control unit can be a test client.

[0029] In this embodiment, Ethernet messages exchanged between the first control unit and the second control unit are transmitted through a first predetermined transmission path. This embodiment does not impose specific limitations on the Ethernet messages, as long as they can be transmitted between the first and second control units. The Ethernet messages include Ethernet request messages and Ethernet acknowledgment messages.

[0030] It should be noted that, for ease of understanding, the following embodiments all use the first control unit as a test server and the second control unit as a test client as an example for illustration.

[0031] The Ethernet request message can be considered as a message sent by the second control unit, and the Ethernet acknowledgment message can be a message sent by the first control unit after receiving the Ethernet request message.

[0032] The first set transmission path includes a switch and an Ethernet physical layer chip (PHY) between the first control unit and the second control unit.

[0033] It should be noted that in the first set transmission path, the second control unit is connected to the port corresponding to the second control unit in the switch through the first interface standard; the first control unit is connected to the port corresponding to the first control unit in the switch through the second interface standard; and the port corresponding to the Ethernet physical layer chip in the switch is connected to the corresponding Ethernet physical layer chip through the third interface standard.

[0034] In this embodiment, the first interface standard, the second interface standard, and the third interface standard may be the same or different. The first interface standard, the second interface standard, and the third interface standard can be any interface standard connecting the media access control layer and the physical layer, such as the Reduced Gigabit Media Independent Interface (RGMII), the Serial Gigabit Media Independent Interface (SGMII), the Media Independent Interface (MII), and the Reduced Media Independent Interface (RMII).

[0035] In this embodiment, the switch and the Ethernet physical layer chip are located in the vehicle controller.

[0036] In this embodiment, the switch may have multiple ports, including ports corresponding to the first control unit, ports corresponding to the second control unit, and ports corresponding to the Ethernet physical layer chips. If there are multiple Ethernet physical layer chips, each Ethernet physical layer chip has a corresponding port. The port corresponding to each Ethernet physical layer chip can be connected to the corresponding Ethernet physical layer chip through a third interface standard.

[0037] In this embodiment, the first control unit, the second control unit, and the Ethernet physical layer chip are connected to the switch through their respective interface standards, thereby enabling the transmission of Ethernet packets between the first control unit and the second control unit.

[0038] Optionally, there can be multiple Ethernet physical layer chips, which are connected by twisted-pair cables. Each Ethernet physical layer chip can be configured as a master-slave mode, so that the ports within the switch corresponding to each Ethernet physical layer chip can communicate through the twisted-pair cables between the chips.

[0039] In this embodiment, there is no limitation on the Ethernet standard used for the twisted pair cable; for example, it can be 100Base-T1 or 1000Base-T1. For instance, the twisted pair cable can be an Ethernet cable harness. In this embodiment, the twisted pair cable can be used to connect the connector ports corresponding to the various Ethernet physical layer chips of the vehicle controller, thereby enabling connections between multiple Ethernet physical layer chips.

[0040] In this embodiment, there is no restriction on the master-slave mode set for each Ethernet physical layer chip; it can be set to either master or slave mode. For example, with two Ethernet physical layer chips, the first chip is set to master mode, and the second chip is set to slave mode. Similarly, with three Ethernet physical layer chips, the first chip is set to master mode, the second chip to slave mode, and the third chip to slave mode.

[0041] In this embodiment, the Ethernet physical layer chips are connected via twisted-pair cables and configured in master-slave mode, which can effectively enable communication between the Ethernet physical layer chips. Thus, the ports within the switch corresponding to each Ethernet physical layer chip can communicate via the twisted-pair cables between the Ethernet physical layer chips.

[0042] Optionally, the first transmission path is determined based on the forwarding mode of the switch. The forwarding mode of the switch is either: Ethernet packets received from the second control unit are forwarded through the port corresponding to each of the multiple Ethernet physical layer chips to the port corresponding to the first control unit; or, Ethernet packets received from the first control unit are forwarded through the port corresponding to each of the multiple Ethernet physical layer chips to the port corresponding to the second control unit.

[0043] In this embodiment, the forwarding mode of the switch is that the Ethernet packets received from the second control unit are forwarded through the port corresponding to each of the multiple Ethernet physical layer chips, and finally arrive at the port corresponding to the first control unit; or, the Ethernet packets received from the first control unit are forwarded through the port corresponding to each of the multiple Ethernet physical layer chips, and finally arrive at the port corresponding to the second control unit. In this way, the various Ethernet physical layer chips and the twisted pair between the various Ethernet physical layer chips can be combined to achieve one-time coverage of all test scenarios (i.e., one-time coverage of all switch ports that need to be tested), thereby improving test efficiency.

[0044] For example, consider two Ethernet physical layer chips, denoted as PHY1 and PHY2. The switch has four ports; the port corresponding to the second control unit is denoted as port4, the port corresponding to the first control unit can be denoted as port3, the port corresponding to PHY1 can be denoted as port1, and the port corresponding to PHY2 can be denoted as port2. The first preset transmission path for the second control unit to send an Ethernet request message can be: second control unit - port4 - port1 - PHY1 - PHY2 - port2 - port3 - first control unit. The first preset transmission path for the first control unit to send an Ethernet acknowledgment message can be: first control unit - port3 - port2 - PHY2 - PHY1 - port1 - port4 - second control unit.

[0045] In this embodiment, by connecting multiple Ethernet physical layer chips via twisted-pair cables and setting master-slave modes for each Ethernet physical layer chip, communication between multiple Ethernet physical layer chips can be effectively achieved. This enables communication between the first control unit and the second control unit through switches and Ethernet physical layer chips, while covering all switch ports and all Ethernet physical layer chips. Compared to traditional methods, there is no need to change the connection relationship with the Ethernet physical layer chips. Modifications only need to be made once to complete Ethernet performance testing for all test scenarios, and fully automated testing can be achieved, thereby improving testing efficiency.

[0046] It should be noted that in existing technologies, a separate host computer (one or two host computers) needs to be connected to the Ethernet physical layer chip via a connection cable. Each test requires frequent manual modification of the connection relationship between the host computer and the Ethernet physical layer chip, consuming a significant amount of time and failing to achieve fully automated testing. Furthermore, each test can only cover one test scenario, resulting in low testing efficiency. For example, when the host computer is connected to PHY2, the transmission path could be PHY2-port2-port3; when the host computer is connected to PHY1, the transmission path could be PHY1-port1-port4; when host computer 1 is connected to PHY1 and host computer 2 is connected to PHY2, the transmission path could be PHY1-port1-port2-PHY2. In this embodiment, both the first set transmission path and the transmission path can be understood as the test scenario.

[0047] Optionally, before the first control unit exchanges Ethernet messages with the second control unit through the first preset transmission path in the vehicle controller, the method further includes: the first control unit receiving a test start command sent by the second control unit through the second preset transmission path in the vehicle controller, and sending a test start confirmation command to the second control unit through the second preset transmission path.

[0048] In this embodiment, the second preset transmission path differs from the first preset transmission path. There are no restrictions on the second preset transmission path; it is only necessary that the second control unit can successfully send the test start command to the first control unit, and that the first control unit can successfully send the test start confirmation command to the second control unit. For example, two Ethernet physical layer chips are used, denoted as PHY1 and PHY2. The switch has four ports; the port corresponding to the second control unit is denoted as port4, the port corresponding to the first control unit can be denoted as port3, the port corresponding to PHY1 can be denoted as port1, and the port corresponding to PHY2 can be denoted as port2. The second preset transmission path corresponding to the second control unit sending the test start command can be: second control unit - port4 - port3 - first control unit. The second preset transmission path corresponding to the first control unit sending the test start confirmation command can be: first control unit - port3 - port4 - second control unit.

[0049] The second configured transmission path can be obtained through a new forwarding mode of the switch. For example, the new switch forwarding mode could be forwarding the test start command received from the second control unit to the port corresponding to the first control unit; and forwarding the test start confirmation command received from the first control unit to the port corresponding to the second control unit. That is, the forwarding mode of the switch corresponding to the second configured transmission path is different from the forwarding mode of the switch corresponding to the first configured transmission path.

[0050] In this embodiment, there are no restrictions on the specific content included in the test start command. For example, it may include setting the test duration, setting the traffic rate, and setting the message length, and may also include a test start identifier.

[0051] In this embodiment, the second control unit sends a test start command to the first control unit according to the second preset transmission path. The first control unit receives the test start command from the second control unit, identifies the start test identifier from the command, and saves the set test duration, set flow rate, and set message length. Then, it sends a test start confirmation command to the second control unit according to the second preset transmission path. In this embodiment, the specific content of the test start confirmation command is not limited; it only needs to notify the second control unit that the first control unit should begin testing and enter the test process. Upon receiving the test start confirmation command, the second control unit also begins its test process.

[0052] In this embodiment, through the second set transmission path, the first control unit receives the test start command from the second control unit and returns the test start confirmation command to start the test process, ensuring that the first control unit and the second control unit enter the test state synchronously to perform Ethernet packet interaction and complete the Ethernet performance test.

[0053] Optionally, the second control unit can exchange Ethernet messages through a first preset transmission path in the vehicle controller, including: receiving an Ethernet request message sent by the second control unit through the first preset transmission path, and according to a preset flow rate and a preset message length; and sending an Ethernet acknowledgment message to the second control unit through the first preset transmission path.

[0054] In this embodiment, within the set test duration, the second control unit can send Ethernet request messages to the first control unit through the first set transmission path according to the set traffic rate and set message length. The first control unit sends Ethernet acknowledgment messages to the second control unit through the first set transmission path. If the current test duration has not exceeded the set test duration, the second control unit can resend the Ethernet request message to the first control unit through the first set transmission path according to the set traffic rate and set message length. The first control unit sends Ethernet acknowledgment messages to the second control unit through the first set transmission path, and so on, until the current test duration is greater than or equal to the set test duration. The Ethernet request messages sent each time can be the same or different. The Ethernet acknowledgment messages sent each time can also be the same or different. In this embodiment, there are no restrictions on the traffic rate and message length for sending Ethernet acknowledgment messages; they can correspond to the same or different traffic rate and message length.

[0055] In this embodiment, by receiving Ethernet request messages sent by the second control unit according to a set flow rate and a set message length through a first set transmission path, and returning Ethernet confirmation messages, the Ethernet performance of the vehicle controller can be effectively tested.

[0056] Optionally, before the first control unit acquires path status information during Ethernet packet interaction and determines the test result based on the path status information, the method further includes: the first control unit exiting the test process in response to a test end command sent by the second control unit; wherein the test end command is sent through a first set transmission path when the current test duration exceeds the set test duration; or, the first control unit exiting the test process when it detects that the current test duration exceeds the set test duration.

[0057] The current test duration can be the time interval between the start of the test process and the current time, used to measure the length of time the test has been running.

[0058] In this embodiment, the test process can be terminated in several ways. For example, the first control unit receives a test termination command from the second control unit and terminates the test process accordingly. The second control unit sends the test termination command via a first pre-defined transmission path when the current test duration exceeds the set test duration. Alternatively, if no test termination command is received from the second control unit when the current test duration exceeds the set test duration, the test process can be terminated directly.

[0059] In this embodiment, by receiving a test end command or automatically exiting the test process after timeout sent by the second control unit, the test can be ensured to be completed within the specified time period, and terminated in a timely manner when the current test duration exceeds the set test duration. This can effectively manage the test process and avoid resource waste or the test falling into an abnormal state.

[0060] S120, the first control unit, acquires path status information during Ethernet packet interaction and determines the test result based on the path status information.

[0061] The path status information may include the path status information of the port corresponding to each test terminal and the path status information of the port corresponding to each Ethernet physical layer chip.

[0062] In this embodiment, the test results of the Ethernet performance test of the vehicle controller can be determined based on the path status information of the port corresponding to each test terminal and the path status information of the port corresponding to each Ethernet physical layer chip.

[0063] Optionally, the test result can be determined based on the path status information, including: if the path status information of all ports of the switch is normal, the test result is a pass; if the path status information of at least one port of the switch is abnormal, the test result is a fail.

[0064] The switch port can be a port corresponding to the first control unit, a port corresponding to the second control unit, or a port corresponding to each Ethernet physical layer chip.

[0065] In this embodiment, if the path status information of the ports corresponding to the first control unit, the second control unit, and each Ethernet physical layer chip within the switch is normal, the test result is considered passed. If the path status information of at least one switch port is abnormal, the test result is considered failed. This embodiment does not limit the path status information; it can include, for example, bandwidth, network latency, packet loss rate, cyclic redundancy check (CRC) information, and illegal packet record information. For example, if the bandwidth is greater than or equal to a set bandwidth (e.g., 1Gbps, 100Mbps), the network latency is less than or equal to a set latency value (e.g., 1 millisecond), the packet loss rate is 0, the CRC information is 0, and the illegal packet record information is 0, then it can be considered normal. If the bandwidth is less than the set bandwidth, the network latency is greater than the set latency value, the packet loss rate is not 0, the CRC information is not 0, or the illegal packet record information is not 0, then it can be considered abnormal.

[0066] In this embodiment, by determining the test results through the path status information of all ports, the test results of the Ethernet performance test of the vehicle controller can be accurately obtained.

[0067] The technical solution of this embodiment discloses a first control unit that exchanges Ethernet packets with a second control unit through a first predetermined transmission path in the vehicle controller. The first predetermined transmission path includes a switch and an Ethernet physical layer chip between the first and second control units. The first and second control units are located within the vehicle controller. The first control unit acquires path status information during the Ethernet packet exchange process and determines the test result based on the path status information. In this embodiment, the first and second control units in the vehicle controller exchange Ethernet packets according to the first predetermined transmission path. Compared to existing technologies, this method eliminates the need for external devices for Ethernet packet exchange and requires no manual intervention, enabling automated testing of the Ethernet performance of the vehicle controller and improving testing efficiency.

[0068] For example, the first control unit is a test server, and the second control unit is a test client. Figure 2 This is a schematic diagram of another testing method provided in an embodiment of the present invention. See also... Figure 2 The method provided in this embodiment of the invention specifically includes the following steps:

[0069] S201. Receive the test start command sent by the second control unit according to the second preset transmission path in the vehicle controller.

[0070] The test start command includes setting the test duration, setting the traffic rate, and setting the message length.

[0071] S202. Determine whether to start the test process based on the test start command. If the test process is not started, return to S201. If the test process is started, execute S203.

[0072] S203. Send the test start confirmation command to the second control unit according to the second set transmission path.

[0073] The second set transmission path is different from the first set transmission path.

[0074] S204. Start the test process and modify the switch's forwarding mode and set the master-slave mode for each Ethernet physical layer chip.

[0075] S205. Receive an Ethernet request message sent by the second control unit through the first preset transmission path in the vehicle controller.

[0076] S206. Send an Ethernet acknowledgment message to the second control unit through the first set transmission path.

[0077] S207. Determine whether a test end command has been received from the second control unit. If no test end command has been received and the current test duration has not exceeded the set test duration, return to S206. If a test end command has been received, execute S208.

[0078] The test end command is sent by the second control unit according to the first set transmission path when the current test duration exceeds the set test duration.

[0079] S208, Exit the test process.

[0080] S209. Restore the forwarding mode of the switch and the master-slave mode of each Ethernet physical layer chip.

[0081] S210. Obtain path status information during Ethernet packet interaction, determine the test result based on the path status information, and report the test result to the second control unit.

[0082] In this embodiment of the disclosure, the first control unit of the first control unit and the second control unit of the second control unit in the vehicle controller exchange Ethernet messages according to a first predetermined transmission path. Compared with the prior art, this method eliminates the need for external devices for Ethernet message exchange and requires no manual intervention, enabling automated testing of the Ethernet performance of the vehicle controller and improving testing efficiency. This significantly reduces the Ethernet performance testing time for the vehicle controller, further shortening the vehicle development cycle and ensuring timely mass production.

[0083] Figure 3 This is a schematic diagram of another testing method provided in an embodiment of the present invention. See also... Figure 3 The method provided in this embodiment of the invention specifically includes the following steps:

[0084] S301. Send a test start command to the first control unit according to the second preset transmission path in the vehicle controller.

[0085] The test start command includes setting the test duration, setting the traffic rate, and setting the message length.

[0086] S302. If a test start confirmation instruction is received from the first control unit according to the second set transmission path, the test process is entered; otherwise, wait to receive the test start confirmation instruction from the first control unit.

[0087] The second set transmission path is different from the first set transmission path.

[0088] S303. Send an Ethernet request message to the first control unit through the first set transmission path in the vehicle controller, according to the set flow rate and the set message length.

[0089] S304. Receive the Ethernet acknowledgment message sent by the first control unit through the first set transmission path.

[0090] S305. Determine whether the current test duration exceeds the set test duration. If the current test duration exceeds the set test duration, execute S306. If the current test duration does not exceed the set test duration, return to S303.

[0091] S306. Receive the test results reported by the first control unit.

[0092] In this embodiment of the disclosure, the first control unit of the first control unit and the second control unit of the second control unit in the vehicle controller exchange Ethernet messages according to a first predetermined transmission path. Compared with the prior art, this method eliminates the need for external devices for Ethernet message exchange and requires no manual intervention, enabling automated testing of the Ethernet performance of the vehicle controller and improving testing efficiency. This significantly reduces the Ethernet performance testing time for the vehicle controller, further shortening the vehicle development cycle and ensuring timely mass production.

[0093] Figure 4 This is a schematic diagram of the functional architecture of the vehicle controller provided in an embodiment of the present invention. Figure 5 In this example, two Ethernet physical layer chips are used: PHY1 and PHY2. The switch has four ports: port 3, port 4, port 2, and port 1. Port 3 corresponds to the first control unit, port 4 to the second control unit, port 1 to PHY1, and port 2 to PHY2. A twisted-pair cable connects the external ports of PHY1 and PHY2 to enable communication between them. Solid lines with arrows indicate connections using the corresponding interface standards. Connecting all dashed lines with arrows represents the first predetermined transmission path. That is, the first predetermined transmission path can be: First control unit - Port 3 - Port 2 - PHY2 - PHY1 - Port 1 - Port 4 - Second control unit; or, Second control unit - Port 4 - Port 1 - PHY1 - PHY2 - Port 2 - Port 3 - First control unit.

[0094] Figure 5 This is a schematic diagram of a testing device structure provided in an embodiment of the present disclosure, as shown below. Figure 5 As shown, the device includes: an interaction module 510 and a test result determination module 520;

[0095] The interaction module 510 is used by the first control unit to exchange Ethernet messages with the second control unit through a first preset transmission path in the vehicle controller; wherein, the first preset transmission path includes a switch and an Ethernet physical layer chip between the first control unit and the second control unit; the first control unit and the second control unit are located in the vehicle controller;

[0096] The test result determination module 520 is used by the first control unit to obtain path status information during the Ethernet packet interaction process and determine the test result based on the path status information.

[0097] Optionally, the second control unit is connected to the port corresponding to the second control unit in the switch via a first interface standard; the first control unit is connected to the port corresponding to the first control unit in the switch via a second interface standard; and the port corresponding to the Ethernet physical layer chip in the switch is connected to the corresponding Ethernet physical layer chip via a third interface standard.

[0098] Optionally, there are multiple Ethernet physical layer chips, which are connected by twisted-pair cables, and each Ethernet physical layer chip is configured as a master-slave mode, so that the ports in the switch corresponding to each Ethernet physical layer chip can communicate through the twisted-pair cables between the Ethernet physical layer chips.

[0099] Optionally, the first set transmission path is obtained according to the forwarding mode of the switch; the forwarding mode of the switch is: the Ethernet packet received from the second control unit is forwarded to the port corresponding to the first control unit through the port corresponding to each of the plurality of Ethernet physical layer chips; or, the Ethernet packet received from the first control unit is forwarded to the port corresponding to the second control unit through the port corresponding to each of the plurality of Ethernet physical layer chips.

[0100] Optionally, the above device further includes a start command interaction module, used for: the first control unit receiving a test start command sent by the second control unit through a second preset transmission path in the vehicle controller, and sending a test start confirmation command to the second control unit through the second preset transmission path; wherein the second preset transmission path is different from the first preset transmission path.

[0101] The Ethernet message includes an Ethernet request message and an Ethernet acknowledgment message; the test start command further includes setting a traffic rate and setting a message length. Optionally, the interaction module is specifically used to: receive the Ethernet request message sent by the second control unit through the first set transmission path, and according to the set traffic rate and the set message length; and send the Ethernet acknowledgment message to the second control unit through the first set transmission path.

[0102] The test start command also includes setting the test duration.

[0103] Optionally, a test process exit module is provided, which is used for the first control unit to exit the test process in response to a test end command sent by the second control unit; wherein the test end command is sent through the first set transmission path when the current test duration exceeds the set test duration; or, the test process is exited when the first control unit detects that the current test duration exceeds the set test duration.

[0104] Optionally, the test result determination module is specifically used to: if the path status information of all ports of the switch is normal, then the test result is a test passed; if the path status information of at least one switch port is abnormal, then the test result is a test failed.

[0105] The testing apparatus provided in this disclosure can execute the testing methods provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the methods.

[0106] Figure 6 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0107] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0108] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0109] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as method testing.

[0110] In some embodiments, the method test may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method test described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the method test by any other suitable means (e.g., by means of firmware).

[0111] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0113] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0114] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0115] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0116] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0117] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the testing method provided in any embodiment of this application.

[0118] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0119] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A testing method, characterized in that, include: The first control unit exchanges Ethernet messages with the second control unit through a first predetermined transmission path in the vehicle controller; wherein, the first predetermined transmission path includes a switch and an Ethernet physical layer chip between the first control unit and the second control unit; the first control unit and the second control unit are located in the vehicle controller; The first control unit acquires path status information during the Ethernet packet exchange process and determines the test result based on the path status information.

2. The method according to claim 1, characterized in that, in, The second control unit is connected to the port corresponding to the second control unit in the switch via a first interface standard; the first control unit is connected to the port corresponding to the first control unit in the switch via a second interface standard; the port corresponding to the Ethernet physical layer chip in the switch is connected to the corresponding Ethernet physical layer chip via a third interface standard.

3. The method according to claim 2, characterized in that, in, The number of Ethernet physical layer chips is multiple, and the multiple Ethernet physical layer chips are connected by twisted pair cables. Each Ethernet physical layer chip is configured in master-slave mode, so that the ports in the switch corresponding to each Ethernet physical layer chip can communicate through the twisted pair cables between the Ethernet physical layer chips.

4. The method according to claim 3, characterized in that, in, The first set transmission path is obtained according to the forwarding mode of the switch; the forwarding mode of the switch is: the Ethernet packet received from the second control unit is forwarded to the port corresponding to the first control unit through the port corresponding to each of the multiple Ethernet physical layer chips; or, the Ethernet packet received from the first control unit is forwarded to the port corresponding to the second control unit through the port corresponding to each of the multiple Ethernet physical layer chips.

5. The method according to any one of claims 1-4, characterized in that, Before the first control unit exchanges Ethernet messages with the second control unit via a first pre-defined transmission path in the vehicle controller, the following is also included: The first control unit receives a test start command sent by the second control unit through a second preset transmission path in the vehicle controller, and sends a test start confirmation command to the second control unit through the second preset transmission path; wherein the second preset transmission path is different from the first preset transmission path.

6. The method according to claim 5, characterized in that, in, The Ethernet messages include Ethernet request messages and Ethernet acknowledgment messages; wherein, the test start command further includes setting the traffic rate and setting the message length; and the exchange of Ethernet messages with the second control unit through the first set transmission path in the vehicle controller includes: Receive the Ethernet request message sent by the second control unit through the first set transmission path, and according to the set traffic rate and the set message length; The Ethernet acknowledgment message is sent to the second control unit through the first set transmission path.

7. The method according to claim 5, characterized in that, in, The test start command also includes setting the test duration; before the first control unit acquires path status information during the Ethernet packet interaction process and determines the test result based on the path status information, it also includes: The first control unit exits the test process in response to a test end command sent by the second control unit; wherein, the test end command is sent through the first set transmission path when the current test duration exceeds the set test duration; or, If the first control unit detects that the current test duration exceeds the set test duration, it exits the test process.

8. The method according to any one of claims 1-7, characterized in that, The test results are determined based on the path status information, including: If the path status information of all ports of the switch is normal, then the test result is that the test is passed; If the path status information of at least one switch port is abnormal, the test result is that the test failed.

9. A testing device, characterized in that, include: An interaction module is used for the first control unit to exchange Ethernet messages with the second control unit through a first preset transmission path in the vehicle controller; wherein, the first preset transmission path includes a switch and an Ethernet physical layer chip between the first control unit and the second control unit; the first control unit and the second control unit are located in the vehicle controller; The test result determination module is used by the first control unit to obtain path status information during the Ethernet packet interaction process and determine the test result based on the path status information.

10. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the test method as described in any one of claims 1-8.

11. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the test method as described in any one of claims 1-8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the test method as described in any one of claims 1-8.