A network performance test method, device, equipment, medium and product of a vehicle-mounted microcontroller unit

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

Patent Information

Application Number
CN202510467445.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]本发明提供了一种车载微控制器单元的网络性能测试方法、装置、设备、介质及产品,以解决现有技术测试的协议类型单一的问题

Benefits of technology

[0017]根据本发明的另一方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序在被处理器执行时实现本发明任一实施例所述的车载微控制器单元的网络性能测试方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005359192490000011
    Figure HDA0005359192490000011
  • Figure HDA0005359192490000012
    Figure HDA0005359192490000012
  • Figure HDA0005359192490000021
    Figure HDA0005359192490000021
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, medium, and product for testing the network performance of an onboard microcontroller unit. The method is executed by a lower-level machine built on the core chip of the onboard microcontroller unit. The method includes: the lower-level machine's main task receiving control commands sent by a host computer; the main task controlling the target socket of the network performance test task to switch to a specified working state according to the control commands, and configuring the test environment of the target socket; when the target socket is in the specified working state, testing of specified network performance parameters is performed in the configured test environment. This method, by building a lower-level machine on the core chip of the onboard microcontroller unit, allows the target socket within the lower-level machine to switch to different working states to execute different network performance test tasks, thereby measuring the network performance parameters of the User Datagram Protocol (UDP), the network performance parameters of the Transmission Control Protocol (TCP), and the network throughput of the network interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of network communication technology, and in particular to a method, apparatus, device, medium and product for testing the network performance of an in-vehicle microcontroller unit. Background Technology

[0002] With the rapid development of vehicle technology, the construction of integrated vehicle-road-cloud intelligent connected vehicle systems and software-defined vehicles have become new industry trends. Against this backdrop, as a key technology for achieving efficient and reliable vehicle communication, the importance of network performance testing for in-vehicle networks and microcontroller units (MCUs) is increasingly prominent.

[0003] Existing network performance testing methods for automotive microcontroller units mainly use the Ping tool to test network connectivity and transmission latency. While the Ping tool is a network diagnostic tool, it can only test a limited number of protocol types and cannot measure the transmission performance of User Datagram Protocol (UDP) and Transmission Control Protocol (TCP), nor can it test network throughput. Summary of the Invention

[0004] This invention provides a method, apparatus, device, medium, and product for testing the network performance of an in-vehicle microcontroller unit, in order to solve the problem of the limited protocol types in existing technologies.

[0005] According to one aspect of the present invention, a method for testing the network performance of an on-board microcontroller unit is provided, comprising:

[0006] The primary task of the lower-level machine is to receive control commands sent by the upper-level machine.

[0007] The main task, according to the control command, controls the target socket of the network performance test task to switch to a specified working state and configures the test environment of the target socket;

[0008] When the target socket is in the specified working state, the specified network performance parameters are tested in the configured test environment. The specified network performance parameters include the network performance parameters of the User Datagram Protocol, the network performance parameters of the Transmission Control Protocol, and the network throughput of the network interface.

[0009] According to another aspect of the present invention, a network performance testing device for an on-board microcontroller unit is provided, comprising:

[0010] The receiving module is used for the main task of the lower-level machine to receive control commands sent by the upper-level machine. The lower-level machine is built on the core chip of the vehicle microcontroller unit.

[0011] The control module is used by the main task to control the target socket of the network performance test task to switch to a specified working state according to the control command, and to configure the test environment of the target socket.

[0012] The testing module is used to test specified network performance parameters in a configured test environment when the target socket is in the specified working state. The specified network performance parameters include network performance parameters of User Datagram Protocol, network performance parameters of Transmission Control Protocol, and network throughput of the network interface.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: at least one processor;

[0014] and a memory communicatively connected to the at least one processor;

[0015] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the network performance testing method for the vehicle-mounted microcontroller unit according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the network performance testing method for an in-vehicle microcontroller unit according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the network performance testing method for an in-vehicle microcontroller unit as described in any embodiment of the present invention.

[0018] The technical solution of this invention builds a lower-level machine on the core chip of an on-board microcontroller unit. The target socket in the lower-level machine can switch to different working states to execute different network performance test tasks, thereby realizing the measurement of network performance parameters of the User Datagram Protocol, network performance parameters of the Transmission Control Protocol, and network throughput of the network interface. This solves the problem of the single protocol type in the existing technology and realizes multi-protocol testing.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

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

[0021] Figure 1 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit provided in Embodiment 1 of the present invention.

[0022] Figure 2 This is a diagram of the lower-level machine architecture corresponding to the network performance testing method for the vehicle-mounted microcontroller unit provided in Embodiment 1 of the present invention.

[0023] Figure 3 A schematic diagram of a specified working state in a network performance testing method for an on-board microcontroller unit provided in an embodiment of the present invention;

[0024] Figure 4 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit according to Embodiment 2 of the present invention.

[0025] Figure 5 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit provided in Embodiment 3 of the present invention;

[0026] Figure 6 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit provided in Embodiment 4 of the present invention.

[0027] Figure 7 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit provided in Embodiment 5 of the present invention.

[0028] Figure 8 This is a schematic diagram of the network performance testing device for an on-board microcontroller unit provided in Embodiment Six of the present invention;

[0029] Figure 9 This is a schematic diagram of the lower-level machine structure of a network performance testing method for an on-board microcontroller unit according to an embodiment of the present invention. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention. It should be understood that the various steps described in the method embodiments of the present invention can 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 the present invention is not limited in this respect.

[0031] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0034] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0035] Example 1

[0036] Figure 1This is a flowchart illustrating a network performance testing method for an in-vehicle microcontroller unit provided in Embodiment 1 of the present invention. This method is applicable to the testing of the network performance of an in-vehicle MCU, and is particularly suitable for testing various network protocols. This method can be executed by a network performance testing device for an in-vehicle microcontroller unit, wherein the device can be implemented by software and / or hardware, and is generally integrated on a lower-level machine for execution. The lower-level machine is built on the core chip of the in-vehicle microcontroller unit.

[0037] like Figure 1 As shown in Embodiment 1 of the present invention, a network performance testing method for an on-board microcontroller unit includes the following steps:

[0038] S110, The main task of the lower-level machine receives the control command sent by the upper-level machine.

[0039] The host computer is deployed under an operating system, which can be a Linux operating system or a Windows operating system; the slave computer is built on an MCU core chip. For example, the slave computer can be built on the M-core chip of a Zone Control Unit (ZCU), or it can be built on the M-core chip of AD Pro and AD Max.

[0040] In this embodiment, the main task can be one of at least two scheduled tasks of the core where the network interface of the lower-level machine is located, and the at least two scheduled tasks also include at least one network performance test task.

[0041] The network interface can include Ethernet interface, Bluetooth interface, cellular network interface and Wi-Fi interface, with Ethernet interface being the primary one.

[0042] Figure 2 The following is a diagram of the lower-level machine architecture corresponding to the network performance testing method for the vehicle-mounted microcontroller unit provided in Embodiment 1 of the present invention. Figure 2 As shown, the network interface of the lower-level machine has k scheduled tasks, including one main task and n test tasks, namely network performance test tasks. Each test task has m sockets, which are used for data transmission. The upper-level machine sends control commands to the main task, and the main task can control the target socket to switch to a specified working state according to the control commands.

[0043] In this embodiment, the host computer can send control commands to the main task. These control commands can be used to control the target socket to switch states. The control commands include the target network performance test task and the identifier of the target socket. The identifier of the target network performance test task is used to identify the target network performance test task from multiple network performance test tasks, and the identifier of the target socket is used to identify the target socket from the m sockets of the target network performance test task. The target socket can be understood as the socket specified by the host computer.

[0044] It should be noted that a single control command can only specify one socket as the target socket. Since the lower-level machine has multiple test tasks and supports multi-threaded testing, the upper-level machine can send multiple control commands simultaneously to allow the lower-level machine to control multiple target sockets for state switching, enabling concurrent testing of multiple protocols. Specifically, the upper-level machine can only send control commands to switch the state of the target socket when it is in an idle waiting state.

[0045] S120. The main task controls the target socket of the network performance test task to switch to a specified working state according to the control command, and configures the test environment of the target socket.

[0046] The control commands include information specifying the working status. Figure 3 This is a schematic diagram of a specified working state in a network performance testing method for an on-board microcontroller unit provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the specified working state can include User Datagram Protocol (UDP) receive state, UDP send state, Transmission Control Protocol (TCP) send state, and TCP receive state. When the target socket switches to the specified state, the test of the specified network performance parameters begins. After the test is completed, the target socket switches to the idle state.

[0047] The main task can configure the test environment of the target socket according to the environment configuration parameters. The control command carries the environment configuration parameters. After receiving the control command, the main task can configure the test environment of the target socket according to the environment configuration parameters carried in the control command.

[0048] S130. When the target socket is in the specified working state, the specified network performance parameters are tested in the configured test environment. The specified network performance parameters include the network performance parameters of the User Datagram Protocol, the network performance parameters of the Transmission Control Protocol, and the network throughput of the network interface.

[0049] In this embodiment, if the specified working state is User Datagram Protocol (UDP) reception state, the network performance parameters of UDP can be measured based on the UDP reception state in the configured test environment.

[0050] In this embodiment, if the specified working state is User Datagram Protocol (UDP) sending state, the network throughput of the network interface can be measured based on the UDP receiving state in the configured test environment.

[0051] In this embodiment, if the specified working state is the Transmission Control Protocol (TCP) receive state, the network performance parameters of the TCP can be measured based on the User Datagram Protocol (UDP) receive state in the configured test environment.

[0052] In this embodiment, if the specified working state is the Transmission Control Protocol (TCP) sending state, the network throughput of the network interface can be measured based on the User Datagram Protocol (UDP) receiving state in the configured test environment.

[0053] Furthermore, once the test for the specified network parameters is completed, the target socket switches to an idle state.

[0054] The present invention provides a network performance testing method for an on-board microcontroller unit, which is executed by a lower-level machine built on the core chip of the on-board microcontroller unit. First, the main task of the lower-level machine receives a control command sent by the host machine. Then, according to the control command, the main task controls the target socket of the network performance testing task to switch to a specified working state and configures the test environment of the target socket. Finally, when the target socket is in the specified working state, the specified network performance parameters are tested in the configured test environment. The specified network performance parameters include the network performance parameters of the User Datagram Protocol, the network performance parameters of the Transmission Control Protocol, and the network throughput of the network interface.

[0055] On the one hand, the above method constructs a lower-level machine on the core chip of the vehicle-mounted microcontroller unit. The target socket in the lower-level machine can switch to different working states to execute different network performance test tasks, realize the measurement of network performance parameters of User Datagram Protocol, network performance parameters of Transmission Control Protocol, and network throughput of the network interface, and complete multi-protocol testing. On the other hand, the above method can flexibly switch the working state of the target socket by sending control commands from the upper-level machine to complete network performance testing in a specified working state. Furthermore, the above method can simultaneously switch multiple target sockets to different working states by sending multiple control commands from the upper-level machine. Different target sockets can perform tests of specified network performance parameters in their specified working states, and can complete multi-protocol concurrent testing.

[0056] Example 2

[0057] Figure 4 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit according to Embodiment 2 of the present invention. Embodiment 2 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to Embodiment 1.

[0058] like Figure 4 As shown, the network performance testing method for an on-board microcontroller unit provided in Embodiment 2 of the present invention is executed by a lower-level machine built on the core chip of the on-board microcontroller unit, and includes the following steps:

[0059] S210, The main task of the core where the network interface of the lower-level machine is located receives the control command sent by the upper-level machine.

[0060] S220. The main task, according to the control command, controls the target socket of the network performance test task to switch to the User Datagram Protocol (UDP) receiving state, and configures the test environment of the target socket.

[0061] S230. When the target socket is in the User Datagram Protocol (UDP) receiving state, under the configured test environment, the target socket obtains UDP test data based on an open-source network performance measurement tool, and measures the UDP network performance parameters based on the UDP test data.

[0062] Among them, the open-source network performance measurement tool can be Iperf. Iperf is a communication protocol. Using the Iperf protocol for data transmission, parameters such as network bandwidth, throughput, latency, and packet loss rate can be measured.

[0063] Among them, the network performance parameters of the User Datagram Protocol (UDP) are the UDP receive bandwidth, packet loss rate, and transmission delay jitter.

[0064] In this embodiment, the target socket can receive, analyze, and respond to UDP test data sent by an open-source network performance measurement tool, thereby measuring the UDP receiving bandwidth, packet loss rate, and transmission latency jitter of the MCU.

[0065] Specifically, the target socket acquires User Datagram Protocol (UDP) test data based on an open-source network performance measurement tool, and measures the network performance parameters of the UDP protocol according to the UDP test data. This includes: the target socket receiving the UDP test data, which is sent to the target socket by the host computer according to the data interaction rules defined by the open-source network performance measurement tool; the target socket responding to the UDP test data by sending an acknowledgment message to the host computer according to the data interaction rules; and the target socket analyzing the UDP test data to obtain measurement results for the UDP's receive bandwidth, packet loss rate, and transmission delay jitter.

[0066] The host computer can send UDP test data according to the data interaction rules defined by iperf, i.e., the iperf communication protocol.

[0067] Embodiment 2 of this invention provides a network performance testing method for an on-board microcontroller unit, which specifies the measurement process of network performance parameters of the User Datagram Protocol (UDP). Using this method, UDP transmission performance can be tested.

[0068] Example 3

[0069] Figure 5 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit according to Embodiment 3 of the present invention. Embodiment 3 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to the above embodiments.

[0070] like Figure 5 As shown, the network performance testing method for an on-board microcontroller unit provided in Embodiment 3 of the present invention is executed by a lower-level machine built on the core chip of the on-board microcontroller unit, and includes the following steps:

[0071] S310, The main task of the core where the network interface of the lower-level machine is located receives the control command sent by the upper-level machine.

[0072] S320. The main task, according to the control command, controls the target socket of the network performance test task to switch to the User Datagram Protocol (UDP) sending state, and configures the test environment of the target socket.

[0073] S330. When the target socket is in the User Datagram Protocol (UDP) transmission state, under the configured test environment, the target socket transmits UDP test data based on an open-source network performance measurement tool to measure the network throughput of the network interface.

[0074] One of the open-source network performance measurement tools is Iperf, which is a communication protocol.

[0075] In this embodiment, the target socket can send UDP test data with target bandwidth and duration to the target IP address and target port number based on an open-source network performance measurement tool, thereby enabling the MCU to transmit data to external devices.

[0076] Specifically, the target socket transmits User Datagram Protocol (UDP) test data or Control Protocol (CTP) test data based on an open-source network performance measurement tool to measure the network throughput of the network interface. This includes: the target socket obtaining the target IP address, target port number, target bandwidth, and duration from the information carried in the control command; the lower-level machine simulating the data interaction rules defined by the open-source network performance measurement tool, sending UDP test data with the target bandwidth and duration to the target IP address and the target port number through the target socket according to the data interaction rules, thereby obtaining the measurement result of the network throughput of the network interface.

[0077] Among them, the data interaction rules defined by the open-source network performance measurement tool can be the iperf communication protocol.

[0078] The test data for transmitting User Datagram Protocol (UDP) is automatically generated by the target socket. The target IP address, target port number, target bandwidth, and duration are specified by the host computer, which can configure the test parameters by sending control commands.

[0079] This invention provides a network performance testing method for an in-vehicle microcontroller unit, specifying the process of measuring network throughput of the network interface. Existing technologies use hardware stream injectors to inject traffic into the MCU to test network interface throughput. The disadvantages are that the hardware is too expensive, inconvenient to carry, and complex to operate. This method sends UDP test data with target bandwidth and duration to the target IP address and target port number via the target socket, enabling the MCU to inject traffic to external devices. This method can measure network throughput of the network interface without the need for a hardware stream injector, saving hardware costs and being easy to implement.

[0080] Example 4

[0081] Figure 6 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit according to Embodiment 4 of the present invention. Embodiment 4 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to the above embodiments.

[0082] like Figure 6As shown, the network performance testing method for an on-board microcontroller unit provided in Embodiment 4 of the present invention is executed by a lower-level machine built on the core chip of the on-board microcontroller unit, and includes the following steps:

[0083] S410, the main task of the core where the network interface of the lower-level machine is located receives the control command sent by the upper-level machine.

[0084] S420. The main task controls the target socket of the network performance test task to switch to the transmission control protocol sending state according to the control command, and configures the test environment of the target socket.

[0085] S430. When the target socket is in the transmission control protocol sending state, under the configured test environment, the target socket uses the transmission control protocol test data from the open-source network performance measurement tool to measure the network throughput of the network interface.

[0086] One of the open-source network performance measurement tools is Iperf, which is a communication protocol.

[0087] In this embodiment, the target socket can send TCP test data with target bandwidth and duration to the target IP address and target port number based on an open-source network performance measurement tool, thereby enabling the MCU to transmit data to external devices.

[0088] Specifically, the target socket uses transmission control protocol test data from an open-source network performance measurement tool to measure the network throughput of the network interface. This includes: the target socket obtaining the target IP address, target port number, target bandwidth, and duration from the information carried in the control command; the lower-level machine simulating the data interaction rules defined by the open-source network performance measurement tool, sending the transmission control protocol test data of the target bandwidth and duration to the target IP address and the target port number through the target socket according to the data interaction rules, thereby obtaining the measurement result of the network throughput of the network interface.

[0089] Among them, the data interaction rules defined by the open-source network performance measurement tool can be the iperf communication protocol.

[0090] The target IP address, target port number, target bandwidth, and duration are specified by the host computer. The control protocol test data is automatically generated by the target socket.

[0091] Embodiment 4 of this invention provides a network performance testing method for an in-vehicle microcontroller unit, specifying the process of measuring the network throughput of the network interface. Existing technologies use hardware stream injectors to inject traffic into the MCU to test the network interface throughput. The disadvantages are that the hardware equipment is too expensive, inconvenient to carry, and complex to operate. This method sends TCP test data with target bandwidth and duration to the target IP address and target port number via the target socket, enabling the MCU to inject traffic to external devices. This method can measure the network throughput of the network interface without relying on a hardware stream injector, saving hardware costs and being easy to implement.

[0092] Example 5

[0093] Figure 7 This is a flowchart illustrating a network performance testing method for an on-board microcontroller unit according to Embodiment 5 of the present invention. Embodiment 5 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to the above embodiments.

[0094] like Figure 7 As shown, the network performance testing method for an on-board microcontroller unit provided in Embodiment 5 of the present invention is executed by a lower-level machine built on the core chip of the on-board microcontroller unit, and includes the following steps:

[0095] S510, the main task of the core where the network interface of the lower-level machine is located receives the control command sent by the upper-level machine.

[0096] S520. The main task, according to the control command, controls the target socket of the network performance test task to switch to the transmission control protocol receive state, and configures the test environment of the target socket.

[0097] S530. When the target socket is in the Transmission Control Protocol (TCP) receiving state, under the configured test environment, the target socket acquires TCP test data based on an open-source network performance measurement tool, and measures the network performance parameters of the TCP based on the TCP test data.

[0098] One of the open-source network performance measurement tools is Iperf, which is a communication protocol.

[0099] Among them, the network performance parameters of the transmission control protocol can be the receiving bandwidth of the transmission control protocol.

[0100] In this embodiment, the target socket can receive, analyze, and respond to TCP test data sent by an open-source network performance measurement tool, thereby measuring the TCP receive bandwidth of the MCU.

[0101] Specifically, the target socket acquires Transmission Control Protocol (TCP) test data based on an open-source network performance measurement tool, and measures the network performance parameters of the TCP based on the TCP test data. This includes: the target socket receiving the TCP test data, which is sent to the target socket by the host computer according to the data interaction rules defined by the open-source network performance measurement tool; the target socket responding to the TCP test data by sending an acknowledgment message to the host computer according to the data interaction rules; and the target socket analyzing the TCP test data to obtain the measurement result of the TCP's receive bandwidth.

[0102] The host computer can send TCP test data according to the data interaction rules defined by iperf, i.e., the iperf communication protocol.

[0103] Embodiment 5 of this invention provides a network performance testing method for an on-board microcontroller unit, which specifies the measurement process of network performance parameters of the transmission control protocol. Using this method, TCP transmission performance can be tested.

[0104] Example 6

[0105] Figure 8 This is a schematic diagram of a network performance testing device for an in-vehicle microcontroller unit provided in Embodiment 6 of the present invention. This device is applicable to the testing of the network performance of an in-vehicle MCU, and is particularly suitable for testing various network protocols. The device can be implemented by software and / or hardware, and is generally integrated on a lower-level machine.

[0106] like Figure 8 As shown, the device includes a receiving module 110, a control module 120, and a testing module 130.

[0107] The receiving module 110 is used for the main task of the lower-level machine to receive control commands sent by the upper-level machine. The lower-level machine is built on the core chip of the vehicle microcontroller unit.

[0108] The control module 120 is used by the main task to control the target socket of the network performance test task to switch to a specified working state according to the control command, and to configure the test environment of the target socket.

[0109] The test module 130 is used to perform tests on specified network performance parameters in a configured test environment when the target socket is in the specified working state. The specified network performance parameters include network performance parameters of User Datagram Protocol, network performance parameters of Transmission Control Protocol, and network throughput of the network interface.

[0110] In this embodiment, the device first uses a receiving module 110 to receive control commands sent by a host computer for the main task of the lower-level machine, which is built on the core chip of an in-vehicle microcontroller unit. Then, a control module 120 is used for the main task to control the target socket of the network performance test task to switch to a specified working state according to the control commands, and to configure the test environment of the target socket. Finally, a testing module 130 is used to test specified network performance parameters in the configured test environment when the target socket is in the specified working state. The specified network performance parameters include network performance parameters of the User Datagram Protocol, network performance parameters of the Transmission Control Protocol, and network throughput of the network interface.

[0111] This embodiment provides a network performance testing device for an on-board microcontroller unit, capable of performing multi-protocol testing.

[0112] Furthermore, the main task is one of at least two scheduled tasks of the core where the network interface is located, and the at least two scheduled tasks also include at least one network performance test task.

[0113] Furthermore, the specified operating state is the User Datagram Protocol (UDP) receive state, and the specified performance network parameters are UDP network performance parameters. Accordingly,

[0114] The test module 130 is used to: when the target socket is in the User Datagram Protocol (UDP) receiving state, under the configured test environment, the target socket obtains UDP test data based on an open-source network performance measurement tool, and measures the network performance parameters of the UDP based on the UDP test data.

[0115] Based on the above optimizations, test module 130 includes:

[0116] The first receiving unit is used for the target socket to receive User Datagram Protocol (UDP) test data, which is sent to the target socket by the host computer according to the data interaction rules defined by the open-source network performance measurement tool.

[0117] The first response unit is used for the target socket to respond to the User Datagram Protocol test data and send confirmation information to the host computer according to the data interaction rules.

[0118] The first measurement unit is used to analyze the User Datagram Protocol (UDP) test data of the target socket to obtain the measurement results of the UDP's receiving bandwidth, packet loss rate, and transmission delay jitter.

[0119] Furthermore, the specified operating state is either the User Datagram Protocol (UDP) transmission state or the Transmission Control Protocol (TCP) transmission state, and the specified performance network parameters include the network throughput of the network interface. Accordingly,

[0120] The test module 130 is used to: when the target socket is in the User Datagram Protocol (UDP) sending state or the Transmission Control Protocol (TCP) sending state, under the configured test environment, the target socket transmits UDP test data or TCP test data based on an open-source network performance measurement tool to measure the network throughput of the network interface.

[0121] Based on the above optimizations, test module 130 includes:

[0122] The acquisition unit is used to acquire the target IP address, target port number, target bandwidth, and duration from the information carried by the control command;

[0123] The second measurement unit is used to simulate the data interaction rules defined by the open-source network performance measurement tool on the lower-level machine. It sends the target bandwidth and duration of Transmission User Datagram Protocol (TUDP) test data or Control Protocol (CLP) test data to the target IP address and the target port number according to the data interaction rules through the target socket, thereby obtaining the measurement result of the network throughput of the network interface.

[0124] Furthermore, the specified operating state is the Transmission Control Protocol (TCP) receive state, and the specified performance network parameters include the network performance parameters of the TCP. Accordingly,

[0125] The test module 130 is used to: when the target socket is in the transmission control protocol receiving state, under the configured test environment, the target socket obtains transmission control protocol test data based on an open-source network performance measurement tool, and measures the network performance parameters of the transmission control protocol based on the transmission control protocol test data.

[0126] Based on the above optimizations, test module 130 includes:

[0127] The second receiving unit is used for the target socket to receive transmission control protocol test data, which is sent to the target socket by the host computer according to the data interaction rules defined by the open-source network performance measurement tool.

[0128] The second response unit is used for the target socket to respond to the transmission control protocol test data and send confirmation information to the host computer according to the data interaction rules.

[0129] The third measurement unit is used to analyze the transmission control protocol test data of the target socket to obtain the measurement result of the transmission control protocol's receiving bandwidth.

[0130] Furthermore, the host computer is deployed under an operating system, which includes at least Linux and Windows operating systems.

[0131] Furthermore, the device also includes a switching module for switching the target socket to an idle state after the test of the specified network parameters is completed.

[0132] The network performance testing device for the vehicle-mounted microcontroller unit described above can execute the network performance testing method for the vehicle-mounted microcontroller unit provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0133] Example 7

[0134] Figure 9 A schematic diagram of the lower-level machine 10, which can be used to implement an embodiment of the present invention, is shown. The lower-level machine 10 is built on an automotive microcontroller unit core chip. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.

[0135] like Figure 9 As shown, the lower-level machine 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 can also store various programs and data required for the operation of the lower-level machine 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.

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

[0137] 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 a network performance testing method for an in-vehicle microcontroller unit.

[0138] In some embodiments, a network performance testing method for an in-vehicle microcontroller unit can 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 can be loaded and / or installed on a lower-level machine 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 network performance testing method for an in-vehicle microcontroller unit described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform a network performance testing method for an in-vehicle microcontroller unit by any other suitable means (e.g., by means of firmware).

[0139] 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.

[0140] In some embodiments, a network performance testing method for an in-vehicle microcontroller unit can be implemented as a computer program, which is inadvertently included in a computer program product. When executed by a processor, the computer program implements the network performance testing method for an in-vehicle microcontroller unit according to the present invention. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of the present invention can be written in any combination of one or more programming languages. These computer programs can 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 functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a remote machine as a standalone software package, or entirely on a remote machine or server.

[0141] 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.

[0142] 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).

[0143] 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.

[0144] 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.

[0145] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0146] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for testing the network performance of an on-board microcontroller unit, characterized in that, The method, executed by a lower-level machine built on the core chip of an onboard microcontroller unit, includes: The primary task of the lower-level machine is to receive control commands sent by the upper-level machine. The main task, according to the control command, controls the target socket of the network performance test task to switch to a specified working state and configures the test environment of the target socket; When the target socket is in the specified working state, the specified network performance parameters are tested in the configured test environment. The specified network performance parameters include the network performance parameters of the User Datagram Protocol, the network performance parameters of the Transmission Control Protocol, and the network throughput of the network interface.

2. The method according to claim 1, characterized in that, The specified operating state is the User Datagram Protocol (UDP) receive state, and the specified performance network parameters are UDP network performance parameters. Accordingly, When the target socket is in the specified working state, the specified network performance parameters are tested in the configured test environment, including: When the target socket is in the User Datagram Protocol (UDP) receiving state, under the configured test environment, the target socket obtains UDP test data based on an open-source network performance measurement tool, and measures the network performance parameters of the UDP based on the UDP test data.

3. The method according to claim 2, characterized in that, The network performance parameters of the User Datagram Protocol (UDP) are the UDP receive bandwidth, packet loss rate, and transmission delay jitter. Correspondingly, The target socket acquires User Datagram Protocol (UDP) test data based on open-source network performance measurement tools, and measures the network performance parameters of UDP based on the UDP test data, including: The target socket receives User Datagram Protocol (UDP) test data, which is sent to the target socket by the host computer according to the data interaction rules defined by the open-source network performance measurement tool. The target socket responds to the User Datagram Protocol test data and sends confirmation information to the host computer according to the data interaction rules; The target socket analyzes the User Datagram Protocol (UDP) test data to obtain the measurement results of the UDP's receive bandwidth, packet loss rate, and transmission delay jitter.

4. The method according to claim 1, characterized in that, The specified operating state is either User Datagram Protocol (UDP) transmission state or Transmission Control Protocol (TCP) transmission state, and the specified performance network parameters include the network throughput of the network interface. Accordingly, When the target socket is in the specified working state, the specified network performance parameters are tested in the configured test environment, including: When the target socket is in the User Datagram Protocol (UDP) sending state or the Transmission Control Protocol (TCP) sending state, under the configured test environment, the target socket transmits UDP test data or TCP test data based on open-source network performance measurement tools to measure the network throughput of the network interface.

5. The method according to claim 4, characterized in that, The target socket transmits User Datagram Protocol (UDP) test data or Control Protocol (CTP) test data based on open-source network performance measurement tools to measure the network throughput of the network interface, including: The target socket obtains the target IP address, target port number, target bandwidth, and duration from the information carried in the control command; The lower-level machine simulates the data interaction rules defined by the open-source network performance measurement tool, and sends the target bandwidth and duration of Transmission User Datagram Protocol (TUDP) test data or Control Protocol (CLP) test data to the target IP address and the target port number through the target socket according to the data interaction rules, thereby obtaining the measurement result of the network throughput of the network interface.

6. The method according to claim 1, characterized in that, The specified operating state is the Transmission Control Protocol (TCP) receive state, and the specified performance network parameters include the network performance parameters of the TCP. Accordingly, When the target socket is in the specified working state, the specified network performance parameters are tested in the configured test environment, including: When the target socket is in the Transmission Control Protocol (TCP) receiving state, under the configured test environment, the target socket acquires TCP test data based on open-source network performance measurement tools, and measures the network performance parameters of the TCP based on the TCP test data.

7. The method according to claim 6, characterized in that, The network performance parameter of the transmission control protocol is the receiving bandwidth of the transmission control protocol, and correspondingly, The target socket acquires Transmission Control Protocol (TCP) test data based on open-source network performance measurement tools, and measures the network performance parameters of the TCP based on the TCP test data, including: The target socket receives Transmission Control Protocol (TCP) test data, which is sent to the target socket by the host computer according to the data interaction rules defined by the open-source network performance measurement tool. The target socket responds to the transmission control protocol test data and sends confirmation information to the host computer according to the data interaction rules; The target socket analyzes the Transmission Control Protocol (TCP) test data to obtain the measurement results of the TCP receiving bandwidth.

8. The method according to claim 1, characterized in that, The host computer is deployed under an operating system, which includes at least Linux and Windows operating systems.

9. The method according to claim 1, characterized in that, After the test of the specified network parameters is completed, the target socket switches to an idle state.

10. A network performance testing device for an on-board microcontroller unit, characterized in that, The device includes: The receiving module is used for the main task of the lower-level machine to receive control commands sent by the upper-level machine. The lower-level machine is built on the core chip of the vehicle microcontroller unit. The control module is used by the main task to control the target socket of the network performance test task to switch to a specified working state according to the control command, and to configure the test environment of the target socket. The testing module is used to test specified network performance parameters in a configured test environment when the target socket is in the specified working state. The specified network performance parameters include network performance parameters of User Datagram Protocol, network performance parameters of Transmission Control Protocol, and network throughput of the network interface.

11. A lower-level machine, characterized in that, The lower-level machine is built on the core chip of the vehicle-mounted microcontroller unit and includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the network performance testing method for the vehicle microcontroller unit according to any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the network performance testing method for the vehicle-mounted microcontroller unit as described in any one of claims 1-9.

13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the network performance testing method for an on-board microcontroller unit according to any one of claims 1-9.