Traffic sharing method and device, computer equipment and storage medium

By realizing the traffic sharing method between the main device and the standby device in the cloud computing network, the problem of failure of the gateway device due to processing large amounts of data transmission is solved, and efficient traffic shunt and processing efficiency are improved.

CN119583474AActive Publication Date: 2025-03-07CHINA TELECOM CLOUD TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411786896.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-07
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

In cloud computing network virtualization technology, gateway devices are prone to failure due to excessive transmissions when processing large amounts of data transmissions, and cannot effectively share traffic.

Method used

By implementing a traffic sharing method between the main device and the standby device, in response to the traffic data sent by the virtual private cloud subnet, its source IP address is determined, and based on the address, whether to transmit the data to the standby device. If transmission to the backup device is not required, the source IP address is converted to a public IP address and data is sent out through the public network.

Benefits of technology

This method can make full use of the processing of the backup device to share traffic data without any failures, and only one public IP address is required on the public network side to realize traffic shunt, improving processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583474A_ABST
    Figure CN119583474A_ABST
Patent Text Reader

Abstract

The invention relates to a traffic sharing method and device, computer equipment and a storage medium. The method comprises the following steps: in response to first flow data sent by a subnet under a virtual private cloud, determining a source internet protocol address IP address of the subnet corresponding to the first flow data; determining whether the first flow data needs to be transmitted to the standby device according to the source IP address of the subnet; under the condition that the first traffic data does not need to be transmitted to the standby device, converting a source IP address of a sub-network in the first traffic data into a source IP address of a public network so as to update the first traffic data; and based on the source IP address of the public network, transmitting the updated first flow data through the public network. By adopting the method, the standby equipment can be fully utilized to share the processing of the flow data under the condition that the standby equipment has no fault, and meanwhile, only one public network IP address is needed on the public network side to realize flow shunting, so that the processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a traffic sharing method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of cloud computing network virtualization technology, gateway devices have emerged. The gateway devices are usually used to convert data sent from cloud devices from subnets into data acceptable to the public network and send the data from the public network.

[0003] Although this method can complete the external transmission of data, when there is a lot of data that needs to be sent out in the subnet, or when there are multiple subnets that need to send data out at the same time, the gateway device will usually cause device failure due to the large number of transmissions. Summary of the invention

[0004] Based on this, it is necessary to provide a traffic sharing method, device, computer equipment and storage medium that can ensure the normal use of the equipment in response to the above technical problems.

[0005] In a first aspect, the present application provides a traffic sharing method, which is applied to a master device, including:

[0006] In response to first flow data sent by a subnet under the virtual private cloud, determine a source Internet Protocol address IP address of a subnet corresponding to the first flow data;

[0007] Determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet;

[0008] When the first flow data does not need to be transmitted to the backup device, converting the source IP address of the subnet in the first flow data into the source IP address of the public network to update the first flow data;

[0009] Based on the source IP address of the public network, the updated first flow data is sent out through the public network.

[0010] In one embodiment, determining whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet includes:

[0011] Determine whether the interface identifier in the source IP address of the subnet is an odd number;

[0012] When the interface identifier in the source IP address of the subnet is an odd number, it is determined that the first flow data needs to be transmitted to the backup device.

[0013] In one embodiment, converting the source IP address of the subnet in the first traffic data into the source IP address of the public network includes:

[0014] Performing a security test on the first flow data to obtain a test result;

[0015] When the detection result is passed, the source IP address of the subnet corresponding to the first flow data is converted into a source IP address of the public network.

[0016] In one embodiment, the method further comprises:

[0017] In the case where the first flow data needs to be transmitted to the standby device, the first flow data is sent to the standby device, so that the standby device converts the source IP address of the subnet corresponding to the first flow data into the source IP address of the standby device, thereby obtaining the second flow data;

[0018] When receiving the second flow data fed back by the backup device, the source IP address in the second flow data is converted into the source IP address of the public network to update the second flow data; based on the source IP address of the public network, the updated second flow data is sent out through the public network.

[0019] In a second aspect, the present application provides a traffic sharing method, which is applied to a backup device, including:

[0020] In response to the first flow data sent by the master device, the source IP address of the subnet corresponding to the first flow data is converted into the source IP address of the standby device to obtain the second flow data; wherein the first flow data is the first flow data sent by the master device in response to the subnet under the virtual private cloud, and the sending is controlled according to the source IP address of the subnet corresponding to the first flow data;

[0021] The second flow data is transmitted to the main device through the preset routing configuration, so that the main device can convert the source IP address in the second flow data into the source IP address of the public network and send the second flow data through the public network.

[0022] In one embodiment, converting the source IP address of the subnet corresponding to the flow data into the source IP address of the backup device to obtain the second flow data includes:

[0023] Performing a security test on the first flow data to obtain a test result;

[0024] When the detection result is passed, the source IP address of the subnet corresponding to the first flow data is converted into the source IP address of the backup device to obtain the second flow data.

[0025] In a third aspect, the present application further provides a traffic sharing device, which is applied to a master device, including:

[0026] An address determination module, configured to determine, in response to first flow data sent by a subnet under the virtual private cloud, a source Internet Protocol address IP address of a subnet corresponding to the first flow data;

[0027] A transmission judgment module, used to determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet;

[0028] An address updating module, used for converting the source IP address of the subnet in the first flow data into the source IP address of the public network to update the first flow data when the first flow data does not need to be transmitted to the backup device;

[0029] The data outbound module is used to outbound the updated first flow data through the public network based on the source IP address of the public network.

[0030] In a fourth aspect, the present application further provides a traffic sharing device, which is applied to a backup device, including:

[0031] A data receiving module is used to respond to the first flow data sent by the master device, convert the source IP address of the subnet corresponding to the first flow data into the source IP address of the backup device, and obtain the second flow data; wherein the first flow data is the first flow data sent by the master device in response to the subnet under the virtual private cloud, and the sending is controlled according to the source IP address of the subnet corresponding to the first flow data;

[0032] The data transmission module is used to transmit the second flow data to the main device through a preset routing configuration, so that the main device can convert the source IP address in the second flow data into the source IP address of the public network and send the second flow data through the public network.

[0033] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0034] In response to first flow data sent by a subnet under the virtual private cloud, determine a source Internet Protocol address IP address of a subnet corresponding to the first flow data;

[0035] Determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet;

[0036] When the first flow data does not need to be transmitted to the backup device, converting the source IP address of the subnet in the first flow data into the source IP address of the public network to update the first flow data;

[0037] Based on the source IP address of the public network, the updated first flow data is sent out through the public network.

[0038] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0039] In response to first flow data sent by a subnet under the virtual private cloud, determine a source Internet Protocol address IP address of a subnet corresponding to the first flow data;

[0040] Determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet;

[0041] When the first flow data does not need to be transmitted to the backup device, converting the source IP address of the subnet in the first flow data into the source IP address of the public network to update the first flow data;

[0042] Based on the source IP address of the public network, the updated first flow data is sent out through the public network.

[0043] In a seventh aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0044] In response to first flow data sent by a subnet under the virtual private cloud, determine a source Internet Protocol address IP address of a subnet corresponding to the first flow data;

[0045] Determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet;

[0046] When the first flow data does not need to be transmitted to the backup device, converting the source IP address of the subnet in the first flow data into the source IP address of the public network to update the first flow data;

[0047] Based on the source IP address of the public network, the updated first flow data is sent out through the public network.

[0048] The above-mentioned traffic sharing method, device, computer equipment and storage medium, in response to the first traffic data sent by the subnet under the virtual private cloud, determine the source Internet Protocol address IP address of the subnet corresponding to the first traffic data; determine whether the first traffic data needs to be transmitted to the backup device according to the source IP address of the subnet; if the first traffic data does not need to be transmitted to the backup device, convert the source IP address of the subnet in the first traffic data to the source IP address of the public network to update the first traffic data; based on the source IP address of the public network, send the updated first traffic data through the public network. This embodiment can make full use of the backup device to share the processing of traffic data when there is no failure in the backup device, and at the same time, only one public IP address is needed on the public network side to achieve traffic diversion, thereby improving processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A diagram of an application environment of a traffic sharing method provided in this embodiment;

[0051] Figure 2 A schematic diagram of the flow of the first traffic sharing method provided in this embodiment;

[0052] Figure 3 A schematic diagram of a flow chart of a second traffic sharing method provided in this embodiment;

[0053] Figure 4 A structural block diagram of the first traffic sharing device provided in this embodiment;

[0054] Figure 5 A structural block diagram of a second traffic sharing device provided in this embodiment;

[0055] Figure 6 This is a diagram of the internal structure of a computer device provided in this embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] The traffic sharing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in the figure. The main device 100 responds to the first flow data sent by the subnet under the virtual private cloud, determines the source Internet Protocol address IP address of the subnet corresponding to the first flow data; determines whether the first flow data needs to be transmitted to the backup device 101 according to the source IP address of the subnet; if the first flow data does not need to be transmitted to the backup device 101, converts the source IP address of the subnet in the first flow data into the source IP address of the public network to update the first flow data; based on the source IP address of the public network, sends the updated first flow data through the public network.

[0058] In an exemplary embodiment, Figure 2 As shown, a traffic sharing method is provided, which is applied to Figure 1 The main device 100 in FIG. 1 is taken as an example to illustrate the method, which includes the following steps 201 to 204. Among them:

[0059] Step 201, in response to first flow data sent by a subnet under a virtual private cloud, determine a source Internet Protocol address IP address of a subnet corresponding to the first flow data.

[0060] Specifically, the master device adds a rule to obtain first flow data sent by all subnets under the virtual private cloud, and determines a source Internet Protocol Address (IP) IP address of the subnet corresponding to the first flow data.

[0061] Step 202: Determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet.

[0062] In one of the embodiments, the parity of the IP address is marked according to the source IP address of the subnet; it is determined whether the mark corresponding to the source IP address of the subnet is an odd number or an even number. If it is an odd number, it is determined that the first flow data needs to be transmitted to the backup device; if it is an even number, it is determined that the first flow data does not need to be transmitted to the backup device.

[0063] In another embodiment, determining whether the first flow data needs to be transmitted to the backup device is performed based on the source IP address of the subnet, including: determining whether the interface identifier in the source IP address of the subnet is an odd number; when the interface identifier in the source IP address of the subnet is an odd number, determining that the first flow data needs to be transmitted to the backup device; when the interface identifier in the source IP address of the subnet is an even number, determining that the first flow data does not need to be transmitted to the backup device.

[0064] Step 203, when the first flow data does not need to be transmitted to the backup device, the source IP address of the subnet in the first flow data is converted into the source IP address of the public network to update the first flow data.

[0065] In one of the embodiments, when the first flow data does not need to be transmitted to the backup device, the source IP address of the subnet corresponding to the five-tuple in the first flow data is converted into the source IP address of the public network through source network address translation (SNAT), and the first flow data is updated.

[0066] In another embodiment, a security check is performed on the first flow data to obtain a check result; when the check result is passed, the source IP address of the subnet corresponding to the first flow data is converted into a source IP address of the public network.

[0067] Specifically, a security check (such as virus protection, intrusion prevention, etc.) is performed on the first flow data to obtain a test result; when the test result is passed, the source IP address of the subnet corresponding to the first flow data in the quintuple is converted into a source IP address of the public network through source network address translation.

[0068] It should be noted that this embodiment also includes: when the first flow data needs to be transmitted to the backup device, the first flow data is sent to the backup device, so that the backup device converts the source IP address of the subnet corresponding to the first flow data into the source IP address of the backup device to obtain the second flow data; when the second flow data is fed back by the backup device, the source IP address in the second flow data is converted into the source IP address of the public network to update the second flow data; based on the source IP address of the public network, the updated second flow data is sent out through the public network.

[0069] Specifically, when the first flow data needs to be transmitted to the backup device, the first flow data is sent to the backup device through the configured routing strategy; the backup device converts the source IP address of the subnet corresponding to the first flow data into the source IP address of the backup device to obtain the second flow data; the backup device sends the second flow data to the main device; when the main device receives the second flow data fed back by the backup device, the source IP address in the second flow data is converted into the source IP address of the public network, and the second flow data is updated; based on the source IP address of the public network, the main device sends the updated second flow data through the public network.

[0070] Step 204: Based on the source IP address of the public network, the updated first flow data is sent out through the public network.

[0071] For example, Figure 1 The blue arrow in the application environment diagram of the traffic sharing method shows that the IP1 port of the master device responds to the first traffic data sent by the subnet under the virtual private cloud, determines the source Internet Protocol address IP address of the subnet corresponding to the first traffic data, and determines whether the source IP address of the subnet is an odd number; when the interface identifier in the source IP address of the subnet is an even number, it is determined that the first traffic data does not need to be transmitted to the backup device, and the first traffic data is subjected to a security check to obtain a test result; when the test result is passed, the source IP address of the subnet corresponding to the first traffic data is converted to the source IP address of the public network; based on the source IP address of the public network, the updated first traffic data is sent to the public network through the IP3 port of the master device. When the interface identifier in the source IP address of the subnet is an odd number, the master device forwards the first traffic data whose source IP address of the subnet is an odd number to the IP2 port of the backup device through the IP1 port.

[0072] It should be noted that this embodiment also includes return data corresponding to the traffic data that went through the main device during the previous diversion. After the return data returns to the main device through the public network, the return data is further subjected to security checks. After the security check passes, the destination IP address in the five-tuple corresponding to the return data is converted into the destination IP address of the subnet, and then the return data is transmitted back to the corresponding subnet under the virtual private cloud.

[0073] The above-mentioned traffic sharing method, in response to the first traffic data sent by the subnet under the virtual private cloud, determines the source Internet Protocol address IP address of the subnet corresponding to the first traffic data; determines whether the first traffic data needs to be transmitted to the backup device according to the source IP address of the subnet; when the first traffic data does not need to be transmitted to the backup device, converts the source IP address of the subnet in the first traffic data to the source IP address of the public network to update the first traffic data; based on the source IP address of the public network, sends the updated first traffic data through the public network. This embodiment can make full use of the backup device to share the processing of traffic data when there is no failure in the backup device, and only one public IP address is needed on the public network side to achieve traffic diversion, thereby improving processing efficiency.

[0074] In an exemplary embodiment, Figure 3 As shown, a traffic sharing method is provided, which is applied to Figure 1 Taking the standby device 101 in the example as an example, the method includes the following steps 301 to 302. Among them:

[0075] Step 301, in response to first flow data sent by the master device, convert the source IP address of the subnet corresponding to the first flow data into the source IP address of the backup device to obtain second flow data.

[0076] The first flow data is sent by the master device in response to the first flow data sent by the subnet under the virtual private cloud, and is controlled to be sent according to the source IP address of the subnet corresponding to the first flow data;

[0077] In one of the embodiments, the backup device responds to the first flow data sent by the master device; at the egress conversion port, the source IP address of the subnet corresponding to the first flow data is converted into the source IP address of the backup device to obtain the second flow data.

[0078] In another embodiment, a security check is performed on the first flow data to obtain a test result; if the test result is passed, the source IP address of the subnet corresponding to the first flow data is converted into the source IP address of the backup device to obtain the second flow data.

[0079] Specifically, a security check (such as virus protection, intrusion prevention, etc.) is performed on the first flow data to obtain a test result; when the test result is through, the source IP address of the subnet corresponding to the first flow data in the quintuple is converted into the source IP address of the output port corresponding to the backup device through source network address translation to obtain the second flow data.

[0080] Step 302, transmit the second flow data to the main device through the preset routing configuration, so that the main device can convert the source IP address in the second flow data into the source IP address of the public network and send the second flow data through the public network.

[0081] Specifically, the backup device transmits the second flow data to the main device through a preset routing configuration; the main device converts the source IP address in the second flow data into a source IP address of the public network, and sends the second flow data through the public network.

[0082] For example, Figure 1 As shown in the application environment diagram of the traffic sharing method, the red arrow flows in the direction of the IP2 port of the backup device in response to the first traffic data sent by the IP1 port corresponding to the main device, and performs a security check on the first traffic data to obtain a check result; when the check result is through, the source IP address of the subnet corresponding to the first traffic data is converted into the source IP address of the IP4 port corresponding to the backup device to obtain the second traffic data; based on the preset routing configuration, the second traffic data is transmitted to the IP3 port of the main device through the IP4 port corresponding to the backup device; the IP3 port of the main device converts the source IP address in the second traffic data into the source IP address of the public network, and sends the second traffic data to the public network through the IP3 port of the main device.

[0083] It should be noted that this embodiment also includes the return data corresponding to the traffic data that went through the backup device during the previous diversion. After the return data returns to the IP3 port of the main device through the public network, the destination IP address in the five-tuple corresponding to the return data is converted to the destination IP address of the IP4 port corresponding to the backup device, and the return data is updated; the updated return data is forwarded to the IP4 port of the backup device through the IP3 port of the main device. After the IP4 port of the backup device receives the return data, it further performs a security check on the return data. After the security check passes, the destination IP address of the IP4 port corresponding to the backup device in the five-tuple corresponding to the return data is converted to the destination IP address of the subnet, and the return data is then transmitted back to the corresponding subnet under the virtual private cloud.

[0084] The above-mentioned traffic sharing method, in response to the first traffic data sent by the master device, converts the source IP address of the subnet corresponding to the first traffic data into the source IP address of the backup device to obtain the second traffic data; transmits the second traffic data to the master device through the preset routing configuration, so that the master device can convert the source IP address in the second traffic data into the source IP address of the public network, and send the second traffic data out through the public network. This embodiment can make full use of the backup device to share the processing of traffic data when there is no failure in the backup device, and at the same time, only one public IP address is needed on the public network side to realize traffic diversion, thereby improving processing efficiency.

[0085] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0086] Based on the same inventive concept, the embodiment of the present application also provides a traffic sharing device for implementing the traffic sharing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more traffic sharing device embodiments provided below can refer to the limitations on the traffic sharing method above, and will not be repeated here.

[0087] In an exemplary embodiment, Figure 4 As shown, a traffic sharing device is provided, comprising: an address determination module 10, a transmission judgment module 11, an address update module 12 and a data outgoing module 13, wherein:

[0088] An address determination module 10, configured to determine a source Internet Protocol address IP address of a subnet corresponding to the first flow data in response to the first flow data sent by the subnet under the virtual private cloud;

[0089] The transmission determination module 11 is used to determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet;

[0090] An address updating module 12, configured to convert a subnet source IP address in the first flow data into a public network source IP address to update the first flow data when the first flow data does not need to be transmitted to the backup device;

[0091] The data sending module 13 is used to send the updated first flow data outward through the public network based on the source IP address of the public network.

[0092] In one embodiment, the transmission judgment module 11 is also used to determine whether the interface identifier in the source IP address of the subnet is an odd number; when the interface identifier in the source IP address of the subnet is an odd number, it is determined that the first flow data needs to be transmitted to the backup device.

[0093] In one embodiment, the address update module 12 is further used to perform a security check on the first flow data to obtain a test result; when the test result is passed, the source IP address of the subnet corresponding to the first flow data is converted to a source IP address of the public network.

[0094] In one embodiment, the traffic sharing device is also used to send the first traffic data to the backup device when the first traffic data needs to be transmitted to the backup device, so that the backup device converts the source IP address of the subnet corresponding to the first traffic data into the source IP address of the backup device to obtain the second traffic data; when receiving the second traffic data fed back by the backup device, convert the source IP address in the second traffic data into the source IP address of the public network to update the second traffic data; based on the source IP address of the public network, send the updated second traffic data outward through the public network.

[0095] In an exemplary embodiment, Figure 4 As shown, a traffic sharing device is provided, comprising: a data receiving module 20 and a data transmission module 21, wherein:

[0096] The data receiving module 20 is used to respond to the first flow data sent by the master device, convert the source IP address of the subnet corresponding to the first flow data into the source IP address of the backup device, and obtain the second flow data; wherein the first flow data is the first flow data sent by the master device in response to the subnet under the virtual private cloud, and the sending is controlled according to the source IP address of the subnet corresponding to the first flow data;

[0097] The data transmission module 21 is used to transmit the second flow data to the main device through a preset routing configuration, so that the main device can convert the source IP address in the second flow data into the source IP address of the public network and send the second flow data through the public network.

[0098] In one embodiment, the data receiving module 20 is also used to perform a security check on the first flow data to obtain a test result; when the test result is passed, the source IP address of the subnet corresponding to the first flow data is converted into the source IP address of the backup device to obtain the second flow data.

[0099] Each module in the above-mentioned traffic sharing device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0100] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a traffic sharing method is implemented.

[0101] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0102] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0103] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0104] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0105] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) 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 relevant regulations.

[0106] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0107] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0108] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A traffic sharing method, characterized in that: Applied to a master device, the method comprises: In response to first flow data sent by a subnet under the virtual private cloud, determine a source Internet Protocol address IP address of a subnet corresponding to the first flow data; Determining whether the first flow data needs to be transmitted to a backup device according to the source IP address of the subnet; When the first flow data does not need to be transmitted to the backup device, converting the source IP address of the subnet in the first flow data into the source IP address of the public network to update the first flow data; Based on the source IP address of the public network, the updated first flow data is sent out through the public network.

2. The method according to claim 1, characterized in that The determining, according to the source IP address of the subnet, whether the first flow data needs to be transmitted to the backup device includes: Determine whether the interface identifier in the source IP address of the subnet is an odd number; When the interface identifier in the source IP address of the subnet is an odd number, it is determined that the first flow data needs to be transmitted to the backup device.

3. The method according to claim 1, characterized in that The converting the source IP address of the subnet in the first traffic data into the source IP address of the public network includes: Performing a security test on the first flow data to obtain a test result; When the detection result is passed, the source IP address of the subnet corresponding to the first traffic data is converted into a source IP address of the public network.

4. The method according to claim 1, characterized in that: The method further comprises: In the case where the first flow data needs to be transmitted to the standby device, the first flow data is sent to the standby device, so that the standby device converts the source IP address of the subnet corresponding to the first flow data into the source IP address of the standby device, to obtain the second flow data; When receiving the second flow data fed back by the backup device, the source IP address in the second flow data is converted into the source IP address of the public network to update the second flow data; based on the source IP address of the public network, the updated second flow data is sent out through the public network.

5. A traffic sharing method, characterized in that: Applied to a standby device, the method comprises: In response to the first flow data sent by the master device, the source IP address of the subnet corresponding to the first flow data is converted into the source IP address of the standby device to obtain the second flow data; wherein the first flow data is the first flow data sent by the master device in response to the subnet under the virtual private cloud, and the sending is controlled according to the source IP address of the subnet corresponding to the first flow data; The second flow data is transmitted to the main device through a preset routing configuration, so that the main device can convert the source IP address in the second flow data into the source IP address of the public network and send the second flow data out through the public network.

6. The method according to claim 5, characterized in that The converting the source IP address of the subnet corresponding to the flow data into the source IP address of the standby device to obtain the second flow data includes: Performing a security test on the first flow data to obtain a test result; When the detection result is passed, the source IP address of the subnet corresponding to the first flow data is converted into the source IP address of the backup device to obtain the second flow data.

7. A traffic sharing device, characterized in that: Applied to a main device, the device comprises: An address determination module, configured to determine, in response to first flow data sent by a subnet under a virtual private cloud, a source Internet Protocol address IP address of a subnet corresponding to the first flow data; A transmission judgment module, used to determine whether the first flow data needs to be transmitted to the backup device according to the source IP address of the subnet; An address updating module, configured to convert a subnet source IP address in the first flow data into a public network source IP address to update the first flow data when the first flow data does not need to be transmitted to the backup device; The data outbound module is used to outbound the updated first flow data through the public network based on the source IP address of the public network.

8. A traffic sharing device, characterized in that: Applied to a standby device, the device comprises: A data receiving module, configured to respond to first flow data sent by a master device, convert the source IP address of a subnet corresponding to the first flow data into the source IP address of a standby device, and obtain second flow data; wherein the first flow data is the first flow data sent by the master device in response to a subnet under a virtual private cloud, and the sending is controlled according to the source IP address of the subnet corresponding to the first flow data; The data transmission module is used to transmit the second flow data to the main device through a preset routing configuration, so that the main device can convert the source IP address in the second flow data into the source IP address of the public network and send the second flow data through the public network.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Network address conversion method and device and address conversion equipment

    CN109120746A

  • Equipment switching method and device, and service system

    CN110474802A

  • Resource scheduling method and device and cloud base station

    CN116708332A

  • Region-based network address translation

    US11824827B1

  • Generating mission-specific analytics information

    US20230403240A1