Data transmission method and device based on cloud gateway
By obtaining the maximum transmission unit value of the network in the cloud gateway and adjusting the message length according to this value, the packet loss problem caused by MTU mismatch in the cloud network is solved, and the stability and reliability of the network are improved.
Patent Information
- Application Number
- CN202411772971.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-18
AI Technical Summary
The packet loss problem in the cloud network due to mismatch of the maximum transmission unit (MTU) value, especially in communication between the cloud-based devices and the public network link.
By obtaining the maximum transmission unit values of the first network and the second network in the cloud gateway, if the length of the first message exceeds the second maximum transmission unit value, the message is discarded and the target unreachable message and the second maximum transmission unit value are replied to the sending end. The sender modifies the length of the packet based on this information and resends it.
It ensures that the messages sent by the network with a larger transmission unit are not lost, and improves the stability and reliability of the network.
Smart Images

Figure CN119854228A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network technology, and in particular to a data transmission method and device based on a cloud gateway. Background Art
[0002] A common problem in cloud networks is packet loss due to MTU (Maximum Transmission Unit). The main reason for MTU packet loss is that the packets sent from the sender are forwarded by devices in the forwarding path, but when forwarded to a certain device, the packets are discarded because they exceed the MTU value of the current device. For example, in cloud networks, the MTU value on the devices in the cloud is generally set to 9000, while the MTU value in the public network link is generally 1500. When jumbo frames are enabled on the virtual machines in the cloud and the MTU is configured to be greater than 1500, the packets sent by the virtual machines to the public network exceed the maximum MTU value in the public network link and will be discarded in the public network. Secondly, in the scenario where the cloud gateway is connected to the public network through a tunnel, even if the virtual machine sends a message according to MTU1500, the original message from the virtual machine is encapsulated with the tunnel underlay (underlying network) information by OVS (Open vSwitch), and the message length is greater than 1500. In this case, when this message is forwarded to the public network, it will be lost because the MTU exceeds the maximum MTU of the public network link. Summary of the invention
[0003] In view of the above problems, a cloud gateway-based data transmission method and device is proposed to overcome the above problems or at least partially solve the above problems, including:
[0004] A data transmission method based on a cloud gateway, characterized in that it is applied to a cloud gateway, the cloud gateway is used for communication between a first network and a second network, and the method includes:
[0005] Obtain a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network; wherein the first maximum transmission unit value is greater than the second maximum transmission unit value;
[0006] Receiving a first message sent by a first sending end in the first network;
[0007] When the length of the first message is greater than the second maximum transmission unit value, discard the first message and reply to the first sending end with a target unreachable message and the second maximum transmission unit value;
[0008] Receive a second message sent by the first sending end, and forward it to a second receiving end in the second network; wherein, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the message maximum segment size according to the second maximum transmission unit value.
[0009] Optionally, the method comprises:
[0010] receiving a plurality of fragment messages sent by the second sending end in the second network, and verifying whether the plurality of fragment messages contain target information;
[0011] In the case where the multiple fragment messages do not contain target information, forwarding the multiple fragment messages to a reassembly gateway; wherein the reassembly gateway is used to reassemble the multiple fragment messages and re-fragment to obtain multiple target fragment messages;
[0012] The multiple target fragment messages returned by the reorganization gateway are received, and forwarded to a first receiving end in the first network.
[0013] Optionally, the receiving a second message sent by the first sending end, and forwarding it to a second receiving end in the second network includes:
[0014] A second message generated by a data packet corresponding to the first message and sent by the first sending end is received, and the second message is forwarded to a second receiving end in the second network.
[0015] Optionally, the first network is a cloud network, the second network is the Internet, and the receiving a plurality of fragment messages sent by a second sending end in the second network, and verifying whether the plurality of fragment messages contain target information, includes:
[0016] Receive multiple underlying network fragment messages sent by the second sending end in the Internet, and verify whether the multiple underlying network fragment messages contain overlay network information.
[0017] Optionally, when the multiple fragment messages do not include target information, forwarding the multiple fragment messages to a reassembly gateway includes:
[0018] When the multiple underlying network fragment messages do not contain overlay network information, the multiple underlying network fragment messages are forwarded to a reorganization gateway; wherein the reorganization gateway is used to reorganize the multiple underlying network fragment messages, and perform overlay network fragmentation on the reorganized messages to obtain multiple overlay network fragment messages.
[0019] Optionally, the receiving the multiple target fragment messages returned by the reorganization gateway and forwarding them to a first receiving end in the first network includes:
[0020] The multiple overlay network fragment messages returned by the reorganization gateway are received, and forwarded to a first receiving end in the cloud network.
[0021] Optionally, the reorganization gateway is a gateway of x86 architecture.
[0022] A data transmission device based on a cloud gateway, applied to a cloud gateway, wherein the cloud gateway is used for communication between a first network and a second network, and the device comprises:
[0023] A maximum unit value acquisition module, used to acquire a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network; wherein the first maximum transmission unit value is greater than the second maximum transmission unit value;
[0024] A message receiving module, used to receive a first message sent by a first sending end in the first network;
[0025] A feedback module, configured to discard the first message and reply to the first sending end with a target unreachable message and the second maximum transmission unit value when the length of the first message is greater than the second maximum transmission unit value;
[0026] A forwarding module is used to receive a second message sent by the first sending end and forward it to a second receiving end in the second network; wherein, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the maximum segment size of the message according to the second maximum transmission unit value.
[0027] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above-mentioned cloud gateway-based data transmission method when executed by the processor.
[0028] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the cloud gateway-based data transmission method as described above is implemented.
[0029] The embodiments of the present invention have the following advantages:
[0030] In an embodiment of the present invention, by obtaining a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network, the first maximum transmission unit value is greater than the second maximum transmission unit value, a first message sent by a first sending end in the first network is received, and when the length of the first message is greater than the second maximum transmission unit value, the first message is discarded, and a target unreachable message and the second maximum transmission unit value are replied to the first sending end, a second message sent by the first sending end is received, and forwarded to a second receiving end in the second network, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the maximum segment size of the message according to the second maximum transmission unit value, so that the sending end is prompted to modify the maximum transmission unit value or the maximum segment size of the message by replying to the target unreachable message and the maximum transmission unit value, and sending the message after the modification, so as to ensure that the message sent from the network with a larger maximum transmission unit will not be lost, thereby increasing the stability and reliability of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0032] Figure 1 is a flowchart of a data transmission method based on a cloud gateway provided by some embodiments of the present invention;
[0033] Figure 2 is a flowchart of the steps of a data transmission method in a cloud gateway provided by some embodiments of the present invention;
[0034] Figure 3 is a flowchart of another method for data transmission based on a cloud gateway provided by some embodiments of the present invention;
[0035] Figure 4 It is a structural block diagram of a cloud gateway-based data transmission device provided in some embodiments of the present invention. DETAILED DESCRIPTION
[0036] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] Reference Figure 1 , shows a flow chart of the steps of a data transmission method based on a cloud gateway provided in some embodiments of the present invention, the method can be applied to a cloud gateway, the cloud gateway is used for communication between a first network and a second network, and specifically may include the following steps:
[0038] Step 101: Obtain a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network; wherein the first maximum transmission unit value is greater than the second maximum transmission unit value.
[0039] When the cloud gateway forwards a message, it can obtain a first MTU value corresponding to the first network sending the message, that is, the first maximum transmission unit, and a second MTU value corresponding to the second network of the recipient, that is, the second maximum transmission unit.
[0040] The MTU value is a concept of the data link layer, which refers to the maximum size of a data frame that is allowed to pass or be forwarded at one time on the link layer during Ethernet data communication.
[0041] Step 102: Receive a first message sent by a first sending end in the first network.
[0042] The cloud gateway may receive a first message sent by a first sending end in the first network.
[0043] Specifically, the first network may be a cloud network, and the second network may be a public network, namely the Internet. The virtual machine in the cloud network (ie, the first sending end) may encapsulate the message through OVS and send it to the cloud gateway.
[0044] Step 103: When the length of the first message is greater than the second maximum transmission unit value, the first message is discarded, and a target unreachable message and the second maximum transmission unit value are replied to the first sending end.
[0045] Since the first MTU value in the first network is greater than the second MTU value in the second network, the length of the message sent by the first sender in the first network may exceed the second MTU value. When the length of the first message is greater than the second maximum transmission unit, the first message is discarded and a target unreachable message and the second maximum transmission unit are replied to the first sender, so as to prompt the first sender in the first network to modify the first maximum transmission unit value or the maximum segment size of the message.
[0046] In practical applications, such as Figure 2As shown in the figure, the hardware gateway is the cloud gateway, and the VM (Virtual Machine) in the cloud network (i.e., the first network), that is, the first sending end, sends a message according to the MTU value of 1500. However, after the original message from the virtual machine is encapsulated by OVS and the underlay (bottom layer network) information of the tunnel, that is, the underlying network related information, the length of the message is greater than 1500, and the maximum MTU value in the public network (i.e., the second network, which can be the Internet) link is generally 1500. Therefore, when such a message is forwarded to the hardware cloud gateway, the hardware cloud gateway determines that the message length is greater than the maximum MTU value of the message destination path (i.e., the path in the second network). At this time, the current message will be discarded, and the back pressure source of the PMTU (Path MTU Discovery) message is sent to the virtual machine in the cloud network to modify the MTU value or to modify the MSS (Maximum Bytes Segment) of the TCP (Transmission Control Protocol) message. Segment Size, maximum segment size) value (that is, the maximum segment size of the message).
[0047] Step 104, receive a second message sent by the first sending end, and forward it to a second receiving end in the second network; wherein, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the maximum segment size of the message according to the second maximum transmission unit value.
[0048] Specifically, after the first sending end in the first network modifies the first MTU value or the maximum segment size of the message, the first sending end in the first network can send a second message to the cloud gateway. The second message can be a message generated by the first sending end after modifying the first MTU value or the MSS value of the TCP message according to the second MTU value. It can be transmitted normally in the second network, and the cloud gateway forwards the second message to the second receiving end in the second network.
[0049] In some embodiments of the present invention, the receiving a second message sent by the first sending end and forwarding it to a second receiving end in the second network includes:
[0050] A second message generated by a data packet corresponding to the first message and sent by the first sending end is received, and the second message is forwarded to a second receiving end in the second network.
[0051] When the first message is longer than the second MTU value, it will be discarded by the cloud gateway, which also causes packet loss. Therefore, the first sending end in the first network will resend the data packet corresponding to the first message, and generate a message generated by the first sending end according to the second MTU value, by modifying the first MTU value or the MSS value of the TCP message, and send it to the cloud gateway, and then the cloud gateway forwards the message to the second receiving end in the second network.
[0052] The above method ensures that the message sent by the first sending end in the first network before modifying the first MTU value or the MSS value of the TCP message will not be lost, and also ensures that the message sent by the first sending end after the modification will not be lost, thereby increasing the stability of the network.
[0053] In an embodiment of the present invention, by obtaining a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network, the first maximum transmission unit value is greater than the second maximum transmission unit value, a first message sent by a first sending end in the first network is received, and when the length of the first message is greater than the second maximum transmission unit value, the first message is discarded, and a target unreachable message and the second maximum transmission unit value are replied to the first sending end, a second message sent by the first sending end is received, and forwarded to a second receiving end in the second network, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the maximum segment size of the message according to the second maximum transmission unit value, so that the sending end is prompted to modify the maximum transmission unit value or the maximum segment size of the message by replying to the target unreachable message and the maximum transmission unit value, and sending the message after the modification, so as to ensure that the message sent from the network with a larger maximum transmission unit will not be lost, thereby increasing the stability and reliability of the network.
[0054] In actual applications, if only the MTU in the cloud network is adjusted, the application layer message size is not modified, resulting in message fragmentation. However, the fragmented messages may not be forwarded at some network nodes and are discarded. For example, in a scenario where the cloud gateway is connected to the public network through a tunnel, if an underlay fragmented message reaches the cloud gateway, the hardware cloud gateway cannot obtain the overlay (coverage network) information and cannot look up the table entry, resulting in message discard.
[0055] In one embodiment of the present invention, when the cloud gateway receives a fragmented message from the underlay and cannot obtain the overlay information, it does not directly discard the message, but forwards the message to a specific x86 gateway. The x86 gateway first reassembles the fragmented message, then overlays the message, and finally forwards it to the cloud gateway, so that the cloud gateway can forward it correctly.
[0056] Reference Figure 3 , shows a flowchart of another method for data transmission based on a cloud gateway provided in some embodiments of the present invention, which may specifically include the following steps:
[0057] Step 301: receive a plurality of fragment messages sent by a second sending end in the second network, and verify whether the plurality of fragment messages contain target information.
[0058] When the second sending end in the second network wants to send a message to the first receiving end in the first network, it also needs to be forwarded by the cloud gateway. The cloud gateway can receive multiple fragmented messages sent by the second sending end in the second network and verify whether the multiple fragmented messages contain target information.
[0059] In some embodiments of the present invention, the first network is a cloud network, the second network is the Internet, and the receiving a plurality of fragment messages sent by a second sender in the second network and verifying whether the plurality of fragment messages contain target information includes:
[0060] Receive multiple underlying network fragment messages sent by the second sending end in the Internet, and verify whether the multiple underlying network fragment messages contain overlay network information.
[0061] Specifically, the first network may be a cloud network, and the second network may be the Internet. The cloud gateway receives multiple underlay fragment messages (i.e., underlying network fragment messages) sent by a second sender in the Internet, and may verify whether the multiple underlay fragment messages contain overlay information (i.e., information related to the overlay network).
[0062] In practical applications, such as Figure 2 As shown, when the hardware gateway, i.e., the cloud gateway, receives multiple underlay fragment messages sent by the second sender in the public network (i.e., the Internet), it can try to obtain the overlay information in the multiple underlay fragment messages, i.e., verify whether the multiple underlay fragment messages contain overlay information.
[0063] It should be noted that among multiple underlay fragment messages, only the first underlay fragment message contains overlay information, while the subsequent underlay fragment messages do not contain overlay information. Therefore, when the cloud gateway forwards the subsequent underlay fragment messages, it will cause packet loss because it cannot obtain overlay information.
[0064] Step 302, when the multiple fragment messages do not contain target information, forward the multiple fragment messages to a reassembly gateway; wherein the reassembly gateway is used to reassemble the multiple fragment messages and re-segment to obtain multiple target fragment messages.
[0065] When the cloud gateway cannot obtain the target information, that is, when multiple fragment messages do not contain the target information, the cloud gateway can forward the multiple fragment messages to the reassembly gateway, and the reassembly gateway can reassemble the multiple fragment messages and re-fragment them to obtain multiple target fragment messages.
[0066] In some embodiments of the present invention, the reorganization gateway is a gateway of x86 architecture, that is, an x86 gateway.
[0067] In some embodiments of the present invention, when the multiple fragment messages do not include target information, forwarding the multiple fragment messages to the reassembly gateway includes:
[0068] When the multiple underlying network fragment messages do not contain overlay network information, the multiple underlying network fragment messages are forwarded to a reorganization gateway; wherein the reorganization gateway is used to reorganize the multiple underlying network fragment messages, and perform overlay network fragmentation on the reorganized messages to obtain multiple overlay network fragment messages.
[0069] When the cloud gateway cannot obtain the overlay network information from multiple underlying network fragment messages, the multiple underlying network fragment messages can be forwarded to the reassembly gateway, and then the reassembly gateway can reassemble the multiple underlying network fragment messages and perform overlay network fragmentation on the reassembled messages, so as to obtain multiple overlay network fragment messages.
[0070] Specifically, Figure 2 As shown, when the cloud gateway cannot obtain overlay information from multiple underlay fragment messages, the multiple underlay fragment messages can be forwarded to the x86 gateway, and then the multiple underlay fragment messages are reassembled by the x86 gateway, and the reassembled messages are overlay fragmented to obtain multiple overlay fragment messages, and the multiple overlay fragment messages are returned to the cloud gateway.
[0071] Step 303: Receive the multiple target fragment messages returned by the reorganization gateway, and forward them to the first receiving end in the first network.
[0072] The cloud gateway receives multiple target fragment messages returned by the reassembly gateway, the multiple target fragment messages including target information, and forwards the multiple target fragment messages to a first receiving end in the first network.
[0073] In some embodiments of the present invention, the receiving the multiple target fragment messages returned by the reorganization gateway and forwarding them to the first receiving end in the first network includes:
[0074] The multiple overlay network fragment messages returned by the reorganization gateway are received, and forwarded to a first receiving end in the cloud network.
[0075] Specifically, the cloud gateway receives multiple overlay fragment messages returned by x86, and the multiple overlay fragment message information includes target information. Therefore, the cloud gateway can perform normal forwarding and forward the multiple overlay fragment messages to the first receiving end in the cloud network.
[0076] In an embodiment of the present invention, multiple fragment messages sent by the second sending end in the second network are received, and it is verified whether the multiple fragment messages contain target information. When the multiple fragment messages do not contain target information, the multiple fragment messages are forwarded to a reorganization gateway, and the reorganization gateway is used to reorganize the multiple fragment messages and re-slice to obtain multiple target fragment messages, receive the multiple target fragment messages returned by the reorganization gateway, and forward them to the first receiving end in the first network, so as to forward the message to the reorganization gateway, reorganize the multiple fragment messages through the reorganization gateway, and then re-slice them, so that the cloud gateway can receive the multiple target fragment messages returned by the reorganization gateway and forward them normally, thereby ensuring no packet loss and increasing the stability and reliability of the network.
[0077] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0078] Reference Figure 4 , shows a schematic diagram of the structure of a data transmission device based on a cloud gateway provided in some embodiments of the present invention, the device can be applied to a cloud gateway, the cloud gateway is used for communication between a first network and a second network, and specifically may include the following modules:
[0079] A maximum unit value acquisition module 401 is used to acquire a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network; wherein the first maximum transmission unit value is greater than the second maximum transmission unit value;
[0080] The message receiving module 402 is used to receive a first message sent by a first sending end in the first network;
[0081] A feedback module 403 is configured to discard the first message and reply to the first sending end with a target unreachable message and the second maximum transmission unit value when the length of the first message is greater than the second maximum transmission unit value;
[0082] The forwarding module 404 is used to receive a second message sent by the first sending end and forward it to a second receiving end in the second network; wherein the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the maximum segment size of the message according to the second maximum transmission unit value.
[0083] In one embodiment of the present invention, the method comprises:
[0084] a target information detection module, configured to receive a plurality of fragment messages sent by the second sending end in the second network, and verify whether the plurality of fragment messages contain target information;
[0085] A reassembly gateway forwarding module, used for forwarding the multiple fragment messages to the reassembly gateway when the multiple fragment messages do not contain target information; wherein the reassembly gateway is used for reassembling the multiple fragment messages and re-fragmenting to obtain multiple target fragment messages;
[0086] The target fragment message forwarding module is used to receive the multiple target fragment messages returned by the reorganization gateway and forward them to the first receiving end in the first network.
[0087] In one embodiment of the present invention, the forwarding module 404 includes:
[0088] The forwarding submodule is used to receive a second message generated by a data packet corresponding to the first message and sent by the first sending end, and forward it to a second receiving end in the second network.
[0089] In one embodiment of the present invention, the first network is a cloud network, the second network is the Internet, and the target information detection module includes:
[0090] The overlay network information detection module is used to receive a plurality of underlying network fragment messages sent by the second sending end in the Internet, and verify whether the plurality of underlying network fragment messages contain overlay network information.
[0091] In one embodiment of the present invention, the reorganization gateway forwarding module includes:
[0092] The reorganization gateway forwarding submodule is used to forward the multiple underlying network fragment messages to the reorganization gateway when the multiple underlying network fragment messages do not contain overlay network information; wherein the reorganization gateway is used to reorganize the multiple underlying network fragment messages and perform overlay network fragmentation on the reorganized messages to obtain multiple overlay network fragment messages.
[0093] In one embodiment of the present invention, the target fragment message forwarding module includes:
[0094] The overlay network fragment message forwarding submodule is used to receive the multiple overlay network fragment messages returned by the reorganization gateway and forward them to the first receiving end in the cloud network.
[0095] In an embodiment of the present invention, the reorganization gateway is a gateway of x86 architecture.
[0096] In an embodiment of the present invention, by obtaining a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network, the first maximum transmission unit value is greater than the second maximum transmission unit value, a first message sent by a first sending end in the first network is received, and when the length of the first message is greater than the second maximum transmission unit value, the first message is discarded, and a target unreachable message and the second maximum transmission unit value are replied to the first sending end, a second message sent by the first sending end is received, and forwarded to a second receiving end in the second network, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the maximum segment size of the message according to the second maximum transmission unit value, so that the sending end is prompted to modify the maximum transmission unit value or the maximum segment size of the message by replying to the target unreachable message and the maximum transmission unit value, and sending the message after the modification, so as to ensure that the message sent from the network with a larger maximum transmission unit will not be lost, thereby increasing the stability and reliability of the network.
[0097] Some embodiments of the present invention further provide an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the above method is implemented when the computer program is executed by the processor.
[0098] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and the computer program implements the above method when executed by a processor.
[0099] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above method when executed by a processor.
[0100] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0101] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0102] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0103] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0104] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0107] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0108] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.
[0109] The above is a detailed introduction to a data transmission method and device based on a cloud gateway. In this article, specific examples are used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A data transmission method based on a cloud gateway, characterized in that: Applied to a cloud gateway, the cloud gateway is used for communication between a first network and a second network, the method comprising: Obtaining a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network; wherein the first maximum transmission unit value is greater than the second maximum transmission unit value; Receiving a first message sent by a first sending end in the first network; When the length of the first message is greater than the second maximum transmission unit value, discard the first message and reply to the first sending end with a target unreachable message and the second maximum transmission unit value; Receive a second message sent by the first sending end, and forward it to a second receiving end in the second network; wherein, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the message maximum segment size according to the second maximum transmission unit value.
2. The method according to claim 1, characterized in that The method comprises: receiving a plurality of fragment messages sent by the second sending end in the second network, and verifying whether the plurality of fragment messages contain target information; In the case where the multiple fragment messages do not contain target information, forwarding the multiple fragment messages to a reassembly gateway; wherein the reassembly gateway is used to reassemble the multiple fragment messages and re-fragment to obtain multiple target fragment messages; The multiple target fragment messages returned by the reorganization gateway are received, and forwarded to a first receiving end in the first network.
3. The method according to any one of claims 1 to 2, characterized in that: The receiving a second message sent by the first sending end and forwarding it to a second receiving end in the second network includes: A second message generated by a data packet corresponding to the first message and sent by the first sending end is received, and the second message is forwarded to a second receiving end in the second network.
4. The method according to claim 2, characterized in that: The first network is a cloud network, the second network is the Internet, and the receiving of a plurality of fragment messages sent by a second sending end in the second network, and verifying whether the plurality of fragment messages contain target information, includes: Receive multiple underlying network fragment messages sent by the second sending end in the Internet, and verify whether the multiple underlying network fragment messages contain overlay network information.
5. The method according to claim 4, characterized in that When the plurality of fragment messages do not include target information, forwarding the plurality of fragment messages to a reassembly gateway includes: When the multiple underlying network fragment messages do not contain overlay network information, the multiple underlying network fragment messages are forwarded to a reorganization gateway; wherein the reorganization gateway is used to reorganize the multiple underlying network fragment messages, and perform overlay network fragmentation on the reorganized messages to obtain multiple overlay network fragment messages.
6. The method according to claim 5, characterized in that The receiving the multiple target fragment messages returned by the reorganization gateway and forwarding them to the first receiving end in the first network includes: The multiple overlay network fragment messages returned by the reorganization gateway are received, and forwarded to a first receiving end in the cloud network.
7. The method according to claim 2, characterized in that The reorganization gateway is a gateway of x86 architecture.
8. A data transmission device based on a cloud gateway, characterized in that: Applied to a cloud gateway, the cloud gateway is used for communication between a first network and a second network, the device comprising: A maximum unit value acquisition module, used to acquire a first maximum transmission unit value of the first network and a second maximum transmission unit value of the second network; wherein the first maximum transmission unit value is greater than the second maximum transmission unit value; A message receiving module, used to receive a first message sent by a first sending end in the first network; A feedback module, configured to discard the first message and reply to the first sending end with a target unreachable message and the second maximum transmission unit value when the length of the first message is greater than the second maximum transmission unit value; A forwarding module is used to receive a second message sent by the first sending end and forward it to a second receiving end in the second network; wherein, the second message is a message generated by the first sending end after modifying the first maximum transmission unit value or the maximum segment size of the message according to the second maximum transmission unit value.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the cloud gateway-based data transmission method according to any one of claims 1 to 7 is implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the cloud gateway-based data transmission method according to any one of claims 1 to 7 is implemented.