Static vehicle-mounted Ethernet switch message forwarding method, system and computer

文档序号:195697 发布日期:2021-11-02 浏览:44次 中文

阅读说明:本技术 静态车载以太网交换机报文转发方法、系统及计算机 (Static vehicle-mounted Ethernet switch message forwarding method, system and computer ) 是由 王博文 吴名芝 金宇韬 方子豪 李秋键 马逸飞 于 2021-09-08 设计创作,主要内容包括:本发明提供了一种静态车载以太网交换机报文转发方法、系统及计算机,该方法包括:构建网络拓扑模型,网络拓扑模型包括总网络,总网络包括若干网络节点,网络节点包括交换机;通过交换机通过识别车载以太网发出的报文中的VLAN ID信息,并为各个VLAN的数据流分别设置对应的转发规则;根据报文中的VLAN ID信息识别出对应的报文类型,并根据报文类型和转发规则向预设对应的报文目标端口静态转发报文数据。本申请提供的静态车载以太网交换机报文转发方法能够根据上述报文类型和上述转发规则向预设对应的报文目标端口静态转发报文数据,从而能够实现在车载以太网中快速、高效以及可靠的转发报文。(The invention provides a message forwarding method, a system and a computer for a static vehicle-mounted Ethernet switch, wherein the method comprises the following steps: constructing a network topology model, wherein the network topology model comprises a total network, the total network comprises a plurality of network nodes, and the network nodes comprise switches; identifying VLAN ID information in a message sent by a vehicle-mounted Ethernet through a switch, and respectively setting corresponding forwarding rules for data streams of all VLANs; and identifying the corresponding message type according to the VLAN ID information in the message, and statically forwarding the message data to a preset corresponding message target port according to the message type and the forwarding rule. The static vehicle-mounted Ethernet switch message forwarding method provided by the application can statically forward message data to a preset corresponding message target port according to the message type and the forwarding rule, so that the message can be quickly, efficiently and reliably forwarded in the vehicle-mounted Ethernet.)

1. A static vehicle-mounted Ethernet switch message forwarding method is characterized by comprising the following steps:

constructing a network topology model, wherein the network topology model comprises a total network, the total network comprises a plurality of network nodes, and the network nodes comprise switches;

identifying VLAN ID information in a message sent by a vehicle-mounted Ethernet through the switch, and respectively setting corresponding forwarding rules for data streams of all VLANs according to the VLAN ID information;

and identifying a corresponding message type according to VLAN ID information in the message, and statically forwarding message data to a preset corresponding message target port according to the message type and the forwarding rule.

2. The static vehicle-mounted Ethernet switch message forwarding method according to claim 1, wherein: the step of constructing the network topology model comprises the following steps:

respectively acquiring a star network, a ring network and a parallel sub-network;

and combining the star network, the ring network and the parallel sub-network into the network topology model according to a preset program.

3. The static vehicle-mounted Ethernet switch message forwarding method according to claim 1, wherein: the step of identifying VLAN ID information in a message sent by the vehicle-mounted Ethernet through the switch and respectively setting corresponding forwarding rules for data streams of all VLANs according to the VLAN ID information comprises the following steps:

receiving the message sent by the vehicle-mounted Ethernet in real time through the switch, wherein the message comprises an MAC address, a VLAN (virtual local area network) and length information, and the VLAN comprises the VLAN ID information and the data stream;

and identifying VLAN ID information corresponding to the VLAN in each message, and setting a corresponding forwarding rule according to the VLAN ID information and a preset program so as to forward the data stream of the VLAN according to the forwarding rule.

4. The static vehicle-mounted Ethernet switch message forwarding method according to claim 1, wherein: the steps of identifying the corresponding message type according to the VLAN ID information in the message and statically forwarding the message data to a preset corresponding message target port according to the message type and the forwarding rule comprise:

identifying a corresponding message type according to the received VLAN ID information, wherein the message type comprises a control message, a video message, an audio message and a synchronous message;

presetting a plurality of message target ports in the switch, and enabling each message target port to correspond to each message type one by one;

and statically forwarding the message data to the corresponding message target port according to the message type and the forwarding rule.

5. The static vehicle-mounted Ethernet switch message forwarding method according to claim 1, wherein: after the steps of identifying the corresponding message type according to the VLAN ID information in the message and statically forwarding the message data to the preset corresponding message target port according to the message type and the forwarding rule, the method comprises the following steps:

assigning all of the network nodes in the overall network to the same VLAN;

combining a plurality of sub-networks into the overall network through MAC address self-learning, and introducing MSTP into the overall network.

6. A static vehicle-mounted Ethernet switch message forwarding system is characterized by comprising:

the system comprises a construction module, a data processing module and a data processing module, wherein the construction module is used for constructing a network topology model, the network topology model comprises a total network, the total network comprises a plurality of network nodes, and the network nodes comprise switches;

the processing module is used for identifying VLAN ID information in a message sent by the vehicle-mounted Ethernet through the switch and respectively setting corresponding forwarding rules for data streams of all VLANs according to the VLAN ID information;

and the forwarding module is used for identifying the corresponding message type according to the VLAN ID information in the message and statically forwarding the message data to a preset corresponding message target port according to the message type and the forwarding rule.

7. The static vehicular ethernet switch message forwarding system of claim 6, wherein: the building module is specifically configured to:

respectively acquiring a star network, a ring network and a parallel sub-network;

and combining the star network, the ring network and the parallel sub-network into the network topology model according to a preset program.

8. The static vehicular ethernet switch message forwarding system of claim 6, wherein: the processing module is specifically configured to:

receiving the message sent by the vehicle-mounted Ethernet in real time through the switch, wherein the message comprises an MAC address, a VLAN (virtual local area network) and length information, and the VLAN comprises the VLAN ID information and the data stream;

and identifying VLAN ID information corresponding to the VLAN in each message, and setting a corresponding forwarding rule according to the VLAN ID information and a preset program so as to forward the data stream of the VLAN according to the forwarding rule.

9. The static vehicular ethernet switch message forwarding system of claim 6, wherein: the forwarding module is specifically configured to:

identifying a corresponding message type according to the received VLAN ID information, wherein the message type comprises a control message, a video message, an audio message and a synchronous message;

presetting a plurality of message target ports in the switch, and enabling each message target port to correspond to each message type one by one;

and statically forwarding the message data to the corresponding message target port according to the message type and the forwarding rule.

10. A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the static vehicular ethernet switch message forwarding method according to any of claims 1 to 5 when executing the computer program.

Technical Field

The invention relates to the technical field of data processing, in particular to a message forwarding method, a message forwarding system and a computer for a static vehicle-mounted Ethernet switch.

Background

With the rapid development of the electronics, intelligence and networking of automobiles, the size and complexity of electronic systems in automobiles are increasing day by day. The technology of the vehicle-mounted Ethernet is expected to become a backbone network of a future intelligent automobile. And with the introduction of a seamless redundancy technology in the TSN, the vehicle-mounted Ethernet has stronger fault-tolerant capability for network faults.

However, a redundant link in an existing in-vehicle electronic system may cause a loop to occur in a two-layer network therein, and in a process of sending a message by using a conventional forwarding mechanism, problems such as a broadcast storm easily occur, thereby causing network operation failure. In the prior art, although a new forwarding method is introduced into a seamless redundancy protocol in a TSN, the forwarding problem caused by a redundant link in a network can be eliminated, but hardware support of a switch is required, and meanwhile, the phenomenon of unstable network traffic can also be caused, so that the method cannot be applied to the existing vehicle-mounted network.

Therefore, how to forward the message in the vehicle-mounted ethernet quickly, efficiently and reliably becomes a big problem.

Disclosure of Invention

Based on this, the invention aims to provide a static vehicle-mounted Ethernet switch message forwarding method, a static vehicle-mounted Ethernet switch message forwarding system and a static vehicle-mounted Ethernet switch message forwarding computer, so as to realize rapid, efficient and reliable message forwarding in a vehicle-mounted Ethernet.

In a first aspect, an embodiment of the present invention provides a static vehicle-mounted ethernet switch packet forwarding method, where the method includes:

constructing a network topology model, wherein the network topology model comprises a total network, the total network comprises a plurality of network nodes, and the network nodes comprise switches;

identifying VLAN ID information in a message sent by a vehicle-mounted Ethernet through the switch, and respectively setting corresponding forwarding rules for data streams of all VLANs according to the VLAN ID information;

and identifying a corresponding message type according to VLAN ID information in the message, and statically forwarding message data to a preset corresponding message target port according to the message type and the forwarding rule.

The invention has the beneficial effects that: through constructing a network topology model, interaction among information can be realized, VLAN ID information in a message sent by the vehicle-mounted Ethernet is further identified, corresponding forwarding rules are respectively set for data streams of all VLANs, so that forwarding rules matched with the data streams of all VLANs can be made, finally, corresponding message types are identified according to the VLAN ID information in the message sent by the vehicle-mounted Ethernet, and the message data are statically forwarded to preset corresponding message target ports according to the message types and the forwarding rules, so that the message data can be directly sent to the message target ports, and the message can be quickly, efficiently and reliably forwarded in the vehicle-mounted Ethernet.

In an embodiment of the present application, the step of constructing a network topology model includes:

respectively acquiring a star network, a ring network and a parallel sub-network;

and combining the star network, the ring network and the parallel sub-network into the network topology model according to a preset program.

In an embodiment of the present application, the step of identifying, by the switch, VLAN ID information in a packet sent by a vehicle-mounted ethernet, and setting a corresponding forwarding rule for each VLAN data stream according to the VLAN ID information includes:

receiving the message sent by the vehicle-mounted Ethernet in real time through the switch, wherein the message comprises an MAC address, a VLAN (virtual local area network) and length information, and the VLAN comprises the VLAN ID information and the data stream;

and identifying VLAN ID information corresponding to the VLAN in each message, and setting a corresponding forwarding rule according to the VLAN ID information and a preset program so as to forward the data stream of the VLAN according to the forwarding rule.

In an embodiment of the present application, the step of identifying a corresponding packet type according to VLAN ID information in the packet, and statically forwarding packet data to a preset corresponding packet destination port according to the packet type and the forwarding rule includes:

identifying a corresponding message type according to the received VLAN ID information, wherein the message type comprises a control message, a video message, an audio message and a synchronous message;

presetting a plurality of message target ports in the switch, and enabling each message target port to correspond to each message type one by one;

and statically forwarding the message data to the corresponding message target port according to the message type and the forwarding rule.

In an embodiment of the present application, after the step of identifying a corresponding packet type according to VLAN ID information in the packet, and statically forwarding packet data to a preset corresponding packet destination port according to the packet type and the forwarding rule, the method includes:

assigning all of the network nodes in the overall network to the same VLAN;

combining a plurality of sub-networks into the overall network through MAC address self-learning, and introducing MSTP into the overall network.

In a second aspect, an embodiment of the present application provides a static vehicle-mounted ethernet switch packet forwarding system, where the system includes:

the system comprises a construction module, a data processing module and a data processing module, wherein the construction module is used for constructing a network topology model, the network topology model comprises a total network, the total network comprises a plurality of network nodes, and the network nodes comprise switches;

the processing module is used for identifying VLAN ID information in a message sent by the vehicle-mounted Ethernet through the switch and respectively setting corresponding forwarding rules for data streams of all VLANs according to the VLAN ID information;

and the forwarding module is used for identifying the corresponding message type according to the VLAN ID information in the message and statically forwarding the message data to a preset corresponding message target port according to the message type and the forwarding rule.

The building module in the static vehicle-mounted ethernet switch message forwarding system is specifically configured to:

respectively acquiring a star network, a ring network and a parallel sub-network;

and combining the star network, the ring network and the parallel sub-network into the network topology model according to a preset program.

The processing module in the static vehicle-mounted ethernet switch message forwarding system is specifically configured to:

receiving the message sent by the vehicle-mounted Ethernet in real time through the switch, wherein the message comprises an MAC address, a VLAN (virtual local area network) and length information, and the VLAN comprises the VLAN ID information and the data stream;

and identifying VLAN ID information corresponding to the VLAN in each message, and setting a corresponding forwarding rule according to the VLAN ID information and a preset program so as to forward the data stream of the VLAN according to the forwarding rule.

The forwarding module in the static vehicle-mounted ethernet switch message forwarding system is specifically configured to:

identifying a corresponding message type according to the received VLAN ID information, wherein the message type comprises a control message, a video message, an audio message and a synchronous message;

presetting a plurality of message target ports in the switch, and enabling each message target port to correspond to each message type one by one;

and statically forwarding the message data to the corresponding message target port according to the message type and the forwarding rule.

The static vehicle-mounted ethernet switch message forwarding system further includes an execution module, where the execution module is specifically configured to:

assigning all of the network nodes in the overall network to the same VLAN;

combining a plurality of sub-networks into the overall network through MAC address self-learning, and introducing MSTP into the overall network.

In a third aspect, an embodiment of the present application provides a computer, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the static vehicular ethernet switch message forwarding method as described above when executing the computer program.

Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.

Drawings

Fig. 1 is a flowchart of a static vehicle ethernet switch message forwarding method according to a first embodiment of the present invention;

fig. 2 is a flowchart of a static vehicle ethernet switch message forwarding method according to a second embodiment of the present invention;

fig. 3 is a schematic structural diagram of a network topology model in a static vehicle-mounted ethernet switch message forwarding method according to a second embodiment of the present invention;

fig. 4 is a schematic diagram of static forwarding message data in a static vehicle-mounted ethernet switch message forwarding method according to a second embodiment of the present invention;

fig. 5 is a schematic structural diagram of a message in a static vehicle-mounted ethernet switch message forwarding method according to a second embodiment of the present invention;

fig. 6 is a block diagram of a static vehicular ethernet switch message forwarding system according to a third embodiment of the present invention.

The following detailed description will further illustrate the invention in conjunction with the above-described figures.

Detailed Description

To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.

Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

The redundant link in the existing in-vehicle electronic system can cause a loop to appear in the two-layer network in the existing in-vehicle electronic system, and in the process of sending messages by adopting the traditional forwarding mechanism, problems such as broadcast storm and the like easily occur, so that the network work is invalid. In the prior art, although a new forwarding method is introduced into a seamless redundancy protocol in a TSN, the forwarding problem caused by a redundant link in a network can be eliminated, but hardware support of a switch is required, and meanwhile, the phenomenon of unstable network traffic can also be caused, so that the method cannot be applied to the existing vehicle-mounted network.

Referring to fig. 1, a static vehicle-mounted ethernet switch message forwarding method according to a first embodiment of the present invention is shown, and the static vehicle-mounted ethernet switch message forwarding method is mainly applied to a vehicle-mounted ethernet in an automatic driving field, so as to realize fast, efficient and reliable message forwarding in the vehicle-mounted ethernet.

Specifically, the method comprises the following steps: the message forwarding method of the static vehicle-mounted Ethernet switch specifically comprises the following steps:

step S10, constructing a network topology model, wherein the network topology model comprises a total network, the total network comprises a plurality of network nodes, and the network nodes comprise switches;

in this embodiment, a network topology model related to the vehicle-mounted ethernet network is first constructed to implement information interaction in the network topology model based on the vehicle-mounted ethernet network. Specifically, the network topology model comprises a general network, the general network comprises a plurality of network nodes, the network nodes comprise switches, and when the network topology model is used, each network node can realize the identification and interaction of information through the switch inside the network node.

Step S20, identifying VLAN ID information in the message sent by the vehicle-mounted Ethernet through the switch, and respectively setting corresponding forwarding rules for the data streams of each VLAN (virtual local area network) according to the VLAN ID information;

further, in this embodiment, when the device is used, a user may send a message in real time through the vehicle-mounted ethernet, and correspondingly, the switch in the network topology model may identify the message transmitted to the network topology model, and perform parsing to obtain the VLAN ID information in the message.

Therefore, in this embodiment, the switch recognizes VLAN ID information in each message, and sets corresponding forwarding rules for data streams of each VLAN (virtual local area network) according to the VLAN ID information, where the setting of the corresponding forwarding rules by the switch is automatically completed through a preset program inside the switch.

Step S30, identifying the corresponding message type according to the VLAN ID information in the message, and statically forwarding the message data to the preset corresponding message target port according to the message type and the forwarding rule.

Furthermore, finally, the switch identifies the corresponding message type according to the VLAN ID information in the message received in real time, that is, the content and the action of each message are identified, and the message data is statically forwarded to the preset corresponding message target port according to the message type of each message and the preset forwarding rule, so that the message can be quickly, efficiently and reliably forwarded in the vehicle-mounted ethernet.

When the method is used, a network topology model is built, so that interaction among information can be realized, VLAN ID information in a message sent by the vehicle-mounted Ethernet is further identified, corresponding forwarding rules are respectively set for data streams of all VLANs, so that the forwarding rules matched with the data streams of all VLANs can be made, finally, corresponding message types are identified according to the VLAN ID information in the message sent by the vehicle-mounted Ethernet, and the message data are statically forwarded to preset corresponding message target ports according to the message types and the forwarding rules, so that the message data can be directly sent to the message target ports, and the message can be quickly, efficiently and reliably forwarded in the vehicle-mounted Ethernet.

It should be noted that the implementation process described above is only for illustrating the applicability of the present application, but this does not represent that the static ethernet switch message forwarding method of the present application has only the above-mentioned implementation flow, and on the contrary, the static ethernet switch message forwarding method of the present application can be incorporated into a feasible implementation scheme of the present application as long as the static ethernet switch message forwarding method of the present application can be implemented.

In summary, the static vehicle-mounted ethernet switch message forwarding method in the above embodiments of the present invention can statically forward the message data to the preset corresponding message target port according to the identified message type and the set forwarding rule, so that the message data can be directly sent to the message target port, and thus, the message can be quickly, efficiently and reliably forwarded in the vehicle-mounted ethernet.

Referring to fig. 2, a static vehicle ethernet switch message forwarding method according to a second embodiment of the present invention is shown, which specifically includes the following steps:

step S11, a star network, a ring network and a parallel sub-network are respectively obtained; and combining the star network, the ring network and the parallel sub-network into the network topology model according to a preset program.

In this embodiment, it should be noted that the network topology model provided in this embodiment is a hybrid network, specifically, as shown in fig. 3, for convenience of implementation, a star network, a ring network, and a parallel sub-network are first obtained, where in fig. 3, it is to be noted that the left part in the figure is a sub-network with high reliability and high performance requirements, and a parallel network is adopted; the middle part of the graph has certain requirements on reliability but has lower performance requirements, and a ring network is adopted; the upper right side in the figure is a star network, and the star network can be applied to occasions without redundancy requirements such as information entertainment and the like.

Step S21, the message sent by the vehicle-mounted Ethernet is received in real time through the switch, the message comprises an MAC address, a VLAN and length information, and the VLAN comprises the VLAN ID information and the data stream; and identifying VLAN ID information corresponding to the VLAN in each message, and setting a corresponding forwarding rule according to the VLAN ID information and a preset program so as to forward the data stream of the VLAN according to the forwarding rule.

In this embodiment, when in use, a user may send a message through the vehicle-mounted ethernet in real time, so that the present embodiment may receive the message sent by the vehicle-mounted ethernet through the switch in the network topology model in real time, where, as shown in fig. 5, each message includes an MAC address, a VLAN, and length information, and further, each VLAN includes VLAN ID information and a data stream corresponding to the VLAN ID information.

Therefore, when the switch receives the message sent by the vehicle-mounted ethernet in real time, the switch can identify the MAC address and the VLAN in each message, and further identify the VLAN ID information inside the VLAN and the data stream to be transmitted, and on the basis, set a corresponding forwarding rule according to the identified VLAN ID information and a preset program, so that the data stream of the VLAN can be forwarded according to the forwarding rule.

Specifically, it is assumed that the network includes a control packet (VLAN ID 7), a video packet (VLAN ID 6), an audio packet (VLAN ID 5), and a synchronization packet (VLAN ID 0). In the using process, if the VLAN ID of the packet identified by the switch is 0, it indicates that the switch receives the synchronization packet, and therefore, the data stream in the packet is further forwarded according to the preset forwarding rule of the synchronization packet.

Step S31, identifying the corresponding message type according to the received VLAN ID information, wherein the message type comprises a control message, a video message, an audio message and a synchronous message; presetting a plurality of message target ports in the switch, and enabling each message target port to correspond to each message type one by one; and statically forwarding the message data to the corresponding message target port according to the message type and the forwarding rule.

Specifically, in this embodiment, it should be noted that each VLAN disclosed in this embodiment includes VLAN ID information and a data stream corresponding to the VLAN ID information. Therefore, when the switch receives each VLAN, the VLAN ID information and the data stream in each VLAN are identified, and the corresponding packet type is immediately identified according to the obtained VLAN ID information. In this embodiment, the message types include a control message, a video message, an audio message, and a sync message.

Meanwhile, in this embodiment, a plurality of message destination ports are preset in the switch, and a one-to-one corresponding connection relationship is established between each message destination port and each message type.

More specifically, it is assumed that the network includes a control packet (VLAN ID 7), a video packet (VLAN ID 6), an audio packet (VLAN ID 5), and a synchronization packet (VLAN ID 0). When the switch identifies the video message of VLAN ID 6 sent by the camera node, the switch can forward the message to a port connected with the video playing node; when the exchanger identifies the audio message of VLAN ID 5 sent by the upper computer, the exchanger can forward the message to the port connected with the audio playing node; when the switch identifies a control message of VLAN ID 7 sent by the master control node, the target MAC address of the message is read, and the message is forwarded to a connection port of a node corresponding to the target MAC address; when the switch identifies the synchronous message of VLAN ID 0 sent by the master clock node, the synchronous message is a broadcast message, so that the synchronous message is forwarded to all ports, and the message can be quickly, efficiently and reliably forwarded in the vehicle-mounted Ethernet.

In this embodiment, the static vehicle-mounted ethernet switch packet forwarding method further includes:

step S41, all the network nodes in the total network are assigned to the same VLAN; combining a plurality of sub-networks into the overall network through MAC address self-learning, and introducing MSTP into the overall network.

In this embodiment, in order to implement an entire network transmission method based on MSTP (multi-service delivery platform), all network nodes in the main network are assigned to the same VLAN, a plurality of sub-networks are combined into the main network through MAC address self-learning, and finally the MSTP (multi-service delivery platform) is introduced into the main network and the link is added to the main network.

In addition, in this embodiment, it can also be determined that the switch can only receive a message with a source MAC address as an MCU address from a P0 port by using the uniqueness of the source MAC address, and when the broadcast message sent from P1/P2 returns to P2/P1 through the ring link, the switch determines that the message does not need to be forwarded and discarded, thereby solving the problem of a ring network broadcast storm;

different ports can be classified into different VLANs, broadcast messages can be transmitted only in the same VLAN, meanwhile, a network topology model is divided into 3 star networks and a ring network, the star and ring local networks can transmit the broadcast messages, and the messages cannot be transmitted to other VLAN subnets, so that the message broadcasting capacity in the subnets is realized;

for a node containing a switch which does not support message replication, when the node needs to send a plurality of VLAN messages simultaneously, original messages are replicated through preset software, partial numbers of the VLANs are modified correspondingly and then sent respectively, and the parallel type subnet and the ring type subnet can realize the transmission of redundant data under the condition of point-to-point broadcasting.

It should be noted that, the method provided by the second embodiment of the present invention, which implements the same principle and produces some technical effects as the first embodiment, can refer to the corresponding contents in the first embodiment for the sake of brief description, where this embodiment is not mentioned.

In summary, the static vehicle-mounted ethernet switch message forwarding method in the above embodiments of the present invention can statically forward the message data to the preset corresponding message target port according to the identified message type and the set forwarding rule, so that the message data can be directly sent to the message target port, and thus, the message can be quickly, efficiently and reliably forwarded in the vehicle-mounted ethernet.

Referring to fig. 6, a static vehicle ethernet switch message forwarding system according to a third embodiment of the present invention is shown, and the system specifically includes:

a building module 12, configured to build a network topology model, where the network topology model includes a general network, the general network includes a plurality of network nodes, and the network nodes include switches;

the processing module 22 is configured to identify, through the switch, VLAN ID information in a message sent by the vehicle-mounted ethernet, and set a corresponding forwarding rule for each VLAN data stream according to the VLAN ID information;

and the forwarding module 32 is configured to identify a corresponding packet type according to the VLAN ID information in the packet, and statically forward packet data to a preset corresponding packet target port according to the packet type and the forwarding rule.

The building module 12 in the static vehicle-mounted ethernet switch message forwarding system is specifically configured to:

respectively acquiring a star network, a ring network and a parallel sub-network;

and combining the star network, the ring network and the parallel sub-network into the network topology model according to a preset program.

The processing module 22 in the static vehicle-mounted ethernet switch packet forwarding system is specifically configured to:

receiving the message sent by the vehicle-mounted Ethernet in real time through the switch, wherein the message comprises an MAC address, a VLAN (virtual local area network) and length information, and the VLAN comprises the VLAN ID information and the data stream;

and identifying VLAN ID information corresponding to the VLAN in each message, and setting a corresponding forwarding rule according to the VLAN ID information and a preset program so as to forward the data stream of the VLAN according to the forwarding rule.

The forwarding module 32 in the static vehicle-mounted ethernet switch message forwarding system is specifically configured to:

identifying a corresponding message type according to the received VLAN ID information, wherein the message type comprises a control message, a video message, an audio message and a synchronous message;

presetting a plurality of message target ports in the switch, and enabling each message target port to correspond to each message type one by one;

and statically forwarding the message data to the corresponding message target port according to the message type and the forwarding rule.

The static vehicle-mounted ethernet switch message forwarding system further includes an execution module 42, where the execution module 42 is specifically configured to:

assigning all of the network nodes in the overall network to the same VLAN;

combining a plurality of sub-networks into the overall network through MAC address self-learning, and introducing MSTP into the overall network.

A fourth embodiment of the present invention provides a computer, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the static vehicular ethernet switch message forwarding method according to the first embodiment or the second embodiment is implemented by the processor.

To sum up, in the foregoing embodiment of the invention, the static vehicle-mounted ethernet switch packet forwarding method, system and computer construct a network topology model, so as to implement interaction between information, further identify VLAN ID information in a packet sent by a vehicle-mounted ethernet, and set a corresponding forwarding rule for each VLAN data stream, so as to make a forwarding rule matching with each VLAN data stream, and finally identify a corresponding packet type according to the VLAN ID information in the packet sent by the vehicle-mounted ethernet, and statically forward packet data to a preset corresponding packet destination port according to the packet type and the forwarding rule, so as to directly send the packet data to the packet destination port, thereby implementing fast, efficient and reliable packet forwarding in the vehicle-mounted ethernet.

The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.

More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.

It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:转发报文的方法及相关设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!