Method, apparatus, electronic device, and medium for business processing
By utilizing a preset allocation strategy and dynamic adjustment of the network board links within the chip, the problem of out-of-order message flow caused by inconsistent communication states of the network board links was solved, and orderly transmission of message flow was achieved.
Patent Information
- Application Number
- CN202311518663.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-11-13
AI Technical Summary
In the chip, inconsistent communication states of the network board links cause out-of-order message flow when the message stream arrives at the destination.
When the chip receives a message stream, it uses a preset allocation strategy to allocate it to a network board link. If the total bandwidth of the target network board link cannot support the data, it selects other network board links to continue transmitting the untransmitted part of the message stream until all data transmission is completed.
This avoids the data out-of-order problem caused by splitting the message stream into multiple sub-streams and transmitting them through different network board links, ensuring that the arrival time of each sub-stream of the message stream at the other end is not disordered, and improving the orderliness of data transmission.
Smart Images

Figure CN117527933B_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing technology, and in particular to a method, apparatus, electronic device, and medium for business processing. Background Technology
[0002] With the advent of the chip era, solutions that utilize chips for business processing are increasingly being applied to various business scenarios.
[0003] In related technologies, chips typically include line cards (LCs) for processing packets and network boards (SFCs) for forwarding packets. Due to the large number of network boards, there are also numerous network board links for packet transmission. This leads to situations where multiple network board links simultaneously forward a single packet stream to the destination network board link during the chip's forwarding of the received packet stream to the line cards.
[0004] However, the above situation also leads to a problem: due to the different communication states of each network board link, the message stream reaching the destination may be out of order. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and medium for service processing, thereby resolving the problem of out-of-order message flow upon arrival at the line card in related technologies.
[0006] According to one aspect of the embodiments of this application, a business processing method is provided, applied to a chip, the method comprising:
[0007] When it is determined that the line card has received a packet stream, a preset allocation strategy is used to allocate a packet stream to a corresponding network board link.
[0008] If it is determined that the total bandwidth of the target network board link cannot support the allocated target packet flow, after detecting that the first part of the target packet flow is transmitted using the target network board link, other network board links are selected for the target packet flow. The target network board link is any one of the network board links in the chip.
[0009] The second part of the target packet stream is transmitted using the other network board links until all data transmissions of the target packet stream are completed. The second part of the data is the data in the target packet stream that is adjacent to the first part of the data and has not been transmitted.
[0010] Optionally, in another embodiment based on the method described above in this application, determining that the total bandwidth traffic of the target network board link cannot support the allocated target packet flow includes:
[0011] When the total bandwidth of the target network board link is detected to be lower than the flow rate corresponding to the target packet flow, it is determined that the target network board link cannot support the target packet flow.
[0012] Optionally, in another embodiment based on the method described above in this application, detecting that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow includes:
[0013] Obtain the cache usage index of the port corresponding to the link belonging to the target network board, wherein the cache usage index corresponds to the number of packet stream caches and / or the size of the packet stream cache data;
[0014] If the cache usage index is detected to be higher than the first threshold, it is determined that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow.
[0015] Optionally, in another embodiment based on the method described above in this application, the method further includes:
[0016] If the cache usage index is detected to be higher than the limit threshold, the target network board link is instructed to discard the target packet flow, wherein the limit threshold is higher than the first threshold.
[0017] Optionally, in another embodiment based on the method described above in this application, the step of transmitting the second part of the target packet stream using the other network board links includes:
[0018] Detect whether other network board links are currently transmitting other packet streams;
[0019] If so, after determining that the other network board links have completed the transmission of the other message streams, the second part of the target message stream is transmitted using the other network board links;
[0020] If not, the second part of the target packet stream is transmitted directly using the other network board links.
[0021] Optionally, in another embodiment based on the method described above in this application, determining that the other network board links have completed transmitting the other message streams includes:
[0022] Based on the buffer usage index of the other network board links, the transmission delay of the other network board links for transmitting the other packet streams is calculated; and the initial time point of the most recent transmission of the other packet streams by the other network board links is obtained.
[0023] When the current time point is detected to be later than the transmission completion time point, it is determined that the other network board links have completed the transmission of the other message streams, wherein the transmission completion time point is the time point after the transmission delay from the initial time point.
[0024] Optionally, in another embodiment based on the method described above in this application, before transmitting the second portion of the target packet stream using the other network board link, the method further includes:
[0025] Obtain the cache usage indicators of all network board links corresponding to the ports in the chip;
[0026] Among all cache usage metrics, network board links that are below the second threshold are designated as the other network board links.
[0027] Optionally, in another embodiment based on the method described above in this application, the method further includes:
[0028] If it is determined that the total bandwidth of the target network board link can support the allocated target packet flow, the target network board link is used to complete all data transmission of the target packet flow.
[0029] Optionally, in another embodiment based on the method described above in this application, the step of allocating a packet flow to a corresponding network board link using a preset allocation strategy includes:
[0030] Based on the flow data information corresponding to each packet flow, a matching identifier is generated sequentially for each packet flow, and one matching identifier corresponds to a network board link;
[0031] Each message stream is assigned to a network board link corresponding to the matching identifier.
[0032] Optionally, in another embodiment based on the method described above in this application, the matching identifier is a hash value.
[0033] According to another aspect of the embodiments of this application, a business processing apparatus is provided, applied to a chip, the apparatus comprising:
[0034] The allocation module is configured to allocate a packet stream to a corresponding network board link using a preset allocation strategy when it is determined that the line card board has received a packet stream.
[0035] The detection module is configured to select other network board links for the target packet flow if it is determined that the total bandwidth of the target network board link cannot support the allocated target packet flow. After detecting that the first part of the data of the target packet flow is transmitted using the target network board link, the target network board link is any one of the network board links in the chip.
[0036] The transmission module is configured to transmit the second part of the target packet stream using the other network board links until it is determined that all data transmissions of the target packet stream have been completed. The second part of the data is the data in the target packet stream that is adjacent to the first part of the data and has not been transmitted.
[0037] According to another aspect of the embodiments of this application, an electronic device is provided, comprising:
[0038] Memory, used to store executable instructions; and
[0039] A display for operating the method of executing the executable instructions with the memory to complete any of the above-described business processes.
[0040] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided for storing computer-readable instructions, which, when executed, perform the operation of any of the above-described business processing methods.
[0041] In this application, when it is determined that the line card has received a message stream, a preset allocation strategy can be used to allocate a message stream to a corresponding network board link. If it is determined that the total bandwidth of the target network board link cannot support the allocated target message stream, after detecting that the first part of the target message stream is transmitted using the target network board link, other network board links are selected for the target message stream. The target network board link is any network board link in the chip. The second part of the target message stream is transmitted using other network board links until it is determined that all data transmission of the target message stream has been completed. The second part of the data is the data in the target message stream that is adjacent to the first part of the data and has not been transmitted.
[0042] By applying the technical solution of this application, after the chip receives a packet stream, on the one hand, a single network board link is responsible for transmitting the packet stream to the destination, thus avoiding the data out-of-order problem caused by splitting the packet stream into multiple sub-streams and transmitting them through different network board links, due to the different arrival times of the sub-streams at the other end. On the other hand, when the chip detects that the total bandwidth of the network board link cannot independently support the transmission of the packet stream, it will select other network board links to transmit the remaining data of the packet stream after the network board link has completed transmitting part of the data. This achieves a technical solution that prohibits multiple network board links from transmitting the same packet stream simultaneously, thereby ensuring that the arrival times of the various sub-streams of the packet stream at the other end are not disordered, and thus avoiding the data out-of-order problem of the packet stream.
[0043] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0044] The accompanying drawings, which form part of this specification, illustrate embodiments of this application and, together with the description, serve to explain the principles of this application.
[0045] This application can be more clearly understood with reference to the accompanying drawings and the following detailed description, wherein:
[0046] Figure 1 This is a schematic diagram of a method for performing business processing on a message stream in a related technology proposed in this application;
[0047] Figure 2 This is a schematic diagram of a method for performing business processing on a message stream in another related technology proposed in this application;
[0048] Figure 3 This is a schematic diagram of a business processing method proposed in this application;
[0049] Figure 4 This is a schematic diagram illustrating a business processing method for message streams as proposed in this application.
[0050] Figure 5 This is a schematic diagram of the overall process of a business processing method proposed in this application;
[0051] Figure 6 This is a schematic diagram of the electronic device proposed in this application;
[0052] Figure 7 This is a schematic diagram of the electronic device proposed in this application. Detailed Implementation
[0053] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0054] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0055] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this application or its application or use.
[0056] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0057] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0058] Furthermore, the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.
[0059] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0060] The following is combined Figures 1-5 This application describes a method for performing business processing according to exemplary embodiments thereof. It should be noted that the following application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.
[0061] This application also proposes a method, apparatus, electronic device, and medium for business processing.
[0062] In related technologies, chips typically include line cards (LCs) for processing messages and network cards (SFCs) for forwarding messages. Because there are many network cards, there are also many network card links used for message transmission.
[0063] For example, such as Figure 1 As shown, the chip includes a wired card board LC0, a wired network board LC1, and three network boards SFC0, SFC1, and SF2, with a total bandwidth of 40G for each network board link.
[0064] When the chip receives a message stream with a flow rate of 33G, the message stream is first received by LC0 and then transmitted to LC1 through multiple network board links (two or three of them), such as SFC0, SFC1, and SF2.
[0065] Understandably, if each packet stream could travel through its own network board link, there would be no out-of-order delivery. However, in related technologies, in order to achieve uniform delivery through network board links, each packet stream is actually transmitted by its own network board link in a packet-by-packet splitting manner. That is, a packet stream will pass through multiple network board links, which will lead to out-of-order delivery of the packet streams to the destination.
[0066] In another way, for example, Figure 2As shown, the chip includes a wired card board LC0, a wired network board LC1, and three network boards SFC0, SFC1, and SF2, with a total bandwidth of 40G for each network board link.
[0067] When the chip receives a message stream with a flow rate of 100G, since the flow rate of 100G is greater than the total bandwidth of the network board links (40G), the message stream is first received by LC0 and must pass through multiple network board links, i.e., it is split into three sub-streams (each sub-stream is 33.3G), and then transmitted to LC1 by SFC0, SFC1, and SF2.
[0068] Understandably, since the packet flow rate is greater than the total bandwidth of the network board link, the network board link cannot support the packet flow independently. Therefore, related technologies also require the packet flow to be split into individual packets and transmitted by each network board link. In other words, a packet flow will pass through multiple network board links, which will cause the packet flow to arrive at the destination to be out of order.
[0069] Based on the aforementioned problems in related technologies, this application proposes a flowchart illustrating a business processing method. For example... Figure 3 As shown, this method is applied to a chip and includes:
[0070] S101, when it is determined that the line card has received a message stream, the preset allocation strategy is used to allocate a message stream to a corresponding network board link.
[0071] In one approach, this embodiment differs from related technologies that distribute a message stream across multiple network board links for transmission, leading to data out-of-order delivery due to varying arrival times of the sub-streams. Instead, it allocates a message stream to a single network board link based on a preset allocation strategy, ensuring that this single link is responsible for its subsequent transmission. This avoids the need for multi-object transmission of the message stream.
[0072] As an example, the embodiments of this application do not specifically limit the preset allocation strategy. For example, it can be a random allocation strategy, a sequential allocation strategy, a cyclic allocation strategy, or a low-load priority allocation strategy, etc.
[0073] For example, when there is only one packet stream, it can be allocated to network board link A using random allocation strategy, sequential allocation strategy, low load priority allocation strategy, etc.
[0074] As another example, when there are multiple message streams, random allocation strategies, sequential allocation strategies, low-load priority allocation strategies, etc., can be used to sequentially allocate them to network board links A, B, and C.
[0075] As another example, when the number of packet streams exceeds the total number of network board links within the current chip, a round-robin allocation strategy can be selected. For instance, if there are three packet streams and two network board links, the first network board link can then be used to handle the transmission of the third packet stream after both network board links have been allocated.
[0076] S102, if it is determined that the total bandwidth of the target network board link cannot support the allocated target packet flow, after detecting that the first part of the target packet flow is transmitted using the target network board link, other network board links are selected for the target packet flow. The target network board link is any network board link in the chip.
[0077] In one approach, if the total bandwidth of each network board link is higher than the flow rate of its assigned packet stream (e.g., the total bandwidth of the target network board link is 40G while the flow rate of the target packet stream is 10G), then it means that it can independently transmit the packet stream to the designated line card. Therefore, it can independently complete the entire data transmission of the packet stream it is responsible for.
[0078] In another approach, if the total bandwidth of each network board link is lower than the flow rate of its allocated packet flow (e.g., the total bandwidth of the target network board link is 40G while the flow rate of the target packet flow is 100G), it means that the independent transmission of the target packet flow has exceeded the bandwidth capacity of the target network board link. In this case, one or more other network board links must be selected to assist the network board link in transmission.
[0079] S103, use other network board links to transmit the second part of the target packet stream until it is determined that all data transmission of the target packet stream has been completed. The second part of the data is the data in the target packet stream that is adjacent to the first part of the data and has not been transmitted.
[0080] For example, when the chip receives a target packet stream with a flow rate of 100G, since the flow rate of 100G is greater than the total bandwidth of the target network board link (40G), the target network board link needs to transmit the first part of the target packet stream (i.e., the first 40G of data).
[0081] Understandably, the process of selecting other network board links (e.g., network board link B, also with a total bandwidth of 40G) only begins after it has been confirmed that the transmission of the target packet stream using the target network board link A has been completed. Subsequently, network board link B will continue to transmit the next 40G of the target packet stream (i.e., 40G-80G of data).
[0082] It should be noted that in this embodiment, the step of selecting other network board links only begins after the first part of the target packet stream has been transmitted by the target network board link A. This is because it is essential to ensure that the first network board link completes the transmission of its assigned stream data before the second network board link transmits its assigned stream data. This ensures that the receiving end receives each sub-stream (i.e., each part of the data) in the byte order of the original packet stream.
[0083] Furthermore, in this embodiment of the application, after determining that the transmission of 40G of the target packet stream using network board link B has been completed, if the target packet stream has not yet been completely transmitted, the step of selecting another network board link (e.g., network board link C, with a total bandwidth of 40G) needs to be restarted. Then, network board link C will continue to transmit the next 20G of the target packet stream (i.e., 80G-100G of data) until all data transmission of the target packet stream is detected to be complete.
[0084] It should also be noted that in this embodiment, the step of selecting other network board links will only begin after the second part of the target packet stream has been transmitted by network board link N. This is because it is necessary to ensure that the second network board link has completed transmitting the data of the stream it is responsible for before the third network board link transmits the data of the stream it is responsible for. This ensures that the various sub-streams (i.e., various parts of data) received by the peer end are received in the byte order of the original packet stream.
[0085] By applying the technical solution of this application, after the chip receives a packet stream, on the one hand, one network board link is responsible for transmitting the packet stream to the destination, thus avoiding the data out-of-order problem caused by splitting the packet stream into multiple sub-streams and transmitting them through different network board links, due to the different arrival times of each sub-stream at the other end. On the other hand, when the chip detects that the total bandwidth of the network board link cannot independently support the transmission of the packet stream, it will select other network board links to transmit the remaining data of the packet stream after the network board link has completed the transmission of part of the packet stream. This achieves a technical solution that prohibits multiple network board links from transmitting the same packet stream simultaneously, thereby ensuring that the arrival times of each sub-stream of the packet stream at the other end are not disordered, and thus avoiding the data out-of-order problem of the packet stream. This avoids the disadvantage of slow recovery time of the storage system caused by the previous method.
[0086] Optionally, in another embodiment based on the method described above in this application, determining that the total bandwidth of the target network board link cannot support the allocated target packet flow includes:
[0087] When the total bandwidth traffic of the target network board link is detected to be lower than the flow rate corresponding to the target packet flow, it is determined that the target network board link cannot support the target packet flow.
[0088] Optionally, in another embodiment based on the method described above in this application, detecting that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow includes:
[0089] Obtain the cache usage index of the port corresponding to the target network board link, where the cache usage index corresponds to the number of packet stream caches and / or the size of the packet stream cache data;
[0090] If the cache usage index is detected to be higher than the first threshold, it is determined that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow.
[0091] In one approach, if the total bandwidth of the target network board link is lower than the flow rate of the target packet flow it is allocated to (for example, the total bandwidth of the target network board link is 30G while the flow rate of the target packet flow is 60G), it means that the independent transmission of the target packet flow has exceeded the bandwidth capacity of the target network board link, and thus it is determined that the target network board link cannot support the transmission of the target packet flow.
[0092] As an example, in order to identify whether a network board link can support the transmission of a target packet stream, the cache usage of its corresponding port can be used, that is, the cache usage index can be determined by comparing it with a first threshold value.
[0093] Understandably, since each network board link is configured with multiple ports (e.g., including at least one egress port and at least one ingress port), one approach is to use these ports to buffer subsequent packet streams. That is, if a port on a network board link exceeds its bandwidth, its corresponding buffering capacity will continuously increase (e.g., by increasing the number of buffers and / or the size of the buffered data).
[0094] Based on this, embodiments of this application can configure a threshold value (i.e., a first threshold value). When the cache index exceeds the first threshold value, the port is considered to be out of bandwidth capacity (i.e., the total bandwidth traffic of the target network board link is determined to be lower than the flow rate corresponding to the target packet flow). It can be understood that embodiments of this application can also configure a lower threshold, i.e., if the cache index is lower than the lower threshold value, the port is considered not to be out of bandwidth capacity.
[0095] As an example, the first threshold could be 100 message stream buffers, and / or 100GB of buffered data, etc. This application does not limit this.
[0096] Optionally, in another embodiment based on the method described above in this application, the method further includes:
[0097] If the detected buffer usage index is higher than the limit threshold, the target network board link is instructed to drop the target packet flow, where the limit threshold is higher than the first threshold.
[0098] In one approach, if the number of packet streams buffered on the target network board link exceeds a certain level, and / or the size of the buffered data exceeds a certain level, it can be determined that the current buffer usage index of the network board link exceeds the limit threshold. To avoid the drawback of overload, this embodiment of the application can instruct it to return the received packet streams to the corresponding LC uplink board, so that the uplink board LC can discard them and no longer process them.
[0099] Optionally, in another embodiment based on the method described above in this application, transmitting the second part of the target packet stream using other network board links includes:
[0100] Detect whether other network board links are currently transmitting other packet streams;
[0101] If so, after confirming that other network board links have completed the transmission of other packet streams, use other network board links to transmit the second part of the target packet stream.
[0102] If not, directly use other network board links to transmit the second part of the target packet stream.
[0103] In one embodiment of this application, during the process of controlling the transmission of the first part of the target packet stream through the target network board link, the data can be sent according to a certain period (a period can be a fixed time interval, such as 10 milliseconds, or a fixed number of packets, such as 100 packet streams).
[0104] Furthermore, in this embodiment of the application, if it is detected that another network board link is transmitting other message streams in the current cycle, it needs to complete the transmission of the current message stream first, and then transmit the second part of the target message stream in the next transmission cycle.
[0105] As an example, in this embodiment of the application, the network board link A with the smallest port buffer can be selected first for transmission. In the next cycle, another network board link B with the smallest port buffer can be selected for transmission. If the port is the same as the previous one, it can be transmitted directly. If the port is different, other streams can be transmitted first. In the next cycle, other network board links B can be used for transmission until the target message stream is completely transmitted.
[0106] In one embodiment, this application can calculate the transmission delay of the most recent packet stream based on the current SFC buffer depth, thereby calculating the transmission completion time point of the packet stream reaching the destination (the transmission completion time point is calculated by the sum of the initial time point and the transmission delay). The packet stream is then sent after this transmission completion time point. Alternatively, transmission is also performed when the SFC buffer depth of the current packet is greater than the SFC buffer depth of the previous packet.
[0107] As an example, the transmission completion time can be calculated and added by the source end of the message stream sender. As another example, the source end also needs to add a stream ID field for each message stream.
[0108] Optionally, in another embodiment based on the method described above in this application, before transmitting the second part of the target packet stream using other network board links, the method further includes:
[0109] Obtain the cache usage metrics for all network board links in the chip;
[0110] Among all cache usage metrics, network board links that are below the second threshold are classified as other network board links.
[0111] Optionally, in another embodiment based on the method described above in this application, the method further includes:
[0112] If it is determined that the total bandwidth of the target network board link can support the allocated target packet flow, the target network board link is used to complete the full data transmission of the target packet flow.
[0113] Optionally, in another embodiment based on the method described above in this application, allocating a packet flow to a corresponding network board link using a preset allocation strategy includes:
[0114] Based on the flow data information corresponding to each packet flow, a matching identifier is generated sequentially for each packet flow, and one matching identifier corresponds to a network board link;
[0115] Each message stream is assigned to a network board link corresponding to the matching identifier.
[0116] Optionally, in another embodiment based on the method described above in this application, the matching identifier is a hash value.
[0117] In one embodiment of this application, in order to allocate different packet flows to corresponding network board links, a matching identifier can be generated for each packet flow based on the packet flow data information. It is understood that this matching identifier is used for network link selection.
[0118] As an example, the stream data information can be a 5-tuple of the message stream, while the matching identifier can be a hash value.
[0119] In one approach, embodiments of this application can obtain the 5-tuple information of each packet flow (e.g., including source IP, destination IP, source port, destination port, and protocol number) or other fields of the packet flow for differentiation. After identifying each flow, a hash value is assigned to each flow for network link selection. For example, as shown in Table 1 below:
[0120] Table 1:
[0121]
[0122]
[0123] This is understandable, because each packet stream has a different hash value, allowing it to be distributed across different network board links. In one approach, if the number of packet streams is increased, the distribution can continue to be cyclically allocated based on the number of network board links.
[0124] For example, as shown in Table 2 below:
[0125] Table 2:
[0126] Stream identification Flow rate Hash value Stream 1 33G 0 Stream 2 33G 1 Stream 3 33G 2 Stream 4 5G 0 Stream 5 5G 1
[0127] To further explain, such as Figure 4 As shown, the chip includes a wired card board LC0, a wired network board LC1, and three network boards SFC0, SFC1, and SF2, with a total bandwidth of 40G for each network board link.
[0128] When the chip receives three message streams, and each message stream has a flow rate of 33G, then according to the above allocation strategy, flow 1 is allocated to SFC0, flow 2 is allocated to SFC1, and flow 3 is allocated to SFC2, so that the three message streams are first received by LC0 and then transmitted to LC1 through their respective allocated network board links, such as passing through SFC0, SFC1, and SF2.
[0129] In another way, such as Figure 5 The diagram shown is a flowchart illustrating the business processing method proposed in this application, which includes:
[0130] Step 1: When the line card board receives a message stream, generate a matching identifier for each message stream in sequence based on the flow data information corresponding to each message stream.
[0131] One matching identifier corresponds to one network board link. As an example, the matching identifier can be a hash value.
[0132] Step 2: Detect whether the total bandwidth of the target network board link is lower than the flow rate corresponding to the target packet flow, and determine whether the target network board link supports the target packet flow. Then execute steps 3a and 3b.
[0133] Step 3a: Detect that the total bandwidth of the target network board link is higher than the flow rate corresponding to the target packet flow, determine that the total bandwidth of the target network board link can support the allocated target packet flow, and use the target network board link to complete all data transmission of the target packet flow.
[0134] Step 3b: When the total bandwidth traffic of the target network board link is detected to be lower than the flow rate corresponding to the target packet flow, it is determined that the target network board link cannot support the target packet flow.
[0135] Obtain the cache usage index of the port corresponding to the target network board link, where the cache usage index corresponds to the number of packet stream caches and / or the size of the packet stream cache data;
[0136] If the cache usage index is detected to be higher than the first threshold, it is determined that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow.
[0137] In one alternative approach, if the detected buffer usage index is higher than the limit threshold, the target network board link is instructed to drop the target packet flow, wherein the limit threshold is higher than the first threshold.
[0138] Step 4b: After detecting that the first part of the target packet stream is being transmitted using the target network board link, select other network board links for the target packet stream.
[0139] The target network board link is any network board link in the chip.
[0140] In one embodiment of this application, the following steps may be performed during the selection of other network board links:
[0141] Obtain the cache usage metrics for all network board links in the chip;
[0142] Among all cache usage metrics, network board links that are below the second threshold are classified as other network board links.
[0143] Step 5b: Detect whether other network board links are currently transmitting other packet streams. Then proceed to 6b1 or 6b2.
[0144] Step 6b1: If yes, after confirming that other network board links have completed transmitting other packet streams, use those other network board links to transmit the second part of the target packet stream. Then proceed to step 7b.
[0145] Step 6b2: If not, directly use other network board links to transmit the second part of the target packet stream. Then proceed to step 7b.
[0146] Step 7b: If all data transmissions of the target packet stream have not yet been completed, continue performing the steps above for selecting other network board links until it is determined that all data transmissions of the target packet stream have been completed.
[0147] By applying the technical solution of this application, after the chip receives a packet stream, on the one hand, a single network board link is responsible for transmitting the packet stream to the destination, thus avoiding the data out-of-order problem caused by splitting the packet stream into multiple sub-streams and transmitting them through different network board links, due to the different arrival times of the sub-streams at the other end. On the other hand, when the chip detects that the total bandwidth of the network board link cannot independently support the transmission of the packet stream, it will select other network board links to transmit the remaining data of the packet stream after the network board link has completed transmitting part of the data. This achieves a technical solution that prohibits multiple network board links from transmitting the same packet stream simultaneously, thereby ensuring that the arrival times of the various sub-streams of the packet stream at the other end are not disordered, and thus avoiding the data out-of-order problem of the packet stream.
[0148] Optionally, in another embodiment of this application, such as Figure 6 As shown, this application also provides a business processing apparatus. Applied to a chip, it includes:
[0149] The allocation module 201 is configured to allocate a packet stream to a corresponding network board link using a preset allocation strategy when it is determined that the line card board has received a packet stream.
[0150] The detection module 202 is configured to select other network board links for the target packet flow if it is determined that the total bandwidth of the target network board link cannot support the allocated target packet flow. After detecting that the first part of the data of the target packet flow is transmitted using the target network board link, the target network board link is any one of the network board links in the chip.
[0151] The transmission module 203 is configured to transmit the second part of the target packet stream using the other network board links until it is determined that all data transmissions of the target packet stream have been completed. The second part of the data is the data in the target packet stream that is adjacent to the first part of the data and has not been transmitted.
[0152] By applying the technical solution of this application, after the chip receives a packet stream, on the one hand, one network board link is responsible for transmitting the packet stream to the destination, thus avoiding the data out-of-order problem caused by splitting the packet stream into multiple sub-streams and transmitting them through different network board links, due to the different arrival times of each sub-stream. On the other hand, when the chip detects that the total bandwidth of the network board link cannot independently support the transmission of the packet stream, it will select other network board links to transmit the remaining data of the packet stream after the network board link has completed the transmission of part of the packet stream. This achieves a technical solution that prohibits multiple network board links from transmitting the same packet stream simultaneously, thereby ensuring that the arrival times of each sub-stream of the packet stream are not disordered, and thus avoiding the data out-of-order problem of the packet stream. This avoids the disadvantage of slow storage system recovery time caused by the previous method.
[0153] In another embodiment of this application, the detection module 202 is configured as follows:
[0154] When the total bandwidth of the target network board link is detected to be lower than the flow rate corresponding to the target packet flow, it is determined that the target network board link cannot support the target packet flow.
[0155] In another embodiment of this application, the detection module 202 is configured as follows:
[0156] Obtain the cache usage index of the port corresponding to the link belonging to the target network board, wherein the cache usage index corresponds to the number of packet stream caches and / or the size of the packet stream cache data;
[0157] If the cache usage index is detected to be higher than the first threshold, it is determined that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow.
[0158] In another embodiment of this application, the detection module 202 is configured as follows:
[0159] If the cache usage index is detected to be higher than the limit threshold, the target network board link is instructed to discard the target packet flow, wherein the limit threshold is higher than the first threshold.
[0160] In another embodiment of this application, the detection module 202 is configured as follows:
[0161] Detect whether other network board links are currently transmitting other packet streams;
[0162] If so, after determining that the other network board links have completed the transmission of the other message streams, the second part of the target message stream is transmitted using the other network board links;
[0163] If not, the second part of the target packet stream is transmitted directly using the other network board links.
[0164] In another embodiment of this application, the detection module 202 is configured as follows:
[0165] Obtain the cache usage indicators of all network board links corresponding to the ports in the chip;
[0166] Among all cache usage metrics, network board links that are below the second threshold are designated as the other network board links.
[0167] In another embodiment of this application, the detection module 202 is configured as follows:
[0168] If it is determined that the total bandwidth of the target network board link can support the allocated target packet flow, the target network board link is used to complete all data transmission of the target packet flow.
[0169] In another embodiment of this application, the detection module 202 is configured as follows:
[0170] Based on the flow data information corresponding to each packet flow, a matching identifier is generated sequentially for each packet flow, and one matching identifier corresponds to a network board link;
[0171] Each message stream is assigned to a network board link corresponding to the matching identifier.
[0172] In another embodiment of this application, the detection module 202 is configured as follows:
[0173] The matching identifier is a hash value.
[0174] This application also provides an electronic device for performing the above-described business processing method. Please refer to... Figure 7 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 7 As shown, the electronic device 3 includes: a processor 300, a memory 301, a bus 302, and a communication interface 303. The processor 300, the communication interface 303, and the memory 301 are connected via the bus 302. The memory 301 stores a computer program that can run on the processor 300. When the processor 300 runs the computer program, it executes the business processing method provided in any of the foregoing embodiments of this application.
[0175] The memory 301 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 303 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0176] Bus 302 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 301 is used to store programs. After receiving an execution instruction, the processor 300 executes the program. The video transmission method disclosed in any of the foregoing embodiments of this application can be applied to the processor 300, or implemented by the processor 300.
[0177] The processor 300 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 300 or by instructions in software form. The processor 300 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 301. The processor 300 reads the information in memory 301 and, in conjunction with its hardware, completes the steps of the above method.
[0178] The electronic devices and business processing methods provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0179] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for business processing, characterized in that, Applied to chips, including: When it is determined that the line card has received a packet stream, a preset allocation strategy is used to allocate a packet stream to a corresponding network board link. If it is determined that the total bandwidth of the target network board link cannot support the allocated target packet flow, after detecting that the first part of the target packet flow is transmitted using the target network board link, other network board links are selected for the target packet flow. The target network board link is any one of the network board links in the chip. The second part of the target packet stream is transmitted using the other network board links until all data transmissions of the target packet stream are completed. The second part of the data is the data in the target packet stream that is adjacent to the first part of the data and has not been transmitted.
2. The method as described in claim 1, characterized in that, The determination that the total bandwidth of the target network board link cannot support the allocated target packet flow includes: When the total bandwidth of the target network board link is detected to be lower than the flow rate corresponding to the target packet flow, it is determined that the target network board link cannot support the target packet flow.
3. The method as described in claim 2, characterized in that, The detection that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow includes: Obtain the cache usage index of the port corresponding to the link belonging to the target network board, wherein the cache usage index corresponds to the number of packet stream caches and / or the size of the packet stream cache data; If the cache usage index is detected to be higher than the first threshold, it is determined that the total bandwidth traffic of the target network board link is lower than the flow rate corresponding to the target packet flow.
4. The method as described in claim 3, characterized in that, The method further includes: If the cache usage index is detected to be higher than the limit threshold, the target network board link is instructed to discard the target packet flow, wherein the limit threshold is higher than the first threshold.
5. The method as described in claim 1, characterized in that, The second part of the data transmitted using the other network board links to the target packet stream includes: Detect whether other network board links are currently transmitting other packet streams; If so, after determining that the other network board links have completed the transmission of the other message streams, the second part of the target message stream is transmitted using the other network board links; If not, the second part of the target packet stream is transmitted directly using the other network board links.
6. The method as described in claim 5, characterized in that, The step of determining that the other network board links have completed the transmission of the other message streams includes: Based on the buffer usage index of the other network board links, the transmission delay of the other network board links for transmitting the other packet streams is calculated; and the initial time point of the most recent transmission of the other packet streams by the other network board links is obtained. When the current time point is detected to be later than the transmission completion time point, it is determined that the other network board links have completed the transmission of the other message streams, wherein the transmission completion time point is the time point after the transmission delay from the initial time point.
7. The method as described in claim 1 or 5, characterized in that, Before transmitting the second portion of the target packet stream using the other network board links, the method further includes: Obtain the cache usage indicators of all network board links corresponding to the ports in the chip; Among all cache usage metrics, network board links that are below the second threshold are designated as the other network board links.
8. The method as described in claim 1, characterized in that, The method further includes: If it is determined that the total bandwidth of the target network board link can support the allocated target packet flow, the target network board link is used to complete all data transmission of the target packet flow.
9. The method as described in claim 1, characterized in that, The method of allocating a packet stream to a corresponding network board link using a preset allocation strategy includes: Based on the flow data information corresponding to each packet flow, a matching identifier is generated sequentially for each packet flow, and one matching identifier corresponds to a network board link; Each message stream is assigned to a network board link corresponding to the matching identifier.
10. The method as described in claim 9, characterized in that, The matching identifier is a hash value.
11. An apparatus for business processing, characterized in that, Applied to chips, including: The allocation module is configured to allocate a packet stream to a corresponding network board link using a preset allocation strategy when it is determined that the line card board has received a packet stream. The detection module is configured to select other network board links for the target packet flow if it is determined that the total bandwidth of the target network board link cannot support the allocated target packet flow. After detecting that the first part of the data of the target packet flow is transmitted using the target network board link, the target network board link is any one of the network board links in the chip. The transmission module is configured to transmit the second part of the target packet stream using the other network board links until it is determined that all data transmissions of the target packet stream have been completed. The second part of the data is the data in the target packet stream that is adjacent to the first part of the data and has not been transmitted.
12. An electronic device, characterized in that, include: Memory, used to store executable instructions; as well as, A processor for executing the executable instructions with the memory to perform the operation of the method of any of the business processes described in claims 1-10.
13. A computer-readable storage medium for storing computer-readable instructions, characterized in that, When the instruction is executed, it performs the operation of the business processing method described in any of claims 1-10.
Citation Information
Patent Citations
Control method and device for cell switching
CN102340441A
Method, device and equipment for equalizing flow of uplink aggregation port
CN102437956A
