Control method, system, device and medium

By obtaining pending messages in the switch and sending pending messages to the first gateway, ensuring that the bandwidth of the second gateway meets the needs of the source object, solving the problem of insufficient bandwidth for forwarding messages by the gateway, improving user experience and system reliability sex.

CN114900560BActive Publication Date: 2024-11-05ALIBABA CLOUD COMPUTING CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202210349412.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2024-11-05
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

In the prior art, the gateway’s bandwidth is insufficient when forwarding packets leads to poor user experience, especially when the source object transmits the packets, the bandwidth of the gateway forwarding packets cannot meet the bandwidth requirements of the source object, resulting in the report. The article cannot be forwarded in time.

Method used

By obtaining the pending message in the switch and sending the pending message to the first gateway, the first gateway obtains the correspondence between the source object identifier and the gateway, obtains the indication information for indicating the second gateway, and sends it to the switch The second gateway indicates information and the pending message ensure that the bandwidth of the second gateway meets the bandwidth requirements of the source object, and thus forward the message in a timely manner.

Benefits of technology

It ensures that the bandwidth of the gateway forwarding packets can meet the bandwidth requirements of the source object, improves the user experience, avoids message transmission delay, and improves the reliability and processing efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114900560B_ABST
    Figure CN114900560B_ABST
Patent Text Reader

Abstract

The disclosed embodiment discloses a control method, system, device and medium, the method comprising: obtaining a message to be processed, and sending the message to be processed to a first gateway, the first gateway is used to obtain the source object identifier of the message to be processed, obtain the second gateway indication information for indicating the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch; receive the second gateway indication information and the message to be processed, and forward the message to be processed to the second gateway according to the second gateway indication information, the second gateway is used to forward the message to be processed. The above scheme can ensure that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, ensure that the message of the source object can be forwarded in time, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a control method, system, device and medium. Background Art

[0002] In recent years, with the rapid development and popularization of Internet technology, many related services such as video calls, high-definition digital television, video-on-demand (VOD), live video, etc. have gradually become popular in daily life. Usually, when the corresponding services transmit data through the network, they use messages as the data unit for transmission, and when messages are transmitted in the network, they need to rely on the processing of various message processing devices, including but not limited to gateways.

[0003] In the related art, a gateway, as a network access point, can be used to forward messages. However, the gateway may have a problem of too slow message forwarding speed, resulting in a poor user experience. Summary of the invention

[0004] In order to solve the problems in the related art, the embodiments of the present disclosure provide a control method, system, device and medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a control method, which is applied to a switch, and the method includes:

[0006] Obtaining a message to be processed, and sending the message to be processed to the first gateway, the first gateway is used to obtain a source object identifier of the message to be processed, obtain second gateway indication information for indicating the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch, the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0007] The second gateway indication information and the message to be processed are received, and the message to be processed is forwarded to the second gateway according to the second gateway indication information, where the second gateway is used to forward the message to be processed.

[0008] In an implementation of the present disclosure, before sending the message to be processed to the first gateway, the method further includes:

[0009] Acquire message attribute information of the message to be processed, where the message attribute information includes at least one of a source IP address and a destination IP address of the message to be processed;

[0010] Acquire first gateway indication information for indicating the first gateway according to the message attribute information and the correspondence between the message attribute information and the gateway;

[0011] Sending a message to be processed to the first gateway includes:

[0012] Send the to-be-processed message to the first gateway according to the first gateway instruction information.

[0013] In an implementation of the present disclosure, before sending the message to be processed to the first gateway, the method further includes:

[0014] Acquire first gateway indication information for indicating a first gateway, where the first gateway is any gateway among a plurality of gateways corresponding to the switch;

[0015] Sending a message to be processed to the first gateway includes:

[0016] Send the to-be-processed message to the first gateway according to the first gateway instruction information.

[0017] In an implementation of the present disclosure, before sending the second gateway indication information and the message to be processed to the switch, the method further includes:

[0018] Encapsulating the second gateway indication information and the message to be processed to obtain a first encapsulated message;

[0019] Sending the second gateway indication information and the message to be processed to the switch includes:

[0020] Send the first encapsulated message to the switch:

[0021] Receiving second gateway indication information and a message to be processed, including:

[0022] A first encapsulated message is received.

[0023] In an implementation of the present disclosure, the correspondence between the source object and the gateway includes a correspondence between the source object and the diversion IP address, the diversion IP address and the IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes the second diversion IP address;

[0024] Forwarding the to-be-processed message to the second gateway according to the second gateway instruction information includes:

[0025] According to the second diversion IP address and the routing table, obtain second gateway indication information for indicating a second gateway whose IP address belongs to the same network segment as the second diversion IP address, and forward the message to be processed to the second gateway according to the second gateway indication information.

[0026] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address and the second traffic diversion IP address belong to the same network segment according to the second traffic diversion IP address and the routing table includes:

[0027] According to the second diversion IP address and the routing table, multiple network segments to which the second diversion IP address belongs are obtained, and second gateway indication information for indicating the second gateway whose IP address belongs to the first network segment is obtained, wherein the first network segment is the network segment with the longest subnet mask among the multiple network segments.

[0028] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to a first network segment includes:

[0029] In response to determining according to the routing table that the IP address of at least one gateway belongs to the first network segment, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to the first network segment;

[0030] The method further comprises:

[0031] In response to determining according to the routing table that the IP address of any gateway does not belong to the first network segment and the IP address of at least one gateway belongs to the second network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the second network segment, where the second network segment is a network segment with the second longest subnet mask among multiple network segments.

[0032] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address and the second traffic diversion IP address belong to the same network segment according to the second traffic diversion IP address and the routing table includes:

[0033] According to the second diversion IP address and the routing table, multiple network segments to which the second diversion IP address belongs are obtained, and second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment is obtained, where the third network segment is the network segment with the shortest routing path length among the multiple network segments.

[0034] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to a third network segment includes:

[0035] In response to determining according to the routing table that the third network segment includes an IP address of at least one gateway, obtaining second gateway indication information for indicating a second gateway in the third network segment;

[0036] The method further comprises:

[0037] In response to determining according to the routing table that the IP address of any gateway does not belong to the third network segment, and the IP address of at least one gateway belongs to the fourth network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the fourth network segment, and the fourth network segment is a network segment with the second shortest path length among the multiple network segments.

[0038] In a second aspect, an embodiment of the present disclosure provides a control method, wherein the method is applied to a gateway, and the method includes:

[0039] Receive a first message to be processed sent by the switch, and obtain a source object identifier of the first message to be processed;

[0040] Acquire second gateway indication information for indicating the second gateway according to the source object identifier and the correspondence between the source object and the gateway, and send the second gateway indication information and the first to-be-processed message to the switch, where the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0041] The second to-be-processed message sent by the switch is received, and the second to-be-processed message is forwarded.

[0042] In a third aspect, a message processing system is provided in an embodiment of the present disclosure, and the message processing system includes a switch and at least one gateway, the switch is used to implement the method steps of any one of the first aspect and any one of the implementation methods of the first aspect, and the gateway is used to implement the method steps of the second aspect.

[0043] In a fourth aspect, an embodiment of the present disclosure provides a control device, the control device comprising:

[0044] A first message sending module is configured to obtain a message to be processed and send the message to be processed to the first gateway, the first gateway is used to obtain a source object identifier of the message to be processed, obtain second gateway indication information for indicating the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch, and the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0045] The first message receiving module is configured to receive the second gateway indication information and the message to be processed, and forward the message to be processed to the second gateway according to the second gateway indication information, and the second gateway is used to forward the message to be processed.

[0046] In a fifth aspect, an embodiment of the present disclosure provides a control device, the control device comprising:

[0047] The second message receiving module is configured to receive a first message to be processed sent by the switch, and obtain a source object identifier of the first message to be processed;

[0048] a second message sending module, configured to obtain second gateway indication information for indicating a second gateway according to the source object identifier and the correspondence between the source object and the gateway, and send the second gateway indication information and the first to-be-processed message to the switch, wherein the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0049] The third message sending module is configured to receive the second message to be processed sent by the switch, and forward the second message to be processed.

[0050] In a sixth aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and at least one processor; the memory is used to store one or more computer instructions, and the one or more computer instructions are executed by at least one processor to implement the first aspect, any implementation method of the first aspect, and any method step of the second aspect.

[0051] In the seventh aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, on which computer instructions are stored. When the computer instructions are executed by a processor, the first aspect, any implementation method of the first aspect, and any method steps of the second aspect are implemented.

[0052] In an eighth aspect, a computer program product is provided in an embodiment of the present disclosure, comprising a computer program / instruction, which, when executed by a processor, implements the first aspect, any implementation method of the first aspect, and any method steps of the second aspect.

[0053] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0054] The technical solution provided by the embodiment of the present disclosure is applied to a switch. According to the technical solution, by obtaining a message to be processed and sending the message to be processed to the first gateway, the first gateway is used to obtain the source object identifier of the message to be processed, obtain the second gateway indication information for indicating the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch; receive the second gateway indication information and the message to be processed, and forward the message to be processed to the second gateway according to the second gateway indication information, and the second gateway is used to forward the message to be processed. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, ensure that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, ensure that the message of the source object can be forwarded in time, and improve the user experience.

[0055] According to the technical solution provided by the embodiment of the present disclosure, by acquiring message attribute information of the message to be processed, acquiring first gateway indication information for indicating the first gateway according to the message attribute information and the correspondence between the message attribute information and the gateway, and sending the message to be processed to the first gateway according to the first gateway indication information, the first gateway indication information can be acquired based on the message attribute information of the message to be processed according to the correspondence between the preset message attribute information and the gateway, so as to facilitate management of which gateway the first gateway is.

[0056] According to the technical solution provided by the embodiment of the present disclosure, by obtaining the first gateway indication information for indicating the first gateway, and sending the to-be-processed message to the first gateway according to the first gateway indication information, wherein since the first gateway is any gateway among the multiple gateways corresponding to the switch, it is not necessary to manage which gateway the first gateway is, thereby reducing the consumed processing resources.

[0057] According to the technical solution provided by the embodiment of the present disclosure, the first gateway is enabled to encapsulate the second gateway indication information and the message to be processed to obtain a first encapsulated message, and the first encapsulated message is sent to the switch, so that the switch can receive the first encapsulated message, which can facilitate the sending of the first encapsulated message.

[0058] According to the technical solution provided by the embodiment of the present disclosure, by limiting the correspondence between the source object and the gateway to include the correspondence between the source object and the diversion IP address, limiting the diversion IP address to the IP address of the gateway corresponding to the source object belonging to the same network segment, limiting the second gateway indication information to include the second diversion IP address, and obtaining the second gateway indication information for indicating the second gateway whose IP address belongs to the same network segment as the second diversion IP address based on the second diversion IP address and the routing table, and forwarding the to-be-processed message to the second gateway based on the second gateway indication information, it is possible to facilitate the management of which gateway the second gateway is specifically.

[0059] According to the technical solution provided by the embodiment of the present disclosure, multiple network segments to which the second diversion IP address belongs are obtained based on the second diversion IP address and the routing table, and second gateway indication information for indicating the second gateway that the IP address belongs to the first network segment is obtained, wherein since the first network segment is the network segment with the longest subnet mask among the multiple network segments, the second gateway indicated by the second gateway indication information can be made unique, ensuring that the message to be processed will not be forwarded by multiple gateways, avoiding repeated forwarding, and reducing the consumed processing resources.

[0060] According to the technical solution provided by the embodiment of the present disclosure, in response to determining according to the routing table that the IP address of at least one gateway belongs to the first network segment, and obtaining second gateway indication information for indicating the second gateway whose IP address belongs to the first network segment, wherein when determining according to the routing table that the IP address of at least one gateway belongs to the first network segment, it can be understood that at least one gateway whose IP address is set to belong to the first network segment has not failed, thereby ensuring that the second gateway used to forward the message to be processed is a gateway that has not failed; in response to determining according to the routing table that the IP address of any gateway does not belong to the first network segment, and the IP address of at least one gateway belongs to the second network segment with the second longest subnet mask among multiple network segments, obtaining second gateway indication information for indicating the second gateway whose IP address belongs to the second network segment, wherein when determining according to the routing table that the IP address of any gateway does not belong to the first network segment, it can be understood that the gateway whose IP address is set to belong to the first network segment may have failed, so the above scheme can ensure that when some gateways fail, the corresponding gateway, that is, the gateway whose IP address belongs to the second network segment, can also be used as the second gateway to forward the message to be processed, thereby improving the reliability of forwarding the message to be processed.

[0061] According to the technical solution provided by the embodiment of the present disclosure, multiple network segments to which the second diversion IP address belongs are obtained based on the second diversion IP address and the routing table, and second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment is obtained. Since the third network segment is the network segment with the shortest routing path length among the multiple network segments, the second gateway indicated by the second gateway indication information can be made unique, ensuring that the message to be processed will not be forwarded by multiple gateways, avoiding repeated forwarding, and reducing the consumed processing resources.

[0062] According to the technical solution provided by the embodiment of the present disclosure, in response to determining according to the routing table that the third network segment includes the IP address of at least one gateway, second gateway indication information for indicating the second gateway in the third network segment is obtained, wherein when it is determined according to the routing table that the IP address of at least one gateway belongs to the third network segment, it can be understood that at least one gateway whose IP address is set to belong to the third network segment has not failed, thereby ensuring that the second gateway used to forward the message to be processed is a gateway that has not failed; in response to determining according to the routing table that the IP address of any gateway does not belong to the third network segment, and the IP address of at least one gateway belongs to the fourth network segment, second gateway indication information for indicating the second gateway whose IP address belongs to the fourth network segment is obtained, wherein when it is determined according to the routing table that the IP address of any gateway does not belong to the third network segment, it can be understood that the gateway whose IP address is set to belong to the third network segment may have failed, so the above scheme can ensure that when some gateways fail, the corresponding gateway, that is, the gateway whose IP address belongs to the fourth network segment, can also be used as the second gateway to forward the message to be processed, thereby improving the reliability of forwarding the message to be processed.

[0063] The technical solution provided by the embodiment of the present disclosure is applied to the gateway. According to the technical solution, the first message to be processed sent by the receiving switch is used to obtain the source object identifier of the first message to be processed; the second gateway indication information for indicating the second gateway is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and the second gateway indication information and the first message to be processed are sent to the switch; the second message to be processed sent by the switch is received, and the second message to be processed is forwarded. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, it ensures that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, and ensures that the message of the source object can be forwarded in time, thereby improving the user experience.

[0064] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:

[0066] Figure 1 A schematic structural block diagram of a message processing system according to an embodiment of the present disclosure is shown.

[0067] Figure 2 A flow chart of a control method according to an embodiment of the present disclosure is shown.

[0068] Figure 3 A schematic structural block diagram of a message processing system according to an embodiment of the present disclosure is shown.

[0069] Figure 4 A flow chart of a control method according to an embodiment of the present disclosure is shown.

[0070] Figure 5 A structural block diagram of a control device according to an embodiment of the present disclosure is shown.

[0071] Figure 6 A structural block diagram of a control device according to an embodiment of the present disclosure is shown.

[0072] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0073] Figure 8It is a schematic diagram of the structure of a computer system suitable for implementing the method according to the embodiment of the present disclosure. DETAILED DESCRIPTION

[0074] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.

[0075] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of labels, numbers, steps, behaviors, components, parts, or combinations thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other labels, numbers, steps, behaviors, components, parts, or combinations thereof exist or are added.

[0076] It should also be noted that, in the absence of conflict, the embodiments and labels in the embodiments of the present disclosure can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0077] As described in the background technology, there is a problem of slow message forwarding in the prior art. The inventors have found that the reason for this situation is that when selling network service products, taking into account factors such as load balancing, it is necessary to limit the bandwidth of each gateway, that is, to limit the speed at which the corresponding source object transmits messages. Therefore, the gateway as a network access point will have a speed limit function, that is, to limit the bandwidth of the gateway forwarding messages. In some scenarios (such as cloud computing scenarios), the gateway can be deployed in a distributed manner, and the messages transmitted by the source object are evenly distributed to different gateways according to the data stream to which the messages transmitted by the source object belong, and the messages are forwarded by multiple gateways. Among them, by evenly limiting the bandwidth of each gateway in the multiple gateways, the purpose of limiting the speed at which the source object sends the message can be achieved.

[0078] However, since the number of data streams to which the message transmitted by the source object belongs is not fixed, when the data stream to which the message transmitted by the source object belongs is small, the message transmitted by the source object may be assigned to a small number of gateways, resulting in the message transmitted by the source object being forwarded only by these gateways. Since the total bandwidth of these gateways is less than the total bandwidth of all gateways assigned to forward the message transmitted by the source object, the bandwidth of the gateway forwarding the message will be less than the bandwidth requirement of the source object, that is, the speed of the gateway forwarding the message is too slow, so that the message of the corresponding source object cannot be forwarded in time, which damages the user experience.

[0079] Considering the shortcomings of the above schemes, the inventors of the present disclosure have proposed a new scheme for applying to switches: by obtaining the message to be processed and sending the message to be processed to the first gateway, the first gateway is used to obtain the source object identifier of the message to be processed, and the second gateway indication information used to indicate the second gateway is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and the second gateway indication information and the message to be processed are sent to the switch; the second gateway indication information and the message to be processed are received, and the message to be processed is forwarded to the second gateway according to the second gateway indication information, and the second gateway is used to forward the message to be processed. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, it is ensured that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, and the message of the source object can be forwarded in time, thereby improving the user experience.

[0080] Figure 1 A schematic structural block diagram of a message processing system according to an embodiment of the present disclosure is shown as follows: Figure 1 The message processing system includes a switch 101 and at least one gateway 102 .

[0081] The switch 101 can be understood as a network element with a switch function. The switch 101 can be a switch or a virtual switch. For example, the switch 101 can be an uplink switch cluster.

[0082] The gateway 102 may be a network element with a gateway function, and the gateway 102 may be a gateway or a virtual gateway. Exemplarily, the gateway 102 may be any gateway among a plurality of gateways deployed in an uplink switch cluster.

[0083] Among them, a switch can be understood as a network device used for data transfer. A switch can provide a transmission channel for any two network nodes connected to itself. A virtual switch can be understood as a virtual switch virtualized by a virtual machine after a virtual machine is virtualized based on a physical machine. Through this virtual switch, other virtual machines or physical machines can communicate.

[0084] A gateway can be understood as a network device used to achieve network interconnection. A gateway can be used to provide conversion services between different communication protocols, data formats or languages, and systems. A virtual gateway can be understood as a virtual gateway virtualized by a virtual machine after a virtual machine is virtualized based on a physical machine. Through this virtual gateway, other virtual machines or physical machines can communicate.

[0085] A virtual machine can be understood as a virtualization layer running on a virtualization platform. For example, in a cloud computing platform, a virtual machine can be one or more independent hosts (i.e., cloud hosts) or one or more independent servers (i.e., cloud servers) divided out on a cluster server by the virtualization technology; in other virtualization systems or platforms, a virtual machine can be one or more virtual hosts implemented using the virtualization technology on one or more physical hosts, or can be one or more virtual dedicated servers implemented using the virtualization technology on one or more physical servers. A physical machine can be understood as the name of a physical computer relative to a virtual machine. A physical machine can provide a hardware environment for a virtual machine.

[0086] In order to solve the above problems, the present disclosure proposes a control method, system, device and medium.

[0087] Figure 2 A flow chart showing a control method according to an embodiment of the present disclosure, the method is applied to Figure 1 The switch shown in . Figure 2 As shown, the control method includes steps S101-S102.

[0088] In step S101, a message to be processed is obtained, and the message to be processed is sent to a first gateway.

[0089] The first gateway is used to obtain the source object identifier of the message to be processed, obtain the second gateway indication information used to indicate the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch, and the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway.

[0090] In step S102, second gateway indication information and a message to be processed are received, and the message to be processed is forwarded to the second gateway according to the second gateway indication information.

[0091] The second gateway is used to forward the message to be processed.

[0092] In one embodiment of the present disclosure, the message to be processed can be understood as a message transmitted by a source object, wherein the source object can be understood as a tenant or service using a corresponding network service product. The corresponding network service product can be a network service product purchased by the tenant or service.

[0093] In one embodiment of the present disclosure, obtaining a message to be processed may be understood as receiving a message to be processed sent by other devices or systems, or may be reading and writing a message to be processed obtained in advance.

[0094] In one embodiment of the present disclosure, the first gateway and the second gateway may be understood as gateways corresponding to the switch. For example, when the switch is an upstream switch cluster, the first gateway and the second gateway may be gateways deployed under the upstream switch cluster.

[0095] In an embodiment of the present disclosure, the source object identifier of the message to be processed can be understood as indicating the source object that transmits the message to be processed. Acquiring the source object identifier of the message to be processed can be understood as reading the source object identifier from a specified field in the message to be processed.

[0096] In one embodiment of the present disclosure, the correspondence between the source object and the gateway can be understood as indicating the source object corresponding to each gateway in at least one gateway, where each gateway can correspond to one or more source objects. The correspondence between the object and the gateway can be a database or a form, and the present disclosure does not specifically limit the implementation method of the correspondence between the object and the gateway.

[0097] In one embodiment of the present disclosure, the second gateway indication information is obtained based on the source object identifier and the correspondence between the source object and the gateway. It can be understood that the gateway corresponding to the source object indicated by the source object identifier, i.e., the second gateway, is searched in the correspondence between the source object and the gateway, and the second gateway indication information for indicating the second gateway is generated.

[0098] In one embodiment of the present disclosure, the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway, which can be understood as the bandwidth of the second gateway being greater than or equal to the total bandwidth of the network service products used or purchased by one or more source objects corresponding to the second gateway.

[0099] In an embodiment of the present disclosure, sending the second gateway indication information and the message to be processed to the switch may be directly sending the second gateway indication information and the message to be processed to the switch, or may be encapsulating the second gateway indication information and the message to be processed and sending the encapsulated message to the switch.

[0100] The technical solution provided by the embodiment of the present disclosure is applied to a switch. According to the technical solution, by obtaining a message to be processed and sending the message to be processed to the first gateway, the first gateway is used to obtain the source object identifier of the message to be processed, obtain the second gateway indication information for indicating the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch; receive the second gateway indication information and the message to be processed, and forward the message to be processed to the second gateway according to the second gateway indication information, and the second gateway is used to forward the message to be processed. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, ensure that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, ensure that the message of the source object can be forwarded in time, and improve the user experience.

[0101] In an implementation of the present disclosure, before the first gateway sends the message to be processed, the method further includes the following steps:

[0102] Acquire message attribute information of the message to be processed, where the message attribute information includes at least one of a source IP address and a destination IP address of the message to be processed;

[0103] Acquire first gateway indication information for indicating the first gateway according to the message attribute information and the correspondence between the message attribute information and the gateway;

[0104] Sending a message to be processed to the first gateway can be achieved through the following steps:

[0105] Send the to-be-processed message to the first gateway according to the first gateway instruction information.

[0106] In one embodiment of the present disclosure, the message attribute information of the message to be processed may include at least one of the source IP address and the destination IP address of the message to be processed. The message attribute information of the message to be processed may also include at least one of the source port number, destination port number, interface index, protocol number, previous hop IP address, and next hop IP address of the message to be processed.

[0107] In one embodiment of the present disclosure, the correspondence between the message attribute information and the gateway can be understood as being used to indicate the message attribute information corresponding to each gateway in at least one gateway, wherein each gateway can correspond to one message attribute information, and each gateway can also correspond to multiple different message attribute information. The correspondence between the message attribute information and the gateway can be a database or a form, and the present disclosure does not specifically limit the implementation method of the correspondence between the message attribute information and the gateway.

[0108] In one embodiment of the present disclosure, the first gateway indication information is obtained according to the message attribute information and the correspondence between the message attribute information and the gateway. It can be understood that the gateway corresponding to the message attribute information, that is, the first gateway, is searched in the correspondence between the message attribute information and the gateway, and the first gateway indication information for indicating the first gateway is generated.

[0109] According to the technical solution provided by the embodiment of the present disclosure, by acquiring message attribute information of the message to be processed, acquiring first gateway indication information for indicating the first gateway according to the message attribute information and the correspondence between the message attribute information and the gateway, and sending the message to be processed to the first gateway according to the first gateway indication information, the first gateway indication information can be acquired based on the message attribute information of the message to be processed according to the correspondence between the preset message attribute information and the gateway, so as to facilitate management of which gateway the first gateway is.

[0110] In an implementation of the present disclosure, before sending the message to be processed to the first gateway, the method further includes the following steps:

[0111] Acquire first gateway indication information for indicating a first gateway, where the first gateway is any gateway among a plurality of gateways corresponding to the switch;

[0112] Sending a message to be processed to the first gateway can be achieved through the following steps:

[0113] Send the to-be-processed message to the first gateway according to the first gateway instruction information.

[0114] According to the technical solution provided by the embodiment of the present disclosure, by obtaining the first gateway indication information for indicating the first gateway, and sending the to-be-processed message to the first gateway according to the first gateway indication information, wherein since the first gateway is any gateway among the multiple gateways corresponding to the switch, it is not necessary to manage which gateway the first gateway is, thereby reducing the consumed processing resources.

[0115] In an implementation of the present disclosure, before sending the second gateway indication information and the message to be processed to the switch, the method further includes the following steps:

[0116] Encapsulating the second gateway indication information and the message to be processed to obtain a first encapsulated message;

[0117] Sending the second gateway indication information and the message to be processed to the switch can be achieved through the following steps:

[0118] Send the first encapsulated message to the switch:

[0119] Receiving the second gateway indication information and the message to be processed can be achieved through the following steps:

[0120] A first encapsulated message is received.

[0121] In one embodiment of the present disclosure, encapsulating the second gateway indication information and the message to be processed can be understood as encapsulating the second gateway indication information and the message to be processed in the same message, i.e., the first encapsulated message. Exemplarily, the second gateway indication information can be encapsulated in the header of the first encapsulated message, and the message to be processed can be encapsulated in the data payload part of the first encapsulated message.

[0122] According to the technical solution provided by the embodiment of the present disclosure, the first gateway is enabled to encapsulate the second gateway indication information and the message to be processed to obtain a first encapsulated message, and the first encapsulated message is sent to the switch, so that the switch can receive the first encapsulated message, which can facilitate the sending of the first encapsulated message.

[0123] In an implementation of the present disclosure, the correspondence between the source object and the gateway includes a correspondence between the source object and the diversion IP address, the diversion IP address and the IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes the second diversion IP address;

[0124] Forwarding the message to be processed to the second gateway according to the second gateway instruction information can be achieved through the following steps:

[0125] According to the second diversion IP address and the routing table, obtain second gateway indication information for indicating a second gateway whose IP address belongs to the same network segment as the second diversion IP address, and forward the message to be processed to the second gateway according to the second gateway indication information.

[0126] In one embodiment of the present disclosure, the correspondence between the source object and the diversion IP address can be understood as indicating the diversion IP address corresponding to each source object. The correspondence between the source object and the diversion IP address can be a database or a form. The present disclosure does not specifically limit the implementation method of the correspondence between the source object and the diversion IP address.

[0127] In one embodiment of the present disclosure, a routing table can be understood as a correspondence between at least one gateway and the IP address of the gateway, wherein the gateway can periodically send routing update information to the switch, and the switch can update the routing table according to the routing update information to ensure that the gateway in the routing table is a gateway that has been working normally in the recent period of time.

[0128] In one embodiment of the present disclosure, the second gateway indication information is obtained based on the second diversion IP address and the routing table. It can be understood that a query is performed in the routing table based on the second diversion IP address to determine the gateway and the IP address of the second gateway that belong to the same network segment as the second diversion IP address, and the second gateway indication information is generated to indicate the second gateway.

[0129] According to the technical solution provided by the embodiment of the present disclosure, by limiting the correspondence between the source object and the gateway to include the correspondence between the source object and the diversion IP address, limiting the diversion IP address to the IP address of the gateway corresponding to the source object belonging to the same network segment, limiting the second gateway indication information to include the second diversion IP address, and obtaining the second gateway indication information for indicating the second gateway whose IP address belongs to the same network segment as the second diversion IP address based on the second diversion IP address and the routing table, and forwarding the to-be-processed message to the second gateway based on the second gateway indication information, it is possible to facilitate the management of which gateway the second gateway is specifically.

[0130] In an implementation of the present disclosure, according to the second traffic diversion IP address and the routing table, obtaining the second gateway indication information for indicating the second gateway whose IP address belongs to the same network segment as the second traffic diversion IP address can be implemented by the following steps:

[0131] According to the second diversion IP address and the routing table, multiple network segments to which the second diversion IP address belongs are obtained, and second gateway indication information for indicating the second gateway whose IP address belongs to the first network segment is obtained, wherein the first network segment is the network segment with the longest subnet mask among the multiple network segments.

[0132] According to the technical solution provided by the embodiment of the present disclosure, multiple network segments to which the second diversion IP address belongs are obtained based on the second diversion IP address and the routing table, and second gateway indication information for indicating the second gateway that the IP address belongs to the first network segment is obtained, wherein since the first network segment is the network segment with the longest subnet mask among the multiple network segments, the second gateway indicated by the second gateway indication information can be made unique, ensuring that the message to be processed will not be forwarded by multiple gateways, avoiding repeated forwarding, and reducing the consumed processing resources.

[0133] In an implementation of the present disclosure, obtaining the second gateway indication information for indicating the second gateway whose IP address belongs to the first network segment may be implemented by the following steps:

[0134] In response to determining according to the routing table that the IP address of at least one gateway belongs to the first network segment, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to the first network segment;

[0135] The method further comprises the steps of:

[0136] In response to determining according to the routing table that the IP address of any gateway does not belong to the first network segment and the IP address of at least one gateway belongs to the second network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the second network segment, where the second network segment is a network segment with the second longest subnet mask among multiple network segments.

[0137] In one embodiment of the present disclosure, it is determined based on the routing table that the IP address of any gateway does not belong to the first network segment. It can be understood that one or more gateways whose IP addresses belong to the first network segment may have a fault, and the gateway fails to send corresponding routing update information to the routing table, so that after the switch updates the routing table according to the received routing update information, the routing table does not include the IP addresses of one or more gateways belonging to the first network segment.

[0138] Figure 3 A schematic structural block diagram of a message processing system according to an embodiment of the present disclosure is shown as follows: Figure 3The message processing system includes a switch 101 and at least a gateway 112 , a gateway 122 , a gateway 132 , and a gateway 142 . Among them, the network segments to which the IP address of gateway 112 belongs include 192.168.0.0 / 26, 192.168.0.0 / 25, and 192.168.0.0 / 24, the network segments to which the IP address of gateway 122 belongs include 192.168.0.64 / 26, 192.168.0.0 / 25, and 192.168.0.0 / 24, the network segments to which the IP address of gateway 132 belongs include 192.168.0.128 / 26, 192.168.0.128 / 25, and 192.168.0.0 / 24, and the network segments to which the IP address of gateway 142 belongs include 192.168.0.196 / 26, 192.168.0.128 / 25, and 192.168.0.0 / 24. The diversion IP address is 192.168.0.1, and the first diversion network segment with the longest subnet mask among the multiple network segments to which the diversion IP address belongs is 192.168.0.0 / 26. When the IP address of any gateway determined according to the routing table does not belong to 192.168.0.0 / 26 due to a failure of the gateway 112, it can be determined that the network segment with the second longest subnet mask among the multiple network segments to which the diversion IP address belongs, namely 192.168.0.0 / 25, is the second network segment, and the second gateway indication information indicating the second gateway, namely gateway 122, which has an IP address belonging to 192.168.0.0 / 25 is obtained.

[0139] According to the technical solution provided by the embodiment of the present disclosure, in response to determining according to the routing table that the IP address of at least one gateway belongs to the first network segment, and obtaining second gateway indication information for indicating the second gateway whose IP address belongs to the first network segment, wherein when determining according to the routing table that the IP address of at least one gateway belongs to the first network segment, it can be understood that at least one gateway whose IP address is set to belong to the first network segment has not failed, thereby ensuring that the second gateway used to forward the message to be processed is a gateway that has not failed; in response to determining according to the routing table that the IP address of any gateway does not belong to the first network segment, and the IP address of at least one gateway belongs to the second network segment with the second longest subnet mask among multiple network segments, obtaining second gateway indication information for indicating the second gateway whose IP address belongs to the second network segment, wherein when determining according to the routing table that the IP address of any gateway does not belong to the first network segment, it can be understood that the gateway whose IP address is set to belong to the first network segment may have failed, so the above scheme can ensure that when some gateways fail, the corresponding gateway, that is, the gateway whose IP address belongs to the second network segment, can also be used as the second gateway to forward the message to be processed, thereby improving the reliability of forwarding the message to be processed.

[0140] In an implementation of the present disclosure, according to the second traffic diversion IP address and the routing table, obtaining the second gateway indication information for indicating the second gateway whose IP address belongs to the same network segment as the second traffic diversion IP address can be implemented by the following steps:

[0141] According to the second diversion IP address and the routing table, multiple network segments to which the second diversion IP address belongs are obtained, and second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment is obtained, where the third network segment is the network segment with the shortest routing path length among the multiple network segments.

[0142] In one embodiment of the present disclosure, the network segment with the shortest routing path length among the multiple network segments can be understood as the network segment with the shortest routing path length between the multiple network segments and the switch.

[0143] According to the technical solution provided by the embodiment of the present disclosure, multiple network segments to which the second diversion IP address belongs are obtained based on the second diversion IP address and the routing table, and second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment is obtained. Since the third network segment is the network segment with the shortest routing path length among the multiple network segments, the second gateway indicated by the second gateway indication information can be made unique, ensuring that the message to be processed will not be forwarded by multiple gateways, avoiding repeated forwarding, and reducing the consumed processing resources.

[0144] In an implementation of the present disclosure, obtaining the second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment may be implemented by the following steps:

[0145] In response to determining according to the routing table that the third network segment includes an IP address of at least one gateway, obtaining second gateway indication information for indicating a second gateway in the third network segment;

[0146] The method further comprises:

[0147] In response to determining according to the routing table that the IP address of any gateway does not belong to the third network segment, and the IP address of at least one gateway belongs to the fourth network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the fourth network segment, and the fourth network segment is a network segment with the second shortest path length among the multiple network segments.

[0148] In one embodiment of the present disclosure, it is determined according to the routing table that the IP address of any gateway does not belong to the third network segment. It can be understood that one or more gateways whose IP addresses belong to the third network segment may have a fault, and the gateway fails to send corresponding routing update information to the routing table, so that after the switch updates the routing table according to the received routing update information, the routing table does not include the IP addresses of one or more gateways belonging to the third network segment.

[0149] According to the technical solution provided by the embodiment of the present disclosure, in response to determining according to the routing table that the third network segment includes the IP address of at least one gateway, second gateway indication information for indicating the second gateway in the third network segment is obtained, wherein when it is determined according to the routing table that the IP address of at least one gateway belongs to the third network segment, it can be understood that at least one gateway whose IP address is set to belong to the third network segment has not failed, thereby ensuring that the second gateway used to forward the message to be processed is a gateway that has not failed; in response to determining according to the routing table that the IP address of any gateway does not belong to the third network segment, and the IP address of at least one gateway belongs to the fourth network segment, second gateway indication information for indicating the second gateway whose IP address belongs to the fourth network segment is obtained, wherein when it is determined according to the routing table that the IP address of any gateway does not belong to the third network segment, it can be understood that the gateway whose IP address is set to belong to the third network segment may have failed, so the above scheme can ensure that when some gateways fail, the corresponding gateway, that is, the gateway whose IP address belongs to the fourth network segment, can also be used as the second gateway to forward the message to be processed, thereby improving the reliability of forwarding the message to be processed.

[0150] Figure 4 A flow chart showing a control method according to an embodiment of the present disclosure, the method is applied to Figure 1 The gateway shown in . Figure 4 As shown, the control method includes steps S201-S203.

[0151] In step S201, a first message to be processed sent by a switch is received, and a source object identifier of the first message to be processed is obtained.

[0152] In step S202, second gateway indication information for indicating a second gateway is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and the second gateway indication information and the first message to be processed are sent to the switch.

[0153] The bandwidth of the second gateway satisfies the bandwidth requirement of the source object corresponding to the second gateway;

[0154] In step S203, a second message to be processed sent by the switch is received, and the second message to be processed is forwarded.

[0155] In one embodiment of the present disclosure, the first to-be-processed message may be understood as a message transmitted by a source object, wherein the source object may be understood as a tenant or service using a corresponding network service product, wherein the corresponding network service product may be a network service product purchased by the tenant or service.

[0156] In one embodiment of the present disclosure, obtaining the first message to be processed may be understood as receiving the first message to be processed sent by other devices or systems, or may be reading and writing a message to be processed obtained in advance.

[0157] In an embodiment of the present disclosure, the second gateway may be understood as a gateway corresponding to the switch. For example, when the switch is an upstream switch cluster, the second gateway may be a gateway deployed under the upstream switch cluster.

[0158] In one embodiment of the present disclosure, the source object identifier of the first message to be processed can be understood as indicating the source object for transmitting the first message to be processed. Obtaining the source object identifier of the first message to be processed can be understood as reading the source object identifier from a specified field in the first message to be processed.

[0159] In one embodiment of the present disclosure, the correspondence between the source object and the gateway can be understood as indicating the source object corresponding to each gateway in at least one gateway, where each gateway can correspond to one or more source objects. The correspondence between the object and the gateway can be a database or a form, and the present disclosure does not specifically limit the implementation method of the correspondence between the object and the gateway.

[0160] In one embodiment of the present disclosure, the second gateway indication information is obtained based on the source object identifier and the correspondence between the source object and the gateway. It can be understood that the gateway corresponding to the source object indicated by the source object identifier, i.e., the second gateway, is searched in the correspondence between the source object and the gateway, and the second gateway indication information for indicating the second gateway is generated.

[0161] In one embodiment of the present disclosure, the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway, which can be understood as the bandwidth of the second gateway being greater than or equal to the total bandwidth of the network service products used or purchased by one or more source objects corresponding to the second gateway.

[0162] In one embodiment of the present disclosure, the second message to be processed can be understood as a message transmitted by a source object, wherein gateway indication information for indicating the gateway itself can be obtained based on the source object identifier of the second message to be processed and the correspondence between the source object and the gateway.

[0163] The technical solution provided by the embodiment of the present disclosure is applied to the gateway. According to the technical solution, the first message to be processed sent by the receiving switch is used to obtain the source object identifier of the first message to be processed; the second gateway indication information for indicating the second gateway is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and the second gateway indication information and the first message to be processed are sent to the switch; the second message to be processed sent by the switch is received, and the second message to be processed is forwarded. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, it ensures that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, and ensures that the message of the source object can be forwarded in time, thereby improving the user experience.

[0164] The following reference Figure 1 A message processing system according to an embodiment of the present disclosure is described as follows: Figure 1 As shown, the message processing system includes a switch 101 and at least one gateway 102. The switch 101 is used to implement Figure 1 The corresponding method steps of the embodiment, the gateway 102 is used to implement Figure 3 The method steps of the corresponding embodiment.

[0165] The technical solution provided by the embodiment of the present disclosure is to enable the switch to obtain the message to be processed and send the message to be processed to the first gateway, the first gateway is used to obtain the source object identifier of the message to be processed, obtain the second gateway indication information used to indicate the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch; the switch receives the second gateway indication information and the message to be processed, and forwards the message to be processed to the second gateway according to the second gateway indication information, and the second gateway is used to forward the message to be processed. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, to ensure that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, and ensure that the message of the source object can be forwarded in time, thereby improving the user experience.

[0166] The following reference Figure 5 A control device according to an embodiment of the present disclosure is described. Figure 5 A structural block diagram of a control device according to an embodiment of the present disclosure is shown.

[0167] like Figure 5 As shown, the control device 200 includes:

[0168] The first message sending module 201 is configured to obtain a message to be processed and send the message to be processed to the first gateway, the first gateway is used to obtain the source object identifier of the message to be processed, obtain the second gateway indication information used to indicate the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch, and the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0169] The first message receiving module 202 is configured to receive the second gateway indication information and the message to be processed, and forward the message to be processed to the second gateway according to the second gateway indication information, and the second gateway is used to forward the message to be processed.

[0170] According to the technical solution provided by the embodiment of the present disclosure, by obtaining the message to be processed and sending the message to be processed to the first gateway, the first gateway is used to obtain the source object identifier of the message to be processed, obtain the second gateway indication information for indicating the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch; receive the second gateway indication information and the message to be processed, and forward the message to be processed to the second gateway according to the second gateway indication information, and the second gateway is used to forward the message to be processed. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, ensure that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, ensure that the message of the source object can be forwarded in time, and improve the user experience.

[0171] Those skilled in the art will understand that referring to Figure 5 The technical solution described can be compared with the above Figure 2 The corresponding embodiments are combined to have Figure 2 The technical effects achieved by the corresponding embodiments. For details, please refer to Figure 2 The specific contents of the description of the corresponding embodiments will not be repeated here.

[0172] The following reference Figure 6 A control device according to an embodiment of the present disclosure is described. Figure 6 A structural block diagram of a control device according to an embodiment of the present disclosure is shown.

[0173] like Figure 6 As shown, the control device 300 includes:

[0174] The second message receiving module 301 is configured to receive a first message to be processed sent by the switch, and obtain a source object identifier of the first message to be processed;

[0175] The second message sending module 302 is configured to obtain second gateway indication information indicating the second gateway according to the source object identifier and the correspondence between the source object and the gateway, and send the second gateway indication information and the first to-be-processed message to the switch, wherein the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0176] The third message sending module 303 is configured to receive the second message to be processed sent by the switch, and forward the second message to be processed.

[0177] According to the technical solution provided by the embodiment of the present disclosure, the first message to be processed sent by the receiving switch is obtained, and the source object identifier of the first message to be processed is obtained; the second gateway indication information for indicating the second gateway is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and the second gateway indication information and the first message to be processed are sent to the switch; the second message to be processed sent by the switch is received, and the second message to be processed is forwarded. Among them, considering that the bandwidth of the second gateway used to forward the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is small, it will not have any impact on the bandwidth of the second gateway forwarding the message, that is, the total bandwidth used to forward the message transmitted by the source object corresponding to the second gateway, that is, it ensures that the bandwidth of the corresponding gateway forwarding the message can meet the bandwidth requirement of the source object corresponding to the gateway, and ensures that the message of the source object can be forwarded in time, thereby improving the user experience.

[0178] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0179] The present disclosure also provides an electronic device, such as Figure 7 As shown, the electronic device 400 includes at least one processor 401 and a memory 402 that is communicatively connected to the at least one processor 401. The memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions can be executed by the at least one processor 401 to implement the following steps:

[0180] In a first aspect, an embodiment of the present disclosure provides a control method, which is applied to a switch and includes:

[0181] Obtaining a message to be processed, and sending the message to be processed to the first gateway, the first gateway is used to obtain a source object identifier of the message to be processed, obtain second gateway indication information for indicating the second gateway according to the source object identifier and the corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to the switch, the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0182] The second gateway indication information and the message to be processed are received, and the message to be processed is forwarded to the second gateway according to the second gateway indication information, where the second gateway is used to forward the message to be processed.

[0183] In an implementation of the present disclosure, before sending the message to be processed to the first gateway, the method further includes:

[0184] Acquire message attribute information of the message to be processed, where the message attribute information includes at least one of a source IP address and a destination IP address of the message to be processed;

[0185] Acquire first gateway indication information for indicating the first gateway according to the message attribute information and the correspondence between the message attribute information and the gateway;

[0186] Sending a message to be processed to the first gateway includes:

[0187] Send the to-be-processed message to the first gateway according to the first gateway instruction information.

[0188] In an implementation of the present disclosure, before sending the message to be processed to the first gateway, the method further includes:

[0189] Acquire first gateway indication information for indicating a first gateway, where the first gateway is any gateway among a plurality of gateways corresponding to the switch;

[0190] Sending a message to be processed to the first gateway includes:

[0191] Send the to-be-processed message to the first gateway according to the first gateway instruction information.

[0192] In an implementation of the present disclosure, before sending the second gateway indication information and the message to be processed to the switch, the method further includes:

[0193] Encapsulating the second gateway indication information and the message to be processed to obtain a first encapsulated message;

[0194] Sending the second gateway indication information and the message to be processed to the switch includes:

[0195] Send the first encapsulated message to the switch:

[0196] Receiving second gateway indication information and a message to be processed, including:

[0197] A first encapsulated message is received.

[0198] In an implementation of the present disclosure, the correspondence between the source object and the gateway includes a correspondence between the source object and the diversion IP address, the diversion IP address and the IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes the second diversion IP address;

[0199] Forwarding the to-be-processed message to the second gateway according to the second gateway instruction information includes:

[0200] According to the second diversion IP address and the routing table, obtain second gateway indication information for indicating a second gateway whose IP address belongs to the same network segment as the second diversion IP address, and forward the message to be processed to the second gateway according to the second gateway indication information.

[0201] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address and the second traffic diversion IP address belong to the same network segment according to the second traffic diversion IP address and the routing table includes:

[0202] According to the second diversion IP address and the routing table, multiple network segments to which the second diversion IP address belongs are obtained, and second gateway indication information for indicating the second gateway whose IP address belongs to the first network segment is obtained, wherein the first network segment is the network segment with the longest subnet mask among the multiple network segments.

[0203] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to a first network segment includes:

[0204] In response to determining according to the routing table that the IP address of at least one gateway belongs to the first network segment, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to the first network segment;

[0205] The method further comprises:

[0206] In response to determining according to the routing table that the IP address of any gateway does not belong to the first network segment and the IP address of at least one gateway belongs to the second network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the second network segment, where the second network segment is a network segment with the second longest subnet mask among multiple network segments.

[0207] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address and the second traffic diversion IP address belong to the same network segment according to the second traffic diversion IP address and the routing table includes:

[0208] According to the second diversion IP address and the routing table, multiple network segments to which the second diversion IP address belongs are obtained, and second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment is obtained, where the third network segment is the network segment with the shortest routing path length among the multiple network segments.

[0209] In an implementation of the present disclosure, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to a third network segment includes:

[0210] In response to determining according to the routing table that the third network segment includes an IP address of at least one gateway, obtaining second gateway indication information for indicating a second gateway in the third network segment;

[0211] The method further comprises:

[0212] In response to determining according to the routing table that the IP address of any gateway does not belong to the third network segment, and the IP address of at least one gateway belongs to the fourth network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the fourth network segment, and the fourth network segment is a network segment with the second shortest path length among the multiple network segments.

[0213] In a second aspect, an embodiment of the present disclosure provides a control method, wherein the method is applied to a gateway, and the method includes:

[0214] Receive a first message to be processed sent by the switch, and obtain a source object identifier of the first message to be processed;

[0215] Acquire second gateway indication information for indicating the second gateway according to the source object identifier and the correspondence between the source object and the gateway, and send the second gateway indication information and the first to-be-processed message to the switch, where the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;

[0216] The second to-be-processed message sent by the switch is received, and the second to-be-processed message is forwarded.

[0217] like Figure 8 As shown, the computer system 500 includes a processing unit 501, which can perform various processes in the embodiments shown in the above figures according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0218] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc. An output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc. A storage section 508 including a hard disk, etc. And a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that the computer program read therefrom is installed into the storage section 508 as needed. Among them, the processing unit 501 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.

[0219] In particular, according to an embodiment of the present disclosure, the method described above with reference to the accompanying drawings can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a readable medium thereof, and the computer program includes a program code for executing the method in the accompanying drawings. In such an embodiment, the computer program can be downloaded and installed from a network through a communication portion 509, and / or installed from a removable medium 511. For example, an embodiment of the present disclosure includes a readable storage medium on which computer instructions are stored, and when the computer instructions are executed by a processor, the program code for executing the method in the accompanying drawings is implemented.

[0220] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the road map or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0221] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0222] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the node in the above-mentioned embodiment. It may also be a computer-readable storage medium that exists independently and is not assembled into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.

[0223] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. A control method, wherein: The method is applied to a switch, and the method comprises: Obtaining a message to be processed, and sending the message to be processed to a first gateway, wherein the first gateway is used to obtain a source object identifier of the message to be processed, obtain second gateway indication information for indicating a second gateway according to the source object identifier and a correspondence between a source object and a gateway, and send the second gateway indication information and the message to be processed to the switch, wherein a bandwidth of the second gateway is greater than or equal to a total bandwidth of a network service product used by one or more source objects corresponding to the second gateway; receiving the second gateway indication information and the message to be processed, and forwarding the message to be processed to the second gateway according to the second gateway indication information, wherein the second gateway is used to forward the message to be processed; The correspondence between the source object and the gateway includes the correspondence between the source object and the diversion IP address, the diversion IP address and the IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes the second diversion IP address; The forwarding the to-be-processed message to the second gateway according to the second gateway indication information includes: Acquire multiple network segments to which the second traffic diversion IP address belongs according to the second traffic diversion IP address and the routing table, and acquire second gateway indication information for indicating a second gateway to which the IP address belongs to the first network segment, and forward the message to be processed to the second gateway according to the second gateway indication information, wherein the first network segment is a network segment with the longest subnet mask among the multiple network segments; or According to the second diversion IP address and the routing table, obtain the multiple network segments to which the second diversion IP address belongs, obtain the second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment, and forward the message to be processed to the second gateway according to the second gateway indication information; the third network segment is the network segment with the shortest routing path length among the multiple network segments.

2. The control method according to claim 1, wherein: Before sending the second gateway indication information and the message to be processed to the switch, the method further includes: Encapsulating the second gateway indication information and the message to be processed to obtain a first encapsulated message; The sending the second gateway indication information and the message to be processed to the switch includes: Sending the first encapsulated message to the switch: The receiving the second gateway indication information and the message to be processed includes: Receive the first encapsulation message.

3. The control method according to claim 1, wherein: The obtaining of second gateway indication information for indicating a second gateway whose IP address belongs to the first network segment includes: In response to determining, according to the routing table, that the IP address of at least one gateway belongs to the first network segment, obtaining second gateway indication information for indicating a second gateway whose IP address belongs to the first network segment; The method further comprises: In response to determining according to the routing table that the IP address of any gateway does not belong to the first network segment, and the IP address of at least one gateway belongs to the second network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the second network segment, where the second network segment is a segment with the second longest subnet mask among the multiple network segments.

4. The control method according to claim 1, wherein: The acquiring the second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment includes: In response to determining, according to the routing table, that the third network segment includes an IP address of at least one gateway, obtaining second gateway indication information for indicating a second gateway in the third network segment; The method further comprises: In response to determining according to the routing table that the IP address of any gateway does not belong to the third network segment, and the IP address of at least one gateway belongs to the fourth network segment, second gateway indication information is obtained for indicating the second gateway whose IP address belongs to the fourth network segment, and the fourth network segment is the network segment with the second shortest path length among the multiple network segments.

5. A control method, wherein: The method is applied to a gateway, and the method comprises: receiving a first message to be processed sent by the switch, and obtaining a source object identifier of the first message to be processed; acquiring second gateway indication information for indicating a second gateway according to the source object identifier and the correspondence between the source object and the gateway, and sending the second gateway indication information and the first to-be-processed message to the switch, so that the switch forwards the to-be-processed message to the second gateway according to the second gateway indication information; the bandwidth of the second gateway is greater than or equal to the total bandwidth of the network service product used by one or more source objects corresponding to the second gateway; receiving a second message to be processed sent by the switch, and forwarding the second message to be processed; The correspondence between the source object and the gateway includes the correspondence between the source object and the diversion IP address, the diversion IP address and the IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes the second diversion IP address; The switch forwards the to-be-processed message to the second gateway according to the second gateway indication information, including: Acquire multiple network segments to which the second traffic diversion IP address belongs according to the second traffic diversion IP address and the routing table, and acquire second gateway indication information for indicating a second gateway to which the IP address belongs to the first network segment, and forward the message to be processed to the second gateway according to the second gateway indication information, wherein the first network segment is a network segment with the longest subnet mask among the multiple network segments; or According to the second diversion IP address and the routing table, obtain the multiple network segments to which the second diversion IP address belongs, obtain the second gateway indication information for indicating the second gateway whose IP address belongs to the third network segment, and forward the message to be processed to the second gateway according to the second gateway indication information; the third network segment is the network segment with the shortest routing path length among the multiple network segments.

6. A message processing system, wherein: The message processing system includes a switch and at least one gateway, the switch is used to implement the method steps described in any one of claims 1 to 4, and the gateway is used to implement the method steps described in claim 5.

7. An electronic device comprising a memory and at least one processor; in, The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the at least one processor to implement the method steps described in any one of claims 1-5.

8. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the method steps described in any one of claims 1 to 5.

9. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for realizing MAC forced forwarding function and device

    CN101577722A

  • Media stream control method, related equipment and network system

    CN101772084A

  • Message transmission method and device

    CN106161283A

  • Maintenance method and device of route entry

    CN107147581A

  • Method, apparatus, and system for processing data packets

    CN108353022A