CN115499270B - Network control method and device, vehicle and computer readable storage medium - Google Patents

Network control method and device, vehicle and computer readable storage medium Download PDF

Info

Publication number
CN115499270B
CN115499270B CN202211021820.XA CN202211021820A CN115499270B CN 115499270 B CN115499270 B CN 115499270B CN 202211021820 A CN202211021820 A CN 202211021820A CN 115499270 B CN115499270 B CN 115499270B
Authority
CN
China
Prior art keywords
ethernet ring
protocol
switch
preset
ethernet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211021820.XA
Other languages
Chinese (zh)
Other versions
CN115499270A (en
Inventor
侯亚飞
韩三楚
何文
黄杰
陈德芮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202211021820.XA priority Critical patent/CN115499270B/en
Publication of CN115499270A publication Critical patent/CN115499270A/en
Application granted granted Critical
Publication of CN115499270B publication Critical patent/CN115499270B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • 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 Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application discloses a network control method, a network control device, a vehicle and a nonvolatile computer readable storage medium. The network control method comprises the following steps: detecting a protocol supported by a switch in the Ethernet ring network; determining a target protocol of each Ethernet ring according to protocols supported by all switches in each Ethernet ring; and switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring. In the network control method, the network control device, the vehicle and the nonvolatile computer readable storage medium of the embodiment of the application, for the multi-ring Ethernet, in the data transmission process, each Ethernet ring in the multi-ring Ethernet can use the same protocol or different protocols, thereby meeting the requirement that the Ethernet ring can be compatible with switches of different protocols.

Description

Network control method and device, vehicle and computer readable storage medium
Technical Field
The present application relates to the field of intelligent networking automobile software technology, and more particularly, to a network control method, a network control device, a vehicle, and a non-volatile computer readable storage medium.
Background
Along with the rapid transformation of the automobile industry, the automobile needs are changed from the traditional 'leather and solid and durable' to the 'intelligent, electric and networking' needs to be met, namely, the function needs of the whole automobile are more and more, and the functions of the whole automobile are more and more complicated. Currently, in order to solve the problems of large data communication bandwidth and network load, an ethernet with a rate of 100M or 1000M is mostly adopted for data and information interaction. However, in the whole-vehicle multi-ring Ethernet, the Ethernet switches with different types support non-uniform link redundancy protocols, and the problem of platform compatibility exists.
Disclosure of Invention
The embodiment of the application provides a network control method, a network control device, a vehicle and a nonvolatile computer readable storage medium.
The network control method of the embodiment of the application comprises the steps of detecting a protocol supported by a switch in an Ethernet ring; determining a target protocol of each Ethernet ring according to protocols supported by all switches of each Ethernet ring; and switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring.
The network control device of the embodiment of the application comprises a first detection module, a first determination module and a switching module. The detection module is used for detecting a protocol supported by a switch in the Ethernet ring. The determining module is used for determining the target protocol of each Ethernet ring network according to the protocols supported by all the switches of each Ethernet ring network. The switching module is used for switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring.
The vehicle of an embodiment of the application includes a processor. The processor is used for detecting a protocol supported by a switch in the Ethernet ring; determining a target protocol of each Ethernet ring according to protocols supported by all switches of each Ethernet ring; and switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring.
The non-transitory computer-readable storage medium of the embodiment of the present application contains a computer program that, when executed by one or more processors, causes the processors to perform a network control method of: detecting a protocol supported by a switch in the Ethernet ring network; determining a target protocol of each Ethernet ring according to protocols supported by all switches of each Ethernet ring; and switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring.
In the network control method, the network control device, the vehicle and the nonvolatile computer readable storage medium of the embodiment of the application, after detecting the protocol supported by the switch in the Ethernet ring, the target protocol of each Ethernet ring can be determined according to the protocol supported by all the switches in each Ethernet ring, so that the protocol of the switch of each Ethernet ring is switched according to the target protocol of each Ethernet ring. Thus, for the multi-ring Ethernet, in the data transmission process, each Ethernet ring in the multi-ring Ethernet can use the same protocol or different protocols, so that the Ethernet ring can be compatible with switches of different protocols.
Additional aspects and advantages of embodiments of the application 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 embodiments of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 2 is a schematic plan view of a network control device according to some embodiments of the present application;
FIG. 3 is a schematic plan view of a vehicle according to certain embodiments of the application;
FIG. 4 is a schematic diagram of a scenario of a network control method of certain embodiments of the present application;
FIG. 5 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 6 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 7 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 8 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 9 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 10 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 11 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 12 is a schematic diagram of a scenario of a network control method of certain embodiments of the present application;
FIG. 13 is a flow chart of a network control method according to some embodiments of the present application;
FIG. 14 is a schematic diagram of a connection state of a non-transitory computer readable storage medium and a processor according to some embodiments of the application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the embodiments of the present application and are not to be construed as limiting the embodiments of the present application.
Referring to fig. 1, an embodiment of the present application provides a network control method. The network control method comprises the following steps:
01: detecting a protocol supported by a switch in the Ethernet ring network;
02: determining a target protocol of each Ethernet ring according to protocols supported by all switches in each Ethernet ring; and
03: The protocol of the switch of each Ethernet ring is switched according to the target protocol of each Ethernet ring.
Referring to fig. 2, an embodiment of the present application provides a network control device 10. The network control device 10 comprises a first detection module 11, a first determination module 12 and a switching module 13. The network control method of the embodiment of the present application is applicable to the network control apparatus 10. The first detection module 11, the first determination module 12 and the switching module 13 are used for executing the steps 01, 02 and 03 respectively. That is, the first detection module 11 is configured to detect a protocol supported by a switch in the ethernet ring. The first determining module 12 is configured to detect a protocol supported by a switch in the ethernet ring; determining a target protocol of each Ethernet ring according to protocols supported by all switches in each Ethernet ring; and switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring.
Referring to fig. 3, an embodiment of the present application provides a vehicle 100. The network control method of the embodiment of the application is applicable to the vehicle 100. The vehicle 100 includes a processor 30. The processor 30 is configured to perform steps 01, 02 and 03. That is, the processor 30 is configured to detect a protocol supported by a switch in the ethernet ring; determining a target protocol of each Ethernet ring according to protocols supported by all switches in each Ethernet ring; and switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring.
Specifically, processor 30 may first detect the protocol supported by the switches in the Ethernet ring. The Ethernet ring network may include a plurality of switches, and protocols supported by each switch in the plurality of switches may be consistent or inconsistent.
For example, the switch support protocol may be a Time sensitive network (Time-SENSITIVE NETWORK, TSN) protocol, such as the TSN-CB protocol, and the switch support protocol may also be an ethernet multi-ring protection (ETHERNET RING Protection Switching, ERPS) protocol. Among the plurality of switches, one part may support the TSN-CB protocol and the other part may support the ERPS protocol. Processor 30 may detect to obtain the protocols supported by each switch in the ethernet ring.
In addition, the ethernet ring may be composed of a plurality of sub-rings, i.e. the ethernet ring is composed of a plurality of sub-ethernet rings. And each sub-ethernet ring is also an ethernet ring.
For example, referring to fig. 4, ethernet ring ABC is composed of sub ethernet ring a, sub ethernet ring B and sub ethernet ring C, and ethernet ring ABC includes switch 1, switch 2, switch 3, switch 4 and switch 5. The sub Ethernet ring A comprises a switch 1, a switch 2 and a switch 3, the sub Ethernet ring B comprises a switch 1, a switch 3 and a switch 4, and the sub Ethernet ring C comprises a switch 1, a switch 4 and a switch 5.
When the processor 30 detects the protocol supported by the switch 1 to the switch 5 in the ethernet ring ABC, the protocol supported by the switch 1 to the switch 5 may be obtained by detecting the protocols supported by the switches in the sub ethernet ring a, the sub ethernet ring B and the sub ethernet ring C.
Next, processor 30 may determine the target protocol for each ethernet ring based on the protocols supported by all switches in each ethernet ring. It will be appreciated that each ethernet ring, namely sub-ethernet ring a, ethernet ring B and ethernet ring C in ethernet ring ABC described above. The target protocol is a protocol supported by each switch in the Ethernet ring network when each Ethernet ring network can ensure normal data transmission.
With continued reference to fig. 4, when the processor 30 detects a protocol supported by a switch in the ethernet ring ABC, then all the protocols supported by the switches in each sub-ethernet ring may be detected.
Taking the sub ethernet ring a as an example for illustration, after the processor 30 obtains the protocols supported by the switch 1, the switch 2 and the switch 3 in the sub ethernet ring a, the processor 30 can determine the target protocol of the sub ethernet ring a. It should be noted that when the switch supports the TSN-CB protocol, the switch supports the ERPS protocol at the same time, and when the switch supports the ERPS protocol, the switch does not necessarily support the TSN-CB protocol.
Therefore, after the processor 30 determines the protocols supported by the switches 1,2 and 3 in the sub-ethernet ring a, to ensure that the data can be normally transmitted in the sub-ethernet ring a, when any one of the switches 1,2 and 3 does not support the TSN-CB protocol, that is, only the ERPS protocol is supported, the processor 30 determines that the target protocol is the ERPS protocol. And when the TSN-CB protocol is supported at each of switch 1, switch 2 and switch 3, processor 30 may determine that the target protocol may be the ERPS protocol or the TSN-CB protocol.
Finally, the processor 30 may switch the protocol of the switch of each ethernet ring according to the target protocol of each ethernet ring. For example, if the target protocol of the sub ethernet ring a is the ERPS protocol, the protocols of the switch 1, the switch 2 and the switch 3 are the ERPS protocols. For another example, if the target protocol of the sub ethernet ring B is the TSN-CB protocol, the protocols of the switch 1, the switch 3 and the switch 4 are TSN-CB protocols. Also for example, if the target protocol of the sub ethernet ring C is the ERPS protocol or the TSN-CB protocol, the protocols of the switch 1, the switch 4 and the switch 5 are the TSN-CB protocol or the EPRS protocol.
In the network control method, the network control device 10 and the vehicle 100 according to the embodiments of the present application, after detecting the protocol supported by the switch in the ethernet ring, the target protocol of each ethernet ring may be determined according to the protocols supported by all the switches in each ethernet ring, so as to switch the protocol of the switch in each ethernet ring according to the target protocol of each ethernet ring. Thus, for the multi-ring Ethernet, in the data transmission process, each Ethernet ring in the multi-ring Ethernet can use the same protocol or different protocols, so that the Ethernet ring can be compatible with switches of different protocols.
Referring to fig. 2,3 and 5, in some embodiments, step 01: detecting a protocol supported by a switch in an ethernet ring, comprising the steps of:
011: initializing an Ethernet ring network to initialize a controller and a switch in the Ethernet ring network;
012: sending a detection signal to each switch in the Ethernet ring network through the target controller so as to acquire a feedback signal of the switch; and
013: The protocol supported by each switch is determined based on the feedback signals.
In some embodiments, the first detection module 11 is configured to perform steps 011, 012, and 013. That is, the first detection module 11 is configured to initialize the ethernet ring to initialize the controller and the switch in the ethernet ring. Sending a detection signal to each switch in the Ethernet ring network through the target controller so as to acquire a feedback signal of the switch; and determining the protocol supported by each switch according to the feedback signals.
In certain embodiments, processor 30 is configured to perform steps 011, 012, and 013. That is, the processor 30 initializes the ethernet ring to initialize the controller and the switch in the ethernet ring; sending a detection signal to each switch in the Ethernet ring network through the target controller so as to acquire a feedback signal of the switch; and determining the protocol supported by each switch according to the feedback signals.
Specifically, the ethernet ring is provided with a controller corresponding to each switch one by one, and when the processor 30 detects a protocol supported by the switches in the ethernet ring, the processor 30 may initialize the ethernet ring first to initialize the controllers and the switches in the ethernet ring.
When initializing the controller and the switch, the controller and the switch may send their own initialization status to the processor 30, and the processor 30 may determine whether the controller and the switch are initialized. If the controller and the switch are not initialized, the processor 30 determines that the controller and the switch are damaged.
When the controller and the switches are initialized, the processor 30 may send a detection signal to each switch in the ethernet ring through the target controller to obtain a feedback signal of the switch. The target controllers are the controllers with the largest number of connection controllers in the Ethernet ring. The feedback signal may indicate a protocol supported by the switch.
For example, referring to fig. 4, it can be seen that, in the ethernet ring network ABC, the controller 1 corresponding to the switch 1 is connected to the controller 2, the controller 3, the controller 4 and the controller 5, that is, the number of connected controllers is the largest, that is, the controller 1 is the target controller.
Therefore, when the processor 30 sends the detection signal through the target controller, the search signal can be sent to each controller in the ethernet ring through the target controller, so as to obtain the feedback signal of the switch corresponding to each controller.
Finally, the processor 30 may determine the protocol supported by each switch based on the switch's feedback signals. For example, reference numeral 1 is given to TSN-CB protocol and reference numeral 2 is given to ERPS protocol. When the controller 1 sends a detection signal to the controller 2 to acquire that the feedback signal of the switch 2 corresponding to the controller 2 is 1, the protocol supported by the switch is determined to be TSN-CN protocol.
Referring to fig. 2, 3 and 6, in some embodiments, step 012: sending a detection signal to each switch in the ethernet ring network through the target controller to obtain a feedback signal of the switch, comprising the steps of:
0121: sending detection signals to a switch corresponding to the main controller and each sub-controller through the main controller so as to acquire feedback signals of the switch corresponding to the main controller; and
0122: And forwarding the detection signal to the switch in the Ethernet ring corresponding to each sub-controller through each sub-controller so as to acquire a feedback signal of the switch in each Ethernet ring.
In certain embodiments, the first detection module 11 is configured to perform steps 0121 and 0122. That is, the first detection module 11 is configured to send, by using the main controller, a detection signal to the switch corresponding to the main controller and each sub-controller, so as to obtain a feedback signal of the switch corresponding to the main controller; and forwarding the detection signal to the switch in the Ethernet ring corresponding to each sub-controller through each sub-controller so as to acquire a feedback signal of the switch in each Ethernet ring.
In certain embodiments, processor 30 is configured to perform steps 0121 and 0122. That is, the processor 30 is configured to send, by the main controller, a detection signal to the switch corresponding to the main controller and each sub-controller, so as to obtain a feedback signal of the switch corresponding to the main controller; and forwarding the detection signal to the switch in the Ethernet ring corresponding to each sub-controller through each sub-controller so as to acquire a feedback signal of the switch in each Ethernet ring.
Specifically, the target controller may include a main controller and a sub controller. The main controller is the controller with the largest number of connected controllers in all Ethernet rings. The sub-controllers are the controllers with the largest number of connection controllers in each Ethernet ring.
Taking fig. 4 as an example for illustration, all ethernet rings form ethernet ring ABC, and the master controller is controller 1. The Ethernet ring network ABC consists of a sub Ethernet ring network A, a sub Ethernet ring network B and a sub Ethernet ring network C.
Furthermore, the two sub-Ethernet ring networks can also form an Ethernet ring network. For example, the sub ethernet ring a and the sub ethernet ring B form an ethernet ring AB, and the sub ethernet ring B and the sub ethernet ring C form an ethernet ring BC.
Then, for the ethernet ring AB, the most connected controllers are the controller 3, except the main controller 1, i.e. the sub-controllers of the ethernet ring AB are the controllers 3.
For the sub-ethernet ring a, the controller 1 and the controller 3 are respectively a main controller of the ethernet ring ABC and a sub-controller of the ethernet ring AB, so that the controller 2 is a sub-controller of the sub-ethernet ring a.
When the processor 30 sends the detection signal to each switch in the ethernet ring through the target controller to obtain the feedback signal of the switch, the processor 30 may first send the detection signal to the switch corresponding to the main controller and each sub-controller through the main controller.
Thus, the processor 30 can first acquire the feedback signal of the switch corresponding to the master controller to determine the protocol supported by the switch corresponding to the master controller. For example, the processor 30 transmits a detection signal to the switch 1 through the controller 1 to acquire a feedback signal of the switch 1, thereby determining a protocol supported by the switch 1.
The processor 30 may further forward the detection signal to the switch in the ethernet ring corresponding to each sub-controller through each sub-controller, so as to obtain a feedback signal of the switch in each ethernet ring.
For example, the processor 30 sends the detection signal to the sub-controller (controller 3) of the ethernet ring AB through the main controller (controller 1), and the sub-controller may forward the detection signal to all switches (switch 1, switch 2, switch 3) in the ethernet ring AB, so as to obtain feedback signals of all switches in the ethernet ring AB. The feedback signals of all switches in the ethernet ring AB are forwarded to the main controller again through the sub-controllers, so as to be acquired by the processor 30.
Thus, when the processor 30 obtains feedback signals of all switches in the ethernet ring, the detection signals do not need to be sent to each switch in the ethernet ring one by one through the main controller, but are forwarded to the corresponding switch of each controller through the sub-controllers, so that when the number of switches is large, the time for the processor 30 to detect through the main controller is saved, the speed of switching the switch protocol is ensured, and the speed of data transmission is ensured.
Referring to fig. 2, 3 and 7, in some embodiments, step 02: according to the protocol supported by all switches of each Ethernet ring, determining the target protocol of each Ethernet ring, comprising the following steps:
021: under the condition that all protocols supported by switches of the Ethernet ring network are first preset protocols, determining that an Ethernet ring network target protocol is the first preset protocol or a second preset protocol; and
022: And under the condition that a second preset protocol exists in the protocols supported by all switches of the Ethernet ring, determining the target protocol of the Ethernet ring as the second preset protocol.
In certain embodiments, the first determination module 12 is configured to perform steps 021 and 022. The first determining module 12 is configured to determine that the ethernet network target protocol is a first preset protocol or a second preset protocol when all protocols supported by all switches of the ethernet network are first preset protocols; and under the condition that a second preset protocol exists in the protocols supported by all the switches of the Ethernet ring, determining the target protocol of the Ethernet ring as the second preset protocol.
In certain embodiments, processor 30 is configured to perform steps 021 and 022. That is, the processor 30 is configured to determine that the ethernet network target protocol is the first preset protocol or the second preset protocol when all the protocols supported by the switches of the ethernet network are the first preset protocol; and under the condition that a second preset protocol exists in the protocols supported by all the switches of the Ethernet ring, determining the target protocol of the Ethernet ring as the second preset protocol.
Specifically, after the processor 30 detects the protocols supported by all switches in the ethernet ring, the processor 30 may determine the target protocol of each ethernet ring according to the protocols supported by all switches in each ethernet ring.
More specifically, in the case that the processor 30 determines that all the protocols supported by the switches of the ethernet ring network are the first preset protocol, determining that the target protocol of the ethernet ring network is the first preset protocol or the second preset protocol; when the processor 30 determines that the second preset protocol exists in the protocols supported by all the switches in the ethernet network, the processor 30 may determine that the target protocol of the ethernet network is the second preset protocol. The first preset protocol is a TSN-CB protocol, and the second preset protocol is an EPRS protocol.
It will be appreciated that switches supporting the TSN-CB protocol also support the ERPS protocol, while switches supporting the ERPS protocol do not support the TSN-CB protocol.
Referring to fig. 4, using ethernet ring ABC as an example, processor 30 may determine the protocols supported by switch 1, switch 2, switch 3, switch 4, and switch 5. If the switches 1 to 5 all support the first preset protocol, that is, all support the TSN-CB protocol, the target protocol of the ethernet ring ABC is the TSN-CB protocol or the ERPS protocol.
If any one of the switches 1 to 5 supports the second preset protocol, that is, the ERPS protocol, then the target protocol of the ethernet ring ABC is the ERPS protocol.
In the ethernet ring a, after acquiring the protocols supported by the switch 1, the switch 2 and the switch 3, the processor 30 may determine the target protocol of the ethernet ring a by determining whether the switch 1, the switch 2 and the switch 3 all support the first preset protocol or whether any switch supports the second preset protocol.
Thus, the processor 30 can determine the target protocol of each ethernet ring based on the protocols supported by all switches in each ethernet ring.
Referring to fig. 2, 3 and 8, in some embodiments, step 02: according to the protocol supported by all switches of each Ethernet ring, determining the target protocol of each Ethernet ring, and further comprising the steps of:
023: under the condition that a second preset protocol exists in the protocols supported by the switches shared by the two adjacent Ethernet rings, determining the target protocols of the two adjacent Ethernet rings as the second preset protocol; and
024: And under the condition that the protocols supported by the switches shared by the two adjacent Ethernet rings are all first preset protocols, determining that the target protocols of the two adjacent Ethernet rings are the same or different.
In certain embodiments, the first determination module 12 is configured to perform steps 023 and 024. That is, the first determining module 12 is configured to determine that the target protocol of the two adjacent ethernet rings is the second preset protocol when the second preset protocol exists in the protocols supported by the switches shared by the two adjacent ethernet rings; and under the condition that the protocols supported by the switches shared by the two adjacent Ethernet rings are the first preset protocols, determining that the target protocols of the two adjacent Ethernet rings are the same or different.
In certain embodiments, processor 30 is configured to perform steps 023 and 024. That is, the processor 30 is configured to determine that the target protocol of the two adjacent ethernet rings is the second preset protocol when the second preset protocol exists in the protocols supported by the switches shared by the two adjacent ethernet rings; and under the condition that the protocols supported by the switches shared by the two adjacent Ethernet rings are the first preset protocols, determining that the target protocols of the two adjacent Ethernet rings are the same or different.
Specifically, when the processor 30 determines the target protocol of each ethernet ring, if the second preset protocol exists in the protocols supported by the switches shared by the two adjacent ethernet rings, the processor 30 may determine that the target protocol of the two adjacent ethernet rings is the second preset protocol.
For example, referring to fig. 4, switches shared by the ethernet ring a and the ethernet ring B are switch 1 and switch 3, and if there is a second preset protocol, that is, an ERPS protocol, in any one of the switches 1 and switch 3, then the target protocol of the ethernet ring a and the ethernet ring B is the ERPS protocol.
Furthermore, if the protocols supported by the switches shared by the two adjacent ethernet rings are the first preset protocol, that is, the TSN-CB protocol, the processor 30 may determine that the target protocols of the two adjacent ethernet rings may be the same or different.
For example, referring to fig. 4, switches shared by ethernet ring B and ethernet ring C are switch 1 and switch 4, and if both switch 1 and switch 4 support TSN-CB protocols, then the target protocols of ethernet ring B and ethernet ring C may be the same or different. The target protocols of the ethernet ring B and the ethernet ring C may be a first preset protocol or a second preset protocol; for another example, the target protocol of the ethernet ring B is a first preset protocol, the target protocol of the ethernet ring C is a second preset protocol, or the target protocol of the ethernet ring B is a second preset protocol, and the target protocol of the ethernet ring C is a first preset protocol.
In this way, in the ethernet ring network ABC, the target protocols of each ethernet ring network may be the same or different, that is, the ethernet ring network ABC can use the first preset protocol or the second preset protocol at the same time, so as to meet the requirement that the ethernet ring network can be compatible with switches of different protocols.
Referring to fig. 2, 3 and 9, after switching the protocol of the switch of the ethernet ring, the network control method according to the embodiment of the present application further includes the steps of:
04: detecting the protocol supported by the switch in each Ethernet ring after switching again;
05: determining a switching failure and re-entering a protocol for switching the switch of each Ethernet ring according to the target protocol of each Ethernet ring when the protocol supported by the switch of any Ethernet ring is not the target protocol corresponding to the Ethernet ring; and
06: And stopping protocol switching of the exchanger of each Ethernet ring network after the switching failure times reach the preset times.
In certain embodiments, the network control device 10 includes a second detection module 14, a second determination module 15, and a stop module 16. The second detection module 14 is used for executing step 04, the second determination module 15 is used for executing step 05, and the stop module 16 is used for executing step 06. That is, the second detection module 14 is configured to detect the protocol supported by the switch in each ethernet ring after the switching again. The second determining module 15 is configured to determine that the switching fails and reenters the step of switching the protocol of the switch of each ethernet ring according to the target protocol of each ethernet ring if there is a protocol supported by the switch of any ethernet ring that is not the target protocol corresponding to the ethernet ring. The stopping module 16 is configured to stop protocol switching of the switch of each ethernet ring after the number of switching failures reaches a preset number.
In certain embodiments, processor 30 is configured to perform step 05, step 06, and step 07. That is, the processor 30 is configured to detect again the protocol supported by the switch in each ethernet ring after the switching; determining a switching failure and re-entering a protocol for switching the switch of each Ethernet ring according to the target protocol of each Ethernet ring when the protocol supported by the switch of any Ethernet ring is not the target protocol corresponding to the Ethernet ring; and stopping protocol switching of the exchanger of each Ethernet ring network after the switching failure times reach the preset times.
Specifically, after the processor 30 switches the protocol of the switch of each ethernet ring according to the target protocol of each ethernet ring, to ensure that the protocol of the switch is switched successfully, the processor 30 needs to detect the protocol supported by the switch of each ethernet ring after the switching again.
If there is any protocol supported by the switches in the ethernet ring network that is not the target protocol corresponding to the ethernet ring network, the processor 30 determines that the protocol switching of the switches in the ethernet ring network fails, and reenters the step of switching the protocol of the switches in each ethernet ring network according to the target protocol of each ethernet ring network, so as to re-switch the protocol of the switches in each ethernet ring network.
When the number of switching failures reaches the preset number, the processor 30 stops switching the protocol of the switch of each ethernet ring, i.e. determines that the switch has a failure. The preset times can be 3 times, 5 times, 10 times and the like, and are manually set experience values.
Referring to fig. 4 and 10, the network control method according to the embodiment of the application is as follows:
1. firstly, the controller with the largest number of connected controllers, namely the controller 1 is used as a main controller, and the sub-controller of each Ethernet ring network, such as the sub-controller of the Ethernet ring network AB is used as a controller 3, the sub-controller of the Ethernet ring network A is used as a controller 2, and the like, so that the main controller is prevented from detecting each controller and each switch one by one, and the detection time is saved.
2. During S1 period, for the initialization phase, the processor 30 initializes the controller and the switch.
3. In the S2 period, the processor 30 acquires an initialization signal of the switch of each ethernet ring, thereby determining whether or not damage occurs to each controller and switch according to the initialization signal.
4. In the S3 period, the processor 30 transmits a detection signal to the sub-controller of each ethernet ring network through the main controller (controller), and synchronously transmits the detection signal to the switch corresponding to the main controller.
5. In the S4 period, the processor 30 may receive the feedback signals of the switches corresponding to the main controller and the feedback signals of all the sub-controllers to determine the protocol supported by each switch, thereby determining the target protocol of each ethernet ring.
6. In the S5 period, the processor 30 may switch the protocol of each switch through the target protocol of each ethernet ring, and after the protocol switching is completed, send a detection signal to the sub-controller of each ethernet ring again to detect the protocol of each switch of each ethernet ring, and determine whether the protocol of each switch of each ethernet ring is successfully switched according to the state feedback of each switch of each ethernet ring, and when the switching fails, switch again until the switching times reach the preset times, and stop switching the protocol of each switch of each ethernet ring to determine that the switch has a fault.
Referring to fig. 2, fig. 3, and fig. 11, when the ethernet ring network performs communication according to a first preset protocol, the network control method according to the embodiment of the present application further includes the steps of:
07: the communication is performed simultaneously through a plurality of different communication paths connecting any two switches, the communication paths comprising links of the ethernet ring network and/or the switches.
In certain embodiments, the network control device 10 comprises a communication module 17, the communication module 17 being configured to perform step 07. That is, the communication module 17 is configured to simultaneously perform communication through a plurality of different communication paths connecting any two switches, where the communication paths include links and/or switches of the ethernet ring.
In certain embodiments, processor 30 is configured to perform step 07. That is, the processor 30 is configured to communicate simultaneously over a plurality of different communication paths connecting any two switches, the communication paths including links and/or switches of the Ethernet ring network.
Specifically, when the ethernet ring communicates in the first preset protocol, the processor 30 may communicate simultaneously through a plurality of different communication paths connecting the two switches. The communication path may include a link with an ethernet ring, a switch with an ethernet ring, and a link and a switch with an ethernet ring.
For example, referring to fig. 12, when the ethernet ring X communicates with the first preset protocol, if the data of the controller 2 needs to be sent to the controller 1, the processor 30 may send the data to the switch 1 through the link ① between the switch 2 and the switch 1, or may send the data to the switch 3 through the link ② between the switch 2 and the switch 3 first through the switch 2, and then send the data to the switch 1 through the link ③ between the switch 3 and the switch 1.
Therefore, when the Ethernet ring network communicates through the first preset protocol, a plurality of communication paths for transmitting data can be ensured, and redundancy of the data transmission paths is ensured, so that normal communication can be ensured.
Referring to fig. 2, fig. 3, and fig. 13, when the ethernet ring network performs communication according to a second preset protocol, the network control method according to the embodiment of the present application further includes the steps of:
08: blocking a preset link of each Ethernet ring network so that the Ethernet ring network cannot form a ring network; and
09: In case of a link failure of the ethernet ring network, the blocked link is opened.
In certain embodiments, the communication module 17 is configured to perform step 08 and step 09. That is, the communication module 17 is configured to block a preset link of each ethernet ring, so that the ethernet ring cannot form a ring network; and opening the blocked link under the condition that the link fault exists in the Ethernet ring network.
In certain embodiments, processor 30 is configured to perform step 08 and step 09. That is, the processor 30 is configured to block a preset link of each ethernet ring, so that the ethernet ring cannot form a ring network; and opening the blocked link under the condition that the link fault exists in the Ethernet ring network.
Specifically, when the ethernet ring networks communicate through the second preset protocol, since the ethernet ring networks include a plurality of sub ethernet ring networks, in order to prevent a network storm formed by the plurality of sub ethernet ring networks due to broadcast messages, each ethernet ring network needs to be destroyed, that is, a link is blocked, so as to ensure normal communication of data.
Therefore, when the ethernet ring networks communicate through the second preset protocol, the processor 30 also blocks the preset link of each ethernet ring network, so that the ethernet ring networks cannot form a ring network, that is, the generation of a network storm is avoided. The preset link may be a communication link set manually in advance.
Then, when there is a link failure in the ethernet ring, the processor 30 opens the blocked link to ensure normal communication of data.
More specifically, referring to fig. 12, an ethernet ring Z is taken as an example, and the switch 5 of the controller 5 may directly transmit data to the corresponding switch of the controller 1, or may transmit data to the controller 1 through the switch 4 of the controller 4. When the ethernet ring Z communicates through the second preset protocol, the processor 30 blocks the link ④ between the controllers 5, so that the ethernet ring Z cannot form a ring network, thereby avoiding occurrence of a network storm. It will be appreciated that when the ethernet ring X and the ethernet ring Y communicate through the second preset protocol, the processor 30 blocks the link ① and the link ⑤, so that the ethernet ring X and the ethernet ring Y cannot form a ring network, thereby avoiding occurrence of a network storm. The blocked link is a port of the switch corresponding to the blocked link, for example, the blocked link 4 is a port1 of the switch 5 and a port 2 of the switch 1 are closed.
Next, when the controller 4 transmits data through the link ⑦, and when the link ⑦ fails, the processor 30 opens the blocked link ④, i.e. the port between the switch 5 and the switch 1, to ensure that the data can be normally transmitted, and when the link ⑥ fails, i.e. the link is blocked, the ethernet ring Z cannot form a network storm.
In this way, the processor 30 can ensure that the ethernet ring network will not form a network storm when communicating through the second preset protocol by blocking the link, and can also ensure the normal communication of the data.
Referring to fig. 14, an embodiment of the present application also provides a non-transitory computer readable storage medium 300 containing a computer program 301. The computer program 301, when executed by the one or more processors 30, causes the one or more processors 30 to perform the network control method of any of the embodiments described above.
For example, the computer program 301, when executed by the one or more processors 30, causes the processors 30 to perform the following network control method:
01: detecting a protocol supported by a switch in the Ethernet ring network;
02: determining a target protocol of each Ethernet ring according to protocols supported by all switches in each Ethernet ring; and
03: The protocol of the switch of each Ethernet ring is switched according to the target protocol of each Ethernet ring.
As another example, the computer program 301, when executed by the one or more processors 30, causes the processors 30 to perform the following network control method:
011: initializing an Ethernet ring network to initialize a controller and a switch in the Ethernet ring network;
012: sending a detection signal to each switch in the Ethernet ring network through the target controller so as to acquire a feedback signal of the switch; and
013: The protocol supported by each switch is determined based on the feedback signals.
In the description of the present specification, reference to the terms "certain embodiments," "in one example," "illustratively," and the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiments or examples is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (11)

1. A network control method, comprising:
Detecting a protocol supported by a switch in the Ethernet ring network;
Determining a target protocol of each Ethernet ring according to protocols supported by all switches in each Ethernet ring; and
Switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring;
The determining a target protocol of each ethernet ring according to the protocols supported by all the switches in each ethernet ring includes:
Under the condition that all protocols supported by the switches of the Ethernet ring network are first preset protocols, determining that the target protocol of the Ethernet ring network is the first preset protocol or a second preset protocol;
Determining that the target protocol of the Ethernet ring network is a second preset protocol under the condition that the second preset protocol exists in all the protocols supported by the switches of the Ethernet ring network;
The switch supporting the first preset protocol also supports the second preset protocol, and the switch supporting the second preset protocol does not support the first preset protocol.
2. The network control method according to claim 1, wherein a controller corresponding to each switch one to one is provided in the ethernet ring, and the detecting a protocol supported by the switch in the ethernet ring includes:
Initializing the Ethernet ring network to initialize the controller and the switch in the Ethernet ring network;
sending a detection signal to each switch in the Ethernet ring network through a target controller so as to acquire a feedback signal of the switch; and
And determining the protocol supported by each switch according to the feedback signals.
3. The network control method according to claim 2, wherein the target controller includes a main controller and a sub-controller, the main controller is the controller with the largest number of connected controllers in all ethernet rings, the sub-controller is the controller with the largest number of connected controllers in each ethernet ring, and the sending, by the target controller, a detection signal to each switch in the ethernet ring to acquire a feedback signal of the switch includes:
sending the detection signal to a switch corresponding to the main controller and each sub-controller through the main controller so as to acquire the feedback signal of the switch corresponding to the main controller; and
Forwarding the detection signal to the switch in the Ethernet ring corresponding to each sub-controller through each sub-controller so as to acquire a feedback signal of the switch of each Ethernet ring.
4. The network control method according to claim 1, wherein said determining the target protocol of each of the ethernet ring networks according to protocols supported by all of the switches of each of the ethernet ring networks comprises:
Under the condition that a second preset protocol exists in the protocols supported by the switches shared by the two adjacent Ethernet ring networks, determining that the target protocols of the two adjacent Ethernet ring networks are the second preset protocol;
And under the condition that the protocols supported by the switches shared by the two adjacent Ethernet rings are all first preset protocols, determining that the target protocols of the two adjacent Ethernet rings are the same or different.
5. The network control method according to claim 1 or 4, wherein the first preset protocol is TSN-CB and the second preset protocol is ERPS.
6. The network control method according to claim 1, characterized by further comprising, after switching the protocol of the switch of the ethernet ring network:
detecting the protocol supported by the switch in each Ethernet ring after switching again;
Determining a switching failure and re-entering a protocol switching the switch of each Ethernet ring according to a target protocol of each Ethernet ring when a protocol supported by the switch of any Ethernet ring is not the target protocol corresponding to the Ethernet ring;
and stopping protocol switching of the switch of each Ethernet ring network after the switching failure times reach preset times.
7. The network control method according to claim 1, wherein when the ethernet ring network communicates with a first preset protocol, the network control method further comprises:
And simultaneously communicating through a plurality of different communication paths connecting any two switches, wherein the communication paths comprise links of the Ethernet ring and/or the switches.
8. The network control method according to claim 1, wherein when the ethernet ring network communicates in a second preset protocol, the network control method further comprises:
Blocking a preset link of each Ethernet ring network so that the Ethernet ring network cannot form a ring network;
and opening the blocked link under the condition that the link fault exists in the Ethernet ring network.
9. A network control apparatus, comprising:
The first detection module is used for detecting a protocol supported by a switch in the Ethernet ring network;
The first determining module is used for determining a target protocol of each Ethernet ring network according to protocols supported by all switches of each Ethernet ring network; and
The switching module is used for switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring;
The determining a target protocol of each ethernet ring according to the protocols supported by all the switches in each ethernet ring includes:
Under the condition that all protocols supported by the switches of the Ethernet ring network are first preset protocols, determining that the target protocol of the Ethernet ring network is the first preset protocol or a second preset protocol;
Determining that the target protocol of the Ethernet ring network is a second preset protocol under the condition that the second preset protocol exists in all the protocols supported by the switches of the Ethernet ring network;
The switch supporting the first preset protocol also supports the second preset protocol, and the switch supporting the second preset protocol does not support the first preset protocol.
10. A vehicle comprising a processor configured to detect a protocol supported by a switch in an ethernet ring; determining a target protocol of each Ethernet ring according to protocols supported by all switches of each Ethernet ring; switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring;
The determining a target protocol of each ethernet ring according to the protocols supported by all the switches in each ethernet ring includes:
Under the condition that all protocols supported by the switches of the Ethernet ring network are first preset protocols, determining that the target protocol of the Ethernet ring network is the first preset protocol or a second preset protocol;
Determining that the target protocol of the Ethernet ring network is a second preset protocol under the condition that the second preset protocol exists in all the protocols supported by the switches of the Ethernet ring network;
The switch supporting the first preset protocol also supports the second preset protocol, and the switch supporting the second preset protocol does not support the first preset protocol.
11. A non-transitory computer readable storage medium comprising a computer program which, when executed by a processor, causes the processor to perform the network control method of any of claims 1-8.
CN202211021820.XA 2022-08-24 2022-08-24 Network control method and device, vehicle and computer readable storage medium Active CN115499270B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211021820.XA CN115499270B (en) 2022-08-24 2022-08-24 Network control method and device, vehicle and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211021820.XA CN115499270B (en) 2022-08-24 2022-08-24 Network control method and device, vehicle and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115499270A CN115499270A (en) 2022-12-20
CN115499270B true CN115499270B (en) 2024-07-05

Family

ID=84467124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211021820.XA Active CN115499270B (en) 2022-08-24 2022-08-24 Network control method and device, vehicle and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115499270B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11870682B2 (en) 2021-06-22 2024-01-09 Mellanox Technologies, Ltd. Deadlock-free local rerouting for handling multiple local link failures in hierarchical network topologies

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771593B (en) * 2008-12-29 2011-11-09 迈普通信技术股份有限公司 Ethernet ring network interconnecting method
CN102510354A (en) * 2011-12-15 2012-06-20 盛科网络(苏州)有限公司 Dual-home-supported ring network method and system based on virtual private local area network (LAN) service (VPLS) and G8032
CN204633789U (en) * 2013-10-23 2015-09-09 天津德通电气有限公司 A kind of ethernet ring network business and flow-monitoring device
CN106411611A (en) * 2016-11-11 2017-02-15 安徽维德工业自动化有限公司 Industrial Ethernet switch redundant ring system
WO2019123447A1 (en) * 2017-12-24 2019-06-27 Arilou Information Security Technologies Ltd. System and method for tunnel-based malware detection
CN112887182A (en) * 2019-11-29 2021-06-01 华为技术有限公司 Data transmission method, equipment and system
CN111711583B (en) * 2020-06-11 2022-06-14 广东电网有限责任公司 Switch supporting configuration of multiple redundancy protocols and transformer substation network system
US11956339B2 (en) * 2020-12-31 2024-04-09 Honeywell International Inc. Multiple network redundancy protocols for data flow using the same physical interface
CN113835079B (en) * 2021-07-29 2024-09-17 中汽创智科技有限公司 Vehicle-mounted laser radar system, data processing method and device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"不同制造厂家的工业以太网交换机组网应用分析";王跃,赵钢;《内蒙古电力技术》;第33卷(第S1期);第53页右栏-第54页右栏 *

Also Published As

Publication number Publication date
CN115499270A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
EP1832044B1 (en) Wireless communication path management methods and systems
JP4782823B2 (en) User terminal, master unit, communication system and operation method thereof
EP2243255B1 (en) Method and system for dynamic link failover management
US5379278A (en) Method of automatic communications recovery
EP3242446B1 (en) Failure protection method, device and system for ring protection link
US11398976B2 (en) Method, device, and system for implementing MUX machine
CN107948063B (en) Method for establishing aggregation link and access equipment
CN108989200B (en) Data packet forwarding method, device and system
CN106533736A (en) Network device reboot method and apparatus
CN115499270B (en) Network control method and device, vehicle and computer readable storage medium
EP1808973A1 (en) A method for detecting and resuming maintenance link
US11258666B2 (en) Method, device, and system for implementing MUX machine
KR101825030B1 (en) Ring network apparatus and system using PoE and network recovering method for the system
CN115714698A (en) Ring network communication method and device of vehicle-mounted Ethernet, vehicle and storage medium
CN110677283B (en) Method for fast switching network dual redundancy
CN109088753B (en) Circuit and method for automatically detecting RS485 communication fault
JP7346172B2 (en) communication equipment
JPS62176345A (en) Duplicated system loop transmission control equipment
CN111526059B (en) Networking method, device, equipment and storage medium
US11234142B2 (en) System and method for single-channel architecture for immediate access point redundancy
JP4035820B2 (en) Line switching apparatus, data transmission system, and line switching method
CN109451520B (en) Mesh node stacking multi-channel communication extension method for wireless equipment PIPE interconnection
JP2606130B2 (en) Loop network
CN117439628A (en) Communication terminal equipment
CN113839858A (en) Communication method and communication device

Legal Events

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