CN114978806A - Data transmission method based on hardware acceleration, device and processor thereof - Google Patents

Data transmission method based on hardware acceleration, device and processor thereof Download PDF

Info

Publication number
CN114978806A
CN114978806A CN202210483009.7A CN202210483009A CN114978806A CN 114978806 A CN114978806 A CN 114978806A CN 202210483009 A CN202210483009 A CN 202210483009A CN 114978806 A CN114978806 A CN 114978806A
Authority
CN
China
Prior art keywords
data
information
hardware acceleration
transmission mode
acceleration engine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210483009.7A
Other languages
Chinese (zh)
Inventor
谢平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lianhong Technology Co ltd
Original Assignee
Shanghai Lianhong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Lianhong Technology Co ltd filed Critical Shanghai Lianhong Technology Co ltd
Priority to CN202210483009.7A priority Critical patent/CN114978806A/en
Publication of CN114978806A publication Critical patent/CN114978806A/en
Priority to PCT/CN2023/082596 priority patent/WO2023213148A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal

Abstract

The invention discloses a data transmission method based on hardware acceleration, a device and a processor thereof. Wherein, the method comprises the following steps: when the target data is acquired, determining a transmission mode of the target data; determining an acceleration mode of the target data based on the transmission mode; carrying out acceleration processing on target data by using an acceleration mode to obtain data to be transmitted; and sending the data to be transmitted. The invention solves the technical problems of high network delay and poor user experience caused by less protocols supported by the acceleration engine of the router in the related technology.

Description

Data transmission method based on hardware acceleration, device and processor thereof
Technical Field
The invention relates to the field of network communication, in particular to a data transmission method based on hardware acceleration, a device and a processor thereof.
Background
At present, many router gateways support VPN dialing, and a Virtual Private dial Network (VPN) refers to accessing a public Network by using a dialing function of the public Network (such as ISDN or PSTN) to implement a Virtual Private Network, thereby providing access services for enterprises, small ISPs, mobile office staff, and the like. Common VPN protocols include both PPTP and L2TP, which are IP packets transmitted through a public network (e.g., the Internet) using VPN encapsulation (PPTP or L2TP), where fig. 1(a) is a schematic diagram of PPTP protocol packet encapsulation according to the prior art, and as shown in fig. 1(a), a packet under the protocol may include: a public network IP head, a GRE protocol head, a PPP head and an internal network IP head; fig. 1(b) is a schematic diagram of the encapsulation of a L2TP protocol packet according to the prior art, and as shown in fig. 1(b), a packet under the protocol may include: a public network IP header, an L2TP protocol header, a PPP header, and an intranet IP header. The configuration is based on a point-to-point tunneling protocol (PPP) VPN solution. VPN provides an economical and efficient point-to-point connection between a remote user and a private enterprise network, and with the continuous increase of network bandwidth, the requirements on VPN delay and performance are higher and higher.
Fig. 2 is a schematic diagram of a forwarding path with a hardware acceleration engine according to the prior art, and as shown in fig. 2, when a router forwards a data packet, NAT conversion is required, and the conversion is generally implemented in a network protocol stack and mainly performed by a CPU, so that a Linux kernel consumes a large amount of CPU resources when performing NAT conversion, which further causes delay increase and performance limitation. In order to reduce the CPU load, reduce the delay, and improve the performance, a Hardware acceleration Engine is generally designed outside the CPU, and the NAT translation work in the protocol stack is handed over to the Hardware acceleration Engine (Hardware NAT Engine, abbreviated as HWNAT).
However, a general acceleration engine only supports simple protocols such as IP, IPv6, and PPoE, and cannot accelerate complex VPN tunneling protocols such as PPTP and L2 TP. For router VPN dialing, when the router forwards, it needs to perform NAT conversion on the intranet IP header, then adds the corresponding VPN protocol header information, and then adds the public network IP header to send out. The VPN protocol is relatively complex, so that a general router does not support VPN protocol acceleration although the general router has a hardware acceleration engine, the VPN dialing transmission rate is low, the time delay is large, and the network experience is poor.
Moreover, a general hardware acceleration engine supports protocols such as IP, PPPoE, IPv6, and the like, and cannot accelerate complex VPN protocols such as PPTP and L2 TP. The hardware acceleration engine capable of supporting the PPTP and the L2TP protocol is also provided, such acceleration engine needs to be capable of parsing and understanding the PPTP and L2TP protocols, the hardware design is complex, the cost is much higher than that of a general hardware acceleration engine, the expansibility is not good, and the hardware acceleration engine may need to be redesigned if a new VPN protocol is to be supported. For example, the related art provides an accelerated access method based on PPTP VPN, which requires a second server cluster supporting GRE protocol connected between a first server and a VPN server, that is, an acceleration server is added for acceleration.
In view of the above problems in the related art, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a data transmission method based on hardware acceleration, a device and a processor thereof, which are used for at least solving the technical problems of high network delay and poor user experience caused by less protocols supported by an acceleration engine of a router in the related technology.
According to an aspect of the embodiments of the present invention, there is provided a data transmission method based on hardware acceleration, including: when target data are acquired, determining a transmission mode of the target data; determining an acceleration mode of the target data based on the transmission mode; accelerating the target data by using the acceleration mode to obtain data to be transmitted; and sending the data to be transmitted.
Optionally, determining a transmission mode of the target data includes: determining a data receiving port of the target data; when the data receiving port is a LAN port, determining that the transmission mode is an uplink transmission mode; and when the data receiving port is a WAN port, determining that the transmission mode is a downlink transmission mode.
Optionally, when it is determined that the transmission mode is the uplink transmission mode, performing acceleration processing on the target data by using the acceleration mode to obtain data to be transmitted, including: when the VPN dialing is detected, recording VPN dialing information by using a hardware acceleration engine; performing NAT conversion on the intranet IP by using the hardware acceleration engine to obtain first message information; adding VPN (virtual private network) head information and public network IP (Internet protocol) head information to the first message information based on the VPN dialing information by utilizing an acceleration engine drive corresponding to the hardware acceleration engine to obtain second message information; and adding Ethernet type header information to the second message by using the hardware acceleration engine to obtain the data to be transmitted.
Optionally, the obtaining, by using an acceleration engine driver corresponding to the hardware acceleration engine, second packet information by adding VPN header information and public network IP header information to the first packet information based on the VPN dialing information includes: adding PPP protocol header information to the first message information through a PPTP protocol and an L2TP protocol respectively to obtain third message information and fourth message information; adding GRE protocol header information to the third message information by using the VPN dialing information to obtain fifth message information, and adding L2TP protocol header information to the fourth message information by using the VPN dialing information to obtain sixth message information; and adding header information to the fifth message information and the sixth message information according to the VPN dialing information to obtain the second message information.
Optionally, when it is determined that the transmission mode is the uplink transmission mode, sending the data to be transmitted includes sending the data to be transmitted through the WAN port.
Optionally, when it is determined that the transmission mode is the downlink transmission mode, performing acceleration processing on the target data by using the acceleration mode to obtain data to be transmitted, including: when the VPN dialing is detected, recording VPN dialing information by using a hardware acceleration engine; removing the Ethernet header information by using a hardware acceleration engine to obtain seventh message information; removing the VPN header information and the public network IP header information of the seventh message information by using an acceleration engine drive corresponding to the hardware acceleration engine to obtain eighth message information; and when the hardware acceleration engine receives the eighth message information, performing NAT conversion on the intranet IP to obtain the data to be transmitted.
Optionally, when it is determined that the transmission mode is the downlink transmission mode, sending the data to be transmitted includes: and sending the data to be transmitted out through the LAN port.
According to another aspect of the embodiments of the present invention, there is also provided a data transmission apparatus based on hardware acceleration, including: the first determining module is used for determining a transmission mode of the target data when the target data is obtained; a second determining module, configured to determine an acceleration mode of the target data based on the transmission mode; the acceleration processing module is used for carrying out acceleration processing on the target data by utilizing the acceleration mode to obtain data to be transmitted; and the sending module is used for sending the data to be transmitted.
Optionally, the first determining module includes: a first determining unit, configured to determine a data receiving port of the target data; a second determining unit, configured to determine that the transmission mode is an uplink transmission mode when the data receiving port is a LAN port; a third determining unit, configured to determine that the transmission mode is a downlink transmission mode when the data receiving port is a WAN port.
Optionally, the acceleration processing module includes: the first recording unit is used for recording VPN dialing information by using a hardware acceleration engine when the VPN dialing is detected; the conversion unit is used for carrying out NAT conversion on the intranet IP by utilizing the hardware acceleration engine to obtain first message information; a first adding unit, configured to add, by using an acceleration engine driver corresponding to the hardware acceleration engine, VPN header information and public network IP header information to the first packet information based on the VPN dialing information, to obtain second packet information; a second adding unit, configured to add, by using the hardware acceleration engine, ethernet-type header information to the second packet to obtain the to-be-transmitted data.
Optionally, the first adding unit includes: a first adding subunit, configured to add PPP protocol header information to the first packet information through a PPTP protocol and an L2TP protocol, respectively, to obtain third packet information and fourth packet information; a second adding subunit, configured to add GRE protocol header information to the third packet information by using the VPN dialing information to obtain fifth packet information, and add L2TP protocol header information to the fourth packet information by using the VPN dialing information to obtain sixth packet information; and a third adding subunit, configured to add header information to the fifth packet information and the sixth packet information according to the VPN dialing information, so as to obtain the second packet information.
Optionally, the second determining unit includes: and the first sending subunit is used for sending the data to be transmitted out through the WAN port.
Optionally, the acceleration processing module includes: the second recording unit is used for recording VPN dialing information by using a hardware acceleration engine when the VPN dialing is detected; the first removing unit is used for removing the Ethernet header information by using a hardware acceleration engine to obtain seventh message information; a second removing unit, configured to remove, by using an acceleration engine driver corresponding to the hardware acceleration engine, VPN header information and public network IP header information of the seventh packet information to obtain eighth packet information; and the conversion unit is used for carrying out NAT conversion on the intranet IP to obtain the data to be transmitted when the hardware acceleration engine receives the eighth message information.
Optionally, the third determining unit includes: and the second sending unit is used for sending the data to be transmitted out through the LAN port.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is executed by a processor, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned data transmission methods based on hardware acceleration.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a computer program, where the computer program executes to perform the data transmission method based on hardware acceleration described in any one of the above.
In the embodiment of the invention, when the target data is acquired, the transmission mode of the target data is determined; determining an acceleration mode of the target data based on the transmission mode; carrying out acceleration processing on target data by using an acceleration mode to obtain data to be transmitted; and sending the data to be transmitted. By the data transmission method based on hardware acceleration, the purpose that the acceleration mode of the target data is determined based on the data transmission mode so as to accelerate the target data is achieved, the technical effect of reducing network delay is achieved, and the technical problems of high network delay and poor user experience caused by fewer protocols supported by an acceleration engine of a router in the related technology are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
figure 1(a) is a schematic diagram of PPTP protocol messaging in accordance with the prior art;
FIG. 1(b) is a schematic diagram of L2TP protocol messaging according to the prior art;
FIG. 2 is a schematic diagram of a forwarding path with a hardware acceleration engine according to the prior art;
FIG. 3 is a flow chart of a data transmission method based on hardware acceleration according to an embodiment of the present invention;
fig. 4 is a flow diagram of a hardware acceleration engine driven recording of VPN dialing information according to an embodiment of the present invention;
FIG. 5 is a flow diagram of upstream processing logic according to an embodiment of the present invention;
FIG. 6 is a flow diagram of downstream processing logic according to an embodiment of the present invention;
FIG. 7 is a flow diagram of a hardware acceleration engine driven addition of VPN header information and public network IP headers, according to an embodiment of the invention;
fig. 8 is a schematic diagram of a data transmission apparatus based on hardware acceleration according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided a method embodiment of a data transmission method based on hardware acceleration, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be executed in an order different from that herein.
Fig. 3 is a flowchart of a data transmission method based on hardware acceleration according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S302, when the target data is acquired, the transmission mode of the target data is determined.
Optionally, the transmission mode of the target data mainly includes but is not limited to: uplink transmission and downlink transmission.
Step S304, the acceleration mode of the target data is determined based on the transmission mode.
In the above steps, the acceleration mode of the target data mainly includes but is not limited to: hardware accelerates engine driving.
Step S306, the target data is accelerated by an acceleration mode to obtain the data to be transmitted.
In the above steps, the data to be transmitted is acquired by performing acceleration processing according to the acceleration mode target data determined based on the transmission mode.
Step S308, sending the data to be transmitted.
As can be seen from the above, in the embodiment of the present invention, first, when the target data is obtained, a transmission mode of the target data may be determined; then determining an acceleration mode of the target data based on the transmission mode; then, carrying out acceleration processing on the target data by utilizing an acceleration mode to obtain data to be transmitted; and finally sending the data to be transmitted. By the data transmission method based on hardware acceleration, the purpose that the acceleration mode of the target data is determined based on the data transmission mode so as to accelerate the target data is achieved, the technical effect of reducing network delay is achieved, and the technical problems of high network delay and poor user experience caused by fewer protocols supported by an acceleration engine of a router in the related technology are solved.
As an optional embodiment, determining a transmission mode of the target data includes: determining a data receiving port of target data; when the data receiving port is a LAN port, determining that the transmission mode is an uplink transmission mode; and when the data receiving port is a WAN port, determining that the transmission mode is a downlink transmission mode.
In the above alternative embodiment, the WAN port is a remote network port for connecting computers in local area networks or domain networks in different regions to communicate; in the embodiment of the invention, when the data receiving port is the LAN port, the transmission mode is determined to be an uplink transmission mode; and when the data receiving port is a WAN port, determining that the transmission mode is a downlink transmission mode.
As an optional embodiment, when it is determined that the transmission mode is the uplink transmission mode, performing acceleration processing on the target data by using an acceleration mode to obtain data to be transmitted, includes: when the VPN dialing is detected, recording VPN dialing information by using a hardware acceleration engine; performing NAT conversion on an intranet IP by using a hardware acceleration engine to obtain first message information; adding VPN (virtual private network) head information and public network IP (Internet protocol) head information to the first message information based on VPN dialing information by utilizing an acceleration engine drive corresponding to a hardware acceleration engine to obtain second message information; and adding Ethernet type header information to the second message by using a hardware acceleration engine to obtain data to be transmitted.
In the above optional embodiment, when detecting a VPN dialing, the hardware acceleration engine is used to record information of the VPN dialing (that is, the information includes a PPTP protocol and an L2TP protocol), then the hardware acceleration engine is used to perform NAT conversion on the intranet IP (that is, perform first layer acceleration), then after receiving a message (that is, a first message) after the intranet IP conversion, the hardware acceleration engine drives to add VPN header information and public network IP header information, and then the hardware acceleration engine drives to add public network ethernet header information (that is, perform second layer acceleration).
Fig. 4 is a flowchart of a hardware acceleration engine driving recording VPN dialing information according to an embodiment of the present invention, and as shown in fig. 4, when a router performs VPN dialing, the hardware acceleration engine driving recording VPN dialing information for forwarding a subsequent message, where it should be noted that contents in the PPTP protocol mainly include, but are not limited to: public network source IP, public network destination IP, source Callid (i.e., the id of the outgoing call) and destination Callid (i.e., the id of the incoming call); the L2TP protocol records mainly include but are not limited to: public network source IP, public network destination IP, source port, destination port, Tunnel id, and Session id.
As an optional embodiment, the method for obtaining the second message information by adding the VPN header information and the public network IP header information to the first message information based on the VPN dialing information by using an acceleration engine driver corresponding to a hardware acceleration engine includes: respectively adding PPP protocol header information to the first message information through a PPTP protocol and an L2TP protocol to obtain third message information and fourth message information; adding GRE protocol header information to the third message information by using the VPN dialing information to obtain fifth message information, and adding L2TP protocol header information to the fourth message information by using the VPN dialing information to obtain sixth message information; and adding header information to the fifth message information and the sixth message information according to the VPN dialing information to obtain second message information.
It should be noted that, the LAN PC sends out an ICMP message with a source of 192.168.1.100 and a destination IP of 12.0.0.200, the first layer hardware acceleration changes the source IP to 10.0.0.30 (intranet IP for VPN dialing), then the driver software sequentially adds a PPP header, a VPN header, and a public network IP header, and then gives the result to the hardware acceleration engine to send a packet, and the hardware acceleration engine automatically fills the public network ethernet header (i.e. the second layer hardware acceleration)
As an optional embodiment, when it is determined that the transmission mode is the uplink transmission mode, sending the data to be transmitted includes sending the data to be transmitted through a WAN port.
Fig. 5 is a flowchart of an uplink processing logic according to an embodiment of the present invention, and as shown in fig. 5, when it is determined that the transmission mode is an uplink transmission mode, first, a LAN port receives a message, and performs NAT conversion on an intranet IP by using a hardware acceleration engine (i.e., performs first layer acceleration), then, after receiving a message after the intranet IP conversion (i.e., a first message) by using a hardware acceleration engine driver, the hardware acceleration engine driver adds VPN header information and public network IP header information, then, the hardware acceleration engine driver adds public network ethernet header information (i.e., performs second layer acceleration), and finally, sends data from a WAN port.
As an optional embodiment, when it is determined that the transmission mode is the downlink transmission mode, performing acceleration processing on the target data by using an acceleration mode to obtain data to be transmitted, includes: when the VPN dialing is detected, recording VPN dialing information by using a hardware acceleration engine; removing the Ethernet header information by using a hardware acceleration engine to obtain seventh message information; removing the VPN header information and the public network IP header information of the seventh message information by using an acceleration engine drive corresponding to a hardware acceleration engine to obtain eighth message information; and when the hardware acceleration engine receives the eighth message information, performing NAT (network address translation) conversion on the intranet IP to obtain data to be transmitted.
As an optional embodiment, when determining that the transmission mode is the downlink transmission mode, sending the data to be transmitted includes: and sending the data to be transmitted out through the LAN port.
Fig. 6 is a flowchart of a downlink processing logic according to an embodiment of the present invention, as shown in fig. 6, when it is determined that the transmission mode is downlink transmission, the hardware acceleration engine removes the ethernet header information of the public network (i.e., performs a first layer acceleration process), then the hardware acceleration engine drives to remove the IP header of the public network, then the hardware acceleration engine drives to remove the VPN header, then sends the packet to the hardware acceleration engine to perform NAT conversion on the intranet IP (i.e., performs a second layer acceleration process), and finally sends out the data from the LAN port.
Fig. 7 is a flowchart of adding VPN header information and a public network IP header by a hardware acceleration engine driver according to an embodiment of the present invention, and as shown in fig. 7, the adding VPN header information and the public network IP header by the hardware acceleration engine driver are divided into a PPTP protocol and an L2TP protocol, where in the PPTP protocol, a PPP protocol header is added first, a GRE protocol header is added according to a recorded Call id, and finally, public network IP header information is added according to a recorded public network source IP and a public network destination IP; in the L2TP protocol, a PPP protocol header is added firstly, then L2TP header information is added according to recorded Tunnel id and Session id, then a UDP header is added according to recorded public network source port and destination port information, and finally public network IP header information is added according to recorded public network source IP and public network destination IP.
As can be seen from the above, the method, i.e., the method and system for accelerating VPN hardware provided by the embodiment of the present invention mainly include, but are not limited to: a hardware acceleration engine and a hardware acceleration engine driver. Wherein, the hardware acceleration engine can perform simple NAT conversion. The hardware acceleration engine driver is used for generating a hardware acceleration item and configuring the hardware acceleration item into the hardware acceleration engine; the hardware acceleration engine driver records VPN dialing information when the router performs VPN dialing, and is used for adding VPN protocol header information in an uplink process and removing the VPN protocol header information in a downlink process. The method provided by the embodiment of the invention can also be used for two VPN protocols, namely PPTP and L2TP, when sending uplink data, the hardware acceleration engine is used for carrying out NAT conversion of an inner layer, and then the uplink data is handed to the hardware acceleration engine to drive, then the head information of the VPN protocol is added, and then the uplink data is handed to the hardware acceleration engine to be sent out; when receiving the downlink data, the hardware acceleration engine receives the VPN data packet, delivers the VPN data packet to the hardware acceleration engine to drive and remove the VPN protocol header information, and then delivers the VPN protocol header information to the hardware acceleration engine to perform NAT conversion and then sends the VPN protocol header information out.
Therefore, the VPN hardware acceleration method and system provided in the embodiments of the present invention implement hardware acceleration for a complex VPN protocol by using a simple hardware acceleration engine capable of serving as a hardware NAT, and performing addition and removal of VPN protocol header information in cooperation with driver software, and perform hierarchical acceleration, thereby simplifying the design of the network hardware acceleration engine, and being capable of supporting multiple VPN protocols, having strong expandability, reducing the delay of VPN data forwarding, and improving the throughput of VPN data.
Example 2
According to another aspect of the embodiments of the present invention, there is also provided a data transmission apparatus based on hardware acceleration, and fig. 8 is a schematic diagram of the data transmission apparatus based on hardware acceleration according to the embodiments of the present invention, as shown in fig. 8, including: a first determination module 81, a second determination module 83, an acceleration processing module 85, and a sending module 87. The following describes the data transmission apparatus based on hardware acceleration.
A first determining module 81, configured to determine a transmission mode of target data when the target data is acquired;
a second determining module 83, configured to determine an acceleration manner of the target data based on the transmission manner;
the acceleration processing module 85 is configured to perform acceleration processing on the target data in an acceleration manner to obtain data to be transmitted;
the sending module 87 is configured to send data to be transmitted.
It should be noted here that the first determining module 81, the second determining module 83, the acceleration processing module 85 and the sending module 87 correspond to steps S302 to S308 in embodiment 1, and the modules are the same as the corresponding steps in implementation examples and application scenarios, but are not limited to the disclosure in embodiment 1. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
As can be seen from the above, in the embodiment of the present invention, first, when the target data is obtained, the first determining module 81 may be used to determine a transmission mode of the target data; the acceleration mode of the target data can then be determined by means of the second determination module 83 on the basis of the transmission mode; then, the target data may be accelerated by the acceleration processing module 85 in an acceleration mode to obtain data to be transmitted; finally, the data to be transmitted can be transmitted by means of the transmission module 87. The data transmission device based on hardware acceleration provided by the embodiment of the invention achieves the purpose that the acceleration mode of the target data is determined based on the data transmission mode so as to accelerate the target data, thereby realizing the technical effect of reducing network delay and further solving the technical problems of high network delay and poor user experience caused by less protocols supported by the acceleration engine of the router in the related technology.
Optionally, the first determining module includes: a first determination unit for determining a data reception port of the target data; a second determining unit, configured to determine that the transmission mode is an uplink transmission mode when the data receiving port is a LAN port; and the third determining unit is used for determining that the transmission mode is a downlink transmission mode when the data receiving port is a WAN port.
Optionally, the acceleration processing module comprises: the first recording unit is used for recording VPN dialing information by using a hardware acceleration engine when the VPN dialing is detected; the conversion unit is used for carrying out NAT conversion on the intranet IP by utilizing a hardware acceleration engine to obtain first message information; the first adding unit is used for adding VPN (virtual private network) head information and public network IP (Internet protocol) head information to the first message information based on VPN dialing information by utilizing an acceleration engine drive corresponding to a hardware acceleration engine to obtain second message information; and the second adding unit is used for adding the Ethernet type head information to the second message by using the hardware acceleration engine to obtain the data to be transmitted.
Optionally, the first adding unit includes: the first adding subunit is configured to add PPP protocol header information to the first message information through a PPTP protocol and an L2TP protocol, respectively, to obtain third message information and fourth message information; a second adding subunit, configured to add GRE protocol header information to the third message information by using the VPN dialing information to obtain fifth message information, and add L2TP protocol header information to the fourth message information by using the VPN dialing information to obtain sixth message information; and the third adding subunit is used for adding the header information to the fifth message information and the sixth message information according to the VPN dialing information so as to obtain second message information.
Optionally, the second determining unit includes: and the first sending subunit is used for sending the data to be transmitted out through the WAN port.
Optionally, the acceleration processing module comprises: the second recording unit is used for recording VPN dialing information by using a hardware acceleration engine when the VPN dialing is detected; the first removing unit is used for removing the Ethernet header information by using a hardware acceleration engine to obtain seventh message information; a second removing unit, configured to remove VPN header information and public network IP header information of the seventh message information by using an acceleration engine driver corresponding to the hardware acceleration engine, to obtain eighth message information; and the conversion unit is used for carrying out NAT conversion on the intranet IP to obtain the data to be transmitted when the hardware acceleration engine receives the eighth message information.
Optionally, the third determining unit includes: and the second sending unit is used for sending the data to be transmitted out through the LAN port.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored computer program, wherein when the computer program is executed by a processor, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned data transmission methods based on hardware acceleration.
Example 4
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a computer program, where the computer program executes the method for data transmission based on hardware acceleration in any of the foregoing.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A data transmission method based on hardware acceleration is characterized by comprising the following steps:
when target data are acquired, determining a transmission mode of the target data;
determining an acceleration mode of the target data based on the transmission mode;
accelerating the target data by using the acceleration mode to obtain data to be transmitted;
and sending the data to be transmitted.
2. The method of claim 1, wherein determining the transmission mode of the target data comprises:
determining a data receiving port of the target data;
when the data receiving port is a LAN port, determining that the transmission mode is an uplink transmission mode;
and when the data receiving port is a WAN port, determining that the transmission mode is a downlink transmission mode.
3. The method according to claim 2, wherein the accelerating the target data by using the accelerating method to obtain the data to be transmitted comprises:
when the VPN dialing is detected, recording VPN dialing information by using a hardware acceleration engine;
and processing the corresponding network information by using a hardware acceleration engine according to the transmission mode to obtain the data to be transmitted.
4. The method of claim 3, wherein processing the corresponding network information by using a hardware acceleration engine according to the transmission mode to obtain the data to be transmitted comprises:
processing the network information corresponding to the transmission mode by using a hardware acceleration engine to obtain first message information;
and processing the first message information by using an acceleration engine drive corresponding to the hardware acceleration engine to obtain the data to be transmitted.
5. The method according to claim 4, wherein processing the network information corresponding to the transmission mode by using a hardware acceleration engine to obtain first message information comprises:
when the transmission mode is uplink data, performing NAT (network address translation) conversion on an intranet IP (Internet protocol) by using the hardware acceleration engine to obtain first sub-message information;
and when the transmission mode is downlink data, removing the Ethernet header information by using a hardware acceleration engine to obtain second sub-message information.
6. The method according to claim 4, wherein processing the first packet information by using an acceleration engine driver corresponding to the hardware acceleration engine to obtain the data to be transmitted comprises:
when the transmission mode is uplink data, adding VPN head information and public network IP head information to the first message information based on the VPN dialing information by using an acceleration engine drive corresponding to the hardware acceleration engine to obtain second message information;
and adding Ethernet type header information to the second message by using the hardware acceleration engine to obtain the data to be transmitted.
7. The method according to claim 4, wherein processing the first packet information by using an acceleration engine driver corresponding to the hardware acceleration engine to obtain the data to be transmitted comprises:
when the transmission mode is downlink data, driving and removing VPN (virtual private network) head information and public network IP (Internet protocol) head information of the first message information by using an acceleration engine corresponding to the hardware acceleration engine to obtain third message information;
and when the hardware acceleration engine receives the third message information, performing NAT (network address translation) conversion on the intranet IP to obtain the data to be transmitted.
8. A data transmission apparatus based on hardware acceleration, comprising:
the first determining module is used for determining a transmission mode of the target data when the target data is obtained;
a second determining module, configured to determine an acceleration mode of the target data based on the transmission mode;
the acceleration processing module is used for carrying out acceleration processing on the target data by utilizing the acceleration mode to obtain data to be transmitted;
and the sending module is used for sending the data to be transmitted.
9. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program is executed by a processor, the computer-readable storage medium controls an apparatus to execute the data transmission method based on hardware acceleration according to any one of claims 1 to 7.
10. A processor, characterized in that the processor is configured to run a computer program, wherein the computer program is configured to execute the data transmission method based on hardware acceleration according to any one of the preceding claims 1 to 7 when running.
CN202210483009.7A 2022-05-05 2022-05-05 Data transmission method based on hardware acceleration, device and processor thereof Pending CN114978806A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210483009.7A CN114978806A (en) 2022-05-05 2022-05-05 Data transmission method based on hardware acceleration, device and processor thereof
PCT/CN2023/082596 WO2023213148A1 (en) 2022-05-05 2023-03-20 Hardware acceleration-based data transmission method and apparatus thereof, and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210483009.7A CN114978806A (en) 2022-05-05 2022-05-05 Data transmission method based on hardware acceleration, device and processor thereof

Publications (1)

Publication Number Publication Date
CN114978806A true CN114978806A (en) 2022-08-30

Family

ID=82980620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210483009.7A Pending CN114978806A (en) 2022-05-05 2022-05-05 Data transmission method based on hardware acceleration, device and processor thereof

Country Status (2)

Country Link
CN (1) CN114978806A (en)
WO (1) WO2023213148A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023213148A1 (en) * 2022-05-05 2023-11-09 联洲集团有限公司 Hardware acceleration-based data transmission method and apparatus thereof, and processor

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6678828B1 (en) * 2002-07-22 2004-01-13 Vormetric, Inc. Secure network file access control system
CN201860343U (en) * 2010-09-13 2011-06-08 上海海加网络科技有限公司 SSL VPN security gateway based on FPGA hardware acceleration
CN203722745U (en) * 2014-01-25 2014-07-16 苏州鑫日通电子科技有限公司 Remote automatic monitoring device for ATM security equipment
CN104168210A (en) * 2014-08-08 2014-11-26 网宿科技股份有限公司 Network software accelerating system based on intelligent routing
CN104468315A (en) * 2014-12-16 2015-03-25 上海市共进通信技术有限公司 Method for accelerating VPN based on intelligent gateway
CN105205031A (en) * 2014-06-16 2015-12-30 丹·C·康 Distributed operation system and operation method for distributed system
CN105656994A (en) * 2014-12-31 2016-06-08 华为技术有限公司 Business acceleration method and device
CN106375128A (en) * 2016-09-14 2017-02-01 网宿科技股份有限公司 Acceleration access method, device and equipment based on PPTP VPN (point to point tunneling protocol virtual private network)
US20170366455A1 (en) * 2016-06-21 2017-12-21 Telefonaktiebolaget Lm Ericsson (Publ) Dynamic lookup optimization for packet classification
CN110321192A (en) * 2019-04-29 2019-10-11 上海连尚网络科技有限公司 A kind of method and apparatus that boarding program is presented
CN110557320A (en) * 2019-09-11 2019-12-10 上海市共进通信技术有限公司 System and method for realizing VPN plug-in sea panning acceleration function based on home intelligent gateway
CN111510513A (en) * 2020-01-03 2020-08-07 普联国际有限公司 MAP-E link acceleration method, device, storage medium and network equipment
CN112003792A (en) * 2020-07-23 2020-11-27 烽火通信科技股份有限公司 Software and hardware cooperative message acceleration method and device
CN113839881A (en) * 2021-09-24 2021-12-24 广州通则康威智能科技有限公司 Router speed limiting method and device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404221A (en) * 2011-11-27 2012-04-04 深圳市掌控无限科技有限公司 Multi-link aggregated data transmitting method and system
CN104767679B (en) * 2014-01-08 2018-12-18 腾讯科技(深圳)有限公司 A kind of method and device for transmitting data in network system
US20150295729A1 (en) * 2014-04-09 2015-10-15 Lokesh Bevinamarad Hardware accelerator for tunnel processing
CN106101617B (en) * 2016-06-08 2020-04-10 浙江宇视科技有限公司 Message transmission method, device and system
CN114978806A (en) * 2022-05-05 2022-08-30 上海联虹技术有限公司 Data transmission method based on hardware acceleration, device and processor thereof

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6678828B1 (en) * 2002-07-22 2004-01-13 Vormetric, Inc. Secure network file access control system
CN201860343U (en) * 2010-09-13 2011-06-08 上海海加网络科技有限公司 SSL VPN security gateway based on FPGA hardware acceleration
CN203722745U (en) * 2014-01-25 2014-07-16 苏州鑫日通电子科技有限公司 Remote automatic monitoring device for ATM security equipment
CN105205031A (en) * 2014-06-16 2015-12-30 丹·C·康 Distributed operation system and operation method for distributed system
CN104168210A (en) * 2014-08-08 2014-11-26 网宿科技股份有限公司 Network software accelerating system based on intelligent routing
CN104468315A (en) * 2014-12-16 2015-03-25 上海市共进通信技术有限公司 Method for accelerating VPN based on intelligent gateway
CN105656994A (en) * 2014-12-31 2016-06-08 华为技术有限公司 Business acceleration method and device
US20170366455A1 (en) * 2016-06-21 2017-12-21 Telefonaktiebolaget Lm Ericsson (Publ) Dynamic lookup optimization for packet classification
CN106375128A (en) * 2016-09-14 2017-02-01 网宿科技股份有限公司 Acceleration access method, device and equipment based on PPTP VPN (point to point tunneling protocol virtual private network)
CN110321192A (en) * 2019-04-29 2019-10-11 上海连尚网络科技有限公司 A kind of method and apparatus that boarding program is presented
CN110557320A (en) * 2019-09-11 2019-12-10 上海市共进通信技术有限公司 System and method for realizing VPN plug-in sea panning acceleration function based on home intelligent gateway
CN111510513A (en) * 2020-01-03 2020-08-07 普联国际有限公司 MAP-E link acceleration method, device, storage medium and network equipment
CN112003792A (en) * 2020-07-23 2020-11-27 烽火通信科技股份有限公司 Software and hardware cooperative message acceleration method and device
CN113839881A (en) * 2021-09-24 2021-12-24 广州通则康威智能科技有限公司 Router speed limiting method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
丁湘陵;陈光仪;: "Linux环境下的VPN异步加密模式的实现", 计算机与现代化, no. 10 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023213148A1 (en) * 2022-05-05 2023-11-09 联洲集团有限公司 Hardware acceleration-based data transmission method and apparatus thereof, and processor

Also Published As

Publication number Publication date
WO2023213148A1 (en) 2023-11-09

Similar Documents

Publication Publication Date Title
US7516216B2 (en) Generating traffic for testing a system under test
JP4640128B2 (en) Response communication device and ARP response communication device
Macfarlane Network routing basics: Understanding IP routing in Cisco systems
US7953097B2 (en) Neighbour discovery protocol mediation
CA2318126A1 (en) Proxy server for tcp/ip network address portability
US8180856B2 (en) Testing a network
EP2469787A1 (en) Method and device for preventing network attacks
WO2015143802A1 (en) Service function chaining processing method and device
CN110430076B (en) Route management method and device
JP2011517208A (en) Hardware interface to enable direct access and security assessment sharing
EP3544244B1 (en) Proxy advertisements in multihomed networks
JP2010531621A (en) Method and apparatus for providing protocol translation in support of IMS services
CN114978806A (en) Data transmission method based on hardware acceleration, device and processor thereof
US9042369B2 (en) System and method for reflecting FEC route information
CN106685695B (en) Fault detection method and equipment thereof
CN113132218B (en) Home gateway access method, device, system processor and storage medium
EP2357761B1 (en) Proxy method of media stream, voice exchanger and communication system
WO2018176510A1 (en) Pppoe message transmission method and pppoe server
US20060120361A1 (en) Method and system for providing packet data services
CN112929277B (en) Message processing method and device
Cisco General Commands
WO2021179979A1 (en) Method for generating segment identifier (sid), and network device
EP1678880B1 (en) Communications apparatus and method
CN114827078A (en) Node access method and data transmission system
Cisco Connection Commands

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination