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

Links

Images

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

Abstract

The application discloses a network control method, a network control device, a vehicle and a non-volatile 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 network according to protocols supported by all switches in each Ethernet ring network; and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network. In the network control method, the network control apparatus, the vehicle, and the non-volatile computer-readable storage medium according to the embodiments of the present application, for a multi-ring ethernet ring, during data transmission, each ethernet ring in the multi-ring ethernet ring may use the same protocol or different protocols, so that it is satisfied 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 automotive software development technologies, and in particular, to a network control method, a network control apparatus, a vehicle, and a non-volatile computer-readable storage medium.
Background
With the rapid change of the automobile industry, the requirements of automobiles are from traditional leather being durable to meeting the requirements of intellectualization, electromotion and networking, namely, the requirements of the functions of the whole automobiles are more and more, so that the functions of the whole automobiles are more and more complex. At present, in order to solve the problems of large data communication bandwidth and network load, the automobile mostly adopts 100M or 1000M rate ethernet for data and information interaction. However, in the multi-ring ethernet of the whole vehicle, the ethernet switches of different models support the non-uniform link redundancy protocol, 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 non-volatile 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 network; determining a target protocol of each Ethernet ring network according to protocols supported by all the switches of each Ethernet ring network; and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
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 the protocol supported by the switch in the Ethernet ring network. The determining module is configured to determine a target protocol of each ethernet ring network according to 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 network according to the target protocol of each Ethernet ring network.
The vehicle of the embodiment of the present application includes a processor. The processor is used for detecting a protocol supported by a switch in the Ethernet ring network; determining a target protocol of each Ethernet ring network according to protocols supported by all the switches of each Ethernet ring network; and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
The non-transitory computer-readable storage medium of the embodiments 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 network according to protocols supported by all the switches of each Ethernet ring network; and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
In the network control method, the network control apparatus, the vehicle, and the non-volatile computer-readable storage medium according to the embodiments of the present application, after detecting the protocols supported by the switches in the ethernet rings, the target protocol of each ethernet ring can 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. Therefore, for the multi-ring Ethernet ring network, in the data transmission process, each Ethernet ring network in the multi-ring Ethernet ring network can use the same protocol or different protocols, so that the Ethernet ring network can be compatible with switches with different protocols.
Additional aspects and advantages of embodiments of the present 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 present application.
Drawings
The above 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 of which:
FIG. 1 is a schematic flow chart diagram of a network control method according to some embodiments of the present application;
FIG. 2 is a schematic plan view of a network control unit according to some embodiments of the present application;
FIG. 3 is a schematic plan view of a vehicle according to certain embodiments of the present application;
FIG. 4 is a schematic diagram of a network control method according to some embodiments of the present application;
FIG. 5 is a flow chart illustrating a network control method according to some embodiments of the present application;
FIG. 6 is a schematic flow chart diagram of a network control method according to some embodiments of the present application;
FIG. 7 is a flow chart illustrating a network control method according to some embodiments of the present application;
FIG. 8 is a schematic flow chart diagram of a network control method according to some embodiments of the present application;
FIG. 9 is a schematic flow chart diagram of a network control method according to some embodiments of the present application;
FIG. 10 is a schematic flow chart diagram of a network control method according to some embodiments of the present application;
FIG. 11 is a flow chart illustrating a network control method according to some embodiments of the present application;
FIG. 12 is a schematic diagram of a network control method according to some embodiments of the present application;
FIG. 13 is a schematic flow chart diagram of a network control method in accordance with certain embodiments of the present application;
FIG. 14 is a schematic representation of a connection state of a non-volatile computer readable storage medium and a processor of some embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of 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, a network control method is provided in an embodiment of the present disclosure. 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 network according to protocols supported by all switches in each Ethernet ring network; and
03: and switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring.
Referring to fig. 2, a network control device 10 is provided in the present embodiment. 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 according to the embodiment of the present application is applicable to the network control device 10. The first detecting module 11, the first determining module 12 and the switching module 13 are configured to perform step 01, step 02 and step 03, respectively. That is, the first detection module 11 is used to detect the protocol supported by the switch in the ethernet ring network. The first determining module 12 is configured to detect a protocol supported by a switch in an ethernet ring network; determining a target protocol of each Ethernet ring network according to protocols supported by all switches in each Ethernet ring network; and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
Referring to fig. 3, the present embodiment provides a vehicle 100. The network control method of the embodiment of the present application is applicable to the vehicle 100. The vehicle 100 includes a processor 30. The processor 30 is configured to perform step 01, step 02 and step 03. That is, the processor 30 is configured to detect a protocol supported by a switch in the ethernet ring network; determining a target protocol of each Ethernet ring network according to protocols supported by all switches in each Ethernet ring network; and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
Specifically, the processor 30 may first detect the protocol supported by the switch in the ethernet ring. The ethernet ring network may include a plurality of switches, and the 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 (TSN) protocol, such as a TSN-CB protocol, and the switch support protocol may also be an Ethernet Ring Protection Switching (ERPS) protocol. One of the switches may support the TSN-CB protocol and the other may support the ERPS protocol. The processor 30 can detect to obtain the supported protocol of each switch in the ethernet ring.
In addition, the ethernet ring network may be composed of a plurality of sub-rings, that is, the ethernet ring network 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, the ethernet ring ABC is composed of a sub-ethernet ring a, a sub-ethernet ring B and a sub-ethernet ring C, and the ethernet ring ABC includes a switch 1, a switch 2, a switch 3, a switch 4 and a 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, the processor 30 can determine a target protocol of each ethernet ring according to the protocols supported by all switches in each ethernet ring. It is understood that each ethernet ring, i.e., the sub-ethernet ring a, the ethernet ring B, and the ethernet ring C in the 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 the supported protocols of the switches in the ethernet ring ABC, it can detect the supported protocols of all the switches in each sub-ethernet ring.
Taking the sub ethernet ring a as an example for description, after the processor 30 acquires the protocols supported by the switch 1, the switch 2, and the switch 3 in the sub ethernet ring a, the processor 30 may 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 simultaneously supports the ERPS protocol, 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 switch 1, the switch 2, and the switch 3 in the sub ethernet ring a, in order to ensure that data can be normally transmitted in the sub ethernet ring a, when any one of the switch 1, the switch 2, and the switch 3 does not support the TSN-CB protocol, that is, only supports the ERPS protocol, the processor 30 determines that the target protocol is the ERPS protocol. 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 can 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 protocol for switching the switch 1, the switch 2, and the switch 3 is the ERPS protocol. For another example, if the target protocol of the sub ethernet ring B is the TSN-CB protocol, the protocol for switching the switch 1, the switch 3, and the switch 4 is the TSN-CB protocol. For example, if the target protocol of the sub ethernet ring C is an ERPS protocol or a TSN-CB protocol, the protocols of the switch 1, the switch 4, and the switch 5 are TSN-CB protocols or EPRS protocols.
In the network control method, the network control apparatus 10, and the vehicle 100 according to the embodiment of the application, after detecting the protocols supported by the switches in the ethernet rings, the target protocol of each ethernet ring can be determined according to the protocols 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. Therefore, for the multi-ring Ethernet ring network, in the data transmission process, each Ethernet ring network in the multi-ring Ethernet ring network can use the same protocol or different protocols, so that the Ethernet ring network can be compatible with switches with 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 network, comprising the steps of:
011: initializing the 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 a target controller to obtain a feedback signal of the switch; and
013: and determining the supported protocol of each switch according to the feedback signal.
In certain embodiments, the first detection module 11 is configured to perform steps 011, 012, and 013. That is, the first detection module 11 is used 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 a target controller to obtain a feedback signal of the switch; and determining the supported protocol of each switch according to the feedback signal.
In certain embodiments, processor 30 is configured to perform step 011, step 012, and step 013. That is, the processor 30 initializes 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 to obtain a feedback signal of the switch; and determining the supported protocol of each switch according to the feedback signal.
Specifically, the ethernet ring is provided with controllers corresponding to each switch one to 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 complete initialization. If the controller and switch have not completed initialization, the processor 30 determines that the controller and switch are damaged.
After the controller and the switches are initialized, the processor 30 may send a detection signal to each switch in the ethernet ring network through the target controller to obtain a feedback signal of the switch. The target controller is the controller with the largest number of connection controllers in the Ethernet ring network. The feedback signal may indicate the protocols 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 retrieval signal can be sent to each controller in the ethernet ring network through the target controller, so as to obtain the feedback signal of the switch corresponding to each controller.
Finally, the processor 30 can determine the supported protocols of each switch according to the feedback signals of the switches. For example, the TSN-CB protocol is numbered 1 and the ERPS protocol is numbered 2. 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, it is determined that the protocol supported by the switch is the 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 acquire a feedback signal of the switch, comprising the following steps of:
0121: sending a detection signal to the switch and each sub-controller corresponding to the main controller through the main controller to obtain a feedback signal of the switch corresponding to the main controller; and
0122: and forwarding the detection signal to the switch in the Ethernet ring network corresponding to each sub-controller through each sub-controller so as to obtain the feedback signal of the switch of each Ethernet ring network.
In certain embodiments, the first detection module 11 is configured to perform step 0121 and step 0122. That is, the first detection module 11 is configured to send a detection signal to the switch and each sub-controller corresponding to the main controller through the main 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 network corresponding to each sub-controller through each sub-controller so as to obtain the feedback signal of the switch of each Ethernet ring network.
In certain embodiments, processor 30 is used to perform steps 0121 and 0122. That is, the processor 30 is configured to send a detection signal to the switch corresponding to the main controller and each sub-controller through the main 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 network corresponding to each sub-controller through each sub-controller so as to obtain the feedback signal of the switch of each Ethernet ring network.
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 which are connected with the largest number of controllers in each Ethernet ring network.
Taking fig. 4 as an example for explanation, all ethernet rings form an ethernet ring ABC, and the main controller is the controller 1. The Ethernet ring ABC is composed of a sub Ethernet ring A, a sub Ethernet ring B and a sub Ethernet ring C.
Furthermore, the two sub-Ethernet rings can also form an Ethernet ring. 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 controller 3 is connected to the controller with the largest number of controllers in addition to the main controller 1, that is, the sub-controller of the ethernet ring AB is the controller 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, and thus 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 network through the target controller to obtain the feedback signal of the switch, the processor 30 may first send the detection signal to the switch and each sub-controller corresponding to the main controller through the main controller.
Thus, the processor 30 can first obtain the feedback signal of the switch corresponding to the main controller to determine the protocol supported by the switch corresponding to the main controller. For example, the processor 30 sends a detection signal to the switch 1 through the controller 1 to obtain a feedback signal of the switch 1, thereby determining the protocol supported by the switch 1.
The processor 30 may further forward the detection signal to the switch in the ethernet ring network corresponding to each sub-controller through each sub-controller to obtain a feedback signal of the switch in each ethernet ring network.
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 can forward the detection signal to all the switches (switch 1, switch 2, switch 3) in the ethernet ring AB, so as to obtain the feedback signals of all the 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.
Therefore, when the processor 30 acquires the feedback signals of all the switches in the ethernet ring network, the detection signals do not need to be sent to each switch in the ethernet ring network one by one through the main controller, but are forwarded to the switch corresponding to each controller through the sub-controllers, so as to ensure that when the number of the switches is large, the time for the processor 30 to detect through the main controller is saved, thereby ensuring the speed for switching the protocol of the switches and ensuring the speed of data transmission.
Referring to fig. 2, 3, and 7, in some embodiments, step 02: determining a target protocol of each Ethernet ring network according to protocols supported by all switches of each Ethernet ring network, comprising the following steps:
021: under the condition that all the protocols supported by all the switches of the Ethernet ring are the first preset protocol, determining that the target protocol of the Ethernet ring is the first preset protocol or the second preset protocol; and
022: and under the condition that a second preset protocol exists in the protocols supported by all the switches of the Ethernet ring network, determining that the target protocol of the Ethernet ring network is the second preset protocol.
In certain embodiments, the first determining module 12 is configured to perform steps 021 and 022. The first determining module 12 is configured to determine that an ethernet ring network target protocol is a first preset protocol or a second preset protocol when all protocols supported by all switches of the ethernet ring network are the first preset protocol; and determining that the target protocol of the Ethernet ring network is the second preset protocol under the condition that the second preset protocol exists in the protocols supported by all the switches of the Ethernet ring network.
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 ring network target protocol is the first preset protocol or the second preset protocol when the protocols supported by all switches of the ethernet ring network are the first preset protocol; and determining that the target protocol of the Ethernet ring network is the second preset protocol under the condition that the second preset protocol exists in the protocols supported by all the switches of the Ethernet ring network.
Specifically, after the processor 30 detects the protocols supported by all the switches in the ethernet ring, the processor 30 may determine the target protocol of each ethernet ring according to the protocols supported by all the switches in each ethernet ring.
More specifically, when the processor 30 determines that the protocols supported by all switches of the ethernet ring network are the first preset protocol, it determines 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 predetermined 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 ring network is the second predetermined 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, whereas switches supporting the ERPS protocol do not support the TSN-CB protocol.
Referring to fig. 4, taking ethernet ring ABC as an example, the processor 30 can determine the supported protocols of switch 1, switch 2, switch 3, switch 4 and switch 5. If the switch 1 to the switch 5 all support the first preset protocol, that is, all support the TSN-CB protocol, the target protocol of the ethernet ring network ABC is the TSN-CB protocol or the ERPS protocol.
If any one of the switches 1 to 5 supports the second preset protocol, i.e., the ERPS protocol, the target protocol of the ethernet ring network ABC is the ERPS protocol.
Taking the ethernet ring a as an example, after acquiring the protocols supported by the switch 1, the switch 2, and the switch 3, the processor 30 may also 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 one switch supports the second preset protocol.
Thus, the processor 30 can determine the target protocol of each ethernet ring according to the protocols supported by all switches in each ethernet ring.
Referring to fig. 2, 3, and 8, in some embodiments, step 02: determining a target protocol of each Ethernet ring network according to the protocols supported by all the switches of each Ethernet ring network, and further comprising the following steps:
023: under the condition that a second preset protocol exists in the protocols supported by the switch shared by the two adjacent Ethernet ring networks, determining the target protocols of the two adjacent Ethernet ring networks as the second preset protocol; and
024: and under the condition that the protocols supported by the switch shared by the two adjacent Ethernet rings are the first preset protocol, 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 two adjacent ethernet rings is the second preset protocol when the second preset protocol exists in the protocols supported by the switch shared by the two adjacent ethernet rings; and determining that the target protocols of the two adjacent Ethernet rings are the same or different under the condition that the protocols supported by the switch shared by the two adjacent Ethernet rings are the first preset protocol.
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 switch shared by the two adjacent ethernet rings; and determining that the target protocols of the two adjacent Ethernet rings are the same or different under the condition that the protocols supported by the switch shared by the two adjacent Ethernet rings are the first preset protocol.
Specifically, when the processor 30 determines the target protocol of each ethernet ring, if a second preset protocol exists in the protocols supported by the switch shared by two adjacent ethernet rings, the processor 30 may determine that the target protocols of the two adjacent ethernet rings are the second preset protocol.
For example, referring to fig. 4, the switches shared by the ethernet ring network a and the ethernet ring network B are the switch 1 and the switch 3, and if a protocol supported by any one of the switches in the switch 1 and the switch 3 is the second predetermined protocol, that is, the ERPS protocol, the target protocol of the ethernet ring network a and the ethernet ring network B is the ERPS protocol.
Furthermore, if the protocols supported by the switch shared by the two adjacent ethernet rings are both the first predetermined protocol, i.e. 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, the switches shared by the ethernet ring B and the ethernet ring C are the switch 1 and the switch 4, and if the switch 1 and the switch 4 both support the TSN-CB protocol, the target protocols of the ethernet ring B and the ethernet ring C may be the same or different. For example, the target protocols of the ethernet ring B and the ethernet ring C may be both the first preset protocol or the second preset protocol; for another example, the target protocol of the ethernet ring B is the first predetermined protocol, and the target protocol of the ethernet ring C is the second predetermined protocol, or the target protocol of the ethernet ring B is the second predetermined protocol, and the target protocol of the ethernet ring C is the first predetermined protocol.
Therefore, in the ethernet ring network ABC, the target protocols of the ethernet ring networks can be the same or different, that is, the ethernet ring network ABC can simultaneously use the first predetermined protocol or the second predetermined protocol, so that the ethernet ring network ABC can be compatible with switches of different protocols.
Referring to fig. 2, fig. 3 and fig. 9, after switching the protocol of the switch of the ethernet ring network, 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 network after switching;
05: under the condition that the protocol supported by the switch in any Ethernet ring is not the target protocol corresponding to the Ethernet ring, determining that the switching fails and entering the step of switching the protocol of the switch of each Ethernet ring according to the target protocol of each Ethernet ring again; and
06: and stopping protocol switching of the switches 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 detecting module 14 is configured to perform step 04, the second determining module 15 is configured to perform step 05, and the stopping module 16 is configured to perform 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 reenter the step of switching the protocol of the switch of each ethernet ring network according to the target protocol of each ethernet ring network when the protocol supported by the switch of any ethernet ring network is not the target protocol corresponding to the ethernet ring network. The stopping module 16 is configured to stop protocol switching of the switches of each ethernet ring network 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 the protocol supported by the switch in each ethernet ring network after the switching again; under the condition that the protocol supported by the switch in any Ethernet ring network is not the target protocol corresponding to the Ethernet ring network, determining that the switching fails and entering the step of switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network again; and stopping protocol switching of the switch 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 network according to the target protocol of each ethernet ring network, in order to ensure that the protocol switching of the switch is successful, the processor 30 needs to detect the protocol supported by the switch in each ethernet ring network after switching again.
If the protocol supported by the switch in any of the ethernet rings is not the target protocol corresponding to the ethernet ring, the processor 30 determines that the protocol switching of the switch in the ethernet ring fails, and then re-enters the step of switching the protocol of the switch in each ethernet ring according to the target protocol of each ethernet ring to re-switch the protocol of the switch in each ethernet ring.
When the switching failure times reach the preset times, the processor 30 stops switching the protocol of the switch of each ethernet ring, that is, determines that the switch has a failure. The preset times can be 3 times, 5 times, 10 times and the like, and are artificially set empirical values.
Referring to fig. 4 and fig. 10, a network control method according to an embodiment of the present invention includes the following steps:
1. firstly, the controller with the largest number of connected controllers is determined, namely the controller 1 is used as a main controller, and the sub-controllers of each Ethernet ring network are determined, for example, the sub-controller of the Ethernet ring network AB is used as the controller 3, the sub-controller of the Ethernet ring network A is used as the 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 the S1 time period, processor 30 initializes the controller and the switch for an initialization phase.
3. In the S2 period, the processor 30 obtains the initialization signal of each switch of the ethernet ring, so as to determine whether each controller and each switch are damaged according to the initialization signal.
4. In the S3 time period, the processor 30 sends the detection signal to each sub-controller of the ethernet ring network through the main controller (controller), and synchronously sends the detection signal to the switch corresponding to the main controller.
5. In the S4 time period, the processor 30 may receive the feedback signal of the switch corresponding to the main controller and the feedback signals of all the sub-controllers to determine the protocol supported by each switch, so as to determine the target protocol of each ethernet ring.
6. In the S5 time 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 the detection signal to the sub-controller of each ethernet ring again to detect the protocol of the switch of each ethernet ring, and feed back the status of the switch of each ethernet ring to determine whether the protocol of the switch of each ethernet ring is successfully switched, and when the switching fails, switch again, until the switching times reaches the preset times, stop the switching of the protocol of the switch of each ethernet ring to determine that the switch fails.
Referring to fig. 2, fig. 3 and fig. 11, when the ethernet ring network communicates with the first predetermined protocol, the network control method according to the embodiment of the present application further includes the steps of:
07: communication is performed simultaneously through a plurality of different communication paths connecting any two switches, the communication paths including links and/or switches of the Ethernet ring network.
In certain embodiments, the network control device 10 comprises a communication module 17, and the communication module 17 is configured to perform step 07. That is, the communication module 17 is configured to communicate simultaneously via a plurality of different communication paths connecting any two switches, the communication paths including 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.
Specifically, when the ethernet ring network communicates with the first predetermined protocol, the processor 30 can communicate simultaneously through a plurality of different communication paths connecting two switches. The communication path may include a link of the ethernet ring network, may also include a switch of the ethernet ring network, and may also include a link and a switch of the ethernet ring network.
For example, referring to fig. 12, when the ethernet ring X communicates with the first preset protocol, if 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 (1) between the switch 2 and the switch 1, or may send the data to the switch 3 through the link (2) 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 (3) 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, so that the redundancy of the data transmission paths is ensured, and the normal communication can be ensured.
Referring to fig. 2, fig. 3 and fig. 13, when the ethernet ring network communicates with the second predetermined 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 networks cannot form a ring network; and
09: and opening the blocked link under the condition that the Ethernet ring network has link failure.
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 network, so that the ethernet ring networks cannot form a ring network; and opening the blocked link under the condition that the Ethernet ring network has link failure.
In certain embodiments, processor 30 is configured to perform steps 08 and 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 Ethernet ring network has link failure.
Specifically, when the ethernet ring networks communicate via the second predetermined protocol, since the ethernet ring networks include a plurality of sub ethernet ring networks, in order to prevent a network storm caused by a broadcast packet in the plurality of sub ethernet ring networks, it is necessary to destroy each ethernet ring network, that is, to block a link, so as to ensure normal data communication.
Therefore, when the ethernet ring networks communicate via the second predetermined protocol, the processor 30 may also block the predetermined link of each ethernet ring network, so that the ethernet ring networks cannot form a ring network, i.e. a network storm is avoided. The preset link may be a communication link preset artificially.
Then, when there is a link failure in the ethernet ring, the processor 30 will open the blocked link to ensure the normal communication of data.
More specifically, please refer to fig. 12, which illustrates an ethernet ring network Z as an example, the switch 5 of the controller 5 itself may directly transmit data to the switch corresponding to 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 via the second predetermined protocol, the processor 30 blocks the link (4) between the controller 5 and the controller, so that the ethernet ring Z cannot form a ring network, thereby avoiding a network storm. It can be understood that, when the ethernet ring network X and the ethernet ring network Y also communicate via the second predetermined protocol, the processor 30 will block the link (1) and the link (5), so that the ethernet ring network X and the ethernet ring network Y cannot form a ring network, thereby avoiding the occurrence of a network storm. The blocked link is a port of a switch corresponding to the blocked link, such as a blocked link 4, i.e., a port 1 of a closed switch 5, and a port 2 of a switch 1.
Next, when the controller 4 transmits data, it transmits data through the link (7), and when the link (7) fails, the processor 30 opens the blocked link (4), i.e. the port between the switch 5 and the switch 1, to ensure normal data transmission, and at this time, because the link (6) fails, i.e. the link is blocked, the ethernet ring network Z still cannot form a network storm.
Thus, the processor 30 can ensure that the ethernet ring network does not form a network storm when communicating through the second predetermined protocol by blocking the link, and can also ensure normal communication of data.
Referring to fig. 14, the present application also provides a non-volatile 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 network according to protocols supported by all switches in each Ethernet ring network; and
03: and switching the protocol of the switch of each Ethernet ring 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 the 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 a target controller to obtain a feedback signal of the switch; and
013: and determining the supported protocol of each switch according to the feedback signal.
In the description herein, references to the description of "certain embodiments," "in one example," "exemplary," 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 application. In this specification, schematic representations of the above terms 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. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one 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 the scope of the preferred embodiments of the present application includes other implementations 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.
Although embodiments of the present application have been shown and described above, it is to be understood that the above embodiments are exemplary and not to be construed as limiting the present application, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (12)

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 network according to protocols supported by all the switches in each Ethernet ring network; and
and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
2. The network control method according to claim 1, wherein a controller corresponding to each switch is disposed in the ethernet ring, and the detecting a protocol supported by the switches in the ethernet ring comprises:
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 obtain a feedback signal of the switch; and
and determining the protocol supported by each switch according to the feedback signal.
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 of the detection signal by the target controller to each switch in the ethernet ring to obtain the feedback signal of the switch comprises:
sending the detection signal to the switch corresponding to the main controller and each sub-controller through the main controller to obtain the feedback signal of the switch corresponding to the main controller; and
and forwarding the detection signal to the switch in the Ethernet ring network corresponding to each sub-controller through each sub-controller so as to obtain a feedback signal of the switch of each Ethernet ring network.
4. The method according to claim 1, wherein said determining a target protocol of each ethernet ring according to the protocols supported by all the switches in each ethernet ring comprises:
determining that the target protocol of the Ethernet ring network is a first preset protocol or a second preset protocol under the condition that all protocols supported by all the switches of the Ethernet ring network are the first preset protocol;
and 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 protocols supported by the switches of the Ethernet ring network.
5. The method according to claim 4, wherein said determining the target protocol of each of the ethernet rings according to the protocols supported by all the switches of each of the ethernet rings comprises:
determining that the target protocol of two adjacent Ethernet rings is a second preset protocol under the condition that the second preset protocol exists in the protocols supported by the switch shared by the two adjacent Ethernet rings;
and under the condition that the protocols supported by the switch shared by the two adjacent Ethernet ring networks are the first preset protocol, determining that the target protocols of the two adjacent Ethernet ring networks are the same or different.
6. The network control method according to claim 4 or 5, wherein the first predetermined protocol is TSN-CB and the second predetermined protocol is ERPS.
7. The network control method according to claim 1, 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 network after switching again;
determining that the switching fails and entering the step of switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network again under the condition that the protocol supported by the switch of any Ethernet ring network is not the target protocol corresponding to the Ethernet ring network;
and stopping protocol switching of the switch of each Ethernet ring network after the switching failure times reach preset times.
8. 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 the link of the Ethernet ring network and/or the switch.
9. The network control method according to claim 1, wherein when the ethernet ring network communicates with a second preset protocol, the network control method further comprises:
blocking a preset link of each Ethernet ring network so that the Ethernet ring networks cannot form a ring network;
and opening the blocked link under the condition that the Ethernet ring network has link failure.
10. 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 the switches of each Ethernet ring network; and
and the switching module is used for switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
11. A vehicle comprising a processor configured to detect a protocol supported by a switch in an ethernet ring network; determining a target protocol of each Ethernet ring network according to protocols supported by all the switches of each Ethernet ring network; and switching the protocol of the switch of each Ethernet ring network according to the target protocol of each Ethernet ring network.
12. 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 one of claims 1-9.
CN202211021820.XA 2022-08-24 2022-08-24 Network control method and device, vehicle and computer readable storage medium Pending CN115499270A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211021820.XA CN115499270A (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 CN115499270A (en) 2022-08-24 2022-08-24 Network control method and device, vehicle and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115499270A true CN115499270A (en) 2022-12-20

Family

ID=84467124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211021820.XA Pending CN115499270A (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) CN115499270A (en)

Cited By (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

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771593A (en) * 2008-12-29 2010-07-07 迈普通信技术股份有限公司 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
CN111711583A (en) * 2020-06-11 2020-09-25 广东电网有限责任公司 Switch supporting configuration of multiple redundancy protocols and transformer substation network system
CN112887182A (en) * 2019-11-29 2021-06-01 华为技术有限公司 Data transmission method, equipment and system
CN113835079A (en) * 2021-07-29 2021-12-24 中汽创智科技有限公司 Vehicle-mounted laser radar system, data processing method, data processing device and storage medium
CN114697406A (en) * 2020-12-31 2022-07-01 霍尼韦尔国际公司 Multiple network redundancy protocol for data streams using the same physical interface

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771593A (en) * 2008-12-29 2010-07-07 迈普通信技术股份有限公司 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
CN111711583A (en) * 2020-06-11 2020-09-25 广东电网有限责任公司 Switch supporting configuration of multiple redundancy protocols and transformer substation network system
CN114697406A (en) * 2020-12-31 2022-07-01 霍尼韦尔国际公司 Multiple network redundancy protocol for data streams using the same physical interface
CN113835079A (en) * 2021-07-29 2021-12-24 中汽创智科技有限公司 Vehicle-mounted laser radar system, data processing method, data processing device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王跃,赵钢: ""不同制造厂家的工业以太网交换机组网应用分析"", 《内蒙古电力技术》, vol. 33, no. 1, pages 53 *

Cited By (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

Similar Documents

Publication Publication Date Title
JP6882862B2 (en) Flexible deterministic communication network
JP4782823B2 (en) User terminal, master unit, communication system and operation method thereof
JP4904399B2 (en) Communication system having master / slave structure
EP3242446B1 (en) Failure protection method, device and system for ring protection link
US6754762B1 (en) Redundant bus switching
EP3166246B1 (en) Method to detect and to handle failures in the communication in a computer network
US20070270984A1 (en) Method and Device for Redundancy Control of Electrical Devices
US10230540B2 (en) Method, device and system for communicating in a ring network
CN106533736A (en) Network device reboot method and apparatus
US20040213148A1 (en) Network data re-routing
US7385919B2 (en) Local network, particularly Ethernet network having redundancy properties, and coupling device for such a network
CN115499270A (en) Network control method and device, vehicle and computer readable storage medium
CN108667640B (en) Communication method and device, and network access system
JP3679944B2 (en) Information transmission equipment
CN115714698B (en) Looped network communication method and device of vehicle-mounted Ethernet, vehicle and storage medium
EP3232617B1 (en) Protection switching method and system, and nodes
CN117135029A (en) Communication fault processing method, system and equipment
US20070121488A1 (en) System and Method for Implementing Service Switching
CN109088753B (en) Circuit and method for automatically detecting RS485 communication fault
KR102029371B1 (en) Power Supply system and method for ethernet communication network in vehicle
JPS62176345A (en) Duplicated system loop transmission control equipment
WO2023171242A1 (en) Communication control device, communication control method, and communication control program
JP2021040219A (en) Communication apparatus
JP2023132284A (en) Communication control device, communication control method, and communication control program
JP2606130B2 (en) Loop network

Legal Events

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