Message forwarding method, device, equipment and storage medium

By adopting a polling scheduling strategy and separately storing time-division multiplexing messages in the packet switching chip, the problem of time-division multiplexing messages not being able to be forwarded in a timely manner is solved, fast forwarding is achieved, and latency is reduced.

CN114079628BActive Publication Date: 2025-09-09SANECHIPS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010844660.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-20
Publication Date
2025-09-09
Estimated Expiration
2040-08-20

AI Technical Summary

Technical Problem

Existing packet switching chips have difficulty meeting the demand for fast forwarding when processing time-division multiplexing messages. Traditional methods of reducing the number of forwarding processing subsystems and increasing the system clock frequency are no longer able to meet current latency requirements.

Method used

A polling scheduling strategy is adopted to give priority to forwarding the message with the smallest timestamp in the time-division multiplexing message, and store and process it separately from the non-time-division multiplexing message to ensure the fast forwarding of the time-division multiplexing message.

Benefits of technology

It reduces the forwarding delay of time-division multiplexing messages, realizes the fast forwarding of time-division multiplexing messages, and meets the high delay requirements of the current network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114079628B_ABST
    Figure CN114079628B_ABST
Patent Text Reader

Abstract

The present application provides a message forwarding method, apparatus, device, and storage medium. The method includes: obtaining a message to be forwarded; if the message to be forwarded includes a time-division multiplexing message, after forwarding the time-division multiplexing message with the smallest timestamp, forwarding the unicast message with the smallest timestamp and the multicast message with the smallest timestamp among the non-time-division multiplexing messages using a round-robin scheduling strategy. The technical solution of the embodiment of the present application solves the problem that the time-division multiplexing message cannot be forwarded in time due to the priority forwarding of the message with the smallest timestamp during message forwarding, reduces the forwarding delay of the time-division multiplexing message, and realizes the rapid forwarding of the time-division multiplexing message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message forwarding method, apparatus, device and storage medium. Background Art

[0002] In packet transport networks (PTN) and optical transport networks (OTN), packet switching chips are often used to process mixed forwarding scenarios of single and multicast data messages and time-division multiplexing (TDM) single and multicast messages. In this scenario, it is necessary to ensure the normal forwarding of single and multicast data messages while also meeting the requirements for low-latency forwarding of time-division multiplexing single and multicast messages. However, with the rapid development of the communications industry, higher requirements have been placed on the forwarding delay of time-division multiplexing messages. The forwarding mode of traditional packet switching chips, which reduces the number of forwarding processing subsystems and increases the system clock frequency to reduce the forwarding delay of time-division multiplexing messages, can no longer meet current needs, limiting the rapid forwarding of time-division multiplexing messages. Summary of the Invention

[0003] The present application provides a message forwarding method, apparatus, device and storage medium to achieve rapid forwarding of time-division multiplexed messages.

[0004] The present invention provides a method for forwarding a message, including:

[0005] Get the message to be forwarded;

[0006] If the messages to be forwarded include time division multiplexing messages, after forwarding the time division multiplexing message with the smallest timestamp, the unicast message and the multicast message with the smallest timestamp in the non-time division multiplexing messages are forwarded using a round-robin scheduling strategy.

[0007] The present invention provides a method for forwarding a message, including:

[0008] Get the message to be forwarded;

[0009] In the first working mode, if the message to be forwarded includes a time-division multiplexing message, after forwarding the time-division multiplexing message with the smallest timestamp, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message are forwarded using a round-robin scheduling strategy; if the message to be forwarded does not include a time-division multiplexing message, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message are forwarded using a round-robin scheduling strategy;

[0010] In the second working mode, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp are forwarded using a round-robin scheduling strategy.

[0011] The present invention provides a message forwarding device, including:

[0012] A first message acquisition module, configured to acquire a message to be forwarded;

[0013] The first message forwarding module is configured to forward the unicast message and the multicast message with the smallest timestamp in the non-time division multiplexed message using a round-robin scheduling strategy after forwarding the time division multiplexed message with the smallest timestamp if the message to be forwarded includes the time division multiplexed message.

[0014] The present invention provides a message forwarding device, including:

[0015] A second message acquisition module is configured to acquire messages to be forwarded;

[0016] The second message forwarding module is configured to, in the first working mode, if the message to be forwarded includes a time-division multiplexing message, then after forwarding the time-division multiplexing message with the smallest timestamp, forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message using a polling scheduling strategy; if the message to be forwarded does not include a time-division multiplexing message, then forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message using a polling scheduling strategy;

[0017] The third message forwarding module is configured to forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in a round-robin scheduling strategy in the second working mode.

[0018] An embodiment of the present application provides a device, including:

[0019] one or more processors;

[0020] a storage device configured to store one or more programs;

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned message forwarding method.

[0022] An embodiment of the present application further provides a storage medium of computer-executable instructions, which, when executed by a computer processor, are used to execute the above-mentioned message forwarding method.

[0023] With respect to the above embodiments and other aspects of the present application and their implementation, further description is provided in the accompanying drawings, detailed description and claims.

[0024] The embodiment of the present application obtains the message to be forwarded; if the message to be forwarded includes a time-division multiplexing message, then after forwarding the time-division multiplexing message with the smallest timestamp, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message are forwarded using a polling scheduling strategy. After obtaining the message to be forwarded, the message type in the message to be forwarded is judged. If a time-division multiplexing message is included, the time-division multiplexing message with the smallest timestamp is forwarded, and then the non-time-division multiplexing message is forwarded using a polling scheduling strategy, so that even if the timestamp of the time-division multiplexing message is not the smallest among the messages to be forwarded, it can be forwarded better than the non-time-division multiplexing message. This solves the problem that the time-division multiplexing message cannot be forwarded in time due to the priority forwarding of the message with the smallest timestamp when forwarding, reduces the forwarding delay of the time-division multiplexing message, and realizes the rapid forwarding of the time-division multiplexing message. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A flowchart of a message forwarding method provided by an embodiment;

[0026] Figure 2 A flowchart of another message forwarding method provided by an embodiment;

[0027] Figure 3 An example diagram of a timestamp comparison method provided by an embodiment;

[0028] Figure 4 A flowchart of another message forwarding method provided by an embodiment;

[0029] Figure 5 A schematic structural diagram of a message forwarding device provided in one embodiment;

[0030] Figure 6 A schematic structural diagram of another message forwarding device provided in one embodiment;

[0031] Figure 7 A schematic structural diagram of a device provided in one embodiment. DETAILED DESCRIPTION

[0032] The present application is described below in conjunction with the accompanying drawings and embodiments. It will be understood that the specific embodiments described herein are intended only to explain the present application and are not intended to limit the present application. It should be noted that, unless there is a conflict, the features of the embodiments in the present application may be combined with each other in any manner. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present application, not all structures.

[0033] Existing packet switching chips achieve the goal of reducing the forwarding delay of time-division multiplexed messages by reducing the number of forwarding processing subsystems and increasing the system clock frequency. However, since they store time-division multiplexed messages mixed with non-time-division multiplexed messages and prioritize forwarding the message with the smallest timestamp among unicast and multicast messages, it is difficult to prioritize forwarding time-division multiplexed messages when the timestamp of the time-division multiplexed message is not the smallest, resulting in the forwarding delay of time-division multiplexed messages being difficult to meet current needs. The message forwarding method of this embodiment stores time-division multiplexed messages separately and forwards messages from the perspective of making time-division multiplexed messages independent, providing a decision-making basis for reducing the forwarding delay of time-division multiplexed messages.

[0034] Figure 1 A flowchart of a message forwarding method provided in an embodiment is shown in FIG. Figure 1 As shown, the message forwarding method provided in this embodiment includes step 110 and step 120.

[0035] In step 110, a message to be forwarded is obtained.

[0036] In this embodiment, the message to be forwarded can be understood as a data unit received through a serial deserializer (SerDes) interface that needs to be exchanged and transmitted in the network. The SerDes interface is a mainstream time-division multiplexing (TDM) and point-to-point (P2P) serial communication technology. It converts multiple low-speed parallel signals at the transmitting end into high-speed serial signals for transmission over the transmission medium, and converts the high-speed serial signals back into low-speed parallel signals at the receiving end.

[0037] Depending on the transmission method, the messages to be forwarded can be divided into time-division multiplexing messages and non-time-division multiplexing messages. According to the different receiving and transmitting objects, the above-mentioned messages to be forwarded can be divided into unicast messages and multicast messages. That is, the messages to be forwarded can include time-division multiplexing type unicast messages, time-division multiplexing type multicast messages, non-time-division multiplexing type unicast messages and non-time-division multiplexing type multicast messages. Among them, unicast messages can be understood as a type of message that is received and transmitted only between two nodes, and multicast messages can be understood as a type of message sent from a source host to multiple target hosts. That is, the source host only sends one copy of the data, and the destination address of the data is a one-to-many node transmission message with multiple target host addresses included in the multicast group.

[0038] In this embodiment, messages are received from the switching side via multiple SerDes interfaces, and the received messages are classified into time-division multiplexed messages, non-time-division multiplexed unicast messages, and non-time-division multiplexed multicast messages based on the message transmission mode and the recipient of the message, and the received messages are determined as messages to be forwarded. The packet switching chip can receive messages from the switching side via the multiple SerDes interfaces, and the packet switching chip can be installed in any device that needs to receive and forward messages (such as a base station, a terminal, etc.).

[0039] In step 120, if the messages to be forwarded include time-division multiplexing messages, after forwarding the time-division multiplexing message with the smallest timestamp, the unicast message and the multicast message with the smallest timestamp among the non-time-division multiplexing messages are forwarded using a round-robin scheduling strategy.

[0040] In this embodiment, the timestamp can be understood as an electronic certificate used to represent the time when the message was received, that is, an electronic certificate used to represent the reception time of the message to be forwarded obtained by each SerDes interface. The smallest timestamp can be understood as the earliest time of receipt. The Round-Robin (RR) strategy can be understood as a strategy for channel scheduling in communication, in which users take turns using shared resources, regardless of instantaneous channel conditions, and the same amount of unlimited resources is allocated to each communication link. In this application, it can be understood as a scheduling strategy that forwards the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in turn.

[0041] If it is determined based on the message transmission method that there are time-division multiplexing messages in the obtained messages to be forwarded, the timestamps of the obtained time-division multiplexing messages are compared first, and the time-division multiplexing message with the smallest timestamp is forwarded until there are no time-division multiplexing messages in the obtained messages to be forwarded. Then, the timestamps of the unicast messages and multicast messages in the non-time-division multiplexing messages are compared respectively to obtain the unicast messages and multicast messages with the smallest timestamps in the non-time-division multiplexing messages. The unicast messages and multicast messages with the smallest timestamps are forwarded in turn using a round-robin scheduling strategy.

[0042] The message forwarding method provided in this embodiment determines the message type in the message to be forwarded after obtaining the message to be forwarded. If a time-division multiplexed message is included, the time-division multiplexed message with the smallest timestamp is forwarded. Then, the non-time-division multiplexed message is forwarded through a round-robin scheduling strategy. This allows the time-division multiplexed message to be forwarded in preference to the non-time-division multiplexed message, even if the timestamp of the time-division multiplexed message is not the smallest among the messages to be forwarded. This solves the problem of time-division multiplexed messages not being able to be forwarded in a timely manner due to the priority given to forwarding the message with the smallest timestamp during message forwarding, reduces the forwarding delay of time-division multiplexed messages, and realizes the rapid forwarding of time-division multiplexed messages.

[0043] Figure 2 A flowchart of another message forwarding method provided in an embodiment, such as Figure 2 As shown, the method includes steps 210 to 260.

[0044] In step 210, a message is received. In this step, the packet switching chip receives multiple messages from the switching side through multiple SerDes interfaces.

[0045] In step 220, the received message is subjected to a validity check to obtain a qualified message to be forwarded.

[0046] In one embodiment, the legitimacy detection includes: message validity detection, message length detection, message sop and eop detection, and message destination correctness detection.

[0047] In this embodiment, multiple messages received through multiple SerDes interfaces are subjected to various tests such as validity test, length test, sop and eop test, and destination correctness test to determine whether each received message is valid and legal, and the messages that pass the test are treated as messages to be forwarded and subsequent forwarding operations are performed on them, while the messages that fail the test are terminated from subsequent forwarding operations.

[0048] In step 230 , it is determined whether the message to be forwarded includes a time division multiplexing message. If so, step 240 is executed; if not, step 260 is executed.

[0049] In this embodiment, it is determined whether there is a time-division multiplexed message in the message to be forwarded based on the transmission mode of the message. If so, the time-division multiplexed message needs to be forwarded first and stored separately from the non-time-division multiplexed message, and step 240 is executed; if not, it is considered that the priority of each message to be forwarded that needs to be forwarded is the same, and they can be stored in the same storage medium, and step 260 is executed.

[0050] In step 240, the time-division multiplexing message and the non-time-division multiplexing message are stored in corresponding storage media respectively.

[0051] In this embodiment, if the message to be forwarded includes time-division multiplexing messages and non-time-division multiplexing messages, in order to facilitate the management and rapid scheduling of the time-division multiplexing messages, the time-division multiplexing messages and the non-time-division multiplexing messages need to be stored separately. That is, in hardware implementation, the storage medium (such as RAM, etc.) in the packet switching chip is divided into two parts, one part of the storage medium is used to store time-division multiplexing messages, wherein the time-division multiplexing messages include time-division multiplexing type unicast messages and time-division multiplexing type multicast messages; the other part of the storage medium is used to store non-time-division multiplexing messages, wherein the non-time-division multiplexing messages include non-time-division multiplexing type unicast messages and non-time-division multiplexing type multicast messages. In software implementation, by applying for different storage addresses for time-division multiplexing messages and non-time-division multiplexing messages, they can be stored in the corresponding storage medium.

[0052] Storing time-division multiplexed messages and non-time-division multiplexed messages separately is beneficial to message management and rapid scheduling of messages of different types. It can more quickly screen out the time-division multiplexed message with the smallest timestamp and forward it, and is also beneficial to the recovery and reuse of the cache.

[0053] In step 250, after forwarding the time-division multiplexing message with the smallest timestamp, the unicast message and the multicast message with the smallest timestamp in the non-time-division multiplexing messages are forwarded using a round-robin scheduling strategy.

[0054] In this embodiment, since the time-division multiplexed messages and the non-time-division multiplexed messages have been stored in different storage media respectively, for each time-division multiplexed message in the storage medium storing the time-division multiplexed messages, the time-division multiplexed message with the smallest timestamp is determined and forwarded directly until there are no more time-division multiplexed messages in the storage medium storing the time-division multiplexed messages. Then, for each non-time-division multiplexed message in the storage medium storing the non-time-division multiplexed messages, it is divided into unicast messages and multicast messages, and for each unicast message and multicast message, the unicast message and multicast message with the smallest timestamp is determined, and the unicast message and multicast message with the smallest timestamp are forwarded in turn using a polling scheduling strategy.

[0055] In one embodiment, the message with the smallest timestamp among messages of the same message type can be determined by pairwise comparison. Figure 3 An example diagram of a timestamp comparison method provided by an embodiment, such as Figure 3As shown, taking the acquisition of n+1 messages through the SerDes interface as an example, the message expression method is defined as serdes 0, serdes 1, ..., serdes n-1, serdes n. In the first round of comparison, the two messages are compared in pairs, and the message with the smaller timestamp is determined to enter the second round of comparison until only two messages are left for comparison. After the comparison of the two messages, the message with the smaller timestamp is determined as the message with the smallest timestamp in the message type. In addition to the above-mentioned pairwise comparison method, a variety of methods can be used to determine the message with the smallest timestamp in the same message type, and the embodiments of the present application are not limited to this.

[0056] In step 260, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time division multiplexing messages are forwarded using a round-robin scheduling policy.

[0057] In this embodiment, since time-division multiplexed messages do not exist, the priorities of the acquired messages to be forwarded are the same and do not need to be stored in different storage media. Non-time-division multiplexed messages are classified into unicast messages and multicast messages based on the recipients. The unicast message and multicast message with the smallest timestamp are determined for each unicast message and multicast message, respectively. Round-robin scheduling is used to measure and forward the unicast message and multicast message with the smallest timestamp in turn.

[0058] In one embodiment, a message must carry both a primary timestamp and a secondary timestamp during forwarding. The primary timestamp is used to determine whether the message has the smallest timestamp among its corresponding message type, while the secondary timestamp is used to maintain the timestamps of other message types when the message is forwarded. This prevents a message type from being discarded due to a large difference between the timestamp of the last message scheduled for forwarding and the timestamp of the current message being forwarded due to a long period of non-forwarding. For example, if the message being forwarded is a unicast message in a time-division multiplexed message, the secondary timestamp and secondary timestamp identification bit are used to maintain the unicast message timestamp and / or multicast message timestamp of the non-time-division multiplexed message; if the message being forwarded is a multicast message in a time-division multiplexed message, the secondary timestamp and secondary timestamp identification bit are used to maintain the multicast message timestamp and / or unicast message timestamp of the non-time-division multiplexed message; if the message being forwarded is a unicast message in a non-time-division multiplexed message, the secondary timestamp and secondary timestamp identification bit are used to maintain the multicast message timestamp and / or unicast message timestamp of the non-time-division multiplexed message The timestamp of the unicast message and the time-division multiplexed message are maintained; if the forwarded message is a multicast message in a non-time-division multiplexed message, its sub-timestamp and sub-timestamp identification bit are used to maintain the timestamp of the unicast message and the time-division multiplexed message in the non-time-division multiplexed message; if there is no time-division multiplexed message and non-time-division multiplexed message forwarded for a long time, or the forwarding volume of time-division multiplexed and non-time-division multiplexed messages is small, there will be empty cells sent at this time, then the timestamp of the empty cells is used to maintain the timestamp of the unicast message, multicast message and time-division multiplexed message in the non-time-division multiplexed message.

[0059] The message forwarding method provided in this embodiment performs a legitimacy check on the message after receiving it, so that all the messages to be forwarded are legal messages, thereby ensuring the stability of the network; after determining that there are time-division multiplexed messages in the messages to be forwarded, different storage addresses are applied for them and non-time-division multiplexed messages respectively, so that they are stored in different storage media, and the time-division multiplexed message with the smallest timestamp can be obtained more quickly and forwarded, thereby improving the management efficiency of the messages to be forwarded and the scheduling speed of different types of messages, reducing the forwarding delay of the time-division multiplexed messages, realizing the rapid forwarding of the time-division multiplexed messages, and improving the recycling and reuse efficiency of the storage medium cache.

[0060] Figure 4 A flowchart of another message forwarding method provided in an embodiment, such as Figure 4 As shown, the message forwarding method provided in this embodiment includes steps 310 to 330.

[0061] In step 310, a message to be forwarded is obtained. In this step, the message to be forwarded is received through multiple SerDes interfaces and has undergone a validity check with a qualified result.

[0062] In step 320, in the first working mode, if the message to be forwarded includes a time-division multiplexed message, then after forwarding the time-division multiplexed message with the smallest timestamp, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexed message are forwarded using a polling scheduling strategy; if the message to be forwarded does not include a time-division multiplexed message, then the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexed message are forwarded using a polling scheduling strategy.

[0063] In this embodiment, the first operating mode can be understood as a mode in which messages to be forwarded are divided into three types: time-division multiplexed messages, unicast messages under non-time-division multiplexed messages, and multicast messages under non-time-division multiplexed messages, and the message with the smallest timestamp is determined and forwarded respectively. The time-division multiplexed messages and the non-time-division multiplexed messages are stored in different storage media. Forwarding messages to be forwarded in the first operating mode can reduce the forwarding delay of time-division multiplexed messages, meeting the high forwarding delay requirements for time-division multiplexed messages in current networks.

[0064] In step 330, in the second working mode, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp are forwarded using a round-robin scheduling strategy.

[0065] In this embodiment, the second operating mode can be understood as a mode in which messages to be forwarded are divided into two types: unicast messages and multicast messages, based solely on the recipients of the messages. The message with the smallest timestamp in each of the unicast and multicast messages is determined, and the unicast message with the smallest timestamp and the multicast message with the smallest timestamp are forwarded alternately through a round-robin scheduling strategy. In this operating mode, all messages to be forwarded are mixed and stored in the same storage medium. When forwarding messages in the second operating mode, some processing logic circuits of the packet switching chip can be turned off when the message forwarding latency requirement is low, thus meeting the needs of scenarios with high chip power consumption requirements.

[0066] In one embodiment, before obtaining the message to be forwarded, the method further includes: receiving a control signal; if the control signal is a first control signal, entering a first working mode; if the control signal is a second control signal, entering a second working mode.

[0067] In this embodiment, the user can set the control signal based on the requirements of the application scenario before forwarding the message. If the application scenario has a high latency requirement, the user inputs a first control signal to the packet switching chip, causing the packet switching chip to enter the first operating mode after receiving the first control signal and forward the received message to be forwarded. If the application scenario has a low latency requirement but a high power consumption requirement for the packet switching chip, the user inputs a second control signal to the packet switching chip, causing the packet switching chip to enter the second operating mode after receiving the second control signal and forward the received message to be forwarded, thereby meeting energy conservation requirements. Furthermore, after the corresponding operating mode is selected by the control signal and the message to be forwarded begins to be retrieved, no further operating mode switching is performed.

[0068] In one embodiment, forwarding the unicast message with the smallest timestamp and the multicast message with the smallest timestamp using a polling scheduling strategy includes: determining the unicast message with the smallest timestamp and the multicast message with the smallest timestamp; forwarding the unicast message with the smallest timestamp and the multicast message with the smallest timestamp using a polling scheduling strategy.

[0069] In one embodiment, determining the unicast message with the smallest timestamp and the multicast message with the smallest timestamp includes: if at least two unicast messages with the smallest timestamp exist simultaneously, and the at least two unicast messages with the smallest timestamp include a time-division multiplexing unicast message, then determining the time-division multiplexing unicast message as the unicast message with the smallest timestamp; if at least two multicast messages with the smallest timestamp exist simultaneously, and the at least two multicast messages with the smallest timestamp include a time-division multiplexing multicast message, then determining the time-division multiplexing multicast message as the multicast message with the smallest timestamp.

[0070] In this embodiment, in the second working mode, the messages to be forwarded are divided into unicast messages and multicast messages, and the unicast message with the smallest timestamp and the multicast message with the smallest timestamp are determined respectively. Since unicast messages and multicast messages can be further divided into time-division multiplexing type messages and non-time-division multiplexing type messages, and time-division multiplexing type messages have a higher priority than non-time-division multiplexing type messages when the timestamps are the same, therefore, for unicast messages among the messages to be forwarded, if the number of unicast messages with the smallest timestamp determined is greater than or equal to two, and there is a unicast message of the time-division multiplexing type among them, then the time-division multiplexing unicast message is determined as the unicast message with the smallest timestamp determined this time; if the unicast message with the smallest timestamp determined is a non-time-division multiplexing unicast message, then the non-time-division multiplexing unicast message is directly regarded as the unicast message with the smallest timestamp and is forwarded using a round-robin scheduling strategy. For the multicast messages in the messages to be forwarded, if the number of multicast messages with the smallest timestamp determined is greater than or equal to two, and there is a multicast message of time-division multiplexing type among them, then the time-division multiplexing multicast message is determined as the multicast message with the smallest timestamp determined this time; if the multicast message with the smallest timestamp determined is a non-time-division multiplexing multicast message, then the non-time-division multiplexing multicast message is directly used as the multicast message with the smallest timestamp and the message is forwarded using the polling scheduling strategy.

[0071] The message forwarding method provided in this embodiment determines different working modes according to different application scenarios before obtaining the message to be forwarded. In scenarios with relatively high requirements on latency, time-division multiplexing messages and non-time-division multiplexing messages are stored separately, and time-division multiplexing messages are forwarded preferentially to achieve the purpose of reducing the forwarding delay of time-division multiplexing messages, thereby meeting the high requirements on the forwarding delay of time-division multiplexing messages in this scenario. In scenarios where the latency requirement is low but the power consumption requirement for packet switching chips is high, the messages to be forwarded are mixed and stored in the same storage medium, and the unicast messages and multicast messages in the messages to be forwarded are determined separately for the unicast messages and multicast messages with the smallest timestamps, and forwarded using a round-robin scheduling strategy. At the same time, in the process of determining the message with the smallest timestamp among the unicast messages and multicast messages, time-division multiplexing type messages have a higher priority. When the timestamps are the same, the time-division multiplexing type messages are preferentially determined as the messages with the smallest timestamps of the corresponding type. This ensures the low-latency forwarding of time-division multiplexing type messages to the greatest extent while meeting the energy-saving requirements, and meets the needs of users to choose a suitable chip working mode according to different scenarios.

[0072] This embodiment also provides a message forwarding device. Figure 5 FIG. 1 is a structural diagram of a message forwarding device provided in an embodiment. Figure 5 As shown, the message forwarding device includes: a first message acquisition module 410 and a first message forwarding module 420.

[0073] The first message acquisition module 410 is configured to acquire a message to be forwarded.

[0074] The first message forwarding module 420 is configured to forward the unicast message and the multicast message with the smallest timestamp in the non-time-division multiplexed message using a round-robin scheduling strategy after forwarding the time-division multiplexed message with the smallest timestamp if the message to be forwarded includes a time-division multiplexed message.

[0075] The message forwarding device of this embodiment solves the problem of time-division multiplexed messages not being able to be forwarded in a timely manner due to the priority given to forwarding messages with the smallest timestamp when forwarding messages, by forwarding time-division multiplexed messages and non-time-division multiplexed messages separately. It reduces the forwarding delay of time-division multiplexed messages and realizes the rapid forwarding of time-division multiplexed messages.

[0076] In one embodiment, the first message obtaining module 410 includes:

[0077] The message receiving unit is configured to receive messages.

[0078] The validity detection unit is configured to perform a validity detection on the received message and obtain a message to be forwarded that passes the detection.

[0079] In one embodiment, the first message forwarding module 420 further includes:

[0080] Before forwarding the time-division multiplexing message with the smallest timestamp, the time-division multiplexing message and the non-time-division multiplexing message are stored in corresponding storage media respectively.

[0081] In one embodiment, it further includes:

[0082] The fourth message forwarding module is configured to forward the unicast message and the multicast message with the smallest timestamp in the non-time division multiplexed messages using a round-robin scheduling strategy if the messages to be forwarded do not include time division multiplexed messages.

[0083] The message forwarding device proposed in this embodiment and the message forwarding method proposed in the above embodiment belong to the same inventive concept. For the technical details described in detail in this embodiment, please refer to any of the above embodiments, and this embodiment has the same beneficial effects as executing the message forwarding method.

[0084] This embodiment also provides a message forwarding device. Figure 6 This is a structural diagram of another message forwarding device provided by an embodiment. Figure 6 As shown, the message forwarding device includes: a second message acquisition module 510, a second message forwarding module 520 and a third message forwarding module 530.

[0085] The second message acquisition module 510 is configured to acquire a message to be forwarded.

[0086] The second message forwarding module 520 is set to the first working mode. If the message to be forwarded includes a time-division multiplexing message, after forwarding the time-division multiplexing message with the smallest timestamp, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message are forwarded using a polling scheduling strategy; if the message to be forwarded does not include a time-division multiplexing message, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message are forwarded using a polling scheduling strategy.

[0087] The third message forwarding module 530 is configured to forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in a round-robin scheduling strategy in the second working mode.

[0088] The message forwarding device of this embodiment determines different working modes according to different application scenarios before obtaining the message to be forwarded, and provides corresponding working modes for scenarios with high forwarding delay requirements and scenarios with high chip power consumption requirements, thereby meeting the user's needs to select a suitable chip working mode according to different scenarios.

[0089] In one embodiment, it further includes:

[0090] The control signal receiving module is configured to receive a control signal.

[0091] The working mode confirmation module is configured to enter the first working mode if the control signal is the first control signal; and enter the second working mode if the control signal is the second control signal.

[0092] In one embodiment, the third message forwarding module 530 includes:

[0093] The message determination unit is configured to determine a unicast message with a minimum timestamp and a multicast message with a minimum timestamp.

[0094] The message forwarding unit is configured to forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp using a round-robin scheduling strategy.

[0095] In one embodiment, the message determination unit is specifically configured to: if there are at least two unicast messages with the smallest timestamps at the same time, and the at least two unicast messages with the smallest timestamps include a time-division multiplexing unicast message, then the time-division multiplexing unicast message is determined as the unicast message with the smallest timestamp; if there are at least two multicast messages with the smallest timestamps at the same time, and the at least two multicast messages with the smallest timestamps include a time-division multiplexing multicast message, then the time-division multiplexing multicast message is determined as the multicast message with the smallest timestamp.

[0096] The message forwarding device proposed in this embodiment and the message forwarding method proposed in the above embodiment belong to the same inventive concept. For the technical details described in detail in this embodiment, please refer to any of the above embodiments, and this embodiment has the same beneficial effects as executing the message forwarding method.

[0097] Figure 7 A schematic diagram of a device according to an embodiment is provided. Figure 7 As shown, the device includes a processor 610, a storage device 620, an input device 630, and an output device 640; the number of processors 610 in the device can be one or more. Figure 7 In the embodiment, a processor 610 is used as an example; the processor 610, the storage device 620, the input device 630 and the output device 640 in the device can be connected via a bus or other means. Figure 7 The bus connection is taken as an example.

[0098] Storage device 620, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the message forwarding method in the embodiments of the present application. Processor 610 executes the software programs, instructions, and modules stored in storage device 620 to execute various functional applications and data processing of the device, thereby implementing the above-mentioned message forwarding method.

[0099] The storage device 620 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal, etc. Furthermore, the storage device 620 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some examples, the storage device 620 may further include a memory remotely located relative to the processor 610, and these remote memories may be connected to the device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0100] The input device 630 may be used to receive input digital or character information and generate signal input related to user settings and function control of the device, and may include a touch screen, keyboard, mouse, etc. The output device 640 may include a display device such as a display screen.

[0101] An embodiment of the present application also provides a storage medium containing computer-executable instructions, which are used to execute a message forwarding method when executed by a computer processor.

[0102] Through the above description of the implementation methods, those skilled in the art can understand that the present application can be implemented with the help of software and general hardware, or can be implemented by hardware. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a computer's floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the method described in any embodiment of the present application.

[0103] The above description is merely an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application.

[0104] The block diagram of any logical flow in the accompanying drawings of the present application can represent program steps, or can represent interconnected logical circuits, modules and functions, or can represent a combination of program steps and logical circuits, modules and functions. The computer program can be stored on a memory. The memory can have any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical memory device and system (digital versatile disc DVD or CD optical disc) etc. Computer-readable media can include non-transient storage media. The data processor can be any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (FPGA) and a processor based on a multi-core processor architecture.

[0105] The above description of exemplary embodiments of the present application has been provided by way of exemplary and non-limiting examples. However, various modifications and adaptations to the above embodiments will be apparent to those skilled in the art, when considered in conjunction with the accompanying drawings and claims, without departing from the scope of the present invention. Therefore, the proper scope of the present invention will be determined by reference to the claims.

Claims

1. A message forwarding method, characterized in that: include: Get the message to be forwarded; Storing the time-division multiplexed message and the non-time-division multiplexed message in corresponding storage media respectively; If the messages to be forwarded include time-division multiplexing messages, after forwarding the time-division multiplexing message with the smallest timestamp, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing messages are forwarded using a round-robin scheduling strategy; If the messages to be forwarded do not include time division multiplexing messages, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time division multiplexing messages are forwarded using a round-robin scheduling strategy.

2. The method according to claim 1, characterized in that The obtaining of the message to be forwarded includes: Receive messages; Perform a validity check on the received message to obtain the qualified message to be forwarded.

3. A message forwarding method, characterized in that: include: Get the message to be forwarded; In the first working mode, if the to-be-forwarded message includes a time-division multiplexing message, after forwarding the time-division multiplexing message with the smallest timestamp, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message are forwarded using a round-robin scheduling strategy; If the to-be-forwarded messages do not include time-division multiplexing messages, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing messages are forwarded using a round-robin scheduling strategy, wherein the time-division multiplexing messages and the non-time-division multiplexing messages are respectively stored in corresponding storage media; In the second working mode, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp are forwarded using a round-robin scheduling strategy, wherein all the messages to be forwarded are mixed and stored in the same storage medium.

4. The method according to claim 3, characterized in that Before obtaining the message to be forwarded, the method further includes: receiving a control signal; If the control signal is the first control signal, entering the first working mode; If the control signal is the second control signal, the second working mode is entered.

5. The method according to claim 3, characterized in that The forwarding of the unicast message with the smallest timestamp and the multicast message with the smallest timestamp by using the round-robin scheduling strategy includes: Determine the unicast message with the smallest timestamp and the multicast message with the smallest timestamp; The unicast message with the smallest timestamp and the multicast message with the smallest timestamp are forwarded using a round-robin scheduling policy.

6. The method according to claim 5, characterized in that Determining the unicast message with the smallest timestamp and the multicast message with the smallest timestamp includes: If there are at least two unicast messages with the smallest timestamps at the same time, and the at least two unicast messages with the smallest timestamps include a time-division multiplexing unicast message, the time-division multiplexing unicast message is determined as the unicast message with the smallest timestamp; If there are at least two multicast messages with the smallest timestamps, and the at least two multicast messages with the smallest timestamps include a time-division multiplexing multicast message, the time-division multiplexing multicast message is determined as the multicast message with the smallest timestamp.

7. A message forwarding device, characterized in that: include: A first message acquisition module, configured to acquire a message to be forwarded; Storing the time-division multiplexed message and the non-time-division multiplexed message in corresponding storage media respectively; A first message forwarding module is configured to, if the message to be forwarded includes a time-division multiplexing message, forward the time-division multiplexing message with the smallest timestamp and then forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message using a round-robin scheduling strategy; The fourth message forwarding module is configured to forward the unicast message and the multicast message with the smallest timestamp in the non-time division multiplexed messages using a round-robin scheduling strategy if the messages to be forwarded do not include time division multiplexed messages.

8. A message forwarding device, characterized in that: include: A second message acquisition module is configured to acquire messages to be forwarded; The second message forwarding module is configured to, in the first working mode, if the message to be forwarded includes a time-division multiplexing message, forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing message in a round-robin scheduling strategy after forwarding the time-division multiplexing message with the smallest timestamp; If the to-be-forwarded messages do not include time-division multiplexing messages, the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in the non-time-division multiplexing messages are forwarded using a round-robin scheduling strategy, wherein the time-division multiplexing messages and the non-time-division multiplexing messages are respectively stored in corresponding storage media; The third message forwarding module is configured to forward the unicast message with the smallest timestamp and the multicast message with the smallest timestamp in a round-robin scheduling strategy in the second working mode, wherein all the messages to be forwarded are mixed and stored in the same storage medium.

9. A device, characterized in that include: one or more processors; a storage device configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the message forwarding method as described in any one of claims 1-2 or 3-6.

10. A storage medium of computer-executable instructions, characterized in that: When executed by a computer processor, the computer executable instructions are used to execute the message forwarding method as described in any one of claims 1-2 or 3-6.

Citation Information

Patent Citations

  • A packet switching system and a method thereof

    WO2008074191A1