Message sending method and electronic device

By updating tunnel identifiers in the virtual private network architecture and utilizing peer-to-peer links to forward messages, the message loop problem in multi-logical gateway communication is solved, improving the network's traffic forwarding performance and stability.

CN121547412BActive Publication Date: 2026-03-31INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In a virtual private network architecture, when multiple logical gateways are used for communication, messages will be transmitted back and forth among the multiple logical gateways, forming message loops, consuming bandwidth resources, and causing network congestion.

Method used

By determining the target receiving address of the message, updating the tunnel identifier, and using peer-to-peer links to send the message to other gateway devices on the same logical gateway, the message is prevented from being transmitted back in the message tunnel and is forwarded using peer-to-peer links.

Benefits of technology

It improves the traffic forwarding performance and stability of the virtual private network architecture, reduces traffic congestion and resource consumption, and ensures network efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547412B_ABST
    Figure CN121547412B_ABST
Patent Text Reader

Abstract

The application provides a message sending method and electronic equipment, which can be applied to the technical field of computer network. The method comprises the following steps: in response to receiving a first to-be-processed message transmitted through a message tunnel, determining a target receiving address of the first to-be-processed message; in the case that it is determined that a forwarding table item corresponding to the target receiving address does not exist in a target storage space, updating a tunnel identifier carried by the first to-be-processed message for representing transmission through the message tunnel to obtain a tunnel identifier message; and sending the tunnel identifier message to other gateway devices belonging to the same logical gateway as a target gateway device by using a peer-to-peer link, so that, after the other gateway devices having the forwarding table item corresponding to the target receiving address receive the tunnel identifier message, the other gateway devices determine that the tunnel identifier message comes from the message tunnel based on the tunnel identifier message, and send the tunnel identifier message to the target receiving address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer network technology, and more specifically to a message sending method and an electronic device. Background Technology

[0002] In a Virtual Private Network (VPN) architecture, the core solution for supporting large-scale interconnection of terminal devices is to use multiple gateway devices to form a network collaboratively. That is, multiple gateway devices constitute multiple logical gateways, and multiple logical gateways provide packet forwarding services for specific terminal devices respectively.

[0003] In the process of implementing this invention, it was found that at least the following problems exist in the related technology: during the communication process using multiple logical gateways, messages will be transmitted back and forth among multiple logical gateways, forming message loops, occupying the bandwidth resources of the virtual private network architecture, and causing network congestion. Summary of the Invention

[0004] In view of the above problems, the present invention provides a message sending method and an electronic device.

[0005] According to a first aspect of the present invention, a message sending method is provided, comprising: in response to receiving a first message to be processed transmitted through a message tunnel, determining a target receiving address for the first message to be processed, wherein the virtual private network architecture includes multiple logical gateways, the multiple logical gateways including multiple gateway devices for sending messages to a cluster of terminal devices under the responsibility of the logical gateway, and the target gateway device being connected to the gateway device of the logical gateway for sending the first message to be processed through a message tunnel; if it is determined that there is no forwarding table entry corresponding to the target receiving address in the target storage space, updating the tunnel identifier carried in the first message to be processed to characterize the transmission through the message tunnel, thereby obtaining a tunnel identifier message, wherein the forwarding table entry includes a receiving address characterizing the successful forwarding of the message; and using a peer-to-peer link, sending the tunnel identifier message to other gateway devices belonging to the same logical gateway as the target gateway device, so that after receiving the tunnel identifier message, the other gateway devices having a forwarding table entry corresponding to the target receiving address determine, based on the tunnel identifier message, that the tunnel identifier message originates from the message tunnel, and send the tunnel identifier message to the target receiving address, wherein the peer-to-peer link is a communication link between multiple gateway devices within the logical gateway.

[0006] A second aspect of the present invention provides a message sending apparatus, comprising: an address determination module, configured to determine a target receiving address of the first message to be processed in response to receiving a first message to be processed transmitted through a message tunnel, wherein the virtual private network architecture includes multiple logical gateways, the multiple logical gateways including multiple gateway devices for sending messages to a cluster of terminal devices under the responsibility of the logical gateways, and the target gateway device is connected to the gateway device of the logical gateway for sending the first message to be processed through a message tunnel; and an identifier update module, configured to update the forwarding table entry carried in the first message to be processed when it is determined that there is no forwarding table entry corresponding to the target receiving address in the target storage space. The method is to obtain a tunnel identifier message, which is used to characterize the transmission through the message tunnel. The forwarding table entry includes a receiving address that can successfully forward the message. The method is to send the tunnel identifier message to other gateway devices belonging to the same logical gateway as the target gateway device using a peer-to-peer link. This allows other gateway devices with forwarding table entries corresponding to the target receiving address to receive the tunnel identifier message, determine that the tunnel identifier message comes from the message tunnel, and send the tunnel identifier message to the target receiving address. The peer-to-peer link is a communication link between multiple gateway devices within the logical gateway.

[0007] A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0008] A fourth aspect of the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.

[0009] A fifth aspect of the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description

[0010] The above-described features, other objects, and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0011] Figure 1 An application scenario diagram of a message transmission method and electronic device according to an embodiment of the present invention is shown.

[0012] Figure 2 A flowchart of a message transmission method according to an embodiment of the present invention is shown.

[0013] Figure 3An architecture diagram of a logical gateway according to an embodiment of the present invention is shown.

[0014] Figure 4 A data flow diagram illustrating message restoration and forwarding in a message transmission method according to an embodiment of the present invention is shown.

[0015] Figure 5 A structural block diagram of a message sending apparatus according to an embodiment of the present invention is shown.

[0016] Figure 6 A block diagram of an electronic device suitable for implementing a message transmission method according to an embodiment of the present invention is shown. Detailed Implementation

[0017] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0018] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0019] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0020] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0021] Virtual eXtensible Local Area Network (VXLAN) is a virtual networking technology that addresses the limitations of existing Virtual Local Area Network (VLAN) technologies in meeting the demands of Layer 2 network transmission. VXLAN is a Layer 2 virtual networking technology that introduces an outer tunnel in User Datagram Protocol (UDP) format as the data link layer, transmitting the original datagram content as the tunnel payload. Because the outer layer uses UDP as the transmission medium, the payload data can be transmitted quickly within the Layer 2 network without waiting for acknowledgment messages from the receiver.

[0022] During message transmission, after receiving a message, a gateway device forwards it to other gateway devices within the same logical gateway. These other gateway devices then flood the message to improve transmission efficiency and delivery rate. However, if the message is sent to the logical gateway via a message tunnel, the flooding process will send the message back through the message tunnel, creating a message loop in the network. In other words, the same message will be repeatedly sent between multiple logical gateways, consuming communication resources and impacting network communication efficiency and stability.

[0023] An embodiment of the present invention provides a message sending method, comprising: in response to receiving a first message to be processed transmitted through a message tunnel, determining a target receiving address for the first message to be processed, wherein the virtual private network architecture includes multiple logical gateways, the multiple logical gateways including multiple gateway devices for sending messages to a cluster of terminal devices under the responsibility of the logical gateway, and the target gateway device being connected to the gateway device of the logical gateway for sending the first message to be processed through a message tunnel; if it is determined that there is no forwarding table entry corresponding to the target receiving address in the target storage space, updating the tunnel identifier carried in the first message to be processed to characterize the transmission through the message tunnel, thereby obtaining a tunnel identifier message, wherein the forwarding table entry includes a receiving address characterizing the successful forwarding of the message; and using a peer-to-peer link, sending the tunnel identifier message to other gateway devices belonging to the same logical gateway as the target gateway device, so that after receiving the tunnel identifier message, the other gateway devices having a forwarding table entry corresponding to the target receiving address determine that the tunnel identifier message comes from the message tunnel based on the tunnel identifier message, and send the tunnel identifier message to the target receiving address, wherein the peer-to-peer link is a communication link between multiple gateway devices within the logical gateway.

[0024] Figure 1 An application scenario diagram of a message transmission method and electronic device according to an embodiment of the present invention is shown.

[0025] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a first gateway device 104, a second gateway device 105, a third gateway device 106, a fourth gateway device 107, a fifth gateway device 108, a sixth gateway device 109, and a seventh gateway device 110.

[0026] Among them, the second gateway device 105, the third gateway device 106, the fourth gateway device 107, the sixth gateway device 109, and the seventh gateway device 110 constitute a virtual private network architecture. The second gateway device 105 and the third gateway device 106 belong to the same logical gateway, namely the first logical gateway. The sixth gateway device 109 and the seventh gateway device 110 belong to the same logical gateway, namely the second logical gateway. The fourth gateway device 107 is used to provide a message tunnel between the above two logical gateways.

[0027] The communication links between the fourth gateway device 107 and the first logical gateway, and between the fourth gateway device 107 and the second logical gateway, are message tunnels between the first and second logical gateways. The communication links between the first logical gateway and the first gateway device 104, and between the second logical gateway and the fifth gateway device 108, are non-message tunnels. The communication links between the second gateway device 105 and the third gateway device 106 in the first logical gateway are peer-to-peer links, and the communication links between the sixth gateway device 109 and the seventh gateway device 110 in the second logical gateway are peer-to-peer links.

[0028] The first logical gateway, consisting of the second gateway device 105 and the third gateway device 106, is responsible for sending messages to the first terminal device 101. A first gateway device 104 can be configured between the first terminal device 101 and the first logical gateway for communication. Similarly, the logical gateway, consisting of the sixth gateway device 109 and the seventh gateway device 110, is responsible for sending messages to the terminal device cluster consisting of the second terminal device 102 and the third terminal device 103. A fifth gateway device 108 can be configured between the terminal device cluster and the second logical gateway for communication.

[0029] It should be understood that Figure 1 The number of the first terminal device, second terminal device, third terminal device, first gateway device, second gateway device, third gateway device, fourth gateway device, fifth gateway device, sixth gateway device, and seventh gateway device is merely illustrative. Depending on implementation needs, any number of the first terminal device, second terminal device, third terminal device, first gateway device, second gateway device, third gateway device, fourth gateway device, fifth gateway device, sixth gateway device, and seventh gateway device can be included.

[0030] Figure 2 A flowchart of a message transmission method according to an embodiment of the present invention is shown.

[0031] like Figure 2 As shown, the message sending method of this embodiment includes operations S210 to S230, and the message sending method can be executed by the target gateway device.

[0032] In operation S210, in response to receiving a first message to be processed transmitted through the message tunnel, the target receiving address of the first message to be processed is determined.

[0033] In operation S220, if it is determined that there is no forwarding table entry corresponding to the target receiving address in the target storage space, the tunnel identifier carried by the first message to be processed, which is used to identify the transmission through the message tunnel, is updated to obtain the tunnel identifier message.

[0034] In operation S230, using the peer-to-peer link, the tunnel identification message is sent to other gateway devices belonging to the same logical gateway as the target gateway device. This allows other gateway devices with forwarding entries corresponding to the target receiving address to receive the tunnel identification message, determine that the tunnel identification message comes from the message tunnel based on the tunnel identification message, and then send the tunnel identification message to the target receiving address.

[0035] A virtual private network architecture may include multiple logical gateways, each of which includes multiple gateway devices for sending packets to the cluster of terminal devices under its responsibility. The network addresses of the multiple gateway devices included in each logical gateway are the same, and each of the multiple gateway devices stores forwarding table entries in its own storage space. The forwarding table entries stored by the multiple gateway devices are different, and the forwarding table entries include receiving addresses used to characterize the successful forwarding of packets.

[0036] The target gateway device can connect to the gateway device in the logical gateway used to send the first message to be processed via a message tunnel.

[0037] After the first message to be processed is sent from the message sending gateway device at one end of the message tunnel, it is passed to the other end of the message tunnel, namely the target gateway device. Before the target gateway device forwards the first message to be processed, it can be parsed to determine the target receiving address of the first message to be processed. Then, based on the forwarding table entries stored in the target storage space of the target gateway device, it can be determined whether there is a forwarding table entry in the target storage space corresponding to the target receiving address, thereby determining whether the first message to be processed can be directly forwarded to its target receiving address.

[0038] It should be noted that the first message to be processed, as well as all messages involved in this invention, are Address Resolution Protocol (ARP) messages.

[0039] If it is determined that there is no forwarding table entry corresponding to the target receiving address in the target storage space, it means that the target network device cannot directly forward the first message to be processed to the target receiving address. Therefore, the target network device can forward the first message to be processed to other gateway devices belonging to the same logical gateway, so as to utilize other gateway devices to forward the first message to be processed.

[0040] The first message to be processed carries a tunnel identifier, which indicates that the first message to be processed is transmitted to the target gateway device through a tunnel. However, in order to ensure message transmission efficiency, multiple gateway devices may reduce the storage of data unrelated to message transmission, and therefore will not store the aforementioned tunnel identifier locally. Therefore, it is difficult for gateway devices to determine whether the source of the message is a tunnel based on the tunnel identifier.

[0041] In one example, the Virtual Local Area Network Identifier (VLAN ID) can be used as the tunnel identifier. The VLAN ID is a numerical identifier that distinguishes different virtual local area networks and can be used to logically isolate the same physical network into multiple independent networks.

[0042] In another example, after receiving the first message to be processed, the target gateway device can parse the first message to be processed to obtain the Virtual Extensible LAN Network Identifier (VNI) carried in the first message to be processed, and determine the VLAN to be used to send the first message to be processed in the future based on the VNI, and use the VLAN ID as the tunnel identifier.

[0043] Therefore, before the target gateway device sends the first pending message to other gateway devices, the first pending message can be marked to inform other gateway devices that the source of the first pending message is a message tunnel. This avoids other gateway devices sending the first pending message through the message tunnel when sending it in a flooding manner, which would cause the first pending message to be sent back to the gateway device through the message tunnel, resulting in a message loop in the virtual private network architecture.

[0044] Specifically, the target gateway device can update the tunnel identifier to the corresponding tag, obtain the tunnel identifier message, and then send the tunnel identifier message to other gateway devices. Other gateway devices can store the correspondence between tunnel identifiers and tags. Since the number of message tunnels of a logical gateway is usually much smaller than the total number of message links in a virtual private network architecture, other gateway devices can significantly reduce the amount of data stored locally while accurately identifying the tunnel identifier message.

[0045] Taking VLAN ID as the tunnel identifier as an example, the first message to be processed carries a VLAN ID of 100. The target gateway device can update the VLAN ID to 500 to mark the message, so that when other gateway devices receive a message with a VLAN ID of 500, they can determine that the message originated from the message tunnel.

[0046] A peer link is a communication link between multiple gateway devices within a logical gateway. A peer link indicates that the gateway devices at both ends of the link are of equal hierarchy, function, and permissions. A target gateway device can use a peer link to send tunnel identification messages to other gateway devices.

[0047] After receiving the tunnel identifier message through the peer-to-peer link, other gateway devices can determine the tunnel identifier carried in the message. If the tunnel identifier satisfies the above correspondence between tunnel identifier and tag, the message is determined to originate from the message tunnel. Therefore, other gateway devices can avoid sending the tunnel identifier message through the message tunnel and instead send it to the target receiving address.

[0048] It is understood that the first message to be processed in the above embodiments has a clear target receiving address, and the above message sending method is also applicable to the forwarding process of broadcast messages.

[0049] According to an embodiment of the present invention, the tunnel identifier of the first message to be processed from the message tunnel is updated, and the message is forwarded to other gateway devices at the other end of the peer link within the logical gateway. This enables other gateway devices to accurately identify the source of the message as the message tunnel based on the updated tunnel identifier, thus avoiding the message being sent back through the message tunnel during subsequent processing. By avoiding message back transmission, the problem of traffic loops in the virtual private network architecture is solved, thereby improving the traffic forwarding performance and stability of the virtual private network architecture and reducing traffic congestion and resource consumption in the virtual private network architecture.

[0050] The process of a target gateway device sending messages to other gateway devices belonging to the same logical gateway has been explained above. In addition, the target gateway device can also send the first message to be processed to an external gateway device that does not belong to the same logical gateway.

[0051] Specifically, if it is determined that the logical gateway to which the target gateway device belongs does not have a forwarding table entry corresponding to the target receiving address, the first message to be processed is sent to the external gateway device in the virtual private network architecture using an external link. The external link is a non-peer-to-peer link that communicates with the target gateway device.

[0052] If the logical gateway to which the target gateway device belongs does not have a forwarding table entry corresponding to the target receiving address, or if the first message to be processed is a broadcast message, the first message to be processed can be sent to an external gateway device that does not belong to the same logical gateway, and the external gateway device will then forward it.

[0053] Because the external gateway device and the target gateway device belong to different logical gateways, their message tunnels are different. In this case, when the external gateway device sends a broadcast message via flooding, it will not send the message to the message tunnel of the logical gateway to which the target gateway device belongs. Therefore, the external gateway device does not need to be concerned about the source of the message from the target gateway device.

[0054] The target gateway device and the external gateway device do not belong to the same logical gateway, and their levels, functions, and permissions may differ. Therefore, the external link for communication between the target gateway device and the external gateway device is a non-peer link. The target gateway device can send the first pending message that has not been updated to the external gateway device through the external link, and the external gateway device will then forward it according to the target receiving address.

[0055] According to embodiments of the present invention, when the target receiving address does not belong to the current logical gateway, the packet is sent to an external gateway device via an external link, thus achieving cross-logical gateway routing. This avoids the current logical gateway discarding the packet due to the lack of a corresponding forwarding table entry, ensuring that the packet can continue to flow within the virtual private network architecture, thereby improving network fault tolerance and packet delivery rate. By clearly defining the external links, the standardization of cross-logical gateway forwarding can be ensured, avoiding communication chaos caused by link misuse.

[0056] According to embodiments of the present invention, a logical gateway can be implemented using a MultiChassis Link Aggregation Group (MCLAG). MCLAG is a cross-device link aggregation mechanism that negotiates link aggregation between multiple gateway devices and the accessed device. From the perspective of the accessed device, the multiple gateway devices at the other end are virtualized into a single logical gateway. This allows for ensuring overall link stability by only maintaining the link reliability between the accessed device and the logical gateway, and also simplifies management and optimizes traffic distribution.

[0057] Furthermore, when a gateway device in a logical gateway fails, the traffic of that failed gateway device can be quickly switched to other devices in the logical gateway, thereby avoiding network downtime caused by a single point of failure.

[0058] After assigning multiple gateway devices to the same logical gateway, the status of the multiple gateway devices can be configured as active and backup respectively, resulting in one active gateway device and at least one backup gateway device. The communication address of the backup gateway device is configured according to the communication address of the active gateway device, so that gateway devices or terminal devices outside the logical gateway can communicate with multiple gateway devices in the logical gateway through the same communication address.

[0059] Specifically, a logical gateway can be constructed in the following way: configuring the same communication address for multiple gateway devices belonging to the same logical gateway; configuring the same target address field for the communication address of each terminal device in the terminal device cluster managed by the logical gateway, wherein the target address field is used to characterize the communication between the terminal device and the logical gateway.

[0060] Figure 3 An architecture diagram of a logical gateway according to an embodiment of the present invention is shown.

[0061] like Figure 3 As shown, in this example, Internet Protocol (IP) addresses are used as communication addresses. Logical gateway 310 is responsible for communicating with the terminal device cluster 320. Logical gateway 310 includes an eighth gateway device 311 and a ninth gateway device 312, while the terminal device cluster 320 includes a fourth terminal device 321 and a fifth terminal device 322. It can be seen that in this example, logical gateway 310 communicates directly with the terminal device cluster 320; no gateway device for forwarding packets is set up between them.

[0062] Multiple gateway devices belonging to the logical gateway 310 can be configured with the same IP address (e.g., 10.254.0.16) so that from the perspective of the terminal device cluster 320, communication with the logical gateway 310 can be achieved through the above IP address without needing to know the internal structure of the logical gateway 310.

[0063] The same target address field can be configured for the communication address of each terminal device in the terminal device cluster 320 under the responsibility of the logical gateway 310, so that each terminal device is in the same network segment.

[0064] The destination address field can be set to any field of the IP address. For example, the destination address field can be set to the first, second, and fourth fields of the IP address, that is, the first, second, and fourth fields of the IP addresses of the fourth terminal device 321 and the fifth terminal device 322 can be configured to the same destination address field. For example, the IP address of the fourth terminal device 321 can be configured as 192.168.10.3, and the IP address of the fifth terminal device 322 can be configured as 192.168.20.3.

[0065] According to embodiments of the present invention, configuring multiple gateway devices within the same logical gateway with the same communication address enables unified external access for the logical gateway. This allows external devices to initiate communication simply by using the communication address, without needing to distinguish the specific physical gateway within the logical gateway, thus simplifying network configuration and access procedures. Configuring a unified destination address field for terminal devices ensures that packets are accurately routed to the corresponding logical gateway, reducing forwarding errors caused by address confusion and improving the convenience and accuracy of network access.

[0066] According to embodiments of the present invention, such as Figure 2 The operation S220 shown, which updates the tunnel identifier carried by the first message to be processed to represent the transmission through the message tunnel, to obtain a tunnel identifier message, may include: using a preset mapping rule to determine a target marker corresponding to the tunnel identifier, wherein the preset mapping rule represents the correspondence between the tunnel identifier and the marker; using the target marker to update the tunnel identifier carried by the first message to be processed to obtain a tunnel identifier message.

[0067] A preset mapping rule can be set for each logical gateway. The preset mapping rule for each logical gateway specifies the correspondence between the tunnel identifiers and target tags of multiple message tunnels of that logical gateway.

[0068] Using preset mapping rules, the target marker corresponding to the tunnel identifier carried by the first message to be processed can be determined, and the tunnel identifier carried by the first message to be processed can be updated to the target marker to obtain the tunnel identifier message.

[0069] According to an embodiment of the present invention, the tunnel identifier is updated to the target marker based on a preset mapping rule, thereby achieving a standardized identifier for the message tunnel source. The target marker can clearly distinguish whether a message comes from a message tunnel, avoiding confusion in link type judgment during subsequent forwarding, providing clear guidance for message processing of other gateway devices within the same logical gateway, and improving the coordination and efficiency of message forwarding.

[0070] According to an embodiment of the present invention, the preset mapping rule can be determined in the following way: traversing a record table containing multiple communication links existing in a virtual private network architecture to obtain the communication identifiers of each of the multiple communication links, wherein the communication link includes a message tunnel or a non-message tunnel, and the communication identifier includes the tunnel identifier of the message tunnel or the link identifier of the non-message tunnel; configuring a target tag that is different from the communication identifiers of each of the multiple communication links for the tunnel identifier of the message tunnel connected to the logical gateway to which the target gateway device belongs.

[0071] The record table of the virtual private network architecture contains multiple communication links existing in the virtual private network architecture. By traversing the record table, the communication identifiers of each communication link can be obtained.

[0072] Since the preset mapping rules are configured independently for each logical gateway, the communication link category can be divided into message tunnel or non-message tunnel for each logical gateway. Furthermore, the same communication link can be classified into different categories for different logical gateways. Therefore, for each logical gateway, the multiple communication identifiers obtained after traversing the record table can be divided into tunnel identifiers for message tunnels and link identifiers for non-message tunnels.

[0073] It is understandable that the tunnel identifier needs to be updated only when the first message to be processed comes from the message tunnel. Therefore, the preset mapping rules can configure the target tag for the tunnel identifier of the message tunnel connected to the logical gateway, and there is no need to configure the target tag for the link identifier of non-message tunnels.

[0074] If the target tag configured for the tunnel identifier is the same as the link identifier for a non-message tunnel, other gateway devices will have difficulty distinguishing the source of the received message carrying that link identifier. For example, if the tunnel identifier for a message tunnel is 100, the link identifier for a non-message tunnel is 300, and the target tag configured for tunnel identifier 100 is 300, then when other gateway devices receive a message with a link identifier of 300, they will have difficulty determining whether the message is a message with an updated tunnel identifier from the target gateway device or a message from a non-message tunnel.

[0075] Therefore, a target tag can be configured for the tunnel identifier that is different from the communication identifiers of each of the multiple communication links, so that the target tag is a unique identifier and avoids confusion between the target tag and the link identifier of the non-message tunnel.

[0076] For example, for a logical gateway to which the target gateway device belongs, this logical gateway has two message tunnels and two non-message tunnels. The tunnel identifiers for the message tunnels are 100 and 200, and the link identifiers for the non-message tunnels are 300 and 400, respectively. Then, a target tag of 500 can be configured for tunnel identifier 100, and a target tag of 600 can be configured for tunnel identifier 200. In this case, when other gateway devices receive a message with a link identifier of 300, they can determine that the message comes from a non-message tunnel. Similarly, when other gateway devices receive a message with a link identifier of 600, they can determine that the message is a message with an updated tunnel identifier from the target gateway device.

[0077] According to embodiments of the present invention, by traversing the communication link record table and configuring a unique target marker for the message tunnel, the exclusivity and identifiability of the target marker are ensured. This avoids conflicts between the target marker and the identifiers of other communication links, ensuring the accuracy of message source determination. Furthermore, by dynamically configuring mapping rules based on the actual network communication links, the adaptability of the rules is improved, adapting to the complex link topology in virtual private network architectures.

[0078] According to an embodiment of the present invention, the message sending method further includes: if it is determined that there is a forwarding table entry corresponding to the target receiving address in the target storage space, the first message to be processed is sent in a point-to-point manner using the port corresponding to the target receiving address recorded in the forwarding table entry.

[0079] If the target storage space contains a forwarding table entry corresponding to the target receiving address, it indicates that the target gateway device can send the packet to the target receiving address. In addition to representing the receiving address that can successfully forward packets, the forwarding table entry also records the port of the link connected to that receiving address. Therefore, the first packet to be processed can be sent using the port corresponding to the target receiving address recorded in the forwarding table entry, thus enabling the first packet to be processed to be sent to the target receiving address in a point-to-point manner.

[0080] According to embodiments of the present invention, when a corresponding forwarding table entry exists, a point-to-point method is used to send messages, enabling flexible switching between precise forwarding and collaborative forwarding. Point-to-point sending eliminates the need for peer-to-peer link forwarding, reducing latency and resource consumption in intermediate stages, ensuring that messages can quickly reach the target terminal, and improving message sending efficiency in conventional scenarios.

[0081] According to an embodiment of the present invention, the message sending method further includes: in response to receiving a second message to be processed transmitted through a peer-to-peer link, detecting the second message to be processed and obtaining a detection result; if the detection result indicates that the second message to be processed comes from a message tunnel, updating the target marker carried by the second message to a tunnel identifier based on a preset mapping rule to obtain a restored message; and sending the restored message to a target terminal device in the terminal device cluster managed by the logical gateway based on the target receiving address.

[0082] After the target gateway device receives the second message to be processed transmitted through the peer-to-peer link, it can detect the tunnel identifier in the second message to determine the source of the second message to be processed.

[0083] In one example, if it is determined that the tunnel identifier in the second message to be processed matches the target identifier successfully, it can be determined that the second message to be processed was received by another gateway device through the message tunnel, updated according to the preset mapping rules, and then sent to the target gateway device through the peer-to-peer link.

[0084] In another example, if it is determined that the tunnel identifier in the second message to be processed does not match the target identifier, it can be determined that the second message to be processed was received by another gateway device through a non-message tunnel and sent directly to the target gateway device through the peer-to-peer link without processing.

[0085] If the detection result indicates that the second message to be processed originated from a message tunnel, the tunnel identifier corresponding to the target marker can be determined based on the mapping rules. Then, the target marker can be restored using the tunnel identifier to obtain the restored message. Finally, based on the target receiving address, the restored message is sent to the target terminal device.

[0086] According to embodiments of the present invention, after receiving a peer-to-peer link message, the source is detected and the tunnel identifier is restored, enabling seamless cross-gateway message flow. Messages from the message tunnel retain their original link attributes after being marked and restored, ensuring that subsequent forwarding conforms to the link rules of the virtual private network architecture. Through accurate source detection, forwarding errors caused by link type confusion can be avoided, improving the smoothness of multi-gateway collaboration within the same logical gateway.

[0087] Figure 4 A data flow diagram illustrating message restoration and forwarding in a message transmission method according to an embodiment of the present invention is shown.

[0088] like Figure 4 As shown, with Figure 1Taking the partial scenario diagram shown as an example, with the seventh gateway device 110 as the target gateway device, after the sixth gateway device 109 receives the message from the message tunnel forwarded by the fourth gateway device 107, it updates the tunnel identifier of the message to the target identifier according to the preset mapping rule. The resulting tunnel update message is the second message to be processed, and the second message to be processed is transmitted to the seventh gateway device 110 through the peer-to-peer link.

[0089] After receiving the second message to be processed transmitted by the sixth gateway device 109 through the peer-to-peer link, the seventh gateway device 110 determines after detection that the second message to be processed comes from the message tunnel. Then, according to the preset mapping rules, the target marker of the second message to be processed is restored to the tunnel identifier to obtain the restored message. The restored message is consistent with the message received by the sixth gateway device 109 through the message tunnel.

[0090] Since the second message to be processed comes from the message tunnel, and the seventh gateway device 110 receives the second message to be processed through the peer link, the seventh gateway device 110 no longer sends the restoration message to the message tunnel and the peer link. The seventh gateway device 110 can send the restoration message to the target terminal device in the terminal device cluster under the responsibility of its logical gateway based on the target receiving address of the restoration message, that is, send the restoration message to the fifth gateway device 108, and the fifth gateway device 108 determines whether to forward the restoration message to the second terminal device 102 or the third terminal device 103.

[0091] If the second message to be processed is a broadcast message, or if multiple gateway devices have forwarding entries corresponding to the target receiving address in their storage spaces, multiple gateway devices can send the second message to the target terminal device. If all of these gateway devices send the second message to the target terminal device, the target terminal device will receive the same message repeatedly, causing it to parse, process, and store the same message multiple times, thus wasting the target terminal device's resources.

[0092] Therefore, after the target terminal device receives the second message to be processed, it can broadcast a message receipt information. This message receipt information can include the target terminal device's communication address (i.e., the target receiving address) and the identifier of the second message to be processed. This allows the gateway device, upon receiving the message receipt information, to know that the target receiving address has received the second message to be processed and to stop forwarding the second message to that address.

[0093] Specifically, in response to receiving the message receipt information broadcast by the target terminal device, it can be determined that the second message to be processed has been sent to the target terminal device by another gateway device belonging to the same logical gateway as the target gateway device. Therefore, the target terminal device does not need to send the restoration message and can directly discard the restoration message.

[0094] According to embodiments of the present invention, determining whether a message has been delivered based on the broadcast receipt information of the terminal device avoids the waste of network resources caused by repeated transmission. Upon receiving the receipt, the restored message is discarded, ensuring that the same message is sent only once, reducing redundant data transmission, and preventing the target terminal device from repeatedly receiving messages, thereby improving the reliability of message transmission and the utilization rate of network resources.

[0095] According to an embodiment of the present invention, the message sending method further includes: if the detection result indicates that the second message to be processed comes from a non-message tunnel of the communication link, sending the second message to be processed to another logical gateway of the virtual private network architecture using the message tunnel of the virtual private network architecture.

[0096] If it is determined that the second message to be processed comes from a non-message tunnel, the second message to be processed can be sent to other logical gateways through a message tunnel, so that the other logical gateways can forward the message based on the message sending method of the present invention.

[0097] It is understandable that, since the second message to be processed originates from a non-message tunnel, while other gateway devices are sending the second message to be processed to the target gateway device, they will also be sending the second message to be processed to other logical gateways through the non-message tunnel. This saturation-style transmission method ensures that even if some gateway devices within the logical gateway fail, the logical gateway can still achieve external communication.

[0098] According to embodiments of the present invention, for messages originating from sources other than message tunnels, forwarding to other logical gateways via message tunnels enables cross-domain forwarding between different logical gateways. The message tunneling mechanism of the virtual private network architecture ensures the security and stability of cross-logical gateway communication, avoiding the risks associated with non-message tunnel links; differentiated forwarding based on link type ensures that messages can reach the target logical gateway via the appropriate link, improving the reliability of cross-domain communication.

[0099] In embodiments of the present invention, different logical gateways ensure stable communication through saturation transmission. In this case, the target gateway device may receive the same pending message multiple times. Upon receiving a third pending message, the target gateway device can determine the message identifier carried by the third pending message. This message identifier uniquely identifies the message within the virtual private network architecture. For example, an auto-incrementing mechanism can be set for the message identifier, assigning it an auto-incrementing message identifier when a pending message enters the virtual private network architecture.

[0100] The message identifier is matched against the message in the target storage space. If a match is successful, it means the target gateway device has already received the third message to be processed and can discard it. If a match fails, it means the target gateway device has not yet received the third message to be processed. The message identifier of the third message to be processed is cached in the target storage space, and the message to be processed is then processed according to the message sending method described above.

[0101] According to an embodiment of the present invention, after receiving a message to be processed, the message identifier of the message to be processed is first checked. If it is determined that the target gateway device has already received the message to be processed, the message to be processed is directly discarded to avoid repeated processing. This can effectively reduce the reuse of storage and processing resources of the target gateway device while ensuring communication effectiveness.

[0102] Based on the above message transmission method, the present invention also provides a message transmission apparatus. The following will be combined with... Figure 5 The device is described in detail.

[0103] Figure 5 A structural block diagram of a message sending apparatus according to an embodiment of the present invention is shown.

[0104] like Figure 5 As shown, the message sending device 500 of this embodiment includes an address determination module 510, an identifier update module 520, and a first message sending module 530.

[0105] The address determination module 510 is used to determine the target receiving address of the first message to be processed in response to receiving a first message to be processed transmitted through a message tunnel. The virtual private network architecture includes multiple logical gateways, each of which includes multiple gateway devices for sending messages to a cluster of terminal devices managed by the logical gateway. The target gateway device is connected to the gateway device of the logical gateway used to send the first message to be processed via a message tunnel. In one embodiment, the address determination module 510 can be used to perform the operation S210 described above, which will not be repeated here.

[0106] The identifier update module 520 is used to update the tunnel identifier carried in the first message to be processed, which is used to characterize transmission through the message tunnel, when it is determined that there is no forwarding table entry corresponding to the target receiving address in the target storage space, to obtain a tunnel identifier message. The forwarding table entry includes a receiving address that can successfully forward the message. In one embodiment, the identifier update module 520 can be used to perform the operation S220 described above, which will not be repeated here.

[0107] The first message sending module 530 is used to send a tunnel identification message to other gateway devices belonging to the same logical gateway as the target gateway device using a peer-to-peer link. This allows other gateway devices with forwarding entries corresponding to the target receiving address to receive the tunnel identification message, determine that the tunnel identification message originated from a message tunnel based on the message identification message, and then send the message to the target receiving address. Here, the peer-to-peer link is a communication link between multiple gateway devices within the logical gateway. In one embodiment, the first message sending module 530 can be used to execute the operation S230 described above, which will not be repeated here.

[0108] According to an embodiment of the present invention, the message sending device 500 further includes a first address configuration module and a second address configuration module.

[0109] The first address configuration module is used to configure the same communication address for multiple gateway devices belonging to the same logical gateway.

[0110] The second address configuration module is used to configure the same target address field for the communication address of each terminal device in the terminal device cluster under the responsibility of the logical gateway. The target address field is used to represent the communication between the terminal device and the logical gateway.

[0111] According to an embodiment of the present invention, the identifier update module 520 includes a identifier determination submodule and an identifier update submodule.

[0112] The marker determination submodule is used to determine the target marker corresponding to the tunnel identifier using preset mapping rules. The preset mapping rules represent the correspondence between the tunnel identifier and the marker.

[0113] The identifier update submodule is used to update the tunnel identifier carried in the first message to be processed using the target tag, so as to obtain the tunnel identifier message.

[0114] According to an embodiment of the present invention, the message sending device 500 further includes a record traversal module and a tag configuration module.

[0115] The record traversal module is used to traverse the record table containing multiple communication links existing in the virtual private network architecture, and obtain the communication identifiers of each communication link. The communication link includes message tunnels or non-message tunnels, and the communication identifier includes the tunnel identifier of the message tunnel or the link identifier of the non-message tunnel.

[0116] The tag configuration module is used to configure a target tag for the tunnel identifier of the message tunnel connected to the logical gateway to which the target gateway device belongs, which is different from the communication identifier of each of the multiple communication links.

[0117] According to an embodiment of the present invention, the message sending device 500 further includes a second message sending module.

[0118] The second message sending module is used to send the first message to be processed in a point-to-point manner using the port corresponding to the target receiving address recorded in the forwarding table entry when it is determined that there is a forwarding table entry corresponding to the target receiving address in the target storage space.

[0119] According to an embodiment of the present invention, the message sending device 500 further includes a message detection module, an identifier restoration module, and a third message sending module.

[0120] The message detection module is used to detect the second message to be processed in response to receiving a second message to be processed transmitted through a peer-to-peer link, and to obtain the detection result.

[0121] The identifier restoration module is used to update the target marker carried by the second message to be processed to the tunnel identifier based on a preset mapping rule when the detection result indicates that the second message to be processed comes from the message tunnel, so as to obtain the restored message.

[0122] The third message sending module is used to send the restoration message to the target terminal device in the terminal device cluster managed by the logical gateway, based on the target receiving address.

[0123] According to an embodiment of the present invention, the message sending device 500 further includes a message determination module and a message discarding module.

[0124] The message determination module is used to determine, in response to receiving message receipt information broadcast by the target terminal device, that the second message to be processed has been sent to the target terminal device by another gateway device belonging to the same logical gateway as the target gateway device.

[0125] The message discarding module is used to discard and restore messages.

[0126] According to an embodiment of the present invention, the message sending device 500 further includes a fourth message sending module.

[0127] The fourth message sending module is used to send the second message to be processed to other logical gateways of the virtual private network architecture using the message tunnel of the virtual private network architecture when the detection result indicates that the second message to be processed comes from the non-message tunnel of the communication link.

[0128] According to an embodiment of the present invention, the message sending device 500 further includes a fifth message sending module.

[0129] The fifth message sending module is used to send the first message to be processed to the external gateway device in the virtual private network architecture via an external link when it is determined that the logical gateway to which the target gateway device belongs does not have a forwarding table entry corresponding to the target receiving address. The external link is a non-peer link for communication with the target gateway device.

[0130] According to embodiments of the present invention, any plurality of modules among the address determination module 510, the identifier update module 520, and the first message sending module 530 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of the present invention, at least one of the address determination module 510, the identifier update module 520, and the first message sending module 530 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the address determination module 510, the identifier update module 520, and the first message sending module 530 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0131] Figure 6 A block diagram of an electronic device suitable for implementing a message transmission method according to an embodiment of the present invention is shown.

[0132] like Figure 6 As shown, an electronic device 600 according to an embodiment of the present invention includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0133] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 executes various operations of the method flow according to embodiments of the present invention by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also execute various operations of the method flow according to embodiments of the present invention by executing programs stored in said one or more memories.

[0134] According to an embodiment of the present invention, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.

[0135] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.

[0136] According to embodiments of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of the present invention, a computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.

[0137] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of the present invention.

[0138] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this invention. According to embodiments of the invention, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0139] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0140] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this embodiment of the invention. According to embodiments of the invention, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0141] According to embodiments of the present invention, program code for executing the computer programs provided in the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0142] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0143] Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention can be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or combinations fall within the scope of the present invention.

[0144] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.

Claims

1. A message sending method characterized by, The method applied to a target gateway device comprises: In response to receiving a first to-be-processed packet transmitted through a message tunnel, determining a target receiving address of the first to-be-processed packet, wherein a virtual private network architecture comprises a plurality of logical gateways, each of the plurality of logical gateways comprises a plurality of gateway devices for sending packets to a terminal device cluster responsible for the logical gateway, and the target gateway device is connected to a gateway device of a logical gateway for sending the first to-be-processed packet through the message tunnel; In a case where it is determined that the target storage space does not exist a forwarding table item corresponding to the target receiving address, updating a tunnel identifier carried by the first to-be-processed packet for representing transmission through a message tunnel to obtain a tunnel identifier packet, wherein the forwarding table item comprises a receiving address for representing successful packet forwarding; and Using a peer-to-peer link, sending the tunnel identifier packet to other gateway devices belonging to the same logical gateway as the target gateway device, so that, after other gateway devices existing the forwarding table item corresponding to the target receiving address receive the tunnel identifier packet, determining, based on the tunnel identifier packet, that the tunnel identifier packet comes from the message tunnel, and sending the tunnel identifier packet to the target receiving address, wherein the peer-to-peer link is a communication link between the plurality of gateway devices in the logical gateway; The method further comprises: In a case where it is determined that the target storage space exists the forwarding table item corresponding to the target receiving address, using a port corresponding to the target receiving address recorded in the forwarding table item to send the first to-be-processed packet in a point-to-point manner. The method further comprises: ​ ​ ​ 2. The method of claim 1, wherein, ​ ​ ​ 3. The method of claim 1, wherein, ​ ​ 4. The method of claim 1, wherein, ​ in response to receiving a second pending message transmitted through the peer-to-peer link, detecting the second pending message to obtain a detection result; in a case where the detection result indicates that the second pending message comes from the message tunnel, updating the target mark carried by the second pending message to the tunnel identifier based on the preset mapping rule to obtain a restored message; and based on the target receiving address, sending the restored message to a target terminal device in a terminal device cluster responsible by the logical gateway.

5. The method of claim 4, wherein, The method comprises: in response to receiving a message receipt information broadcasted by the target terminal device, determining that the second pending message has been sent to the target terminal device by other gateway devices belonging to the same logical gateway as the target gateway device; and discarding the restored message.

6. The method of claim 5, wherein, The method further comprises: in a case where the detection result indicates that the second pending message comes from a non-message tunnel of the communication link, sending the second pending message to other logical gateways of the virtual private network architecture by using the message tunnel of the virtual private network architecture.

7. The method of claim 1, wherein, The method further comprises: in a case where it is determined that the logical gateway to which the target gateway device belongs does not exist a forwarding table item corresponding to the target receiving address, sending the first pending message to an external gateway device in the virtual private network architecture by using an external link, wherein the external link is a non-peer-to-peer link in communication with the target gateway device. 8.An electronic device comprising: one or more processors; a memory for storing one or more computer programs, characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Message processing method and device

    CN113852572A

  • Message forwarding method, device and system

    CN115333896A