CN112995041B - Network communication method, device, electronic equipment and storage medium - Google Patents

Network communication method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112995041B
CN112995041B CN202110428185.6A CN202110428185A CN112995041B CN 112995041 B CN112995041 B CN 112995041B CN 202110428185 A CN202110428185 A CN 202110428185A CN 112995041 B CN112995041 B CN 112995041B
Authority
CN
China
Prior art keywords
data
transmitted
switch
routing
determining
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
CN202110428185.6A
Other languages
Chinese (zh)
Other versions
CN112995041A (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.)
Beijing Tasson Science and Technology Co Ltd
Original Assignee
Beijing Tasson Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tasson Science and Technology Co Ltd filed Critical Beijing Tasson Science and Technology Co Ltd
Priority to CN202110428185.6A priority Critical patent/CN112995041B/en
Publication of CN112995041A publication Critical patent/CN112995041A/en
Application granted granted Critical
Publication of CN112995041B publication Critical patent/CN112995041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing

Landscapes

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

Abstract

The invention provides a network communication method, a network communication device, electronic equipment and a storage medium, wherein the method comprises the following steps: the current switch acquires data to be transmitted and determines the data type of the data to be transmitted; determining a corresponding routing strategy according to the data type; acquiring each link state on the routing topology, and acquiring a new routing topology according to the routing strategy and each link state; and sending the data to be transmitted to the next switch or the destination node according to the new routing topology. According to the network communication method, the device, the electronic equipment and the storage medium, the corresponding routing strategy is determined according to the data type, the new routing topology is obtained based on each link state on the routing topology according to the routing strategy and each link state, the data forwarding process is completed according to the new routing topology, the consideration from multiple backup data types is realized, the compatible processing of multiple backup forwarding modes is realized in one network, and the adaptability of data transmission is improved.

Description

Network communication method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a network communication method and apparatus, an electronic device, and a storage medium.
Background
In a communication network with a high requirement on reliability, a design mode of redundant backup communication is often adopted, the redundant backup comprises a warm backup and a hot backup, and generally, only one design mode of the redundant backup is adopted in one network, and the two design modes cannot be compatible.
Disclosure of Invention
The invention provides a network communication method, a network communication device, electronic equipment and a storage medium, aiming at the problems in the prior art.
The invention provides a network communication method, which is suitable for a dual-redundancy backup network system, wherein the dual-redundancy backup network system comprises at least two groups of switch sets and a plurality of network nodes, each group of switch sets comprises two switches which are backups of each other, and each switch is provided with a routing strategy; the switches in the two groups of switch sets establishing the communication relation establish a routing topology with the source node and the destination node; the method comprises the following steps:
the method comprises the steps that a current switch obtains data to be transmitted and determines the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type;
determining a corresponding routing strategy according to the data type;
acquiring each link state on the routing topology, and acquiring a new routing topology according to the routing strategy and each link state;
and sending the data to be transmitted to a next switch or a destination node according to the new routing topology.
According to a network communication method provided by the present invention, if the current switch is a first switch connected to a source node, determining a data type of the data to be transmitted includes:
the method comprises the steps that a current switch receives original data sent by a source node, and the original data are converted according to a preset frame format to obtain data to be transmitted;
and determining the protocol type of the original data, and determining the data type of the data to be transmitted according to the protocol type.
According to a network communication method provided by the present invention, if the current switch is an intermediate switch or a first switch connected to a destination node, determining a data type of the data to be transmitted, includes:
acquiring a preset field of the data to be transmitted, and determining a numerical value on the preset field;
and determining the data type of the data to be transmitted according to the numerical value on the preset field.
According to the network communication method provided by the invention, the hot backup data type corresponds to a hot backup routing strategy, and the warm backup data type corresponds to a warm backup routing strategy;
the hot standby routing policy comprises: if the fault link exists according to the state of each link, keeping the initial routing topology unchanged;
the warm backup routing strategy comprises: and if the fault link exists according to the state of each link, updating the initial routing topology according to the fault link.
The invention also provides a network communication device, which is suitable for a dual-redundancy backup network system, wherein the dual-redundancy backup network system comprises at least two groups of switch sets and a plurality of network nodes, each group of switch sets comprises two switches which are backups of each other, and each switch is provided with a routing strategy; the switches in the two groups of switch sets establishing the communication relation establish a routing topology with the source node and the destination node; the device comprises:
the acquisition module is used for acquiring data to be transmitted and determining the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type;
the determining module is used for determining a corresponding routing strategy according to the data type;
the processing module is used for acquiring each link state on the routing topology and obtaining a new routing topology according to the routing strategy and each link state;
and the forwarding module is used for sending the data to be transmitted to a next switch or a destination node according to the new routing topology.
According to a network communication device provided by the present invention, if the device belongs to a first switch connected to a source node, the obtaining module is specifically configured to, in a processing procedure of determining a data type of the data to be transmitted:
the method comprises the steps that a current switch receives original data sent by a source node, and the original data are converted according to a preset frame format to obtain data to be transmitted;
and determining the protocol type of the original data, and determining the data type of the data to be transmitted according to the protocol type.
According to a network communication device provided by the present invention, if the device belongs to an intermediate switch or a first switch connected to a destination node, the obtaining module is specifically configured to, in a process of determining a data type of the data to be transmitted:
acquiring a preset field of the data to be transmitted, and determining a numerical value on the preset field;
and determining the data type of the data to be transmitted according to the numerical value on the preset field.
According to the network communication device provided by the invention, the hot backup data type corresponds to a hot backup routing strategy, and the warm backup data type corresponds to a warm backup routing strategy;
the hot standby routing policy comprises: if the fault link exists according to the state of each link, keeping the initial routing topology unchanged;
the warm backup routing strategy comprises: and if the fault link exists according to the state of each link, updating the initial routing topology according to the fault link.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor executes the program to implement the steps of the network communication method.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the network communication method as described above.
According to the network communication method, the device, the electronic equipment and the storage medium, the corresponding routing strategy is determined according to the data type, the new routing topology is obtained based on each link state on the routing topology according to the routing strategy and each link state, the data forwarding process is completed according to the new routing topology, the consideration from multiple backup data types is realized, the compatible processing of multiple backup forwarding modes is realized in one network, and the adaptability of data transmission is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flow chart illustrating a network communication method provided by the present invention;
FIG. 2 is a schematic diagram of connections between devices in a dual redundant backup network system according to the present invention;
FIG. 3 is a schematic diagram of normal communication of warm backup provided by the present invention;
FIG. 4 is a first schematic diagram illustrating an abnormal communication of a warm backup link according to the present invention;
FIG. 5 is a schematic diagram of an abnormal communication of the warm backup link according to the present invention;
FIG. 6 is a third schematic diagram of the abnormal communication of the warm backup link according to the present invention;
FIG. 7 is a fourth schematic diagram of the abnormal communication of the warm backup link according to the present invention;
FIG. 8 is a fifth schematic diagram of the abnormal communication of the warm backup link according to the present invention;
FIG. 9 is a first schematic diagram of a warm backup routing topology provided by the present invention;
FIG. 10 is a second schematic diagram of a warm backup routing topology provided by the present invention;
FIG. 11 is a schematic diagram of a hot standby communication provided by the present invention;
FIG. 12 is a schematic diagram of a network communication device according to the present invention;
fig. 13 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The network communication method, apparatus, electronic device and storage medium provided by the present invention are described below with reference to fig. 1 to 13.
The invention provides a network communication method, which is suitable for a dual-redundancy backup network system, wherein the dual-redundancy backup network system comprises at least two groups of switch sets and a plurality of network nodes, each group of switch sets comprises two switches which are mutually backed up, and each switch is provided with a routing strategy. In the system, a hot backup mode and a warm backup mode can be adopted for data transmission. For this reason, the routing policy is also correspondingly divided into a hot backup routing policy and a warm backup routing policy.
In the invention, each data transmission process is completed by interaction between two groups of exchange sets which are in communication relation with each other. For this purpose, the switches in the two groups of switch groups establishing the communication relationship establish a routing topology with the source node and the destination node.
In the present invention, one network node (source node) transmits data to another network node (destination node) through two switch groups in communication with each other.
Fig. 1 shows a flow diagram of a network communication method provided by the present invention, and referring to fig. 1, the method includes:
11. the current switch acquires data to be transmitted and determines the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type;
12. the current switch determines a corresponding routing strategy according to the data type;
13. the current switch acquires the state of each link on the routing topology, and a new routing topology is obtained according to the routing strategy and the state of each link;
14. and the current switch sends the data to be transmitted to the next switch or the destination node according to the new routing topology.
With respect to the above steps 11 to 14, it should be noted that, in the present invention, two groups of switch groups are in communication with each other, a source node (i.e. a party sending data) establishes a link with a switch in one of the switch groups, and a destination node (i.e. a party receiving data) establishes a link with a switch in the other switch group.
The method is suitable for the communication process of the source node and the destination node in the two groups of exchange sets establishing the communication relationship. The current switch mentioned in the above steps is the switch to be subjected to the data forwarding action in the two groups of switch groups.
In the invention, after the current switch acquires the data to be transmitted, the next switch for executing data forwarding or the destination node needs to be determined so as to forward the data to be transmitted to the next switch or the destination node.
In the present invention, as shown in fig. 2, the network nodes in the dual redundant backup network system include FC nodes and ethernet nodes. The FC node belongs to an FC network, and the FC network is a new high-speed network which is parallel to the traditional TCP/IP network. The FC nodes communicate with each other through an FC-AE-1553 protocol and an IPFC protocol. An ethernet node belongs to the ethernet, which is a kind of local area network. The Ethernet nodes communicate with each other through an Ethernet protocol.
The FC node and the ethernet node may also communicate with each other using the IPFC protocol and the ethernet protocol, but require a switch for protocol conversion.
Therefore, in the invention, the communication protocols adopted by the FC node and the Ethernet node are uniformly converted into a preset frame format (such as FC frame format) in the switch for data exchange.
In the invention, the FC-AE-1553 protocol adopts a hot backup communication mode, two channels simultaneously transmit data, and redundancy removal processing is carried out during receiving. The IPFC protocol and the Ethernet protocol adopt a warm backup mode, one channel is adopted by default to carry out data sending and receiving processing, and if the default communication channel fails, the other channel is automatically switched to carry out data sending and receiving.
Therefore, the data types of the data to be transmitted include a hot backup data type and a warm backup data type.
In the present invention, a hot backup routing policy (i.e. a static routing policy) is adopted for data of a hot backup data type, and the hot backup routing policy includes: and if the fault link exists according to the state of each link, keeping the initial routing topology unchanged. That is, the switch does not update the initially configured routing topology according to network failure or the like.
And adopting a warm backup routing strategy (namely a dynamic routing strategy) aiming at the data of the warm backup data type. The warm backup routing strategy comprises the following steps: and if the fault link exists according to the state of each link, updating the initial routing topology according to the fault link. That is, the switch recalculates the routing topology according to the network failure, and notifies the switches cascaded with the switch to ensure that all switches in the network can complete the routing topology updating.
Therefore, in the invention, the current switch determines the corresponding routing strategy according to the data type. And simultaneously acquiring the states of all links on the routing topology in real time. The link state comprises the connection and disconnection of a link between the node and the switch and the connection and disconnection of a link between the switch and the switch.
Then, the current switch obtains a new routing topology according to the routing strategy and the states of all the links. Here, for the hot-standby routing policy, since the original routing topology is not changed, for this reason, the new routing topology is still the original routing topology. For the warm backup routing strategy, the new routing topology is the updated routing topology due to the change of the initial routing topology.
And then, the current switch sends the data to be transmitted to the next switch or a destination node according to the new routing topology.
In the invention, aiming at the routing topology of the warm backup, when all switches, nodes and link communication in a network are normal, the link communication can be established among default switches, but the initial routing topology does not transmit data through the switches in the same switch group for the time.
For a hot-standby routing topology, switches in the same switch group do not establish link communication in the network.
In the communication network, the data transmission adopts the modes of unicast, multicast and broadcast data forwarding.
The unicast data forwarding mode is a one-to-one communication mode, and the switch in the network only forwards data and does not copy the data.
The multicast data forwarding mode is a one-to-one communication mode.
The broadcast data forwarding mode is a one-to-many communication mode.
Therefore, in the invention, no matter in a unicast, multicast or broadcast data forwarding mode, each data transmission process is completed by two groups of switch groups establishing a communication relationship. Each data transmission process is performed according to the above steps.
According to the network communication method provided by the invention, the corresponding routing strategy is determined according to the data type, the new routing topology is obtained according to the routing strategy and each link state on the basis of each link state on the routing topology, the data forwarding process is completed according to the new routing topology, the consideration from multiple backup data types is realized, the compatible processing of multiple backup forwarding modes is realized in one network, and the adaptability of data transmission is improved.
In the further explanation of the network communication method, the processing procedure for determining the data type of the data to be transmitted is mainly explained as follows:
in the invention, the data sent by the source node is forwarded through the exchanger in one exchanger group, then through the exchanger in another exchanger group, and finally forwarded to the destination node. To this end, different switches differ in the way data is processed.
If the current switch is the first switch connected with the source node, determining the data type of the data to be transmitted, specifically:
the method comprises the steps that a current switch receives original data sent by a source node, and the original data are converted according to a preset frame format to obtain data to be transmitted;
determining the protocol type of the original data, and determining the data type of the data to be transmitted according to the protocol type.
In this regard, it should be noted that, based on the above description of the communication protocols of different network nodes, in the present invention, the FC-AE-1553 protocol adopts a hot backup communication mode. The IPFC protocol and the Ethernet protocol adopt a warm backup mode.
For this purpose, a first switch connected to the source node receives raw data transmitted from the source node, the raw data being data related to the own communication protocol of the own node. The switch converts the original data according to a preset frame format to obtain the data to be transmitted, thereby facilitating the subsequent data forwarding. Meanwhile, the data type of the data to be transmitted can be determined according to the protocol type.
If the current switch is an intermediate switch or a first switch connected with the destination node, determining the data type of the data to be transmitted, specifically:
acquiring a preset field of data to be transmitted, and determining a numerical value on the preset field;
and determining the data type of the data to be transmitted according to the numerical value on the preset field.
In this regard, it should be noted that, since the intermediate switch or the first switch connected to the destination node receives the data converted by the first switch connected to the source node. The data does not have the communication protocol of the original data. However, the first switch connected to the source node will configure a value capable of distinguishing the data type in a predetermined field of the data during the conversion process. For this reason, the other switches need to determine the data type of the data to be transmitted according to the value in the preset field.
For example, due to the difference of communication paths used by the hot backup and the warm backup in communication, when data is transmitted, the hot backup data and the warm backup data are defined by distinguishing according to the reserved bit of the F _ CTL field of the FC frame, the F _ CTL field has 24 bits in total, the F _ CTL field is distinguished by using the reserved bit10 in a backup manner, when bit10 is 0, the hot backup data is represented, and when bit10 is 1, the warm backup data is represented.
In the further explanation of the network communication method, the process of obtaining the link states on the routing topology and obtaining a new routing topology according to the routing policy and the link states is mainly explained as follows:
and when the fault link is determined to exist according to the state of each link, keeping the original routing topology unchanged. And sending the data to be transmitted to the next switch or the destination node according to the initial routing topology.
And when the fault link exists according to the state of each link, updating the initial routing topology according to the fault link to obtain a new routing topology. And sending the data to be transmitted to the next switch or the destination node according to the new routing topology.
In the further method of the method, based on each link state on the routing topology, the new routing topology is obtained according to the routing strategy and each link state, the data forwarding process is completed according to the new routing topology, the consideration of multiple backup data types is realized, the compatible processing of multiple backup forwarding modes is realized in one network, and the adaptability of data transmission is improved.
The following explains the unicast, multicast and broadcast data forwarding modes of the data in the network by adopting the warm backup mode and the hot backup mode respectively:
the warm backup unicast communication selects the communication between the ethernet node 1 and the ethernet node 2 in the network as an example to explain the implementation scheme.
When the network devices (switches and nodes) and link communication are normal, the ethernet node 1 and the ethernet node 2 both perform ethernet communication through the a route, data forwarding is performed between the switches according to a default route, data transmission is not performed between the switch 21 and the switch 22 according to a default route topology, and a communication link between the ethernet node 1 and the ethernet node 2 is 1- >2- >3, as shown in fig. 3.
When the link 1 fails, the ethernet node 1 switches to use the B-path for communication, the routing topology of the switch updates the routing topology according to the link connection state, and the communication link between the ethernet node 1 and the ethernet node 2 is 4- >7- >2- >3, as shown in fig. 4.
When the link 3 fails, the ethernet node 2 switches to use the B route for communication, the switch routing topology updates the routing topology according to the link connection state, and the communication link between the ethernet node 1 and the ethernet node 2 is 1- >7- >5- >6, as shown in fig. 5.
When the link 2 fails, each switch reestablishes a generated routing topology, establishes a communication connection between the switch 21 and the switch 22, and the communication links between the ethernet node 1 and the ethernet node 2 are 1- >7- >5- >8- >3, as shown in fig. 6.
When both the link 1 and the link 2 fail, the ethernet node 1 switches to use the B path for communication, each switch reestablishes the spanning tree topology, establishes a communication connection between the switch 21 and the switch 22, and the communication link between the ethernet node 1 and the ethernet node 2 is 4- >5- >8- >3, as shown in fig. 7.
When both the link 1 and the link 3 fail, both the ethernet node 1 and the ethernet node 2 switch to use the B-path for communication, and the communication link between the ethernet node 1 and the ethernet node 2 is 4- >5- >6, as shown in fig. 8.
The preparation work of each device in the warm backup multicast communication scheme is as follows:
1) an Ethernet node:
the Ethernet node sends out corresponding IGMP protocol message when joining the multicast group or quitting the multicast group; after the Ethernet node joins the multicast group, the multicast data can be transmitted and received.
2) FC node:
when the FC node is used for IPFC protocol communication, corresponding IGMP protocol messages are sent out when the FC node is added to a multicast group or quits the multicast group, and the IGMP protocol messages are packaged according to the IPFC protocol; after the FC node joins the multicast group, the transmitting and receiving of the IPFC protocol multicast data can be carried out.
3) The switch will forward the multicast data packet according to the self-maintained multicast routing table;
the exchanger carries out protocol conversion according to IGMP protocol messages sent by the Ethernet nodes, and packages and sends the messages to the exchange module according to an IPFC protocol;
the switch directly receives an IGMP protocol message encapsulated by an IPFC protocol sent by an FC node;
after receiving an IGMP protocol message encapsulated by an IPFC protocol, the switch updates a maintained multicast data forwarding table;
one switch between the switches in the network takes the role of the multicast router to realize the convergence and management work of the multicast routing information of the whole network; when the multicast routing of other switches changes, the multicast router is informed, and the multicast router also synchronizes the multicast routing information to other switches in the network;
when the switch which takes the role of the multicast router is down, the multicast router is reselected according to the network protocol.
The warm backup broadcast communication scheme is as follows:
the physical looped network is converted into the routing topology of the logical topology tree through the Spanning Tree Protocol (STP) between the switches, and further the broadcast storm is avoided.
As shown in fig. 3, in the case where the links are all connected normally, there is a communication loop of 2- >8- >5- > 7; the switch can realize the shielding function of part of the links by using the spanning tree protocol, and shields the number 8 switching link by using the switch 11 as a root node, and the generated topology tree is shown in fig. 9.
When the ethernet node 1 transmits broadcast through the link No. 1, the switch 11 will forward the data inside the switch according to the forwarding table generated by the topology tree, and forward the data to the switch 12 and the switch 21 through the cascade interface. The broadcast data received by the switch 12 will be forwarded to the switch 22, the broadcast data received by the switch 21 will not be forwarded to the switch 22, and the broadcast data received by the switch 22 will not be forwarded to the switch 21.
When the link 2 fails, the topology tree between the switch 11 and the switch 21 disappears, and the spanning tree protocol is updated, and the updated topology tree is shown in fig. 10.
The hot backup unicast communication selects FC node 1 and FC node 2 in the network as an example to implement hot backup scheme description, and the routing topology is shown in fig. 11.
According to the routing topology, the link 7 and the link 8 do not perform any data forwarding, and the two links in the network can be considered to be absent in the hot backup communication. The communication links of FC node 1 and FC node 2 are two, 1- >2- >3 and 4- >5- >6 respectively, so that the communication between FC node 1 and FC node 2 is not affected by the disconnection of either link alone in the network.
When two or three of link 1, link 2, and link 3 in the network are broken, communication between the two nodes is not affected because there is a 4- >5- >6 transmission link between FC node 1 and FC node 2.
When two or three of links 4, 5, and 6 in the network are broken, communication between the two nodes is not affected because there is a 1- >2- >3 transmission link between FC node 1 and FC node 2.
In addition, the FC node hot backup multicast or broadcast communication carries out table lookup and forwarding processing in the switch according to the routing topology according to the multicast ID.
The network communication device provided by the present invention is described below, and the network communication device described below and the network communication method described above may be referred to with reference to each other
As shown in fig. 12, the present invention further provides a network communication apparatus, which is suitable for a dual redundancy backup network system, where the dual redundancy backup network system includes at least two switch groups and a plurality of network nodes, each switch group includes two switches that are backup to each other, and each switch is configured with a routing policy; the switches in the two groups of switch sets establishing the communication relation establish a routing topology with the source node and the destination node; the device comprises an obtaining module 121, a determining module 122, a processing module 123 and a forwarding module 124, wherein:
an obtaining module 121, configured to obtain data to be transmitted, and determine a data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type;
a determining module 122, configured to determine a corresponding routing policy according to the data type;
a processing module 123, configured to obtain states of links on the routing topology, and obtain a new routing topology according to the routing policy and the states of the links;
and the forwarding module 124 is configured to send the data to be transmitted to a next switch or a destination node according to the new routing topology.
In a further description of the foregoing apparatus, if the apparatus belongs to a first switch connected to a source node, the obtaining module is specifically configured to, in a processing process of determining a data type of the to-be-transmitted data:
the method comprises the steps that a current switch receives original data sent by a source node, and the original data are converted according to a preset frame format to obtain data to be transmitted;
and determining the protocol type of the original data, and determining the data type of the data to be transmitted according to the protocol type.
In a further description of the foregoing apparatus, if the apparatus belongs to an intermediate switch or a first switch connected to a destination node, the obtaining module is specifically configured to, in a processing process of determining a data type of the data to be transmitted:
acquiring a preset field of the data to be transmitted, and determining a numerical value on the preset field;
and determining the data type of the data to be transmitted according to the numerical value on the preset field.
In further description of the above apparatus, the hot backup data type corresponds to a hot backup routing policy, and the warm backup data type corresponds to a warm backup routing policy;
the hot standby routing policy comprises: if the fault link exists according to the state of each link, keeping the initial routing topology unchanged;
the warm backup routing strategy comprises: and if the fault link exists according to the state of each link, updating the initial routing topology according to the fault link.
Since the principle of the apparatus according to the embodiment of the present invention is the same as that of the method according to the above embodiment, further details are not described herein for further explanation.
It should be noted that, in the embodiment of the present invention, the relevant functional module may be implemented by a hardware processor (hardware processor).
The network communication device provided by the invention determines the corresponding routing strategy according to the data type, obtains the new routing topology according to the routing strategy and each link state on the basis of each link state on the routing topology, completes the data forwarding process according to the new routing topology, realizes the consideration from multiple backup data types, realizes the compatible processing of multiple backup forwarding modes in one network and improves the adaptability of data transmission.
Fig. 13 is a schematic physical structure diagram of an electronic device, which may include, as shown in fig. 13: a processor (processor)131, a communication Interface (Communications Interface)132, a memory (memory)133 and a communication bus 134, wherein the processor 131, the communication Interface 132 and the memory 133 complete communication with each other through the communication bus 134. Processor 131 may invoke logic instructions in memory 133 to perform a network communication method comprising: acquiring data to be transmitted, and determining the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type; determining a corresponding routing strategy according to the data type; acquiring each link state on the routing topology, and acquiring a new routing topology according to the routing strategy and each link state; and sending the data to be transmitted to the next switch or the destination node according to the new routing topology.
In addition, the logic instructions in the memory 133 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the network communication method provided by the above methods, the method comprising: acquiring data to be transmitted, and determining the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type; determining a corresponding routing strategy according to the data type; acquiring each link state on the routing topology, and acquiring a new routing topology according to the routing strategy and each link state; and sending the data to be transmitted to the next switch or the destination node according to the new routing topology.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the network communication method provided above, the method comprising: acquiring data to be transmitted, and determining the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type; determining a corresponding routing strategy according to the data type; acquiring each link state on the routing topology, and acquiring a new routing topology according to the routing strategy and each link state; and sending the data to be transmitted to the next switch or the destination node according to the new routing topology.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A network communication method is characterized in that the method is suitable for a dual-redundancy backup network system, the dual-redundancy backup network system comprises at least two groups of switch sets and a plurality of network nodes, each group of switch sets comprises two switches which are backups of each other, and each switch is provided with a routing strategy; the switches in the two groups of switch sets establishing the communication relation establish a routing topology with the source node and the destination node; the method comprises the following steps:
the method comprises the steps that a current switch obtains data to be transmitted and determines the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type;
determining a corresponding routing strategy according to the data type;
acquiring each link state on the routing topology, and acquiring a new routing topology according to the routing strategy and each link state;
sending the data to be transmitted to a next switch or a destination node according to the new routing topology;
the hot backup data type corresponds to a hot backup routing strategy, and the warm backup data type corresponds to a warm backup routing strategy;
the hot standby routing policy comprises: if the fault link exists according to the state of each link, keeping the initial routing topology unchanged;
the warm backup routing strategy comprises: and if the fault link exists according to the state of each link, updating the initial routing topology according to the fault link.
2. The network communication method according to claim 1, wherein determining the data type of the data to be transmitted if the current switch is a first switch connected to a source node comprises:
the method comprises the steps that a current switch receives original data sent by a source node, and the original data are converted according to a preset frame format to obtain data to be transmitted;
and determining the protocol type of the original data, and determining the data type of the data to be transmitted according to the protocol type.
3. The network communication method according to claim 1, wherein determining the data type of the data to be transmitted if the current switch is an intermediate switch or a first switch connected to a destination node comprises:
acquiring a preset field of the data to be transmitted, and determining a numerical value on the preset field;
and determining the data type of the data to be transmitted according to the numerical value on the preset field.
4. A network communication device is characterized in that the device is suitable for a dual-redundancy backup network system, the dual-redundancy backup network system comprises at least two groups of switch sets and a plurality of network nodes, each group of switch sets comprises two switches which are backups of each other, and each switch is provided with a routing strategy; the switches in the two groups of switch sets establishing the communication relation establish a routing topology with the source node and the destination node; the device comprises:
the acquisition module is used for acquiring data to be transmitted and determining the data type of the data to be transmitted; the data types comprise a hot backup data type and a warm backup data type;
the determining module is used for determining a corresponding routing strategy according to the data type;
the processing module is used for acquiring each link state on the routing topology and obtaining a new routing topology according to the routing strategy and each link state;
the forwarding module is used for sending the data to be transmitted to a next switch or a destination node according to the new routing topology;
the hot backup data type corresponds to a hot backup routing strategy, and the warm backup data type corresponds to a warm backup routing strategy;
the hot standby routing policy comprises: if the fault link exists according to the state of each link, keeping the initial routing topology unchanged;
the warm backup routing strategy comprises: and if the fault link exists according to the state of each link, updating the initial routing topology according to the fault link.
5. The network communication device according to claim 4, wherein if the device belongs to a first switch connected to a source node, the obtaining module is specifically configured to, in the processing procedure of determining the data type of the data to be transmitted:
the method comprises the steps that a current switch receives original data sent by a source node, and the original data are converted according to a preset frame format to obtain data to be transmitted;
and determining the protocol type of the original data, and determining the data type of the data to be transmitted according to the protocol type.
6. The network communication device according to claim 4, wherein if the device belongs to an intermediate switch or a first switch connected to a destination node, the obtaining module is specifically configured to, during the processing of determining the data type of the data to be transmitted:
acquiring a preset field of the data to be transmitted, and determining a numerical value on the preset field;
and determining the data type of the data to be transmitted according to the numerical value on the preset field.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the network communication method according to any of claims 1 to 3 are implemented when the processor executes the program.
8. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the network communication method according to any one of claims 1 to 3.
CN202110428185.6A 2021-04-21 2021-04-21 Network communication method, device, electronic equipment and storage medium Active CN112995041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110428185.6A CN112995041B (en) 2021-04-21 2021-04-21 Network communication method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110428185.6A CN112995041B (en) 2021-04-21 2021-04-21 Network communication method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112995041A CN112995041A (en) 2021-06-18
CN112995041B true CN112995041B (en) 2021-10-01

Family

ID=76341388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110428185.6A Active CN112995041B (en) 2021-04-21 2021-04-21 Network communication method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112995041B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595792B (en) * 2021-07-28 2022-08-19 中国人民解放军国防科技大学 Target task link generation method and device, computer equipment and storage medium
CN116418682A (en) * 2021-12-30 2023-07-11 苏州盛科通信股份有限公司 Method and device for generating data screening topological structure
CN114222209A (en) * 2022-02-21 2022-03-22 北京国科天迅科技有限公司 Method and device for realizing routing of hybrid protocol switching network and network switching equipment
CN117675535A (en) * 2023-12-14 2024-03-08 北京国科天迅科技股份有限公司 Dual-redundancy communication method and device based on port routing management and computer equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491619A (en) * 2020-11-25 2021-03-12 东北大学 Self-adaptive distribution technology for service customized network resources based on SDN

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5684800A (en) * 1995-11-15 1997-11-04 Cabletron Systems, Inc. Method for establishing restricted broadcast groups in a switched network
CN104158753B (en) * 2014-06-12 2017-10-24 南京工程学院 Dynamic stream scheduling method and system based on software defined network
CN105978741A (en) * 2016-07-15 2016-09-28 清华大学深圳研究生院 Network fault handling method and system
CN108282359A (en) * 2017-12-27 2018-07-13 北京控制工程研究所 A kind of raising time triggered Ethernet data transmission reliability system
CN108809857B (en) * 2018-05-23 2020-04-28 中国石油大学(华东) SDN-based traffic monitoring and service quality assurance strategy method
CN111049859A (en) * 2019-12-27 2020-04-21 东南大学 Attack traffic shunting and blocking method based on topology analysis

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491619A (en) * 2020-11-25 2021-03-12 东北大学 Self-adaptive distribution technology for service customized network resources based on SDN

Also Published As

Publication number Publication date
CN112995041A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN112995041B (en) Network communication method, device, electronic equipment and storage medium
CN112769587B (en) Forwarding method, equipment and storage medium for access traffic of dual homing device
JP4743201B2 (en) Packet ring network system, connection method between packet rings, and connection node between rings
EP2533475B1 (en) Method and system for host route reachability in packet transport network access ring
CN101999224B (en) Redundant Ethernet automatic protection switching access to virtual private lan services
US8345699B2 (en) System and method for enabling a remote instance of a loop avoidance protocol
US7792056B2 (en) Lightweight node based network redundancy solution leveraging rapid spanning tree protocol (RSTP)
US8284658B2 (en) Method for reconfiguring a communications network
US20080068985A1 (en) Network redundancy method and middle switch apparatus
US7778204B2 (en) Automatic maintenance of a distributed source tree (DST) network
JP4790591B2 (en) Ring node device
US9385944B2 (en) Communication system, path switching method and communication device
EP2339791B1 (en) Method for forwarding protocol frames in spanning rings and a shared node of multi-rings in the ethernet
EP1804423A2 (en) Method for rapidly recovering multicast service and network device
US9590815B2 (en) Relay system and switching device
US20160014032A1 (en) Method and Device for Flow Path Negotiation in Link Aggregation Group
JP2013519268A (en) Data transfer method, data transfer apparatus, and data transfer system
JP2007208369A (en) Network system and node redundancy method therefor
CN112422307A (en) Method, equipment and system for coexistence of EVPN and VPLS
CN113259235B (en) IPv 6-based dual-active route redundancy method and system
CN112671642A (en) Message forwarding method and device
CN112995002B (en) Switch ring network design method, switch and storage medium
US8493844B2 (en) Method for the reconfiguration of a communications network
CN101848128A (en) Method, system and topological structure for realizing stabilized communication among multi-ring topologies
CN113810297B (en) Multi-network converged train network system and communication method thereof

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
CP03 Change of name, title or address

Address after: 701, 7th Floor, Building 6, Courtyard 8, Kegu 1st Street, Daxing District Economic and Technological Development Zone, Beijing, 100176

Patentee after: Beijing Tasson Technology Ltd.

Address before: 100744 room 701, 7th floor, building 6, courtyard 8, KEGU 1st Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee before: BEIJING TASSON TECHNOLOGY Ltd.

CP03 Change of name, title or address