CN116155863B - Method and device for distributing Ethernet addresses of vehicles, medium and chip - Google Patents

Method and device for distributing Ethernet addresses of vehicles, medium and chip Download PDF

Info

Publication number
CN116155863B
CN116155863B CN202310403831.2A CN202310403831A CN116155863B CN 116155863 B CN116155863 B CN 116155863B CN 202310403831 A CN202310403831 A CN 202310403831A CN 116155863 B CN116155863 B CN 116155863B
Authority
CN
China
Prior art keywords
target
domain
address
byte
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310403831.2A
Other languages
Chinese (zh)
Other versions
CN116155863A (en
Inventor
邱燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaomi Automobile Technology Co Ltd
Original Assignee
Xiaomi Automobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiaomi Automobile Technology Co Ltd filed Critical Xiaomi Automobile Technology Co Ltd
Priority to CN202310403831.2A priority Critical patent/CN116155863B/en
Publication of CN116155863A publication Critical patent/CN116155863A/en
Application granted granted Critical
Publication of CN116155863B publication Critical patent/CN116155863B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The disclosure relates to a method, a device, a vehicle, a medium and a chip for distributing a vehicle Ethernet address, belonging to the field of vehicle communication, wherein the method comprises the following steps: responding to the access of a target node to the Ethernet, and distributing network node identifiers for the target node according to a target control domain where the target node is located; and distributing a local unicast Media Access Control (MAC) address and a unicast Internet Protocol (IP) address to the target node according to the network node identification. The consistency of the MAC address and the IP address of the same network node can be effectively ensured, and the maintenance efficiency of the Ethernet communication network is improved.

Description

Method and device for distributing Ethernet addresses of vehicles, medium and chip
Technical Field
The disclosure relates to the field of vehicle communication, and in particular relates to a vehicle ethernet address allocation method, device, vehicle, medium and chip.
Background
In the design of the vehicle-mounted Ethernet network, the number of nodes and the functions supported by the nodes are not invariable in the whole vehicle development process. In different whole vehicle projects, support node edges and function multiplexing are generally required, and certain topology expansion and node new addition exist at the same time.
However, when network communication design is performed at a certain time, these change points cannot be predicted, so that when address allocation is performed, the addresses are often only increased in sequence in a simple and rough manner. When the function change or the node change occurs, the reassigned address may collide with the original assignment mode, which leads to expanding the change range, increasing the development complexity and being unfavorable for the maintenance of the Ethernet communication network.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method, an apparatus, a vehicle, a medium and a chip for allocating ethernet addresses of a vehicle.
According to a first aspect of an embodiment of the present disclosure, there is provided a vehicle ethernet address allocation method, including:
responding to the access of a target node to the Ethernet, and distributing network node identifiers for the target node according to a target control domain where the target node is located;
and distributing a local unicast Media Access Control (MAC) address and a unicast Internet Protocol (IP) address to the target node according to the network node identification.
Optionally, the vehicle includes a plurality of control domains, each control domain is preconfigured with a corresponding domain identifier, each control domain further includes a plurality of subfields, and each subfield includes at least one subfield number that can be allocated;
distributing network node identification for the target node according to the target control domain where the target node is located, including:
determining a network node identification of the target node according to the total number of available assigned subdomain sequence numbers in all control domains before the target control domain and the subdomain sequence numbers of the target node in the target control domain;
the sub-domain sequence numbers of the target nodes in the target control domain are distributed according to the sequence of the target nodes accessing the sub-domain.
Optionally, according to the network node identifier, allocating a local unicast MAC address to the target node, including:
mapping the network node identification with a first target byte in the MAC address.
Optionally, according to the network node identifier, allocating a local unicast MAC address to the target node, including:
mapping the domain identifier corresponding to the target control domain with a second target byte in the MAC address; and is combined with the other components of the water treatment device,
and mapping the subdomain sequence number of the target node in the target control domain with a third target byte in the MAC address.
Optionally, the first target byte is any byte in the MAC address excluding a fourth target byte, and the value of the fourth target byte conforms to the local unicast MAC address definition.
Optionally, the second target byte and the third target byte are any byte in the MAC address excluding a fourth target byte, and the value of the fourth target byte conforms to the local unicast MAC address definition.
Optionally, according to the network node identifier, an IP address is allocated to the target node, including:
setting the network node identification to the last byte in the IP address;
setting a first byte and a second byte of a network identifier as the first two bytes of the IP address, and setting a virtual local area network identifier VID as the other bytes of the IP address; or alternatively, the process may be performed,
the first byte of the network identification is set to the first byte of the IP address, and the VID is set to the other bytes of the IP address.
Optionally, according to the network node identifier, an IP address is allocated to the target node, including:
setting VID as the second byte of the IP address, and setting the subdomain serial number of the target node in the target control domain as the last byte in the IP address; and is combined with the other components of the water treatment device,
and setting the domain identifier corresponding to the target control domain as the last byte in the IP address.
Optionally, the plurality of subfields further includes at least one reserved subfield, each reserved subfield includes at least one reserved sequence number, and accordingly, the subfield sequence number of the target node in the target control domain skips the reserved sequence number.
Optionally, the plurality of control domains further comprises a reserved main domain.
Optionally, the ethernet is an IPV4 network of internet communication protocol version iv.
According to a second aspect of the embodiments of the present disclosure, there is provided a vehicle ethernet address allocation apparatus, including:
the first distribution module is configured to respond to the access of the target node to the Ethernet, and distribute network node identifiers to the target node according to a target control domain where the target node is located;
a second allocation module configured to allocate a local unicast media access control, MAC, address and a unicast internet protocol, IP, address for the target node according to the network node identity.
According to a third aspect of embodiments of the present disclosure, there is provided a vehicle comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
responding to the access of a target node to the Ethernet, and distributing network node identifiers for the target node according to a target control domain where the target node is located;
and distributing a local unicast Media Access Control (MAC) address and a unicast Internet Protocol (IP) address to the target node according to the network node identification.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method of any of the first aspects of the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, there is provided a chip comprising a processor and an interface; the processor is configured to read instructions to perform the method of any of the first aspects of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: by distributing the network node with the network node identifier capable of being uniquely identified based on the control domain where the network node is located and distributing the network node with the MAC address and the IP address based on the network node identifier, when the function change or the node change occurs, the consistency of the MAC address and the IP address of the same network node can be effectively ensured, and the maintenance efficiency of the Ethernet communication network is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of vehicle ethernet address assignment according to an exemplary embodiment.
Fig. 2 is a block diagram illustrating a vehicular ethernet address assignment device, according to an exemplary embodiment.
FIG. 3 is a block diagram of a vehicle, according to an exemplary embodiment.
Fig. 4 is a block diagram illustrating an apparatus for vehicular ethernet address assignment, according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
In the design of the vehicle-mounted Ethernet network, the number of nodes and the functions supported by the nodes are not invariable in the whole vehicle development process. In different whole vehicle projects, support node edges and function multiplexing are generally required, and certain topology expansion and node new addition exist at the same time.
However, when network communication design is performed at a certain time, these change points cannot be predicted, so that when address allocation is performed, the addresses are often only increased in sequence in a simple and rough manner.
For example, ID numbers are sequentially assigned in the order in which nodes appear in the related art. Assume, for example, that the MAC address allocation starting point is 0A:0B:0C:00:00:01, the subsequent nodes are ordered in this order 0A:0B:0C:00:00: 02. 0A:0B:0C:00:00:03.
the IP addresses are similar. And the mapping relation between the IP and the MAC addresses of the nodes is not clear. When the network topology needs to be expanded, there is a problem of poor reusability and expansibility.
When the function change or the node change occurs, the reassigned address may collide with the original assignment mode, which leads to expanding the change range, increasing the development complexity and being unfavorable for the maintenance of the Ethernet communication network.
Fig. 1 is a schematic diagram illustrating a vehicle ethernet address allocation method according to an exemplary embodiment, where the method may be applied to a vehicle, or any electronic device with information processing capability, for example, may be a vehicle ethernet gateway, or a DHCP (Dynamic Host Configuration Protocol ) server, as shown in fig. 1, and the method includes:
s101, responding to the access of a target node to the Ethernet, and distributing network node identification for the target node according to a target control domain where the target node is located.
It will be appreciated that each network node uniquely corresponds to a network node identity.
The control domains may include, for example, a central domain, an infotainment domain, a smart drive domain, a digital cockpit domain, and so forth. For example, a digital cabin domain may comprise a plurality of network nodes, which may then be considered as target control domains in which the network nodes are located.
In some possible embodiments, the number of network nodes comprised by each control domain may be preconfigured, e.g. the central domain may contain the number of nodes Nm0, the infotainment domain may contain the number of nodes Nm1, etc. Furthermore, the first Nm0 network node identities may be assigned to only network nodes in the central domain, and the Nm0+1 to Nm0+Nm2 network node identities may be assigned to only nodes in the infotainment domain.
In addition, each control domain comprises at least one domain controller, and in particular, the network node, i.e. the device of the non-domain controller, in which control domain is located is mainly dependent on which ethernet physical interface of the domain controller it corresponds to is directly connected to. For example, if the ethernet interface of a radar is connected to the ethernet physical interface of the digital capsule controller, it may be determined that the radar is in the digital capsule.
S102, according to the network node identifier, a local unicast MAC (media access control ) address and a unicast IP (internet protocol ) address are allocated to the target node.
The ethernet may be an IPV4 (Internet Protocol version, fourth version of internet protocol) network.
In the embodiment of the disclosure, the network node is allocated with the network node identifier capable of being uniquely identified based on the control domain where the network node is located, and the network node is allocated with the MAC address and the IP address based on the network node identifier, so that when the function change or the node change occurs, the consistency of the MAC address and the IP address of the same network node can be effectively ensured, and the maintenance efficiency of the Ethernet communication network is improved.
In some alternative embodiments, the vehicle includes a plurality of control domains, each control domain is preconfigured with a corresponding domain identifier, each control domain further includes a plurality of subfields, and each subfield includes at least one subfield number available for allocation; distributing network node identification for the target node according to the target control domain where the target node is located, including:
determining a network node identification of the target node according to the total number of available assigned subdomain sequence numbers in all control domains before the target control domain and the subdomain sequence numbers of the target node in the target control domain;
the sub-domain sequence numbers of the target nodes in the target control domain are distributed according to the sequence of the target nodes accessing the sub-domain.
For example, the domain identification of the central domain may be set to 00, the domain identification of the digital cockpit domain may be 01, the domain identification of the infotainment domain may be 02, and the domain identification of the intelligent driving domain may be 03. It will be appreciated that the context of the control domains may be arranged from small to large according to domain identification, e.g., the control domain preceding the intelligent drive domain may include a central domain, a digital cockpit domain, an infotainment domain, and so on. That is, the control domain before and the control domain after the target control domain, etc. may be determined according to the domain identification of each control domain.
The central domain, the digital cabin domain, the information entertainment domain and the intelligent driving domain can comprise 3 subdomains, the total number of the subdomains is 32, the 3 subdomains respectively comprise 1, 10 and 21 subdomain numbers which can be allocated, and the subdomain numbers of the 3 subdomains in the central domain, the digital cabin domain, the information entertainment domain and the intelligent driving domain can be 00, 01-10 and 11-31 respectively. The latter two subfields may correspond to a network node inside the domain master node and a network node outside the domain master node, respectively.
Further, when the target node is the first domain master node internal network node accessing the ethernet in the digital cabin domain, the sub-domain serial number of the target node may be determined to be 00, and when the target node is the first domain master node external network node accessing the ethernet, the sub-domain serial number of the target node may be determined to be 11. The digital cabin domain in which the target node is located further includes a central domain, so that the network node identifier of the target node may be 32+11=43.
By adopting the scheme, the network node identification uniquely corresponding to the target node can be effectively determined, the MAC address and the IP address can be reliably distributed to the target node, the consistency of the MAC address and the IP address of the network node is ensured when the function change or the node change occurs, and the maintenance efficiency of the Ethernet communication network is improved.
Optionally, the plurality of subfields further includes at least one reserved subfield, each reserved subfield includes at least one reserved sequence number, and accordingly, the subfield sequence number of the target node in the target control domain skips the reserved sequence number.
The reserved subfield may be, for example, the first subfield of the three subfields, that is, the subfield with the subfield number 0. In another example, the reserved subfield may further include a plurality of subfield numbers to be allocated, for example, a subfield including subfield numbers of 01 to 10 may be set as the reserved subfield.
Optionally, the plurality of control domains further comprises a reserved main domain.
By adopting the scheme, the reserved subdomain and the reserved main domain are set, and the subdomain sequence numbers in the reserved subdomain are reserved and are not distributed for the network nodes, so that when the network needs to be expanded or special application is carried out, the reserved subdomain can be expanded or special application can be carried out based on the reserved domain, the complexity can be developed effectively, and the maintenance efficiency of the Ethernet communication network is improved.
In yet other alternative embodiments, assigning a local unicast MAC address to the target node based on the network node identification includes:
mapping the network node identification with a first target byte in the MAC address.
It will be appreciated that the MAC address typically comprises 6 bytes, each byte being a 16-ary value. The first target byte may be, for example, the last byte of the six bytes, or the next to last byte, as this disclosure does not specifically limit.
Optionally, the mapping between the network node identifier and the first target byte in the MAC address may specifically be converting a decimal value corresponding to the network node identifier into a hexadecimal value, and setting the decimal value as one byte in the MAC address. Or directly mapping the decimal value corresponding to the network node identification into one of the MAC addresses.
In one possible implementation, the first target byte is any byte in the MAC address excluding a fourth target byte, and the value of the fourth target byte conforms to the local unicast MAC address definition.
Illustratively, if the local unicast MAC address is YY: XX: XX: XX: XX, wherein the value of the YY byte must conform to the local unicast MAC address definition. The first target byte may be any one of the other 5 bytes, for example, taking the network node identifier of the target node as 43 as an example, the MAC address of the target node may be allocated as 0A:00:00:00:00:2b, or 0A:00:00:00:2b, where 0A corresponds to the YY byte and 00 corresponds to the other XX bytes.
In other alternative embodiments, assigning a local unicast MAC address to the target node based on the network node identification includes: mapping the domain identifier corresponding to the target control domain with a second target byte in the MAC address; and mapping the subdomain sequence number of the target node in the target control domain with a third target byte in the MAC address.
In one possible implementation manner, the second target byte and the third target byte are any byte in the MAC address excluding a fourth target byte, and the value of the fourth target byte conforms to the definition of the local unicast MAC address.
Illustratively, if the local unicast MAC address is YY: the values of XX, XX and YY bytes conform to the definition of the local unicast MAC address, the second target byte and the third target byte can be any two of other 5 bytes, wherein the second target byte and the third target byte can be two adjacent bytes or two non-adjacent bytes, or the second target byte and the third target byte can be the last third target byte of the second target byte or the last second target byte of the third target byte, and a person skilled in the art only need to calibrate the positions of the two bytes, and the specific selection modes of the two bytes are not limited.
For example, taking the network node identifier of the target node as 43, the domain identifier as 01, and the subdomain number as 11 as an example, the MAC address of the target node may be allocated as 0a:00:00:00:01:11, or 0a:11:01:00:00:00:00. For example, if a decimal-to-hexadecimal mapping, the MAC address of the target node may be assigned as 0a:00:00:00:01:0b, or 0a:0 b:00:00:00:01:00.
In some alternative embodiments, assigning an IP address to the target node based on the network node identification includes:
setting the network node identification to the last byte in the IP address;
setting a first byte and a second byte of a Network identification (Network ID) as the first two bytes of the IP address, and setting a VID (Virtual Local Area Network Identifier, virtual local area Network identification) as the other bytes of the IP address; or, the first byte of the network identifier is set as the first byte of the IP address, and the VID is set as the other bytes of the IP address.
It should be noted that the other bytes are any other byte or bytes in the IP address that have been set.
Taking an IPv4 address as an example, the IP address includes 4 bytes. The VID may be 0-255 or may be related to the segment value. In one possible implementation, the VID may also skip special reservation values. In addition, the network identifier may be a preset parameter of the ethernet, which is not specifically limited in the embodiments of the present disclosure.
Illustratively, with the network node identification of the target node being 43 and the network ID being 172.31, i.e., the first byte of the network identification may be 172 and the second byte may be 31, the IP address may be assigned either 172.31.Vid.43 or 172.Vid.vid.43.
In other alternative embodiments, assigning an IP address to the target node based on the network node identification includes: setting VID as the second byte of the IP address, and setting the subdomain serial number of the target node in the target control domain as the last byte in the IP address; and setting the domain identifier corresponding to the target control domain as the last byte in the IP address.
Alternatively, the first byte of the network identification may also be set to the first byte of the IP address.
Illustratively, taking the network node identifier of the target node as 43, the domain identifier as 01, and the subdomain number as 11 as an example, the IP address may be assigned as 172.Vid.1.11.
By adopting the scheme, the IP address can be effectively allocated to the network node accessed to the Ethernet based on the network node identification, the consistency of the IP address of the network node is ensured when the function change or the node change occurs, and the maintenance efficiency of the Ethernet communication network is improved.
In order for those skilled in the art to more understand the overall inventive concept of the technical solution provided by the present disclosure, the present disclosure also provides the following exemplary embodiments.
Firstly, the ethernet network is divided into 0 to n main domains, i.e. control domains, in a certain way, for example:
domain 00: a central domain containing the number of nodes Nm0; domain 01: an infotainment domain comprising a number of nodes Nm1; domain 02: the intelligent driving domain comprises node number Nm2; … domain N: the reserved master field contains the number of nodes NmN.
The reserved main domain may be other specific IDs or some IDs in 0 to n, for example, domain 00 and/or domain 01 may be set as the reserved main domain. The purpose of reserving the primary domain is to take into account domain extensions that may exist.
Further, each main domain is divided again, for example, into sub-domain 0: the domain master control node comprises the node number Ns0; subfield 1: subzone 1 under the main zone, comprising the number of nodes Ns1; subdomain 2: subzone 2 under the main zone, comprising the number of nodes Ns2; subdomain M: a reserved sub-domain containing the number of nodes NsM.
Further, the value of the network node identification NNID of a certain node P in the network may be: nnid=nm0+nm1+ … +nm (N-1) + NsP. Where Nm (N-1) is the main domain before the main domain where the node P is located, and NsP is the sub-domain number of the node P.
The values of N and M depend on the capacity of the network node currently designed, the bearing capacity of the main domain and the sub domain, and a certain reserved amount for expansion or special application.
For example, if the maximum node capacity of one network is less than 255 and the number of primary domains is not more than 8, the network node identities NNID of the nodes of the network may be designed according to the following table 1.
Figure SMS_1
TABLE 1
It is assumed that the digital cabin domain master node has 2 network nodes dm_a and dm_b, respectively, under which a radar node is also connected. Its network node identity may be as shown in table 2 below:
Figure SMS_2
TABLE 2
Assume that the local unicast MAC address is YY: XX: XX: XX: XX, wherein the value of the YY byte must conform to the local unicast MAC address definition. Leaving 5 bytes, any 2 bytes or 1 byte of which can be mapped with the NNID.
If YY takes on the value 0x0A, XX takes on the value 00.
In one possible implementation, the MAC address of dm_a may be assigned as: 0 A:00:00:00:21; the MAC address assignment for dm_b is: 0 A:00:00:00:22; the MAC address assignment of Radar is 0A:00:00:00:00:2B;
in another possible implementation, the MAC address of dm_a may be assigned as: 0A:00:00:00:01:01; the MAC address assignment for dm_b is: 0A:00:00:00:01:02; the MAC address assignment of Radar is 0A:00:00:00:01:11; for example, if a decimal-to-hexadecimal mapping is used, the MAC address of the Radar may be assigned as 0A:00:00:00:01:0B.
For an IPv4 address, the unicast IP address assignment corresponding to the network node may include three ways:
in one possible implementation, the IP address of dm_a may be assigned as: VID.33; the IP address assignment of DM_B is: VID.34; the IP address assignment for Radar is 172.31.Vid.43; wherein the VID has a value range of 0-255, except for a special reserved value.
In another possible implementation, the IP address of dm_a may be assigned as: 172. VID.VID.33; the IP address assignment of DM_B is: VID.VID.34; the IP address assignment for Radar is 172.Vid. 43.
In yet another possible implementation, the IP address of dm_a may be assigned as: 172. VID.1.1; the IP address assignment of DM_B is: VID.1.2; the IP address assignment for Radar is 172.Vid.1.11.
In the embodiment of the disclosure, a principle and a consistency framework of Ethernet communication ID allocation are built, the method is suitable for the communication design of the Ethernet bottom layer of the whole vehicle, and MAC and IP addresses of all Ethernet nodes of the whole vehicle can be rapidly and effectively allocated. The distribution and distribution results can be inherited in different vehicle types of projects of the same platform, and the system has expandability and good maintainability.
By adopting the scheme, the network node can be flexibly expanded, the original network design is effectively multiplexed, and the design complexity is reduced. The network design is carried out by using the scheme, so that the management and maintenance of the network design are facilitated. The expansion design can be conveniently carried out according to the design method on the basis that the original distribution is not affected no matter the main domain of the vehicle type is expanded or the network nodes in the domain are expanded.
Fig. 2 is a schematic diagram illustrating a vehicular ethernet address assignment apparatus according to an exemplary embodiment, and as shown in fig. 2, the vehicular ethernet address assignment apparatus 20 includes:
a first allocation module 21 configured to allocate a network node identifier to a target node according to a target control domain where the target node is located, in response to the target node accessing the ethernet;
a second allocation module 22 is configured to allocate a local unicast medium access control, MAC, address and a unicast internet protocol, IP, address for the target node according to the network node identity.
Optionally, the vehicle includes a plurality of control domains, each control domain is preconfigured with a corresponding domain identifier, each control domain further includes a plurality of subfields, and each subfield includes at least one subfield number that can be allocated; a first allocation module 21 configured to:
determining a network node identification of the target node according to the total number of available assigned subdomain sequence numbers in all control domains before the target control domain and the subdomain sequence numbers of the target node in the target control domain;
the sub-domain sequence numbers of the target nodes in the target control domain are distributed according to the sequence of the target nodes accessing the sub-domain.
Optionally, the second allocation module 22 is configured to:
mapping the network node identification with a first target byte in the MAC address.
Optionally, the second allocation module 22 is configured to:
mapping the domain identifier corresponding to the target control domain with a second target byte in the MAC address; and is combined with the other components of the water treatment device,
and mapping the subdomain sequence number of the target node in the target control domain with a third target byte in the MAC address.
Optionally, the first target byte is any byte in the MAC address excluding a fourth target byte, and the value of the fourth target byte conforms to the local unicast MAC address definition.
Optionally, the second target byte and the third target byte are any byte in the MAC address excluding a fourth target byte, and the value of the fourth target byte conforms to the local unicast MAC address definition.
Optionally, the second allocation module 22 is configured to:
setting the network node identification to the last byte in the IP address;
setting a first byte and a second byte of a network identifier as the first two bytes of the IP address, and setting a virtual local area network identifier VID as the other bytes of the IP address; or alternatively, the process may be performed,
the first byte of the network identification is set to the first byte of the IP address, and the VID is set to the other bytes of the IP address.
Optionally, the second allocation module 22 is configured to:
setting VID as the second byte of the IP address, and setting the subdomain serial number of the target node in the target control domain as the last byte in the IP address; and is combined with the other components of the water treatment device,
and setting the domain identifier corresponding to the target control domain as the last byte in the IP address.
Optionally, the plurality of subfields further includes at least one reserved subfield, each reserved subfield includes at least one reserved sequence number, and accordingly, the subfield sequence number of the target node in the target control domain skips the reserved sequence number.
Optionally, the plurality of control domains further comprises a reserved main domain.
Optionally, the ethernet is an IPV4 network of internet communication protocol version iv.
The specific manner in which the respective modules perform the operations in relation to the vehicular ethernet address assignment apparatus 20 of the above-described embodiment has been described in detail in relation to the embodiment of the method, and will not be described in detail herein.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the vehicle ethernet address assignment method provided by the present disclosure.
Fig. 3 is a block diagram of a vehicle 300, according to an exemplary embodiment. For example, the vehicle 300 may be a hybrid vehicle, or may be a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other type of vehicle. The vehicle 300 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.
Referring to fig. 3, a vehicle 300 may include various subsystems, such as an infotainment system 310, a perception system 320, a decision control system 330, a drive system 340, and a computing platform 350. Wherein the vehicle 300 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, interconnections between each subsystem and between each component of the vehicle 300 may be achieved by wired or wireless means.
In some embodiments, the infotainment system 310 may include a communication system, an entertainment system, a navigation system, and the like.
The perception system 320 may include several types of sensors for sensing information of the environment surrounding the vehicle 300. For example, the perception system 320 may include a global positioning system (which may be a GPS system, or may be a beidou system or other positioning system), an inertial measurement unit (inertial measurement unit, IMU), a lidar, millimeter wave radar, an ultrasonic radar, and a camera device.
Decision control system 330 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
The drive system 340 may include components that provide powered movement of the vehicle 300. In one embodiment, the drive system 340 may include an engine, an energy source, a transmission, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, an air compression engine. The engine is capable of converting energy provided by the energy source into mechanical energy.
Some or all of the functions of the vehicle 300 are controlled by the computing platform 350. The computing platform 350 may include at least one processor 351 and a first memory 352, the processor 351 may execute instructions 353 stored in the first memory 352.
The processor 351 may be any conventional processor, such as a commercially available CPU. The processor may also include, for example, an image processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a System On Chip (SOC), an application specific integrated Chip (Application Specific Integrated Circuit, ASIC), or a combination thereof.
The first memory 352 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
In addition to instructions 353, the first memory 352 may store data such as road maps, route information, vehicle location, direction, speed, and the like. The data stored by the first memory 352 may be used by the computing platform 350.
In an embodiment of the present disclosure, the processor 351 may execute the instructions 353 to perform all or part of the steps of the vehicle ethernet address assignment method described above.
Fig. 4 is a block diagram illustrating an apparatus for vehicular ethernet address assignment, according to an exemplary embodiment. For example, the apparatus 400 may be provided as a domain controller or as a server, such as a DHCP server, in particular, one or more of the domain controllers in the above embodiments may be provided as the DHCP server. Referring to fig. 4, the apparatus 400 includes a processing component 422 that further includes one or more processors, and a memory resource represented by a second memory 432 for storing instructions, such as an application, executable by the processing component 422. The application program stored in the second memory 432 may include one or more modules each corresponding to a set of instructions. Further, the processing component 422 is configured to execute instructions to perform the vehicle ethernet address assignment method described above.
The apparatus 400 may also include a power component 426 configured to perform power management of the apparatus 400, a wired or wireless network interface 450 configured to connect the apparatus 400 to a network, and an input/output interface 458. The apparatus 400 may operate based on an operating system, such as Windows Server, stored in the second memory 432 TM ,Mac OS X TM ,Unix TM , Linux TM ,FreeBSD TM Or the like.
The apparatus 400 may be a stand-alone electronic device or may be part of a stand-alone electronic device, for example, in one embodiment, the apparatus 400 may be an integrated circuit (Integrated Circuit, IC) or chip, where the integrated circuit may be an IC or a collection of ICs; the chip may include, but is not limited to, the following: GPU, CPU, FPGA, DSP, ASIC, SOC, etc. The integrated circuit or chip may be configured to execute executable instructions (or code) to implement the vehicle ethernet address assignment method described above. The executable instructions may be stored on the integrated circuit or chip or may be retrieved from another device or apparatus, such as the integrated circuit or chip including a processor, memory, and interface for communicating with other devices. The executable instructions may be stored in the memory, which when executed by the processor implement the vehicle ethernet address assignment method described above; alternatively, the integrated circuit or chip may receive executable instructions through the interface and transmit the executable instructions to the processor for execution to implement the vehicle ethernet address allocation method described above.
In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described vehicle ethernet address allocation method when executed by the programmable apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A method for assigning ethernet addresses to vehicles, wherein the vehicles include a plurality of control domains, each control domain is preconfigured with a corresponding domain identifier, each control domain further includes a plurality of subfields, each subfield includes at least one subfield number that is available for assignment, and the method includes:
responding to the access of a target node to the Ethernet, and determining the network node identification of the target node according to the total number of available assigned subdomain sequence numbers in all control domains before the target control domain where the target node is located and the subdomain sequence numbers of the target node in the target control domain;
according to the network node identification, distributing a local unicast Media Access Control (MAC) address and a unicast Internet Protocol (IP) address to the target node, wherein the method comprises the following steps:
mapping the network node identifier, or the domain identifier corresponding to the target control domain, the subdomain serial number of the target node in the target control domain, and bytes in the MAC address;
mapping the network node identifier, or the domain identifier corresponding to the target control domain, the subdomain serial number of the target node in the target control domain, and bytes in an IP address;
the sub-domain sequence numbers of the target nodes in the target control domain are distributed according to the sequence of the target nodes accessing the sub-domain.
2. The method of claim 1, wherein assigning the local unicast MAC address to the target node based on the network node identification comprises:
mapping the network node identification with a first target byte in the MAC address.
3. The method of claim 1, wherein assigning the local unicast MAC address to the target node based on the network node identification comprises:
mapping the domain identifier corresponding to the target control domain with a second target byte in the MAC address; and is combined with the other components of the water treatment device,
and mapping the subdomain sequence number of the target node in the target control domain with a third target byte in the MAC address.
4. The method of claim 2, wherein the first target byte is any byte in the MAC address from which a fourth target byte is removed, the fourth target byte having a value that conforms to a native unicast MAC address definition.
5. The method of claim 3, wherein the second target byte and the third target byte are any byte of the MAC address excluding a fourth target byte, the fourth target byte having a value that conforms to a native unicast MAC address definition.
6. The method according to claim 1, wherein assigning an IP address to the target node based on the network node identification comprises:
setting the network node identification to the last byte in the IP address;
setting a first byte and a second byte of a network identifier as the first two bytes of the IP address, and setting a virtual local area network identifier VID as the other bytes of the IP address; or, the first byte of the network identifier is set as the first byte of the IP address, and the VID is set as the other bytes of the IP address.
7. The method according to claim 1, wherein assigning an IP address to the target node based on the network node identification comprises:
setting VID as the second byte of the IP address, and setting the subdomain serial number of the target node in the target control domain as the last byte in the IP address; and is combined with the other components of the water treatment device,
and setting the domain identifier corresponding to the target control domain as the last byte in the IP address.
8. The method of claim 1, wherein the plurality of subzones further comprises at least one reserved subzone, each of the reserved subzones comprising at least one reserved sequence number, and wherein the subzone sequence number of the target node in the target control zone skips the reserved sequence number.
9. The method of claim 1, wherein the plurality of control domains further comprises a reserved master domain.
10. The method of claim 1, wherein the ethernet is an internet communication protocol version iv IPV4 network.
11. A vehicular ethernet address assignment apparatus, wherein the vehicular ethernet address assignment apparatus comprises a plurality of control domains, each control domain being preconfigured with a corresponding domain identification, each control domain further comprising a plurality of subfields, each subfield comprising at least one subfield number available for assignment, the vehicular ethernet address assignment apparatus comprising:
the first allocation module is configured to respond to the access of the target node to the Ethernet, and determine the network node identification of the target node according to the total number of available allocated subdomain sequence numbers in all control domains before the target control domain where the target node is located and the subdomain sequence numbers of the target node in the target control domain;
the second allocation module is configured to map the network node identifier, or the domain identifier corresponding to the target control domain, the subdomain serial number of the target node in the target control domain, and bytes in the MAC address;
the second allocation module is further configured to map the network node identifier, or a domain identifier corresponding to the target control domain, a subdomain serial number of the target node in the target control domain, and a byte in an IP address;
the sub-domain sequence numbers of the target nodes in the target control domain are distributed according to the sequence of the target nodes accessing the sub-domain.
12. A vehicle comprising a plurality of control domains, each control domain being preconfigured with a corresponding domain identification, each control domain further comprising a plurality of subfields, each subfield comprising at least one subfield number available for allocation, the vehicle comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
responding to the access of a target node to the Ethernet, and determining the network node identification of the target node according to the total number of available assigned subdomain sequence numbers in all control domains before the target control domain where the target node is located and the subdomain sequence numbers of the target node in the target control domain;
according to the network node identification, distributing a local unicast Media Access Control (MAC) address and a unicast Internet Protocol (IP) address to the target node, wherein the method comprises the following steps:
mapping the network node identifier, or the domain identifier corresponding to the target control domain, the subdomain serial number of the target node in the target control domain, and bytes in the MAC address;
mapping the network node identifier, or the domain identifier corresponding to the target control domain, the subdomain serial number of the target node in the target control domain, and bytes in an IP address;
the sub-domain sequence numbers of the target nodes in the target control domain are distributed according to the sequence of the target nodes accessing the sub-domain.
13. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1-10.
14. A chip, comprising a processor and an interface; the processor is configured to read instructions to perform the method of any of claims 1-10.
CN202310403831.2A 2023-04-14 2023-04-14 Method and device for distributing Ethernet addresses of vehicles, medium and chip Active CN116155863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310403831.2A CN116155863B (en) 2023-04-14 2023-04-14 Method and device for distributing Ethernet addresses of vehicles, medium and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310403831.2A CN116155863B (en) 2023-04-14 2023-04-14 Method and device for distributing Ethernet addresses of vehicles, medium and chip

Publications (2)

Publication Number Publication Date
CN116155863A CN116155863A (en) 2023-05-23
CN116155863B true CN116155863B (en) 2023-07-04

Family

ID=86358475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310403831.2A Active CN116155863B (en) 2023-04-14 2023-04-14 Method and device for distributing Ethernet addresses of vehicles, medium and chip

Country Status (1)

Country Link
CN (1) CN116155863B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079481A (en) * 2007-12-31 2014-10-01 北方电讯网络有限公司 IP forwarding across a link state protocol controlled Ethernet network
CN109194525A (en) * 2018-10-11 2019-01-11 迈普通信技术股份有限公司 A kind of network node configuration method and management node
CN112243043A (en) * 2019-07-16 2021-01-19 广州汽车集团股份有限公司 Distribution method, secure communication method, detection device, gateway module and system
CN112585931A (en) * 2020-09-21 2021-03-30 华为技术有限公司 Vehicle communication method and communication device
CN114143257A (en) * 2020-09-03 2022-03-04 华为技术有限公司 Method for generating table entry, method, device and system for sending message

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8401024B2 (en) * 2004-01-14 2013-03-19 Telefonaktiebolaget Lm Ericsson (Publ) Ethernet address management system
US9923814B2 (en) * 2015-02-17 2018-03-20 Huawei Technologies Co., Ltd. Media access control address resolution using internet protocol addresses

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079481A (en) * 2007-12-31 2014-10-01 北方电讯网络有限公司 IP forwarding across a link state protocol controlled Ethernet network
CN109194525A (en) * 2018-10-11 2019-01-11 迈普通信技术股份有限公司 A kind of network node configuration method and management node
CN112243043A (en) * 2019-07-16 2021-01-19 广州汽车集团股份有限公司 Distribution method, secure communication method, detection device, gateway module and system
CN114143257A (en) * 2020-09-03 2022-03-04 华为技术有限公司 Method for generating table entry, method, device and system for sending message
CN112585931A (en) * 2020-09-21 2021-03-30 华为技术有限公司 Vehicle communication method and communication device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于IEEE 802.15.4的无线传感器网络MAC协议机制的改进与实现;林一多;中国优秀硕士学位论文全文数据库 信息科技辑;I140-99 *

Also Published As

Publication number Publication date
CN116155863A (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN110221918B (en) Association method, device and system of NS and VNF
CN108924268B (en) Container cloud service system and pod creation method and device
US20170236244A1 (en) Graphics processing systems
CN106445628A (en) Virtualization method, apparatus and system
US11943319B2 (en) Systems and methods for isolating applications associated with multiple tenants within a computing platform
CN111404753A (en) Flat network configuration method, computer equipment and storage medium
CN107547274B (en) Multi-network-port aggregation method and device
CN108737591B (en) Service configuration method and device
CN111316244A (en) Method and system for communication among multiple processes
CN113674131A (en) Hardware accelerator equipment management method and device, electronic equipment and storage medium
CN111652374B (en) Smart city perception equipment resource management method and system
CN116155863B (en) Method and device for distributing Ethernet addresses of vehicles, medium and chip
US11805422B2 (en) AP deployment in a network comprising a centralized system and a distributed system
CN116643892B (en) Memory management method, device, chip and traffic equipment
CN112804367B (en) Address allocation method and device under dual-stack environment
CN110636149A (en) Remote access method, device, router and storage medium
CN111142806A (en) Vehicle data storage method, device, equipment and storage medium
CN112367256B (en) Creation method, device and storage medium
CN112671547B (en) Resource allocation method, device and system for service slices in vehicle
CN116436727B (en) Virtual machine container mixed arrangement system and IPv6 network implementation method thereof
JP4106964B2 (en) Address assignment apparatus and method
CN116560830A (en) System-on-chip, construction method thereof and vehicle
CN105530197A (en) Resource sharing configuration method and device between SoC nodes
CN113994646A (en) Vehicle-mounted device, vehicle management system, resource management method, and resource management program
CN117459350A (en) Tree network communication method, system, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant