WO2021139714A1 - 数据传输方法、设备及系统 - Google Patents

数据传输方法、设备及系统 Download PDF

Info

Publication number
WO2021139714A1
WO2021139714A1 PCT/CN2021/070613 CN2021070613W WO2021139714A1 WO 2021139714 A1 WO2021139714 A1 WO 2021139714A1 CN 2021070613 W CN2021070613 W CN 2021070613W WO 2021139714 A1 WO2021139714 A1 WO 2021139714A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication device
message
ring network
value
network interface
Prior art date
Application number
PCT/CN2021/070613
Other languages
English (en)
French (fr)
Inventor
贺冬冬
陈启昌
查敏
楼喆
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021139714A1 publication Critical patent/WO2021139714A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Definitions

  • This application relates to the field of communication technology, and in particular to data transmission methods, equipment and systems.
  • In-vehicle Network refers to the network that carries the data transmission of various devices such as sensors, controllers, and actuators inside the car.
  • the in-vehicle network provides high reliability, low delay, and short-time fast startup for data transmission.
  • CAN control area network
  • Ethernet has become a mainstream consensus in the industry.
  • the ring network topology has the advantages of simplifying the backbone redundancy topology, using multiple failure recovery technologies, and simplifying the control protocol. It is a commonly used reliable network topology, so that the vehicle network can be designed as a ring Ethernet topology.
  • the Ethernet ring network is used as the vehicle-mounted network.
  • the frame format of Ethernet has been extended.
  • the flexible packet ring network issued by the Institute of Electrical and Electronics Engineers (IEEE) 802.17 working group has been optimized.
  • Resilient packet ring (RPR) standard proposed folding switching mechanism. The optimized folding switching mechanism. After a link failure or node failure occurs in the Ethernet ring network, all data arriving at the interface where the failure is detected are transmitted in the ring network in the direction completely opposite to the original transmission direction, thereby avoiding the failure Nodes or faulty links, where data can be received by nodes in the ring network when data is transmitted in a direction completely opposite to the original transmission direction.
  • the sender and receiver of the data transmitted in the ring network may be devices connected to the nodes in the ring network. After the nodes in the ring network receive the data, they may need to send the data to The destination device connected to it.
  • the destination device of the multicast message may include multiple devices connected to multiple nodes in the ring network, and nodes located between the source node and the node that implements the folding switch (including the node that implements the folding switch).
  • the multicast packet can be received in the default transmission direction and sent to the destination device connected to it; after folding and switching, the multicast packet is transmitted in the direction opposite to the default direction.
  • the nodes located between the source node and the node that implements the folding and switching (including the source node and the node that implements the folding and switching) will receive the multicast message again, and send the multicast message to the connected node again.
  • the destination device causes some destination devices to repeatedly receive multicast packets, which will affect the service to a certain extent.
  • the embodiments of the present application provide a data transmission method, device, and system, which can prevent a device connected to a service interface of a communication device from repeatedly receiving multicast packets, and reduce the impact on services.
  • a data transmission method and a corresponding device are provided.
  • the data transmission method is applied to a communication device in an Ethernet ring network.
  • the method includes: the communication device receives a first ring network interface of the communication device.
  • the first message includes a first field, the value of the first field is a first value or a second value, and the first value is used to indicate that the ring network interface is not allowed to send the first field to the service interface.
  • the second value is used to indicate that the ring network interface is allowed to send the message where the first field is located to the service interface; the communication device sends the first message according to the value of the first field.
  • the communication device can send the first message according to the value of the first field. Therefore, when the first message is a multicast message, it can be changed after folding and switching.
  • the value of the first field in the first message is set to the first value, so that the communication device does not need to send the multicast message to the service interface of the communication device when sending the first message according to the value of the first field.
  • the device connected to the service interface of the communication device can be prevented from repeatedly receiving multicast packets, and the impact on the service can be reduced.
  • the communication device sends the first message according to the value of the first field, including: when the value of the first field is the first value, the communication device uses the source media access control MAC of the first message The address matches the first MAC address list, and according to the matching result, the first packet is sent to the second ring network interface of the communication device through the first ring network interface of the communication device, and the first MAC address list includes one or more single Any one of the one or more unicast MAC addresses is associated with a service interface of the communication device.
  • the communication device when the value of the first field of the first message is the first value, the communication device sends the first message to its second ring network interface through its first ring network interface, without sending it to its service interface
  • the first message can prevent the device connected to the service interface of the communication device from repeatedly receiving the first message, and reduce the impact on the service.
  • the foregoing sending the first message to the second ring network interface of the communication device through the first ring network interface of the communication device according to the matching result includes: when the matching result is in the first MAC address list When there is a match between the first MAC address and the source MAC address of the first packet, the communication device sends the first packet of the first packet to the second ring network interface of the communication device through the first ring network interface of the communication device. The message obtained after the value of the field is set to the second value.
  • the communication device is the source communication device, so the first The value of the field is set to the second value, and a packet with the value of the first field set to the second value is sent through its second ring network interface, so that the third packet is not received in the default transmission direction, and it is
  • the communication device of the downstream communication device of the communication device in the non-default transmission direction can send the message from its ring network interface to its service interface, thereby transmitting the message to the device connected to the service interface.
  • the foregoing sending the first message to the second ring network interface of the communication device through the first ring network interface of the communication device according to the matching result includes: when the matching result is in the first MAC address list When there is no MAC address that matches the source MAC address of the first packet, the communication device sends the first packet to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • the method before the communication device receives the first packet through the first ring network interface of the communication device, the method further includes: the communication device receives the second packet through the first service interface of the communication device; After the communication device re-encapsulates the second message into a third message, it sends a third message through the first ring network interface of the communication device, where the third message includes the first field, and the value of the first field is The value is the second value, and the first message is a message obtained after changing the transmission direction of the third message in the Ethernet ring network.
  • the second message after the communication device receives the second message through its service interface, the second message can be re-encapsulated into a third message, and the third message includes the first field, so that the third message Or, in the transmission process of the message obtained after changing the transmission direction of the third message in the Ethernet ring network, the communication device in the Ethernet ring network may send the message according to the first field.
  • the communication device detects a failure on the first ring network interface, and the communication device receives the first packet through the first ring network interface of the communication device, including: the first ring network of the communication device The interface loops back a third packet, the third packet includes a first field, and the value of the first field is the second value; the communication device sets the value of the first field in the third packet to the first value Then get the first message.
  • the communication device can receive the first packet through its ring network interface. According to the value of the first field, there is no need to send the first packet to the service interface of the communication device, thereby avoiding repeated reception of the first packet by the device connected to the service interface of the communication device and reducing the impact on the service.
  • the communication device sends the first message according to the value of the first field, including: when the value of the first field is the second value, the communication device according to the first MAC address list or the second MAC address Send a first message in the list, the first MAC address list includes one or more unicast MAC addresses, any unicast MAC address of the one or more unicast MAC addresses is associated with a service interface of the communication device, the The second MAC address list includes one or more multicast MAC addresses, and any one of the one or more multicast MAC addresses is associated with one or more service interfaces of the communication device.
  • the first packet can be normally transmitted to the service interface of the communication device, so as to be transmitted to the device connected to the service interface, thereby ensuring the normal transmission of the service.
  • a data transmission method and a corresponding device are provided.
  • the data transmission method is applied to a communication device in an Ethernet ring network.
  • the method includes: the communication device receives a first report through a first ring network interface of the communication device.
  • the first message is the message obtained by changing the transmission direction of the third message in the Ethernet ring network, the first message includes a first field, and the value of the first field is the first value or
  • the second value is used to indicate that the first packet is not forwarded by the source communication device in the non-default transmission direction of the Ethernet ring network, and the second value is used to indicate the non-default transmission direction of the first packet on the Ethernet ring network.
  • the default transmission direction is forwarded by the source communication device; the communication device sends the first message according to the value of the first field.
  • the first message is a message obtained after changing the transmission direction of the third message in the Ethernet ring network, it can be known that the first message is a message after folding and switching; and because in the first message Including the first field, the communication device can send the first message according to the value of the first field. Therefore, when the first message is a multicast message, the value of the first field in the first message can be set to the first Value.
  • the communication device can know that the communication device is in the default transmission direction before the folding and switching
  • the third message has been transmitted to the device connected to it, so that after the first message is received, there is no need to send the first message to the service interface of the communication device, thereby avoiding the device connected to the service interface of the communication device Receiving multicast packets repeatedly reduces the impact on services.
  • the communication device sends the first message according to the value of the first field, including: when the value of the first field is the first value, the communication device uses the source media access control MAC of the first message The address matches the first MAC address list, and according to the matching result, the first packet is sent to the second ring network interface of the communication device through the first ring network interface of the communication device, and the first MAC address list includes one or more single Any one of the one or more unicast MAC addresses is associated with a service interface of the communication device.
  • the foregoing sending the first message to the second ring network interface of the communication device through the first ring network interface of the communication device according to the matching result includes: when the matching result is in the first MAC address list When there is a match between the first MAC address and the source MAC address of the first packet, the communication device sends the first packet of the first packet to the second ring network interface of the communication device through the first ring network interface of the communication device. The message obtained after the value of the field is set to the second value.
  • the foregoing sending the first message to the second ring network interface of the communication device through the first ring network interface of the communication device according to the matching result includes: when the matching result is in the first MAC address list When there is no MAC address that matches the source MAC address of the first packet, the communication device sends the first packet to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • the method before the communication device receives the first packet through the first ring network interface of the communication device, the method further includes: the communication device receives the second packet through the first service interface of the communication device; After the communication device re-encapsulates the second message into a third message, it sends a third message through the first ring network interface of the communication device, where the third message includes the first field, and the value of the first field Is the first value.
  • the communication device sends the first message according to the value of the first field, including: when the value of the first field is the second value, the communication device according to the first MAC address list or the second MAC address Send a first message in the list, the first MAC address list includes one or more unicast MAC addresses, any unicast MAC address of the one or more unicast MAC addresses is associated with a service interface of the communication device, the The second MAC address list includes one or more multicast MAC addresses, and any one of the one or more multicast MAC addresses is associated with one or more service interfaces of the communication device.
  • the first packet can be normally transmitted to the service interface of the communication device, so as to be transmitted to the device connected to the service interface, thereby ensuring the normal transmission of the service.
  • the communication device sends the first message according to the first MAC address list, including: when the type of the destination MAC address of the first message is unicast For MAC address, the communication device uses the destination MAC address of the first packet to match the first MAC address list; when there is a second MAC address in the first MAC address list that matches the destination MAC address of the first packet , The communication device sends a message obtained by re-encapsulating the first message to a second service interface through the first ring network interface of the communication device, where the second service interface is the service interface associated with the second MAC address; or , When there is no MAC address matching the destination MAC address of the first message in the first MAC address list, the communication device communicates to the second ring network of the communication device through the first ring network interface of the communication device The interface sends the first packet.
  • the communication device sends the first message according to the second MAC address list, including: when the type of the destination MAC address of the first message is multicast MAC
  • the communication device uses the destination MAC address of the first packet to match the second MAC address list; when there is a match between the first multicast MAC address in the second MAC address list and the destination MAC address of the first packet, the communication device
  • the message obtained by re-encapsulating the first message is sent to the third service interface through the first ring network interface of the communication device.
  • the third service interface includes one or more service interfaces associated with the first multicast MAC address in the communication device.
  • the communication device sends the communication device to the second ring network interface of the communication device through the first ring network interface of the communication device Send the first message.
  • the method further includes: The communication device sends the first packet to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • a communication device for implementing the above-mentioned various methods.
  • the communication device may be the communication device in the first aspect or the second aspect, such as a vehicle-mounted communication device, or a device containing the communication device, such as various types of vehicles, or a device included in the communication device, such as a chip or System chip.
  • the communication device includes a module, unit, or means corresponding to the foregoing method, and the module, unit, or means can be realized by hardware, software, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules or units corresponding to the above-mentioned functions.
  • a communication device including: a processor, and may also include a memory; the memory is used to store computer instructions, and when the processor executes the instructions, the communication device can execute the instructions described in any of the above aspects.
  • the communication device may be the communication device in the first aspect or the second aspect, such as a vehicle-mounted communication device, or a device containing the communication device, such as various types of vehicles, or a device included in the communication device, such as a chip or System chip.
  • a communication device including: a processor; the processor is configured to couple with a memory, and after reading an instruction in the memory, execute the method according to any one of the foregoing aspects according to the instruction.
  • the communication device may be the communication device in the first aspect or the second aspect, such as a vehicle-mounted communication device, or a device containing the communication device, such as various types of vehicles, or a device included in the communication device, such as a chip or System chip.
  • a computer-readable storage medium stores instructions that, when the instructions run on a communication device, enable the communication device to execute the method described in any of the above aspects.
  • the communication device may be the communication device in the first aspect or the second aspect, such as a vehicle-mounted communication device, or a device containing the communication device, such as various types of vehicles, or a device included in the communication device, such as a chip or System chip.
  • a computer program product containing instructions when the instructions are executed on a communication device, the communication device can execute the method described in any of the above aspects.
  • the communication device may be the communication device in the first aspect or the second aspect, such as a vehicle-mounted communication device, or a device containing the communication device, such as various types of vehicles, or a device included in the communication device, such as a chip or System chip.
  • a communication device for example, the communication device may be a chip or a chip system
  • the communication device includes a processor for implementing the functions involved in any of the foregoing aspects.
  • the communication device further includes a memory for storing necessary program instructions and data.
  • the communication device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
  • a communication device including: a processor and an interface circuit, the interface circuit may be a code/data read-write interface circuit, and the interface circuit is used to receive computer-executed instructions (the computer-executed instructions are stored in a memory, It may be directly read from the memory, or may be transmitted through other devices) and transmitted to the processor; the processor is used to run the computer-executable instructions to execute the method described in any of the above aspects.
  • the communication device may be the communication device in the first aspect or the second aspect, such as a vehicle-mounted communication device, or a device containing the communication device, such as various types of vehicles, or a device included in the communication device, such as a chip or System chip.
  • the technical effects brought about by any one of the design methods of the third aspect to the ninth aspect can be referred to the technical effects brought about by the different design methods in the first aspect or the second aspect, which will not be repeated here.
  • a communication system includes the communication device according to the first aspect or the second aspect.
  • FIG. 1 is a schematic diagram of packet transmission in a resilient packet ring network under normal conditions according to an embodiment of the application;
  • FIG. 2 is a schematic diagram of folding and switching in an elastic packet ring network provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of a frame format under an optimized folding and switching mechanism provided by an embodiment of the application
  • FIG. 4 is a schematic diagram of an optimized folding switching provided by an embodiment of the application.
  • FIG. 5 is a schematic structural diagram of a communication system provided by an embodiment of this application.
  • FIG. 6 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • Figure 7a is a schematic diagram of multicast packet transmission under normal conditions provided by an embodiment of the application.
  • FIG. 7b is a schematic diagram of multicast packet transmission under abnormal conditions according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of another frame structure provided by an embodiment of the application.
  • FIG. 9 is a first schematic flowchart of a data transmission method provided by an embodiment of this application.
  • FIG. 10 is a second schematic flowchart of a data transmission method provided by an embodiment of this application.
  • FIG. 11a is a schematic diagram of packet transmission in a communication device under normal conditions according to an embodiment of this application.
  • FIG. 11b is a schematic diagram of a port-level loopback provided by an embodiment of this application.
  • FIG. 12 is a third schematic flowchart of a data transmission method provided by an embodiment of this application.
  • FIG. 13 is a schematic diagram of multicast packet transmission in another abnormal situation according to an embodiment of the application.
  • FIG. 14 is a fourth flowchart of a data transmission method provided by an embodiment of this application.
  • FIG. 15 is a schematic structural diagram of another communication device provided by an embodiment of this application.
  • In-vehicle Network refers to a network that carries data transmission of various devices such as sensors, controllers, and actuators inside the car. Due to the particularity of its application scenarios, many special requirements are put forward for the design of the vehicle network. For example, the cable distance is required to be short, and the length of a single cable is generally no more than 15 meters; or, the temperature tolerance and anti-electromagnetic interference requirements of the surrounding environment are higher; or the reliability requirements are higher, that is, the requirements are shorter Or, it requires a very short network startup time, for example, the startup time is less than 100 milliseconds; or, it requires a lower end-to-end communication delay; or, it requires the repeatability or reproducibility of service traffic transmission behavior. Predictability, etc.
  • ADAS advanced driver assistance systems
  • ADAS is an intelligent system used to assist and guide the driver during driving.
  • traditional low-speed vehicle-mounted networks such as CAN cannot meet the higher requirements of sensors in ADAS for transmission bandwidth. Therefore, it has become a mainstream consensus in the industry to use Ethernet with large bandwidth and a huge industrial ecosystem as the next-generation in-vehicle network.
  • the vehicle network can be designed as a ring Ethernet, that is, an Ethernet ring network. Call it the in-vehicle ring network, or ring network for short.
  • the IEEE 802.17 RPR standard released by the IEEE 802.17 working group defines a folding and switching mechanism for the reliability of ring network transmission to meet the high reliability requirements of ring network transmission.
  • FIG. 1 it is a schematic diagram of packet transmission under normal conditions without failure in RPR.
  • the mobile data center (MDC) connected to gateway 1 is the sender of message 1
  • the lidar connected to gateway 4 is message 1.
  • the message 1 sent by MDC is initiated by gateway 1 and enters RPR, and is transmitted in the default transmission direction of RPR (the default transmission direction in Figure 1 is clockwise), that is, it passes through gateway 2.
  • Gateway 3 and gateway 4 arrive at the lidar connected to gateway 4 after transmission.
  • FIG. 2 it is a schematic diagram of folding switching in RPR.
  • gateway 2 can detect the failure, and Change the transmission direction of the message in the RPR from the default transmission direction to the non-default transmission direction.
  • the message 1 sent by gateway 1 to gateway 2 is sent to gateway 1, and gateway 1 does not terminate after receiving message 1 This message 1, continue to transmit message 1 to gateway 4.
  • the gateway 4 Even if the lidar connected to gateway 4 is the receiver of message 1, because the transmission direction of the message is not the default transmission direction, the gateway 4 The message 1 will not be transmitted to the lidar connected to it, but the message 1 will continue to be sent to the gateway 3.
  • gateway 3 Since gateway 3 is also an adjacent node of the failed link, gateway 3 will change the transmission direction of the message from the non-default transmission direction to the default transmission direction, that is, the message 1 sent by gateway 4 to gateway 3 is sent to Gateway 4, after the gateway 4 receives the message 1 sent by the gateway 3 in the default transmission direction, it sends the message 1 to the lidar connected to it, but does not terminate the message 1, and sends the message 1 Sent to gateway 1 and gateway 2, and finally gateway 2 terminates the message 1.
  • the transmission direction of the message is changed for the first time, that is, after the transmission direction is changed from the default transmission direction to the non-default transmission direction, when the gateway receives a message in the non-default transmission direction,
  • the message will not be sent to the device connected to it, and the transmission direction of the message will only be changed for the second time, that is, after the transmission direction is changed from the non-default transmission direction to the default transmission direction, the gateway receives the message in the default transmission direction At this time, the message will be sent to the device connected to it, which will result in an increase in transmission delay and a waste of transmission bandwidth.
  • the prior art has extended the frame format of Ethernet. Based on the frame format of the extended Ethernet, the folding and switching mechanism proposed by the 802.17 RPR standard is optimized, which is referred to as the optimized folding and switching mechanism in the embodiment of the application.
  • the wrapped field and the time to live (TTL) field are introduced.
  • TTL time to live
  • the gateway that detects the failure in the Ethernet ring network implements port-level loopback, marking the loopback packet, that is, setting the value of the wrapped field in the packet to be different from the default value The value of indicates that the transmission direction of the message has changed.
  • the gateway also resets the value of the TTL field in the message, and then sends the message in the non-default transmission direction.
  • the optimized folding switching mechanism when a message is transmitted in a non-default transmission direction, it can be sent to the receiver of the message by the gateway connected to the receiver of the message.
  • the non-default transmission direction of the ring network can be used to transmit the message to the recipient of the message.
  • the MDC connected to gateway 1 is the sender of message 1
  • the lidar connected to gateway 4 is the receiver of message 1.
  • the schematic diagram of message transmission can refer to Figure 1.
  • gateway 2 can detect the failure and change the transmission direction of the message from The default transmission direction is changed to a non-default transmission direction. For example, a message 1 sent by gateway 1 to gateway 2 is sent to gateway 1. After receiving message 1, gateway 1 does not terminate message 1 and continues to send the message 1 is transmitted to gateway 4. After gateway 4 receives message 1, it sends message 1 to the lidar connected to it. When the value of the TTL field in message 1 is 0, the message 1 is terminated. When the TTL field is When the value is not 0, the message 1 is sent to the gateway 3, and the subsequent gateway terminates the message 1. In FIG. 4, the gateway 3 terminates the message 1 as an example for description.
  • the folding switching mechanism refers to an optimized folding switching mechanism, which is described here in a unified manner, and will not be repeated in the following embodiments.
  • the optimized folding switching mechanism can be understood as: a communication device in the Ethernet ring network that detects a fault on the ring network interface, on the ring network interface, all the communication devices that arrive at the ring network interface
  • the message that arrives at the ring network interface is forwarded to other ring network interfaces of the communication device, so that other ring network interfaces can send the message in a transmission direction different from the initial transmission direction, so that the message
  • the transmission direction in the Ethernet ring network changes relative to the initial transmission direction.
  • the initial transmission direction is the transmission direction of the packet in the Ethernet ring network before the fault is detected on the ring network interface, for example, the default transmission of the Ethernet ring network direction.
  • the optimized folding switching mechanism refers to: the communication device that detects a failure on the ring network interface changes the transmission direction of the packet transmitted to the ring network interface in the Ethernet ring network, so that the transmission to the ring network interface The message is transmitted in the Ethernet ring network along a transmission direction different from the initial transmission direction.
  • the Ethernet ring network Under normal circumstances when the Ethernet ring network is fault-free, after the message is transmitted to the Ethernet ring network for the first time, it is transmitted according to the default transmission direction of the ring network (for example, clockwise direction, that is, clockwise direction); a link occurs in the Ethernet ring network After failure or communication equipment failure, due to the folding switching mechanism, packets are transmitted in the Ethernet ring network in a transmission direction different from the default transmission direction, thereby avoiding failed links or failed communication equipment to ensure transmission reliability.
  • the message is transmitted to the Ethernet ring network for the first time, which can be understood as the first time that the gateway in the Ethernet ring network obtains the message, which may also be referred to as the message on the ring.
  • At least one item (a) refers to any combination of these items, including any combination of a single item (a) or a plurality of items (a).
  • at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple .
  • words such as “first” and “second” are used to distinguish the same or similar items with substantially the same function and effect. Those skilled in the art can understand that words such as “first” and “second” do not limit the quantity and order of execution, and words such as “first” and “second” do not limit the difference.
  • the embodiment of the present application provides a communication system.
  • the communication system includes an Ethernet ring network.
  • the Ethernet ring network can be used as an in-vehicle network.
  • the Ethernet ring network may be referred to as an in-vehicle ring network; or, the Ethernet ring network may also be As a network for other purposes, the embodiments of this application do not specifically limit this.
  • the Ethernet ring network includes at least three communication devices, and each of the at least three communication devices is connected to two communication devices through an Ethernet interface.
  • the communication device can also be called a regional communication computing gateway (which can Referred to as gateway), or regional communication computing device, or forwarding device, or node.
  • the speed of the two Ethernet interfaces connecting two adjacent communication devices in the Ethernet ring network is the same.
  • the single Ethernet interface used to connect the communication equipment in the Ethernet ring network may be a 1000BASE-T1 interface or a 10GBASE-T1 interface that conforms to the vehicle regulations.
  • any communication device in the Ethernet ring network can be connected to one or more devices.
  • the Ethernet ring network provides services for data transmission between different devices connected by different communication devices; different communications in the Ethernet ring network
  • the devices connected to the devices may be the same or different, which is not specifically limited in the embodiment of the present application.
  • the equipment connected to the communication device in the Ethernet ring network may be used to assist in the interconnection communication between cars and cars, cars and people, cars and roadside infrastructure, cars and networks, etc.
  • the equipment for example, various sensors, cameras, lidar, etc.
  • the Ethernet ring network in the communication system includes a communication device 1, a communication device 2.
  • the four communication devices in the Ethernet ring network are respectively connected to devices 1 to 4, and the device may be a lidar, for example.
  • the communication device 1 is also connected to a device 5, and the device 5 may be, for example, an MDC.
  • communication equipment refers to the communication equipment constituting the Ethernet ring network, or the communication equipment in the Ethernet ring network. The description is unified here, and the following embodiments will not be repeated.
  • ring network interface refers to an Ethernet interface used to connect other communication devices in a communication device.
  • the ring network interface of communication device 1 in FIG. 5 may be used to connect a communication device. 2 or the interface of the communication device 4;
  • service interface refers to the interface in the communication device other than the ring network interface, or the interface used to connect other devices (for example, lidar, etc.), for example, the communication device 1 in Figure 5
  • the service interface of may be an interface used to connect to device 1 or device 5.
  • the service interface may be an Ethernet interface or other types of interfaces.
  • the embodiment of the present application does not specifically limit the type of the service interface, which is described here in a unified manner, and will not be repeated in the following embodiments.
  • the communication device in the embodiment of the present application may be an in-vehicle terminal installed on a vehicle for assisting the driving of the vehicle, or a chip in the in-vehicle terminal.
  • the vehicle-mounted terminal may be a user equipment (UE), an access terminal, and a terminal unit in a fifth-generation (5th generation, 5G) network or a public land mobile network (PLMN) that will evolve in the future.
  • 5G fifth-generation
  • PLMN public land mobile network
  • the access terminal can be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), with wireless communication Functional handheld devices, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices or wearable devices, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, industrial control (industrial) Wireless terminal in control) or wireless terminal in self-driving (self-driving), etc.
  • the vehicle-mounted terminal can be mobile or fixed.
  • FIG. 6 is a schematic structural diagram of a communication device 30 provided by an embodiment of the application.
  • the communication device 30 includes one or more processors 301, a communication bus 302, and at least one communication interface (in FIG. 6 it is only an example that includes a communication interface 304 and a processor 301 as an example), optional
  • the memory 303 may also be included.
  • the processor 301 may be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more programs for controlling the execution of the program of this application. integrated circuit.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the communication bus 302 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
  • the communication bus 302 is used to connect different components in the communication device 30 so that different components can communicate.
  • the communication interface 304 may include one or more Ethernet interfaces. Optionally, it may also include other types of interfaces, such as a low-voltage differential signal (LVDS) interface, etc. This is not done in this embodiment of the application. Specific restrictions.
  • the communication interface 304 is used to communicate with other devices or communication networks.
  • the communication network may be, for example, a radio access network (RAN), a wireless local area network (WLAN), etc.
  • the communication interface 304 may be a device such as a transceiver or a transceiver.
  • the communication interface 304 may also be a transceiver circuit located in the processor 301 to implement signal input and signal output of the processor.
  • the memory 303 may be a device having a storage function. For example, it can be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions Dynamic storage devices can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disc storage ( Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be stored by a computer Any other media taken, but not limited to this.
  • the memory may exist independently, and is connected to the processor through the communication line 302. The memory can also be integrated with the processor.
  • the memory 303 is used to store computer-executed instructions for executing the solution of the application, and the processor 301 controls the execution.
  • the processor 301 is configured to execute computer-executable instructions stored in the memory 303, so as to implement the data transmission method provided in the embodiment of the present application.
  • the processor 301 may also perform processing-related functions in the data transmission method provided in the following embodiments of the present application, and the communication interface 304 is responsible for communicating with other devices or communication networks.
  • the application embodiment does not specifically limit this.
  • the computer-executable instructions in the embodiments of the present application may also be referred to as application program codes, which are not specifically limited in the embodiments of the present application.
  • the processor 301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 6.
  • the communication device 30 may include multiple processors, such as the processor 301 and the processor 308 in FIG. 6. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • the communication device 30 may further include an output device 305 and an input device 306.
  • the output device 305 communicates with the processor 301 and can display information in a variety of ways.
  • the output device 305 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector (projector) Wait.
  • the input device 306 communicates with the processor 301 and can receive user input in a variety of ways.
  • the input device 306 may be a mouse, a keyboard, a touch screen device, a sensor device, or the like.
  • the folding and switching mechanism when the folded and switched multicast message is transmitted in a non-default transmission direction, it may be repeatedly received by some destination devices of the message, which will affect the service to a certain extent.
  • devices 1-4 are lidars 1-4
  • device 5 is MDC
  • the destination device of multicast message 1 sent by MDC is lidar 1-4.
  • the multicast message 1 sent by the MDC is transmitted clockwise via the communication device 1 to the lidar connected to each communication device.
  • the communication device 3 implements folding switching, so that the multicast message 1 transmitted to the communication device 3 is transmitted to the communication device 4 in a counterclockwise direction, so that the communication device 4 can transmit the multicast message 1 Transmission to lidar 4.
  • the multicast message 1 will be transmitted again by the communication device 3 to the lidar 3, also by the communication device 2 to the lidar 2, and also by the communication device 1 to the lidar 1, so that Lidar 3, Lidar 2 and Lidar 1 repeatedly receive multicast message 1, which may affect their services.
  • an embodiment of the present application provides a data transmission method, which is applied to a communication device in an Ethernet ring network.
  • the communication device receives a first packet through a first ring network interface of the communication device.
  • the first message includes a first field, and the communication device sends the first message according to the value of the first field.
  • the value of the first field is the first value or the second value
  • the first value is used to indicate that the ring network interface is not allowed to send the packet where the first field is located to the service interface
  • the second value is used to indicate that the ring is allowed
  • the network interface sends the packet in which the first field is located to the service interface.
  • the communication device can send the first message according to the value of the first field. Therefore, when the first message is a multicast message, it can be changed after folding and switching.
  • the value of the first field in the first message is set to the first value, so that the communication device does not need to send the multicast message to the service interface of the communication device when sending the first message according to the value of the first field.
  • the device connected to the service interface of the communication device can be prevented from repeatedly receiving multicast packets, and the impact on the service can be reduced.
  • the embodiment of the present application also provides another data transmission method, which is applied to a communication device in an Ethernet ring network, and in this method, the communication device receives the first report through the first ring network interface of the communication device.
  • the first message is a message obtained by changing the transmission direction of the third message in the Ethernet ring network.
  • the first message includes a first field, and the communication device sends the first field according to the value of the first field. Message.
  • the value of the first field is the first value or the second value
  • the first value is used to indicate that the first packet is not forwarded by the source communication device in the non-default transmission direction of the Ethernet ring network
  • the second value is used for Indicate that the first message has been forwarded by the source communication device in the non-default transmission direction of the Ethernet ring network.
  • the first message is a message obtained after changing the transmission direction of the third message in the Ethernet ring network, it can be known that the first message is a message after folding and switching; and because in the first message Including the first field, the communication device can send the first message according to the value of the first field. Therefore, when the first message is a multicast message, the value of the first field in the first message can be set to the first Value.
  • the communication device can know that the communication device is in the default transmission direction before the folding and switching
  • the third message has been transmitted to the device connected to it, so that after the first message is received, there is no need to send the first message to the service interface of the communication device, thereby avoiding the device connected to the service interface of the communication device Receiving multicast packets repeatedly reduces the impact on services.
  • messages refers to the information carrier unit in the Ethernet, which can also be understood as “data frame” or “frame” or “flow” or “data flow”, which can be replaced with each other.
  • data frame or “frame” or “flow” or “data flow”, which can be replaced with each other.
  • flow or “data flow”, which can be replaced with each other.
  • any communication device in the Ethernet ring network receives a message from the device connected to the service interface of the communication device, it can re-encapsulate the message, and the re-encapsulated message format can be as shown in Figure 3. Show.
  • the frame format of the obtained message is based on the frame format shown in FIG. 3, and the first field is added.
  • the length of the first field is It may be N bits, and N is a positive integer less than 27.
  • the first field may be located between the Ethernet type or length field and the payload length/Ethernet type field, which is not specifically limited in the embodiment of the present application. It should be noted that the first field may also have other names, which are not specifically limited in this application.
  • the frame format of the message obtained after the communication device re-encapsulates the message from its service interface in the embodiment of the present application It can be as shown in Figure 8. That is to say, in this scenario, the communication device can re-encapsulate the message from its service interface into the frame format shown in FIG. 8.
  • the frame format shown in FIG. 8 is only an example.
  • the frame format of the obtained message may also be other formats. Just include the first field.
  • the communication device does not change the payload, source media access control (MAC) address, and destination MAC address in the message during the process of re-encapsulating the message from the service interface. This unified description will not be repeated in the following embodiments.
  • MAC media access control
  • the communication device does not change the payload, the source MAC address, and the destination MAC address in the message when the communication device implements the folding and switching, which will be explained here in a unified manner, and the following embodiments will not be repeated.
  • the data transmission method is applied to a communication device in an Ethernet ring network. As shown in FIG. 9, it is a data transmission method provided by an embodiment of the present application. Including the following steps:
  • the communication device receives the first packet through the first ring network interface of the communication device.
  • the first message includes a first field
  • the value of the first field is the first value or the second value
  • the first value is used to indicate that the ring network interface is not allowed to send the message where the first field is located to the service interface.
  • the second value is used to indicate that the ring network interface is allowed to send the packet in which the first field is located to the service interface.
  • the first message may be a multicast message or a unicast message, which is not specifically limited in the embodiment of the present application.
  • the frame format of the first message may be as shown in FIG. 8, for example.
  • the first value can be, for example, "0" and the second value can be, for example, "1"; or, the first value can be, for example, "1", and the second value can be, for example, "0".
  • the first value can be, for example, "1" and the second value can be, for example, "0”.
  • the first field may also be referred to as a receive_ineligible (receive_ineligible) field, and the two may be replaced with each other, which is not specifically limited in the embodiment of the present application.
  • S902 The communication device sends the first message according to the value of the first field.
  • the communication device can send the first message according to the value of the first field. Therefore, when the first message is a multicast message, it can be changed after folding and switching.
  • the value of the first field in the first message is set to the first value, so that the communication device does not need to send the multicast message to the service interface of the communication device when sending the first message according to the value of the first field.
  • the device connected to the service interface of the communication device can be prevented from repeatedly receiving multicast packets, and the impact on the service can be reduced.
  • step S902 may specifically include the following steps:
  • the communication device determines that the value of the first field in the first packet is a first value.
  • step S1002 when the communication device determines that the value of the first field is the first value, it considers that the first message is a message after folding and switching, and the following step S1002 may be performed.
  • the communication device uses the source media access control (medium access control, MAC) address of the first packet to match the first MAC address list.
  • source media access control medium access control, MAC
  • matching the MAC address list with the source/destination MAC address of the message can be understood as: searching the source/destination MAC address of the message in the MAC address list.
  • the first MAC address list includes one or more unicast MAC addresses, any unicast MAC address of the one or more unicast MAC addresses is associated with a service interface of the communication device, and different unicast MAC addresses Different service interfaces of the communication device are associated, that is, the service interface of the communication device has a one-to-one correspondence with the unicast MAC address in the first MAC address list.
  • the unicast MAC address associated with the service interface of the communication device may be the MAC address of the device connected to the service interface learned by the communication device from the service interface; or, it may also be a statically configured MAC address on the service interface.
  • the MAC address is not specifically limited in this embodiment of the application.
  • the communication device since the first value is used to indicate that the ring network interface is not allowed to send the packet where the first field is located to the service interface, therefore, after the communication device uses the source MAC address of the first packet to match the first MAC address list, it can According to the matching result, the first packet is sent to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • step S1003 when the matching is successful, that is, when the matching result is that the first MAC address in the first MAC address list matches the source MAC address of the first packet, the following step S1003 is executed; or, when the matching fails, that is, When the matching result is that there is no match with the source MAC address of the first packet in the first MAC address list, the following step S1004 is executed.
  • matching can be understood as “same”, and the two can be replaced with each other, which is not specifically limited in the embodiments of the present application.
  • the communication device sets the value of the first field of the first packet to a second value.
  • the first MAC address in the first MAC address list matches the source MAC address of the first message, it indicates that the communication device is the source communication device, that is, the method described in step S1003 is applicable to the source communication device.
  • the value of the first field of the first message is the first value
  • the first message is considered to be a message that has undergone folding and switching. This scenario can be understood as the message sent by the source communication device after folding and switching. Back to the source communication device.
  • the data transmission method further includes: the communication device receives the second packet through the first service interface of the communication device, After the communication device re-encapsulates the second message into a third message, the third message is sent through the first ring network interface of the communication device.
  • the source communication device is the source communication device corresponding to the third packet, that is, the first communication device in the Ethernet ring network that sends the third packet, or in other words, the first communication device in the Ethernet ring network
  • the communication device that obtains the third message, and obtaining the third message may be that the communication device receives the second message through its service interface, and re-encapsulates the second message into the third message.
  • the third message includes the first field, and the value of the first field is the second value.
  • the first message can be considered as a message obtained by changing the transmission direction of the third message in the Ethernet ring network.
  • the frame format of the third message may be as shown in FIG. 8.
  • the communication device that changes the transmission direction of the third packet in the Ethernet ring network is the communication device that implements folding and switching. After the communication device that implements the folding and switching changes the transmission direction of the third packet, it can transfer the third packet to The value of the first field in is set to the first value to obtain the first message.
  • message 1 the message obtained after the communication device sets the value of the first field of the first message to the second value may be referred to as message 1.
  • step S1003 the communication device continues to perform step S1004.
  • the communication device subtracts 1 from the value of the TTL field of the first packet.
  • the value of the TTL field of the first packet when the value of the TTL field of the first packet is 0 after subtracting 1, it means that the life cycle of the first packet is over, and the communication device discards the first packet.
  • the value of the TTL field in the text is greater than 0 after minus 1 for illustration.
  • step S1003 when the communication device performs step S1003 and then performs step S1004, the communication device performs the following step S1005a; or, if the communication device performs step S1005a; The device does not perform step S1003, that is, when the matching result is that there is no match with the source MAC address of the first packet in the first MAC address list, the communication device performs the following step S1005b.
  • the communication device sends the message 1 to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • the communication device sends a message obtained by setting the value of the first field of the first message to the second value to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • the communication device may send the message 1 to the communication device connected to the second ring network interface through its second ring network interface.
  • the communication device connected to the second ring network interface of the communication device can send the load of message 1 from its ring network interface to its business interface, so that business data can be sent to its business interface Connected device.
  • the value of the first field of the first message can be set to the second value, and the value of the first field can be sent through the second ring network interface of the source communication device.
  • the ring network interface is sent to its business interface, thereby transmitting to the equipment connected to the business interface.
  • the communication device sends the first packet to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • the communication device may send the first packet to the communication device connected to the second ring network interface through its second ring network interface.
  • the foregoing communication device may be a communication device that implements folding and switching in an Ethernet ring network.
  • the communication device is a communication device that implements folding and switching, and is not the source communication device.
  • the matching result in step S1002 is that the first MAC address list does not exist in the first MAC address list.
  • the source MAC address of the text matches.
  • the third message is transmitted through the second ring network interface of the communication device.
  • the message is sent to the first ring network interface of the communication device, the communication device sends a third message through its first ring network interface, and a fault is detected on the first ring network interface of the communication device.
  • the failure may be a physical layer failure of the first ring network interface of the communication device, or may be a physical layer used for communication between the communication device and the communication device connected to the first ring network interface of the communication device.
  • the failure of the medium for example, the disconnection of the optical fiber
  • the failure of the communication device connected to the first ring network interface of the communication device may be a physical layer failure of the first ring network interface of the communication device, or may be a physical layer used for communication between the communication device and the communication device connected to the first ring network interface of the communication device.
  • the communication device can detect the above-mentioned fault through a CCM connectivity detection message. For example, when the first ring network interface of the communication device does not receive CCM connectivity within 3.5 cycles (one cycle can be 300 microseconds) When detecting the message, it can be considered that the communication device has detected a fault on the first ring network interface of the communication device.
  • the communication device After the communication device detects a failure on the first ring network interface of the communication device, it generates a failure alarm signal on the first ring network interface, and implements port-level loopback at the first ring network interface.
  • the implementation point (or occurrence point) of the port-level loopback at the first ring network interface may be located at the media independent interface (media independent interface (MAC)) of the media access control (MAC) layer of the first ring network interface. interface, MII).
  • media independent interface media independent interface (MAC)
  • MAC media access control
  • MII media access control
  • implementing port-level loopback at the first ring network interface may include: enabling a loopback point reserved for the first ring network interface so as to send data on the MII interface of the MAC layer of the first ring network interface The line is connected to the corresponding receiving line, and the control signal sending line is connected to the corresponding control signal receiving line.
  • the communication device further includes a layer 2 (ie, MAC layer) forwarding unit as an example, Under normal circumstances, the forwarding path of the third packet in the communication device is shown by the dashed line in Figure 11a; when the communication device detects a failure on its first ring network interface, Loopback is implemented at the MII interface of the MAC layer of the interface, and the forwarding path of the third packet in the communication device is shown by the dotted line in Fig. 11b.
  • a layer 2 ie, MAC layer
  • the first ring network interface can receive the third message it previously sent.
  • the third message sent by the sending unit of the MII interface of the MAC layer of the first ring network interface will be received by the receiving unit of the MII interface, that is, it is considered that the first ring network interface has received The third packet looped back by the first ring network interface.
  • the communication device sets the value of the first field in the third message to the first value to obtain the first message. Further, the communication device may also set the value of the wrapped field in the third message to a value different from the initial value, that is, the difference between the first message and the third message lies in the value of the first field and the value of the wrapped field different.
  • the communication device receiving the first packet through the first ring network interface of the communication device may include: the first ring network interface of the communication device loops back the third packet, and the third packet
  • the message includes a first field, and the value of the first field is the second value; the communication device sets the value of the first field in the third message to the first value to obtain the first message.
  • the communication device After the communication device obtains the first message, it executes the above-mentioned data transmission method provided in the embodiment of the present application at the first ring network interface of the communication device, and transmits the first packet through the first ring network interface of the communication device.
  • the message is sent to the second ring network interface of the communication device, so that the second ring network interface of the communication device sends the first message.
  • the transmission path of the first message in the communication device is shown as the dotted line in FIG. 11b.
  • the communication device may be both a source communication device and a communication device that implements a folding switch, that is, the source communication device implements a folding switch.
  • the matching result in step S1002 is that the first MAC address in the first MAC address list matches the source MAC address of the first packet.
  • the source communication device before the source communication device receives the first packet through its first ring network interface, it also receives a second packet through its first service interface, and re-encapsulates the second packet as the first packet. After the three messages, the third message is sent through its first ring network interface, and a failure is detected on the first ring network interface of the source communication device.
  • the source communication device after detecting a failure on its first ring network interface, the source communication device generates a failure alarm signal on its first ring network interface, and implements port-level loopback at its first ring network interface. After the loopback is completed, its first ring network interface can receive the third packet previously sent. After that, the source communication device sets the value of the first field in the third packet to the first value to obtain the first packet .
  • the communication device receiving the first packet through the first ring network interface of the communication device may also include: the first ring network interface of the communication device loops back the third packet, and the first ring network interface of the communication device loops back the third packet.
  • the three messages include a first field, and the value of the first field is the second value; the communication device sets the value of the first field in the third message to the first value to obtain the first message.
  • step S902 may specifically include the following steps:
  • the communication device determines that the value of the first field in the first packet is a second value.
  • the communication device determines that the value of the first field is the second value, it is considered that the first message is a message that has not undergone folding and switching, and the following step S1202 may be performed.
  • the communication device uses the source MAC address of the first packet to match the first MAC address list.
  • the matching result is that the source MAC address of the first packet is included in the first MAC address list
  • the source communication device of the first packet is the communication device, and because the first packet is a packet that has not undergone folding and switching Therefore, this scenario can be understood that after the communication device sends the first message, the first message is not terminated after being forwarded in the Ethernet ring network (that is, after being forwarded by all communication devices in the Ethernet ring network), which is an exception In this case, the communication device discards the first packet.
  • the embodiment of this application does not consider this abnormal situation; when the source MAC address of the first packet is not included in the first MAC address list (matching fails), and the first packet
  • the type of the destination MAC address of a message is a unicast MAC address
  • the following step S1203a is executed, or when the source MAC address of the first message is not included in the first MAC address list, and the destination MAC address of the first message
  • the type of the address is a multicast MAC address
  • the following step S1203b is executed.
  • the communication device uses the destination MAC address of the first packet to match the first MAC address list.
  • step S1204a when there is a second MAC address in the first MAC address list that matches the destination MAC address of the first message, it means that the recipient of the first message is the device connected to the service interface associated with the second MAC address, The following step S1204a is performed.
  • step S1205 when there is no MAC address matching the destination MAC address of the first packet in the first MAC address list, it means that none of the devices connected to the communication device is the recipient of the first packet, and the following step S1205 is performed.
  • the communication device sends a message 2 to the second service interface of the communication device through the first ring network interface of the communication device.
  • the second service interface is the service interface associated with the second MAC address
  • message 2 is the message obtained after re-encapsulating the first message
  • the frame format of message 2 conforms to the protocol used by the device connected to the second service interface .
  • the communication device uses the destination MAC address of the first packet to match the second MAC address list.
  • the second MAC address list includes one or more multicast MAC addresses, and any one of the one or more multicast MAC addresses is associated with one or more service interfaces of the communication device, that is, the communication device One service interface can join multiple multicast groups.
  • the first multicast MAC address matches the destination MAC address of the first packet in the second MAC address list, it means that the recipient of the first packet includes one or more associated with the first multicast MAC address.
  • the device connected to each service interface executes the following step S1204b.
  • the type of the destination MAC address of the first message is a multicast MAC address
  • the first message is a multicast message.
  • the communication device may also perform step S1205 to make the multicast message Send to other communication devices.
  • step S1205 when there is no MAC address matching the destination MAC address of the first packet in the second MAC address list, it means that none of the devices connected to the communication device is the recipient of the first packet, and the following step S1205 is performed.
  • the communication device sends the message 2 to the third service interface of the communication device through the first ring network interface of the communication device.
  • the third service interface includes one or more service interfaces associated with the first multicast MAC address in the communication device, message 2 is a message obtained after re-encapsulating the first message, and the frame format of message 2 conforms to the first 3.
  • the protocol used by the equipment connected to the service interface includes one or more service interfaces associated with the first multicast MAC address in the communication device, message 2 is a message obtained after re-encapsulating the first message, and the frame format of message 2 conforms to the first 3.
  • the protocol used by the equipment connected to the service interface is a protocol used by the equipment connected to the service interface.
  • the communication device subtracts 1 from the value of the TTL field of the first packet.
  • step S1004 When the value of the TTL field of the first message is less than 1 and is greater than 0, the following step S1206 is executed.
  • the communication device sends the first packet to the second ring network interface of the communication device through the first ring network interface of the communication device.
  • the communication device can normally receive packets that have not undergone folding and switching according to the value of the first field, so that services are not affected.
  • each communication device is used to describe the application of the data transmission method provided in the foregoing embodiment of the present application.
  • the communication device 1 receives a second message through the first service interface of the communication device 1 (take the service interface for connecting the device 5 as an example), the second message is a multicast message, and the second message The recipients include device 1 to device 4.
  • the communication device 1 encapsulates the second message into a third message, and sends the third message through the first ring network interface of the communication device 1 (taking the ring network interface for connecting the communication device 2 as an example).
  • the third packet is also sent through the service interface of the communication device 1 for connecting to the device 1, so as to send the data in the packet to the device 1.
  • the second ring network interface of the communication device 2 receives the third message from the communication device 1 and determines the first field in the third message If the value of is the second value, the method shown in Figure 12 is executed.
  • S901 in Figure 12 is that the communication device 2 receives the third packet through the second ring network interface of the communication device 2, and the remaining steps are similar ,
  • the operation on the first message can be replaced with the operation on the third message, so that the communication device 2 can send the load of the third message to the device 2, and send it to the first message through its second ring network interface.
  • a ring network interface (taking a ring network interface for connecting with the communication device 3 as an example) sends a third message, and the first ring network interface may send the third message after receiving the third message.
  • the second ring network interface of the communication device 3 receives the third message from the communication device 2 and determines the first field in the third message
  • the value of is the second value
  • the process similar to the method shown in Figure 12 is executed, the payload of the third packet is sent to device 3, and the second ring network interface is sent to its first ring network interface (with The ring network interface used to connect with the communication device 4 as an example) sends a third message, and the first ring network interface may send the third message after receiving the third message.
  • the communication device 3 detects a failure on its first ring network interface, the communication device 3 implements a port-level loopback on its first ring network interface, receives its third loopback packet, and then The value of the first field in the third message is set from the second value to the first value to obtain the first message. After that, the method shown in FIG. 10 is executed. Among them, because the communication device 3 is not the source communication device, the communication device 3 will not perform steps S1003 and S1005a, that is, after the first ring network interface of the communication device 3 executes the method shown in FIG.
  • the network interface sends the first message to its second ring network interface, and its second ring network interface sends the first message to the communication device 2 after receiving the first message. At this time, the first message is transmitted along the non-default transmission direction.
  • the first ring network interface of the communication device 2 After the first ring network interface of the communication device 2 receives the first message, it executes the method shown in FIG. 10, wherein the communication device 2 also does not execute steps S1003 and S1005a, that is, the first message is finally communicated The second ring network interface of device 2 is sent to communication device 1.
  • the first ring network interface of the communication device 1 executes the method shown in FIG. 10. Among them, because the communication device 1 is the source communication device, the communication device 1 will perform step S1003 and step S1005a, that is, rewrite the value of the first field, and pass its second ring network interface (for the ring connected to the communication device 4).
  • the network interface is taken as an example)
  • a message obtained by rewriting the value of the first field of the first message is sent to the communication device 4, which is referred to as message 1 in the embodiment of the present application.
  • the first ring network interface of the communication device 4 (take the ring network interface for connecting with the communication device 1 as an example) receives the message 1, it executes the method shown in Figure 12 above, and finally sends the payload in the message 1 To the device 4, so that the device 4 receives the service data, and the impact of the fault in the Ethernet ring network on the service of the device 4 is reduced.
  • another data transmission method provided in this embodiment of the present application is applied to a communication device in an Ethernet ring network, and the data transmission method includes the following steps:
  • the communication device receives the first packet through the first ring network interface of the communication device.
  • the communication device determines that the value of the second field in the first packet is a third value.
  • the second field (for example, the wrapped field) is used for folding and switching, and the third value is used to indicate that the first message is a message that has undergone folding and switching.
  • the first message is used as the message obtained after changing the transmission direction of the third message in the Ethernet ring network. That is, the third message can be understood as the message before the folding and switching.
  • the message can be understood as a message after folding and switching, and the load, source MAC address, and destination MAC address of the first message and the third message are the same.
  • the first message includes a first field
  • the value of the first field is the first value or the second value
  • the first value is used to indicate that the first message has not passed through source communication in the non-default transmission direction of the Ethernet ring
  • the second value is used to indicate that the first packet has been forwarded by the source communication device in the non-default transmission direction of the Ethernet ring network.
  • the source communication device is the source communication device corresponding to the third packet, that is, the first communication device in the Ethernet ring network that sends the third packet, or in other words, the first communication device in the Ethernet ring network
  • the communication device that obtains the third message, and obtaining the third message may be that the communication device receives the second message through its service interface, and re-encapsulates the second message into the third message.
  • the first message may be a multicast message or a unicast message, which is not specifically limited in the embodiment of the present application.
  • the frame format of the first message may be as shown in FIG. 8, for example.
  • the first value can be, for example, "0" and the second value can be, for example, "1"; or, the first value can be, for example, "1", and the second value can be, for example, "0".
  • the first value can be, for example, "1" and the second value can be, for example, "0”.
  • the first field may also be referred to as a source_visited field, and the two may be replaced with each other, which is not specifically limited in the embodiment of the present application.
  • the fourth value is used to indicate that the first message is a message that has not undergone folding and switching, and the communication device may perform the above step S1202- For S1204a or steps S1202-S1204b or steps S1202-S1206, the specific implementation can refer to the above-mentioned related descriptions, which will not be repeated here.
  • the communication device sends the first packet according to the value of the first field.
  • the first message is a message obtained after changing the transmission direction of the third message in the Ethernet ring network, it can be known that the first message is a message after folding and switching; and because in the first message Including the first field, the communication device can send the first message according to the value of the first field. Therefore, when the first message is a multicast message, the value of the first field in the first message can be set to the first Value.
  • the communication device can know that the communication device is in the default transmission direction before the folding and switching
  • the third message has been transmitted to the device connected to it, so that after the first message is received, there is no need to send the first message to the service interface of the communication device, thereby avoiding the device connected to the service interface of the communication device Receiving multicast packets repeatedly reduces the impact on services.
  • the above-mentioned step S1402 may specifically include the above-mentioned steps S1001-S1005a shown in FIG. 10, or the above-mentioned steps S1001-S1005b, wherein, in this embodiment, the difference lies in:
  • step S1002 Since the first value is used to indicate that the first packet has not been forwarded by the source communication device in the non-default transmission direction of the Ethernet ring network, that is, the packet after the folding and switching has not been forwarded in the non-default transmission direction. It is transmitted to the source communication device. Therefore, when the first message is a multicast message, the communication device can know that the communication device has already transmitted the third message to the device connected to it in the default transmission direction before folding and switching. The first message may not be sent to the service interface of the communication device, and after the communication device uses the source MAC address of the first message to match the first MAC address list, it may send the first message to the communication device through the first ring network interface of the communication device according to the matching result. The second ring network interface of the communication device sends the first message.
  • step S1003 when the first MAC address in the first MAC address list matches the source MAC address of the first packet, the communication device is the source communication device.
  • the data transmission method further includes: the communication device receives the second message through the first service interface of the communication device, and the communication device connects After the second message is re-encapsulated into a third message, the third message is sent through the first ring network interface of the communication device.
  • the third message includes the first field, and the value of the first field is the first value.
  • the first message can be considered as a message obtained by changing the transmission direction of the third message in the Ethernet ring network.
  • the frame format of the third message may be as shown in FIG. 8.
  • the value of the first field in the third message obtained after the source communication device re-encapsulates the second message is the first value.
  • the communication device that changes the transmission direction of the third packet in the Ethernet ring network is the communication device that implements folding and switching. After the communication device that implements the folding and switching changes the transmission direction of the third packet, it can transfer the third packet to The value of the second field in is set to the third value, so that the first message is obtained.
  • the communication device that implements the folding and switching changes the transmission direction of the third packet, it can transfer the third packet to The value of the second field in is set to the third value, so that the first message is obtained.
  • the communication device that implements the folding and switching does not change the value of the first field in the third packet.
  • the value of this first field is modified only once at the source communication device.
  • the foregoing step S1402 may specifically include the foregoing steps S1201-S1204a or S1201-S1204b or steps S1201-S1206 shown in FIG. 12, wherein, in this embodiment, the difference lies in:
  • the communication device does not execute step S1202, that is, after step S1201, it executes step S1203a or S1203b.
  • step S1202 that is, after step S1201, it executes step S1203a or S1203b.
  • each communication device is used to describe the application of the data transmission method provided in the foregoing embodiment of the present application.
  • the communication device 1 receives a second message through its first service interface, the second message is a multicast message, and the recipients of the second message are message devices 1 to 4. After that, the communication device 1 encapsulates the second message into a third message, and sends the third message through the first ring network interface of the communication device 1. Further, the third packet is also sent through the service interface of the communication device 1 for connecting to the device 1, so as to send the data in the packet to the device 1.
  • the value of the second field in the third message is the fourth value, that is, it indicates that the third message is a message that has not undergone folding and switching.
  • the second ring network interface of the communication device 2 executes the above steps S1202-S1206, sends the third packet to the communication device 3, and sends the payload of the third packet to the device 2.
  • the second ring network interface of the communication device 3 receives the third message from the communication device 2, performs a message receiving process similar to that of the communication device 2, and sends the third message to the first ring network interface of the communication device 3, and Send the payload of the third packet to device 3.
  • the communication device 3 detects a failure on its first ring network interface, the communication device 3 implements a port-level loopback on its first ring network interface, receives its third loopback packet, and then The value of the second field in the third message is set from the fourth value to the third value to obtain the first message. After that, the first packet is sent to the communication device 2 after the method shown in FIG. 10 is executed, wherein the communication device 3 will not send the load of the first packet to the device 3 again.
  • the communication device 2 After the communication device 2 receives the first message, it executes the method shown in FIG. 10 to send the first message to the communication device 1. The communication device 2 will not send the load of the first message to the device 2 again. .
  • the communication device 1 After the communication device 1 receives the first message, it executes the method shown in FIG. 10, sets the value of the first field of the first message to the second value, and sends the value of the first field to the communication device 4 to obtain This message is referred to as message 1 in this embodiment of the application.
  • the first ring network interface of the communication device 4 After the first ring network interface of the communication device 4 receives the message 1, it executes the above steps S1201-S1204a or S1201-S1204b or steps S1201-S1206. It should be noted that the communication device 4 does not execute step S1202, that is, in step After S1201, step S1203a or S1203b is executed.
  • the communication device may perform some or all of the steps in the embodiments of the present application, and these steps or operations are only examples, and the embodiments of the present application may also perform other operations or variations of various operations.
  • each step may be executed in a different order presented in the embodiments of the present application, and it may not be necessary to perform all the operations in the embodiments of the present application.
  • the methods and/or steps implemented by the communication device may also be implemented by components (for example, chips or circuits) that can be used in the communication device.
  • an embodiment of the present application also provides a communication device, which is used to implement the foregoing various methods.
  • the communication device may be the communication device in the foregoing method embodiment, such as a vehicle-mounted communication device, or a device including the foregoing communication device, such as various types of vehicles, or a device included in the foregoing communication device, such as a chip or a system chip.
  • the communication device includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiments of the present application may divide the communication device into functional modules according to the foregoing method embodiments.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 15 shows a schematic structural diagram of a communication device 150.
  • the communication device 150 includes a processing module 1501 and a transceiver module 1502.
  • the transceiver module 1502 may also be referred to as a transceiver unit to implement sending and/or receiving functions, for example, it may be a transceiver circuit, transceiver, transceiver or communication interface.
  • the transceiver module 1502 may include one or more of the first ring network interface, the second ring network interface, or the first service interface.
  • the processing module 1501 is configured to receive a first message through the first ring network interface of the transceiver module 1502, the first message includes a first field, and the value of the first field is a first value or a second value.
  • the value is used to indicate that the ring network interface is not allowed to send the packet with the first field to the service interface, and the second value is used to indicate that the ring network interface is allowed to send the packet with the first field to the service interface; the processing module 1501 is also used for The first message is sent through the transceiver module 1502 according to the value of the first field.
  • the processing module 1501 is configured to send the first message through the transceiver module 1502 according to the value of the first field, including: when the value of the first field is the first value, the processing module 1501 is configured to use the first message
  • the source MAC address of the document matches the first MAC address list; the processing module 1501 is further configured to send the first packet to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502 according to the matching result.
  • a MAC address list includes one or more unicast MAC addresses, and any one of the one or more unicast MAC addresses is associated with a service interface of the communication device.
  • the processing module 1501 is further configured to send a first message to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502 according to the matching result, including: when the matching result is the first MAC address When there is a match between the first MAC address in the list and the source MAC address of the first message, the processing module 1501 is further configured to send the second ring network interface of the transceiver module 1502 to the second ring network interface of the transceiver module 1502. A message obtained after the value of the first field of a message is set to the second value.
  • the processing module 1501 is further configured to send a first message to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502 according to the matching result, including: when the matching result is the first MAC address When there is no MAC address that matches the source MAC address of the first message in the list, the processing module 1501 is further configured to send the first ring network interface to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502. Message.
  • the processing module 1501 is further configured to receive the second message through the first service interface of the transceiver module 1502; the processing module 1501 is also configured to re-encapsulate the second message into a third message, and then through the transceiver module 1501.
  • the first ring network interface of 1502 sends a third message, where the third message includes the first field, the value of the first field is the second value, and the first message is to change the third message in the Ethernet ring network.
  • the processing module 1501 is configured to receive the first packet through the first ring network interface of the transceiver module 1502, and includes: a processing module 1501, configured to loop back the third packet through the first ring network interface of the transceiver module 1502 Message, the third message includes the first field, and the value of the first field is the second value; the processing module 1501 is also used to set the value of the first field in the third message to the first value to obtain The first message.
  • the processing module 1501 is further configured to send the first message through the transceiver module 1502 according to the value of the first field, including: when the value of the first field is the second value, the processing module 1501 is further configured to send the first message according to the first field value.
  • a MAC address list or a second MAC address list sends the first message through the transceiver module 1502, the first MAC address list includes one or more unicast MAC addresses, and any one of the one or more unicast MAC addresses is unicast MAC The address is associated with a service interface of the communication device, and the second MAC address list includes one or more multicast MAC addresses, and any one of the one or more multicast MAC addresses is associated with one or more service interfaces of the communication device .
  • the processing module 1501 is configured to receive a first message through the first ring network interface of the transceiver module 1502.
  • the first message is a message obtained after changing the transmission direction of the third message in the Ethernet ring network.
  • the first message The value of the first field is the first value or the second value.
  • the first value is used to indicate that the first packet is not forwarded by the source communication device in the non-default transmission direction of the Ethernet ring network.
  • the value is used to indicate that the first packet has been forwarded by the source communication device in the non-default transmission direction of the Ethernet ring network; the processing module 1501 is also used to send the first packet through the transceiver module 1502 according to the value of the first field.
  • the processing module 1501 is configured to send the first message through the transceiver module 1502 according to the value of the first field, including: when the value of the first field is the first value, the processing module 1501 is configured to use the first message
  • the source MAC address of the document matches the first MAC address list; the processing module 1501 is further configured to send the first packet to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502 according to the matching result.
  • a MAC address list includes one or more unicast MAC addresses, and any one of the one or more unicast MAC addresses is associated with a service interface of the communication device.
  • the processing module 1501 is further configured to send a first message to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502 according to the matching result, including: when the matching result is the first MAC address When there is a match between the first MAC address in the list and the source MAC address of the first message, the processing module 1501 is further configured to send the second ring network interface of the transceiver module 1502 to the second ring network interface of the transceiver module 1502. A message obtained after the value of the first field of a message is set to the second value.
  • the processing module 1501 is further configured to send a first message to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502 according to the matching result, including: when the matching result is the first MAC address When there is no MAC address that matches the source MAC address of the first message in the list, the processing module 1501 is further configured to send the first ring network interface to the second ring network interface of the transceiver module 1502 through the first ring network interface of the transceiver module 1502. Message.
  • the processing module 1501 is further configured to receive the second message through the first service interface of the transceiver module 1502; the processing module 1501 is also configured to re-encapsulate the second message into a third message, and then through the transceiver module 1501.
  • the first ring network interface of 1502 sends a third message, where the third message includes a first field, and the value of the first field is the first value.
  • the processing module 1501 is further configured to send the first message through the transceiver module 1502 according to the value of the first field, including: when the value of the first field is the second value, the processing module 1501 is further configured to send the first message according to the first field value.
  • a MAC address list or a second MAC address list sends the first message through the transceiver module 1502.
  • the first MAC address list includes one or more unicast MAC addresses, and any one of the one or more unicast MAC addresses is unicast MAC
  • the address is associated with a service interface of the communication device
  • the second MAC address list includes one or more multicast MAC addresses, and any one of the one or more multicast MAC addresses is associated with one or more service interfaces of the communication device .
  • the communication device 150 is presented in the form of dividing various functional modules in an integrated manner.
  • the "module” here can refer to a specific ASIC, circuit, processor and memory that executes one or more software or firmware programs, integrated logic circuit, and/or other devices that can provide the above-mentioned functions.
  • the communication device 150 may take the form of the communication device 30 shown in FIG. 6.
  • the processor 301 in the communication device 30 shown in FIG. 6 may invoke the computer execution instructions stored in the memory 303 to enable the communication device 30 to execute the data transmission method in the foregoing method embodiment.
  • the functions/implementation process of the processing module 1501 and the transceiver module 1502 in FIG. 15 may be implemented by the processor 301 in the communication device 30 shown in FIG. 6 calling a computer execution instruction stored in the memory 303.
  • the function/implementation process of the processing module 1501 in FIG. 15 can be implemented by the processor 301 in the communication device 30 shown in FIG. 6 calling a computer execution instruction stored in the memory 303, and the function of the transceiver module 1502 in FIG. 15 /The realization process can be realized through the communication interface 304 in the communication device 30 shown in FIG. 6.
  • the communication device 150 provided in this embodiment can execute the above-mentioned data transmission method, the technical effects that can be obtained can refer to the above-mentioned method embodiment, and will not be repeated here.
  • an embodiment of the present application further provides a communication device (for example, the communication device may be a chip or a chip system), and the communication device includes a processor for implementing the method in any of the foregoing method embodiments.
  • the communication device also includes a memory.
  • the memory is used to store necessary program instructions and data, and the processor can call the program code stored in the memory to instruct the communication device to execute the method in any of the foregoing method embodiments.
  • the memory may not be in the communication device.
  • the communication device further includes an interface circuit, the interface circuit is a code/data read-write interface circuit, and the interface circuit is used to receive computer-executed instructions (computer-executed instructions are stored in a memory, and may be directly downloaded from The memory is read, or possibly through other devices) and transferred to the processor.
  • the communication device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices, which is not specifically limited in the embodiment of the present application.
  • the embodiment of the present application further provides a computer-readable storage medium, which stores instructions in the computer-readable storage medium.
  • the communication device can execute any one of the above-mentioned communication devices. The method described in the aspect.
  • the embodiments of the present application also provide a computer program product containing instructions, which when the instructions run on the above-mentioned communication device, enable the communication device to execute the method described in any of the above-mentioned aspects.
  • the communication device does not necessarily include a memory, and the communication device can execute corresponding functions by calling instructions in the external memory; or, the corresponding program instructions can be loaded into the communication device at a later stage In the memory for the processor to execute the corresponding operation after being called.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • a software program it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, 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.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or includes one or more data storage devices such as servers, data centers, etc. that can be integrated with the medium.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the computer may include the aforementioned device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请实施例提供数据传输方法、设备及系统,可应用于涉及车辆驾驶的系统,比如自动驾驶系统或车联网(vehicle to everything,V2X)系统,具体的,可应用于以太环网中的通信设备。该方法中,通信设备通过该通信设备的第一环网接口接收第一报文,第一报文中包括第一字段,第一字段的值为第一数值或第二数值,第一数值用于指示不允许环网接口向业务接口发送第一字段所在的报文,第二数值用于指示允许环网接口向业务接口发送第一字段所在的报文;之后,该通信设备根据第一字段的值发送第一报文。基于该方案,可以避免通信设备的业务接口连接的设备重复接收组播报文,降低对业务的影响。

Description

数据传输方法、设备及系统
本申请要求于2020年01月07日提交国家知识产权局、申请号为202010015658.5、申请名称为“数据传输方法、设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及数据传输方法、设备及系统。
背景技术
车载网络(In-vehicle Network)指承载汽车内部的传感器、控制器和执行器等各类设备的数据传输的网络,车载网络为数据传输提供高可靠、低时延,以及短时间快速启动等特性。随着汽车的电动化、智能化的发展,传统的诸如控制区域网络(control area network,CAN)等已经无法满足车载传感器的大带宽等需求,因此,使用具备大带宽、拥有庞大产业生态圈的以太网作为下一代车载网络已经成为业界的一个主流共识。
此外,环形网络拓扑具有简化骨干冗余拓扑、可使用多种故障恢复技术、以及简化控制协议等优点,是普遍采用的可靠性网络拓扑,从而可以将车载网络设计为环形以太网拓扑,即可以将以太环网作为车载网络。
现有技术中,对以太网的帧格式进行了扩展,基于扩展的以太网的帧格式优化了电气和电子工程师协会(institute of electrical and electronics engineers,IEEE)802.17工作组发布的弹性分组环网(resilient packet ring,RPR)标准提出的折叠倒换机制。优化后的折叠倒换机制,在以太环网中发生链路故障或节点故障后,所有抵达检测到该故障的接口的数据沿与原传输方向完全相反的方向在环形网络中传输,从而避开故障节点或故障链路,其中,数据在与原传输方向完全相反的方向上传输时,可以被环网中的节点接收。
在作为车载网络的以太环网中,环网中传输的数据的发送方和接收方可能是与环网中的节点连接的设备,环网中的节点接收到数据后可能需要将该数据发送至与其连接的目的设备。
然而,组播报文的目的设备可能包括与环网中的多个节点连接的多个设备,位于源节点与实施折叠倒换的节点(包括实施折叠倒换的节点)之间的节点,在折叠倒换前,可以在默认的传输方向上接收该组播报文,并将该组播报文发送至与其连接的目的设备;在折叠倒换后,该组播报文沿与默认方向相反的方向传输,此时,位于源节点与实施折叠倒换的节点(包括源节点和实施折叠倒换的节点)之间的节点,会再次接收到组播报文,并再次将该组播报文发送至与其连接的目的设备,导致部分目的设备会重复接收组播报文,从而对业务造成一定影响。
因此,在实施折叠倒换后,如何避免以太环网中的部分节点连接的目的设备重复接收组播报文,是目前亟待解决的问题。
发明内容
本申请实施例提供一种数据传输方法、设备及系统,可以避免通信设备的业务接口连接的设备重复接收组播报文,降低对业务的影响。
为达到上述目的,本申请的实施例采用如下技术方案:
第一方面,提供了一种数据传输方法及相应的装置,该数据传输方法应用于以太环网中的通信设备,该方法包括:该通信设备通过该通信设备的第一环网接口接收第一报文,该第 一报文中包括第一字段,该第一字段的值为第一数值或第二数值,该第一数值用于指示不允许环网接口向业务接口发送第一字段所在的报文,该第二数值用于指示允许环网接口向业务接口发送第一字段所在的报文;该通信设备根据第一字段的值发送第一报文。
基于该方案,由于第一报文中包括第一字段,通信设备可以根据第一字段的值发送第一报文,因此,当第一报文为组播报文时,在折叠倒换后可以将第一报文中第一字段的值设置为第一数值,从而使得该通信设备在根据第一字段的值发送第一报文时,无需向该通信设备的业务接口发送该组播报文,进而可以避免该通信设备的业务接口连接的设备重复接收组播报文,降低对业务的影响。
在一种可能的设计中,通信设备根据第一字段的值发送第一报文,包括:当第一字段的值为第一数值时,通信设备使用第一报文的源媒体接入控制MAC地址匹配第一MAC地址列表,并根据匹配结果通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文,该第一MAC地址列表包括一个或多个单播MAC地址,该一个或多个单播MAC地址中的任意一个单播MAC地址关联通信设备的一个业务接口。
基于该方案,在第一报文的第一字段的值为第一数值时,通信设备通过其第一环网接口向其第二环网接口发送第一报文,而无需向其业务接口发送第一报文,可以避免该通信设备的业务接口连接的设备重复接收第一报文,降低对业务的影响。
在一种可能的设计中,上述根据匹配结果通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,该通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送将第一报文的第一字段的值设置为第二数值后得到的报文。
基于该方案,当匹配结果为第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,该通信设备为源通信设备,因此可以将第一报文的第一字段的值设置为第二数值,并通过其第二环网接口发送将第一字段的值设置为第二数值的报文,使得在默认传输方向上未收到第三报文的,且为非默认传输方向上的该通信设备的下游通信设备的通信设备,可以将报文由其环网接口发送至其业务接口,从而传输至业务接口连接的设备。
在一种可能的设计中,上述根据匹配结果通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中不存在与第一报文的源MAC地址相匹配的MAC地址时,该通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文。
在一种可能的设计中,在通信设备通过该通信设备的第一环网接口接收第一报文之前,该方法还包括:通信设备通过该通信设备的第一业务接口接收第二报文;通信设备将第二报文重新封装为第三报文后,通过该通信设备的第一环网接口发送第三报文,其中,该第三报文中包括第一字段,该第一字段的值为第二数值,该第一报文为改变第三报文在以太环网中的传输方向后得到的报文。
基于该方案,由于在通信设备通过其业务接口接收第二报文后,可以将第二报文重新封装为第三报文,且第三报文中包括第一字段,从而在第三报文或改变第三报文在以太环网中的传输方向后得到的报文在传输过程中,以太环网中的通信设备可以根据第一字段发送报文。
在一种可能的设计中,通信设备在第一环网接口上检测到故障,该通信设备通过该通信设备的第一环网接口接收第一报文,包括:该通信设备的第一环网接口环回第三报文,第三报文中包括第一字段,该第一字段的值为第二数值;该通信设备将该第三报文中的第一字段的值设置为第一数值后得到第一报文。
基于该方案,由于可以在折叠倒换时将第三报文的第一字段的值设置为第一数值得到第一报文,因此通信设备在通过其环网接口接收到第一报文后,可以根据第一字段的值,无需向该通信设备的业务接口发送该第一报文,进而可以避免该通信设备的业务接口连接的设备重复接收第一报文,降低对业务的影响。
在一种可能的设计中,该通信设备根据第一字段的值发送第一报文,包括:当第一字段的值为第二数值时,通信设备根据第一MAC地址列表或第二MAC地址列表发送第一报文,该第一MAC地址列表包括一个或多个单播MAC地址,该一个或多个单播MAC地址中的任意一个单播MAC地址关联该通信设备的一个业务接口,该第二MAC地址列表包括一个或多个组播MAC地址,该一个或多个组播MAC地址中的任意一个组播MAC地址关联该通信设备的一个或多个业务接口。基于该方案,在第一字段的值为第二数值的情况下,可以使得第一报文正常传输至通信设备的业务接口,从而传输至该业务接口连接的设备,进而保证业务的正常传输。
第二方面,提供了一种数据传输方法及相应的装置,该数据传输方法应用于以太环网中的通信设备,该方法包括:通信设备通过该通信设备的第一环网接口接收第一报文,该第一报文为改变第三报文在该以太环网中的传输方向后得到的报文,该第一报文中包括第一字段,该第一字段的值为第一数值或第二数值,该第一数值用于指示第一报文在以太环网的非默认传输方向上未经过源通信设备的转发,该第二数值用于指示第一报文在以太环网的非默认传输方向上经过了源通信设备的转发;该通信设备根据第一字段的值发送第一报文。
基于该方案,由于第一报文为改变第三报文在以太环网中的传输方向后得到的报文,因此可知第一报文为折叠倒换后的报文;又由于第一报文中包括第一字段,通信设备可以根据第一字段的值发送第一报文,因此,当第一报文为组播报文时,可以将第一报文中第一字段的值设置为第一数值,此时,第一报文经过了折叠倒换,但在以太环网的非默认传输方向上未经过源通信设备的转发,则该通信设备可知在折叠倒换前的默认传输方向上该通信设备已经将第三报文传输至与其连接的设备,从而在接收到第一报文后,无需向该通信设备的业务接口发送该第一报文,进而可以避免该通信设备的业务接口连接的设备重复接收组播报文,降低对业务的影响。
在一种可能的设计中,通信设备根据第一字段的值发送第一报文,包括:当第一字段的值为第一数值时,通信设备使用第一报文的源媒体接入控制MAC地址匹配第一MAC地址列表,并根据匹配结果通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文,该第一MAC地址列表包括一个或多个单播MAC地址,该一个或多个单播MAC地址中的任意一个单播MAC地址关联通信设备的一个业务接口。
在一种可能的设计中,上述根据匹配结果通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,该通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送将第一报文的第一字段的值设置为第二数值后得到的报文。
在一种可能的设计中,上述根据匹配结果通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中不存在与第一报文的源MAC地址相匹配的MAC地址时,该通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文。
在一种可能的设计中,在通信设备通过该通信设备的第一环网接口接收第一报文之前,该方法还包括:通信设备通过该通信设备的第一业务接口接收第二报文;通信设备将第二报 文重新封装为第三报文后,通过该通信设备的第一环网接口发送第三报文,其中,第三报文中包括第一字段,该第一字段的值为第一数值。
在一种可能的设计中,该通信设备根据第一字段的值发送第一报文,包括:当第一字段的值为第二数值时,通信设备根据第一MAC地址列表或第二MAC地址列表发送第一报文,该第一MAC地址列表包括一个或多个单播MAC地址,该一个或多个单播MAC地址中的任意一个单播MAC地址关联该通信设备的一个业务接口,该第二MAC地址列表包括一个或多个组播MAC地址,该一个或多个组播MAC地址中的任意一个组播MAC地址关联该通信设备的一个或多个业务接口。基于该方案,在第一字段的值为第二数值的情况下,可以使得第一报文正常传输至通信设备的业务接口,从而传输至该业务接口连接的设备,进而保证业务的正常传输。
结合上述第一方面或第二方面,在一种可能的设计中,上述通信设备根据第一MAC地址列表发送第一报文,包括:当该第一报文的目的MAC地址的类型为单播MAC地址时,该通信设备使用该第一报文的目的MAC地址匹配第一MAC地址列表;当该第一MAC地址列表中存在第二MAC地址与该第一报文的目的MAC地址相匹配时,该通信设备通过该通信设备的第一环网接口向第二业务接口发送重新封装该第一报文后得到的报文,该第二业务接口为该第二MAC地址关联的业务接口;或者,当该第一MAC地址列表中不存在与该第一报文的目的MAC地址相匹配的MAC地址时,该通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送该第一报文。
结合上述第一方面或第二方面,在一种可能的设计中,上述通信设备根据第二MAC地址列表发送第一报文,包括:当第一报文的目的MAC地址的类型为组播MAC地址时,通信设备使用第一报文的目的MAC地址匹配第二MAC地址列表;当第二MAC地址列表中存在第一组播MAC地址与第一报文的目的MAC地址相匹配时,通信设备通过通信设备的第一环网接口向第三业务接口发送重新封装第一报文后得到的报文,第三业务接口包括通信设备中与第一组播MAC地址关联的一个或多个业务接口;或者,当第二MAC地址列表中不存在与第一报文的目的MAC地址相匹配的组播MAC地址时,通信设备通过通信设备的第一环网接口向通信设备的第二环网接口发送第一报文。
结合上述第一方面或第二方面,在一种可能的设计中,当第二MAC地址列表中存在第一组播MAC地址与第一报文的目的MAC地址相匹配时,该方法还包括:通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文。
第三方面,提供了一种通信装置用于实现上述各种方法。该通信装置可以为上述第一方面或第二方面中的通信设备,比如车载通信装置,或者包含上述通信设备的装置,比如各种类型的车辆,或者上述通信设备中包含的装置,比如芯片或系统芯片。所述通信装置包括实现上述方法相应的模块、单元、或手段(means),该模块、单元、或means可以通过硬件实现,软件实现,或者通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块或单元。
第四方面,提供了一种通信装置,包括:处理器,还可以包括存储器;该存储器用于存储计算机指令,当该处理器执行该指令时,以使该通信装置执行上述任一方面所述的方法。该通信装置可以为上述第一方面或第二方面中的通信设备,比如车载通信装置,或者包含上述通信设备的装置,比如各种类型的车辆,或者上述通信设备中包含的装置,比如芯片或系统芯片。
第五方面,提供了一种通信装置,包括:处理器;所述处理器用于与存储器耦合,并读 取存储器中的指令之后,根据所述指令执行如上述任一方面所述的方法。该通信装置可以为上述第一方面或第二方面中的通信设备,比如车载通信装置,或者包含上述通信设备的装置,比如各种类型的车辆,或者上述通信设备中包含的装置,比如芯片或系统芯片。
第六方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当所述指令在通信装置上运行时,使得通信装置可以执行上述任一方面所述的方法。该通信装置可以为上述第一方面或第二方面中的通信设备,比如车载通信装置,或者包含上述通信设备的装置,比如各种类型的车辆,或者上述通信设备中包含的装置,比如芯片或系统芯片。
第七方面,提供了一种包含指令的计算机程序产品,当所述指令在通信装置上运行时,使得所述通信装置可以执行上述任一方面所述的方法。该通信装置可以为上述第一方面或第二方面中的通信设备,比如车载通信装置,或者包含上述通信设备的装置,比如各种类型的车辆,或者上述通信设备中包含的装置,比如芯片或系统芯片。
第八方面,提供了一种通信装置(例如,该通信装置可以是芯片或芯片系统),该通信装置包括处理器,用于实现上述任一方面中所涉及的功能。在一种可能的设计中,该通信装置还包括存储器,该存储器,用于保存必要的程序指令和数据。该通信装置是芯片系统时,可以由芯片构成,也可以包含芯片和其他分立器件。
第九方面,提供了一种通信装置,包括:处理器和接口电路,该接口电路可以为代码/数据读写接口电路,该接口电路用于接收计算机执行指令(计算机执行指令存储在存储器中,可能直接从存储器读取,或可能经过其他器件)并传输至该处理器;该处理器用于运行所述计算机执行指令以执行上述任一方面所述的方法。该通信装置可以为上述第一方面或第二方面中的通信设备,比如车载通信装置,或者包含上述通信设备的装置,比如各种类型的车辆,或者上述通信设备中包含的装置,比如芯片或系统芯片。
其中,第三方面至第九方面中任一种设计方式所带来的技术效果可参见上述第一方面或第二方面中不同设计方式所带来的技术效果,此处不再赘述。
第十方面,提供一种通信系统,该通信系统包括上述第一方面或第二方面所述的通信设备。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
图1为本申请实施例提供的一种正常情况下报文在弹性分组环网中的传输示意图;
图2为本申请实施例提供的一种弹性分组环网中的折叠倒换示意图;
图3为本申请实施例提供的一种优化后的折叠倒换机制下的帧格式示意图;
图4为本申请实施例提供的一种优化后的折叠倒换示意图;
图5为本申请实施例提供的一种通信系统的结构示意图;
图6为本申请实施例提供的一种通信设备的结构示意图;
图7a为本申请实施例提供的正常情况下组播报文的传输示意图;
图7b为本申请实施例提供的异常情况下组播报文的传输示意图;
图8为本申请实施例提供的另一种帧结构示意图;
图9为本申请实施例提供的一种数据传输方法的流程示意图一;
图10为本申请实施例提供的一种数据传输方法的流程示意图二;
图11a为本申请实施例提供的一种正常情况下报文在通信设备内的传输示意图;
图11b为本申请实施例提供的一种端口级环回示意图;
图12为本申请实施例提供的一种数据传输方法的流程示意图三;
图13为本申请实施例提供的另一种异常情况下组播报文的传输示意图;
图14为本申请实施例提供的一种数据传输方法的流程示意图四;
图15为本申请实施例提供的另一种通信设备的结构示意图。
具体实施方式
为了方便理解本申请实施例的技术方案,首先给出本申请相关技术或名词的简要介绍如下。
第一、车载网络:
车载网络(In-vehicle Network)是指承载汽车内部的传感器、控制器和执行器等各类设备的数据传输的网络。由于其应用场景的特殊性,因而对车载网络的设计提出了很多特殊的要求。比如,要求线缆距离短,单根线缆的长度一般不超过15米;或者,对周边环境的温度容忍度、抗电磁干扰的要求更高;或者,可靠性要求更高,即要求更短的故障恢复时间;或者,要求极短的网络启动时间,例如,启动时间要求小于100毫秒;或者,要求更低的端到端通信时延;或者,要求业务流量传输行为的可重复性或者可预测性等。
随着汽车电动化、智能化的发展,在汽车中会普遍部署高级驾驶辅助系统(advanced driver assistance system,ADAS),ADAS即用于在行车过程中辅助、指导驾驶员的智能系统。在该场景下,传统的诸如CAN等低速率车载网络无法满足ADAS中的传感器对传输带宽的更高要求。因此,使用具备大带宽、拥有庞大产业生态圈的以太网作为下一代车载网络已经成为业界的一个主流共识。
此外,由于环形网络拓扑的组网优势,可以在某一方向的传输路径故障后通过反方向找到一条抵达目的节点的路径,因此,可将车载网络设计为环形以太网,即以太环网,可以称之为车内环网,或简称为环网。
第二、IEEE 802.17 RPR中的折叠倒换机制(wrapping):
IEEE 802.17工作组发布的IEEE 802.17 RPR标准针对于环网传输的可靠性定义了折叠倒换机制,以满足环网传输的高可靠性要求。
示例性的,如图1所示,为RPR中无故障的正常情况下报文的传输示意图。以网关1、网关2、网关3、和网关4构成的RPR中,网关1连接的移动数据中心(mobile data center,MDC)为报文1的发送方,网关4连接的激光雷达为报文1的接收方为例,在正常情况下,MDC发送的报文1由网关1始发进入RPR,在RPR的默认传输方向(图1以默认传输方向为顺时针方向)上传输,即经过网关2、网关3和网关4的传输后抵达网关4连接的激光雷达。
示例性的,如图2所示,为RPR中的折叠倒换的示意图,在RPR中发生故障,例如,网关2与网关3之间的链路发生中断时,网关2可以检测到该故障,并将RPR中报文的传输方向由默认传输方向改变为非默认传输方向,例如,将网关1发送给网关2的报文1又发送给网关1,网关1在接收到报文1后,不终结该报文1,继续将报文1传输至网关4,此时,即使网关4连接的激光雷达为报文1的接收方,但是由于报文的传输方向为非默认的传输方向,因此,网关4不会将该报文1传输至与其连接的激光雷达,而是将报文1继续发送至网关3。
由于网关3也为故障链路的相邻节点,因此,网关3又会将报文的传输方向由非默认传输方向改变为默认传输方向,即将网关4发送给网关3的报文1又发送给网关4,网关4在接收到默认传输方向上的网关3发送的报文1后,将该报文1发送至与其连接的激光雷达,但是并不终结该报文1,还将该报文1发送至网关1、网关2,最终由网关2终结该报文1。
也就是说,在RPR的折叠倒换机制中,第一次改变报文的传输方向,即将传输方向由默认传输方向改变为非默认传输方向后,网关接收到非默认传输方向上的报文时,不会将该报文发送至与其连接的设备,只在第二次改变报文的传输方向,即将传输方向由非默认传输方向改变为默认传输方向后,网关接收到默认传输方向上的报文时,才会将该报文发送至与其连接的设备,从而会导致传输时延的增加和传输带宽的浪费。
第三、优化后的折叠倒换机制:
现有技术对以太网的帧格式进行了扩展,基于扩展的以太网的帧格式优化了802.17 RPR标准提出的折叠倒换机制,本申请实施例将其称之为优化后的折叠倒换机制。示例性的,如图3所示,为扩展的以太网帧格式,引入了折叠倒换(wrapped)字段以及生存时间(time to live,TTL)字段,报文从源网关发出时,wrapped字段的值为默认值(例如“0”),TTL字段的值不为“0”,正常情况下,在报文传输过程中TTL字段的值逐跳递减,当TTL的值为“0”时终结该报文。在以太环网中发生故障的情况下,以太环网中检测到故障的网关实施端口级环回,标记环回的报文,即,将报文中的wrapped字段的值设置为与默认值不同的值,表示该报文的传输方向发生改变,此外,该网关还重置报文中TTL字段的值,之后,在非默认传输方向上发送该报文。
在优化后的折叠倒换机制中,报文在非默认传输方向上传输时,可以被与该报文的接收方连接的网关发送至该报文的接收方。也就是说,通过优化后的折叠倒换机制,可以利用环网的非默认传输方向将报文传输至该报文的接收方。
示例性的,以网关1、网关2、网关3、和网关4构成的以太环网中,网关1连接的MDC为报文1的发送方,网关4连接的激光雷达为报文1的接收方为例,在以太环网中无故障的正常情况下,报文的传输示意图可参考图1。
在以太环网中发生故障,例如,网关2与网关3之间的链路发生中断时,示例性的,如图4所示,网关2可以检测到该故障,并将报文的传输方向由默认传输方向改变为非默认传输方向,例如,将网关1发送给网关2的报文1又发送给网关1,网关1在接收到报文1后,不终结该报文1,继续将报文1传输至网关4,网关4接收到报文1后将该报文1发送至与其连接的激光雷达,当报文1中TTL字段的值为0时,终结该报文1,当TTL字段的值不为0时,向网关3发送该报文1,由后续的网关终结该报文1,图4中示例性的以网关3终结该报文1为例进行说明。
需要说明的是,本申请下述实施例中,除特殊说明外,折叠倒换机制均指优化后的折叠倒换机制,在此统一说明,下述实施例中不再赘述。
需要说明的是,本申请实施例中,优化后的折叠倒换机制可以理解为:以太环网中在环网接口上检测到故障的通信设备,在该环网接口上对所有抵达该环网接口的报文实施环回,将抵达该环网接口的报文转发至该通信设备的其他环网接口,以便其他环网接口向与初始传输方向不同的传输方向发送该报文,从而使报文在该以太环网中的传输方向相对于初始传输方向发生改变,该初始传输方向为在环网接口上检测到故障之前报文在以太环网中的传输方向,例如,以太环网的默认传输方向。
也就是说,优化后的折叠倒换机制指:在环网接口上检测到故障的通信设备改变传输至该环网接口的报文在以太环网中的传输方向,使得传输至该环网接口的报文沿与初始传输方向不同的传输方向在该以太环网中传输。
在以太环网无故障的正常情况下,报文第一次传输至以太环网后,按照环网默认的传输方向(例如顺时针方向,即clockwise方向)传输;在以太环网中发生链路故障或通信设备故 障后,由于折叠倒换机制,报文按照与默认传输方向不同的传输方向在以太环网中传输,从而避开故障链路或故障通信设备,以保证传输可靠性。其中,报文第一次传输至以太环网,可以理解为以太环网中的网关第一次获取到该报文,其也可以称为报文上环。
需要说明的是,本申请下述实施例以默认传输方向为顺时针方向为例进行说明,在此统一说明,下述实施例不再赘述。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。并且,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
本申请实施例提供一种通信系统,该通信系统包括以太环网,该以太环网可以作为车载网络,此时,该以太环网可以称为车内环网;或者,该以太环网也可以作为其他用途的网络,本申请实施例对此不做具体限定。
其中,该以太环网中包括至少三个通信设备,该至少三个通信设备中的每个通信设备通过以太网接口与两个通信设备相连,该通信设备也可以称为区域通信计算网关(可以简称为网关),或区域通信计算设备,或转发设备,或节点。
其中,以太环网中连接两个相邻通信设备的两个以太网接口的速率相同。可选的,用于连接以太环网中的通信设备的单个以太网接口可以为遵循车规级的1000BASE-T1接口或10GBASE-T1接口。
可选的,该以太环网中的任意一个通信设备可以与一个或多个设备相连,以太环网为不同的通信设备连接的不同设备之间的数据传输提供服务;以太环网中不同的通信设备连接的设备可以相同也可以不同,本申请实施例对此不做具体限定。
示例性的,当以太环网作为车载网络时,以太环网中的通信设备连接的设备可以为用于协助车与车、车与人、车与路边基础设施、车与网络等的互联通信的设备,例如,各类传感器,摄像头,激光雷达等。
示例性的,以该以太环网包括4个通信设备为例,如图5所示,为本申请实施例提供的一种通信系统,该通信系统中的以太环网包括通信设备1、通信设备2、通信设备3和通信设备4。可选的,该以太环网中的4个通信设备分别连接设备1-4,该设备例如可以为激光雷达,此外,通信设备1还与设备5连接,该设备5例如可以是MDC。
需要说明的是,本申请实施例中,除特殊说明外,“通信设备”均指构成以太环网的通信设备,或者说以太环网中的通信设备。在此统一说明,下述实施例不再赘述。
需要说明的是,本申请实施例中,“环网接口”指通信设备中用于连接其他通信设备的以太网接口,例如,图5中通信设备1的环网接口可以为用于连接通信设备2或通信设备4的接口;“业务接口”指通信设备中除环网接口之外的接口,或者说用于连接其他设备(例如, 激光雷达等)的接口,例如,图5中通信设备1的业务接口可以为用于连接设备1或设备5的接口。其中,业务接口可以为以太网接口或其他类型的接口,本申请实施例对业务接口的类型不做具体限定,在此统一说明,下述实施例中不再赘述。
可选的,本申请实施例中的通信设备可以是安装在车辆上用于辅助车辆行驶的车载终端,或者车载终端内的芯片。其中,该车载终端可以是第五代(5th generation,5G)网络或者未来演进的公共陆地移动网络(public land mobile network,PLMN)中的用户设备(user equipment,UE)、接入终端、终端单元、终端站、移动站、移动台、远方站、远程终端、移动设备、无线通信设备、终端代理或终端装置等。接入终端可以是蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字处理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备或可穿戴设备,虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端或无人驾驶(self driving)中的无线终端等。该车载终端可以是移动的,也可以是固定的。
可选的,本申请实施例中的通信设备可以通过图6中的通信设备(或通信装置)30来实现。图6所示为本申请实施例提供的通信设备30的结构示意图。该通信设备30包括一个或多个处理器301,通信总线302,以及至少一个通信接口(图6中仅是示例性的以包括通信接口304,以及一个处理器301为例进行说明),可选的还可以包括存储器303。
处理器301可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信总线302可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。该通信总线302用于连接通信设备30中的不同组件,使得不同组件可以通信。
通信接口304,可以包括一个或多个以太网接口,可选的,还可以包括其他类型的接口,例如低压差分信号(low-voltage differential signal,LVDS)接口等,本申请实施例对此不做具体限定。该通信接口304用于与其他设备或通信网络通信,通信网络例如可以为无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN)等。可选的,所述通信接口304可以是收发器、收发机一类的装置。可选的,所述通信接口304也可以是位于处理器301内的收发电路,用以实现处理器的信号输入和信号输出。
存储器303可以是具有存储功能的装置。例如可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路302与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器303用于存储执行本申请方案的计算机执行指令,并由处理器301来控制执行。处理器301用于执行存储器303中存储的计算机执行指令,从而实现本申请实施例中提供的数据传输方法。
或者,可选的,本申请实施例中,也可以是处理器301执行本申请下述实施例提供的数据传输方法中的处理相关的功能,通信接口304负责与其他设备或通信网络通信,本申请实施例对此不作具体限定。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
在具体实现中,作为一种实施例,处理器301可以包括一个或多个CPU,例如图6中的CPU0和CPU1。
在具体实现中,作为一种实施例,通信设备30可以包括多个处理器,例如图6中的处理器301和处理器308。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,通信设备30还可以包括输出设备305和输入设备306。输出设备305和处理器301通信,可以以多种方式来显示信息。例如,输出设备305可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备306和处理器301通信,可以以多种方式接收用户的输入。例如,输入设备306可以是鼠标、键盘、触摸屏设备或传感设备等。
目前,在以太环网中实施折叠倒换机制时,经过折叠倒换的组播报文在沿非默认传输方向传输时,可能会被该报文的部分目的设备重复接收,从而对业务造成一定影响。例如,以图5所示的通信系统中,设备1-4为分别为激光雷达1-4,设备5为MDC,MDC发送的组播报文1的目的设备为激光雷达1-4为例,在正常情况下,如图7a所示,MDC发出的组播报文1经由通信设备1沿顺时针方向传输至与各个通信设备连接的激光雷达。
在异常情况下,例如通信设备3与通信设备4之间的链路出现故障时,组播报文1无法沿顺时针方向传输至通信设备4连接的激光雷达4。此时,如图7b所示,通信设备3实施折叠倒换,使得传输至通信设备3的组播报文1沿逆时针方向传输至通信设备4,从而使通信设备4可以将该组播报文1传输至激光雷达4。然而,在沿逆时针方向传输的过程中,该组播报文1会再次被通信设备3传输至激光雷达3,也被通信设备2传输至激光雷达2,还被通信设备1传输至激光雷达1,从而使得激光雷达3、激光雷达2和激光雷达1重复接收组播报文1,进而可能对其业务造成影响。
基于此,本申请实施例提供一种数据传输方法,该数据传输方法应用于以太环网中的通信设备,该方法中,通信设备通过该通信设备的第一环网接口接收第一报文,第一报文中包括第一字段,通信设备根据第一字段的值发送第一报文。其中,该第一字段的值为第一数值或第二数值,该第一数值用于指示不允许环网接口向业务接口发送第一字段所在的报文,该第二数值用于指示允许环网接口向业务接口发送第一字段所在的报文。
基于该方案,由于第一报文中包括第一字段,通信设备可以根据第一字段的值发送第一报文,因此,当第一报文为组播报文时,在折叠倒换后可以将第一报文中第一字段的值设置为第一数值,从而使得该通信设备在根据第一字段的值发送第一报文时,无需向该通信设备的业务接口发送该组播报文,进而可以避免该通信设备的业务接口连接的设备重复接收组播 报文,降低对业务的影响。
或者,本申请实施例还提供另一种数据传输方法,该数据传输方法应用于以太环网中的通信设备,该方法中,该通信设备通过该通信设备的第一环网接口接收第一报文,该第一报文为改变第三报文在该以太环网中的传输方向后得到的报文,该第一报文中包括第一字段,通信设备根据第一字段的值发送第一报文。其中,第一字段的值为第一数值或第二数值,第一数值用于指示第一报文在该以太环网的非默认传输方向上未经过源通信设备的转发,第二数值用于指示第一报文在该以太环网的非默认传输方向上经过了源通信设备的转发。
基于该方案,由于第一报文为改变第三报文在以太环网中的传输方向后得到的报文,因此可知第一报文为折叠倒换后的报文;又由于第一报文中包括第一字段,通信设备可以根据第一字段的值发送第一报文,因此,当第一报文为组播报文时,可以将第一报文中第一字段的值设置为第一数值,此时,第一报文经过了折叠倒换,但在以太环网的非默认传输方向上未经过源通信设备的转发,则该通信设备可知在折叠倒换前的默认传输方向上该通信设备已经将第三报文传输至与其连接的设备,从而在接收到第一报文后,无需向该通信设备的业务接口发送该第一报文,进而可以避免该通信设备的业务接口连接的设备重复接收组播报文,降低对业务的影响。
下面将结合图1至图7b,对本申请实施例提供的数据传输方法进行展开说明。
需要说明的是,本申请下述实施例中各个网元之间的消息名字或消息中各参数的名字等只是一个示例,具体实现中也可以是其他的名字,本申请实施例对此不作具体限定。
需要说明的是,本申请实施例中,“报文”指以太网中的信息载体单元,其也可以理解为“数据帧”或“帧”或“流量”或“数据流”,可以相互替换,本申请实施例对此不做具体限定。
首先,对本申请实施例中涉及到的报文的帧格式进行说明。
通常,以太环网中的任意一个通信设备在接收到来自该通信设备的业务接口连接的设备的报文后,可以对该报文进行重新封装,重新封装后的报文格式可以如图3所示。
本申请实施例中,通信设备重新封装来自其业务接口的报文后,得到的报文的帧格式在基于图3所示的帧格式的基础上增加了第一字段,该第一字段的长度可以为N比特,N为小于27的正整数,该第一字段可以位于以太网类型或长度字段与负载长度/以太网类型字段之间,本申请实施例对此不做具体限定。需要说明的是,第一字段还可以有其他名称,本申请对此不做具体限定。
示例性的,以第一字段的长度为1比特,且第一字段位于wrapped字段之前为例,本申请实施例中通信设备重新封装来自其业务接口的报文后,得到的报文的帧格式可以如图8所示。也就是说,在该场景下,通信设备可以将来自其业务接口的报文重新封装为如图8所示的帧格式。
可以理解的是,图8所示的帧格式仅是一种示例,本申请实施例中,通信设备重新封装来自其业务接口的报文后,得到的报文的帧格式也可以为其他格式,其中包括第一字段即可。
需要说明的是,通信设备在重新封装来自业务接口的报文的过程中不改变该报文中的载荷(payload)、源媒体访问控制(medium access control,MAC)地址、以及目的MAC地址,在此统一说明,下述实施例不再赘述。
需要说明的是,通信设备在实施折叠倒换时,也不改变报文中的载荷、源MAC地址、以及目的MAC地址,在此统一说明,下述实施例不再赘述。
下面对本申请实施例提供的数据传输方法进行说明,该数据传输方法应用于以太环网中 的通信设备,如图9所示,为本申请实施例提供的一种数据传输方法,该数据传输方法包括如下步骤:
S901、通信设备通过该通信设备的第一环网接口接收第一报文。
其中,第一报文中包括第一字段,该第一字段的值为第一数值或第二数值,第一数值用于指示不允许环网接口向业务接口发送第一字段所在的报文,第二数值用于指示允许该环网接口向该业务接口发送第一字段所在的报文。
其中,第一报文可以为组播报文,也可以为单播报文,本申请实施例对此不做具体限定。
可选的,第一报文的帧格式例如可以如图8所示。第一字段的长度为1比特时,第一数值例如可以为“0”,第二数值例如可以为“1”;或者,第一数值例如可以为“1”,第二数值例如可以为“0”,本申请实施例对此不做具体限定。
可选的,在该实施例中,第一字段还可以称为接收使能(receive_ineligible)字段,二者可以相互替换,本申请实施例对此不做具体限定。
S902、通信设备根据第一字段的值发送第一报文。
基于该方案,由于第一报文中包括第一字段,通信设备可以根据第一字段的值发送第一报文,因此,当第一报文为组播报文时,在折叠倒换后可以将第一报文中第一字段的值设置为第一数值,从而使得该通信设备在根据第一字段的值发送第一报文时,无需向该通信设备的业务接口发送该组播报文,进而可以避免该通信设备的业务接口连接的设备重复接收组播报文,降低对业务的影响。
在本申请实施例的一种实施场景下,如图10所示,上述步骤S902具体可以包括如下步骤:
S1001、通信设备确定第一报文中的第一字段的值为第一数值。
其中,当通信设备确定第一字段的值为第一数值时,认为第一报文为经过折叠倒换后的报文,可以执行如下步骤S1002。
S1002、通信设备使用第一报文的源媒体访问控制(medium access control,MAC)地址匹配第一MAC地址列表。
示例性的,本申请实施例中,使用报文的源/目的MAC地址匹配MAC地址列表,可以理解为:在该MAC地址列表中查找报文的源/目的MAC地址。
其中,第一MAC地址列表中包括一个或多个单播MAC地址,该一个或多个单播MAC地址中的任意一个单播MAC地址关联该通信设备的一个业务接口,不同的单播MAC地址关联该通信设备的不同业务接口,即该通信设备的业务接口与第一MAC地址列表中的单播MAC地址一一对应。
可选的,该通信设备的业务接口关联的单播MAC地址可以为该通信设备从该业务接口上学习的该业务接口连接的设备的MAC地址;或者,也可以为该业务接口上静态配置的MAC地址,本申请实施例对此不做具体限定。
可选的,由于第一数值用于指示不允许环网接口向业务接口发送第一字段所在的报文,从而,通信设备使用第一报文的源MAC地址匹配第一MAC地址列表后,可以根据匹配结果通过通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文。
可选的,当匹配成功,即该匹配结果为第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,执行下述步骤S1003;或者,当匹配失败,即该匹配结果为第一MAC地址列表中不存在与第一报文的源MAC地址相匹配时,执行下述步骤S1004。
示例性的,本申请实施例中,“相匹配”可以理解为“相同”,二者可以相互替换,本申 请实施例对此不做具体限定。
S1003、通信设备将第一报文的第一字段的值设置为第二数值。
其中,当第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,说明该通信设备为源通信设备,即步骤S1003所述的方法适用于源通信设备。又由于第一报文的第一字段的值为第一数值时,认为第一报文为经过折叠倒换的报文,则该场景可以理解为源通信设备发出的报文在经过折叠倒换后又回到了源通信设备。
也就是说,在该通信设备通过该通信设备的第一环网接口接收第一报文之前,该数据传输方法还包括:该通信设备通过该通信设备的第一业务接口接收第二报文,该通信设备将该第二报文重新封装为第三报文之后,通过该通信设备的第一环网接口发送该第三报文。
示例性的,本实施例中,源通信设备为第三报文对应的源通信设备,即以太环网中第一个发送第三报文的通信设备,或者说,以太环网中第一个获取第三报文的通信设备,获取第三报文可以为该通信设备通过其业务接口接收第二报文,将第二报文重新封装为第三报文。其中,第三报文中包括第一字段,该第一字段的值为第二数值,此时,可以认为第一报文为改变第三报文在以太环网中的传输方向后得到的报文,示例性的,第三报文的帧格式可以如图8所示。
其中,改变第三报文在以太环网中的传输方向的通信设备即为实施折叠倒换的通信设备,该实施折叠倒换的通信设备改变第三报文的传输方向后,可以将第三报文中的第一字段的值设置为第一数值,从而得到第一报文,该方案将在下述实施例中详细说明,在此不再赘述。
需要说明的是,通信设备将第一报文的第一字段的值设置为第二数值后得到的报文可以称为报文1。
可选的,在步骤S1003后,该通信设备继续执行步骤S1004。
S1004、通信设备将第一报文的TTL字段的值减1。
可选的,当第一报文的TTL字段的值减1后为0时,说明该第一报文的生命周期结束,该通信设备丢弃该第一报文,本申请实施例以第一报文的TTL字段的值减1后大于0为例进行说明。
可选的,在第一报文的TTL字段的值减1后大于0的情况下,当通信设备执行完步骤S1003之后再执行步骤S1004时,该通信设备执行下述步骤S1005a;或者,若通信设备未执行步骤S1003,即匹配结果为第一MAC地址列表中不存在与第一报文的源MAC地址相匹配时,该通信设备执行下述步骤S1005b。
S1005a、通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送报文1。
也就是说,通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送将第一报文的第一字段的值设置为第二数值后得到的报文。
可选的,该通信设备通过其第二环网接口接收报文1后,可以通过其第二环网接口将报文1发送给该第二环网接口连接的通信设备。与该通信设备的第二环网接口连接的通信设备在接收到报文1后,可以将报文1的载荷由其环网接口发送至其业务接口,从而使得业务数据可以发送至其业务接口连接的设备。
基于该方案,当该通信设备为源通信设备时,可以将第一报文的第一字段的值又设置为第二数值,并通过源通信设备的第二环网接口发送将第一字段的值设置为第二数值的报文,使得在默认传输方向上未收到第三报文的,且为非默认传输方向上该通信设备的下游通信设备的通信设备,可以将该报文由其环网接口发送至其业务接口,从而传输至业务接口连接的 设备。
S1005b、通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文。
可选的,该通信设备通过其第二环网接口接收第一报文后,可以通过其第二环网接口将第一报文发送给该第二环网接口连接的通信设备。
可选的,上述通信设备可以为以太环网中实施折叠倒换的通信设备。
在一种可能的实现方式中,该通信设备为实施折叠倒换的通信设备,且不为源通信设备,此时,上述步骤S1002中的匹配结果为第一MAC地址列表中不存在与第一报文的源MAC地址相匹配。
可选的,在该场景下,该通信设备通过其第二环网接口接收到第三报文后,在执行报文接收流程的过程中,通过该通信设备的第二环网接口将第三报文发送至该通信设备的第一环网接口,该通信设备通过其第一环网接口发送第三报文,且在该通信设备的第一环网接口上检测到故障。
可选的,该故障可以是该通信设备的第一环网接口的物理层故障,或者可以是该通信设备与该通信设备的第一环网接口连接的通信设备之间的用于通信的物理介质的故障(例如光纤断开),或者还可以是与该通信设备的第一环网接口连接的通信设备的故障。
可选的,该通信设备可以通过CCM连通性检测报文检测上述故障,例如,当该通信设备的第一环网接口在3.5个周期(一个周期可以为300微秒)内未接收到CCM连通性检测报文时,可以认为该通信设备在该通信设备的第一环网接口上检测到了故障。
可选的,该通信设备在该通信设备的第一环网接口上检测到故障后,在第一环网接口上产生故障告警信号,并在第一环网接口处实施端口级环回。
可选的,第一环网接口处的端口级环回的实施点(或发生点)可以位于第一环网接口的媒体接入控制(media access control,MAC)层的媒体独立接口(media independent interface,MII)。
可选的,在第一环网接口处实施端口级环回可以包括:使能第一环网接口预留的环回点,以便将第一环网接口的MAC层的MII接口上的数据发送线路连接到对应的接收线路,将控制信号发送线路连接到对应的控制信号接收线路。
示例性的,以该通信设备的第一环网接口和第二环网接口均包括物理层(physic,PHY)和MAC层,该通信设备还包括2层(即MAC层)转发单元为例,在正常情况下,第三报文在该通信设备内的转发路径如图11a中的虚线所示;在该通信设备在其第一环网接口上检测到故障的情况下,在第一环网接口的MAC层的MII接口处实施环回,第三报文在通信设备内的转发路径如图11b中的虚线所示。
其中,在第一环网接口处的端口级环回完成后,第一环网接口即能收到其之前发送的第三报文。示例性的,以图11b为例,第一环网接口的MAC层的MII接口的发送单元发送的第三报文会被该MII接口的接收单元接收,即认为该第一环网接口接收到该第一环网接口环回的第三报文。
可选的,该通信设备的第一环网接口环回第三报文后,该通信设备将第三报文中第一字段的值设置为第一数值后得到第一报文。进一步地,该通信设备还可以将第三报文中wrapped字段的值设置为与初始值不同的值,即第一报文与第三报文的区别在于第一字段的值以及wrapped字段的值不同。
也就是说,在该场景下,该通信设备通过该通信设备的第一环网接口接收第一报文,可 以包括:该通信设备的第一环网接口环回第三报文,该第三报文中包括第一字段,该第一字段的值为第二数值;该通信设备将第三报文中的第一字段的值设置为第一数值后得到第一报文。
可选的,该通信设备得到第一报文后,在该通信设备的第一环网接口处执行本申请实施例提供的上述数据传输方法,通过该通信设备的第一环网接口将第一报文发送至该通信设备的第二环网接口,使得该通信设备的第二环网接口发送第一报文。示例性的,第一报文在该通信设备内的传输路径如图11b中的点杠线所示。
在另一种可能的实现方式中,该通信设备可以既为源通信设备,又为实施折叠倒换的通信设备,也就是说,源通信设备实施了折叠倒换。此时,上述步骤S1002中的匹配结果为第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配。
可选的,在该场景下,源通信设备通过其第一环网接口接收第一报文之前,还通过其第一业务接口接收第二报文,并将该第二报文重新封装为第三报文之后,通过其第一环网接口发送该第三报文,且在源通信设备的第一环网接口检测到故障。
可选的,源通信设备在其第一环网接口上检测到故障后,在其第一环网接口上产生故障告警信号,并在其第一环网接口处实施端口级环回。环回完成后,其第一环网接口即能收到之前发送的第三报文,之后,源通信设备将第三报文中第一字段的值设置为第一数值后得到第一报文。
也就是说,在该场景下,该通信设备通过该通信设备的第一环网接口接收第一报文,也可以包括:该通信设备的第一环网接口环回第三报文,该第三报文中包括第一字段,该第一字段的值为第二数值;该通信设备将第三报文中的第一字段的值设置为第一数值后得到第一报文。
在本申请实施例的另一种实施场景下,如图12所示,上述步骤S902具体可以包括如下步骤:
S1201、通信设备确定第一报文中的第一字段的值为第二数值。
其中,当通信设备确定第一字段的值为第二数值时,认为第一报文为未经过折叠倒换的报文,可以执行如下步骤S1202。
S1202、通信设备使用第一报文的源MAC地址匹配第一MAC地址列表。
其中,匹配结果为第一MAC地址列表中包括第一报文的源MAC地址时,表示第一报文的源通信设备为该通信设备,又由于第一报文为未经过折叠倒换的报文,因此,该场景可以理解为该通信设备发送第一报文后,第一报文在以太环网中转发一圈(即经过以太环网中的所有通信设备的转发)后未终结,属于异常情况,此时,该通信设备丢弃该第一报文,本申请实施例不考虑这种异常情况;当第一MAC地址列表中不包括第一报文的源MAC地址(匹配失败),且第一报文的目的MAC地址的类型为单播MAC地址时,执行下述步骤S1203a,或者,当第一MAC地址列表中不包括第一报文的源MAC地址,且第一报文的目的MAC地址的类型为组播MAC地址时,执行下述步骤S1203b。
S1203a、通信设备使用第一报文的目的MAC地址匹配第一MAC地址列表。
其中,当第一MAC地址列表中存在第二MAC地址与第一报文的目的MAC地址相匹配时,表示该第一报文的接收方为第二MAC地址关联的业务接口所连接的设备,执行下述步骤S1204a。
其中,当第一MAC地址列表中不存在与第一报文的目的MAC地址相匹配的MAC地址时,表示该通信设备连接的设备均不是第一报文的接收方,执行下述步骤S1205。
S1204a、通信设备通过该通信设备的第一环网接口向该通信设备的第二业务接口发送报文2。
其中,第二业务接口为第二MAC地址关联的业务接口,报文2为重新封装第一报文后得到的报文,报文2的帧格式符合第二业务接口连接的设备所使用的协议。
S1203b、通信设备使用第一报文的目的MAC地址匹配第二MAC地址列表。
其中,第二MAC地址列表包括一个或多个组播MAC地址,该一个或多个组播MAC地址中的任意一个组播MAC地址关联该通信设备的一个或多个业务接口,即该通信设备的一个业务接口可以加入多个组播组。
其中,当第二MAC地址列表中存在第一组播MAC地址与第一报文的目的MAC地址相匹配时,表示该第一报文的接收方包括第一组播MAC地址关联的一个或多个业务接口所连接的设备,执行下述步骤S1204b。此外,由于第一报文的目的MAC地址的类型为组播MAC地址,则第一报文为组播报文,可选的,该通信设备还可以执行步骤S1205,以便将该组播报文发送至其他通信设备。
其中,当第二MAC地址列表中不存在与第一报文的目的MAC地址相匹配的MAC地址时,表示该通信设备连接的设备均不是第一报文的接收方,执行下述步骤S1205。
S1204b、通信设备通过该通信设备的第一环网接口向该通信设备的第三业务接口发送报文2。
其中,第三业务接口包括通信设备中与第一组播MAC地址关联的一个或多个业务接口,报文2为重新封装第一报文后得到的报文,报文2的帧格式符合第三业务接口连接的设备所使用的协议。
S1205、通信设备将第一报文的TTL字段的值减1。
其中,相关说明可参考上述步骤S1004,当第一报文的TTL字段的值减1后大于0的情况向,执行下述步骤S1206。
S1206、通信设备通过该通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文。
基于该方案,可以使通信设备根据第一字段的值,正常接收未经过折叠倒换的报文,从而不影响业务。
下面以图5所示的通信系统中,各个通信设备对本申请上述实施例提供的数据传输方法的应用进行说明。其中,以通信设备1为源通信设备,通信设备3与通信设备4之间的链路存在故障为例。
首先,通信设备1通过该通信设备1的第一业务接口(以用于连接设备5的业务接口为例)接收第二报文,该第二报文为组播报文,该第二报文的接收方包括设备1至设备4。之后,通信设备1将第二报文封装为第三报文,并通过通信设备1的第一环网接口(以用于连接通信设备2的环网接口为例)发送第三报文。进一步地,还通过通信设备1的用于连接设备1的业务接口发送第三报文,以便将报文中的数据发送至设备1。
相应的,通信设备2的第二环网接口(以用于与通信设备1连接的环网接口为例)接收来自通信设备1的第三报文,并确定第三报文中的第一字段的值为第二数值,则执行上述图12所示的方法,此时,上述图12中的S901即为通信设备2通过通信设备2的第二环网接口接收第三报文,其余步骤类似,将对第一报文的操作替换为对第三报文的操作即可,从而,通信设备2可以将第三报文的载荷发送至设备2,并通过其第二环网接口向其第一环网接口(以用于与通信设备3连接的环网接口为例)发送第三报文,该第一环网接口接收到第三报 文后可以发送第三报文。
相应的,通信设备3的第二环网接口(以用于与通信设备2连接的环网接口为例)接收来自通信设备2的第三报文,并确定第三报文中的第一字段的值为第二数值,则执行与上述图12所示的方法类似的流程,将第三报文的载荷发送至设备3,并通过其第二环网接口向其第一环网接口(以用于与通信设备4连接的环网接口为例)发送第三报文,该第一环网接口接收到第三报文后可以发送第三报文。
在该场景下,若通信设备3在其第一环网接口上检测到故障,则通信设备3在其第一环网接口实施端口级环回,接收其环回的第三报文,之后将第三报文中第一字段的值由第二数值设置为第一数值得到第一报文。此后,执行上述图10所示的方法。其中,由于通信设备3不为源通信设备,从而该通信设备3不会执行步骤S1003和步骤S1005a,即通信设备3的第一环网接口执行图10所示的方法后,通过其第一环网接口向其第二环网接口发送第一报文,其第二环网接口接收第一报文后向通信设备2发送该第一报文。此时,第一报文即沿非默认传输方向传输。
通信设备2的第一环网接口接收到该第一报文后,执行上述图10所示的方法,其中,通信设备2同样不会执行步骤S1003和步骤S1005a,即第一报文最终由通信设备2的第二环网接口发送给通信设备1。
通信设备1的第一环网接口接收到第一报文后,执行上述图10所示的方法。其中,由于通信设备1为源通信设备,则通信设备1会执行步骤S1003和步骤S1005a,即改写第一字段的值,并通过其第二环网接口(以用于与通信设备4连接的环网接口为例)向通信设备4发送改写第一报文的第一字段的值后得到的报文,本申请实施例将其称为报文1。
通信设备4的第一环网接口(以用于与通信设备1连接的环网接口为例)接收到报文1后,执行上述图12所示的方法,最终将报文1中的载荷发送至设备4,从而使得设备4接收到业务数据,降低以太环网中的故障对设备4的业务的影响。
也就是说,在通信设备3实施折叠倒换后,图5所示的通信系统中各个通信设备接收到的报文中第一字段的值、是否为源网关的情况、以及相应处理如下表1所示。示例性的,上述整个过程的示意图可参见图13。
表1
Figure PCTCN2021070613-appb-000001
可选的,如图14所示,为本申请实施例提供的另一种数据传输方法,该数据传输方法应用于以太环网中的通信设备,该数据传输方法包括如下步骤:
S1401、通信设备通过该通信设备的第一环网接口接收第一报文。
S1402、通信设备确定第一报文中第二字段的值为第三数值。
其中,第二字段(例如wrapped字段)用于折叠倒换,第三数值用于指示第一报文为经过折叠倒换的报文。本申请实施例中,以第一报文为改变第三报文在以太环网中的传输方向后得到的报文进行说明,即第三报文可以理解为折叠倒换前的报文,第一报文可以理解为折叠倒换后的报文,第一报文与第三报文的负载、源MAC地址、以及目的MAC地址相同。
其中,第一报文中包括第一字段,第一字段的值为第一数值或第二数值,第一数值用于指示第一报文在以太环网的非默认传输方向上未经过源通信设备的转发,第二数值用于指示第一报文在以太环网的非默认传输方向上经过了源通信设备的转发。
示例性的,本实施例中,源通信设备为第三报文对应的源通信设备,即以太环网中第一个发送第三报文的通信设备,或者说,以太环网中第一个获取第三报文的通信设备,获取第三报文可以为该通信设备通过其业务接口接收第二报文,将第二报文重新封装为第三报文。
其中,第一报文可以为组播报文,也可以为单播报文,本申请实施例对此不做具体限定。
可选的,第一报文的帧格式例如可以如图8所示。第一字段的长度为1比特时,第一数值例如可以为“0”,第二数值例如可以为“1”;或者,第一数值例如可以为“1”,第二数值例如可以为“0”,本申请实施例对此不做具体限定。
可选的,在该实施例中,第一字段还可以称为源访问(source_visited)字段,二者可以相互替换,本申请实施例对此不做具体限定。
需要说明的是,当第一报文中第二字段的值为第四数值时,第四数值用于指示第一报文为未经过折叠倒换的报文,该通信设备可以执行上述步骤S1202-S1204a或步骤S1202-S1204b或步骤S1202-S1206,具体实现可参考上述相关说明,在此不再赘述。
S1403、通信设备根据第一字段的值发送第一报文。
基于该方案,由于第一报文为改变第三报文在以太环网中的传输方向后得到的报文,因此可知第一报文为折叠倒换后的报文;又由于第一报文中包括第一字段,通信设备可以根据第一字段的值发送第一报文,因此,当第一报文为组播报文时,可以将第一报文中第一字段的值设置为第一数值,此时,第一报文经过了折叠倒换,但在以太环网的非默认传输方向上未经过源通信设备的转发,则该通信设备可知在折叠倒换前的默认传输方向上该通信设备已经将第三报文传输至与其连接的设备,从而在接收到第一报文后,无需向该通信设备的业务接口发送该第一报文,进而可以避免该通信设备的业务接口连接的设备重复接收组播报文,降低对业务的影响。
在本申请实施例的一种实施场景下,上述步骤S1402具体可以包括上述图10所示的步骤S1001-S1005a,或者包括上述步骤S1001-S1005b,其中,在该实施例中,区别在于:
对于上述步骤S1002:由于第一数值用于指示第一报文在以太环网的非默认传输方向上未经过源通信设备的转发,即经过折叠倒换后的报文在非默认传输方向上还未传输至源通信设备,因此,当第一报文为组播报文时,该通信设备可知在折叠倒换前的默认传输方向上该通信设备已经将第三报文传输至与其连接的设备,从而可以不向该通信设备的业务接口发送第一报文,进而通信设备使用第一报文的源MAC地址匹配第一MAC地址列表后,可以根据匹配结果通过通信设备的第一环网接口向该通信设备的第二环网接口发送第一报文。
对于上述步骤S1003:当第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,该通信设备即为源通信设备。在该通信设备通过该通信设备的第一环网接口接收第一报文之前,该数据传输方法还包括:该通信设备通过该通信设备的第一业务接口接收第二报文,该通信设备将该第二报文重新封装为第三报文之后,通过该通信设备的第一环 网接口发送该第三报文。
其中,第三报文中包括第一字段,该第一字段的值为第一数值,此时,可以认为第一报文为改变第三报文在以太环网中的传输方向后得到的报文,示例性的,第三报文的帧格式可以如图8所示。
也就是说,本实施例在源通信设备重新封装第二报文后得到的第三报文中的第一字段的值为第一数值。
其中,改变第三报文在以太环网中的传输方向的通信设备即为实施折叠倒换的通信设备,该实施折叠倒换的通信设备改变第三报文的传输方向后,可以将第三报文中的第二字段的值设置为第三数值,从而得到第一报文,详细说明可参考上述相关描述,在此不再赘述。
需要说明的是,本实施例中,实施折叠倒换的通信设备不改变第三报文中第一字段的值。该第一字段的值仅在源通信设备处修改一次。
在本申请实施例的一种实施场景下,上述步骤S1402具体可以包括上述图12所示的步骤S1201-S1204a或步骤S1201-S1204b或步骤S1201-S1206,其中,在该实施例中,区别在于:该通信设备不执行步骤S1202,即在步骤S1201之后,执行步骤S1203a或者S1203b,详细说明可参考上述相关描述,在此不再赘述。
下面以图5所示的通信系统中,各个通信设备对本申请上述实施例提供的数据传输方法的应用进行说明。其中,以通信设备1为源通信设备,通信设备3与通信设备4之间的链路存在故障为例。
首先,通信设备1通过其第一业务接口接收第二报文,该第二报文为组播报文,该第二报文的接收方报文设备1至设备4。之后,通信设备1将第二报文封装为第三报文,并通过通信设备1的第一环网接口发送第三报文。进一步地,还通过通信设备1的用于连接设备1的业务接口发送第三报文,以便将报文中的数据发送至设备1。此时,第三报文中的第二字段的值为第四数值,即指示第三报文为未经过折叠倒换的报文。
相应的,通信设备2的第二环网接口接收第三报文后,执行上述步骤S1202-S1206,将第三报文发送给通信设备3、以及将第三报文的载荷发送至设备2。
通信设备3的第二环网接口接收来自通信设备2的第三报文,执行与通信设备2类似的报文接收流程,将第三报文发送至通信设备3的第一环网接口、以及将第三报文的载荷发送至设备3。
在该场景下,若通信设备3在其第一环网接口上检测到故障,则通信设备3在其第一环网接口实施端口级环回,接收其环回的第三报文,之后将第三报文中第二字段的值由第四数值设置为第三数值得到第一报文。此后,执行上述图10所示的方法后将第一报文发送至通信设备2,其中,通信设备3不会再次将第一报文的载荷发送至设备3。
通信设备2接收到第一报文后,执行图10所示的方法,将第一报文发送至通信设备1,其中,通信设备2也不会再次将第一报文的载荷发送至设备2。
通信设备1接收到第一报文后,执行图10所示的方法,将第一报文的第一字段的值设置为第二数值后,向通信设备4发送改写第一字段的值后得到的报文,本申请实施例将其称为报文1。
通信设备4的第一环网接口接收到报文1后,执行上述步骤S1201-S1204a或步骤S1201-S1204b或步骤S1201-S1206,需要说明的是,该通信设备4不执行步骤S1202,即在步骤S1201之后,执行步骤S1203a或者S1203b。
也就是说,在通信设备3实施折叠倒换后,图5所示的通信系统中各个通信设备接收到 的报文中第一字段的值、是否经过源网关的情况、以及相应处理如下表2所示。示例性的,上述整个过程的示意图可参见图13。
表2
Figure PCTCN2021070613-appb-000002
可以理解的是,本申请实施例中,通信设备可以执行本申请实施例中的部分或全部步骤,这些步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照本申请实施例呈现的不同的顺序来执行,并且有可能并非要执行本申请实施例中的全部操作。
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
可以理解的是,以上各个实施例中,由通信设备实现的方法和/或步骤,也可以由可用于通信设备的部件(例如芯片或者电路)实现。
上述主要从各个网元之间交互的角度对本申请实施例提供的方案进行了介绍。相应的,本申请实施例还提供了通信装置,该通信装置用于实现上述各种方法。该通信装置可以为上述方法实施例中的通信设备,比如车载通信装置,或者包含上述通信设备的装置,比如各种类型的车辆,或者上述通信设备中包含的装置,比如芯片或系统芯片。可以理解的是,该通信装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法实施例对通信装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
比如,以通信装置为上述方法实施例中的通信设备为例。图15示出了一种通信设备150的结构示意图。该通信设备150包括处理模块1501和收发模块1502。所述收发模块1502,也可以称为收发单元用以实现发送和/或接收功能,例如可以是收发电路,收发机,收发器或 者通信接口。
可选的,该收发模块1502可以包括第一环网接口、第二环网接口、或第一业务接口中的一个或多个接口。
一种可能的实现方式中:
处理模块1501,用于通过收发模块1502的第一环网接口接收第一报文,该第一报文中包括第一字段,该第一字段的值为第一数值或第二数值,第一数值用于指示不允许环网接口向业务接口发送第一字段所在的报文,第二数值用于指示允许环网接口向业务接口发送第一字段所在的报文;处理模块1501,还用于根据第一字段的值通过收发模块1502发送第一报文。
可选的,处理模块1501,用于根据第一字段的值通过收发模块1502发送第一报文,包括:当第一字段的值为第一数值时,处理模块1501,用于使用第一报文的源MAC地址匹配第一MAC地址列表;处理模块1501,还用于根据匹配结果通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文,该第一MAC地址列表包括一个或多个单播MAC地址,该一个或多个单播MAC地址中的任意一个单播MAC地址关联该通信设备的一个业务接口。
可选的,处理模块1501,还用于根据匹配结果通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,处理模块1501,还用于通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送将第一报文的第一字段的值设置为第二数值后得到的报文。
可选的,处理模块1501,还用于根据匹配结果通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中不存在与第一报文的源MAC地址相匹配的MAC地址时,处理模块1501,还用于通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文。
可选的,处理模块1501,还用于通过收发模块1502的第一业务接口接收第二报文;处理模块1501,还用于将第二报文重新封装为第三报文之后,通过收发模块1502的第一环网接口发送第三报文,其中,该第三报文中包括第一字段,第一字段的值为第二数值,第一报文为改变第三报文在以太环网中的传输方向后得到的报文。
可选的,处理模块1501,用于通过收发模块1502的第一环网接口接收第一报文,包括:处理模块1501,用于通过收发模块1502的第一环网接口环网环回第三报文,该第三报文中包括第一字段,第一字段的值为第二数值;处理模块1501,还用于将第三报文中的第一字段的值设置为第一数值后得到第一报文。
可选的,处理模块1501,还用于根据第一字段的值通过收发模块1502发送第一报文,包括:当第一字段的值为第二数值时,处理模块1501,还用于根据第一MAC地址列表或第二MAC地址列表通过收发模块1502发送第一报文,第一MAC地址列表包括一个或多个单播MAC地址,一个或多个单播MAC地址中的任意一个单播MAC地址关联通信设备的一个业务接口,第二MAC地址列表包括一个或多个组播MAC地址,一个或多个组播MAC地址中的任意一个组播MAC地址关联通信设备的一个或多个业务接口。
在另一种可能的实现方式中:
处理模块1501,用于通过收发模块1502的第一环网接口接收第一报文,第一报文为改变第三报文在以太环网中的传输方向后得到的报文,第一报文中包括第一字段,第一字段的 值为第一数值或第二数值,第一数值用于指示第一报文在以太环网的非默认传输方向上未经过源通信设备的转发,第二数值用于指示第一报文在以太环网的非默认传输方向上经过了源通信设备的转发;处理模块1501,还用于根据第一字段的值通过收发模块1502发送第一报文。
可选的,处理模块1501,用于根据第一字段的值通过收发模块1502发送第一报文,包括:当第一字段的值为第一数值时,处理模块1501,用于使用第一报文的源MAC地址匹配第一MAC地址列表;处理模块1501,还用于根据匹配结果通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文,该第一MAC地址列表包括一个或多个单播MAC地址,该一个或多个单播MAC地址中的任意一个单播MAC地址关联该通信设备的一个业务接口。
可选的,处理模块1501,还用于根据匹配结果通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中存在第一MAC地址与第一报文的源MAC地址相匹配时,处理模块1501,还用于通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送将第一报文的第一字段的值设置为第二数值后得到的报文。
可选的,处理模块1501,还用于根据匹配结果通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文,包括:当匹配结果为第一MAC地址列表中不存在与第一报文的源MAC地址相匹配的MAC地址时,处理模块1501,还用于通过收发模块1502的第一环网接口向收发模块1502的第二环网接口发送第一报文。
可选的,处理模块1501,还用于通过收发模块1502的第一业务接口接收第二报文;处理模块1501,还用于将第二报文重新封装为第三报文之后,通过收发模块1502的第一环网接口发送第三报文,其中,该第三报文中包括第一字段,第一字段的值为第一数值。
可选的,处理模块1501,还用于根据第一字段的值通过收发模块1502发送第一报文,包括:当第一字段的值为第二数值时,处理模块1501,还用于根据第一MAC地址列表或第二MAC地址列表通过收发模块1502发送第一报文,第一MAC地址列表包括一个或多个单播MAC地址,一个或多个单播MAC地址中的任意一个单播MAC地址关联通信设备的一个业务接口,第二MAC地址列表包括一个或多个组播MAC地址,一个或多个组播MAC地址中的任意一个组播MAC地址关联通信设备的一个或多个业务接口。
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在本实施例中,该通信设备150以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定ASIC,电路,执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。在一个简单的实施例中,本领域的技术人员可以想到该通信设备150可以采用图6所示的通信设备30的形式。
比如,图6所示的通信装置30中的处理器301可以通过调用存储器303中存储的计算机执行指令,使得通信装置30执行上述方法实施例中的数据传输方法。
示例性的,图15中的处理模块1501和收发模块1502的功能/实现过程可以通过图6所示的通信装置30中的处理器301调用存储器303中存储的计算机执行指令来实现。或者,图15中的处理模块1501的功能/实现过程可以通过图6所示的通信装置30中的处理器301调用存储器303中存储的计算机执行指令来实现,图15中的收发模块1502的功能/实现过程可以通过图6所示的通信装置30中的通信接口304来实现。
由于本实施例提供的通信设备150可执行上述的数据传输方法,因此其所能获得的技术效果可参考上述方法实施例,在此不再赘述。
可选的,本申请实施例还提供了一种通信设备(例如,该通信设备可以是芯片或芯片系统),该通信设备包括处理器,用于实现上述任一方法实施例中的方法。在一种可能的设计中,该通信设备还包括存储器。该存储器,用于保存必要的程序指令和数据,处理器可以调用存储器中存储的程序代码以指令该通信设备执行上述任一方法实施例中的方法。当然,存储器也可以不在该通信设备中。在另一种可能的设计中,该通信设备还包括接口电路,该接口电路为代码/数据读写接口电路,该接口电路用于接收计算机执行指令(计算机执行指令存储在存储器中,可能直接从存储器读取,或可能经过其他器件)并传输至该处理器。该通信设备是芯片系统时,可以由芯片构成,也可以包含芯片和其他分立器件,本申请实施例对此不作具体限定。
可选的,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当所述指令在上述通信设备上运行时,使得通信设备可以执行上述任一方面所述的方法。
可选的,本申请实施例还提供了一种包含指令的计算机程序产品,当所述指令在上述通信设备上运行时,使得所述通信设备可以执行上述任一方面所述的方法。
上述实施例中,可以理解的是,通信设备中不一定必要包括存储器,通信设备可以通过调用外部存储器中的指令来执行相应的功能;或者,相应的程序指令,可以在后期装载到通信设备中的存储器中,以供处理器调用后执行相应的操作。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。本申请实施例中,计算机可以包括前面所述的装置。
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、 组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (32)

  1. 一种数据传输方法,所述数据传输方法应用于以太环网中的通信设备,其特征在于,所述方法包括:
    所述通信设备通过所述通信设备的第一环网接口接收第一报文,所述第一报文中包括第一字段,所述第一字段的值为第一数值或第二数值,所述第一数值用于指示不允许环网接口向业务接口发送所述第一字段所在的报文,所述第二数值用于指示允许所述环网接口向所述业务接口发送所述第一字段所在的报文;
    所述通信设备根据所述第一字段的值发送所述第一报文。
  2. 根据权利要求1所述的方法,其特征在于,所述通信设备根据所述第一字段的值发送所述第一报文,包括:
    当所述第一字段的值为所述第一数值时,所述通信设备使用所述第一报文的源媒体接入控制MAC地址匹配第一MAC地址列表,并根据匹配结果通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址,所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述匹配结果通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中存在第一MAC地址与所述第一报文的源MAC地址相匹配时,所述通信设备通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送将所述第一报文的第一字段的值设置为所述第二数值后得到的报文。
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述匹配结果通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中不存在与所述第一报文的源MAC地址相匹配的MAC地址时,所述通信设备通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,在所述通信设备通过所述通信设备的第一环网接口接收第一报文之前,所述方法还包括:
    所述通信设备通过所述通信设备的第一业务接口接收第二报文;
    所述通信设备将所述第二报文重新封装为第三报文之后,通过所述通信设备的第一环网接口发送所述第三报文,其中,所述第三报文中包括所述第一字段,所述第一字段的值为所述第二数值,所述第一报文为改变所述第三报文在所述以太环网中的传输方向后得到的报文。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述通信设备在所述第一环网接口上检测到故障;所述通信设备通过所述通信设备的第一环网接口接收第一报文,包括:
    所述通信设备的第一环网接口环回第三报文,所述第三报文中包括第一字段,所述第一字段的值为所述第二数值;
    所述通信设备将所述第三报文中的第一字段的值设置为所述第一数值后得到所述第一报文。
  7. 根据权利要求1所述的方法,其特征在于,所述通信设备根据所述第一字段的值发送所述第一报文,包括:
    当所述第一字段的值为所述第二数值时,所述通信设备根据第一MAC地址列表或第二MAC地址列表发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址, 所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口,所述第二MAC地址列表包括一个或多个组播MAC地址,所述一个或多个组播MAC地址中的任意一个组播MAC地址关联所述通信设备的一个或多个业务接口。
  8. 一种数据传输方法,所述数据传输方法应用于以太环网中的通信设备,其特征在于,所述方法包括:
    所述通信设备通过所述通信设备的第一环网接口接收第一报文,所述第一报文为改变第三报文在所述以太环网中的传输方向后得到的报文,所述第一报文中包括第一字段,所述第一字段的值为第一数值或第二数值,所述第一数值用于指示所述第一报文在所述以太环网的非默认传输方向上未经过源通信设备的转发;所述第二数值用于指示所述第一报文在所述以太环网的非默认传输方向上经过了源通信设备的转发;
    所述通信设备根据所述第一字段的值发送所述第一报文。
  9. 根据权利要求8所述的方法,其特征在于,所述通信设备根据所述第一字段的值发送所述第一报文,包括:
    当所述第一字段的值为所述第一数值时,所述通信设备使用所述第一报文的源媒体接入控制MAC地址匹配第一MAC地址列表,并根据匹配结果通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址,所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口。
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述匹配结果通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中存在第一MAC地址与所述第一报文的源MAC地址相匹配时,所述通信设备通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送将所述第一报文的第一字段的值设置为所述第二数值后得到的报文。
  11. 根据权利要求9所述的方法,其特征在于,所述根据所述匹配结果通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中不存在与所述第一报文的源MAC地址相匹配的MAC地址时,所述通信设备通过所述通信设备的第一环网接口向所述通信设备的第二环网接口发送所述第一报文。
  12. 根据权利要求8-11任一项所述的方法,其特征在于,在所述通信设备通过所述通信设备的第一环网接口接收第一报文之前,所述方法还包括:
    所述通信设备通过所述通信设备的第一业务接口接收第二报文;
    所述通信设备将所述第二报文重新封装为第三报文之后,通过所述通信设备的第一环网接口发送所述第三报文,其中,所述第三报文中包括所述第一字段,所述第一字段的值为所述第一数值。
  13. 根据权利要求8所述的方法,其特征在于,所述通信设备根据所述第一字段的值发送所述第一报文,包括:
    当所述第一字段的值为所述第二数值时,所述通信设备根据第一MAC地址列表或第二MAC地址列表发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址,所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口,所述第二MAC地址列表包括一个或多个组播MAC地址,所述一个或多个组播MAC地址中的任意一个组播MAC地址关联所述通信设备的一个或多个业务接口。
  14. 一种通信设备,其特征在于,所述通信设备包括:处理模块和收发模块,所述收发模块包括第一环网接口;
    所述处理模块,用于通过所述收发模块的第一环网接口接收第一报文,所述第一报文中包括第一字段,所述第一字段的值为第一数值或第二数值,所述第一数值用于指示不允许环网接口向业务接口发送所述第一字段所在的报文,所述第二数值用于指示允许所述环网接口向所述业务接口发送所述第一字段所在的报文;
    所述处理模块,还用于根据所述第一字段的值通过所述收发模块发送所述第一报文。
  15. 根据权利要求14所述的通信设备,其特征在于,所述收发模块还包括第二环网接口;所述处理模块,还用于根据所述第一字段的值通过所述收发模块发送所述第一报文,包括:
    当所述第一字段的值为所述第一数值时,所述处理模块,用于使用第一报文的源媒体接入控制MAC地址匹配第一MAC地址列表;
    所述处理模块,还用于根据匹配结果通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址,所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口。
  16. 根据权利要求15所述的通信设备,其特征在于,所述处理模块,还用于根据匹配结果通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中存在第一MAC地址与所述第一报文的源MAC地址相匹配时,所述处理模块,还用于通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送将所述第一报文的第一字段的值设置为所述第二数值后得到的报文。
  17. 根据权利要求15所述的通信设备,其特征在于,所述处理模块,还用于根据匹配结果通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中不存在与所述第一报文的源MAC地址相匹配的MAC地址时,所述处理模块,还用于通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文。
  18. 根据权利要求14-16任一项所述的通信设备,其特征在于,所述收发模块还包括第一业务接口;
    所述处理模块,还用于通过所述收发模块的第一业务接口接收第二报文;
    所述处理模块,还用于将所述第二报文重新封装为第三报文之后,通过所述收发模块的第一环网接口发送所述第三报文,其中,所述第三报文中包括所述第一字段,所述第一字段的值为所述第二数值,所述第一报文为改变所述第三报文在以太环网中的传输方向后得到的报文。
  19. 根据权利要求14-18任一项所述的通信设备,其特征在于,所述通信设备在所述第一环网接口上检测到故障;所述处理模块,用于通过所述收发模块的第一环网接口接收第一报文,包括:
    所述处理模块,用于通过所述收发模块的第一环网接口环回第三报文,所述第三报文中包括第一字段,所述第一字段的值为所述第二数值;
    所述处理模块,还用于将所述第三报文中的第一字段的值设置为所述第一数值后得到所述第一报文。
  20. 根据权利要求14所述的通信设备,其特征在于,所述处理模块,还用于根据所述第一字段的值通过所述收发模块发送所述第一报文,包括:
    当所述第一字段的值为所述第二数值时,所述处理模块,还用于根据第一MAC地址列表或第二MAC地址列表通过所述收发模块发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址,所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口,所述第二MAC地址列表包括一个或多个组播MAC地址,所述一个或多个组播MAC地址中的任意一个组播MAC地址关联所述通信设备的一个或多个业务接口。
  21. 一种通信设备,其特征在于,所述通信设备包括:处理模块和收发模块,所述收发模块包括第一环网接口;
    所述处理模块,用于通过所述收发模块的第一环网接口接收第一报文,所述第一报文为改变第三报文在以太环网中的传输方向后得到的报文,所述第一报文中包括第一字段,所述第一字段的值为第一数值或第二数值,所述第一数值用于指示所述第一报文在所述以太环网的非默认传输方向上未经过源通信设备的转发;所述第二数值用于指示所述第一报文在所述以太环网的非默认传输方向上经过了源通信设备的转发;
    所述处理模块,还用于根据所述第一字段的值通过所述收发模块发送所述第一报文。
  22. 根据权利要求21所述的通信设备,其特征在于,所述收发模块还包括第二环网接口;所述处理模块,还用于根据所述第一字段的值通过所述收发模块发送所述第一报文,包括:
    当所述第一字段的值为所述第一数值时,所述处理模块,用于使用第一报文的源媒体接入控制MAC地址匹配第一MAC地址列表;
    所述处理模块,还用于根据匹配结果通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址,所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口。
  23. 根据权利要求22所述的通信设备,其特征在于,所述处理模块,还用于根据匹配结果通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中存在第一MAC地址与所述第一报文的源MAC地址相匹配时,所述处理模块,还用于通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送将所述第一报文的第一字段的值设置为所述第二数值后得到的报文。
  24. 根据权利要求22所述的通信设备,其特征在于,所述处理模块,还用于根据匹配结果通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文,包括:
    当所述匹配结果为所述第一MAC地址列表中不存在与所述第一报文的源MAC地址相匹配的MAC地址时,所述处理模块,还用于通过所述收发模块的第一环网接口向所述收发模块的第二环网接口发送所述第一报文。
  25. 根据权利要求21-24任一项所述的通信设备,其特征在于,所述收发模块还包括第一业务接口;
    所述处理模块,还用于通过所述收发模块的第一业务接口接收第二报文;
    所述处理模块,还用于将所述第二报文重新封装为第三报文之后,通过所述收发模块的第一环网接口发送所述第三报文,其中,所述第三报文中包括所述第一字段,所述第一字段 的值为所述第一数值。
  26. 根据权利要求21所述的通信设备,其特征在于,所述处理模块,还用于根据所述第一字段的值通过所述收发模块发送所述第一报文,包括:
    当所述第一字段的值为所述第二数值时,所述处理模块,还用于根据第一MAC地址列表或第二MAC地址列表通过所述收发模块发送所述第一报文,所述第一MAC地址列表包括一个或多个单播MAC地址,所述一个或多个单播MAC地址中的任意一个单播MAC地址关联所述通信设备的一个业务接口,所述第二MAC地址列表包括一个或多个组播MAC地址,所述一个或多个组播MAC地址中的任意一个组播MAC地址关联所述通信设备的一个或多个业务接口。
  27. 一种通信设备,其特征在于,所述通信设备包括:处理器;
    所述处理器用于读取存储器中的计算机执行指令,并执行所述计算机执行指令,以使所述通信设备执行如权利要求1-7中任一项所述的方法;或者,以使所述通信设备执行如权利要求8-13中任一项所述的方法。
  28. 一种通信设备,其特征在于,所述通信设备包括:处理器和存储器;
    所述存储器用于存储计算机执行指令,当所述处理器执行所述计算机执行指令时,以使所述通信设备执行如权利要求1-7中任一项所述的方法,或者,以使所述通信设备执行如权利要求8-13中任一项所述的方法。
  29. 一种通信设备,其特征在于,所述通信设备包括:处理器和接口电路;
    所述接口电路,用于接收计算机执行指令并传输至所述处理器;
    所述处理器用于执行所述计算机执行指令,以使所述通信设备执行如权利要求1-7中任一项所述的方法,或者,以使所述通信设备执行如权利要求8-13中任一项所述的方法。
  30. 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在通信设备上运行时,以使所述通信设备执行如权利要求1-7中任一项所述的方法,或者,以使所述通信设备执行如权利要求8-13中任一项所述的方法。
  31. 一种通信系统,其特征在于,所述通信系统包括权利要求14-20中任一项所述的通信设备;或者,所述通信系统包括权利要求21-26中任一项所述的通信设备。
  32. 一种计算机程序产品,其特征在于,当所述计算机程序产品在通信装置上运行时,使得所述通信装置执行如权利要求1-7中任一项所述的方法,或者,使得所述通信装置执行如权利要求8-13中任一项所述的方法。
PCT/CN2021/070613 2020-01-07 2021-01-07 数据传输方法、设备及系统 WO2021139714A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010015658.5 2020-01-07
CN202010015658.5A CN113162834A (zh) 2020-01-07 2020-01-07 数据传输方法、设备及系统

Publications (1)

Publication Number Publication Date
WO2021139714A1 true WO2021139714A1 (zh) 2021-07-15

Family

ID=76788423

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/070613 WO2021139714A1 (zh) 2020-01-07 2021-01-07 数据传输方法、设备及系统

Country Status (2)

Country Link
CN (1) CN113162834A (zh)
WO (1) WO2021139714A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117826007A (zh) * 2024-03-06 2024-04-05 三峡金沙江川云水电开发有限公司 一种用于直流系统的环网故障检测系统及方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117792877A (zh) * 2022-09-27 2024-03-29 华为技术有限公司 一种报文传输方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387070A (zh) * 2011-10-11 2012-03-21 浙江大学 T-mpls共享保护环故障恢复前的数据保护方法
US20120287776A1 (en) * 2011-05-11 2012-11-15 Fujitsu Limited Network, network fault recovery method, and node device
CN105681149A (zh) * 2015-12-29 2016-06-15 瑞斯康达科技发展股份有限公司 环网保护方法及装置
CN106941436A (zh) * 2016-01-04 2017-07-11 中兴通讯股份有限公司 报文传输方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120287776A1 (en) * 2011-05-11 2012-11-15 Fujitsu Limited Network, network fault recovery method, and node device
CN102387070A (zh) * 2011-10-11 2012-03-21 浙江大学 T-mpls共享保护环故障恢复前的数据保护方法
CN105681149A (zh) * 2015-12-29 2016-06-15 瑞斯康达科技发展股份有限公司 环网保护方法及装置
CN106941436A (zh) * 2016-01-04 2017-07-11 中兴通讯股份有限公司 报文传输方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117826007A (zh) * 2024-03-06 2024-04-05 三峡金沙江川云水电开发有限公司 一种用于直流系统的环网故障检测系统及方法
CN117826007B (zh) * 2024-03-06 2024-05-17 三峡金沙江川云水电开发有限公司 一种用于直流系统的环网故障检测系统及方法

Also Published As

Publication number Publication date
CN113162834A (zh) 2021-07-23

Similar Documents

Publication Publication Date Title
WO2021104491A1 (zh) 数据传输方法、设备及系统
JP5345942B2 (ja) Pbtネットワークの中間ノードにおけるイーサネットoam
JP6940041B2 (ja) サービスのサービス品質を検出するための方法、デバイスおよびシステム
WO2021139714A1 (zh) 数据传输方法、设备及系统
JP2023143913A (ja) ルーティング方法及び装置
CN101573913A (zh) 用于多播路由选择的方法和设备
CN112910773A (zh) 下发oam配置信息的方法及控制节点
WO2021179903A1 (zh) 一种故障处理方法、设备和可读存储介质
JP7162678B2 (ja) サービスのサービス品質を検出するための方法およびシステム、ならびにデバイス
WO2022068744A1 (zh) 获取报文头信息、生成报文的方法、设备及存储介质
CN109286564B (zh) 一种报文转发方法及装置
WO2023179457A1 (zh) 业务连接的标识方法、装置、系统及存储介质
US20230261795A1 (en) Method for Retransmitting Data and Apparatus
WO2023011047A1 (zh) 一种处理方法及装置
WO2020147081A1 (zh) 一种数据传输方法、相关设备及计算机存储介质
WO2022179437A1 (zh) 传输数据的方法和通信装置
CN115914087A (zh) 报文转发方法、装置、设备、系统及存储介质
JP6631415B2 (ja) 中継装置
WO2023030202A1 (zh) 路径故障检测方法、装置、系统、网络设备及存储介质
CN103269243B (zh) 一种无线通信中继装置、系统及通信方法
WO2023273788A1 (zh) 一种数据处理方法以及相关装置
WO2022227695A1 (zh) 传输报文的方法、装置及设备
CN114745352B (zh) 一种报文转发方法及装置
CN114040007B (zh) 多节点间数据传输方法和设备
WO2024027194A1 (zh) 报文转发方法、设备、系统及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21738395

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21738395

Country of ref document: EP

Kind code of ref document: A1