Network acceleration method and system, client device, exit point device and storage medium
By double encapsulating the transport layer sessions between the game client and the game server, the disconnection and reconnection problem caused by intermediate node failure is solved, and more stable online game data transmission is achieved.
Patent Information
- Application Number
- CN202510101182.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-13
AI Technical Summary
When the node in the middle of the transmission line fails, the game client will cause disconnection and reconnection, affecting the game experience.
By double encapsulating the transport layer session between the game client and the game server, accelerated data is generated and data transmission is achieved while maintaining the transport layer session, avoiding the impact of intermediate node failures.
When the nodes in the middle of the transmission line fail, the game client is disconnected and reconnected, which improves the quality and stability of online game data transmission.
Smart Images

Figure CN119996476A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of networks, and in particular, relates to a network acceleration method and system, a client device, an exit point device, and a computer-readable storage medium. Background Art
[0002] During the online game, the client device running the game client and the game server need to continuously transmit game data to each other, and this transmission is generally carried out through the public network. Due to the complexity of the public network lines, data transmission often becomes congested or delayed.
[0003] In order to reduce latency, the online game accelerator business has emerged. The system that supports the accelerator business generally includes servers located at multiple different addresses / belonging to different operators. The servers are connected by dedicated lines. When using the accelerator, the system will allocate appropriate servers as access point devices and exit point devices for game acceleration based on the principle of low latency. Taking uplink data as an example, the accelerator obtains game data from the game client, encapsulates the game data according to the transport layer session between the accelerator and the access point device, and sends the game data to the access point device via the public network. The access point device sends the game data to the exit point device via a dedicated line, and the exit point device sends the game data to the game server via the public network.
[0004] In the transmission line of client device - access point device - exit point device - game server, a transport layer session needs to be established between adjacent devices before data transmission can be carried out. If any of the nodes fails and is disconnected, the original transport layer session context is lost. After restarting, the original transport layer session cannot be used and needs to be re-established. This causes the game client to need to disconnect and reconnect due to the failure of the intermediate node of the transmission line. Summary of the invention
[0005] The embodiments of the present application provide a network acceleration method and system, a client device, an exit point device, and a computer-readable storage medium, which can solve the problem in the related art that a game client may need to disconnect and reconnect due to a failure of an intermediate node in the transmission line.
[0006] In a first aspect, an embodiment of the present application provides a network acceleration method, the method comprising: obtaining first game data from a game client; doubly encapsulating the first game data based on a transport layer session between the game client and the game server to obtain first acceleration data, so as to achieve accelerated transmission of the first game data while maintaining the transport layer session between the game client and the game server; sending the first acceleration data to an access point device to notify the access point device to send the first acceleration data to the game server via the exit point device indicated by the first acceleration data.
[0007] In a second aspect, an embodiment of the present application provides a network acceleration method, the method comprising: receiving first acceleration data sent by a client device via an access point device according to the method described in the first aspect above; reading first encapsulated data in the first acceleration data; performing address conversion on the first encapsulated data according to a network address conversion rule; and sending the first encapsulated data to a game server through a physical network card allocated to the client device.
[0008] In a third aspect, an embodiment of the present application provides a network acceleration method, the method comprising: receiving second encapsulated data from a game server, the second encapsulated data being obtained by the game server encapsulating second game data based on a transport layer session between a game client and the game server; encapsulating the second encapsulated data again to obtain second acceleration data, so as to achieve accelerated transmission of the second encapsulated data while maintaining the transport layer session between the game client and the game server; and sending the second acceleration data to an access point device to notify the access point device to send the second acceleration data to a client device running the game client.
[0009] In a fourth aspect, an embodiment of the present application provides a network acceleration method, the method comprising: receiving second acceleration data sent by an exit point device via an access point device according to the method described in the third aspect above; reading second encapsulation data in the second acceleration data; reading second game data in the second encapsulation data; and sending the second game data to a game client.
[0010] In a fifth aspect, an embodiment of the present application provides a network acceleration method, the method comprising: a client device obtains first game data from a game client; the client device double-encapsulates the first game data based on a transport layer session between the game client and the game server to obtain first acceleration data, so as to achieve accelerated transmission of the first game data while maintaining the transport layer session between the game client and the game server; the client device sends the first acceleration data to an access point device; the access point device reads the exit point device information in the first acceleration data; the access point device sends the first acceleration data to the exit point device; the exit point device reads the first encapsulated data in the first acceleration data; the exit point device performs address conversion on the first encapsulated data according to a network address conversion rule; the exit point device sends the first encapsulated data to the game server via a physical network card allocated to the client device.
[0011] In a sixth aspect, an embodiment of the present application provides a network acceleration method, the method comprising: an exit point device receives second encapsulated data from a game server, the second encapsulated data is obtained by the game server encapsulating second game data based on a transport layer session between a game client and the game server; the exit point device re-encapsulates the second encapsulated data to obtain second acceleration data, so as to achieve accelerated transmission of the second encapsulated data while maintaining the transport layer session between the game client and the game server; the exit point device sends the second acceleration data to the access point device; the access point device sends the second acceleration data to the client device; the client device reads the second encapsulated data in the second acceleration data; the client device reads the second game data in the second encapsulated data; the client device sends the second game data to the game client.
[0012] In an eighth aspect, an embodiment of the present application provides a client device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the network acceleration method described in the first aspect or the fourth aspect when executing the computer program.
[0013] In a ninth aspect, an embodiment of the present application provides an exit point device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein when the processor executes the computer program, the network acceleration method described in the second or third aspect above is implemented.
[0014] In the tenth aspect, an embodiment of the present application provides a network acceleration system, including the client device, access point device and exit point device described in the eighth aspect, the access point device communicates with the client device through a public network and with the exit point device through a dedicated line.
[0015] In the eleventh aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the network acceleration method described in any one of the first to fourth aspects above.
[0016] In a twelfth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the network acceleration method described in any one of the first to fourth aspects above.
[0017] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by obtaining the first game data from the game client; based on the transport layer session between the game client and the game server, the first game data is double-encapsulated to obtain the first acceleration data, so as to realize the accelerated transmission of the first game data while maintaining the transport layer session between the game client and the game server; the first acceleration data is sent to the access point device to notify the access point device to send the first acceleration data to the game server via the exit point device indicated by the first acceleration data, and through double encapsulation, the first game data is accelerated while maintaining the transport layer session between the game client and the game server. The change of the transmission information in the transmission line will only affect the part of the double encapsulation actually used for accelerated transmission, and will not affect the part of maintaining the transport layer session between the game client and the game server. For the game client, the game data transmission is always based on the transport layer session between the game client and the game server, and is fixed during the entire acceleration process. Therefore, the failure and disconnection of the intermediate node of the transmission line will not cause the game client to disconnect and reconnect, thus avoiding unnecessary disconnection and reconnection, and improving the quality of online game data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art 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 work.
[0019] Figure 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of the structure of a network acceleration system provided by an embodiment of the present application;
[0021] Figure 3 It is a flowchart of a network acceleration method provided by an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a first package provided by an accelerator in a specific example of the present application when the accelerator obtains first game data at the application layer;
[0023] Figure 5 is a schematic diagram of a first package provided by an accelerator in a specific example of the present application when acquiring first game data at a network layer;
[0024] Figure 6 is a flowchart of a network acceleration method provided by another embodiment of the present application;
[0025] Figure 7 is a flowchart of a network acceleration method provided by another embodiment of the present application;
[0026] Figure 8 is a schematic diagram of the structure of a network acceleration device provided by an embodiment of the present application;
[0027] Fig. 9 It is a structural diagram of a network acceleration device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0028] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0029] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0030] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0031] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0032] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0033] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0034] The network acceleration method provided in the embodiments of the present application can be applied to electronic devices, including but not limited to servers, server clusters, mobile phones, tablet computers, laptop computers, desktop computers, personal digital assistants, wearable devices and other electronic devices with computing functions. Electronic devices can be used as different nodes in the transmission line, such as client devices, access point devices, exit point devices, etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0035] Figure 1 FIG. 1 is a block diagram of a partial structure of an electronic device provided by an embodiment of the present application. Figure 1 , the electronic device includes: a processor 10, a memory 20, a bus 30, an input device 40, an output device 50 and a communication device 60. The processor 10 and the memory 20 are connected to each other through the bus 30, and the input device 40, the output device 50 and the communication device 60 are also connected to the bus 30. Those skilled in the art can understand that Figure 1 The structure of the electronic device shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0036] Combine the following Figure 1 A detailed introduction to the various components of electronic equipment:
[0037] The processor 10 is the control center of the electronic device, and can run the program stored in the memory 20 to perform various functions and process data. The processor 10 can be a central processing unit (CPU), and the processor 10 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In some embodiments, the processor 10 may include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0038] The memory 20 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of computer programs. The memory 20 can also be used to temporarily store data required for executing the program and generated. The memory 20 may include a high-speed random access memory, and may also include a non-volatile memory, such as a flash memory, a hard disk, a multimedia card, a card-type memory, etc. The memory 20 may include a storage unit disposed inside the electronic device, such as a hard disk of the electronic device, and / or a removable external storage unit, such as a mobile hard disk, a USB flash drive, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, etc.
[0039] The input device 40 may include at least one of a keyboard, a mouse, a touch panel, a joystick, etc., and is used to collect user input operations to generate corresponding operation instructions.
[0040] The output device 50 is used to output information to be provided to the user. The output device 50 generally includes a display, and optionally, a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. can be used. In addition, the output device can further include a speaker.
[0041] The communication device 60 may include a modem, a network card, etc., and is used to establish a network connection with other electronic devices and communicate with each other.
[0042] The network acceleration method provided in the embodiment of the present application can be implemented as a computer software program. For example, the embodiment of the present application provides a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 60, and / or installed from a removable external storage unit. When the computer program is executed by the processor 10, the various functions defined in the network acceleration method provided in the embodiment of the present application are implemented.
[0043] Figure 2 The block diagram shows a partial structure of a network acceleration system provided by an embodiment of the present application. The network acceleration system includes a client device 1, an access point device 2, and an exit point device 3. The access point device is connected to the client device 1 and the exit point device 3 in communication, for example, the access point device 2 is connected to the client device 1 in communication via a public network, and the access point device 2 is connected to the exit point device 3 in communication via a dedicated line.
[0044] The client device 1 runs a game client and an online game accelerator (accelerator for short). The access point device 2 and the exit point device 3 are part of a system that supports the online game accelerator service. For ease of description, Figure 2 The number of the access point device 2 and the exit point device 3 shown in the figure is 1, and there may be more in actual applications. The specific functions of the client device 1, the access point device 2 and the exit point device 3 may refer to the description of the subsequent embodiments.
[0045] For ease of understanding, the protocol stack and network layer involved in this application are briefly described below.
[0046] The Open System Interconnect seven-layer network model is an abstract framework for understanding and designing computer network architecture, including the physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and application layer arranged from bottom to top. Each layer provides services to the upper layer and depends on the services provided by the lower layer. This modular design makes it easier to develop, understand, and maintain network protocols and services. Different protocols work at different layers, allowing different devices in the network to communicate with each other. Not all systems using the OSI model implement every layer.
[0047] There are many alternatives to the OSI model, and the Transmission Control Protocol (TCP) / Internet Protocol (IP) model is currently the most commonly used. The TCP / IP model is a four-layer network model, which is the application layer, transport layer, network layer, and link physical layer from top to bottom.
[0048] The layers mainly involved in this application are the transport layer and the network layer, both of which exist in the OSI model and the TCP / IP model. For ease of description, the TCP / IP model is used as an example for explanation below.
[0049] In the TCP / IP model, the transport layer is used to process data from the application layer, format data streams, and provide reliable transmission to ensure that data is delivered intact to the network layer. Common protocols in the transport layer are TCP and User Datagram Protocol (UDP). TCP is more reliable, but UDP has higher transmission efficiency and lower latency.
[0050] Online games have high requirements for latency, so UDP protocol is often used in the transport layer. In the embodiments of this application, UDP protocol is used as an example for the transport layer. Other protocols can be used in the actual transport layer. The main features of UDP protocol are connectionless and no reliable transmission is guaranteed. Its header includes source port number and destination port number.
[0051] The network layer is responsible for establishing and terminating network connections and addressing and routing to ensure that data is transmitted to the destination. The protocol used by the network layer is generally the IP protocol, and its header includes the source IP address and the destination IP address.
[0052] Before starting the transmission, the sender generally establishes a transport layer session with the receiver. Taking UDP as an example, after the UDP session is established, the sender and the receiver exchange each other's IP addresses and the UDP port number assigned to the session. The four-element array formed by the sender's IP address and port number and the receiver's IP address and port number can also be called the context of the UDP session. Both parties save the context for subsequent data transmission.
[0053] Regardless of the network model, in the process of data transmission, the sender generally passes data down layer by layer starting from the application layer until it is sent out through the physical medium. The intermediate layers can add their own headers (also called protocol headers or headers) to the received data before passing it down. This process can also be called encapsulation. The receiving end passes data up layer by layer, removes the encapsulation of its own layer at each intermediate layer, and finally realizes the delivery of data from the application layer of the sender to the application layer of the receiver.
[0054] The names of processing objects at different layers in the network model are different. In the embodiments of the present application, these names are unified as data to simplify the description.
[0055] Taking the TCP / IP model as an example, at the sending end, the game data (belonging to the application layer) is passed to the transport layer. The transport layer adds a UDP header before the game data and then passes it to the network layer. The network layer adds an IP header before the UDP header and then passes it to the link physical layer. The link physical layer adds an Ethernet header before the IP header and then sends it out.
[0056] In the related art, without game acceleration, the client device establishes a UDP session with the game server through the game client to determine and save the context used for communication between the two.
[0057] When using traditional game acceleration, the client device establishes a UDP session with the access point device through the accelerator to determine and save the context used for communication between the two. After acceleration is turned on, the client device obtains game data from the game client through the accelerator. This process can also be called game traffic hijacking, which can occur at the application layer or the transport layer. Taking the application layer as an example, the accelerator can encapsulate the game data according to the aforementioned UDP session context between the access point device and the access point device. When the intermediate node of the acceleration line, such as the access point device, is disconnected and restarted, the original context is lost and cannot continue to be transmitted. It is necessary to disconnect and re-establish the UDP session between the accelerator and the access point device, causing the game client to be disconnected.
[0058] Figure 3 A schematic flowchart of a network acceleration method provided in an embodiment of the present application is shown. As an example but not a limitation, the method can be applied to the above-mentioned network acceleration system.
[0059] S10: The client device obtains acceleration line information through the accelerator.
[0060] The client device can obtain the acceleration line information from the control server through the accelerator, including the acceleration IP address, access point device information and exit point device information. The control server can be an independent server, or an access point device or an exit point device.
[0061] The acceleration IP address is a virtual IP address assigned to the game client and remains unchanged during the entire acceleration process. The number of access point devices and exit point devices can be determined according to actual needs. For example, when multiple lines are used for acceleration, the number of access point devices and / or exit point devices can be greater than 1.
[0062] After acquiring the access point device information, the client device may establish a transport layer session with the access point device through the accelerator for use in subsequent accelerated transmission of the first accelerated data.
[0063] S11: The client device establishes a transport layer session with the game server through the game client.
[0064] S12: The client device obtains the first game data from the game client through the accelerator.
[0065] S10 only needs to be executed before S13, and S11 only needs to be executed before S12. The execution order between the two is only for illustration and there is no actual restriction.
[0066] S12-S19 describes the transmission process of the first game data from the client device to the game server, and the first game data can also be called the uplink game data. S20-S28 describes the transmission process of the second game data from the game server to the client device, and the second game data can also be called the downlink game data. The execution order between S12-S19 and S20-S28 is only for illustration and there is no actual limitation.
[0067] The accelerator can obtain the first game data at the application layer or the transport layer, and this process can also be called hijacking the first game data.
[0068] S13: The client device double-encapsulates the first game data based on the transport layer session between the game client and the game server to obtain first acceleration data.
[0069] The double encapsulation may include a first encapsulation and a second encapsulation, wherein the first encapsulation is based on a transport layer session between a game client and a game server, and the second encapsulation is generally based on a transport layer session between an accelerator and an access point device, including information required for delivery to the access point device.
[0070] The first accelerated data is obtained through double encapsulation. The inner first encapsulation ensures that the game client always uses the transport layer session between the game client and the game server for communication, and is not affected by the intermediate nodes in the acceleration line. The outer second encapsulation enables the game data to be transmitted in the acceleration line, thereby achieving accelerated transmission of the first game data while maintaining the transport layer session between the game client and the game server.
[0071] Specifically, the first game data can be first encapsulated based on the transport layer session between the game client and the game server to obtain first encapsulated data, where the first encapsulated data includes information about the transport layer session between the game client and the game server and acceleration line information used for accelerated transmission.
[0072] According to the network model, the first encapsulation includes adding a first transport layer protocol header and a first IP header to the first game data, wherein the first transport layer protocol header is determined based on a transport layer session between the game client and the game server.
[0073] The accelerator may hijack the first game data at the application layer or the network layer. Depending on the method of obtaining the first game data, the first encapsulation may also be implemented in different ways.
[0074] If the accelerator obtains the first game data at the application layer, it can add the first transport layer protocol header, the first IP header and the special protocol header to the first game data to obtain the first encapsulated data, the first Internet Protocol IP header includes the source IP address and the target IP address, the source IP address is the acceleration IP address, and the target IP address is the IP address of the game server. The acceleration IP address is the virtual IP address assigned to the game client.
[0075] If the accelerator obtains the first game data at the network layer, the first game data includes the first transport layer protocol header and the second IP header, both of which come from the context of the transport layer session between the game client and the game server, the source IP address in the second IP header is the client IP address, and the target IP address is the IP address of the game server. The source IP address in the first game data can be converted from the client IP address to the acceleration IP address and a special protocol header can be added to the first game data to obtain the first encapsulated data.
[0076] The special protocol header includes information of the exit point device so that the exit point device can determine the target for transmitting the first acceleration data. The special protocol header is the header of a special protocol, which can be self-defined or can adopt an existing protocol. The special protocol header can further include an acceleration authentication identifier and a direction identifier, the authentication identifier is used to authenticate the accelerator, and the direction identifier is used to indicate the flow direction of the game data, that is, uplink or downlink.
[0077] The specific process of double encapsulation is illustrated with examples in conjunction with the attached drawings. Assume that the client IP address (i.e. the IP address of the client device) is 192.168.1.1, the acceleration IP address is 10.99.1.1, the exit point IP address (i.e. the IP address of the physical network card mapped to the virtual network card assigned by the exit point device to the client device) is: 88.88.88.88, and the IP address of the game server is 99.99.99.99.
[0078] The game client is an application layer program, which intends to deliver the first game data to the system protocol stack for encapsulation and transmission. The system protocol stack is generally the driver of the physical network card, which is responsible for the communication between the physical network card and the application layer program, involving the transport layer, network layer and link physical layer. If the delivery is successful, it corresponds to the scenario without acceleration in the relevant technology, that is, the game client and the game server communicate directly, and the added first transport layer protocol header and first IP header are both from the context of the transport layer session between the game client and the game server.
[0079] like Figure 4 As shown, in a specific example of the present application, the accelerator hijacks the first game data at the application layer, replaces the system protocol stack to perform a first encapsulation on the first game data, specifically including adding a first transport layer protocol header, a first IP header, and a special protocol header to the first game data to obtain the first encapsulated data. The source IP address in the first IP header is 10.99.1.1, and the target IP address is 99.99.99.99.
[0080] like Figure 5 As shown, in a specific example of the present application, the game data stream sent by the game client is successfully delivered to the system protocol stack. After being encapsulated by the transport layer and the network layer in the system protocol stack, it is hijacked by the accelerator at the network layer. At this time, the first game data already includes the first transport layer protocol header and the second IP header encapsulated by the system protocol stack. The source IP address in the second IP header is 192.168.1.1, and the target IP address is 99.99.99.99. The accelerator converts the source IP address in the second IP header to 10.99.1.1, and then adds a special protocol header to obtain the first encapsulated data.
[0081] The first transport layer protocol header and the first transport layer protocol header that will be added when delivered to the system protocol stack are both from the context of the transport layer session between the game client and the game server. Since the first IP header will not be modified during the transfer to the exit point device, if the context originally from the transport layer session between the game client and the game server is used directly, then the source address in the first IP header of the first encapsulated data obtained by the exit point device is the client IP address. The exit point device may need to process the first encapsulated data from multiple client devices at the same time. At the same time, a large number of client devices belong to the intranet, and the IP segments that can be used in the intranet are very limited, resulting in a high probability that the exit point device will simultaneously receive the first encapsulated data with the same first IP header but from different client devices, resulting in data from different client devices being confused.
[0082] To solve the above problems, the embodiment of the present application introduces an accelerated IP address, that is, a virtual IP address assigned to the game client. The accelerated IP address remains unchanged during the entire acceleration process, and the accelerated IP addresses assigned to different game clients at the same time are different, so as to prevent confusion of client devices at the exit point device.
[0083] After obtaining the first encapsulated data, the first encapsulated data can be second-encapsulated to obtain the first acceleration data. The first acceleration data further includes information required for delivery to the access point device. Specifically, the accelerator can deliver the first encapsulated data as a whole from the application layer to the system protocol stack, and the system protocol stack performs a second encapsulation on the first encapsulated data according to the transport layer session context between the accelerator and the access point device, specifically including sequentially adding a second transport layer protocol header and a third IP header to the first encapsulated data, and the second transport layer protocol header and the third IP header are determined based on the transport layer session between the accelerator and the access point device.
[0084] S14: The client device sends first acceleration data to the access point device.
[0085] Optionally, the first acceleration data may be sent in a redundant transmission manner. For example, a forward error correction (FEC) algorithm may be used to add redundant data to the first acceleration data and add an FEC header, so that the receiving end can correct a certain amount of errors by itself, and retransmission is required only when the number of consecutive erroneous packets exceeds the maximum number supported by the FEC algorithm, thereby improving the stability of transmission.
[0086] In actual applications, the number of acceleration lines can be greater than 1. Each acceleration line includes an access point device and an exit point device connected by a dedicated line. At most only one of the access point devices and exit point devices in different acceleration lines is the same.
[0087] If the number of access point devices is greater than 1, the client device sends the first acceleration data to different access point devices respectively.
[0088] S15: The access point device reads the exit point device information in the first acceleration data.
[0089] The exit point device information may include at least one of an identification of the exit point device, an IP address, etc.
[0090] S16: The access point device sends the first acceleration data to the exit point device.
[0091] S17: The exit point device reads the first encapsulated data in the first acceleration data.
[0092] This process can also be understood as the exit point device decapsulating the second encapsulation through the system protocol stack to obtain the first encapsulation data.
[0093] S18: The exit point device performs address translation on the first encapsulated data according to a network address translation rule.
[0094] Specifically, the virtual network card assigned to the client device may be determined. The virtual network card, also known as a virtual network device, is used to establish a data channel between the user space and the kernel space, so that programs in the user space can interact with the kernel network protocol stack through the device, such as a tun device.
[0095] There is a mapping relationship between the virtual network card and the physical network card constructed according to the Network Address Translation (NAT) rules. Specifically, the exit point device can have at least one physical network card, the number of virtual network cards is greater than or equal to the number of physical network cards, a virtual network card will only be mapped to one physical network card, a physical network card can be mapped to multiple virtual network cards, and different virtual network cards mapped to the same physical network card can be distinguished by port number.
[0096] The mapping relationship can store the information of the virtual network card (such as the identifier, address, the identifier of the assigned client device, the accelerated IP address, etc.) and the mapping relationship between the address and port number of the corresponding physical network card. Based on this, address conversion of the first encapsulated data may include converting the source IP address in the first encapsulated data from the accelerated IP address to the IP address of the physical network card, and modifying the source port number in the first encapsulated data to the port number in the mapping relationship. For the game client and the accelerator, the IP address of the physical network card corresponding to the assigned virtual network card is the exit point IP address.
[0097] S19: The exit point device sends the first encapsulated data to the game server through the physical network card allocated to the client device.
[0098] The first encapsulated data sent by the exit point is subjected to the above-mentioned address conversion. In addition, before sending the first encapsulated data to the game server, the exit point device can remove the special protocol header in the first encapsulated data through an acceleration program capable of processing special protocols. This process needs to be performed between S17 and S19, and there is no restriction on the order of S18.
[0099] Continuing with the previous example, the first accelerated data reaches the exit point device after being transmitted by the access point device. The exit point device reads the first encapsulated data, removes the special protocol header, and converts the source IP address to 88.88.88.88, and then sends it to the game server to complete the accelerated transmission of the uplink game data.
[0100] S20: The exit point device receives the second encapsulated data from the game server.
[0101] The second encapsulated data is obtained by the game server encapsulating the second game data based on the transport layer session between the game client and the game server. For the game client and the game server, the game data they transmit is still based on the transport layer session between the two. The game program running in the game server can deliver the second game data to the system protocol stack from the application layer, and the system protocol stack encapsulates and transmits it according to the transport layer session between the game client and the game server.
[0102] The transport layer protocol header included in the second encapsulated data is the same as that in the first encapsulated data. In addition, the second encapsulated data also includes a fourth IP header, and the fourth IP header includes a source IP address and a target IP address. The source IP address in the fourth IP header is the IP address of the game server, and the target IP address is the exit point IP address.
[0103] The transmission process of the second game data described in S20-S28 corresponds to the transmission process of the first game data described in S12-S19, and the senders and receivers of the two are interchanged, and the content described in S12-S19 will not be repeated here.
[0104] S21: The exit point device converts the target IP address in the fourth IP header from the exit point IP address to the acceleration IP address.
[0105] S22: The exit point device re-encapsulates the second encapsulated data to obtain second accelerated data.
[0106] Specifically, the exit point device uses the second encapsulated data as a whole as data transmitted by the application layer, and processes it again through the transport layer and the network layer (for example, delivering it to the system protocol stack), and completes the re-encapsulation of the second game data based on the transport layer session between the exit point device and the access point device, thereby achieving accelerated transmission of the second encapsulated data while maintaining the transport layer session between the game client and the game server. Optionally, before delivering it to the system protocol stack, the exit point device can add a special protocol header to the second encapsulated data to indicate the client device.
[0107] S23: The exit point device sends second acceleration data to the access point device.
[0108] S24: The access point device sends second acceleration data to the client device.
[0109] The access point device may read the client device information in the protocol header to determine the sending target of the second acceleration data, or the access point device may determine the sending target of the second acceleration data according to the target IP address in the fourth IP header.
[0110] S25: The client device reads the second encapsulated data in the second acceleration data.
[0111] The client device may decapsulate the outer layer encapsulation of the second acceleration data through the system protocol stack to obtain the second encapsulation data.
[0112] S26: The client device reads the second game data in the second packaged data.
[0113] The client device can decapsulate the second encapsulated data through an accelerator to obtain the second game data.
[0114] S27: The client device converts the target IP address in the second game data from the acceleration IP address to the client IP address through the accelerator.
[0115] S28: The client device sends the second game data to the game client through the accelerator.
[0116] Continuing with the previous example, in the second encapsulated data sent by the game server, the source IP address is 99.99.99.99, and the target IP address is 88.88.88.88; the exit point device receives the second encapsulated data, converts the target IP address therein to 10.99.1.1, and then re-encapsulates the second encapsulated data to obtain second accelerated data; the exit point device sends the second accelerated data to the client device through the access point device, and the client device reads the second encapsulated data through the system protocol stack, and then reads the second game data in the second accelerated data through the accelerator, converts the target IP address to 192.168.1.1 and then sends it to the game client, thereby completing the accelerated transmission of downlink game data.
[0117] Through the implementation of this embodiment, the first game data from the game client is obtained; the first game data is double-encapsulated based on the transport layer session between the game client and the game server to obtain the first acceleration data, so as to realize the accelerated transmission of the first game data while maintaining the transport layer session between the game client and the game server; the first acceleration data is sent to the access point device to notify the access point device to send the first acceleration data to the game server via the exit point device indicated by the first acceleration data. Through double encapsulation, the first game data is accelerated while maintaining the transport layer session between the game client and the game server. The change of transmission information in the transmission line will only affect the part of the double encapsulation actually used for accelerated transmission, and will not affect the part of maintaining the transport layer session between the game client and the game server. For the game client, the game data transmission is always based on the transport layer session between the game client and the game server, and is fixed during the entire acceleration process. Therefore, the failure and disconnection of the intermediate node of the transmission line will not cause the game client to disconnect and reconnect, thereby avoiding unnecessary disconnection and reconnection, and improving the quality of online game data transmission.
[0118] Figure 6 A schematic flow chart of a network acceleration method provided by another embodiment of the present application is shown. As an example but not a limitation, the method can be applied to the above-mentioned electronic device as a client device and implemented by an accelerator program. For details, please refer to Figure 3 The corresponding description of the illustrated embodiment.
[0119] S30: Acquire acceleration line information.
[0120] The acceleration line information includes the acceleration IP address, access point device information and exit point device information.
[0121] S31: Establish a transport layer session between the game client and the game server.
[0122] S32: Acquire first game data from a game client.
[0123] S33: Based on the transport layer session between the game client and the game server, the first game data is double-encapsulated to obtain first acceleration data.
[0124] S34: Sending the first acceleration data to the access point device to notify the access point device to send the first acceleration data to the game server via the exit point device indicated by the first acceleration data.
[0125] Optionally, the first acceleration data may be sent to the access point device in a redundant transmission manner.
[0126] S35: Receive second acceleration data sent by the exit point device via the access point device.
[0127] S36: Read the second encapsulation data in the second acceleration data.
[0128] S37: Read the second game data in the second package data.
[0129] S38: Convert the target IP address in the second game data from the acceleration IP address to the client IP address.
[0130] S39: Send the second game data to the game client.
[0131] S32-S34 describes the transmission process of the first game data in the upstream direction, and S35-S39 describes the transmission process of the second game data in the downstream direction. There is no restriction on the order of the two.
[0132] Figure 7 A schematic flow chart of a network acceleration method provided by another embodiment of the present application is shown. As an example but not a limitation, the method can be applied to the electronic device as the exit point device mentioned above. For details, please refer to Figure 3 The corresponding description of the illustrated embodiment.
[0133] S41: Receive first acceleration data sent by a client device via an access point device.
[0134] S42: Read the first encapsulation data in the first acceleration data.
[0135] S43: Performing address translation on the first encapsulated data according to a network address translation rule.
[0136] Specifically, determine the virtual network card assigned to the client device, there is a mapping relationship between the virtual network card and the physical network card constructed according to the network address translation rules, and then convert the source IP address in the first encapsulated data from the accelerated IP address to the IP address of the physical network card, and convert the source port number in the first encapsulated data into the port number in the mapping relationship.
[0137] S44: Sending first encapsulated data to the game server through the physical network card allocated to the client device.
[0138] S45: Receive second encapsulated data from the game server.
[0139] S46: re-encapsulate the second encapsulated data to obtain second accelerated data.
[0140] S47: Send the second acceleration data to the access point device to notify the access point device to send the second acceleration data to the client device.
[0141] S41-S44 describes the transmission process of the first game data in the upstream direction, and S45-S47 describes the transmission process of the second game data in the downstream direction. There is no restriction on the order of the two.
[0142] Figure 8 A schematic diagram of the structure of a network acceleration device provided in an embodiment of the present application is shown, and the network acceleration device includes an acquisition module 11, a double encapsulation module 12, a first sending module 13, a first receiving module 14, a first reading module 15, a second reading module 16, a first conversion module 17 and a second sending module 18.
[0143] The acquisition module 11 is used to acquire first game data from a game client.
[0144] The double encapsulation module 12 is used to double encapsulate the first game data based on the transport layer session between the game client and the game server to obtain the first acceleration data.
[0145] The first sending module 13 is used to send the first acceleration data to the access point device, so as to notify the access point device to send the first acceleration data to the game server via the exit point device indicated by the first acceleration data.
[0146] The first receiving module 14 is used to receive second acceleration data sent by the exit point device via the access point device.
[0147] The first reading module 15 is used for reading the second encapsulation data in the second acceleration data.
[0148] The second reading module 16 is used for reading the second game data in the second package data.
[0149] The first conversion module 17 is used to convert the target IP address in the second game data from the acceleration IP address to the client IP address.
[0150] The second sending module 18 is used to send the second game data to the game client.
[0151] Fig. 9 A schematic diagram of the structure of a network acceleration device provided in another embodiment of the present application is shown, and the network acceleration device includes a second receiving module 21, a third reading module 22, a second conversion module 23, a third sending module 24, a third receiving module 25, a re-encapsulation module 26 and a fourth sending module 27.
[0152] The second receiving module 21 is used to receive first acceleration data sent by the client device via the access point device.
[0153] The third reading module 22 is used for reading the first encapsulation data in the first acceleration data.
[0154] The second conversion module 23 is used to perform address conversion on the first encapsulated data according to the network address conversion rule.
[0155] The third sending module 24 is used to send the first encapsulated data to the game server through the physical network card allocated to the client device.
[0156] The third receiving module 25 is used to receive the second encapsulated data from the game server.
[0157] The repackaging module 26 is used for repackaging the second packaged data to obtain second acceleration data.
[0158] The fourth sending module 27 is used to send the second acceleration data to the access point device, so as to notify the access point device to send the second acceleration data to the client device.
[0159] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0160] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0161] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0162] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0164] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0165] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0166] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A network acceleration method, characterized in that: The method comprises: Acquire first game data from a game client; Based on the transport layer session between the game client and the game server, the first game data is double-encapsulated to obtain first acceleration data, so as to realize accelerated transmission of the first game data while maintaining the transport layer session between the game client and the game server; The first acceleration data is sent to an access point device to notify the access point device to send the first acceleration data to a game server via an exit point device indicated by the first acceleration data.
2. The method according to claim 1, characterized in that The step of double-encapsulating the first game data based on the transport layer session between the game client and the game server to obtain the first acceleration data comprises: Based on the transport layer session between the game client and the game server, the first game data is first encapsulated to obtain first encapsulated data, wherein the first encapsulated data includes information about the transport layer session between the game client and the game server and information about the acceleration line used for the accelerated transmission; The first encapsulated data is secondly encapsulated to obtain the first acceleration data, where the first acceleration data further includes information required for delivery to the access point device.
3. The method according to claim 2, characterized in that The first encapsulated data includes a first transport layer protocol header determined based on a transport layer session between the game client and the game server.
4. The method according to claim 3, characterized in that The first encapsulation of the first game data based on the transport layer session between the game client and the game server to obtain the first encapsulation data includes: Acquire the first game data at the application layer; The first transport layer protocol header, the first Internet Protocol IP header and the special protocol header are added to the first game data to obtain the first encapsulated data, wherein the first Internet Protocol IP header includes a source IP address and a target IP address, the source IP address is an accelerated IP address, the accelerated IP address is a virtual IP address assigned to the game client, and the special protocol header includes information of the exit point device.
5. The method according to claim 3, characterized in that The first encapsulation of the first game data based on the transport layer session between the game client and the game server to obtain the first encapsulation data includes: Acquire the first game data at the network layer, the first game data including the first transport layer protocol header and the second Internet Protocol IP header, the second Internet Protocol IP header including a source IP address and a target IP address, the source IP address being the client IP address; The source IP address in the first game data is converted from the client IP address to an accelerated IP address and a special protocol header is added to the first game data to obtain the first encapsulated data, wherein the accelerated IP address is a virtual IP address assigned to the game client, and the special protocol header includes information of the exit point device.
6. The method according to claim 4 or 5, characterized in that The first encapsulation of the first game data based on the transport layer session between the game client and the game server, before obtaining the first encapsulation data, further includes: The acceleration line information is obtained, where the acceleration line information includes the acceleration IP address, the information of the access point device and the information of the exit point device.
7. The method according to any one of claims 2 to 5, characterized in that: The performing a second encapsulation on the first encapsulated data to obtain the first accelerated data comprises: A second transport layer protocol header and a third Internet Protocol (IP) header are added to the first encapsulated data, where the second transport layer protocol header and the third Internet Protocol (IP) header are determined based on a transport layer session between the accelerator and the access point device.
8. A network acceleration method, characterized in that: The method comprises: Receiving first acceleration data sent by a client device via an access point device according to the method of any one of claims 1 to 7; Reading first packaged data in the first acceleration data; Performing address translation on the first encapsulated data according to a network address translation rule; The first encapsulated data after the address conversion is sent to the game server through the physical network card allocated to the client device.
9. The method according to claim 8, characterized in that The performing address translation on the first encapsulated data according to the network address translation rule comprises: Determine a virtual network card allocated to the client device, where a mapping relationship exists between the virtual network card and the physical network card constructed according to the network address translation rule; The source IP address in the first encapsulated data is converted from the acceleration IP address to the IP address of the physical network card.
10. A network acceleration method, characterized in that: The method comprises: Receiving second encapsulated data from the game server, where the second encapsulated data is obtained by the game server encapsulating second game data based on a transport layer session between the game client and the game server; Re-encapsulating the second encapsulated data to obtain second accelerated data, so as to achieve accelerated transmission of the second encapsulated data while maintaining a transport layer session between the game client and the game server; The second acceleration data is sent to an access point device to notify the access point device to send the second acceleration data to a client device running the game client.
11. A network acceleration method, characterized in that: The method comprises: Receiving, by the exit point device, the second acceleration data sent via the access point device according to the method of claim 10; Reading the second encapsulated data in the second accelerated data; Reading the second game data in the second package data; The second game data is sent to the game client.
12. A network acceleration method, characterized in that: The method comprises: The client device obtains first game data from the game client; The client device double-encapsulates the first game data based on the transport layer session between the game client and the game server to obtain first acceleration data, so as to realize accelerated transmission of the first game data while maintaining the transport layer session between the game client and the game server; The client device sends the first acceleration data to the access point device; The access point device reads the exit point device information in the first acceleration data; The access point device sends the first acceleration data to the exit point device; The exit point device reads the first encapsulated data in the first accelerated data; The exit point device performs address translation on the first encapsulated data according to a network address translation rule; The exit point device sends the first encapsulated data to the game server through the physical network card allocated to the client device.
13. A network acceleration method, characterized in that: The method comprises: The exit point device receives second encapsulated data from the game server, where the second encapsulated data is obtained by the game server encapsulating second game data based on a transport layer session between the game client and the game server; The exit point device re-encapsulates the second encapsulated data to obtain second accelerated data, so as to realize accelerated transmission of the second encapsulated data while maintaining a transport layer session between the game client and the game server; The exit point device sends the second acceleration data to the access point device; The access point device sends the second acceleration data to the client device; The client device reads the second encapsulated data in the second acceleration data; The client device reads the second game data in the second package data; The client device sends the second game data to the game client.
14. A client device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 and 11 is implemented.
15. An exit point device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 8 to 10 is implemented.
16. A network acceleration system, characterized in that: It comprises the client device as claimed in claim 14, the access point device and the exit point device as claimed in claim 15, wherein the access point device is connected to the client device via a public network and communicates with the exit point device via a dedicated line.
17. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.