[go: up one dir, main page]

CN119254864A - Network data processing method, device and vehicle - Google Patents

Network data processing method, device and vehicle Download PDF

Info

Publication number
CN119254864A
CN119254864A CN202411397754.5A CN202411397754A CN119254864A CN 119254864 A CN119254864 A CN 119254864A CN 202411397754 A CN202411397754 A CN 202411397754A CN 119254864 A CN119254864 A CN 119254864A
Authority
CN
China
Prior art keywords
data packet
component
network
interface
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411397754.5A
Other languages
Chinese (zh)
Inventor
王瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xinchi Semiconductor Technology Co ltd
Original Assignee
Beijing Xinchi Semiconductor Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xinchi Semiconductor Technology Co ltd filed Critical Beijing Xinchi Semiconductor Technology Co ltd
Priority to CN202411397754.5A priority Critical patent/CN119254864A/en
Publication of CN119254864A publication Critical patent/CN119254864A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a network data processing method, a device and a vehicle, wherein the method is applied to a network, a plurality of components are arranged in the network, each component corresponds to a respective network device, and the components are provided with different types of first interfaces and second interfaces; the method comprises the steps of carrying out copying operation on a data packet to generate a plurality of identical data packets if required, respectively sending the plurality of data packets to a second component through a plurality of second interfaces of the first component by different network transmission paths, and transmitting the data packets to the second component and/or sending the data packets to other components in a network according to the playing type of the data packets and network addresses in a frame structure of the data packets. The method improves the reliability of network data transmission.

Description

Network data processing method and device and vehicle
Technical Field
The present application relates to the field of data processing in networks, and in particular, to a method and an apparatus for processing network data, and a vehicle.
Background
At present, under many network use occasions, the requirement on the reliability of traditional network data transmission is higher and higher, for example, in some industrial and automobile use occasions with higher network requirements, the reliability of the network data transmission is required to be extremely high. However, in the process of network data processing and transmission, a communication failure or a single point failure problem often occurs due to a single data transmission link or other unreliable factors, which causes a problem of reliability of related devices.
Disclosure of Invention
The embodiment of the application aims to provide a network data processing method which can improve the reliability of data transmission of a network.
The method of the embodiment of the application is applied to a network, a plurality of different components are arranged in the network, each component corresponds to a respective network device, a first interface and a second interface of different types are arranged on the components, the first interface and the second interface have compatible network communication protocols, and the method comprises the following steps:
Determining whether a data packet needs to be copied or not based on a first field in a frame structure of the data packet when a first interface of a first component receives the data packet sent by first network equipment, wherein the first component corresponds to the first network equipment;
if the data packet needs to be copied, performing a copying operation on the data packet to generate a plurality of identical data packets;
transmitting the data packets to the second interfaces of the second component respectively through the second interfaces of the first component in different network transmission paths;
and transmitting the data packet to a first interface of the second component and/or transmitting the data packet to a second interface of other components in the network according to the play type of the data packet and a network address in a frame structure of the data packet so as to transmit the data packet to target network equipment corresponding to the target component.
Optionally, after sending the data packet to the second interface of the second component, the method further includes:
Determining whether other data packets identical to the currently received data packet have been received by a second interface of the second component based on a second field in the frame structure of the data packet and/or a network address in the frame structure of the data packet, wherein the second field is used for identifying an identity of the data packet;
if it is determined that it has been received, the data packet currently received is discarded.
Optionally, the determining whether other data packets identical to the currently received data packet have been received by the second interface of the second component based on the second field in the frame structure of the data packet and/or the network address in the frame structure of the data packet includes:
Determining identity information of the data packet based on a second field in a frame structure of the data packet and a network address of the data packet;
Comparing the identity information of the data packet with a record table stored by the second component;
In case it is determined that the identity information of the data packet has been recorded in the record table, it is determined that the other data packet identical to the data packet currently received has been received by the second interface of the second component.
Optionally, the copying the data packet to generate a plurality of identical data packets includes:
And carrying out framing operation on the data packets again based on a frame format of a preset network to generate a plurality of identical data packets, wherein the network address and the second field in the frame structure of each data packet are identical.
Optionally, each of the components is connected to the second interfaces of the other components through its respective second interface, and the sending, by using the multiple second interfaces of the first component, the multiple data packets to the second interfaces of the second component through different network transmission paths includes:
transmitting the data packet to a second interface of the second component in a first transmission direction through the second interface of the first component;
And transmitting the data packet to the other second interface of the second component in a second transmission direction through the other second interface of the first component, wherein the first transmission direction is different from the second transmission direction.
Optionally, the transmitting the data packet to the first interface of the second component and/or the transmitting the data packet to the second interface of the other components in the network according to the play type of the data packet and the network address in the frame structure of the data packet includes:
When the data packet is determined to be of a unicast type and the destination address in the network address is the second component, determining the second component as the target component, and transmitting the data packet to a first interface of the second component and not forwarding the data packet through a second interface of the second component;
Forwarding the data packet to the target component through a second interface of the second component when the data packet is determined to be of a unicast type and a destination address in the network address is not the first interface of the second component;
And when the data packet is determined to be of a multicast type or a broadcast type, the data packet is sent to the target component, and/or the data packet is forwarded to a plurality of corresponding target components through a second interface of the second component.
Optionally, after the data packets are respectively sent to the second interfaces of the second components through the second interfaces of the first components in different network transmission paths, the method further includes:
and determining that the network has data flow failure in the case that the second interface of the target component does not receive the data packet or only receives the unique data packet.
Optionally, the method further comprises:
And respectively determining different bytes of the mechanism code in the frame structure of the data packet as the first field and the second field.
The embodiment of the application also provides a network data processing device, which is applied to a network, wherein a plurality of different components are arranged in the network, each component corresponds to a respective network device, the components are provided with a first interface and a second interface of different types, the first interface and the second interface have compatible network communication protocols, and the device comprises:
a determining module configured to determine, if a first interface of a first component receives a data packet sent by a first network device, whether the data packet needs to be duplicated based on a first field in a frame structure of the data packet, wherein the first component corresponds to the first network device;
A copying module configured to copy the data packets if it is required to be copied, and generate a plurality of identical data packets;
a processing module configured to send a plurality of the data packets to the second interfaces of the second components respectively in different network transmission paths through the plurality of second interfaces of the first components;
and transmitting the data packet to a first interface of the second component and/or transmitting the data packet to a second interface of other components in the network according to the play type of the data packet and a network address in a frame structure of the data packet so as to transmit the data packet to target network equipment corresponding to the target component.
The embodiment of the application also provides a vehicle, which comprises the network data processing device, wherein the device is used for processing the network of the vehicle.
According to the processing method provided by the embodiment of the application, the plurality of interfaces of different types are arranged on the components in the network, so that the functions of data transmission processing can be distinguished, and the data packet delivery efficiency is improved. In the process of transmitting the data packet to the target network device, the data packet is transmitted by different network transmission paths, so that the reliability of data transmission is improved. And the data packet can be transmitted to the target network equipment according to the play type of the data packet and the network address in the frame structure of the data packet, so that the accuracy of data transmission is improved.
Drawings
FIG. 1 is a flow chart of a network data processing method according to an embodiment of the present application;
Fig. 2 is a schematic structural diagram of a frame structure of a data packet according to an embodiment of the present application;
Fig. 3 is a schematic diagram of connection between components in a network and corresponding network devices according to an embodiment of the present application;
FIG. 4 is a flow chart of one embodiment of a network data processing method of an embodiment of the present application;
FIG. 5 is a flow chart of one embodiment of step S500 of FIG. 4 according to an embodiment of the present application;
FIG. 6 is a flow chart of one embodiment of step S300 of FIG. 1 according to an embodiment of the present application;
FIG. 7 is a flow chart of one embodiment of step S400 of FIG. 1 according to an embodiment of the present application;
fig. 8 is a block diagram of a network data processing apparatus according to an embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the accompanying drawings.
It should be understood that various modifications may be made to the embodiments of the application herein. Therefore, the above description should not be taken as limiting, but merely as exemplification of the embodiments. Other modifications within the scope and spirit of the application will occur to persons of ordinary skill in the art.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with a general description of the application given above, and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the application will become apparent from the following description of a preferred form of embodiment, given as a non-limiting example, with reference to the accompanying drawings.
It is also to be understood that, although the application has been described with reference to some specific examples, those skilled in the art can certainly realize many other equivalent forms of the application.
The above and other aspects, features and advantages of the present application will become more apparent in light of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the application will be described hereinafter with reference to the accompanying drawings, in which, however, it is to be understood that the embodiments so applied are merely examples of the application, which may be practiced in various ways. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application in unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not intended to be limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the word "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.
The network data processing method of the embodiment of the application is applied to a network, wherein the network can be a local area network, such as an Ethernet formed by various devices in a vehicle or other small local area networks, and the processing method can be used for network architecture and data transmission of network link redundancy configuration applicable to vehicle-mounted or other small local area network topologies.
In the network of this embodiment, a plurality of different components are provided, where the components are sequentially connected to the network, and each component corresponds to a respective network device, and the network device sends and receives data through the respective corresponding component. In one embodiment, the component may be an other corresponding device independent of the network device, and in another embodiment, the component may also be part of the network device, or a slave device, for providing support for network data interactions for the network device.
Each component is provided with a first interface and a second interface of different types, and the first interface and the second interface have compatible network communication protocols. For example, the first interface and the second interface can both perform network communication based on the IEEE 802.1CB protocol of the IEEE TSN protocol family. In one embodiment, the first interface may be a G-port, and the second interface may be a T-port, with each component being connected to its corresponding network device through the first interface and to other components in the network through the second interface.
Based on the network architecture, the network data processing method of the application comprises the steps of analyzing the content in the data packet when the first interface of the first component in the network receives the data packet sent by the first network device corresponding to the first component, and determining whether the data packet needs to be duplicated or not. If it is determined that the data packet needs to be copied, the first component can copy the data packet into a plurality of data packets with the same data content, and the data packets are respectively sent to the second interfaces of the second component through the second interfaces of the first component by different network transmission paths, so that the data packet can be ensured to be sent to the target component. And the second component can select a specific mode for sending and transmitting the data packet according to the playing type of the data packet. This includes a first interface that communicates the data packet to a second component, which may be a target component. The data packet may also be sent to the second interface of the other component in the network and forwarded to the second interface of the target component, which may be one or more, through the second interface of the other component. The target component then transmits the data packet to the corresponding target network device through the first interface. Thereby, the reliability of transmitting the data packet is effectively improved while the accurate target network equipment is determined.
The network data processing method of the present application will be described in detail with reference to specific embodiments, and fig. 1 is a flowchart of the network data processing method of the embodiment of the present application, as shown in fig. 1 and with reference to fig. 2 and 3, and the method includes the following steps:
s100, determining whether the data packet needs to be copied or not based on a first field in a frame structure of the data packet when a first interface of a first component receives the data packet sent by first network equipment, wherein the first component corresponds to the first network equipment.
The network data processing method of the application is applied to a network, and the network can be a local area network, such as an Ethernet formed by various devices in a vehicle or other small local area networks. The network is provided with a plurality of components, each corresponding to a respective network device. If the first component corresponds to a first network device, the second component corresponds to a second network device.
And each component is provided with a first interface (such as a G port) and a second interface (such as a T port) of different types, so that the functions of data transmission processing are distinguished based on the interfaces of different types, and the data packet delivery efficiency is improved. The first component receives a data packet sent by the first network device through the first interface of the first component, analyzes the content of the data packet, and determines whether the data packet needs to be copied or not based on the first field. The data packet has a corresponding frame structure including multiple information therein. In one embodiment, the first interface may be a G-port and the second interface may be a T-port.
For example, as shown in fig. 2, the frame structure of the ethernet based on the 802.3 protocol includes a plurality of fields, wherein an org code field has 3 bytes, a first byte in the org code field is an FT field, and the last two bytes in the org code field are FID fields, which may represent a unique ID of a packet in the ethernet. In this embodiment, the FT field is determined as a first field, where the first field may be used to characterize whether the data packet needs to be copied. The FID field is determined as a second field, which may represent identity information of the data packet.
And S200, if the data packet needs to be copied, performing copy operation on the data packet to generate a plurality of identical data packets.
Illustratively, whether the data packet needs to be copied is determined based on the contents of the first field, e.g., a "1" for the first field indicates that the data packet needs to be copied and a "0" for the first field indicates that the data packet does not need to be copied.
If it is determined that the data packet needs to be copied based on the first field, the first component may perform a copy operation on the data packet to generate a plurality of data packets having the same content. And respectively processing the plurality of data packets generated after copying through the network.
And S300, respectively transmitting the data packets to the second interfaces of the second components through the second interfaces of the first components by using different network transmission paths.
Illustratively, the first component has a plurality of second interfaces, each of which may transmit data packets relatively independently. In this embodiment, the plurality of data packets may be sent to the second interfaces of the second component through the plurality of second interfaces of the first component through different network transmission paths. Wherein one second interface comprising the first component sends one data packet to the second interface of the second component in a first transmission direction and the other second interface of the first component sends the other data packet to the second interface of the second component in a second transmission direction. Therefore, the data packet can be transmitted to the second component, and the reliability of data transmission is improved.
In one embodiment, the second interface of the first component sends the plurality of data packets to the second interface of the second component respectively through different network transmission paths, and the second interface of the second component receiving the data packets may be a different second interface. Therefore, the plurality of second interfaces can cooperate with each other to respectively receive the data packets, and the receiving efficiency is improved.
And S400, transmitting the data packet to a first interface of the second component and/or transmitting the data packet to a second interface of other components in the network according to the play type of the data packet and a network address in a frame structure of the data packet so as to transmit the data packet to target network equipment corresponding to the target component.
The play-out type of the data packet includes, by way of example, at least one of unicast, multicast and broadcast. The transmission modes and/or the transmission target network devices of the data packets corresponding to different play types are different. In one embodiment, unicast means that the first component propagates the data packet unidirectionally to a single destination component, multicast means that the first component propagates the data packet to multiple destination components, and broadcast means that the first component propagates the data packet to all components in the network, i.e., all components are destination components.
The frame structure of the data packet has a network address, such as a MAC address part of the frame structure, which includes information such as a destination address, a source address, and the like of the data packet. The network address contains information such as the source and destination of the data packet. Therefore, the application can accurately transmit the data packet to the second component and/or other components according to the play type of the data packet and the network address in the frame structure of the data packet. For example, the data packet is transmitted to a second component, which is the target component. Or the data packet is transmitted to other components (such as a third component, a fourth component and the like) through the second component, and then forwarded to the target component by the other components.
When the second component is the target component, the first component transmits the data packet to the second interface of the second component, the second component transmits the data packet to the first interface of the second component, the first interface of the second component is connected with the first interface of the target network device, the data packet is transmitted to the first interface of the target network device through the first interface of the second component, and then the data packet is transmitted to the target network device.
The specific transmission mode further comprises a second interface, wherein the first interface transmits the data packet to other components in the network, and the other components can be non-target components or target components. The first component may directly forward the data packet to the target component, or may forward the data packet to the target component step by step via one or more other components, where the target component then sends the data packet to the target network device corresponding to the data packet.
According to the processing method provided by the embodiment of the application, the plurality of interfaces of different types are arranged on the components in the network, so that the functions of data transmission processing can be distinguished, and the data packet delivery efficiency is improved. In the process of transmitting the data packet to the target network device, the data packet is transmitted by different network transmission paths, so that the reliability of data transmission is improved. And the data packet can be transmitted to the target network equipment according to the play type of the data packet and the network address in the frame structure of the data packet, so that the accuracy of data transmission is improved.
In one embodiment of the present application, after the data packet is sent to the second interface of the second component, as shown in fig. 4, the method further includes the steps of:
S500, determining whether other data packets which are the same as the data packet which is currently received are received by a second interface of the second component or not based on a second field in the frame structure of the data packet and/or a network address in the frame structure of the data packet, wherein the second field is used for identifying the identity of the data packet.
Illustratively, the frame structure includes a plurality of fields, wherein the org code field has 3 bytes, the latter two of which are FID fields, which may represent a unique ID of the data packet in the Ethernet. The FID field is determined as the second field in this embodiment. The second field may represent identity information of the data packet.
The network address in the frame structure of the data packet may be a MAC address portion of the frame structure that includes information such as a destination address, a source address, etc. of the data packet. After receiving the data packet sent by the first component, the second component may record part of the content of the network address in the data packet, i.e. record the received data packet. In one embodiment, the received data packet may be recorded based on the FID field (second field) corresponding to the original MAC address in the network address. When the second component receives the same data packet again, for example, a second interface of the second component has received a data packet. The other second interface of the following second component receives the same data packet as well. The second component may determine whether the same data packet has been received before based on the second field and/or the network address of the data packet.
And S600, if the data packet is determined to have been received, discarding the data packet which is currently received.
For example, if it is determined that the second component has received a data packet, the second component will not receive the same data packet any more to conserve system resources. The second component discards the currently received data packet, thereby saving system processing resources and saving storage space.
In one embodiment of the present application, the determining whether other data packets identical to the currently received data packet have been received by the second interface of the second component based on the second field in the frame structure of the data packet and/or the network address in the frame structure of the data packet, as shown in fig. 5, includes:
S510, determining the identity information of the data packet based on a second field in the frame structure of the data packet and the network address of the data packet;
s520, comparing the identity information of the data packet with a record table stored by the second component;
and S530, in the case that the identity information of the data packet is recorded in the record table, determining that the other data packet which is the same as the currently received data packet is received by the second interface of the second component.
Illustratively, in combination with the above embodiment, the second field in the frame structure of the data packet may be an FID field as described above, and the FID field may represent a unique ID of the data packet in the ethernet. The network address of the data packet may be a MAC address portion of a frame structure that includes information such as a destination address, a source address, etc. of the data packet. And may also be used to determine the identity of the data packet. In this embodiment, based on the second field and the network address, the identity information of the data packet is accurately determined.
In one embodiment, the second component has stored therein a record table associated with the received data packet. The record table records the identity information of the data packet received by the second component. After the second component receives the data packet, the identity information of the currently received data packet may be compared with the content in the record table, and if the identity information of the currently received data packet is already recorded in the record table, it is determined that other data packets identical to the currently received data packet have been received by the second interface of the second component.
In one embodiment, the identity information of the data packet recorded in the record table includes TAG information (TAG information), which is information calculated using a network address of the data packet, and an FID field (second field). When comparing the identity information of the currently received data packet with the content in the record table, the network address in the identity information of the currently received data packet can be respectively compared with the TAG information, and then the second field in the identity information of the currently received data packet is compared with the second field recorded in the record table. And further determines whether other data packets that are the same as the currently received data packet have been received by the second component.
In one embodiment of the present application, the copying the data packet to generate a plurality of identical data packets includes:
And carrying out framing operation on the data packets again based on a frame format of a preset network to generate a plurality of identical data packets, wherein the network address and the second field in the frame structure of each data packet are identical.
The formats of the data frames of the different types of networks are different, so that the data packet is duplicated based on the frame format of the preset network in a specific application scene, and the data packet can be specifically subjected to framing again, namely the data frame is reconstructed again, and then the corresponding data packet is generated based on the reconstructed data frame. The network address and the second field in the frame structure of each copied data packet are the same, so that after the second component receives the data packet, the identity of the currently received data packet can be judged based on the network address and the second field to determine whether the same data packet has been received.
In one embodiment of the present application, each of the components is connected to the second interfaces of the other components through its respective second interface, and the sending, by using the plurality of second interfaces of the first component, the plurality of data packets to the second interfaces of the second component through different network transmission paths respectively, as shown in fig. 6 and in combination with fig. 4, includes:
S310, the data packet is sent to a second interface of the second component in a first transmission direction through the second interface of the first component.
The first component may send the data packet to the second component, and the data packet may be sent to the plurality of second interfaces of the second component in different transmission directions through the plurality of second interfaces of the first component in parallel. For example, when the network is ring-shaped, the first transmission direction may be a clockwise direction of the network, i.e. through one of the second interfaces of the first component, sending the data packets in the clockwise direction of the network to one of the second interfaces of the second component that is closer to the first component.
And S320, transmitting the data packet to the other second interface of the second component in a second transmission direction through the other second interface of the first component, wherein the first transmission direction is different from the second transmission direction.
Similarly, for example, when the network is ring-shaped, the second transmission direction may be a counter-clockwise direction of the network, i.e. through the further second interface of said first component, the data packets being sent in the counter-clockwise direction of the network to the further second interface of the second component closer to the first component.
This increases the reliability of the data packet when transmitted, since the first transmission direction is different from the second transmission direction. For example, even if the first transmission direction fails, the data packet can be sent to the second component based on the second transmission direction.
In one embodiment of the present application, according to the play type of the data packet and the network address in the frame structure of the data packet, the method transmits the data packet to the first interface of the second component and/or transmits the data packet to the second interface of the other components in the network, as shown in fig. 7, including the following steps:
And S410, when the data packet is determined to be of a unicast type and the destination address in the network address is the first interface of the second component, determining the second component as the target component, transmitting the data packet to the first interface of the second component, and not forwarding the data packet through the second interface of the second component.
Illustratively, unicast type refers to sending a data packet to a single target component. And if the destination address in the network address is the first interface of the second component, the second component is the target component. The first component may simply send the data packet to its second interface via its second interface, which in turn sends the data packet to its first interface. Since the first interface of the second component is connected with the first interface of the second network device (target network device), the data packet can be transmitted to the target network device. And the second component does not forward the data packet through the second interface, so that the task of accurately delivering the data packet to the target network equipment is completed.
And S420, when the data packet is determined to be of a unicast type and the destination address in the network address is not the first interface of the second component, forwarding the data packet to the target component through the second interface of the second component.
Illustratively, if the data packet is of the unicast type and the destination address in the network address is not the first interface of the second component, it is indicated that the target component is not the second component. The data packet needs to be forwarded by the second component. The second interface of the second component is connected with the second interfaces of the other components. The second component forwards the data packet through its second interface to the second interface of the other component to which it is connected. Of course, if the data packet is not sent to the target component, other components can forward the data packet until the data packet is sent to the target component.
And S430, when the data packet is determined to be of a multicast type or a broadcast type, the data packet is sent to the target component, and/or the data packet is forwarded to a plurality of corresponding target components through a second interface of the second component.
For example, if the data packet is of a multicast type or a broadcast type, it indicates that the data packet needs to be sent to multiple target components, or to all components in the network, i.e., all components are target components.
When the data packet is determined to be of a multicast type or a broadcast type, if the second component is a target component, the data packet is transmitted to a second interface of the second component, the data packet is transmitted to a first interface of the second component, and the data packet is further transmitted to target network equipment connected with the second component. Because the target components are multiple, the data packet can be forwarded to multiple corresponding target components through the second interface of the second component, and then the target components send the data packet to the corresponding target network devices.
When the data packet is determined to be of a multicast type or a broadcast type, if the second component is not a target component, the data packet can be forwarded to the second interfaces of the target components step by step through the second interfaces of the second component, and then each target component sends the data packet to the corresponding target network device. Thus realizing the multicast or broadcast operation of the data packet.
In one embodiment of the present application, after the data packets are sent to the second interfaces of the second components respectively through the second interfaces of the first components in different network transmission paths, the method further includes the steps of:
and determining that the network has data flow failure in the case that the second interface of the target component does not receive the data packet or only receives the unique data packet.
In an exemplary embodiment, the target component may have a plurality of second interfaces, and the first component may send a data packet to each of the plurality of second interfaces of the target component, and if the second component determines that only a unique data packet is received by the second component, it indicates that only one second interface receives the data packet, and other second interfaces do not receive the data packet, so that it may be determined that a data flow failure occurs in the network, and corresponding prompt information is generated.
In one embodiment of the application the method further comprises determining different bytes of an organization code in a frame structure of the data packet as the first field and the second field, respectively.
Illustratively, as shown in FIG. 2, the frame structure of the data packet includes a plurality of fields including an organization code of the org code field. The org code field has 3 bytes, the first byte in the org code field is the FT field, the last two bytes in the org code field are the FID field, which may represent the unique ID of the packet in the Ethernet. In this embodiment, the FT field is determined as a first field, where the first field may be used to characterize whether the data packet needs to be copied. The FID field is determined as a second field, which may represent identity information of the data packet.
In one embodiment, the organization code may also be represented by the first 3 bytes of the source address in the MAC address in the frame structure. So that the org code field can be effectively utilized to perform the above-described network data processing method in the present embodiment.
The embodiment of the application also provides a network data processing device, which is applied to a network, wherein a plurality of different components are arranged in the network, each component corresponds to a respective network device, the components are provided with a first interface and a second interface of different types, the first interface and the second interface have compatible network communication protocols, as shown in fig. 8, and the device comprises:
A determining module configured to determine, if a first interface of a first component receives a data packet sent by a first network device, whether the data packet needs to be duplicated based on a first field in a frame structure of the data packet, wherein the first component corresponds to the first network device.
The network data processing apparatus of the present application is illustratively applied to a network, which may be a local area network such as an ethernet network composed of individual devices in a vehicle or other small local area network. The network is provided with a plurality of components, each corresponding to a respective network device. If the first component corresponds to a first network device, the second component corresponds to a second network device.
And each component is provided with a first interface (such as a G port) and a second interface (such as a T port) of different types, so that the functions of data transmission processing are distinguished based on the interfaces of different types, and the data packet delivery efficiency is improved. The first component receives a data packet sent by the first network device through a first interface of the first component, the determining module analyzes the content of the data packet, and determines whether the data packet needs to be copied or not based on a first field. The data packet has a corresponding frame structure including multiple information therein. In one embodiment, the first interface may be a G-port and the second interface may be a T-port.
For example, the frame structure of an 802.3 protocol-based ethernet includes a plurality of fields, wherein an org code field has 3 bytes, a first byte in the org code field is an FT field, and the second two bytes in the org code field are FID fields, which may represent a unique ID of a data packet in the ethernet. In this embodiment, the FT field is determined as a first field, where the first field may be used to characterize whether the data packet needs to be copied. The FID field is determined as a second field, which may represent identity information of the data packet.
And the copying module is configured to copy the data packets if the data packets need to be copied, so as to generate a plurality of identical data packets.
Illustratively, whether the data packet needs to be copied is determined based on the contents of the first field, e.g., a "1" for the first field indicates that the data packet needs to be copied and a "0" for the first field indicates that the data packet does not need to be copied.
If it is determined that the data packet needs to be copied based on the first field, the copy module may perform a copy operation on the data packet through the first component, and generate a plurality of data packets having the same content. And respectively processing the plurality of data packets generated after copying through the network.
A processing module configured to send a plurality of the data packets to the second interfaces of the second components respectively in different network transmission paths through the plurality of second interfaces of the first components;
and transmitting the data packet to a first interface of the second component and/or transmitting the data packet to a second interface of other components in the network according to the play type of the data packet and a network address in a frame structure of the data packet so as to transmit the data packet to target network equipment corresponding to the target component.
Illustratively, the first component has a plurality of second interfaces, each of which may transmit data packets relatively independently. In this embodiment, the processing module may send the plurality of data packets to the second interfaces of the second component through the plurality of second interfaces of the first component through different network transmission paths. The method includes sending a data packet to a second interface of a second component in a first transmission direction through a second interface of the first component, and sending another data packet to a second interface of the second component in a second transmission direction through another second interface of the first component. Therefore, the data packet can be transmitted to the second component, and the reliability of data transmission is improved.
In one embodiment, the plurality of data packets are respectively sent to the second interfaces of the second components through the second interfaces of the first components in different network transmission paths, and the second interfaces of the second components receiving the data packets may be different second interfaces. Therefore, the plurality of second interfaces can cooperate with each other to respectively receive the data packets, and the receiving efficiency is improved.
The play type of the data packet includes at least one of unicast, multicast and broadcast. The transmission modes and/or the transmission target network devices of the data packets corresponding to different play types are different. In one embodiment, unicast means that the first component propagates the data packet unidirectionally to a single destination component, multicast means that the first component propagates the data packet to multiple destination components, and broadcast means that the first component propagates the data packet to all components in the network, i.e., all components are destination components.
The frame structure of the data packet has a network address, such as a MAC address part of the frame structure, which includes information such as a destination address, a source address, and the like of the data packet. The network address contains information such as the source and destination of the data packet. Therefore, the processing module of the application can accurately transmit the data packet to the second component and/or other components according to the play type of the data packet and the network address in the frame structure of the data packet. For example, the data packet is transmitted to a second component, which is the target component. Or the data packet is transmitted to other components (such as a third component, a fourth component and the like) through the second component, and then forwarded to the target component by the other components.
When the second component is the target component, the processing module transmits the data packet to a second interface of the second component through the first component, and then transmits the data packet to a first interface of the second component through the second component, wherein the first interface of the second component is connected with the first interface of the target network device, and the data packet is transmitted to the first interface of the target network device through the first interface of the second component, so that the data packet is transmitted to the target network device.
The specific transmission mode further comprises a second interface, wherein the processing module sends the data packet to other components in the network through the first component, and the other components can be non-target components or target components. The processing module can directly forward the data packet to the target component through the first component, or can forward the data packet to the target component step by step through one or more other components, and then send the data packet to the target network device corresponding to the data packet through the target component.
In one embodiment of the application, after sending the data packet to the second interface of the second component, the processing module is further configured to:
Determining whether other data packets identical to the currently received data packet have been received by a second interface of the second component based on a second field in the frame structure of the data packet and/or a network address in the frame structure of the data packet, wherein the second field is used for identifying an identity of the data packet;
if it is determined that it has been received, the data packet currently received is discarded.
In one embodiment of the application, the processing module is further configured to:
Determining identity information of the data packet based on a second field in a frame structure of the data packet and a network address of the data packet;
Comparing the identity information of the data packet with a record table stored by the second component;
In case it is determined that the identity information of the data packet has been recorded in the record table, it is determined that the other data packet identical to the data packet currently received has been received by the second interface of the second component.
In one embodiment of the application, the replication module is further configured to:
And carrying out framing operation on the data packets again based on a frame format of a preset network to generate a plurality of identical data packets, wherein the network address and the second field in the frame structure of each data packet are identical.
In one embodiment of the application, the components are each connected to the second interfaces of the other components by their respective second interfaces, and the processing module is further configured to:
transmitting the data packet to a second interface of the second component in a first transmission direction through the second interface of the first component;
And transmitting the data packet to the other second interface of the second component in a second transmission direction through the other second interface of the first component, wherein the first transmission direction is different from the second transmission direction.
In one embodiment of the application, the processing module is further configured to:
When the data packet is determined to be of a unicast type and the destination address in the network address is the second component, determining the second component as the target component, and transmitting the data packet to a first interface of the second component and not forwarding the data packet through a second interface of the second component;
Forwarding the data packet to the target component through a second interface of the second component when the data packet is determined to be of a unicast type and a destination address in the network address is not the first interface of the second component;
And when the data packet is determined to be of a multicast type or a broadcast type, the data packet is sent to the target component, and/or the data packet is forwarded to a plurality of corresponding target components through a second interface of the second component.
In one embodiment of the application, the processing module is further configured to:
and determining that the network has data flow failure in the case that the second interface of the target component does not receive the data packet or only receives the unique data packet.
In an embodiment of the application the determining module is further configured to determine different bytes of the organization code in the frame structure of the data packet as the first field and the second field, respectively.
The embodiment of the application also provides a vehicle, which comprises the network data processing device, wherein the device is used for processing the network of the vehicle.
The embodiment of the application also provides an electronic device, as shown in the figure, comprising a processor and a memory, wherein the memory stores an executable program, and the memory executes the executable program to perform the steps of the method as described above.
Embodiments of the present application also provide a storage medium carrying one or more computer programs which, when executed by a processor, implement the steps of the method as described above.
Embodiments of the present application also provide a computer program product comprising a computer program/instruction which, when executed by a processor, implements the steps of the method as described above.
It should be appreciated that in embodiments of the present application, the processor may be a central Processing unit (Central Processing Unit, CPU) and may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuits (ASIC), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on.
It should also be understood that the memory referred to in embodiments of the present application may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable ROM (ELECTRICALLY EPROM EEPROM), or a flash Memory. The volatile memory may be a random access memory (Random Access Memory, RAM for short) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate Synchronous dynamic random access memory (Double DATA RATE SDRAM, DDR SDRAM), enhanced Synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCHLINK DRAM, SLDRAM), and direct memory bus random access memory (Direct Rambus RAM, DR RAM).
It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, the memory (storage module) is integrated into the processor.
It should be noted that the memory described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should also be understood that the first, second, third, fourth and various numerical numbers referred to herein are merely descriptive convenience and are not intended to limit the scope of the application.
It should be understood that the term "and/or" is merely an association relationship describing the associated object, and means that three relationships may exist, for example, a and/or B, and that three cases, a alone, a and B together, and B alone, may exist. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method. To avoid repetition, a detailed description is not provided herein.
In various embodiments of the present application, the sequence number of each process does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative logical blocks (illustrative logical block, abbreviated ILBs) and steps described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed method, apparatus and electronic device may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A network data processing method, applied to a network, wherein a plurality of different components are provided in the network, each component corresponds to a respective network device, and a first interface and a second interface of different types are provided on the components, and the first interface and the second interface have compatible network communication protocols, the method comprises:
Determining whether a data packet needs to be copied or not based on a first field in a frame structure of the data packet when a first interface of a first component receives the data packet sent by first network equipment, wherein the first component corresponds to the first network equipment;
if the data packet needs to be copied, performing a copying operation on the data packet to generate a plurality of identical data packets;
transmitting the data packets to the second interfaces of the second component respectively through the second interfaces of the first component in different network transmission paths;
and transmitting the data packet to a first interface of the second component and/or transmitting the data packet to a second interface of other components in the network according to the play type of the data packet and a network address in a frame structure of the data packet so as to transmit the data packet to target network equipment corresponding to the target component.
2. The network data processing method of claim 1, wherein after sending the data packet to the second interface of the second component, the method further comprises:
Determining whether other data packets identical to the currently received data packet have been received by a second interface of the second component based on a second field in the frame structure of the data packet and/or a network address in the frame structure of the data packet, wherein the second field is used for identifying an identity of the data packet;
if it is determined that it has been received, the data packet currently received is discarded.
3. The network data processing method according to claim 2, wherein said determining whether other data packets identical to the currently received data packet have been received by the second interface of the second component based on the second field in the frame structure of the data packet and/or the network address in the frame structure of the data packet, comprises:
Determining identity information of the data packet based on a second field in a frame structure of the data packet and a network address of the data packet;
Comparing the identity information of the data packet with a record table stored by the second component;
In case it is determined that the identity information of the data packet has been recorded in the record table, it is determined that the other data packet identical to the data packet currently received has been received by the second interface of the second component.
4. The network data processing method according to claim 2, wherein said copying said data packet to generate a plurality of identical said data packets includes:
And carrying out framing operation on the data packets again based on a frame format of a preset network to generate a plurality of identical data packets, wherein the network address and the second field in the frame structure of each data packet are identical.
5. The network data processing method according to claim 1, wherein each of the components is connected to the second interfaces of the other components through its respective second interface, and the transmitting the plurality of data packets to the second interfaces of the second components through the plurality of second interfaces of the first component with different network transmission paths, respectively, includes:
transmitting the data packet to a second interface of the second component in a first transmission direction through the second interface of the first component;
And transmitting the data packet to the other second interface of the second component in a second transmission direction through the other second interface of the first component, wherein the first transmission direction is different from the second transmission direction.
6. The network data processing method according to claim 1, wherein said transmitting the data packet to the first interface of the second component and/or transmitting the data packet to the second interface of the other component in the network according to the play type of the data packet and the network address in the frame structure of the data packet includes:
When the data packet is determined to be of a unicast type and the destination address in the network address is the second component, determining the second component as the target component, and transmitting the data packet to a first interface of the second component and not forwarding the data packet through a second interface of the second component;
Forwarding the data packet to the target component through a second interface of the second component when the data packet is determined to be of a unicast type and a destination address in the network address is not the first interface of the second component;
And when the data packet is determined to be of a multicast type or a broadcast type, the data packet is sent to the target component, and/or the data packet is forwarded to a plurality of corresponding target components through a second interface of the second component.
7. The network data processing method according to claim 1, wherein after transmitting the plurality of data packets to the second interfaces of the second components respectively in different network transmission paths through the plurality of second interfaces of the first components, the method further comprises:
and determining that the network has data flow failure in the case that the second interface of the target component does not receive the data packet or only receives the unique data packet.
8. The network data processing method of claim 2, wherein the method further comprises:
And respectively determining different bytes of the mechanism code in the frame structure of the data packet as the first field and the second field.
9. A network data processing apparatus for use in a network in which a plurality of different components are provided, each component corresponding to a respective network device, the components having first and second interfaces of different types provided thereon, the first and second interfaces having compatible network communication protocols, the apparatus comprising:
a determining module configured to determine, if a first interface of a first component receives a data packet sent by a first network device, whether the data packet needs to be duplicated based on a first field in a frame structure of the data packet, wherein the first component corresponds to the first network device;
A copying module configured to copy the data packets if it is required to be copied, and generate a plurality of identical data packets;
a processing module configured to send a plurality of the data packets to the second interfaces of the second components respectively in different network transmission paths through the plurality of second interfaces of the first components;
and transmitting the data packet to a first interface of the second component and/or transmitting the data packet to a second interface of other components in the network according to the play type of the data packet and a network address in a frame structure of the data packet so as to transmit the data packet to target network equipment corresponding to the target component.
10. A vehicle comprising the network data processing device of claim 9 for processing a network of the vehicle.
CN202411397754.5A 2024-10-08 2024-10-08 Network data processing method, device and vehicle Pending CN119254864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411397754.5A CN119254864A (en) 2024-10-08 2024-10-08 Network data processing method, device and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411397754.5A CN119254864A (en) 2024-10-08 2024-10-08 Network data processing method, device and vehicle

Publications (1)

Publication Number Publication Date
CN119254864A true CN119254864A (en) 2025-01-03

Family

ID=94034364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411397754.5A Pending CN119254864A (en) 2024-10-08 2024-10-08 Network data processing method, device and vehicle

Country Status (1)

Country Link
CN (1) CN119254864A (en)

Similar Documents

Publication Publication Date Title
US11722392B2 (en) Network adapter node performance detection method and apparatus, device, and readable medium
CN111460458B (en) Data processing method, related device and computer storage medium
WO2019076047A1 (en) Traffic forwarding method and traffic forwarding apparatus
US11729085B2 (en) Cluster wide packet tracing
US12261766B2 (en) Redundant path resource reservation method, network device and storage medium
JP4415023B2 (en) Multicast traffic forwarding apparatus and control method in system supporting PPP multilink
WO2021128927A1 (en) Message processing method and apparatus, storage medium, and electronic apparatus
US20190190772A9 (en) Method and apparatus for diagnosing network
WO2022134674A1 (en) Message transmission method and apparatus, and device, storage medium and system
CN113259268A (en) Network port and serial port data forwarding gateway and method supporting redundancy architecture
CN111026324B (en) Updating method and device of forwarding table entry
CN114500467A (en) A kind of address conflict detection method, address conflict detection device and electronic equipment
WO2024227389A1 (en) Data transmission system, method and apparatus, communication device and storage medium
CN115361443B (en) Message processing method and system
CN108259348B (en) A message transmission method and device
WO2022028170A1 (en) Data transmission method, related network node and storage medium
US6910090B1 (en) Maintaining communications in a bus bridge interconnect
WO2023005018A1 (en) Packet forwarding method and network device
CN119254864A (en) Network data processing method, device and vehicle
US8625619B2 (en) Domain gateway control system and method thereof
US7990972B2 (en) Network communication device and a packet routing method
CN115834472A (en) Message processing method, forwarding strategy obtaining method and device
US12401590B2 (en) System and method for forwarding network traffic
CN113612963B (en) Data forwarding method, device, computer equipment and storage medium
US10757071B2 (en) Bridge device and facility network

Legal Events

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