A method, device, system, equipment and medium for accelerating unicast traffic offloading
By assigning a unique virtual IP to each soft terminal on the VxLan VPN server and generating stream table rules, the error matching problems caused by low unicast traffic concurrency rate and duplication of private IP addresses are solved, and an efficient video VPN single Broadcast forwarding service.
Patent Information
- Application Number
- CN202211681053.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-12-26
AI Technical Summary
When the soft terminal connects to the IPTV private network through VxLan VPN, the unicast traffic concurrency rate is low, and due to duplicate private IP addresses, the data packets are incorrectly matched.
The VxLan VPN server is allocated to the unicast channel of each soft terminal, and a flow table rule for data packets is generated and sent to the smart network card to enable it to perform offloading and acceleration processing based on the virtual IP.
It realizes high concurrency, large traffic, and low latency video VPN unicast forwarding service, avoiding error packet transmission caused by duplication of private IP addresses.
Smart Images

Figure CN116193172B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, system, equipment and medium for accelerating unicast traffic offloading. Background Art
[0002] Soft terminal (i.e. IPTV soft terminal) is an Android APP application installed on smart TV, which can provide standard IPTV on-demand, playback, live broadcast, time-shift and other services. Since it cannot work on the Android bottom layer of smart TV like set-top boxes, it is impossible to achieve dual-crossing of public and private networks on smart TVs. Therefore, soft terminals usually access the IPTV private network where the Internet Protocol Television (IPTV) platform is located through the virtual extensible local area network Virtual Private Network (VxLan VPN) server.
[0003] However, unlike office VPN, the traffic of each soft terminal connected to the video VPN is relatively large, and the video VPN on-demand program forwarding service is completed only by the CPU of the VxLan VPN server, with a low concurrency rate. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application provide a unicast traffic offloading acceleration method, apparatus, system, device and medium to overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect of an embodiment of the present application, a unicast traffic offloading acceleration method is provided, which is applied to a VxLan VPN server, and the method includes:
[0006] Assign different virtual IPs to the unicast channels of each soft terminal;
[0007] Generate a flow table rule for a data packet according to the virtual IPs assigned to the respective unicast channels, wherein the flow table rule for the data packet indicates a mapping rule between the virtual IP and the inner layer information carried by the data packet, wherein the inner layer information at least includes: a private IP or a private network IP of the soft terminal;
[0008] The flow table rule of the data packet is sent to the smart network card, so that the smart network card determines the virtual IP mapped to the received data packet, and performs unloading acceleration processing on the data packet according to the virtual IP.
[0009] A second aspect of an embodiment of the present application provides a unicast traffic offloading acceleration method, which is applied to a smart network card. The method includes:
[0010] Receive the flow table rules of the data packet sent by the VxLan VPN server, the flow table rules of the data packet indicating the mapping rules between the virtual IP of the unicast channel and the inner layer information carried by the data packet, the inner layer information at least including: the private IP or private network IP of the soft terminal;
[0011] According to the flow table rule of the data packet, the virtual IP mapped to the received data packet is determined, and the data packet is unloaded and accelerated according to the virtual IP.
[0012] A third aspect of the embodiment of the present application provides a unicast traffic offloading acceleration device, which is applied to a VxLan VPN server, and the device includes:
[0013] Initialization module, used to allocate different virtual IPs to the unicast channels of each soft terminal;
[0014] A generating module, for generating a flow table rule of a data packet according to the virtual IPs respectively allocated to the unicast channels, wherein the flow table rule of the data packet indicates a mapping rule between the virtual IP and the inner layer information carried by the data packet, wherein the inner layer information at least includes: a private IP or a private network IP of the soft terminal;
[0015] The sending module is used to send the flow table rules of the data packet to the smart network card, so that the smart network card determines the virtual IP mapped to the received data packet, and performs unloading acceleration processing on the data packet according to the virtual IP.
[0016] A fourth aspect of the embodiments of the present application provides a unicast traffic offloading acceleration device, which is applied to a smart network card, and the device includes:
[0017] A receiving module is used to receive the flow table rules of the data packet sent by the VxLan VPN server, wherein the flow table rules of the data packet indicate the mapping rules between the virtual IP of the unicast channel and the inner layer information carried by the data packet, wherein the inner layer information at least includes: the private IP or private network IP of the soft terminal;
[0018] The processing module is used to determine the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and perform unloading acceleration processing on the data packet according to the virtual IP.
[0019] In a fifth aspect of an embodiment of the present application, a unicast traffic offloading acceleration system is provided, the system comprising a plurality of soft terminals and a NAT gateway, a VxLan VPN server, a smart network card, and an IPTV platform, the plurality of soft terminals being connected to the smart network card through respective NAT gateways, the smart network card being further connected to the VxLan VPN server and the IPTV platform, wherein:
[0020] The VxLan VPN server is used to execute the unicast traffic offloading acceleration method as described in the first aspect, so that the smart network card determines the virtual IP mapped to the received data packet, and performs offloading acceleration processing on the data packet according to the virtual IP.
[0021] In a sixth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the unicast traffic offloading acceleration method described in the first aspect or the steps of the unicast traffic offloading acceleration method described in the second aspect are implemented.
[0022] In a seventh aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the unicast traffic offloading acceleration method as described in the first aspect are implemented, or when the computer program / instruction is executed by a processor, the steps of the unicast traffic offloading acceleration method as described in the second aspect are implemented.
[0023] In an eighth aspect of an embodiment of the present application, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the unicast traffic offloading acceleration method described in the first aspect or implements the steps of the unicast traffic offloading acceleration method described in the second aspect.
[0024] The embodiments of the present application include the following advantages:
[0025] In this embodiment, the VxLan VPN server sends the flow table rules of the data packet to the smart network card, so that the smart network card can complete the unloading acceleration of the unicast traffic of each soft terminal, thereby using the smart network card to implement high concurrency, large traffic, and low latency video VPN unicast forwarding services, and by allocating a unique virtual IP to the unicast channel of each soft terminal, it can avoid the erroneous sending of data packets due to the duplication of the terminal's private IP address. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be 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 any creative labor.
[0027] Figure 1 It is an implementation flow chart of a unicast traffic offloading acceleration method according to an embodiment of the present application;
[0028] Figure 2It is a schematic diagram of the system architecture of a unicast traffic offloading acceleration system according to an embodiment of the present application;
[0029] Figure 3 It is an implementation flow chart of another unicast traffic offloading acceleration method in an embodiment of the present application;
[0030] Figure 4 It is a structural diagram of a unicast traffic offloading acceleration device according to an embodiment of the present application;
[0031] Figure 5 It is a structural diagram of another unicast traffic offloading acceleration device according to an embodiment of the present application;
[0032] Figure 6 It is a structural diagram of a unicast traffic offloading acceleration system according to an embodiment of the present application;
[0033] Figure 7 It is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0035] The soft terminal needs to access the IPTV platform located in the IPTV private network (the IPTV platform cannot be exposed to the public network), while the smart TV is connected to the Internet public network. The soft terminal cannot work on the Android bottom layer of the smart TV like a set-top box, and cannot achieve dual-crossing of the public network and the private network on the smart TV. Therefore, the soft terminal needs to access the IPTV private network through the VxLan VPN server (i.e., the video VPN server).
[0036] Unlike office VPN, the traffic of each soft terminal connected to video VPN is relatively large. For example, the bit rate of HD on-demand programs is 8Mbps, the peak bit rate of 4K on-demand programs is 30Mbps, and the average is 15Mbps. The video VPN on-demand program forwarding service is completed only by the CPU of the VxLan VPN server, and the concurrency rate is low.
[0037] In addition, soft terminals basically access the Internet after Network Address Traslation (NAT) is performed through the home gateway. The IPs of multiple soft terminals themselves may be duplicate private IPs, resulting in the data packets of each soft terminal received by the Internet network port having the same source IP (that is, the private IP of the soft terminal in the inner information carried by the data packet) after VxLan decapsulation. At this time, the decapsulated data packet is delivered to the private network port and NATed by the VxLan VPN server. Then, the data packet replied by the IPTV platform subsequently received by the private network port is difficult to determine the corresponding soft terminal according to the private IP of the soft terminal mapped by the data packet after reverse NAT, resulting in the data packet being incorrectly matched with the soft terminal, that is, the problem of repeated conflict of the VxLan inner source IP.
[0038] In response to the problems existing in the above-mentioned related technologies, the present application proposes a method for accelerating unicast traffic unloading for an IPTV soft terminal to access a private network through a video VPN. The VxLan VPN server accelerates the unicast traffic unloading of the soft terminal's unicast requests (authentication, electronic program guide (EPG), content distribution network (CDN) scheduling, video on demand, time shifting, playback, etc.) through an intelligent network card, which can achieve high concurrency, large traffic, and low-latency video VPN unicast forwarding services. In addition, by introducing a unique virtual IP mapped to the private IP of the soft terminal in the NAT process on the VxLan VPN server side, the problem of repeated conflicts of the inner source IP after VxLan decapsulation can be solved.
[0039] The unicast traffic offloading acceleration method provided by the embodiment of the present application is described in detail below through some embodiments and their application scenarios in combination with the accompanying drawings.
[0040] First, refer to Figure 1 As shown, it is an implementation flow chart of a unicast traffic offloading acceleration method provided in an embodiment of the present application, which is applied to a VxLan VPN server. The method may include the following steps:
[0041] Step S11: allocating different virtual IPs to the unicast channels of each soft terminal.
[0042] like Figure 2As shown, the soft terminal referred to in this application is an application deployed on a smart TV, which is used to communicate with the IPTV platform. The VxLan VPN server is equipped with a smart network card, and the two network ports of the smart network card are connected to the Internet and the IPTV private network respectively. The smart network card includes an embedded Linux and a field programmable gate array (FPGA). The embedded Linux communicates with other network ports of the host Linux in the VxLan VPN server through the management network port, and sends the flow table to the FPGA through the data plane development kit (DPDK).
[0043] In the specific implementation, a VPN tunnel using VxLan encapsulation is established between each soft terminal and the VxLan VPN server, a different virtual IP is assigned to each VPN tunnel, and each soft terminal is assigned its own unicast channel and multicast channel in each tunnel, so as to transmit the unicast traffic and multicast traffic related to each soft terminal through the Internet.
[0044] Step S12: Generate a flow table rule for a data packet according to the virtual IPs assigned to the unicast channels, wherein the flow table rule for the data packet indicates a mapping rule between the virtual IPs and the inner layer information carried by the data packet.
[0045] The inner layer information at least includes: the private IP or dedicated network IP of the soft terminal.
[0046] In the specific implementation, after the soft terminal converts the private IP carried by the unicast traffic (i.e., data packet) into a public IP through the home gateway (i.e., NAT gateway), it enters the Internet port of the smart network card through the corresponding unicast channel. At this time, the VxLanVPN server can obtain the data packet from the smart network card, and generate mapping rules between the private IP, virtual IP, IPTV private network IP and related ports of the soft terminal based on the inner information carried by the data packet, and generate processing logic (such as VxLan encapsulation / decapsulation, NAT of the private network port, etc.) for the data packet and its related data packets (i.e., the forward data packets and reverse reply packets subsequently sent or received by the soft terminal) based on the mapping rules, and send the processing logic as the flow table rule of the data packet to the smart network card, so that the smart network card has the ability to process the related data packets, thereby realizing unicast traffic offloading acceleration.
[0047] Step S13: Send the flow table rule of the data packet to the smart network card, so that the smart network card determines the virtual IP mapped to the received data packet, and performs unloading acceleration processing on the data packet according to the virtual IP.
[0048] In the specific implementation, the smart network card determines the virtual IP mapped to the private IP of the soft terminal itself (i.e., the source IP in the inner layer of the forward data packet) or the private network IP of the soft terminal (i.e., the destination IP in the inner layer of the reverse reply packet) in the inner layer information carried by the forward data packet or reverse reply packet received by the Internet network port or the private network port according to the flow table rules of the data packet, so that the soft terminal associated with the forward data packet or the reverse reply packet can be determined according to the virtual IP, and then the corresponding VxLan decapsulation / encapsulation and NAT processing are directly performed inside the smart network card, and the processed unicast traffic is forwarded to the correct IPTV platform or soft terminal, thereby solving the conflict problem caused by the duplication of the private IP of the soft terminal, and enabling the unicast traffic to bypass the CPU of the VxLan VPN server and be directly processed inside the smart network card, thereby realizing the offloading acceleration of the unicast traffic.
[0049] By adopting the technical solution of the embodiment of the present application, the VxLan VPN server sends the flow table rules of the data packet to the smart network card, so that the smart network card can complete the unloading acceleration of the unicast traffic of each soft terminal, thereby using the smart network card to implement high concurrency, large traffic, and low latency video VPN unicast forwarding service, and by allocating a unique virtual IP to the unicast channel of each soft terminal, it can avoid the erroneous sending of data packets due to the duplication of the terminal's private IP address.
[0050] Embodiment 1
[0051] This implementation describes the tunnel and unicast channel between the soft terminal and the VxLan VPN server. The tunnel establishment and initialization process may include the following two situations.
[0052] Case 1: The VxLan VPN server generates and sends the tunnel initial flow table rules to the smart network card, so that the smart network card sends the received data packet (i.e., the second target data packet) for tunnel authentication, establishment or maintenance directly to the VxLan VPN server for processing; the VxLan VPN server performs corresponding authentication, establishment or maintenance operations on the tunnel between each soft terminal and the VxLan VPN server according to the second target data packet received from the smart network card.
[0053] In specific implementation, Figure 2As shown, a VPN tunnel using VxLan encapsulation is established between each soft terminal and the video VPN server (Server), and the VxLan network identifier (VxLanID or VNI, VxLan NetworkIdentifier) of each VPN tunnel is the same (such as VxLanID0). A five-tuple is generated to identify each established VPN tunnel, and the five-tuple can be: the IP (NAT_IP) of the soft terminal after NAT by the home gateway (i.e., NAT gateway), the port (NAT_Port) of the soft terminal after NAT by the home gateway, the IP (ServerIP) of the VPN server (i.e., VxLan VPN server), the port of the VPN server (such as ServerPort=4789), and the access protocol (such as OutProtocol=UDP).
[0054] The tunnel authentication, establishment and maintenance module inside the VxLan VPN server (i.e., inside the host Linux) sends the business rules of the tunnel initial flow table to the flow table generation module, and the flow table generation module sends the generated tunnel initial flow table rules through the flow table sending module of the embedded Linux inside the smart network card. Among them, the tunnel initial flow table rules are: the smart network card does not unload and accelerate all VxLan encapsulation packets of VxLanID0 received by the Internet network port, and directly sends them to the application PF0 of the host Linux, and the tunnel authentication, establishment and maintenance module processes such data packets.
[0055] After receiving the tunnel initial flow table rule, the smart network card sends the received data packet for tunnel authentication, establishment or maintenance associated with the tunnel initial flow table rule directly to the VxLan VPN server through PF0 for processing, ensuring that the management module of the soft terminal can access the VxLan VPN server normally, so that the tunnel authentication, establishment and maintenance module inside the VxLan VPN server can normally authenticate the soft terminal ID, establish the tunnel and maintain the tunnel through heartbeat.
[0056] Case 2: The VxLan VPN server allocates a respective unicast channel to each soft terminal in the tunnel between each soft terminal and the VxLan VPN server; generates and sends a unicast initial flow table rule to the smart network card, so that the smart network card sends the data packets received from the each unicast channel directly to the VxLan VPN server for processing, wherein the priority of the unicast initial flow table rule is lower than the priority of the flow table rule of the data packet.
[0057] In the specific implementation, after establishing the tunnel, the VxLan VPN server will allocate a unicast channel and the identifier of the unicast channel (such as VxLanIDu1, VxLanIDu2, etc.) to each soft terminal, and generate and issue a unicast initial flow table (the flow table priority can be set to 10, indicating a lower priority) rule: the VxLan encapsulation packet (i.e., data packet) corresponding to the identifier of each unicast channel (such as VxLanIDu1, VxLanIDu2, etc.) received by the Internet network port is directly sent to PF0 and processed by the unicast traffic unloading management module inside the VxLan VPN server.
[0058] The smart network card receives the unicast initial flow table rule issued by the VxLan VPN server, and sends the data packets associated with the unicast initial flow table rule received from each unicast channel directly to the VxLan VPN server for processing, so that the unicast traffic unloading management module generates and issues the flow table rules of the data packets according to the first packet sent by each unicast channel. Since the flow table rules of the data packets have a higher priority than the unicast initial flow table rules, the smart network card will subsequently perform unloading acceleration processing on the data packets associated with each unicast channel.
[0059] It is understandable that since soft terminals basically access the Internet after passing through the home gateway NAT, the private IPs of multiple soft terminals may be repeated, resulting in the inability of the smart network card to identify the soft terminal to which the data packet belongs based on the private IP in the inner information after decapsulating VxLan. Therefore, after the tunnel is established, this application will also assign a unique virtual IP to each tunnel so that the smart network card can identify the soft terminal to which the data packet belongs based on the virtual IP.
[0060] After completing the initialization processes such as unicast channel initialization, multicast channel initialization, allocation of virtual IP and token (Token) for each tunnel, the VxLan VPN server generates a corresponding eleven-tuple to identify each tunnel based on the virtual IP and tunnel-related parameters of each tunnel. The eleven-tuple may include: NAT_IP, NAT_Port, VxLan VPN server IP (ServerIP), VxLan VPN server port (such as ServerPort = 4789), tunnel VNI (such as VxLanID0), Token, virtual IP, soft terminal ID, unicast channel identifier (VxLanIDu1), multicast channel identifier (such as VxLanIDm1), and tunnel generation time. The eleven-tuple of each tunnel constitutes the tunnel initial data. It can be understood that if 1,000 soft terminals establish tunnels, then the tunnel initial data contains 1,000 entries. The tunnel VID of all soft terminals is equal to the preset VxLanID0, and the VxLan VPN server will assign a unique Token, a unique virtual IP, a unique multicast channel identifier, and a unique unicast channel identifier to the tunnel of each soft terminal.
[0061] Considering that the VxLan VPN server mainly retrieves the eleven-tuple (i.e., initialization data) associated with the data packet based on the key data such as NAT_IP, NAT_Port, ServerIP, ServerPort=4789, and identifiers (such as VxLanID0 or VxLanIDu1 or VxLanIDm1) carried by the forward data packet (i.e., the data packet received by the Internet network port). Therefore, in order to speed up the retrieval speed, three copies of the tunnel initialization data can be created and stored in three hash buckets (i.e., tunnel initialization hash bucket, unicast channel initialization hash bucket, and multicast channel initialization hash bucket), and the hash values associated with the three hash buckets are calculated according to the three five-tuples respectively. The three five-tuples are:
[0062] 1. NAT_IP, NAT_Port, ServerIP, ServerPort, and VDI of the tunnel; used to calculate the hash value associated with the tunnel initialization hash bucket;
[0063] 2. NAT_IP, NAT_Port, ServerIP, ServerPort, and the identifier of the unicast channel (i.e., the outer layer information of the data packet transmitted by the unicast channel); used to calculate the hash value associated with the unicast channel initialization hash bucket;
[0064] 3. NAT_IP, NAT_Port, ServerIP, ServerPort, and the identifier of the multicast channel; used to calculate the hash value associated with the multicast channel initialization hash bucket.
[0065] It is understandable that the purpose of designing three hash buckets is that in three VxLan encapsulation situations (corresponding to the data packets transmitted by the tunnel, unicast channel and multicast channel), the VxLan VPN server can calculate the hash value according to the above five-tuple carried by the received data packet, so as to quickly query the corresponding eleven-tuple in the corresponding hash bucket and obtain the virtual IP and tunnel-related parameters related to the data packet. Among them, inside the hash bucket, the eleven-tuples with the same hash value can be formed into a bidirectional linked list for storage.
[0066] Embodiment 2
[0067] This embodiment describes the situation where the VxLan VPN server generates a flow table rule for a data packet, including the following steps:
[0068] (1) The VxLan VPN server receives the first target data packet of each unicast channel from the smart network card.
[0069] Among them, the first target data packet is mainly used for the VxLan VPN server to establish a full connection tracking table. The first target data packet can be the first packet of a unicast channel received by the smart network card from the Internet network port (that is, there is no corresponding data packet in the full connection tracking table).
[0070] As a possible implementation method, the VxLan VPN server receives data packets of each unicast channel from the smart network card; determines the hash value corresponding to each data packet based on the outer layer information carried by each received data packet; determines whether there is a full connection tracking table corresponding to each data packet in the full connection tracking hash bucket based on each hash value; and determines the data packet for which there is no corresponding full connection tracking table as the first target data packet.
[0071] In the specific implementation, the VxLan VPN server reads the outer layer information of the data packet received by the smart network card from the Internet network port to obtain a five-tuple (NAT_IP, NAT_Port, ServerIP, ServerPort, and unicast channel identifier). The hash value is calculated according to the five-tuple in the manner of a full connection tracking hash bucket, and then the full connection tracking hash bucket is searched to see whether there is a full connection table corresponding to the data packet.
[0072] If there is no corresponding full connection table, it means that this data packet is the first packet, and the first packet processing is performed: the first packet processing module of the VxLanVPN server generates a full connection table corresponding to the first packet, and generates the flow table rules of the corresponding data packet based on the full connection table, and processes the first packet through the CPU in the application according to the flow table rules of the data packet (such as decapsulation and NAT processing in sequence), and then sends the processed first packet from the private network port, and then issues the flow table rules of the data packet, so that the smart network card can unload and accelerate the data packet corresponding to the same full connection table.
[0073] If there is a corresponding full connection table, it means that this data packet is a leaked packet, and the leaked packet processing is performed: in the application, the CPU decapsulates and NATs the leaked packet in sequence, and then sends the processed leaked packet from the private network port.
[0074] It should be noted that according to the flow table rules of the data packets corresponding to the full connection tracking table, the smart network card needs to unload and accelerate the data packets corresponding to the full connection tracking table and then forward them to the private network port, and will not send them to the VxLan VPN server. However, before the flow table rules of the data packets sent after the first packet processing take effect, there may be data packets corresponding to the same full connection tracking table arriving at the VxLan VPN server, which is called a leaked packet (that is, the data packet received by the VxLan VPN server that has a corresponding full connection tracking table).
[0075] The present application designs a full connection tracking table, which is used to provide the required information for realizing the encapsulation / decapsulation of VxLan of the Internet port, the NAT of the private network port, and solving the problem of repeated conflicts of private IP of the inner terminal of VxLan. The full connection tracking table saves fourteen tuples: NAT_IP, NAT_Port, IP (ServerIP) of the VxLan VPN server, port (ServerPort) of the VxLan VPN server, identifier of the unicast channel, token (Token), virtual IP, private IP (ClientIP) of the soft terminal, port (ClientPort) of the soft terminal, IP (IPTVServerIP) of the IPTV platform, port (IPTVServerPort) of the IPTV platform, access protocol (InnerProtocol), private network IP (ServerPrivateIP) of the soft terminal, NAT port (ServerNATPort) of the soft terminal. For the convenience of query, the fourteen tuples maintained by each full connection tracking table are combined into a full connection tracking hash bucket, and the hash value is calculated using the first five items of the fourteen tuples (NAT_IP, NAT_Port, ServerIP, ServerPort, identifier of the unicast channel). Among them, the fourteen-tuples with the same hash value can be stored in a bidirectional linked list of the full connection tracking hash bucket.
[0076] It can be understood that in the fourteen-tuple, the five fields of ClientIP, ClientPort, IPTVServerIP, IPTVServerPort, and InnerProtocol are the inner layer information of VxLan encapsulation; the five fields of NAT_IP, NAT_Port, ServerIP, ServerPort, and the identifier of the unicast channel are the outer layer information of VxLan encapsulation. The unicast channel of a soft terminal can transmit data packets corresponding to different fourteen-tuples. When the VxLan VPN server does not receive any first target data packet, the above-mentioned full connection tracking hash bucket is empty, that is, the VxLan VPN server does not send the flow table rules of the data packet to the smart network card. At this time, the smart network card will send the data packets received from each unicast channel directly to the VxLan VPN server for processing according to the unicast initial flow table rules, so that the VxLan VPN server generates fourteen-tuples associated with each unicast channel.
[0077] (2) Determine the initialization data corresponding to each of the first target data packets according to the outer layer information carried by each of the first target data packets.
[0078] Among them, the initialization data includes the virtual IP and tunnel-related parameters of the unicast channel associated with a single first target data packet, and the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel.
[0079] As a possible implementation method, in order to speed up the query efficiency, the VxLan VPN server can determine the hash value corresponding to each of the first target data packets according to the outer layer information carried by each of the first target data packets, and then obtain the initialization data corresponding to each of the hash values from the unicast channel initialization hash bucket (i.e., the eleven-tuple in Example 1). Among them, the relevant definitions of the unicast channel initialization hash bucket and initialization data can refer to Example 1, and will not be repeated here.
[0080] (3) For each of the first target data packets, a private network IP and a network address translation NAT port for accessing the private network where the IPTV platform is located are respectively allocated.
[0081] (4) Generate a full connection tracking table corresponding to each of the first target data packets based on the inner layer information carried by each of the first target data packets, the initialization data corresponding to each of the first target data packets, and the private network IPs and the network address translation NAT ports.
[0082] In the specific implementation, for the data packet (i.e., the first packet) received from the smart network card for which there is no corresponding full-connection tracking table, the Token and virtual IP are obtained from the initialization data corresponding to the first packet, and based on the Token and virtual IP, the server-side NAT management module inside the VxLan VPN server is used to allocate an unused private network IP (ServerPrivateIP) and NAT port (ServerNATPort) to the first packet, and then according to the five-tuple in the inner layer information carried by the first packet: the private IP (ClientIP) of the soft terminal, the port (ClientPort) of the soft terminal, the IP (IPTVServerIP) of the IPTV platform, the port (IPTVServerPort) of the IPTV platform, and the access protocol (InnerProtocol); combined with part of the data in the initialization data, a fourteen-tuple corresponding to the first packet (i.e., the full-connection tracking table) is formed.
[0083] According to the corresponding five-tuple used to calculate the hash value of the full connection tracking hash bucket, the hash value of the fourteen-tuple is calculated, and the fourteen-tuple and its hash value are inserted into the full connection tracking hash bucket, and the flow table of the corresponding data packet is generated and issued based on the fourteen-tuple, indicating that the smart network card will subsequently perform VxLan decapsulation, server-side NAT, virtual IP mapping and other unloading acceleration processing on the data packets matching this fourteen-tuple.
[0084] (5) generating, according to the full connection tracking table corresponding to each of the first target data packets, execution logic for enabling the smart network card to perform offload acceleration processing on the data packets associated with each of the first target data packets.
[0085] (6) Generate flow table rules for the data packets associated with each of the first target data packets according to the execution logic.
[0086] It should be noted that for forward data packets or reverse data packets, the actual access source information and destination information include the private IP and port of the soft terminal client itself, the IP and port of the IPTV platform, and the access protocol. These five fields constitute the inner layer information of the VxLan encapsulation.
[0087] According to the traditional NAT processing method, after VxLan decapsulation, the VxLan VPN server will directly replace ClientIP and ClientPort with ServerPrivateIP and ServerNATPort during NAT. However, the private IP (ClientIP) of the soft terminal is the intranet IP assigned by the home gateway, and the ClientIP of each soft terminal will conflict with each other. In order to solve this problem, we introduced a unique virtual IP for each tunnel, replaced the ClientIP with the virtual IP, and mapped the virtual IP with ServerPrivateIP. That is, the mapping rules in the NAT process are modified to: mapping between VirtualIP, ClientPort and IPTVServerIP, IPTVServerPort. This modified mapping rule can be applied to the NAT process of both forward data packets and reverse reply packets, thereby solving the problem of repeated conflicts of private IPs of soft terminals by introducing a unique virtual IP.
[0088] As a possible implementation, the flow table rules of the data packet include the flow table rules of the forward data packet, and the flow table rules of the forward data packet indicate: the mapping rules between the virtual IP, private network IP and NAT port, and the private IP and port of the soft terminal in the inner layer information carried by the forward data packet.
[0089] In the specific implementation, the smart network card determines the unicast channel for sending the forward data packet based on the outer layer information carried by the received forward data packet, maps the private IP of the soft terminal in the inner layer information carried by the forward data packet to the virtual IP of the unicast channel; decapsulates the forward data packet after mapping the virtual IP to obtain the forward data packet with the outer layer information removed; maps the virtual IP and the port of the soft terminal in the inner layer information carried by the forward data packet with the outer layer information removed to the corresponding private network IP and NAT port respectively to obtain the forward data packet after NAT; and sends the forward data packet after NAT to the corresponding IPTV platform.
[0090] The outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel.
[0091] Exemplarily, the flow table rule of the forward data packet may include three serial execution logics:
[0092] <1> The forward data packet entering from the Internet port is matched with the identifier of the existing unicast channel in the flow table rule. If the match is successful, the ClientIP in the inner layer of the forward data packet is replaced with the virtual IP (that is, the source IP (SourceIP) = VirtualIP);
[0093] <2> Decapsulate the forward data packets that successfully match the identifier of the unicast channel and whose inner SourceIP=VirtualIP;
[0094] <3> The decapsulated forward data packet is NAT converted (that is, the inner information of SourceIP=VirtualIP, source port (SourcePort)=ClientPort is replaced with the inner information of SourceIP=ServerPrivateIP, SourcePort=ServerNATPort, and then the NAT converted data packet is sent to the corresponding IPTV platform through the private network port.
[0095] As a possible implementation, the flow table rules of the data packet include the flow table rules of the reverse reply packet, and the flow table rules of the reverse reply packet indicate the mapping rules between the virtual IP, the private IP and port of the soft terminal, and the private network IP and NAT port in the inner layer information carried by the reverse reply packet.
[0096] In the specific implementation, the smart network card maps the private network IP and NAT port in the inner layer information carried by the reverse reply packet received from the IPTV platform to the virtual IP and the port of the soft terminal respectively to obtain a first reply packet; determines the outer layer information associated with the first reply packet according to the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel associated with the first reply packet; encapsulates the first reply packet according to the associated outer layer information to obtain a second reply packet carrying the associated outer layer information; maps the virtual IP in the inner layer information carried by the second reply packet to the private IP of the soft terminal to obtain a third reply packet; and sends the third reply packet to the soft terminal through the corresponding unicast channel.
[0097] Exemplarily, the flow table rule of the reverse reply packet may include three serial execution logics:
[0098] <1> For the reverse reply packets entering the private network port, replace the destination IP (DestIP) = ServerPrivateIP, the destination port (DestPort) = ServerNATPort with DestIP = VirtualIP, DestPort = ClientPort;
[0099] <2> The reverse reply packet of DstIP=VirtualIP, DstPort=ClientPort is encapsulated with VxLan, so that it has outer layer information consisting of SourceIP=ServerIP, SourcePort=ServerPort, DestIP=NAT_IP, DestPort=NAT_Port, and the identifier of the unicast channel. At this time, the inner layer information of the data packet is: SourceIP=IPTVServerIP, SourcePort=IPTVServerPort, DestIP=VirtualIP, DestPort=ClientPort;
[0100] <3> For the reverse reply packet whose identifier of the unicast channel in the outer layer information is the existing identifier in the flow table rule and DestIP=VirtualIP in the inner layer information, the VirtualIP is replaced with the corresponding ClientIP and sent to the corresponding soft terminal via the Internet network port.
[0101] Second, as Figure 3 As shown, the embodiment of the present application also provides another unicast traffic offloading acceleration method, which is applied to a smart network card. The method includes the following steps:
[0102] Step S21: receiving the flow table rule of the data packet sent by the VxLan VPN server, wherein the flow table rule of the data packet indicates the mapping rule between the virtual IP of the unicast channel and the inner layer information carried by the data packet;
[0103] The inner layer information includes at least: the private IP or private network IP of the soft terminal;
[0104] Step S22: Determine the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and perform unloading acceleration processing on the data packet according to the virtual IP.
[0105] By adopting the technical solution of the embodiment of the present application, the VxLan VPN server sends the flow table rules of the data packet to the smart network card, so that the smart network card can complete the unloading acceleration of the unicast traffic of each soft terminal, thereby using the smart network card to implement high concurrency, large traffic, and low latency video VPN unicast forwarding service, and by allocating a unique virtual IP to the unicast channel of each soft terminal, it can avoid the erroneous sending of data packets due to the duplication of the terminal's private IP address.
[0106] Optionally, the flow table rule of the data packet includes a flow table rule of a forward data packet, and the flow table rule of the forward data packet indicates: a mapping rule between a virtual IP, a private network IP and a NAT port, and a private IP and a port of a soft terminal in the inner layer information carried by the forward data packet;
[0107] Determining the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and performing unloading acceleration processing on the data packet according to the virtual IP, includes:
[0108] Determine the unicast channel for sending the forward data packet according to the outer layer information carried by the received forward data packet, wherein the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel;
[0109] Mapping the private IP of the soft terminal in the inner layer information carried by the forward data packet to the virtual IP of the unicast channel;
[0110] Decapsulating the forward data packet after mapping the virtual IP to obtain a forward data packet with outer layer information removed;
[0111] The virtual IP and the port of the soft terminal in the inner layer information carried by the forward data packet with the outer layer information removed are respectively mapped to the corresponding private network IP and NAT port to obtain the forward data packet after NAT;
[0112] The forward data packet after NAT is sent to the corresponding IPTV platform.
[0113] Optionally, the flow table rule of the data packet includes a flow table rule of a reverse reply packet, wherein the flow table rule of the reverse reply packet indicates a mapping rule between the virtual IP, the private IP and port of the soft terminal, and the private network IP and NAT port in the inner layer information carried by the reverse reply packet;
[0114] Determining the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and performing unloading acceleration processing on the data packet according to the virtual IP, includes:
[0115] The private network IP and NAT port in the inner layer information carried by the reverse reply packet received from the IPTV platform are mapped to the virtual IP and the port of the soft terminal respectively to obtain a first reply packet;
[0116] Determine the outer layer information associated with the first reply packet according to the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel associated with the first reply packet;
[0117] Encapsulating the first reply packet according to the associated outer layer information to obtain a second reply packet carrying the associated outer layer information;
[0118] Mapping the virtual IP in the inner layer information carried by the second reply packet to the private IP of the soft terminal to obtain a third reply packet;
[0119] The third reply packet is sent to the soft terminal through the corresponding unicast channel.
[0120] Optionally, the method further comprises:
[0121] Receive the unicast initial flow table rules issued by the VxLan VPN server;
[0122] The data packets associated with the unicast initial flow table rules received from each unicast channel are directly sent to the VxLan VPN server for processing, wherein the priority of the unicast initial flow table rules is lower than the priority of the flow table rules of the data packets.
[0123] Optionally, the method further comprises:
[0124] Receive the tunnel initial flow table rules issued by the VxLan VPN server;
[0125] The received data packet associated with the tunnel initial flow table rule for tunnel authentication, establishment or maintenance is sent directly to the VxLan VPN server for processing.
[0126] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, some 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 application.
[0127] Thirdly, Figure 4 1 is a structural diagram of a unicast traffic offloading acceleration device according to an embodiment of the present application, which is applied to a VxLan VPN server, and the device includes:
[0128] Initialization module, used to allocate different virtual IPs to the unicast channels of each soft terminal;
[0129] A generating module, for generating a flow table rule of a data packet according to the virtual IPs respectively allocated to the unicast channels, wherein the flow table rule of the data packet indicates a mapping rule between the virtual IP and the inner layer information carried by the data packet, wherein the inner layer information at least includes: a private IP or a private network IP of the soft terminal;
[0130] The sending module is used to send the flow table rules of the data packet to the smart network card, so that the smart network card determines the virtual IP mapped to the received data packet, and performs unloading acceleration processing on the data packet according to the virtual IP.
[0131] By adopting the technical solution of the embodiment of the present application, the VxLan VPN server sends the flow table rules of the data packet to the smart network card, so that the smart network card can complete the unloading acceleration of the unicast traffic of each soft terminal, thereby using the smart network card to implement high concurrency, large traffic, and low latency video VPN unicast forwarding service, and by allocating a unique virtual IP to the unicast channel of each soft terminal, it can avoid the erroneous sending of data packets due to the duplication of the terminal's private IP address.
[0132] Optionally, the generating module includes:
[0133] A first generating submodule, configured to receive a first target data packet of each unicast channel from the smart network card;
[0134] The second generation submodule is used to determine the initialization data corresponding to each of the first target data packets according to the outer layer information carried by each of the first target data packets, wherein the initialization data includes the virtual IP and tunnel-related parameters of the unicast channel associated with the single first target data packet, and the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel;
[0135] The third generation submodule is used to allocate a private network IP and a network address translation NAT port for accessing the private network where the IPTV platform is located to each of the first target data packets;
[0136] The fourth generation submodule is used to generate a full connection tracking table corresponding to each of the first target data packets according to the inner layer information carried by each of the first target data packets, the initialization data corresponding to each of the first target data packets, and the private network IPs and the network address translation NAT ports;
[0137] A fifth generating submodule, configured to generate, according to the full connection tracking table corresponding to each of the first target data packets, an execution logic for enabling the smart network card to perform unloading acceleration processing on the data packets associated with each of the first target data packets;
[0138] The sixth generation submodule is used to generate flow table rules for data packets associated with each of the first target data packets according to the execution logic.
[0139] Optionally, the second generating submodule includes:
[0140] A first processing module, configured to determine a hash value corresponding to each of the first target data packets according to the outer layer information carried by each of the first target data packets;
[0141] The second processing module is used to obtain the initialization data corresponding to each hash value from the unicast channel initialization hash bucket.
[0142] Optionally, the first generating submodule includes:
[0143] A third processing module, configured to receive data packets of each unicast channel from the smart network card;
[0144] A fourth processing module, configured to determine a hash value corresponding to each of the data packets according to the outer layer information carried by each of the received data packets;
[0145] A fifth processing module, configured to determine, according to each of the hash values, whether there is a full connection tracking table corresponding to each of the data packets in the full connection tracking hash bucket;
[0146] The sixth processing module is configured to determine a data packet for which no corresponding full connection tracking table exists as the first target data packet.
[0147] Optionally, after determining, according to each of the hash values, whether there is a full connection tracking table corresponding to each of the data packets in the full connection tracking hash bucket, the device further includes:
[0148] The seventh processing module is used to perform decapsulation processing and NAT processing on the data packets in sequence according to the corresponding full connection tracking table for the data packets that have a corresponding full connection tracking table, and send the processed data packets to the corresponding IPTV platform.
[0149] Optionally, before allocating different virtual IPs to the unicast channels of the respective soft terminals, the device further comprises:
[0150] An eighth processing module, configured to allocate respective unicast channels to the respective soft terminals in the tunnels between the respective soft terminals and the VxLan VPN server;
[0151] The ninth processing module is used to generate and issue unicast initial flow table rules to the smart network card so that the smart network card sends the data packets received from each unicast channel directly to the VxLan VPN server for processing, wherein the priority of the unicast initial flow table rules is lower than the priority of the flow table rules of the data packets.
[0152] Optionally, in the tunnel between each soft terminal and the VxLan VPN server, before allocating a respective unicast channel to each soft terminal, the device further includes:
[0153] A tenth processing module, used to generate and send a tunnel initial flow table rule to the smart network card, so that the smart network card sends the received second target data packet for tunnel authentication, establishment or maintenance directly to the VxLanVPN server for processing;
[0154] The eleventh processing module is used to perform corresponding authentication, establishment or maintenance operations on the tunnel between each soft terminal and the VxLan VPN server according to the second target data packet received from the smart network card.
[0155] Fourthly, Figure 5 1 is a schematic diagram of the structure of another unicast traffic offloading acceleration device according to an embodiment of the present application, which is applied to a smart network card, and the device includes:
[0156] A receiving module is used to receive the flow table rules of the data packet sent by the VxLan VPN server, wherein the flow table rules of the data packet indicate the mapping rules between the virtual IP of the unicast channel and the inner layer information carried by the data packet, wherein the inner layer information at least includes: the private IP or private network IP of the soft terminal;
[0157] The processing module is used to determine the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and perform unloading acceleration processing on the data packet according to the virtual IP.
[0158] By adopting the technical solution of the embodiment of the present application, the VxLan VPN server sends the flow table rules of the data packet to the smart network card, so that the smart network card can complete the unloading acceleration of the unicast traffic of each soft terminal, thereby using the smart network card to implement high concurrency, large traffic, and low latency video VPN unicast forwarding service, and by allocating a unique virtual IP to the unicast channel of each soft terminal, it can avoid the erroneous sending of data packets due to the duplication of the terminal's private IP address.
[0159] Optionally, the flow table rule of the data packet includes a flow table rule of a forward data packet, and the flow table rule of the forward data packet indicates: a mapping rule between a virtual IP, a private network IP and a NAT port, and a private IP and a port of a soft terminal in the inner layer information carried by the forward data packet;
[0160] The processing module comprises:
[0161] The first processing submodule is used to determine the unicast channel for sending the forward data packet according to the outer layer information carried by the received forward data packet, wherein the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel;
[0162] A second processing submodule is used to map the private IP of the soft terminal in the inner layer information carried by the forward data packet to the virtual IP of the unicast channel;
[0163] The third processing submodule is used to decapsulate the forward data packet after the virtual IP is mapped to obtain a forward data packet with outer layer information removed;
[0164] The fourth processing submodule is used to map the virtual IP and the port of the soft terminal in the inner layer information carried by the forward data packet with the outer layer information removed to the corresponding private network IP and NAT port, respectively, to obtain the forward data packet after NAT;
[0165] The fifth processing submodule is used to send the forward data packet after NAT to the corresponding IPTV platform.
[0166] Optionally, the flow table rule of the data packet includes a flow table rule of a reverse reply packet, wherein the flow table rule of the reverse reply packet indicates a mapping rule between the virtual IP, the private IP and port of the soft terminal, and the private network IP and NAT port in the inner layer information carried by the reverse reply packet;
[0167] The processing module comprises:
[0168] The sixth processing submodule is used to map the private network IP and NAT port in the inner layer information carried by the reverse reply packet received from the IPTV platform to the virtual IP and the port of the soft terminal respectively, so as to obtain a first reply packet;
[0169] The seventh processing submodule is used to determine the outer layer information associated with the first reply packet according to the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel associated with the first reply packet;
[0170] an eighth processing submodule, configured to encapsulate the first reply packet according to the associated outer layer information to obtain a second reply packet carrying the associated outer layer information;
[0171] A ninth processing submodule, configured to map the virtual IP in the inner layer information carried by the second reply packet to the private IP of the soft terminal, to obtain a third reply packet;
[0172] The tenth processing submodule is used to send the third reply packet to the soft terminal through the corresponding unicast channel.
[0173] Optionally, the device further comprises:
[0174] A first receiving module is used to receive the unicast initial flow table rules issued by the VxLan VPN server;
[0175] The first sending module is used to send the data packets associated with the unicast initial flow table rules received from each unicast channel directly to the VxLan VPN server for processing, wherein the priority of the unicast initial flow table rules is lower than the priority of the flow table rules of the data packets.
[0176] Optionally, the device further comprises:
[0177] A second receiving module is used to receive the tunnel initial flow table rules issued by the VxLan VPN server;
[0178] The second sending module is used to send the received data packet for tunnel authentication, establishment or maintenance associated with the tunnel initial flow table rule directly to the VxLan VPN server for processing.
[0179] Fifthly, Figure 6As shown, the embodiment of the present application also provides a unicast traffic unloading acceleration system, the system comprising: multiple soft terminals and NAT gateways, a VxLan VPN server, a smart network card and an IPTV platform, the multiple soft terminals are connected to the smart network card through their respective NAT gateways, and the smart network card is also connected to the VxLan VPN server and the IPTV platform respectively, wherein:
[0180] The VxLan VPN server is used to execute the unicast traffic offloading acceleration method as described in the first aspect, so that the smart network card determines the virtual IP mapped to the received data packet, and performs offloading acceleration processing on the data packet according to the virtual IP.
[0181] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.
[0182] The present application also provides an electronic device, referring to Figure 7 , Figure 7 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 7 As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be run on the processor 120 to implement the steps in the unicast traffic offloading acceleration method disclosed in the embodiment of the present application.
[0183] The embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the unicast traffic offloading acceleration method disclosed in the embodiment of the present application is implemented.
[0184] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the unicast traffic offloading acceleration method disclosed in the embodiment of the present application.
[0185] 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.
[0186] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt 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 code.
[0187] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, systems, devices, storage media, and program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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.
[0188] 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.
[0189] 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.
[0190] Although the preferred embodiments of the present application 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 application.
[0191] 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 a..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0192] The above is a detailed introduction to a unicast traffic offloading acceleration method, device, system, equipment and medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, 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 application.
Claims
1. A unicast traffic offloading acceleration method, characterized in that: Applied to a VxLan VPN server, the method includes: Assign different virtual IPs to the unicast channels of each soft terminal; Generate a flow table rule for a data packet according to the virtual IPs assigned to the unicast channels, wherein the flow table rule for the data packet indicates a mapping rule between the virtual IP and the inner layer information carried by the data packet, wherein the inner layer information at least includes: a private IP or a private network IP of the soft terminal; Sending the flow table rules of the data packet to the smart network card, so that the smart network card determines the virtual IP mapped to the received data packet, and performs unloading acceleration processing on the data packet according to the virtual IP; The flow table rules for generating data packets according to the virtual IPs assigned to the unicast channels include: receiving, from the smart network card, a first target data packet of each unicast channel; According to the outer layer information carried by each first target data packet, the initialization data corresponding to each first target data packet is determined, wherein the initialization data includes the virtual IP and tunnel related parameters of the unicast channel associated with the single first target data packet, and the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel; For each of the first target data packets, a private network IP and a network address translation NAT port for accessing the private network where the IPTV platform is located are respectively allocated; Generate a full connection tracking table corresponding to each of the first target data packets according to the inner layer information carried by each of the first target data packets, the initialization data corresponding to each of the first target data packets, and each private network IP and each network address translation NAT port; Generate, according to the full connection tracking table corresponding to each first target data packet, execution logic that enables the smart network card to perform unloading acceleration processing on the data packets associated with each first target data packet; According to the execution logic, flow table rules for the data packets associated with each of the first target data packets are generated.
2. The method according to claim 1, characterized in that The determining, according to the outer layer information carried by each of the first target data packets, the initialization data corresponding to each of the first target data packets comprises: Determine the hash value corresponding to each of the first target data packets according to the outer layer information carried by each of the first target data packets; From the unicast channel initialization hash bucket, obtain the initialization data corresponding to each hash value.
3. The method according to claim 1, characterized in that The receiving, from the smart network card, the first target data packet of each unicast channel includes: Receiving data packets of each unicast channel from the smart network card; Determine the hash value corresponding to each data packet according to the outer layer information carried by each received data packet; According to each of the hash values, determining whether there is a full connection tracking table corresponding to each of the data packets in the full connection tracking hash bucket; A data packet for which no corresponding full connection tracking table exists is determined as the first target data packet.
4. The method according to claim 3, characterized in that: After determining, according to each of the hash values, whether there is a full connection tracking table corresponding to each of the data packets in the full connection tracking hash bucket, the method further includes: For data packets for which there is a corresponding full connection tracking table, the data packets are sequentially decapsulated and NAT processed according to the corresponding full connection tracking table, and the processed data packets are sent to the corresponding IPTV platform.
5. The method according to any one of claims 1 to 4, characterized in that: Before allocating different virtual IPs to the unicast channels of each soft terminal, the method further includes: In the tunnel between each soft terminal and the VxLan VPN server, each soft terminal is allocated a respective unicast channel; Generate and send unicast initial flow table rules to the smart network card so that the smart network card sends the data packets received from the various unicast channels directly to the VxLan VPN server for processing, wherein the priority of the unicast initial flow table rules is lower than the priority of the flow table rules of the data packets.
6. The method according to claim 5, characterized in that In the tunnel between each soft terminal and the VxLan VPN server, before allocating respective unicast channels to each soft terminal, the method further includes: Generate and send a tunnel initial flow table rule to the smart network card so that the smart network card sends the received second target data packet for tunnel authentication, establishment or maintenance directly to the VxLan VPN server for processing; According to the second target data packet received from the smart network card, corresponding authentication, establishment or maintenance operations are performed on the tunnels between each soft terminal and the VxLan VPN server.
7. A method for accelerating unicast traffic offloading, characterized in that: Applied to a smart network card, the method comprises: Receive the flow table rules of the data packet sent by the VxLan VPN server, the flow table rules of the data packet indicating the mapping rules between the virtual IP of the unicast channel and the inner layer information carried by the data packet, the inner layer information at least including: the private IP or private network IP of the soft terminal; Determine the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and perform unloading acceleration processing on the data packet according to the virtual IP; The flow table rules of the data packet include the flow table rules of the forward data packet, and the flow table rules of the forward data packet indicate: the mapping rules between the virtual IP, the private network IP and the NAT port, and the private IP and port of the soft terminal in the inner layer information carried by the forward data packet; Determining the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and performing unloading acceleration processing on the data packet according to the virtual IP, includes: Determine the unicast channel for sending the forward data packet according to the outer layer information carried by the received forward data packet, wherein the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel; Mapping the private IP of the soft terminal in the inner layer information carried by the forward data packet to the virtual IP of the unicast channel; Decapsulating the forward data packet after mapping the virtual IP to obtain a forward data packet with outer layer information removed; The virtual IP and the port of the soft terminal in the inner layer information carried by the forward data packet with the outer layer information removed are respectively mapped to the corresponding private network IP and NAT port to obtain the forward data packet after NAT; The forward data packet after NAT is sent to the corresponding IPTV platform.
8. The method according to claim 7, characterized in that The flow table rules of the data packet include the flow table rules of the reverse reply packet, and the flow table rules of the reverse reply packet indicate the mapping rules between the virtual IP, the private IP and port of the soft terminal, and the private network IP and NAT port in the inner layer information carried by the reverse reply packet; Determining the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and performing unloading acceleration processing on the data packet according to the virtual IP, includes: The private network IP and NAT port in the inner layer information carried by the reverse reply packet received from the IPTV platform are mapped to the virtual IP and the port of the soft terminal respectively to obtain a first reply packet; Determine the outer layer information associated with the first reply packet according to the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel associated with the first reply packet; Encapsulating the first reply packet according to the associated outer layer information to obtain a second reply packet carrying the associated outer layer information; Mapping the virtual IP in the inner layer information carried by the second reply packet to the private IP of the soft terminal to obtain a third reply packet; The third reply packet is sent to the soft terminal through the corresponding unicast channel.
9. The method according to any one of claims 7-8, characterized in that: The method further comprises: Receive the unicast initial flow table rules issued by the VxLan VPN server; The data packets associated with the unicast initial flow table rules received from each unicast channel are directly sent to the VxLan VPN server for processing, wherein the priority of the unicast initial flow table rules is lower than the priority of the flow table rules of the data packets.
10. The method according to any one of claims 7-8, characterized in that: The method further comprises: Receive the tunnel initial flow table rules issued by the VxLan VPN server; The received data packet associated with the tunnel initial flow table rule for tunnel authentication, establishment or maintenance is sent directly to the VxLan VPN server for processing.
11. A unicast traffic offloading acceleration device, characterized in that: Applied to a VxLan VPN server, the device comprises: Initialization module, used to allocate different virtual IPs to the unicast channels of each soft terminal; A generation module is used to generate a flow table rule for a data packet according to the virtual IPs assigned to the respective unicast channels, wherein the flow table rule for the data packet indicates a mapping rule between the virtual IP and the inner layer information carried by the data packet, wherein the inner layer information at least includes: a private IP or a private network IP of the soft terminal; A sending module, used to send the flow table rules of the data packet to the smart network card, so that the smart network card determines the virtual IP mapped to the received data packet, and performs unloading acceleration processing on the data packet according to the virtual IP; The generation module comprises: A first generating submodule, configured to receive a first target data packet of each unicast channel from the smart network card; The second generation submodule is used to determine the initialization data corresponding to each of the first target data packets according to the outer layer information carried by each of the first target data packets, wherein the initialization data includes the virtual IP and tunnel-related parameters of the unicast channel associated with the single first target data packet, and the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLan VPN server, and the identifier of the unicast channel; The third generation submodule is used to allocate a private network IP and a network address translation NAT port for accessing the private network where the IPTV platform is located to each of the first target data packets; The fourth generation submodule is used to generate a full connection tracking table corresponding to each of the first target data packets according to the inner layer information carried by each of the first target data packets, the initialization data corresponding to each of the first target data packets, and each private network IP and each network address translation NAT port; A fifth generating submodule, configured to generate, according to the full connection tracking table corresponding to each of the first target data packets, an execution logic for enabling the smart network card to perform unloading acceleration processing on the data packets associated with each of the first target data packets; The sixth generation submodule is used to generate flow table rules for data packets associated with each of the first target data packets according to the execution logic.
12. A unicast traffic offloading acceleration device, characterized in that: Applied to a smart network card, the device comprises: A receiving module is used to receive the flow table rules of the data packet sent by the VxLan VPN server, wherein the flow table rules of the data packet indicate the mapping rules between the virtual IP of the unicast channel and the inner layer information carried by the data packet, wherein the inner layer information at least includes: the private IP or private network IP of the soft terminal; A processing module, used to determine the virtual IP mapped to the received data packet according to the flow table rule of the data packet, and perform unloading acceleration processing on the data packet according to the virtual IP; The flow table rules of the data packet include the flow table rules of the forward data packet, and the flow table rules of the forward data packet indicate: the mapping rules between the virtual IP, the private network IP and the NAT port, and the private IP and port of the soft terminal in the inner layer information carried by the forward data packet; The processing module comprises: The first processing submodule is used to determine the unicast channel for sending the forward data packet according to the outer layer information carried by the received forward data packet, wherein the outer layer information includes: the port and IP of the soft terminal after NAT by the NAT gateway, the port and IP of the VxLanVPN server, and the identifier of the unicast channel; A second processing submodule is used to map the private IP of the soft terminal in the inner layer information carried by the forward data packet to the virtual IP of the unicast channel; The third processing submodule is used to decapsulate the forward data packet after the virtual IP is mapped to obtain a forward data packet with outer layer information removed; The fourth processing submodule is used to map the virtual IP and the port of the soft terminal in the inner layer information carried by the forward data packet with the outer layer information removed to the corresponding private network IP and NAT port, respectively, to obtain the forward data packet after NAT; The fifth processing submodule is used to send the forward data packet after NAT to the corresponding IPTV platform.
13. A unicast traffic offloading acceleration system, characterized in that: The system includes multiple soft terminals and NAT gateways, a VxLan VPN server, a smart network card and an IPTV platform. The multiple soft terminals are connected to the smart network card through their respective NAT gateways, and the smart network card is also connected to the VxLan VPN server and the IPTV platform respectively, wherein: The VxLan VPN server is used to execute the unicast traffic offloading acceleration method as described in any one of claims 1 to 6, so that the smart network card determines the virtual IP mapped to the received data packet, and performs offloading acceleration processing on the data packet according to the virtual IP.
14. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the unicast traffic offloading acceleration method according to any one of claims 1 to 6, or the processor executes the computer program to implement the unicast traffic offloading acceleration method according to any one of claims 7 to 10.
15. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by the processor, the unicast traffic offloading acceleration method as described in any one of claims 1 to 6 is implemented, or when the computer program / instruction is executed by the processor, the unicast traffic offloading acceleration method as described in any one of claims 7 to 10 is implemented.
