WO2018000135A1 - Network switching device and time slot exchange method - Google Patents

Network switching device and time slot exchange method Download PDF

Info

Publication number
WO2018000135A1
WO2018000135A1 PCT/CN2016/087340 CN2016087340W WO2018000135A1 WO 2018000135 A1 WO2018000135 A1 WO 2018000135A1 CN 2016087340 W CN2016087340 W CN 2016087340W WO 2018000135 A1 WO2018000135 A1 WO 2018000135A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
switching device
network switching
ports
exchange
Prior art date
Application number
PCT/CN2016/087340
Other languages
French (fr)
Chinese (zh)
Inventor
程浩
程宏涛
赵冠凯
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201680086677.9A priority Critical patent/CN109314658A/en
Priority to PCT/CN2016/087340 priority patent/WO2018000135A1/en
Publication of WO2018000135A1 publication Critical patent/WO2018000135A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/14Two-way operation using the same type of signal, i.e. duplex
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/50Circuit switching systems, i.e. systems in which the path is physically permanent during the communication
    • H04L12/52Circuit switching systems, i.e. systems in which the path is physically permanent during the communication using time division techniques

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a network switching device and a method for time slot exchange.
  • the switch fabric is an important part of the network switching device. It directly determines the application performance of the network switching device.
  • the network switching device can be a router or a switch.
  • Crossbar is called crossbar matrix or crossbar switch matrix. It is the industry's recognized switch fabric for building high-capacity systems. The first three switch fabrics share bandwidth to some extent, and the Crossbar switch fabric adopts The matrix structure implements non-blocking switching, breaking the bandwidth limitation.
  • Each port in the Crossbar architecture has a certain number of cache structures.
  • the slot exchange of the Crossbar architecture refers to the exchange of service data in the cache structure of different ports. Since the exchange relationship between the output port and the input port of the Crossbar switch fabric is random, in order to avoid conflicts in the data exchange process, the prior art is for the N ⁇ N Crossbar architecture, that is, N input ports and N Output port, need to set up N 2 cache structure.
  • the hardware redundancy of the Crossbar switch fabric is very large, wasting hardware resources, and the hardware consumed by the Crossbar switch fabric increases exponentially with the number of ports.
  • the Crossbar architecture is increased from 4 ports to 5 ports.
  • the number of cache structures will increase from 16 to 25. Due to the high hardware consumption, it is difficult to continue to expand when the existing Crossbar switch fabric switch ports reach tens or hundreds of scales.
  • the object of the present invention is to provide a network switching device and a time slot exchange method for solving the present problem.
  • a first aspect provides a network switching device, including: a processor, N ports, at least N memories, each of the memories corresponding to one of the ports; N being a positive integer greater than 1; Storing service data received by the corresponding port in each time slot; wherein the memory includes a plurality of storage areas, each of the storage areas storing a service received by the port in a time slot corresponding to the storage area Data; the processor is configured to exchange, between the ports, the service data separately stored by the at least N memories in a switching period; wherein the switching period includes multiple time slots, each of the In the time slot, the processor controls each of the storage areas of the memory to be written into the service data or read a piece of the service data.
  • the number of memories included in the network switching device is linearly related to the number of ports of the network switching device, that is, the number of memories increases linearly with the number of network device ports, and the amount of memory can be at least The number of ports is the same.
  • the number of memory of the network switching device is the square of the number of ports.
  • the network switching device provided by the present invention reduces hardware consumption, and at the same time, since the storage area of each memory is in the same time slot. Write a unique business data or read a unique business data, thus avoiding conflicts caused by time slot exchange.
  • the first port is in a duplex mode, and the first port is any one of the at least N ports; For: using the first port as an input port; storing, in the switching cycle, the service data stored in each storage area of the memory corresponding to the first port in a memory corresponding to the other ports . That is to say, the network switching device completes a service exchange in one switching cycle, that is, it needs to read all the storage areas in each memory once.
  • the second port is in a duplex mode, and the second port is any one of the at least N ports; And the second port is used as an output port, in which the service data is respectively read from the memory corresponding to the other port and each memory of the memory corresponding to the second port is written.
  • the network switching device needs to write once for all storage areas in each memory in one switching cycle.
  • the network switching device includes a preset routing table, where the routing table includes a time slot exchange relationship between each of the ports;
  • the time slot exchange relationship indicates data exchange between any two of the at least N memories;
  • the processor is further configured to determine an execution time of each time slot exchange in the routing table,
  • the conflict-free routing table is configured to: exchange, according to the conflict-free routing table, the service data separately stored by the at least N memories in the exchange period between the ports.
  • the time slot exchange relationship between each of the ports is related to the service handled by the network switching device.
  • the device includes N memories, and the memory corresponds to the port one-to-one . That is to say, in the specific implementation of the present invention, the number of memories and the number of ports can be the same, and the present invention reduces hardware consumption compared to the number of ports in the existing network switching device is the square of the number of ports.
  • a method for time slot switching is provided, the method being used for a network switching device, where the network switching device includes N ports, at least N memories, each of the memories corresponding to one of the ports, The memory includes a plurality of storage areas, each of the storage areas storing service data received by the port in a time slot corresponding to the storage area, where N is a positive integer greater than one; the method includes: the network switching The device reads the service data stored in each storage area of the memory corresponding to the input port during the exchange period; the network switching device writes a service to each storage area of the memory corresponding to the output port in the exchange period Data; wherein the switching period includes a plurality of the time slots, and in each of the time slots, the network switching device controls each of the storage areas in the memory to be written into the service data Or read a copy of the business data.
  • the first port is In the duplex mode, the first port is any one of the at least N ports; the network switching device reads service data stored in each storage area of the memory corresponding to the input port during the switching period, including The network switching device uses the first port as an input port; the network switching device separately writes the service data stored in each storage area of the memory corresponding to the first port in the switching cycle Corresponding to the memory of the other port.
  • the second port is in a duplex mode, and the second port is any one of the at least N ports;
  • the network switching device Writing a service data to each storage area of the memory corresponding to the output port during the exchange period specifically includes: the network switching device uses the second port as an output port; and the network switching device is in the exchange In the cycle, the service data is respectively read from the memory corresponding to the other ports and written into each storage area of the memory corresponding to the second port.
  • the network switching device includes a preset routing table, where the routing table includes a time slot exchange relationship between each of the ports; The time slot exchange relationship indicates data exchange between any two of the at least N memories; the method further comprising: the network switching device determining execution of each time slot exchange in the routing table At the moment, obtaining a collision-free routing table; the network switching device reads the service data stored in each storage area of the memory corresponding to the input port in the exchange period, and stores the memory corresponding to the output port in the exchange period Writing, by the storage area, a service data, comprising: the network switching device reading the service data stored in each storage area of the memory corresponding to the input port in the exchange period according to the conflict-free routing table, and in the A service data is written to each storage area of the memory corresponding to the output port during the exchange period.
  • each of the memory stores M service data, where the switching period includes at least M Time slots.
  • a computer readable medium for storing a computer program comprising instructions for performing the method of any of the second aspect or any of the possible implementations of the second aspect.
  • FIG. 1 is a schematic diagram of a Crossbar switching architecture in the prior art
  • FIG. 2 is a schematic diagram of an output port in the Crossbar switch fabric shown in FIG. 1 reading data from an input port;
  • FIG. 3 is a schematic diagram of inputting data from an output port of an input port in the Crossbar switching architecture shown in FIG. 1;
  • FIG. 4 is a schematic structural diagram of a network switching device according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of an output port in the Crossbar switch fabric shown in FIG. 4 reading data from an input port;
  • FIG. 6 is a schematic diagram of an output port in the Crossbar switching architecture shown in FIG. 4 reading data from an input port;
  • FIG. 7 is a schematic flowchart diagram of a method for time slot exchange according to an embodiment of the present invention.
  • the technology described in this paper can be used in various communication systems, such as 2G systems such as Global System for Mobile Communications (GSM), Wideband Code Division Multiple Access (English name: Wideband Code Division Multiple Access Wireless) 3G system such as WCDMA), 4G system such as Long Term Evolution (LTE) system, 5G communication system of LTE subsequent evolution, and wireless local area network (English name: wireless local area network, referred to as: WLAN)
  • GSM Global System for Mobile Communications
  • WCDMA Wideband Code Division Multiple Access
  • 4G system such as Long Term Evolution (LTE) system
  • 5G communication system of LTE subsequent evolution and wireless local area network
  • WLAN wireless local area network
  • the Crossbar architecture consists of an input port, an output port, and a crossbar.
  • the port size is N
  • the input port is denoted by i, 1 ⁇ i ⁇ N
  • the output port is denoted by j, 1 ⁇ j ⁇ N
  • the crosspoint switch is denoted as XP ij.
  • FIG. 1 is a schematic structural diagram of a network switching device adopting a Crossbar switching architecture.
  • the network switching device has a port size of 4, including 16 crosspoint switches.
  • each input port has an independent read cache structure for all output ports, such as Figure 1 shows the read cache structure R shown near each crosspoint switch.
  • Another design is to avoid conflicts when multiple input ports simultaneously write data to the same output port.
  • Each output port has an independent write cache structure for all input ports, as shown in Figure 1.
  • a write cache structure W is shown near each crosspoint switch.
  • Port duplex mode means that the port can transmit in both directions, and it can receive data as well as output data.
  • the duplex mode includes a full duplex mode and a half duplex mode.
  • the port works in full-duplex mode, the port can transmit in both directions at the same time, that is, the port can be used as an output port or an input port at the same time; the port works in half-duplex mode.
  • the port can only transmit in one direction at a time, that is, the port can only be used as an output port or an output port at the same time.
  • the input port 1 and the output port 1 may be a port in a working mode, so that the network switching device shown in FIG. 1 may include four working in duplex mode. Port.
  • Time slot switching refers to the exchange of signals on different ports and different time slots. It should be noted that the time slot exchange used by the network switching device in the embodiment of the present invention may be based on time division multiplexing (English full name: Time Division Multiplex, TDM for short), wherein the TDM exchange is based on the input time slot and the output time. The result of the configuration of the slot can exchange data of the input slot into the same or different output slots.
  • TDM Time Division Multiplex
  • FIG. 1 Still taking the network switching device shown in FIG. 1 as an example, where input port 1 and output port 1 are port 1 on the network switching device, and input port 2 and output port 2 are port 2 on the network switching device, input Port 3 and output port 3 are port 3 on the network switching device, and input port 4 and output port 4 are port 4 on the network switching device.
  • Table 1 below is a schematic diagram of time slot exchange between port 1 and port 4.
  • Each execution time in Table 1 is the start time of performing a data exchange operation, and the duration between two adjacent execution times is one time slot, and the execution time 1 to the execution time 4 in Table 1 are networks.
  • the switching period of the network switching device is specified by the switching protocol adopted by the network switching device, for example, the E1 protocol or the Synchronous Digital Hierarchy (SDH) protocol.
  • p1 refers to port 1
  • p2 refers to port 2
  • p3 refers to port 3
  • p4 refers to port 4.
  • AC1 refers to the first storage area of the service data received by the storage port at the execution time 1 in the cache structure
  • AC2 refers to the second storage area of the service data received by the storage port at the execution time 2 in the cache structure
  • AC3 refers to the cache.
  • the storage area stores the third storage area of the service data received at time 3
  • AC4 refers to the fourth storage area of the service data received by the storage port at the execution time 4 in the cache structure.
  • p1.AC3->p1.AC1 means that the service data in the third storage area in the cache structure corresponding to port 1 is written into the first storage area in the cache structure corresponding to port 1.
  • time slot exchange relationship is determined according to the service processed by the network switching device, that is, if the service handled by the network switching device does not change, the data exchange relationship between the storage areas of all the cache structures is fixed.
  • each time slot exchange is performed and the time slot number is bound. For example, the time slot exchange performed at the execution time 1 is to write data into the first storage area of the cache structure.
  • each column is viewed separately, and each port obtains data from other ports as an output port.
  • each port has an independent cache structure for other ports. For example, at the execution time 2 shown in Table 1, port 3 serves as an input port to the port at the same time. The data written by 1 and port 2 is the data in different cache structures, avoiding conflicts.
  • time slot exchange of the network switching device is illustrated from the perspective of the input port and the output port, respectively.
  • FIG. 2 is a schematic diagram of an output port reading data from an input port.
  • an input port establishes a corresponding independent read buffer structure for all output ports, as shown in FIG. a cache structure in which each output port reads data from a plurality of input ports, for example, the output port 1 is from the cache structure 1 of the input port 1, the cache structure 5 of the input port 2, and the cache structure 9 of the input port 3,
  • the cache structure 13 of the input port 4 reads data.
  • FIG. 3 is a schematic diagram of an input port writing data to an output port.
  • an output port establishes a corresponding independent write cache structure for all input ports, as shown in FIG. a cache structure, wherein each input port writes data to a plurality of output ports, for example, the input port 1 is respectively directed to the cache structure 1 of the output port 1, the cache structure 2 of the output port 2, and the cache structure 4 of the output port 3, The cache structure 4 of the output port 4 writes data.
  • the existing Crossbar switching architecture has the technical problem of excessive hardware consumption.
  • the embodiment of the present invention provides a network switching device and a time slot exchange method, which reduces hardware consumption under the premise of avoiding collision of time slot exchange.
  • the embodiment of the present invention provides a network switching device 40, where the network switching device can be The router can also be a switch. As shown in FIG. 4, the network switching device 40 includes:
  • a processor such as the processor 41 shown in FIG. 4;
  • N ports 42 as shown in Figure 4, port 1, port 2, port 3 and port 4;
  • At least N memories 43 such as memory 1, memory 2, memory 3 and memory 4 as shown in FIG. 4; wherein each of said memories corresponds to one of said ports; N is a positive integer greater than one;
  • the memory may be used to cache business data.
  • the memory 43 is configured to store service data received by a corresponding port in each time slot; wherein the memory 43 includes a plurality of storage areas, each of the storage areas storing the port in a corresponding storage area Service data received in one time slot;
  • the processor 41 is configured to exchange service data stored by the at least N memories in each of the ports during a switching period, where the switching period includes multiple time slots, each of the In the time slot, the processor controls each of the storage areas of the memory to be written into the service data or read a piece of the service data.
  • the network switching device is used, and the number of the memory included in the network switching device is linearly related to the number of ports of the network switching device, that is, the number of the memory increases linearly with the number of the network device ports, compared with the prior art.
  • the number of memories of the network switching device is the square of the number of ports, and the embodiment of the present invention reduces hardware consumption, and at the same time, since the storage area of each memory is written in the same time slot, only one service data is written or is read uniquely. A piece of business data that avoids conflicts that occur when time slots are exchanged.
  • the network switching device provided by the embodiment of the present invention is described in detail below in order to enable a person skilled in the art to better understand the technical solutions provided by the embodiments of the present invention.
  • the processor 41 is specifically configured to use the first port as an input port, and store service data stored in each storage area of the memory corresponding to the first port in a memory corresponding to the other ports in a switching cycle.
  • the first port is any one of the at least N ports, that is, the network switching device completes a service exchange in one switching cycle, that is, needs to perform all storage areas in each memory. Read once.
  • the processor 41 is further configured to use the second port as an output port, in the exchange period
  • Each of the memories corresponding to the other ports is read into each storage area of the memory corresponding to the second port.
  • the second port is any one of the at least N ports, that is, the network switching device needs to write once for all storage areas in each memory in one switching cycle.
  • first port and the second port may be the same port, that is, a port in the duplex mode of the network switching device, which can serve as an input port or an output port at different times.
  • the execution time 1 to the execution time 4 are the times of performing the data exchange operation four times included in one exchange cycle, and each port reads data from other ports as the output port in the exchange cycle. It also writes data to other ports as an output port.
  • each port writes the service data stored in each storage area of its corresponding memory to the memory of the other port under the control of the processor as an input port in one switching cycle, and also serves as an output port.
  • the service data is read from other ports and written into each storage area of the corresponding memory.
  • each memory is written into a single service data or a unique service data is read in one time slot, so that multiple ports are not simultaneously generated to a certain storage area of one port. Data conflict caused by writing or reading data.
  • the memory and the port in the network switching device may have a one-to-one correspondence. That is to say, only one memory is set up for each port of the network switching device.
  • the network switching device exchanges the service data in the storage area of each memory according to the routing table as shown in Table 2, which avoids conflicts between data read and write.
  • the number of memories is the square of the number of ports to avoid data collision. The embodiment of the invention reduces the hardware consumption of the network switching device.
  • each of the memories stores M shares of the service data, that is, the memory includes M storage areas, and the switching period includes at least M time slots.
  • the network switching device can also perform time slot switching in more than M time slots to avoid data collisions.
  • the processor can always calculate a collision-free routing table to ensure that the time slot exchange between the ports does not cause a collision.
  • the network switching device includes a preset routing table, where the routing table includes a slot exchange relationship between each of the ports; the slot exchange relationship indicates any of the at least N memories Data exchange between two storage areas; the processor is further configured to: determine an execution time of each time slot exchange in the routing table, to obtain a collision-free routing table; the processor is specifically configured to: according to the The collision-free way exchanges the service data respectively stored by the at least N memories in the exchange period between the ports.
  • the attribute of the service sent by the upper-layer network of the network switching device to the network switching device determines the data exchange relationship between the storage areas. Therefore, when the network switching device is initially started, the routing table can be preset according to the service. .
  • n color patches each of which is m, and it is randomly placed into a grid matrix of m rows and n columns, and each grid is placed with a color patch, and it is required to take all the color patches in m times. Every Take n times, and ask to take each color column and take only one color block at a time, and each of these color blocks should be different colors.
  • the n color color patches represent n ports, and each color block m represents each port buffer m service data.
  • the network switching device can always calculate the conflict-free routing table according to the preset routing table. So that the network switching device can exchange information without conflict during one switching cycle.
  • the network switching device can calculate the collision-free routing table by using the branching method, the dichotomy method or the Euler path search. Specifically, based on the above mathematical model, the branching method, the dichotomy method or the Euler path search can be used to calculate the collision-free routing. table. It can be understood that the conflict-free routing table can be obtained by other methods, which is not specifically limited in this embodiment of the present invention.
  • time slot exchange of the network switching device provided by the embodiment of the present invention is described below from the perspective of the input port and the output port.
  • FIG. 5 is a schematic diagram of an output port reading data from an input port.
  • the processor controls each output port to read data from a plurality of input ports.
  • the output port 1 is respectively input from the memory 1 of the input port 1.
  • the memory 2 of the input port 2, the memory 3 of the input port 3, and the memory 4 of the input port 4 read the data. It is worth noting that the same output port reads the service data from the memory of the different input ports at different time slots.
  • FIG. 6 is a schematic diagram of an input port writing data to an output port, wherein the processor controls each input port to write data to a plurality of output ports, for example, the input port 1 is respectively directed to the memory 1 of the output port 1, and the output port 2 is The memory 2, the memory 3 of the output port 3, and the memory 4 of the output port 4 write data. It is worth noting that the same input port writes service data to the memory of the different output ports at different time slots.
  • the processor 41 in the embodiment of the present invention may be a central processing unit (English name: Center Processing Unit, abbreviated as CPU).
  • the processor 41 may also be a field programmable gate array (English name: Field Programmable Gate Array, FPGA for short) to implement all operations of the time slot exchange in the embodiment of the present invention, or
  • the processor 41 can also In the case of the CPU and the FPGA, the FPGA and the CPU respectively perform part of the operation of the time slot exchange in the embodiment of the present invention.
  • the memory 43 in the embodiment of the present invention may be a random access memory (English name: Random-Access Memory, RAM for short) for buffering service data, or may be a register file.
  • the storage area is a storage address in the memory, and the storage area may be a physical storage address in the memory or a logical storage address, which is not limited in the present invention.
  • the network switching device shown in FIG. 4 is only an example.
  • the number of ports included in the network switching device is not limited by the present invention.
  • the network switching device may further include other components. Not shown in the figure.
  • the embodiment of the present invention further provides a method for time slot exchange, where the method is applied to a network switching device, where the network switching device includes N ports, at least N memories, and each of the memories corresponds to one of the ports.
  • the memory includes a plurality of storage areas, each of the storage areas storing service data received by the port in a time slot corresponding to the storage area, where N is a positive integer greater than one.
  • the method includes:
  • the network switching device reads, in a switching period, service data stored in each storage area of the memory corresponding to the input port.
  • the network switching device writes a service data to each storage area of the memory corresponding to the output port in the exchange period.
  • the switching period includes a plurality of the time slots, and in each of the time slots, the network switching device controls each of the storage areas in the memory to be written into the service data or is Read a copy of the business data.
  • the storage area of each memory is written into a single service data in the same time slot or a single service data is read, setting a memory for each port does not occur.
  • the number of the memory of the network switching device can be linearly compared with the number of the ports. Compared with the number of the existing network switching devices, the number of the memory increases exponentially with the number of ports, and the embodiment of the present invention reduces hardware consumption and is beneficial to increase. Large exchange scale.
  • the first port is in a duplex mode, and the first port is any one of the at least N ports; then the step S701 includes: the network switching device uses the first port as And inputting, in the exchange period, the service data stored in each storage area of the memory corresponding to the first port is respectively written into a memory corresponding to the other ports. That is to say, the network switching device completes a service exchange in one switching cycle, and needs to read all the storage areas in each memory once.
  • the second port is in a duplex mode, and the second port is any one of the at least N ports; then the step S702 includes: the network switching device uses the second port as an output port The service data is respectively read from the memory corresponding to the other port in the exchange cycle and written into each storage area of the memory corresponding to the second port. That is to say, the network switching device needs to write once for all storage areas in each memory in one switching cycle.
  • the network switching device includes a preset routing table, where the routing table includes a time slot exchange relationship between each of the ports; the time slot exchange relationship Determining data exchange between any two storage areas of the at least N memories; the method specifically includes: determining, by the network switching device, an execution time of each time slot exchange in the routing table, obtaining no a conflict routing table, and reading, according to the conflict-free routing table, service data stored in each storage area of the memory corresponding to the input port in the exchange period, and each of the memories corresponding to the output port in the exchange period The storage area writes a business data.
  • the time slot exchange relationship between each port is related to the service handled by the network switching device.
  • each of the memories stores M pieces of service data
  • the switching period includes at least M time slots.
  • all the memories include four storage areas, and the period lengths of Table 1 and Table 2 are the same, each including four time slots, that is, the embodiment of the present invention and the existing Compared with technology, hardware consumption is reduced without affecting the switching delay.
  • the network switching device may also perform time slot exchange in more than M time slots to avoid data collision.
  • the method for the network switching device to exchange time slots may be implemented in the form of a hardware plus software functional unit.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium and includes a number of instructions for causing a router or switch to perform the above-described method of exchanging time slots.
  • the foregoing storage medium includes various non-volatile storage media that can store data, such as a USB flash drive, a mobile hard disk, a random access memory, a magnetic disk, or an optical disk.

Abstract

A network switching device and a time slot exchange method are used for solving the technical problem that the hardware consumption of the existing crossbar switching architecture is too high. The network switching device comprises a processor, N ports, at least N memories, each of the memories corresponding to one of the ports. The memory is used for storing traffic data received by the corresponding port at each time slot. The memory comprises a plurality of storage areas, each of which stores the traffic data received by the port at one time slot corresponding to the storage area. The processor is used for exchanging traffic data stored in the at least N memories respectively among each of the ports during the exchange cycle. The exchange cycle comprises a plurality of time slots. In each of the time slots, the processor controls each of the storage areas of the memory to be written a piece of traffic data or to be read a piece of traffic data.

Description

网络交换设备及时隙交换的方法Network switching device and method for time slot exchange 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种网络交换设备及时隙交换的方法。The present invention relates to the field of communications technologies, and in particular, to a network switching device and a method for time slot exchange.
背景技术Background technique
交换架构是网络交换设备的重要组成部分,它直接决定了网络交换设备的应用性能,所述网络交换设备可以是路由器,还可以是交换机。随着技术的发展,共出现了四种交换形式的交换架构:总线交换、环形交换、共享内存交换和Crossbar交换。其中,Crossbar被称为交叉开关矩阵或者纵横式交换矩阵,它是业界公认的用于构建大容量系统的首选交换架构,前三种交换架构都在某种程度上共享带宽,而Crossbar交换架构采用矩阵结构实现了无阻塞交换,突破了带宽的限制。The switch fabric is an important part of the network switching device. It directly determines the application performance of the network switching device. The network switching device can be a router or a switch. With the development of technology, there are four exchange forms of exchange architecture: bus switching, ring switching, shared memory switching and Crossbar switching. Among them, Crossbar is called crossbar matrix or crossbar switch matrix. It is the industry's recognized switch fabric for building high-capacity systems. The first three switch fabrics share bandwidth to some extent, and the Crossbar switch fabric adopts The matrix structure implements non-blocking switching, breaking the bandwidth limitation.
Crossbar架构中每个端口设立了一定数量的缓存结构,Crossbar架构的时隙交换是指将不同端口的缓存结构中的业务数据进行交换。由于Crossbar交换架构的输出端口与输入端口之间的交换关系是随机的,因此,为了避免在数据交换过程中产生冲突,现有技术对于N×N的Crossbar架构,即N个输入端口以及N个输出端口,需要设立N2个缓存结构。Each port in the Crossbar architecture has a certain number of cache structures. The slot exchange of the Crossbar architecture refers to the exchange of service data in the cache structure of different ports. Since the exchange relationship between the output port and the input port of the Crossbar switch fabric is random, in order to avoid conflicts in the data exchange process, the prior art is for the N×N Crossbar architecture, that is, N input ports and N Output port, need to set up N 2 cache structure.
由上可知,Crossbar交换架构的硬件冗余非常大,浪费了硬件资源,并且,由于Crossbar交换架构需要消耗的硬件随着端口数呈指数增长,例如,Crossbar架构由4个端口增加到5个端口时,缓存结构的数量将由16个增加到25个。由于硬件消耗过高,现有的Crossbar交换架构的交换端口达到几十或上百规模时,很难再继续扩大。As can be seen from the above, the hardware redundancy of the Crossbar switch fabric is very large, wasting hardware resources, and the hardware consumed by the Crossbar switch fabric increases exponentially with the number of ports. For example, the Crossbar architecture is increased from 4 ports to 5 ports. The number of cache structures will increase from 16 to 25. Due to the high hardware consumption, it is difficult to continue to expand when the existing Crossbar switch fabric switch ports reach tens or hundreds of scales.
发明内容Summary of the invention
本发明的目的是提供一种网络交换设备及时隙交换的方法,用以解决现 有的Crossbar交换架构的硬件消耗过高的技术问题。The object of the present invention is to provide a network switching device and a time slot exchange method for solving the present problem. Some of the hardware of the Crossbar switch fabric consumes too much technical problems.
为了达到上述目的,本发明采用如下的技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:
第一方面,提供一种网络交换设备,包括:处理器,N个端口,至少N个存储器,每个所述存储器对应一个所述端口;N为大于1的正整数;所述存储器用于,存储对应的端口在每个时隙接收到的业务数据;其中,所述存储器包括多个存储区域,每个所述存储区域存储所述端口在对应所述存储区域的一个时隙接收到的业务数据;所述处理器用于,在交换周期内将所述至少N个存储器分别存储的业务数据在各所述端口之间进行交换;其中,所述交换周期包括多个时隙,每个所述时隙中,所述处理器控制所述存储器的每个所述存储区域被写入一份所述业务数据或被读取一份所述业务数据。A first aspect provides a network switching device, including: a processor, N ports, at least N memories, each of the memories corresponding to one of the ports; N being a positive integer greater than 1; Storing service data received by the corresponding port in each time slot; wherein the memory includes a plurality of storage areas, each of the storage areas storing a service received by the port in a time slot corresponding to the storage area Data; the processor is configured to exchange, between the ports, the service data separately stored by the at least N memories in a switching period; wherein the switching period includes multiple time slots, each of the In the time slot, the processor controls each of the storage areas of the memory to be written into the service data or read a piece of the service data.
在第一方面中,所述网络交换设备包括的存储器的数量与网络交换设备的端口数量线性相关,也就是说,存储器数量随着网络设备端口数量的增加呈线性增长,并且存储器数量最少可以与端口数量相同,相比现有技术中,网络交换设备的存储器数量是端口数量的平方,本发明提供的网络交换设备减少了硬件消耗,同时,由于每个存储器的存储区域在同一个时隙被写入唯一一份业务数据或被读取唯一一份业务数据,从而避免了时隙交换时产生的冲突。In the first aspect, the number of memories included in the network switching device is linearly related to the number of ports of the network switching device, that is, the number of memories increases linearly with the number of network device ports, and the amount of memory can be at least The number of ports is the same. Compared with the prior art, the number of memory of the network switching device is the square of the number of ports. The network switching device provided by the present invention reduces hardware consumption, and at the same time, since the storage area of each memory is in the same time slot. Write a unique business data or read a unique business data, thus avoiding conflicts caused by time slot exchange.
结合第一方面,在第一方面的第一种可能的实现方式中,第一端口处于双工模式,所述第一端口是所述至少N个端口中的任一端口;所述处理器具体用于:将所述第一端口作为输入端口;在所述交换周期中将对应所述第一端口的存储器的每个存储区域存储的所述业务数据分别写入对应其他所述端口的存储器中。也就是说,所述网络交换设备在一个交换周期内完成一次业务交换,即需要对每个存储器中的所有存储区域均进行一次读取。With reference to the first aspect, in a first possible implementation manner of the first aspect, the first port is in a duplex mode, and the first port is any one of the at least N ports; For: using the first port as an input port; storing, in the switching cycle, the service data stored in each storage area of the memory corresponding to the first port in a memory corresponding to the other ports . That is to say, the network switching device completes a service exchange in one switching cycle, that is, it needs to read all the storage areas in each memory once.
结合第一方面,在第一方面的第二种可能的实现方式中,第二端口处于双工模式,所述第二端口是所述至少N个端口中的任一端口;所述处理器具体用于:将所述第二端口作为输出端口,在所述交换周期中从对应其他所述端口的存储器中分别读取业务数据写入对应所述第二端口的存储器的每个存 储区域中。也就是说,所述网络交换设备在一个交换周期内,需要对每个存储器中的所有存储区域均进行一次写入。With reference to the first aspect, in a second possible implementation manner of the first aspect, the second port is in a duplex mode, and the second port is any one of the at least N ports; And the second port is used as an output port, in which the service data is respectively read from the memory corresponding to the other port and each memory of the memory corresponding to the second port is written. In the storage area. That is to say, the network switching device needs to write once for all storage areas in each memory in one switching cycle.
结合第一方面,在第一方面的第三种可能的实现方式中,所述网络交换设备包括预设的路由表,所述路由表包括每个所述端口之间的时隙交换关系;所述时隙交换关系指示了所述至少N个存储器中的任意两个存储区域之间的数据交换;所述处理器还用于,确定所述路由表中每次时隙交换的执行时刻,得到无冲突路由表;所述处理器具体用于,根据所述无冲突路由表在所述交换周期内将所述至少N个存储器分别存储的业务数据在各所述端口之间进行交换。其中,每个所述端口之间的时隙交换关系与所述网络交换设备处理的业务相关,上述第一方面的第三种可能的实现方式,在满足业务需求的情况下,避免了时隙交换的冲突。With reference to the first aspect, in a third possible implementation manner of the first aspect, the network switching device includes a preset routing table, where the routing table includes a time slot exchange relationship between each of the ports; The time slot exchange relationship indicates data exchange between any two of the at least N memories; the processor is further configured to determine an execution time of each time slot exchange in the routing table, The conflict-free routing table is configured to: exchange, according to the conflict-free routing table, the service data separately stored by the at least N memories in the exchange period between the ports. The time slot exchange relationship between each of the ports is related to the service handled by the network switching device. The third possible implementation manner of the foregoing first aspect avoids the time slot when the service requirement is met. Exchange conflicts.
结合第一方面或者以上第一方面的任一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述设备包括N个存储器,所述存储器与所述端口一一对应。也就是说,本发明在具体实施时,存储器的数量与端口数可以相同,相比现有网络交换设备中存储器的数量是端口数的平方,本发明减少了硬件消耗。With reference to the first aspect or any one of the foregoing possible implementation manners, in a fourth possible implementation manner of the first aspect, the device includes N memories, and the memory corresponds to the port one-to-one . That is to say, in the specific implementation of the present invention, the number of memories and the number of ports can be the same, and the present invention reduces hardware consumption compared to the number of ports in the existing network switching device is the square of the number of ports.
第二方面,提供一种时隙交换的方法,所述方法用于网络交换设备,所述网络交换设备包括N个端口,至少N个存储器,每个所述存储器对应一个所述端口,所述存储器包括多个存储区域,每个所述存储区域存储所述端口在对应所述存储区域的一个时隙接收到的业务数据,N为大于1的正整数;所述方法包括:所述网络交换设备在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据;所述网络交换设备在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据;其中,所述交换周期包括多个所述时隙,每个所述时隙中,所述网络交换设备控制所述存储器中的每个所述存储区域被写入一份所述业务数据或被读取一份所述业务数据。In a second aspect, a method for time slot switching is provided, the method being used for a network switching device, where the network switching device includes N ports, at least N memories, each of the memories corresponding to one of the ports, The memory includes a plurality of storage areas, each of the storage areas storing service data received by the port in a time slot corresponding to the storage area, where N is a positive integer greater than one; the method includes: the network switching The device reads the service data stored in each storage area of the memory corresponding to the input port during the exchange period; the network switching device writes a service to each storage area of the memory corresponding to the output port in the exchange period Data; wherein the switching period includes a plurality of the time slots, and in each of the time slots, the network switching device controls each of the storage areas in the memory to be written into the service data Or read a copy of the business data.
结合第二方面,在第二方面的第一种可能的实现方式中,第一端口处于 双工模式,所述第一端口是所述至少N个端口中的任一端口;所述网络交换设备在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据,包括:所述网络交换设备将所述第一端口作为输入端口;所述网络交换设备在所述交换周期中将对应所述第一端口的存储器的每个存储区域存储的所述业务数据分别写入对应其他所述端口的存储器中。In conjunction with the second aspect, in a first possible implementation of the second aspect, the first port is In the duplex mode, the first port is any one of the at least N ports; the network switching device reads service data stored in each storage area of the memory corresponding to the input port during the switching period, including The network switching device uses the first port as an input port; the network switching device separately writes the service data stored in each storage area of the memory corresponding to the first port in the switching cycle Corresponding to the memory of the other port.
结合第二方面,在第二方面的第二种可能的实现方式中,第二端口处于双工模式,所述第二端口是所述至少N个端口中的任一端口;所述网络交换设备在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据具体包括:所述网络交换设备将所述第二端口作为输出端口;所述网络交换设备在所述交换周期中从对应其他所述端口的存储器中分别读取业务数据写入对应所述第二端口的存储器的每个存储区域中。With reference to the second aspect, in a second possible implementation manner of the second aspect, the second port is in a duplex mode, and the second port is any one of the at least N ports; the network switching device Writing a service data to each storage area of the memory corresponding to the output port during the exchange period specifically includes: the network switching device uses the second port as an output port; and the network switching device is in the exchange In the cycle, the service data is respectively read from the memory corresponding to the other ports and written into each storage area of the memory corresponding to the second port.
结合第二方面,在第二方面的第三种可能的实现方式中,所述网络交换设备包括预设的路由表,所述路由表包括每个所述端口之间的时隙交换关系;所述时隙交换关系指示了所述至少N个存储器中的任意两个存储区域之间的数据交换;所述方法还包括:所述网络交换设备确定所述路由表中每次时隙交换的执行时刻,得到无冲突路由表;所述网络交换设备在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据,并在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据,包括:所述网络交换设备根据所述无冲突路由表在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据,并在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据。With reference to the second aspect, in a third possible implementation manner of the second aspect, the network switching device includes a preset routing table, where the routing table includes a time slot exchange relationship between each of the ports; The time slot exchange relationship indicates data exchange between any two of the at least N memories; the method further comprising: the network switching device determining execution of each time slot exchange in the routing table At the moment, obtaining a collision-free routing table; the network switching device reads the service data stored in each storage area of the memory corresponding to the input port in the exchange period, and stores the memory corresponding to the output port in the exchange period Writing, by the storage area, a service data, comprising: the network switching device reading the service data stored in each storage area of the memory corresponding to the input port in the exchange period according to the conflict-free routing table, and in the A service data is written to each storage area of the memory corresponding to the output port during the exchange period.
结合第二方面或者以上第二方面的任一种可能的实现方式,在第二方面的第四种可能的实现方式中,每个所述存储器存储M份业务数据,所述交换周期包括至少M个时隙。With reference to the second aspect or any one of the foregoing possible implementation manners, in a fourth possible implementation manner of the second aspect, each of the memory stores M service data, where the switching period includes at least M Time slots.
第三方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。 In a third aspect, a computer readable medium is provided for storing a computer program comprising instructions for performing the method of any of the second aspect or any of the possible implementations of the second aspect.
附图说明DRAWINGS
图1为现有技术中的Crossbar交换架构的示意图;1 is a schematic diagram of a Crossbar switching architecture in the prior art;
图2为图1所示的Crossbar交换架构中的输出端口从输入端口读取数据的示意图;2 is a schematic diagram of an output port in the Crossbar switch fabric shown in FIG. 1 reading data from an input port;
图3为图1所示的Crossbar交换架构中的输入端口从输出端口写入数据的示意图;3 is a schematic diagram of inputting data from an output port of an input port in the Crossbar switching architecture shown in FIG. 1;
图4为本发明实施例提供的一种网络交换设备的结构示意图;FIG. 4 is a schematic structural diagram of a network switching device according to an embodiment of the present disclosure;
图5为图4所示的Crossbar交换架构中的输出端口从输入端口读取数据的示意图;5 is a schematic diagram of an output port in the Crossbar switch fabric shown in FIG. 4 reading data from an input port;
图6为图4所示的Crossbar交换架构中的输出端口从输入端口读取数据的示意图;6 is a schematic diagram of an output port in the Crossbar switching architecture shown in FIG. 4 reading data from an input port;
图7为本发明实施例提供的一种时隙交换的方法的流程示意图。FIG. 7 is a schematic flowchart diagram of a method for time slot exchange according to an embodiment of the present invention.
具体实施方式detailed description
本文中描述的技术可用于各种通信系统,例如全球移动通信系统(英文全称:Global System for Mobile communications,简称:GSM)等2G系统,宽带码分多址(英文全称:Wideband Code Division Multiple Access Wireless,简称:WCDMA)等3G系统,长期演进(英文全称:Long Term Evolution,简称:LTE)系统等4G系统,LTE后续演进的5G通信系统,以及无线局域网(英文全称:wireless local area network,简称:WLAN)与蜂窝网络融合的通信系统等。The technology described in this paper can be used in various communication systems, such as 2G systems such as Global System for Mobile Communications (GSM), Wideband Code Division Multiple Access (English name: Wideband Code Division Multiple Access Wireless) 3G system such as WCDMA), 4G system such as Long Term Evolution (LTE) system, 5G communication system of LTE subsequent evolution, and wireless local area network (English name: wireless local area network, referred to as: WLAN) A communication system that is integrated with a cellular network, and the like.
为了使本领域的技术人员更容易理解本发明实施例提供的技术方案,下面首先对相关技术术语进行简单介绍。In order to make it easier for those skilled in the art to understand the technical solutions provided by the embodiments of the present invention, the related technical terms are briefly introduced below.
Crossbar架构由输入端口,输出端口和交叉开关组成,假设端口规模为N,输入端口记为i,1<i<N,输出端口记为j,1<j<N,交叉点开关记为XPij,则一共有N2个内部交叉点开关将所有的输入和输出端口互联起来。图1为采用Crossbar交换架构的网络交换设备的结构示意图,该网络交换设备的端口规模 为4,包括16个交叉点开关。The Crossbar architecture consists of an input port, an output port, and a crossbar. Suppose the port size is N, the input port is denoted by i, 1<i<N, the output port is denoted by j, 1<j<N, and the crosspoint switch is denoted as XP ij. , there are a total of N 2 internal crosspoint switches to interconnect all the input and output ports. FIG. 1 is a schematic structural diagram of a network switching device adopting a Crossbar switching architecture. The network switching device has a port size of 4, including 16 crosspoint switches.
参照图1所示的网络交换设备,为了避免在多个输出端口同时从同一个输入端口读取数据的情况下产生冲突,每个输入端口为所有输出端口分别设立了独立的读缓存结构,如图1在每个交叉点开关附近示出的读缓存结构R。Referring to the network switching device shown in FIG. 1, in order to avoid conflicts in the case where multiple output ports simultaneously read data from the same input port, each input port has an independent read cache structure for all output ports, such as Figure 1 shows the read cache structure R shown near each crosspoint switch.
另一种设计方案是,为了避免在多个输入端口同时向同一个输出端口写入数据的情况下产生冲突,每个输出端口为所有输入端口分别设置了一个独立的写缓存结构,如图1在每个交叉点开关附近示出的写缓存结构W。Another design is to avoid conflicts when multiple input ports simultaneously write data to the same output port. Each output port has an independent write cache structure for all input ports, as shown in Figure 1. A write cache structure W is shown near each crosspoint switch.
端口双工模式是指端口可以双向传输,既可以接收数据,也可以输出数据。双工模式包括全双工模式和半双工模式。其中,端口工作于全双工模式的情况下,该端口在同一时刻可以进行双向传输,也就是说,该端口在同一时刻既可以作为输出端口也可以作为输入端口;端口工作于半双工模式的情况下,该端口在同一时刻只能有一个方向的传输,也就是说,该端口同一时刻只能作为输出端口或者输出端口。Port duplex mode means that the port can transmit in both directions, and it can receive data as well as output data. The duplex mode includes a full duplex mode and a half duplex mode. When the port works in full-duplex mode, the port can transmit in both directions at the same time, that is, the port can be used as an output port or an input port at the same time; the port works in half-duplex mode. In this case, the port can only transmit in one direction at a time, that is, the port can only be used as an output port or an output port at the same time.
值得说明的是,如图1所示,输入端口1和输出端口1可以是一个工作状态为双工模式的端口,这样,图1所示的网络交换设备可以是包括4个工作在双工模式的端口。It should be noted that, as shown in FIG. 1 , the input port 1 and the output port 1 may be a port in a working mode, so that the network switching device shown in FIG. 1 may include four working in duplex mode. Port.
时隙交换是指将不同端口,不同时隙上的信号进行交换。值得说明的是,本发明实施例中网络交换设备采用的时隙交换可以是基于时分复用(英文全称:Time Division Multiplex,简称:TDM)的交换,其中,TDM交换根据输入时隙和输出时隙的配置结果可以将输入时隙的数据交换到相同或不同的输出时隙中。Time slot switching refers to the exchange of signals on different ports and different time slots. It should be noted that the time slot exchange used by the network switching device in the embodiment of the present invention may be based on time division multiplexing (English full name: Time Division Multiplex, TDM for short), wherein the TDM exchange is based on the input time slot and the output time. The result of the configuration of the slot can exchange data of the input slot into the same or different output slots.
仍然以图1所示的网络交换设备举例说明,其中,输入端口1和输出端口1为该网络交换设备上的端口1,输入端口2和输出端口2为该网络交换设备上的端口2,输入端口3和输出端口3为该网络交换设备上的端口3,输入端口4和输出端口4为该网络交换设备上的端口4。下表1为端口1至端口4之间进行时隙交换的示意图。 Still taking the network switching device shown in FIG. 1 as an example, where input port 1 and output port 1 are port 1 on the network switching device, and input port 2 and output port 2 are port 2 on the network switching device, input Port 3 and output port 3 are port 3 on the network switching device, and input port 4 and output port 4 are port 4 on the network switching device. Table 1 below is a schematic diagram of time slot exchange between port 1 and port 4.
表1Table 1
Figure PCTCN2016087340-appb-000001
Figure PCTCN2016087340-appb-000001
其中,表1中的每一执行时刻为执行一次数据交换操作的起始时刻,相邻两个执行时刻之间的时长即为一个时隙,表1中的执行时刻1至执行时刻4为网络交换设备的一个交换周期。网络交换设备的交换周期是所述网络交换设备采用的交换协议规定的,例如,E1协议或者同步数字体系(英文全称:Synchronous Digital Hierarchy,简称:SDH)协议。Each execution time in Table 1 is the start time of performing a data exchange operation, and the duration between two adjacent execution times is one time slot, and the execution time 1 to the execution time 4 in Table 1 are networks. A switching cycle of the switching device. The switching period of the network switching device is specified by the switching protocol adopted by the network switching device, for example, the E1 protocol or the Synchronous Digital Hierarchy (SDH) protocol.
具体地,如表1所示,p1是指端口1,p2是指端口2,p3是指端口3,p4是指端口4。AC1是指缓存结构中存储端口在执行时刻1接收到的业务数据的第一存储区域,AC2是指缓存结构中存储端口在执行时刻2接收到的业务数据的第二存储区域,AC3是指缓存结构中存储端口在执行时刻3接收到的业务数据的第三存储区域,AC4是指缓存结构中存储端口在执行时刻4接收到的业务数据的第四存储区域。这样,p1.AC3->p1.AC1即表示将对应端口1的缓存结构中的第三存储区域中的业务数据写入对应端口1的缓存结构中的第1存储区域。Specifically, as shown in Table 1, p1 refers to port 1, p2 refers to port 2, p3 refers to port 3, and p4 refers to port 4. AC1 refers to the first storage area of the service data received by the storage port at the execution time 1 in the cache structure, and AC2 refers to the second storage area of the service data received by the storage port at the execution time 2 in the cache structure, and AC3 refers to the cache. In the structure, the storage area stores the third storage area of the service data received at time 3, and AC4 refers to the fourth storage area of the service data received by the storage port at the execution time 4 in the cache structure. Thus, p1.AC3->p1.AC1 means that the service data in the third storage area in the cache structure corresponding to port 1 is written into the first storage area in the cache structure corresponding to port 1.
值得说明的是,时隙交换关系是根据该网络交换设备处理的业务决定的,也就是说,若网络交换设备处理的业务不变,则所有缓存结构的存储区域之间的数据交换关系是固定的,但是现有技术中,执行每次时隙交换跟时隙号是绑定的,如在执行时刻1进行的时隙交换均是将数据写入缓存结构的第一存储区域。 It is worth noting that the time slot exchange relationship is determined according to the service processed by the network switching device, that is, if the service handled by the network switching device does not change, the data exchange relationship between the storage areas of all the cache structures is fixed. However, in the prior art, each time slot exchange is performed and the time slot number is bound. For example, the time slot exchange performed at the execution time 1 is to write data into the first storage area of the cache structure.
具体地,分别看每一列,各端口作为输出端口分别从其他端口获得数据。现有技术中,为了避免同一个执行时刻中信息交换产生冲突,各端口分别为其他端口设有独立的缓存结构,例如,在表1所示的执行时刻2,端口3作为输入端口同时向端口1和端口2写入的数据是不同缓存结构中的数据,避免了冲突。Specifically, each column is viewed separately, and each port obtains data from other ports as an output port. In the prior art, in order to avoid conflicts in information exchange in the same execution time, each port has an independent cache structure for other ports. For example, at the execution time 2 shown in Table 1, port 3 serves as an input port to the port at the same time. The data written by 1 and port 2 is the data in different cache structures, avoiding conflicts.
为了便于理解,下面分别从输入端口和输出端口的角度说明网络交换设备的时隙交换。For ease of understanding, the time slot exchange of the network switching device is illustrated from the perspective of the input port and the output port, respectively.
图2为输出端口从输入端口读取数据的示意图,在此种情况下,一个输入端口为所有输出端口设立对应的一个独立的读缓存结构,如图2中示出的标号为1至16的缓存结构,其中,每一个输出端口均从多个输入端口读取数据,例如,输出端口1分别从输入端口1的缓存结构1,输入端口2的缓存结构5,输入端口3的缓存结构9,输入端口4的缓存结构13读取数据。2 is a schematic diagram of an output port reading data from an input port. In this case, an input port establishes a corresponding independent read buffer structure for all output ports, as shown in FIG. a cache structure in which each output port reads data from a plurality of input ports, for example, the output port 1 is from the cache structure 1 of the input port 1, the cache structure 5 of the input port 2, and the cache structure 9 of the input port 3, The cache structure 13 of the input port 4 reads data.
图3为输入端口向输出端口写入数据的示意图,在此种情况下,一个输出端口为所有输入端口设立对应的一个独立的写缓存结构,如图3中示出的标号为1至16的缓存结构,其中,每个输入端口均向多个输出端口写入数据,例如,输入端口1分别向输出端口1的缓存结构1,输出端口2的缓存结构2,输出端口3的缓存结构4,输出端口4的缓存结构4写入数据。3 is a schematic diagram of an input port writing data to an output port. In this case, an output port establishes a corresponding independent write cache structure for all input ports, as shown in FIG. a cache structure, wherein each input port writes data to a plurality of output ports, for example, the input port 1 is respectively directed to the cache structure 1 of the output port 1, the cache structure 2 of the output port 2, and the cache structure 4 of the output port 3, The cache structure 4 of the output port 4 writes data.
本领域技术人员应该理解到,本文关于输入端口为输出端口设立缓存结构以及输出端口为输入端口设立缓存结构的表述只是描述的角度不同,结合图2和图3可知,不同输入端口为输出端口1设立的读缓存结构1,5,9,13也是输出端口1为每个输入端口设立的写缓存结构。Those skilled in the art should understand that the description of setting the cache structure for the output port for the input port and setting the cache structure for the input port for the input port is only described in different angles. As shown in FIG. 2 and FIG. 3, different input ports are output ports 1 The read cache structure 1, 5, 9, 13 is also set up for the write cache structure set up by output port 1 for each input port.
现有的Crossbar交换架构存在硬件消耗过高的技术问题,本发明实施例提供一种网络交换设备及时隙交换的方法,在避免时隙交换产生冲突的前提下,减少了硬件消耗。The existing Crossbar switching architecture has the technical problem of excessive hardware consumption. The embodiment of the present invention provides a network switching device and a time slot exchange method, which reduces hardware consumption under the premise of avoiding collision of time slot exchange.
下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。The technical solutions in the embodiments of the present invention are described below with reference to the accompanying drawings in the embodiments of the present invention.
本发明实施例提供一种网络交换设备40,其中,该网络交换设备可以为 路由器,也可以为交换机,如图4所示,该网络交换设备40包括:The embodiment of the present invention provides a network switching device 40, where the network switching device can be The router can also be a switch. As shown in FIG. 4, the network switching device 40 includes:
处理器,如图4示出的处理器41;a processor, such as the processor 41 shown in FIG. 4;
N个端口42,如图4示出的端口1、端口2、端口3和端口4; N ports 42, as shown in Figure 4, port 1, port 2, port 3 and port 4;
至少N个存储器43,如图4示出的存储器1、存储器2、存储器3和存储器4;其中,每个所述存储器对应一个所述端口;N为大于1的正整数;At least N memories 43, such as memory 1, memory 2, memory 3 and memory 4 as shown in FIG. 4; wherein each of said memories corresponds to one of said ports; N is a positive integer greater than one;
值得说明的是,所述存储器可以是用于缓存业务数据的It should be noted that the memory may be used to cache business data.
所述存储器43用于,存储对应的端口在每个时隙接收到的业务数据;其中,所述存储器43包括多个存储区域,每个所述存储区域存储所述端口在对应所述存储区域的一个时隙接收到的业务数据;The memory 43 is configured to store service data received by a corresponding port in each time slot; wherein the memory 43 includes a plurality of storage areas, each of the storage areas storing the port in a corresponding storage area Service data received in one time slot;
所述处理器41用于,在交换周期内将所述至少N个存储器分别存储的业务数据在各所述端口之间进行交换;其中,所述交换周期包括多个时隙,每个所述时隙中,所述处理器控制所述存储器的每个所述存储区域被写入一份所述业务数据或被读取一份所述业务数据。The processor 41 is configured to exchange service data stored by the at least N memories in each of the ports during a switching period, where the switching period includes multiple time slots, each of the In the time slot, the processor controls each of the storage areas of the memory to be written into the service data or read a piece of the service data.
采用上述网络交换设备,该网络交换设备包括的存储器的数量与网络交换设备的端口数量线性相关,也就是说,存储器数量随着网络设备端口数量的增加呈线性增长,相比现有技术中,网络交换设备的存储器数量是端口数量的平方,本发明实施例减少了硬件消耗,同时,由于每个存储器的存储区域在同一个时隙被写入唯一一份业务数据或被读取唯一一份业务数据,从而避免了时隙交换时产生的冲突。The network switching device is used, and the number of the memory included in the network switching device is linearly related to the number of ports of the network switching device, that is, the number of the memory increases linearly with the number of the network device ports, compared with the prior art. The number of memories of the network switching device is the square of the number of ports, and the embodiment of the present invention reduces hardware consumption, and at the same time, since the storage area of each memory is written in the same time slot, only one service data is written or is read uniquely. A piece of business data that avoids conflicts that occur when time slots are exchanged.
为了使本领域的技术人员更加理解本发明实施例提供的技术方案,下面对本发明实施例提供的网络交换设备进行详细说明。The network switching device provided by the embodiment of the present invention is described in detail below in order to enable a person skilled in the art to better understand the technical solutions provided by the embodiments of the present invention.
所述处理器41具体用于,将第一端口作为输入端口,在交换周期中将对应所述第一端口的存储器的每个存储区域存储的业务数据分别写入对应其他所述端口的存储器中。所述第一端口为所述至少N个端口中的任一端口,也就是说,所述网络交换设备在一个交换周期内完成一次业务交换,即需要对每个存储器中的所有存储区域均进行一次读取。The processor 41 is specifically configured to use the first port as an input port, and store service data stored in each storage area of the memory corresponding to the first port in a memory corresponding to the other ports in a switching cycle. . The first port is any one of the at least N ports, that is, the network switching device completes a service exchange in one switching cycle, that is, needs to perform all storage areas in each memory. Read once.
所述处理器41还用于,将第二端口作为输出端口,在所述交换周期中从 对应其他所述端口的存储器中分别读取业务数据写入对应所述第二端口的存储器的每个存储区域中。所述第二端口为所述至少N个端口中的任一端口,也就是说,所述网络交换设备在一个交换周期内,需要对每个存储器中的所有存储区域均进行一次写入。The processor 41 is further configured to use the second port as an output port, in the exchange period Each of the memories corresponding to the other ports is read into each storage area of the memory corresponding to the second port. The second port is any one of the at least N ports, that is, the network switching device needs to write once for all storage areas in each memory in one switching cycle.
值得说明的是,所述第一端口与所述第二端口可以为同一端口,即网络交换设备的一个处于双工模式的端口,其在不同时刻既可以作为输入端口,又可以作为输出端口。It should be noted that the first port and the second port may be the same port, that is, a port in the duplex mode of the network switching device, which can serve as an input port or an output port at different times.
示例地,如下表2所示:执行时刻1至执行时刻4为一个交换周期包括的四次执行数据交换操作的时刻,各端口在该交换周期内,既作为输出端口从其他端口读取数据,又作为输出端口向其他端口写入数据。For example, as shown in Table 2 below, the execution time 1 to the execution time 4 are the times of performing the data exchange operation four times included in one exchange cycle, and each port reads data from other ports as the output port in the exchange cycle. It also writes data to other ports as an output port.
表2Table 2
Figure PCTCN2016087340-appb-000002
Figure PCTCN2016087340-appb-000002
由表2可知,每一个端口在一个交换周期内,既作为输入端口在处理器的控制下将自身对应的存储器中的每个存储区域存储的业务数据写入其他端口的存储器,又作为输出端口从其他端口读取业务数据写入对应的存储器的每一个存储区域中。It can be seen from Table 2 that each port writes the service data stored in each storage area of its corresponding memory to the memory of the other port under the control of the processor as an input port in one switching cycle, and also serves as an output port. The service data is read from other ports and written into each storage area of the corresponding memory.
并且,每个存储器的存储区域在一个时隙内,被写入唯一一份业务数据或者被读取唯一一份业务数据,因此不会产生多个端口同时向一个端口的某一存储区域写入或读取数据导致的数据冲突。Moreover, the storage area of each memory is written into a single service data or a unique service data is read in one time slot, so that multiple ports are not simultaneously generated to a certain storage area of one port. Data conflict caused by writing or reading data.
在上述举例说明中,该网络交换设备中存储器与端口可以是一一对应的, 也就是说,网络交换设备的每个端口只设立一个存储器。在此种情况下,网络交换设备按照如表2所示的路由表对各存储器的存储区域中的业务数据进行交换可以避免了数据读写产生冲突,相比现有技术中,网络交换设备中存储器的数量为端口数量的平方才可以避免数据冲突,本发明实施例减少了网络交换设备的硬件消耗。In the above description, the memory and the port in the network switching device may have a one-to-one correspondence. That is to say, only one memory is set up for each port of the network switching device. In this case, the network switching device exchanges the service data in the storage area of each memory according to the routing table as shown in Table 2, which avoids conflicts between data read and write. Compared with the prior art, in the network switching device. The number of memories is the square of the number of ports to avoid data collision. The embodiment of the invention reduces the hardware consumption of the network switching device.
上述表2只是举例说明,每个交换周期包括的时隙数跟每个端口的存储器存储的业务数据的份数相关。在本发明实施例的一种可能的实现方式中,每个所述存储器存储M份所述业务数据,即所述存储器包括M个存储区域,所述交换周期包括至少M个时隙。参照表1和表2,所有存储器均包括四个存储区域,且表1和表2的周期时长相同,均包括四个时隙,也就是说,本发明实施例与现有技术相比,在不影响交换时延的情况下,减少了硬件消耗。可替换地,该网络交换设备也可以在大于M个时隙内进行时隙交换,以避免数据冲突。Table 2 above is only an example, and the number of slots included in each switching cycle is related to the number of copies of the service data stored in the memory of each port. In a possible implementation manner of the embodiment of the present invention, each of the memories stores M shares of the service data, that is, the memory includes M storage areas, and the switching period includes at least M time slots. Referring to Tables 1 and 2, all the memories include four storage areas, and the period lengths of Tables 1 and 2 are the same, and each includes four time slots, that is, the embodiment of the present invention is compared with the prior art. Reduces hardware consumption without affecting exchange latency. Alternatively, the network switching device can also perform time slot switching in more than M time slots to avoid data collisions.
上述举例仅是网络交换设备包括4个端口的情况,在具体实施时,不管端口数是多少,处理器总能计算出无冲突路由表确保端口之间的时隙交换不会产生冲突。具体地,所述网络交换设备包括预设的路由表,所述路由表包括每个所述端口之间的时隙交换关系;所述时隙交换关系指示了所述至少N个存储器中的任意两个存储区域之间的数据交换;所述处理器还用于,确定所述路由表中每次时隙交换的执行时刻,得到无冲突路由表;所述处理器具体用于,根据所述无冲突路在所述交换周期内将所述至少N个存储器分别存储的业务数据在各所述端口之间进行交换。The above example is only the case where the network switching device includes four ports. In the specific implementation, regardless of the number of ports, the processor can always calculate a collision-free routing table to ensure that the time slot exchange between the ports does not cause a collision. Specifically, the network switching device includes a preset routing table, where the routing table includes a slot exchange relationship between each of the ports; the slot exchange relationship indicates any of the at least N memories Data exchange between two storage areas; the processor is further configured to: determine an execution time of each time slot exchange in the routing table, to obtain a collision-free routing table; the processor is specifically configured to: according to the The collision-free way exchanges the service data respectively stored by the at least N memories in the exchange period between the ports.
值得说明的是,网络交换设备的上层网络向该网络交换设备发送的业务的属性决定了存储区域之间的数据交换关系,因此,网络交换设备在初始启动时,即可根据业务预先设置路由表。It is worth noting that the attribute of the service sent by the upper-layer network of the network switching device to the network switching device determines the data exchange relationship between the storage areas. Therefore, when the network switching device is initially started, the routing table can be preset according to the service. .
对无冲突路由表的计算可以抽象为一个数学模型,即:The calculation of a collision-free routing table can be abstracted into a mathematical model, namely:
有n种颜色的色块,每种色块m个,将其任意随机的放入m行n列的一个格子矩阵中,每个格子放一个色块,要求用m次将这些色块全部取出,每 次取n个,并且要求每次从每一列中取且仅取一个色块,每次取的这些色块都要不同颜色。其中,n种颜色的色块代表n个端口,每个色块m个代表每个端口缓存m份业务数据。There are n color patches, each of which is m, and it is randomly placed into a grid matrix of m rows and n columns, and each grid is placed with a color patch, and it is required to take all the color patches in m times. Every Take n times, and ask to take each color column and take only one color block at a time, and each of these color blocks should be different colors. Among them, the n color color patches represent n ports, and each color block m represents each port buffer m service data.
经过数学验证,该数学模型始终有解,也就是说,无论交换端口的规模是多大,也不管每个存储器的容量是多少,网络交换设备根据预设的路由表始终可以计算出无冲突路由表,使得网络交换设备在一个交换周期内可以无冲突进行信息交换。After mathematical verification, the mathematical model always has a solution, that is, regardless of the size of the switch port and regardless of the capacity of each memory, the network switching device can always calculate the conflict-free routing table according to the preset routing table. So that the network switching device can exchange information without conflict during one switching cycle.
网络交换设备对于无冲突路由表的计算可以采用分支法,二分法或者欧拉路径搜索等进行,具体地,基于上述数学模型,采用分支法,二分法或者欧拉路径搜索能计算得到无冲突路由表。可以理解,还可以采用其他方法得到该无冲突路由表,本发明实施例对此不做特别限定。The network switching device can calculate the collision-free routing table by using the branching method, the dichotomy method or the Euler path search. Specifically, based on the above mathematical model, the branching method, the dichotomy method or the Euler path search can be used to calculate the collision-free routing. table. It can be understood that the conflict-free routing table can be obtained by other methods, which is not specifically limited in this embodiment of the present invention.
为了便于理解,下面分别从输入端口和输出端口的角度说明本发明实施例提供的网络交换设备的时隙交换。For ease of understanding, the time slot exchange of the network switching device provided by the embodiment of the present invention is described below from the perspective of the input port and the output port.
图5为输出端口从输入端口读取数据的示意图,如图所示,处理器控制每一个输出端口均从多个输入端口读取数据,例如,输出端口1分别从输入端口1的存储器1,输入端口2的存储器2,输入端口3的存储器3,输入端口4的存储器4读取数据,值得说明的是,同一输出端口在不同时隙从不同输入端口的存储器读取业务数据。5 is a schematic diagram of an output port reading data from an input port. As shown in the figure, the processor controls each output port to read data from a plurality of input ports. For example, the output port 1 is respectively input from the memory 1 of the input port 1. The memory 2 of the input port 2, the memory 3 of the input port 3, and the memory 4 of the input port 4 read the data. It is worth noting that the same output port reads the service data from the memory of the different input ports at different time slots.
图6为输入端口向输出端口写入数据的示意图,其中,处理器控制每个输入端口均向多个输出端口写入数据,例如,输入端口1分别向输出端口1的存储器1,输出端口2的存储器2,输出端口3的存储器3,输出端口4的存储器4写入数据,值得说明的是,同一输入端口在不同时隙向不同输出端口的存储器写入业务数据。6 is a schematic diagram of an input port writing data to an output port, wherein the processor controls each input port to write data to a plurality of output ports, for example, the input port 1 is respectively directed to the memory 1 of the output port 1, and the output port 2 is The memory 2, the memory 3 of the output port 3, and the memory 4 of the output port 4 write data. It is worth noting that the same input port writes service data to the memory of the different output ports at different time slots.
本发明实施例中的处理器41可以是中央处理单元(英文全称:Center Processing Unit,简称:CPU)。另外,为节省CPU的计算资源,处理器41也可以是现场可编程门阵列(英文全称:Field Programmable Gate Array,简称:FPGA),以实现本发明实施例中时隙交换的全部操作,或者,处理器41也可 以是CPU和FPGA,则FPGA与CPU分别执行本发明实施例中时隙交换的部分操作。本发明实施例中的存储器43可以是用以缓存业务数据的随机存取存储器(英文全称:Random-Access Memory,简称:RAM),也可以是寄存器堆。存储区域是存储器中的存储地址,其中,所述存储区域可以是存储器中的物理存储地址,也可以是逻辑存储地址,本发明对此不做限定。The processor 41 in the embodiment of the present invention may be a central processing unit (English name: Center Processing Unit, abbreviated as CPU). In addition, in order to save CPU computing resources, the processor 41 may also be a field programmable gate array (English name: Field Programmable Gate Array, FPGA for short) to implement all operations of the time slot exchange in the embodiment of the present invention, or The processor 41 can also In the case of the CPU and the FPGA, the FPGA and the CPU respectively perform part of the operation of the time slot exchange in the embodiment of the present invention. The memory 43 in the embodiment of the present invention may be a random access memory (English name: Random-Access Memory, RAM for short) for buffering service data, or may be a register file. The storage area is a storage address in the memory, and the storage area may be a physical storage address in the memory or a logical storage address, which is not limited in the present invention.
另外,图4所示的网络交换设备仅是一种举例说明,对于网络交换设备包括的端口的数量,本发明对此不做限定,在具体实施时,该网络交换设备还可以包括其他部件,图中未一一示出。In addition, the network switching device shown in FIG. 4 is only an example. The number of ports included in the network switching device is not limited by the present invention. In specific implementation, the network switching device may further include other components. Not shown in the figure.
本发明实施例还提供一种时隙交换的方法,所述方法应用于网络交换设备,所述网络交换设备包括N个端口,至少N个存储器,每个所述存储器对应一个所述端口,所述存储器包括多个存储区域,每个所述存储区域存储所述端口在对应所述存储区域的一个时隙接收到的业务数据,N为大于1的正整数。如图7所示,该方法包括:The embodiment of the present invention further provides a method for time slot exchange, where the method is applied to a network switching device, where the network switching device includes N ports, at least N memories, and each of the memories corresponds to one of the ports. The memory includes a plurality of storage areas, each of the storage areas storing service data received by the port in a time slot corresponding to the storage area, where N is a positive integer greater than one. As shown in FIG. 7, the method includes:
S701、所述网络交换设备在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据;S701. The network switching device reads, in a switching period, service data stored in each storage area of the memory corresponding to the input port.
S702、所述网络交换设备在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据;S702. The network switching device writes a service data to each storage area of the memory corresponding to the output port in the exchange period.
其中,所述交换周期包括多个所述时隙,每个所述时隙中,所述网络交换设备控制所述存储器中的每个所述存储区域被写入一份所述业务数据或被读取一份所述业务数据。The switching period includes a plurality of the time slots, and in each of the time slots, the network switching device controls each of the storage areas in the memory to be written into the service data or is Read a copy of the business data.
采用上述方法,由于每个存储器的存储区域在同一个时隙被写入唯一一份业务数据或被读取唯一一份业务数据,因此,为每一个端口设立一个存储器,也不会产生交换冲突。进而,网络交换设备的存储器数量与端口的数量可呈线性关系,相比现有网络交换设备中存储器的数量随着端口数量的增加呈指数增长,本发明实施例减少了硬件消耗,有利于增大交换规模。According to the above method, since the storage area of each memory is written into a single service data in the same time slot or a single service data is read, setting a memory for each port does not occur. Exchange conflicts. In addition, the number of the memory of the network switching device can be linearly compared with the number of the ports. Compared with the number of the existing network switching devices, the number of the memory increases exponentially with the number of ports, and the embodiment of the present invention reduces hardware consumption and is beneficial to increase. Large exchange scale.
可选地,第一端口处于双工模式,所述第一端口是所述至少N个端口中的任一端口;则上述步骤S701包括:所述网络交换设备将所述第一端口作为 输入端口;在所述交换周期中将对应所述第一端口的存储器的每个存储区域存储的所述业务数据分别写入对应其他所述端口的存储器中。也就是说,所述网络交换设备在一个交换周期内完成一次业务交换,需要对每个存储器中的所有存储区域均进行一次读取。Optionally, the first port is in a duplex mode, and the first port is any one of the at least N ports; then the step S701 includes: the network switching device uses the first port as And inputting, in the exchange period, the service data stored in each storage area of the memory corresponding to the first port is respectively written into a memory corresponding to the other ports. That is to say, the network switching device completes a service exchange in one switching cycle, and needs to read all the storage areas in each memory once.
可选地,第二端口处于双工模式,所述第二端口是所述至少N个端口中的任一端口;则上述步骤S702包括:所述网络交换设备将所述第二端口作为输出端口;在所述交换周期中从对应其他所述端口的存储器中分别读取业务数据写入对应所述第二端口的存储器的每个存储区域中。也就是说,所述网络交换设备在一个交换周期内,需要对每个存储器中的所有存储区域均进行一次写入。Optionally, the second port is in a duplex mode, and the second port is any one of the at least N ports; then the step S702 includes: the network switching device uses the second port as an output port The service data is respectively read from the memory corresponding to the other port in the exchange cycle and written into each storage area of the memory corresponding to the second port. That is to say, the network switching device needs to write once for all storage areas in each memory in one switching cycle.
在本发明实施例的一种可能的实现方式中,所述网络交换设备包括预设的路由表,所述路由表包括每个所述端口之间的时隙交换关系;所述时隙交换关系指示了所述至少N个存储器中的任意两个存储区域之间的数据交换;则所述方法具体包括:所述网络交换设备确定所述路由表中每次时隙交换的执行时刻,得到无冲突路由表,并根据所述无冲突路由表在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据,并在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据。其中,每个端口之间的时隙交换关系与所述网络交换设备处理的业务相关,上述可能的实现方式在满足业务需求的情况下,避免了时隙交换的冲突。In a possible implementation manner of the embodiment of the present invention, the network switching device includes a preset routing table, where the routing table includes a time slot exchange relationship between each of the ports; the time slot exchange relationship Determining data exchange between any two storage areas of the at least N memories; the method specifically includes: determining, by the network switching device, an execution time of each time slot exchange in the routing table, obtaining no a conflict routing table, and reading, according to the conflict-free routing table, service data stored in each storage area of the memory corresponding to the input port in the exchange period, and each of the memories corresponding to the output port in the exchange period The storage area writes a business data. The time slot exchange relationship between each port is related to the service handled by the network switching device. The foregoing possible implementation manner avoids the conflict of the time slot exchange when the service requirement is met.
可选地,每个所述存储器存储M份业务数据,所述交换周期包括至少M个时隙。参照装置实施例中的表1和表2,所有存储器均包括四个存储区域,且表1和表2的周期时长相同,均包括四个时隙,也就是说,本发明实施例与现有技术相比,在不影响交换时延的情况下,减少了硬件消耗。在本发明实施例的一种可能的实现方式下,该网络交换设备也可以在大于M个时隙内进行时隙交换,以避免数据冲突。Optionally, each of the memories stores M pieces of service data, and the switching period includes at least M time slots. Referring to Table 1 and Table 2 in the device embodiment, all the memories include four storage areas, and the period lengths of Table 1 and Table 2 are the same, each including four time slots, that is, the embodiment of the present invention and the existing Compared with technology, hardware consumption is reduced without affecting the switching delay. In a possible implementation manner of the embodiment of the present invention, the network switching device may also perform time slot exchange in more than M time slots to avoid data collision.
值得说明的是,所属本领域的技术人员应该清楚地了解到,为描述的方便和简洁,上述网络交换设备交换时隙的方法,可以参考前述装置实施例中 对网络交换设备的具体描述,在此不再赘述。It should be noted that those skilled in the art should clearly understand that for the convenience and brevity of the description, the method for exchanging time slots of the above network switching device may refer to the foregoing device embodiment. A detailed description of the network switching device will not be repeated here.
在具体实施时,上述网络交换设备交换时隙的方法可以采用硬件加软件功能单元的形式实现。上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台路由器或者交换机执行上述交换时隙的方法。而前述的存储介质包括:U盘、移动硬盘、随机存取存储器、磁碟或者光盘等各种可以存储数据的非易失性的存储介质。In a specific implementation, the method for the network switching device to exchange time slots may be implemented in the form of a hardware plus software functional unit. The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The above software functional unit is stored in a storage medium and includes a number of instructions for causing a router or switch to perform the above-described method of exchanging time slots. The foregoing storage medium includes various non-volatile storage media that can store data, such as a USB flash drive, a mobile hard disk, a random access memory, a magnetic disk, or an optical disk.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention

Claims (10)

  1. 一种网络交换设备,其特征在于,包括:A network switching device, comprising:
    处理器,N个端口,至少N个存储器,每个所述存储器对应一个所述端口;N为大于1的正整数;a processor, N ports, at least N memories, each of said memories corresponding to one of said ports; N being a positive integer greater than one;
    所述存储器用于,存储对应的端口在每个时隙接收到的业务数据;其中,所述存储器包括多个存储区域,每个所述存储区域存储所述端口在对应所述存储区域的一个时隙接收到的业务数据;The memory is configured to store service data received by a corresponding port in each time slot; wherein the memory includes a plurality of storage areas, each of the storage areas storing the port in a corresponding one of the storage areas Service data received by the time slot;
    所述处理器用于,在交换周期内将所述至少N个存储器分别存储的业务数据在各所述端口之间进行交换;其中,所述交换周期包括多个时隙,每个所述时隙中,所述处理器控制所述存储器的每个所述存储区域被写入一份所述业务数据或被读取一份所述业务数据。The processor is configured to exchange service data stored by the at least N memories in each of the ports during a switching period, where the switching period includes multiple time slots, each of the time slots And the processor controls each of the storage areas of the memory to be written into the service data or read a piece of the service data.
  2. 根据权利要求1所述的网络交换设备,其特征在于,第一端口处于双工模式,所述第一端口是所述至少N个端口中的任一端口;所述处理器具体用于:The network switching device according to claim 1, wherein the first port is in a duplex mode, and the first port is any one of the at least N ports; the processor is specifically configured to:
    将所述第一端口作为输入端口;Using the first port as an input port;
    在所述交换周期中将对应所述第一端口的存储器的每个存储区域存储的业务数据分别写入对应其他端口的存储器中。The service data stored in each storage area of the memory corresponding to the first port is respectively written in the memory corresponding to the other port in the switching cycle.
  3. 根据权利要求1所述的网络交换设备,其特征在于,第二端口处于双工模式,所述第二端口是所述至少N个端口中的任一端口,所述处理器具体用于:The network switching device according to claim 1, wherein the second port is in a duplex mode, and the second port is any one of the at least N ports, and the processor is specifically configured to:
    将所述第二端口作为输出端口;Using the second port as an output port;
    在所述交换周期中从对应其他端口的存储器中分别读取业务数据写入对应所述第二端口的存储器的每个存储区域中。The service data is read from the memory corresponding to the other ports in each of the storage areas corresponding to the memory of the second port in the exchange cycle.
  4. 根据权利要求1所述的网络交换设备,其特征在于,所述网络交换设备包括预设的路由表,所述路由表包括每个所述端口之间的时隙交换关系;所述时隙交换关系指示了所述至少N个存储器中的任意两个存储区域之间的 数据交换;The network switching device according to claim 1, wherein said network switching device comprises a preset routing table, said routing table comprising a time slot exchange relationship between each of said ports; said time slot exchange The relationship indicates between any two of the at least N memories Data exchange
    所述处理器还用于,确定所述路由表中每次时隙交换的执行时刻,得到无冲突路由表;The processor is further configured to: determine an execution time of each time slot exchange in the routing table, to obtain a collision-free routing table;
    所述处理器具体用于,根据所述无冲突路由表在所述交换周期内将所述至少N个存储器分别存储的业务数据在各所述端口之间进行交换。The processor is specifically configured to exchange service data separately stored by the at least N memories in the exchange period according to the conflict-free routing table between each of the ports.
  5. 根据权利要求1至4任一项所述的网络交换设备,其特征在于,所述设备包括N个存储器,所述存储器与所述端口一一对应。The network switching device according to any one of claims 1 to 4, wherein the device comprises N memories, and the memory is in one-to-one correspondence with the ports.
  6. 一种时隙交换的方法,其特征在于,所述方法用于网络交换设备中,所述网络交换设备包括N个端口,至少N个存储器,每个所述存储器对应一个所述端口,所述存储器包括多个存储区域,每个所述存储区域存储所述端口在对应所述存储区域的一个时隙接收到的业务数据,N为大于1的正整数;所述方法包括:A method for time slot switching, wherein the method is used in a network switching device, where the network switching device includes N ports, at least N memories, and each of the memories corresponds to one of the ports, The memory includes a plurality of storage areas, each of the storage areas storing service data received by the port in a time slot corresponding to the storage area, where N is a positive integer greater than one; the method includes:
    所述网络交换设备在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据;The network switching device reads the service data stored in each storage area of the memory corresponding to the input port during the exchange period;
    所述网络交换设备在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据;Writing, by the network switching device, a service data to each storage area of the memory corresponding to the output port in the exchange period;
    其中,所述交换周期包括多个所述时隙,每个所述时隙中,所述网络交换设备控制所述存储器中的每个所述存储区域被写入一份所述业务数据或被读取一份所述业务数据。The switching period includes a plurality of the time slots, and in each of the time slots, the network switching device controls each of the storage areas in the memory to be written into the service data or is Read a copy of the business data.
  7. 根据权利要求6所述的方法,其特征在于,第一端口处于双工模式,所述第一端口是所述至少N个端口中的任一端口;The method according to claim 6, wherein the first port is in a duplex mode, and the first port is any one of the at least N ports;
    所述网络交换设备在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据,包括:The network switching device reads the service data stored in each storage area of the memory corresponding to the input port during the exchange period, including:
    所述网络交换设备将所述第一端口作为输入端口;The network switching device uses the first port as an input port;
    所述网络交换设备在所述交换周期中将对应所述第一端口的存储器的每个存储区域存储的所述业务数据分别写入对应其他所述端口的存储器中。The network switching device writes the service data stored in each storage area of the memory corresponding to the first port in a memory corresponding to the other ports in the switching cycle.
  8. 根据权利要求6所述的方法,其特征在于,第二端口处于双工模式, 所述第二端口是所述至少N个端口中的任一端口;The method of claim 6 wherein the second port is in duplex mode. The second port is any one of the at least N ports;
    所述网络交换设备在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据包括:Writing, by the network switching device, a service data to each storage area of the memory corresponding to the output port in the exchange period includes:
    所述网络交换设备将所述第二端口作为输出端口;The network switching device uses the second port as an output port;
    所述网络交换设备在所述交换周期中从对应其他所述端口的存储器中分别读取业务数据写入对应所述第二端口的存储器的每个存储区域中。The network switching device reads service data from each of the memories corresponding to the other ports into each storage area of the memory corresponding to the second port in the switching cycle.
  9. 根据权利要求6所述的方法,其特征在于,所述网络交换设备包括预设的路由表,所述路由表包括每个所述端口之间的时隙交换关系;所述时隙交换关系指示了所述至少N个存储器中的任意两个存储区域之间的数据交换;所述方法还包括:The method according to claim 6, wherein the network switching device comprises a preset routing table, the routing table includes a time slot exchange relationship between each of the ports; and the time slot exchange relationship indication Data exchange between any two of the at least N memories; the method further comprising:
    所述网络交换设备确定所述路由表中每次时隙交换的执行时刻,得到无冲突路由表;Determining, by the network switching device, an execution time of each time slot exchange in the routing table, to obtain a collision-free routing table;
    所述网络交换设备在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据,并在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据,包括:The network switching device reads the service data stored in each storage area of the memory corresponding to the input port during the exchange period, and writes a service to each storage area of the memory corresponding to the output port during the exchange period Data, including:
    所述网络交换设备根据所述无冲突路由表在交换周期内读取输入端口对应的存储器的每个存储区域中存储的业务数据,并在所述交换周期内对输出端口对应的存储器的每个存储区域写入一份业务数据。And the network switching device reads the service data stored in each storage area of the memory corresponding to the input port in the exchange period according to the conflict-free routing table, and each of the memories corresponding to the output port in the exchange period The storage area writes a business data.
  10. 根据权利要求6至9任一项所述的方法,其特征在于,每个所述存储器存储M份业务数据,所述交换周期包括至少M个时隙。 The method according to any one of claims 6 to 9, wherein each of said memories stores M pieces of service data, said switching period comprising at least M time slots.
PCT/CN2016/087340 2016-06-27 2016-06-27 Network switching device and time slot exchange method WO2018000135A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680086677.9A CN109314658A (en) 2016-06-27 2016-06-27 The method of the network switching equipment and time gas exchange
PCT/CN2016/087340 WO2018000135A1 (en) 2016-06-27 2016-06-27 Network switching device and time slot exchange method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/087340 WO2018000135A1 (en) 2016-06-27 2016-06-27 Network switching device and time slot exchange method

Publications (1)

Publication Number Publication Date
WO2018000135A1 true WO2018000135A1 (en) 2018-01-04

Family

ID=60785011

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087340 WO2018000135A1 (en) 2016-06-27 2016-06-27 Network switching device and time slot exchange method

Country Status (2)

Country Link
CN (1) CN109314658A (en)
WO (1) WO2018000135A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11307913B2 (en) 2020-08-26 2022-04-19 Coupang Corp. Systems and methods for automated application programming interface evaluation and migration
CN114697275A (en) * 2020-12-30 2022-07-01 深圳云天励飞技术股份有限公司 Data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291482A (en) * 1992-07-24 1994-03-01 At&T Bell Laboratories High bandwidth packet switch
CN1274224A (en) * 1999-05-12 2000-11-22 深圳市华为技术有限公司 Stream line-type R/W method for shared memory
CN1283379A (en) * 1997-11-06 2001-02-07 耐特因塞特公司 Method and apparatus for switching data between bitstreams of time division multiplexed network
EP1233580A1 (en) * 2001-02-17 2002-08-21 Alcatel Multiserver scheduling system and method for a fast switching element
CN101212424A (en) * 2006-12-28 2008-07-02 杭州华三通信技术有限公司 Ethernet switching method and device incorporating circuit switching and packet switching

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212822B (en) * 2006-12-28 2010-12-01 杭州华三通信技术有限公司 Ethernet switching method and device for synchronous time division switching in Ethernet

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291482A (en) * 1992-07-24 1994-03-01 At&T Bell Laboratories High bandwidth packet switch
CN1283379A (en) * 1997-11-06 2001-02-07 耐特因塞特公司 Method and apparatus for switching data between bitstreams of time division multiplexed network
CN1274224A (en) * 1999-05-12 2000-11-22 深圳市华为技术有限公司 Stream line-type R/W method for shared memory
EP1233580A1 (en) * 2001-02-17 2002-08-21 Alcatel Multiserver scheduling system and method for a fast switching element
CN101212424A (en) * 2006-12-28 2008-07-02 杭州华三通信技术有限公司 Ethernet switching method and device incorporating circuit switching and packet switching

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11307913B2 (en) 2020-08-26 2022-04-19 Coupang Corp. Systems and methods for automated application programming interface evaluation and migration
CN114697275A (en) * 2020-12-30 2022-07-01 深圳云天励飞技术股份有限公司 Data processing method and device
CN114697275B (en) * 2020-12-30 2023-05-12 深圳云天励飞技术股份有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN109314658A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN108400880B (en) Network on chip, data transmission method and first switching node
US9571420B2 (en) Integrated NoC for performing data communication and NoC functions
US10554496B2 (en) Heterogeneous SoC IP core placement in an interconnect to optimize latency and interconnect performance
US9430432B2 (en) Optimized multi-root input output virtualization aware switch
US10818325B2 (en) Data processing method and data processing system for scalable multi-port memory
US9825809B2 (en) Dynamically configuring store-and-forward channels and cut-through channels in a network-on-chip
WO2015061126A1 (en) Using multiple traffic profiles to design a network on chip
KR20160016562A (en) Input/output interceptor logic including flush control logic, and computer-implemented method using the input/output interceptor logic
WO2016095345A1 (en) Method and network device for forwarding message
KR101736593B1 (en) Architecture for on-die interconnect
US20240020247A1 (en) Mechanism to autonomously manage ssds in an array
US11730325B2 (en) Dual mode interconnect
US20150012714A1 (en) Method and System for Multiple Processors to Share Memory
US20200393991A1 (en) Efficient data movement method for in storage computation
WO2018000135A1 (en) Network switching device and time slot exchange method
US9942146B2 (en) Router path selection and creation in a single clock cycle
EP3631639B1 (en) Communications for field programmable gate array device
CN103220230B (en) Support the dynamic shared buffer method that message crossbar stores
EP2829988B1 (en) Storage apparatus, and system and method for executing access operations
US11714779B2 (en) NoC relaxed write order scheme
CN108541365B (en) Apparatus and method for distribution of congestion information in a switch
CN111357016B (en) On-chip communication system for neural network processor
US9762474B2 (en) Systems and methods for selecting a router to connect a bridge in the network on chip (NoC)
US10990552B1 (en) Streaming interconnect architecture for data processing engine array
WO2016095340A1 (en) Method and device for determining that data is sent successfully

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16906539

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16906539

Country of ref document: EP

Kind code of ref document: A1