Network parameter configuration method, network node, vehicle-mounted system and vehicle
By obtaining the network configuration parameter mapping relationship of network nodes in the vehicle communication network, the target network node can automatically configure its network configuration parameters, solving the problem that traditional manual brushing method affects assembly efficiency and achieving efficient network configuration.
Patent Information
- Application Number
- CN202311354686.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-04-18
AI Technical Summary
In the vehicle communication network, the network configuration parameters of each network node are different, resulting in the traditional assembly method that requires manual flashing, affecting assembly efficiency.
By obtaining the mapping relationship of network configuration parameters of network nodes in the communication network, the target network node can automatically determine and configure its corresponding network configuration parameters.
It realizes the automation of network configuration, saves time for assemblers to configure network configuration parameters, and improves the configuration efficiency of communication networks.
Smart Images

Figure CN119854125A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and specifically to a method for configuring network parameters, a network node, an on-board system, and a vehicle. Background Art
[0002] In the vehicle communication network, the network nodes need to be configured with network configuration parameters before data can be transmitted through the bus. Since the network configuration parameters of each network node are different, in the traditional vehicle communication network assembly method, the corresponding network configuration parameters need to be manually written to each network node through software. However, this method may affect the configuration efficiency of the communication network.
[0003] For example, in an in-vehicle 10BASE-T1S Ethernet, multiple network nodes (e.g., multiple radars) on a bus need to be statically configured with different network configuration parameters to ensure normal communication between network nodes. If the same hardware equipment needs to be distinguished and identified in the hardware just because of different network configuration parameters during production or after-sales, it will affect assembly efficiency. Summary of the invention
[0004] The embodiments of the present application are dedicated to providing a method for configuring network parameters, a network node, a vehicle-mounted system and a vehicle. The following is an introduction from the following aspects.
[0005] In a first aspect, a method for configuring network parameters is provided, which is applied to a communication network, wherein network nodes in the communication network are connected via a bus, and the communication network includes a target network node. The method includes: the target network node obtains a first mapping relationship, wherein the first mapping relationship includes network configuration parameters of the network nodes in the communication network; the target network node determines the network configuration parameters corresponding to the target network node based on the first mapping relationship; and the target network node performs network configuration based on the network configuration parameters corresponding to the target network node.
[0006] As a possible implementation method, the first mapping relationship includes an association relationship between a preset distance corresponding to a network node in a communication network and a network configuration parameter, wherein the preset distance is determined based on a preset bus length between the network node in the communication network and a reference network node, and the reference network node is a network node in the communication network.
[0007] As a possible implementation method, the target network node determines the network configuration parameters corresponding to the target network node based on the first mapping relationship, including: the target network node obtains the actual distance between the target network node and the reference network node; the target network node determines a preset distance that matches the actual distance in the first mapping relationship based on the actual distance; the target network node determines the network configuration parameters corresponding to the target network node from the first mapping relationship based on the preset distance that matches the actual distance.
[0008] As a possible implementation manner, the target network node obtains the actual distance between the target network node and the reference network node, including: the target network node receives a first signal sent by the reference network node; in response to the first signal, the target network node sends a second signal to the reference network node, wherein the first signal and the second signal are used to measure the actual distance.
[0009] As a possible implementation manner, the network configuration parameters include one or more of the following parameters: a node identity ID, a media access control MAC address, and an Internet Protocol IP address.
[0010] In a second aspect, a method for configuring network parameters is provided, which is applied to a communication network, wherein network nodes in the communication network are connected via a bus, and the communication network includes a reference network node and a target network node, and the method includes: the reference network node obtains a first mapping relationship, wherein the first mapping relationship includes network configuration parameters of the network nodes in the communication network; the reference network node communicates with the target network node based on the first mapping relationship; wherein the first mapping relationship includes an association relationship between a preset distance corresponding to the network nodes in the communication network and the network configuration parameters, wherein the preset distance is determined based on a preset bus length between the network nodes in the communication network and the reference network node.
[0011] As a possible implementation method, the reference network node communicates with the network nodes in the communication network based on a first mapping relationship, including: the reference network node obtains the actual distance between the target network node and the reference network node; the reference network node determines a preset distance that matches the actual distance in the first mapping relationship based on the actual distance; the reference network node determines the network configuration parameters corresponding to the target network node from the first mapping relationship based on the preset distance that matches the actual distance; the reference network node communicates with the target network node based on the network configuration parameters corresponding to the target network node.
[0012] As a possible implementation manner, the reference network node obtains the actual distance between the target network node and the reference network node, including: the reference network node sends a first signal to the target network node; in response to sending the first signal, the reference network node receives a second signal sent by the target network node; the reference network node determines the actual distance between the target network node and the reference network node based on the transmission delay of the first signal and the transmission delay of the second signal.
[0013] As a possible implementation manner, the network configuration parameters include one or more of the following parameters: a node identity ID, a media access control MAC address, and an Internet Protocol IP address.
[0014] According to a third aspect, a network node is provided, comprising modules for executing any possible implementation of the first aspect.
[0015] According to a fourth aspect, a network node is provided, comprising modules for executing any possible implementation of the second aspect.
[0016] In a fifth aspect, a vehicle-mounted system is provided, comprising the network nodes in the third aspect and the fourth aspect.
[0017] In a sixth aspect, a vehicle is provided, characterized in that it includes the vehicle-mounted system in the fifth aspect.
[0018] In the seventh aspect, a computer program product is provided, comprising a computer program or instructions, which, when the computer program or instruction processor is executed, implements any possible implementation method as in the first aspect, or, when the computer program or instruction processor is executed, implements any possible implementation method as in the second aspect.
[0019] The embodiment of the present application provides a method for configuring network parameters, in which the target network node obtains a first mapping relationship, and the first mapping relationship includes network configuration parameters of the network nodes in the communication network. Therefore, the target network node can determine the network configuration parameters corresponding to the target network node based on the first mapping relationship and perform network configuration. Since the target network node in the embodiment of the present application can automatically configure the network configuration parameters, compared with the manual flashing method in the traditional solution, it saves the time of the assembler to configure the network configuration parameters, which helps to improve the configuration efficiency of the communication network. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 Shown is a schematic block diagram of an Ethernet network.
[0021] Figure 2 Shown is a schematic diagram of a scenario to which the application embodiment is applicable.
[0022] Figure 3Shown is a schematic diagram of another scenario to which the application embodiment is applicable.
[0023] Figure 4 It is a schematic diagram of a network node according to an embodiment of the present application.
[0024] Figure 5 Shown is a schematic diagram of another scenario to which the application embodiment is applicable.
[0025] Figure 6 It is a schematic diagram of a method for configuring network parameters of an embodiment of the present application.
[0026] Figure 7 It is a schematic flowchart of the configuration process of network parameters of an embodiment of the present application.
[0027] Figure 8 It is a schematic block diagram of the vehicle-mounted system of an embodiment of the present application.
[0028] Fig. 9 It is a schematic block diagram of a vehicle according to an embodiment of the present application.
[0029] Fig.10 It is a schematic block diagram of a vehicle-mounted system according to another embodiment of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0031] For ease of understanding, the following is combined with Figures 1 to 5 Introduce the scenarios to which the embodiments of the present application are applicable. It should be understood that in the embodiments of the present application, the communication network may include a local area network, such as an Ethernet local area network, a wireless local area network, a virtual local area network, a fiber-based local area network, a controller area network (CAN), a home local area network, a school local area network, a company local area network, etc. Of course, in the embodiments of the present application, the communication network may also include a wireless network, such as a wireless fidelity (WIFI) network, a cellular network, a satellite network, a wireless sensor network, a fourth generation mobile communications technology (4G) network, and a fifth generation mobile communications technology (5G) network. The following will be introduced by taking the Ethernet local area network in the vehicle-mounted system as an example.
[0032] With the continuous development of automobile intelligence and Internet, vehicles have higher and higher requirements for data transmission capabilities (also known as bandwidth), so there is an urgent need for an in-vehicle network with high bandwidth, good openness, good compatibility, good reliability, and at the same time meeting the strict requirements of vehicles. As a result, in-vehicle Ethernet came into being. In-vehicle Ethernet can connect various control units (electronic control units, ECUs) of the vehicle system through a wired network. Compared with traditional Ethernet, in-vehicle Ethernet can use a pair of twisted pairs for data transmission, while traditional Ethernet requires multiple pairs of twisted pairs. Therefore, in-vehicle Ethernet can reduce the number of wiring harnesses in the vehicle system. In-vehicle Ethernet can also achieve different data transmission rates according to different communication requirements. For example, in-vehicle Ethernet can achieve data transmission rates of 10Mbps, 100Mbps, or even 1000Mbps.
[0033] like Figure 1 As shown, the automotive Ethernet may have five layers, namely: application layer 110, transport layer 120, network layer 130, data link layer 140, and physical layer 150, each layer having different functions. Next, the five layers of the automotive Ethernet are introduced in detail.
[0034] The application layer 110 refers to a layer for processing communication between applications. The application layer 110 can provide a series of protocols and services to enable applications within the vehicle to exchange data, communicate, and collaborate.
[0035] The transport layer 120 refers to the layer for data transmission within the vehicle system or between vehicles. On the one hand, the transport layer 120 can provide reliable data transmission and error detection. On the other hand, the transport layer 120 can use protocols such as TCP and UDP to meet different data transmission requirements and support data transmission for various vehicle applications.
[0036] The network layer 130 refers to the layer that selects the most appropriate path for a message or packet through a communication subnet through a routing selection algorithm in an automotive Ethernet. The network layer 130 can control the information forwarding between the data link layer and the transport layer, and establish, maintain, and terminate the network connection. Specifically, the data of the data link layer 140 is converted into a data packet at the network layer 130, and then the information is transmitted from one network device to another through path selection, segment combination, sequence, routing, etc.
[0037] The network layer 130 can be divided into multiple Ethernet subnets. When communicating between different Ethernet subnets, in order to identify and find devices in the network, a unique address is assigned to the devices in each subnet. Since the physical technology used by each subnet may be different, this address should be a logical address, such as an Internet Protocol (IP) address. The IP protocol is used to transmit data between a source address and a destination address. The IP protocol can include IPv4 and IPv6. For example, IPv4 can use a 32-bit binary integer as an address, generally expressed in dotted decimal format, such as 192.168.0.1.
[0038] The data link layer 140 refers to the layer used to implement data transmission in the automotive Ethernet. On the one hand, the data link layer 140 can divide the data packets of the network layer into smaller data frames and transmit them on the physical medium. On the other hand, the data link layer 140 can also be responsible for error detection and correction and handle data retransmission.
[0039] The data link layer 140 may include a switch, which may have one or more of the following functions: 1. The switch may forward data frames based on media access control (MAC) address identification; 2. The switch may divide a large vehicle Ethernet into multiple smaller regional Ethernet networks, each with its own bandwidth and collision domain, thereby improving the performance and reliability of the vehicle Ethernet; 3. The switch may expand the scale and coverage of the vehicle Ethernet by connecting multiple switches, so that the network can support more devices; 4. The switch may forward broadcast and multicast data packets, so that devices in the network can receive relevant information and notifications.
[0040] In the data link layer 140, each ECU or other device of the vehicle Ethernet has a unique physical address, called a MAC address. The length of the MAC address is 48 bits and is assigned by the manufacturer. For example, 00-17-4F-08-78-88. The MAC address can contain a source address and a destination address. The source MAC address is used to identify the unique device sending data in the network, and the destination MAC address is used to identify the unique device or a group of devices receiving data in the network.
[0041] The physical layer 150 refers to the level of physical media and related technologies used when transmitting data within the vehicle system or between vehicles. On the one hand, the physical layer 150 can convert data into electrical signals and transmit them through physical media. On the other hand, the physical layer 150 can use specific encoding and decoding technologies, support different transmission rates, and use physical layer protocols to manage data transmission. In-vehicle Ethernet can define different Ethernet physical layer standards according to different data transmission rates. For example, the Ethernet physical layer standard corresponding to the in-vehicle Ethernet with a data transmission rate of 10Mbps can be 10BASE-T1S. For another example, the Ethernet physical layer standard corresponding to the in-vehicle Ethernet with a data transmission rate of 100Mbps can be 100BASE-T1S. For another example, the Ethernet physical layer standard corresponding to the in-vehicle Ethernet with a data transmission rate of 100Mbps can be 1000BASE-T1S. For another example, the Ethernet physical layer standard corresponding to the in-vehicle Ethernet with a data transmission rate of 1000Mbps can be 1000BASE-T1S.
[0042] A media dependent interface (MDI) interface may be provided in the physical layer 150. The MDI interface is an interface for connecting a switch and a terminal device (e.g., a computer, a server, a router, etc.). The MDI interface may be used to connect a network interface card or a network interface controller of a terminal device to transmit and receive data. The MDI interface may transmit data signals through an Ethernet cable to communicate with other devices.
[0043] The physical layer 150 may include an Ethernet topology, which refers to the way in which each network node (e.g., ECU) of various communication entities in an Ethernet network is connected to each other. There may be various types of Ethernet topologies, such as a bus topology, a ring topology, and a star topology.
[0044] The in-vehicle 10M Ethernet can adopt the bus topology mentioned above. In the bus topology in-vehicle Ethernet, all network nodes are connected to the same connection medium, which can be called a bus. The network formed by connecting several network nodes on the bus is a bus-type network. In a bus-type network, the switch can be connected through the port of the network node (for example, the MDI interface). The port on each network node has the function of receiving and sending data, and the data transmission between network nodes is forwarded through the switch. The switch can also be connected to switches in other regional in-vehicle Ethernets for data transmission between devices in other regional in-vehicle Ethernets. The switch can also be connected to the processor for data transmission between the network node and the processor.
[0045] In-vehicle Ethernet can support one or more of the following communication modes: half-duplex point-to-point communication mode, full-duplex point-to-point communication mode and half-duplex multi-point communication mode. Different communication technologies can be selected in the half-duplex multi-point communication mode, such as carrier sense multiple access / collision detection protocol (CSMA / CD). Since all network nodes share a common bus, only one network node can transmit data at a time. In order to ensure that data transmission between network nodes does not conflict and has equal data transmission opportunities, in some implementations, physical layer collision avoidance (PLCA) technology can also be used. The following will be combined with Figure 2 A detailed introduction to PLCA technology.
[0046] Based on PLCA technology, the in-vehicle Ethernet can assign a unique node identity document (ID) to each network node, where the node ID is set to 0, which means it is the main network node, and other network nodes will be assigned other node ID numbers. Each network node has the opportunity to transmit data in turn according to the node ID number. If the main network node sends a data transmission start signal, a round of data transmission cycle begins. When a network node has a transmission opportunity, if the network node has a data transmission requirement, it sends data. After the data transmission is completed, the network node with the next node ID has a transmission opportunity. When a network node has a transmission opportunity, if the network node has no data transmission requirement, the bus will be idle for a period of time. After the time threshold is exceeded, the transmission opportunity will be given to the network node with the next node ID. When all network nodes complete a transmission cycle, the main network node sends a data transmission start signal again to start the next round of data transmission cycle. The start signal of data transmission can be of multiple types, for example, it can be a beacon start signal. Based on the PLCA mechanism, all network nodes on the in-vehicle Ethernet bus can avoid data transmission conflicts, and each network node can have equal transmission opportunities, ensuring the data transmission delay. For example, Figure 2As shown, the node ID of switch 1 connected to the in-vehicle Ethernet 200 is set to 0, that is, switch 1 is the main network node. The node ID of ECU210 is set to 1, the node ID of ECU220 is set to 2, and the node ID of ECU230 is set to 3. Based on PLCA technology, the node ID of switch 1 is 0, so after switch 1 sends a Beacon start signal, it can have the opportunity to transmit data first. The node ID of ECU210 is 1, so the next one to have the opportunity to transmit data is ECU220. If ECU220 has no data transmission demand, after waiting for a certain period of time, ECU220 gives up the data transmission opportunity to ECU230. After completing a data transmission cycle, switch 1 sends the Beacon start signal again to start the next round of data transmission cycle. It should be noted that switch 1 can connect to the buses of multiple regional subnets, for example Figure 2 S1, S2, and S3 in it.
[0047] In a distributed vehicle electrical and electronic architecture, ECUs are usually specific to a certain function, so there are many ECUs in the vehicle system. At this time, the communication capabilities between ECUs are very limited. Therefore, in the next generation of central + regional automotive electrical and electronic architecture, the subnets in the vehicle system area will use automotive Ethernet technology to achieve data communication between ECUs, smart actuators, sensors and other network nodes in the area. Figure 3 As shown, in the vehicle Ethernet system, Ethernet 200 and regional subnet 310 are both regional subnets of the vehicle system, and the electronic devices in the regional subnet 310 (for example, infotainment system, vehicle remote control and remote reading system, etc.) can communicate through regional ECU 320, or the electronic devices in the regional subnet 310 can communicate with the electronic devices in Ethernet 200 (for example, ECU 210) through switch 1. In some scenarios, regional ECU 320 and regional ECU 330 can also be a regional controller platform, for example, a body domain control platform, a cockpit domain control platform, and a vehicle computer system domain control platform. Ethernet 200 and regional subnet 310 can exchange information with processing unit 340 through switch 1 or switch 2. Among them, processing unit 340 can provide the computing, storage, communication and management capabilities required by the vehicle system, and can be called a vehicle central computer. The embodiment of the present application does not specifically limit the type of processing unit 340, for example, processing unit 340 can be a system-on-chip chip.
[0048] The faster the data transmission speed of the in-vehicle Ethernet, the higher the corresponding equipment cost may be. Therefore, some low-bandwidth communication devices in the car, such as in-vehicle entertainment systems, Bluetooth connection devices, in-vehicle instrument panel displays, in-vehicle temperature control systems, in-vehicle lighting systems, in-vehicle safety systems, in-vehicle control buttons and switches, etc., can all use 10Mbps bandwidth in-vehicle Ethernet (hereinafter referred to as 10M in-vehicle Ethernet), thereby reducing the cost of vehicle production without affecting vehicle performance.
[0049] In a communication network, the communication between network nodes may need to be connected on a bus, and because there are multiple network nodes on a bus, it is necessary to set relevant network configuration parameters to identify different network nodes so that data can be sent to the correct location. Figure 4 As shown, the communication network may include a network node 410 and a network node 420, where the network node 410 may be referred to as a reference network node and the network node 420 may be referred to as a target network node. The network node 410 and the network node 420 may be connected via a bus S to exchange information.
[0050] The network node 410 may be any type of electronic device. In some implementations, the network node 410 may be a terminal device, such as a personal computer, a server, a router, a switch, a printer, a network storage device, etc. In other implementations, the network node 410 may be an in-vehicle electronic device, such as an in-vehicle entertainment system, a navigation system, an air conditioning system, an in-vehicle control unit, an in-vehicle communication system, etc.
[0051] The network node 420 may be any type of electronic device. In some implementations, the network node 420 may be a terminal device, such as a personal computer, a server, a router, a switch, a printer, a network storage device, etc. In other implementations, the network node 420 may be an in-vehicle electronic device, such as an in-vehicle entertainment system, a navigation system, an air conditioning system, an in-vehicle control unit, an in-vehicle communication system, etc.
[0052] In addition to the network node 410 and the network node 420, there are other network nodes on the bus S. Therefore, when the network node 410 sends data to the network node 420, the network node 410 or the communication network in which it is located must be able to identify which network node is the network node 420. Therefore, relevant parameters need to be configured in the network node 420. The following will continue to use the communication network as the automotive Ethernet as an example for explanation.
[0053] Under the vehicle electrical and electronic architecture, the vehicle can be divided into different areas, in some cases, based on Figure 5As shown in the figure, for example, the vehicle can be divided into the front area of the vehicle, the center area of the vehicle, and the center area of the vehicle. In each area, some electronic devices (also called network nodes) are connected to different regional subnets through the same bus. In the front area of the vehicle, radars and ambient lights at different locations are connected to the same regional subnet. Radars at different locations in the rear area of the vehicle are connected to the same regional subnet. Speakers at different locations in the center area of the vehicle are in the same regional subnet. These network nodes with the same device type but different installation locations, or different installation locations and device types, need to configure different network configuration parameters at each network node to communicate in the same network.
[0054] In the production or after-sales process, the traditional communication network assembly method requires marking on the hardware of each network node, or manually flashing the corresponding network configuration parameters for each network node through software to ensure normal network communication between network nodes. However, this method may affect the efficiency of production assembly and after-sales replacement.
[0055] Therefore, in order to solve the above problems, the present application provides a method for configuring network parameters. Figure 6 As shown, in step S610, the target network node obtains a first mapping relationship, and the first mapping relationship includes network configuration parameters of the network node in the communication network. In step S620, the target network node can determine the network configuration parameters corresponding to the target network node based on the first mapping relationship to perform network configuration. In an embodiment of the present application, since the target network node can automatically configure the network configuration parameters, compared with the manual flashing method in the traditional solution, it saves the time of the assembler to configure the network configuration parameters, which helps to improve the configuration efficiency of the communication network.
[0056] In an embodiment of the present application, the first mapping relationship may be a mapping relationship between a network node and a network configuration parameter in a communication network.
[0057] In some implementations, the network configuration parameter may be one or more of a node ID, a MAC address, and an IP address.
[0058] In some implementations, the first mapping relationship may be an association relationship between a preset distance corresponding to a network node in the communication network and a network configuration parameter. The preset distance may be set based on a preset bus length between a target network node and a reference network node in the communication network. When the communication network is designed, the length of the wiring harness of the target network node and the reference network node is already determined, and the length of the wiring harness may be used as the preset distance between the target network node and the reference network node.
[0059] In another possible implementation, the straight-line distance between the target network node and the reference network node may also be used as the preset distance between the target network node and the reference network node. Optionally, the preset distance between the target network node and the reference network node may also be determined based on other methods, for example, based on the type and length of the wiring harness connected between the target network node and the reference network node, wherein the wiring harness type may be determined based on the communication type, such as LIN, CAN, CANFD, Ethernet, etc.
[0060] Therefore, the preset distance between the two can be obtained conveniently and quickly, which helps to improve the efficiency of configuring network configuration parameters in the embodiment of the present application.
[0061] For ease of understanding, let's combine Figure 4 The method for determining the above-mentioned preset distance in the embodiment of the present application is introduced. Of course, the above-mentioned preset distance can also be determined in other different ways, and the present application does not limit this.
[0062] like Figure 4 As shown, in the communication network, a network node 410 and a network node 420 are included, the network node 410 can be a reference network node, and the network node 420 can be a target network node. The reference network node and the target network node are connected through a wire harness S (e.g., a pair of unshielded twisted pairs) for data transmission. At this time, the length of the wire harness between the reference network node and the target network node is the preset distance between the two.
[0063] In an embodiment of the present application, the association relationship may be a correspondence between a preset distance and one or more parameters in the network configuration parameters. In some cases, the association relationship may be a position correspondence between a preset distance and one or more parameters in the network configuration parameters in the same mapping table. For example, as shown in Table 1, the network configuration parameter mapping table includes three network configuration parameters, namely: node ID, MAC address, and IP address. The network nodes with different preset distances correspond to different network configuration parameters in Table 1. For example, as shown in Table 1, the node ID corresponding to the network node with a preset distance of 100 cm is 1, the MAC address is 20:00:00:00:20:01, and the IP address is 172.168.20.1. For another example, as shown in Table 1, the node ID corresponding to the network node with a preset distance of 200 cm is 2, the MAC address is 20:00:00:00:20:02, and the IP address is 172.168.20.2. For another example, as shown in Table 1, the node ID corresponding to the network node with a preset distance of 300 cm is 3, the MAC address is 20:00:00:00:20:03, and the IP address is 172.168.20.3. For another example, as shown in Table 1, the node ID corresponding to the network node with a preset distance of 400 cm is 4, the MAC address is 20:00:00:00:20:04, and the IP address is 172.168.20.4. For another example, as shown in Table 1, the node ID corresponding to the network node with a preset distance of 500 cm is 5, the MAC address is 20:00:00:00:20:05, and the IP address is 172.168.20.5. For another example, as shown in Table 1, the node ID corresponding to the network node with a preset distance of 600 cm is 6, the MAC address is 20:00:00:00:20:06, and the IP address is 172.168.20.6.
[0064] Table 1: Network configuration parameter mapping table
[0065] Serial number Preset distance Node ID MAC Address IP address 1 100 1 20:00:00:00:20:01 172.168.20.1 2 200 2 20:00:00:00:20:02 172.168.20.2 3 300 3 20:00:00:00:20:03 172.168.20.3 4 400 4 20:00:00:00:20:04 172.168.20.4 5 500 5 20:00:00:00:20:05 172.168.20.5 6 600 6 20:00:00:00:20:06 172.168.20.6
[0066] In some other possible implementations, the first mapping relationship may be an association relationship between a preset parameter corresponding to a network node in a communication network and a network configuration parameter. In some cases, the association relationship may be a positional correspondence relationship between a preset parameter and one or more parameters in the network configuration parameter in the same mapping table. For example, as shown in Table 2, the network configuration parameter mapping table includes three network configuration parameters, namely: node ID, MAC address, and IP address. The network nodes with different preset parameters correspond to different network configuration parameters in Table 2. Taking the preset parameter as a preset node ID as an example, if the preset node ID of the network node is the same as the node ID in Table 2, then the network configuration parameter of the network node is the parameter of the row where the node ID is located in Table 2. For example, as shown in Table 2, the network node with a preset node ID of 1 corresponds to a node ID of 1, a MAC address of 20:00:00:00:20:01, and an IP address of 172.168.20.1. For another example, as shown in Table 2, the network node with a preset node ID of 2 corresponds to a node ID of 2, a MAC address of 20:00:00:00:20:02, and an IP address of 172.168.20.2. For another example, as shown in Table 2, the network node with a preset node ID of 3 corresponds to a node ID of 3, a MAC address of 20:00:00:00:20:03, and an IP address of 172.168.20.3. For another example, as shown in Table 2, the network node with a preset node ID of 4 corresponds to a node ID of 4, a MAC address of 20:00:00:00:20:04, and an IP address of 172.168.20.4. For another example, as shown in Table 2, the network node with a preset node ID of 5 corresponds to a node ID of 5, a MAC address of 20:00:00:00:20:05, and an IP address of 172.168.20.5. For another example, as shown in Table 2, the network node with a preset node ID of 6 corresponds to a node ID of 6, a MAC address of 20:00:00:00:20:06, and an IP address of 172.168.20.6.
[0067] Table 2: Network configuration parameter mapping table
[0068]
[0069]
[0070] As described above, the network configuration parameters corresponding to the target network node can be determined based on the association between the preset distance corresponding to the network node in the communication network and the network configuration parameters. In this process, since there may be multiple target network nodes in the communication network, in some scenarios, it may be necessary to distinguish the different preset distances corresponding to different target network nodes, and then determine the network configuration parameters corresponding to each target network node. The embodiment of the present application does not specifically limit the manner in which the target network node obtains the preset distance. In some implementations, the method for the target network node to obtain the preset distance may be to obtain the actual distance between the target network node and the reference network node, and determine the preset distance that matches the actual distance based on the actual distance, which helps to simplify the complexity of the target network node obtaining the preset distance.
[0071] In the embodiment of the present application, the method for obtaining the actual distance between the target network node and the reference network node is not specifically limited. In some implementations, the actual distance can be obtained by measuring the transmission delay of the network data packet from the reference network node to the target network node, which helps to improve the accuracy of the actual distance obtained. For example, the reference network node can send a first signal to the target network node. After the target network node receives the first signal, it responds to the first signal and sends a second signal to the reference network node. After the reference network node receives the second signal, the transmission delay is calculated. For another example, the reference network node can send a first signal to the target network node, and the target network node calculates the transmission delay after receiving the first signal.
[0072] In the embodiment of the present application, the types of the first signal and the second signal are not specifically limited. For example, the first signal and the second signal may be pulse signals. Figure 4 The method of obtaining the actual distance in an embodiment of the present application is introduced.
[0073] like Figure 4As shown, in the communication network, a network node 410 and a network node 420 are included, the network node 410 can be a reference network node, and the network node 420 can be a target network node. The network node 410 and the network node 420 are connected by a wiring harness S for data transmission. The network node 410 sends a first pulse signal to the network node 420, and the network node 420 immediately responds to the second pulse signal after receiving the first pulse signal and transmits it back to the network node 410. The network node 410 records the number of interactions of the pulse signal between the network node 410 and the network node 420 within a certain time period T as N. Since a delay may be generated when the pulse signal is processed inside the network node 410 and the network node 420, it is necessary to subtract the delay of the pulse signal processed inside the node to obtain the signal propagation delay between the network node 410 and the network node 420. Assume that the delay of the first pulse signal and the second pulse signal in the network node 410 is t1, and the delay of the first pulse signal and the second pulse signal in the network node 420 is t2. The interaction time of each round trip of the pulse signal is calculated as t. The corresponding calculation formula is: t = (T / N-t1-t2) / 2. Since the propagation delay of the pulse signal in a unit length of the wire bundle is fixed, the actual distance between the network node 410 and the network node 420 can be calculated by the round trip delay t of the pulse signal between the two.
[0074] In the embodiments of the present application, the method for measuring the propagation delay between network nodes is not specifically limited. For example, when the communication network is a 10M vehicle Ethernet, a 10M Ethernet topology discovery technology can be used. This technology measures the actual distance between two 10M network nodes through the number of pulse signal interactions between the two nodes, and determines the position of each node in the bus, thereby realizing bus topology discovery.
[0075] As can be seen from the above, the preset distance and the actual distance corresponding to the target network node are obtained according to different methods, so the preset distance corresponding to the target network node may be the same as the measured actual distance, or it may be different. In some scenarios, the values of the preset distance and the actual distance may differ greatly. Therefore, in some implementations, the target network node can obtain the preset distance based on the difference between the actual distance and the preset distance being within the preset threshold. For example, if the difference between the actual distance measured by the target network node and the first preset distance is within the preset threshold, the first preset distance is the preset distance of the target network node. For another example, if the difference between the actual distance measured by the target network node and the second preset distance is outside the preset threshold, the second preset distance is not the preset distance of the target network node. Taking Table 1 as an example, the preset distance corresponding to the first row of the mapping table is 100cm. If the preset threshold is set to 5cm, the actual distance measured by the target network node is 97cm. Then the difference between the actual distance of the target network node and the preset distance is 3cm, which is within the preset threshold range, so the preset distance of the target measurement node is 100cm. The corresponding network configuration parameters are: node ID is 1, MAC address is 20:00:00:00:20:01, and IP address is 172.168.20.1.
[0076] In some implementations, the above method further includes: before the target network node acquires the first mapping relationship, the network configuration parameters of the reference network node may be configured in advance, which helps to simplify the complexity of the target network node acquiring the first mapping relationship.
[0077] In some implementations, the communication network where the target network node and the measuring network node are located may adopt the bus network mentioned above. In the bus network, the target network node and the measuring network node are connected to the same bus and can perform interactive communication.
[0078] In some implementations, the above method also includes: multiple target network nodes can be configured with temporary MAC addresses when leaving the factory, and the temporary MAC addresses of the multiple target network nodes are different, which helps to distinguish the multiple target network nodes with reference to the network node.
[0079] In some implementations, the above method also includes: before the target network node determines the network configuration parameters corresponding to the target network node based on the first mapping relationship, the target network node and the reference network node can be added to the same multicast group, which helps to improve the data transmission efficiency between the target network nodes and between the target network node and the reference network node. For example, the IP address of the multicast group is a specific multicast IP address range, such as between 224.0.0.0 and 239.255.255.255, and the IP address of the reference network node can be determined as the IP address of the multicast group to be added. On each destination network node to be added to the multicast group, the same multicast group IP address is configured. All network nodes are connected to the same network bus through a switch so that multicast data can be correctly transmitted to all network nodes. At this time, multiple network nodes join the same multicast group through the IP address and perform multicast communication in the communication network.
[0080] In some implementations, the method further includes: a first mapping relationship may be provided in both the target network node and the reference network node. When the target network node determines the corresponding network configuration parameter, the first mapping relationship stored in itself may be queried without accessing other network nodes to obtain the first mapping relationship, which helps to improve the efficiency of configuring the network configuration parameter of the target network node.
[0081] For ease of understanding, the following is based on the configuration method of the network parameters shown above, taking the communication network as 10M automotive Ethernet, the target network node as ECU, and the reference network node as regional controller as an example. Figure 7 Table 1 introduces the configuration process of the network parameters of the embodiment of the present application. Figure 7 The method shown mainly includes steps S710 to S755.
[0082] In order to further improve efficiency, the communication network may need to be pre-configured before the communication network configures the network configuration parameters. Assume that the regional controller is set as the reference network node, and the network configuration parameters of the regional controller include: node ID is 0, MAC address is 20:00:00:00:20:00, IP address is 172.168.20.0. In addition, in a possible implementation, the target network node and the reference network node can be added to the same multicast group in advance, so that data can be transmitted between the target network nodes and between the target network node and the reference network node.
[0083] In step S710, ECU1 and ECU2 send message data to the regional controller in multicast mode, wherein the message data may include a temporary MAC address, for example, the temporary MAC address of ECU1 may be 08:00:27:00:af:ab, and the temporary MAC address of ECU2 may be 98:5a:eb:4f:72:01.
[0084] The target network node is randomly configured with a different temporary MAC address when it leaves the factory. The temporary MAC address is different from the MAC address in the network configuration parameters. For example, the temporary MAC address pre-configured by ECU1 can be 08:00:27:00:af:ab, and the temporary MAC address pre-configured by ECU2 can be 98:5a:eb:4f:72:01.
[0085] In step S715, the regional controller obtains the temporary MAC addresses of ECU1 and ECU2 through the bus and records them.
[0086] In step S720, the regional controller starts the topology discovery function and notifies ECU1 and ECU2 to enter the "receive only" mode in a multicast manner. The "receive only" mode means that ECU1 and ECU2 can only receive message data sent by the regional controller, but not send message data to the regional controller.
[0087] For example, the topology discovery function can adopt 10M Ethernet topology discovery technology, which measures the actual distance through the number of pulse signal interactions between the regional controller and ECU1, and between the regional controller and ECU2, and determines the positions of ECU1 and ECU2 in the bus, thereby realizing the topology discovery function.
[0088] In step S725, the regional controller selects a target ECU based on the temporary MAC address and sends a request to measure the actual distance. For example, the regional controller may select ECU1 as the first target network node to measure the actual distance.
[0089] In step S730, ECU1 enters the actual distance measurement mode, the regional controller serves as a reference network node, and ECU1 serves as a target network node to measure the actual distance.
[0090] For example, the regional controller sends a first pulse signal to ECU1, and ECU1 immediately responds to the first pulse signal and transmits it back to the regional controller with a second pulse signal after receiving it. Record the number of interactions of pulse signals between the regional controller and ECU1 within a certain period of time, and calculate the interaction time of each round trip of the pulse signal. Since time delays may occur when the pulse signal is processed internally by the regional controller and ECU1, it is necessary to subtract the time delay of the regional controller and ECU1 in processing the pulse signal internally to obtain the propagation delay of the pulse signal between the regional controller and ECU1. Since the propagation delay of the pulse signal in a unit length wiring harness is fixed, the actual distance between the two can be calculated by the time delay of a round trip of the pulse signal between the regional controller and ECU1.
[0091] In step S735 , the zone controller transmits the measured actual distance of ECU1 to ECU1 .
[0092] In step S740, ECU1 receives the actual distance sent by the regional controller, saves the result and enters the "receive only" mode. The "receive only" mode means that ECU1 can only receive message data sent by the regional controller or ECU2, but does not send message data to the regional controller.
[0093] In step S745, the zone controller completes the measurement of the actual distance between the zone controller and ECU2 according to the above steps.
[0094] In step S750, the regional controller completes the measurement of the actual distances with all ECUs, and notifies all ECU1 and ECU2 of the exit topology discovery function through multicast.
[0095] In step S755, ECU1 and ECU2 can determine the corresponding network configuration parameters according to the network configuration parameter mapping table and perform automatic configuration. Accordingly, after all ECU configurations are completed, restarting the 10M vehicle Ethernet system will take effect.
[0096] For example, the network configuration parameter mapping table shown in Table 1 can be configured in the regional controller, ECU1, and ECU1. If the difference between the actual distance measured by ECU1 and the first preset distance is within the preset threshold, the first preset distance is the preset distance of ECU1. If the difference between the actual distance measured by ECU1 and the second preset distance is outside the preset threshold, the second preset distance is not the preset distance of ECU1. Taking Table 1 as an example, the preset distance corresponding to the first row of the mapping table is 100cm. If the preset threshold is set to 5cm, the actual distance measured by ECU1 is 97cm. Then the difference between the actual distance of ECU1 and the preset distance is 3cm, which is within the preset threshold range, so the preset distance of ECU1 is 100cm, and the corresponding network configuration parameters are: node ID is 1, MAC address is 20:00:00:00:20:01, and IP address is 172.168.20.1.
[0097] Combination of the above Figures 1 to 7 , describes the method embodiment of the present application in detail, and the following is combined with Figures 8 to 10 , describes the device embodiment of the present application in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous method embodiment.
[0098] Figure 8 FIG. 1 is a schematic block diagram of a vehicle-mounted system according to an embodiment of the present application. Figure 8 As shown, the vehicle system 800 includes a network node 410 and a network node 420, wherein the network node 410 is a reference network node and the network node 420 is a target network node.
[0099] Fig. 9 FIG. 1 is a schematic block diagram of a vehicle according to an embodiment of the present application. Fig. 9 As shown, vehicle 900 includes an onboard system 800 .
[0100] Fig.10 It is a schematic block diagram of a vehicle-mounted system according to another embodiment of the present application. Fig.10 The vehicle-mounted system 1000 shown may include: a memory 1010, a processor 1020, an input / output interface 1030, and a transceiver 1040. The memory 1010, the processor 1020, the input / output interface 1030, and the transceiver 1040 are connected via an internal connection path, the memory 1010 is used to store instructions, and the processor 1020 is used to execute the instructions stored in the memory 1020 to control the input / output interface 1030 to receive input data and information, output data such as operation results, and control the transceiver 1040 to send signals.
[0101] It should be understood that in the embodiment of the present application, the processor 1020 can adopt a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs to implement the technical solution provided in the embodiment of the present application.
[0102] It should also be understood that the transceiver 1040 is also called a communication interface, and uses a transceiver device such as but not limited to a transceiver to achieve communication between the vehicle system 1000 and other devices or communication networks.
[0103] The memory 1010 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1020. A portion of the processor 1020 may also include a nonvolatile random access memory. For example, the processor 1020 may also store information on the device type.
[0104] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 1020 or an instruction in the form of software. The method for requesting uplink transmission resources disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1010, and the processor 1020 reads the information in the memory 1010 and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.
[0105] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0106] It should be understood that in the embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0107] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0108] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0109] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0112] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, operation and maintenance management (operation administration and maintenance, OAM) or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be read by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0113] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for configuring network parameters, characterized in that: Applied to a vehicle, the bus of the vehicle is used to connect the network nodes of the vehicle, the network nodes of the vehicle include a target network node and a reference network node, and the method includes: The target network node acquires a first mapping relationship, where the first mapping relationship is a mapping relationship between a preset distance of a network node in the vehicle and a network configuration parameter, wherein the preset distance is a distance between the network node of the vehicle and the reference network node; The target network node determines, based on the preset distance corresponding to the target network node and the first mapping relationship, a network configuration parameter corresponding to the preset distance of the target network node; The target network node performs network configuration based on the network configuration parameters corresponding to the target network node.
2. The method according to claim 1, characterized in that The target network node determines, based on the preset distance corresponding to the target network node and the first mapping relationship, a network configuration parameter corresponding to the preset distance of the target network node, including: The target network node acquires an actual distance between the target network node and the reference network node; The target network node determines, in the first mapping relationship, a preset distance that matches the actual distance; The target network node determines, from the first mapping relationship, a network configuration parameter corresponding to the target network node based on a preset distance that matches the actual distance.
3. The method according to claim 2, characterized in that The target network node acquires the actual distance between the target network node and the reference network node, including: The target network node receives a first signal sent by the reference network node; In response to the first signal, the target network node sends a second signal to the reference network node, wherein the first signal and the second signal are used to measure the actual distance.
4. The method according to any one of claims 1 to 3, characterized in that The network configuration parameters include one or more of the following parameters: a node identity ID, a media access control MAC address, and an Internet Protocol IP address.
5. A method for configuring network parameters, characterized in that: The method is applied to a vehicle, wherein a bus of the vehicle is used to connect network nodes of the vehicle, and the network nodes of the vehicle include a target network node and a reference network node. The method includes: The reference network node acquires a first mapping relationship, where the first mapping relationship is a mapping relationship between a preset distance of a network node in the vehicle and a network configuration parameter, wherein the preset distance is a distance between the network node of the vehicle and the reference network node; The reference network node communicates with the target network node based on the first mapping relationship.
6. The method according to claim 5, characterized in that The reference network node communicates with a network node in the communication network based on the first mapping relationship, including: The reference network node acquires an actual distance between the target network node and the reference network node; The reference network node determines, in the first mapping relationship, a preset distance matching the actual distance based on the actual distance; The reference network node determines, from the first mapping relationship, a network configuration parameter corresponding to the target network node based on a preset distance matching the actual distance; The reference network node communicates with the target network node based on the network configuration parameters corresponding to the target network node.
7. The method according to claim 6, characterized in that The reference network node acquires the actual distance between the target network node and the reference network node, including: The reference network node sends a first signal to the target network node; In response to sending the first signal, the reference network node receives a second signal sent by the target network node; The reference network node determines an actual distance between the target network node and the reference network node based on a transmission delay of the first signal and a transmission delay of the second signal.
8. A network node, characterized in that: The network node comprises various modules for executing the method for configuring network parameters according to any one of claims 1-7.
9. A vehicle-mounted system, characterized in that: The in-vehicle system comprises the network node as claimed in claim 8.
10. A vehicle, characterized in that: Comprising the vehicle-mounted system as claimed in claim 9.
11. A computer program product, characterized in that The method comprises a computer program or an instruction, and when the computer program or the instruction processor is executed, the method according to any one of claims 1 to 4 is implemented; or when the computer program or the instruction processor is executed, the method according to any one of claims 5 to 7 is implemented.