Game acceleration method, game accelerator and storage medium
Through the game accelerator, the game data transmission path and method are optimized, which solves the problems of high network delay and packet loss rates in foreign server games, and improves the user experience.
Patent Information
- Application Number
- CN202510616478.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-05-14
AI Technical Summary
Game users face the problems of high network delay and high packet loss rate when playing foreign server games, which affects the game experience.
The game accelerator responds to the request of the game client, sends a collection of network status detection packets to the acceleration node group, receives feedback data packets, and determines the target transmission path and method based on the packet loss rate to optimize game data transmission.
Effectively reduce the network latency and packet loss rate of game users and improve the gaming experience.
Smart Images

Figure CN120114824B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a game acceleration method, a game accelerator, and a storage medium. Background Art
[0002] With the rapid development of science and technology, the scale of the global game market continues to expand, and the demand for foreign games is gradually increasing.
[0003] Currently, game users may encounter problems such as high network latency and high packet loss rate when playing foreign games, which will affect the user's gaming experience. Summary of the Invention
[0004] In view of this, the embodiments of the present application provide a game acceleration method, a game accelerator and a storage medium to solve the problem in the prior art that game users experience high network delays and high packet loss rates when playing foreign games, thereby affecting the user's gaming experience.
[0005] A first aspect of an embodiment of the present application provides a game acceleration method, comprising:
[0006] In response to a game acceleration request initiated by a game client for an external game server, a network status detection packet set is sent to an acceleration node group according to a preset detection period, and a network status data packet set fed back by the acceleration node group is received, wherein the acceleration node group includes multiple acceleration nodes, and the game acceleration request includes a target server identifier and an original game data packet;
[0007] Determine the current cycle packet loss rate and the next cycle packet loss rate corresponding to each acceleration node in the acceleration node group based on the network status detection packet set and the network status data packet set;
[0008] Determine the target transmission path and target transmission mode based on the current cycle packet loss rate and the next cycle packet loss rate corresponding to each acceleration node;
[0009] The original game data packet is transmitted to the target game server corresponding to the target server identifier through the target transmission path and target transmission method to complete the game acceleration.
[0010] A second aspect of the embodiments of the present application provides a game accelerator, including:
[0011] a response module configured to respond to a game acceleration request initiated by a game client for an external server game by sending a set of network status detection packets to an acceleration node group according to a preset detection period, and receiving a set of network status data packets fed back by the acceleration node group, wherein the acceleration node group includes multiple acceleration nodes, and the game acceleration request includes a target server identifier and an original game data packet;
[0012] A first determining module is configured to determine a current cycle packet loss rate and a next cycle packet loss rate corresponding to each acceleration node in the acceleration node group based on the network status detection packet set and the network status data packet set;
[0013] The second determination module is configured to determine a target transmission path and a target transmission mode based on a current cycle packet loss rate and a next cycle packet loss rate corresponding to each acceleration node;
[0014] The transmission module is configured to transmit the original game data packet to the target game server corresponding to the target server identifier through the target transmission path and the target transmission method to complete the game acceleration.
[0015] According to a third aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above method are implemented.
[0016] Compared with the prior art, the beneficial effects of the embodiments of the present application include at least the following: when a game user plays a foreign-server game, he can first initiate a game acceleration request to the game accelerator installed in the game client, and the game accelerator responds to the game acceleration request, sends a network status detection packet set to the acceleration node group according to the preset detection period, and receives a network status data packet set fed back by the acceleration node group; then, based on the network status detection packet set and the network status data packet set, the current cycle packet loss rate and the next cycle packet loss rate corresponding to each acceleration node in the acceleration node group are determined, and then the target transmission path and the target transmission method are determined according to the candidate current cycle packet loss rate and the candidate next cycle packet loss rate of each candidate acceleration node; finally, the original game data packet is transmitted to the target game server corresponding to the target server identifier through the target transmission path and the target transmission method to complete the game acceleration. Through the above method, the network delay and packet loss rate of game users when playing foreign-server games can be effectively reduced, thereby improving the user's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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 any creative work.
[0018] Figure 1 This is a schematic diagram of an application scenario of an embodiment of the present application;
[0019] Figure 2This is a flowchart of a game acceleration method provided by an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of some candidate transmission paths constructed in one embodiment of the present application;
[0021] Figure 4 is a schematic diagram of a detection cycle provided by an embodiment of the present application;
[0022] Figure 5 This is a schematic diagram of the structure of a game accelerator provided in one embodiment of the present application;
[0023] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may 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 avoid obscuring the description of the present application with unnecessary detail.
[0025] A game acceleration method and a game accelerator according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0026] Figure 1 This is a schematic diagram of an application scenario of an embodiment of the present application. Figure 1 , this application scenario includes a game client 101, an acceleration node group 102 and a target game server 103. Among them, the game client 101 can be various electronic devices such as smart phones, laptops, tablets, etc. The acceleration node group 102, also known as the proxy node group, includes n acceleration nodes, namely acceleration node 102-1, acceleration node 102-2,..., acceleration node 102-n. Each acceleration node can be a network device such as a router. The target game server 103 can be various electronic devices that provide various services (such as various game services, etc.) to the game client 101. The game client 101 can establish a communication connection with each acceleration node in the acceleration node group 102 through a wired network or a wireless network; each acceleration node can establish a communication connection with the target game server 103 through a wired network or a wireless network.
[0027] In some embodiments, a game accelerator can be installed in the game client 101. The game accelerator can be a game accelerator tool or a game acceleration application. A game accelerator tool generally refers to software or hardware devices that optimize the speed of a system, network, or specific task through various technical means. A game acceleration application generally refers to software that optimizes and accelerates the performance of a specific application.
[0028] Figure 2 This is a flowchart of a game acceleration method provided in one embodiment of the present application. Figure 2 The game acceleration method can be installed by Figure 1 The game accelerator of the game client 101 shown in FIG. Figure 2 As shown, the game accelerator method includes the following steps:
[0029] Step S201, in response to a game acceleration request initiated by a game client for an external game, sends a set of network status detection packets to the acceleration node group according to a preset detection cycle, and receives a set of network status data packets fed back by the acceleration node group, wherein the acceleration node group includes multiple acceleration nodes, and the game acceleration request includes a target server identifier and an original game data packet.
[0030] The preset detection period can be customized by the user through the game client when playing the foreign game, or it can be pre-configured by the developer of the game accelerator during the development stage. The preset detection period can be set to 1 second, 2 seconds, etc., and this embodiment of the application does not impose specific restrictions on this.
[0031] The target server identifier is bound to the target game server.
[0032] As an example, see Figure 1 While playing a foreign game on a game client 101 (e.g., a smartphone), a game user can initiate a game acceleration request by triggering a pre-installed game accelerator in the game client 101. Upon receiving the game acceleration request, the game accelerator responds by sending a set of network status detection packets to each acceleration node in the acceleration node group 102 at a preset detection period (e.g., 1 second), and receiving a set of network status data packets fed back by each acceleration node in the acceleration node group 102.
[0033] Step S202 : Based on the network status detection packet set and the network status data packet set, determine the current period packet loss rate and the next period packet loss rate corresponding to each acceleration node in the acceleration node group.
[0034] The current period packet loss rate refers to the packet loss rate of each acceleration node in the acceleration node group during the current period.
[0035] The next cycle packet loss rate refers to the packet loss rate of each acceleration node in the acceleration node group in the next cycle.
[0036] Packet loss rate refers to the ratio of the number of data packets lost to the total number of data packets sent during network transmission (usually expressed as a percentage).
[0037] Step S203 : determining a target transmission path and a target transmission mode based on the current period packet loss rate and the next period packet loss rate corresponding to each acceleration node.
[0038] Step S204: transmit the original game data packet to the target game server corresponding to the target server identifier through the target transmission path and the target transmission method to complete the game acceleration.
[0039] The technical solution provided by the embodiment of the present application is that when a game user plays a foreign-server game, he can first initiate a game acceleration request to the game accelerator installed in the game client. The game accelerator responds to the game acceleration request, sends a network status detection packet set to the acceleration node group according to the preset detection period, and receives a network status data packet set fed back by the acceleration node group; then, based on the network status detection packet set and the network status data packet set, the current cycle packet loss rate and the next cycle packet loss rate corresponding to each acceleration node in the acceleration node group are determined, and then the target transmission path and the target transmission method are determined based on the candidate current cycle packet loss rate and the candidate next cycle packet loss rate of each candidate acceleration node; finally, the original game data packet is transmitted to the target game server corresponding to the target server identifier through the target transmission path and the target transmission method to complete the game acceleration. Through the above method, the network delay and packet loss rate of game users when playing foreign-server games can be effectively reduced, thereby improving the user's gaming experience.
[0040] In some embodiments, sending a set of network status detection packets to an acceleration node group according to a preset detection period, and receiving a set of network status data packets fed back by the acceleration node group, includes:
[0041] Start the detection thread and send a set of network status detection packets to the acceleration node group according to the preset detection period;
[0042] Start the monitoring thread to receive the network status data packet set returned by the acceleration node group;
[0043] Among them, the network status detection packet set includes multiple detection packet combinations, the network status data packet set includes multiple feedback packet combinations, one acceleration node corresponds to one detection packet combination and one feedback packet combination, one detection packet combination includes multiple network status detection packets, and the feedback packet combination is an empty packet combination or a non-empty packet combination, wherein the number of network status data packets in the empty packet combination is zero, and the non-empty packet combination includes at least one network status data packet.
[0044] The network status detection packet can be a UDP (User Datagram Protocol) detection packet. The network status detection packet includes information such as the source address (i.e., the address of the game accelerator), the destination address (i.e., the address of a certain acceleration node), and network status data collection instructions.
[0045] The network status data packet can be a UDP data packet. The UDP data packet includes information such as the source address (i.e., the address of a certain acceleration node), the destination address (the address of the game accelerator), and network status data.
[0046] UDP is a connectionless, simple transport layer protocol. The game accelerator can improve the data transmission efficiency between the game accelerator and each acceleration node by sending a combination of detection packets to each acceleration node in the acceleration node group and receiving a combination of feedback packets returned by each acceleration node.
[0047] As an example, see Figure 1 When the game accelerator receives a game acceleration request from a game user via game client 101, it initiates a detection thread and sends a detection packet combination to each acceleration node in acceleration node group 102 according to a preset detection period (e.g., 1 second). (The number of UDP detection packets can be customized by the user, for example, 100, 150, or 200.) For example, the game accelerator sends detection packet combination 1 (including 100 UDP detection packets) to accelerator node 102-1, detection packet combination 2 (including 100 UDP detection packets) to acceleration node 102-2, and so on, until detection packet combination n (including 100 UDP detection packets) is sent to acceleration node 102-n. Simultaneously, a listening thread is initiated to receive feedback packet combination 1 from accelerator node 102-1 in acceleration node group 102, feedback packet combination 2 from acceleration node 102-2, and so on, until feedback packet combination n is received from acceleration node 102-n.
[0048] The detection thread and the monitoring thread are two independent threads. The detection thread is mainly used to execute a certain number of network status detection packets to each acceleration node. The monitoring thread is mainly used to execute and receive network status data packets fed back by each acceleration node.
[0049] By using detection threads and listening threads to send and receive data, the concurrent processing capability and response performance of the game accelerator can be improved, which is beneficial to improving its overall execution efficiency; secondly, sending and receiving data through different threads makes the program structure clearer, and each thread has a single function, which facilitates code writing, debugging and maintenance.
[0050] Next, the game accelerator may calculate the current cycle packet loss rate and the next cycle packet loss rate of each acceleration node based on the detection packet combination and the feedback packet combination of each acceleration node.
[0051] The following description is made by taking the calculation of the current cycle packet loss rate and the next cycle packet loss rate of the acceleration node 102 - 1 as an example.
[0052] Assume that the game accelerator sends a detection packet combination 1 to the acceleration node 102-1 in the current cycle. The detection packet combination 1 includes y network status detection packets, and receives a feedback packet combination 1 from the acceleration node 102-1 in the current cycle. The feedback packet combination 1 includes a network status data packets, where a ranges from 0 to y. Then the packet loss rate of the acceleration node 102-1 in the current cycle can be calculated according to the following formula (1):
[0053] (1);
[0054] In formula (1), represents the packet loss rate of the acceleration node 102-1 in the current cycle; y represents the number of network status detection packets in the detection packet combination 1 sent by the game accelerator to the acceleration node 102-1 in the current cycle; Indicates the number of network status data packets received by the game accelerator in the feedback packet combination 1 fed back by the acceleration node 102 - 1 in the current cycle.
[0055] As an example, the detection packet combination 1 and feedback packet combination 1 of the current cycle can be input into a pre-trained packet loss rate prediction model to output the packet loss rate of the acceleration node 102-1 in the next few cycles (ie, the next few cycles of the current cycle).
[0056] The packet loss rate prediction model described above can be trained using an LSTM (Long Short-Term Memory) neural network on historical monitoring datasets for each accelerator node. This historical monitoring dataset includes the combination of probe packets received by each accelerator node from the game accelerator prior to the current cycle, as well as the combination of feedback packets sent back to the game accelerator.
[0057] Similarly, the above method can be used to determine the current period packet loss rate and the next period packet loss rate of other acceleration nodes, which will not be described in detail here.
[0058] In some embodiments, determining a target transmission path and a target transmission mode based on a current period packet loss rate and a next period packet loss rate corresponding to each acceleration node includes:
[0059] Based on the current period packet loss rate and the next period packet loss rate corresponding to each acceleration node, at least one candidate acceleration node is selected from the acceleration node group;
[0060] Construct M candidate transmission paths, where each candidate transmission path includes a path starting node, at least one path intermediate node, and a path end node. The path starting node is the game client, the path intermediate node is the candidate acceleration node, and the path end node is the target game server. M is an integer ≥ 1.
[0061] Based on the candidate current cycle packet loss rate and the candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path, a target transmission path is selected from the M candidate transmission paths;
[0062] The target transmission mode is determined based on the target current cycle packet loss rate and the target next cycle packet loss rate of the target acceleration node of the target transmission path.
[0063] As an example, see Figure 1 Assuming that acceleration node group 102 includes n acceleration nodes, namely acceleration node 102-1, acceleration node 102-2, ..., and acceleration node 102-n, the game accelerator can first calculate the current cycle packet loss rate and next cycle packet loss rate corresponding to each acceleration node according to the above embodiment, namely, current cycle packet loss rate 1 and next cycle packet loss rate 1 for acceleration node 102-1, current cycle packet loss rate 2 and next cycle packet loss rate 2 for acceleration node 102-2, ..., and current cycle packet loss rate n and next cycle packet loss rate n for acceleration node 102-n. Then, the current cycle packet loss rate and next cycle packet loss rate of each acceleration node are compared to see if they meet a preset packet loss rate range (which can be flexibly set based on actual conditions). If so, the acceleration node is determined as a candidate acceleration node. For example, if the preset packet loss rate range is 0-20%, and if both the current cycle packet loss rate 1 and the next cycle packet loss rate 1 of acceleration node 102-1 are between 0-20%, then acceleration node 102-1 can be determined as a candidate acceleration node.
[0064] In this way, at least one candidate acceleration node that meets a preset screening condition (such as a preset packet loss rate range) can be screened out from the acceleration node group.
[0065] As an example, see Figure 3Assuming that three candidate acceleration nodes, acceleration node 102-1, acceleration node 102-2, and acceleration node 102-n, are selected from the acceleration node group, then M candidate transmission paths are constructed with the location of the game client as the path starting node (marked as point S), the location of the target game server as the path ending node (marked as point E), and the locations of the three candidate acceleration nodes, acceleration node 102-1, acceleration node 102-2, and acceleration node 102-n, as the path intermediate nodes (marked as points A1, A2, and A3, respectively). Among them, the candidate transmission paths include: path S-A1-E, path S-A2-E, path S-A3-E, path S-A1-A2-E, path S-A1-A3-E, path S-A2-A1-E, path S-A2-A3-E, path S-A3-A1-E, path S-A3-A2-E, path S-A1-A2-A3-E, path S-A1-A3-A2-E, path S-A2-A1-A3-E, path S-A2-A3-A1-E, path S-A3-A2-E, path S-A2-A1-A3-E, path S-A2-A3-A1-E, path S-A3-A1-A2-E, path S-A3-A2-A1-E, a total of 15 paths, and M=15 at this time.
[0066] In some embodiments, based on the candidate current cycle packet loss rate and the candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path, selecting a target transmission path from M candidate transmission paths includes:
[0067] Calculate the average link packet loss rate of each candidate transmission path based on the candidate current cycle packet loss rate and the candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path;
[0068] Determine the number of transmission node hops for each candidate transmission path;
[0069] According to the average link packet loss rate and the number of transmission node hops of each candidate transmission path, a target transmission path is selected from M candidate transmission paths.
[0070] The transmission node hop count refers to the number of intermediate nodes a data packet passes through from the path starting node to the path ending node, that is, the number of intermediate nodes in the candidate transmission path. For example, if a candidate transmission path includes one path starting node, two path intermediate nodes, and one path ending node, the transmission node hop count of this candidate transmission path is 2.
[0071] As an example, the average link packet loss rate of each candidate transmission path can be calculated according to the following formula (2).
[0072] (2);
[0073] In formula (2), Indicates the average link packet loss rate of the candidate transmission path; Indicates the first candidate transmission path i The current period packet loss rate of the intermediate nodes of the path; Indicates the first candidate transmission path i The packet loss rate of the intermediate nodes in the next cycle; k Indicates the total number of intermediate nodes (i.e., candidate acceleration nodes) in the candidate transmission path; Indicates the average packet loss rate of the segment from the last intermediate node to the end node in the candidate transmission path; 、 represents the weight coefficient, and The sum of is 1.
[0074] In practical applications, the allocation can be based on the degree of influence of different road sections on the overall transmission efficiency of the candidate transmission path. and For example, if the packet loss rate of the segment from the last path starting node to the path ending node has a greater impact on the overall transmission efficiency of the candidate transmission path, then a smaller and larger On the contrary, if the packet loss rate of the section from the last path starting node to the path end node has a smaller impact on the overall transmission efficiency of the candidate transmission path, then a larger and smaller .
[0075] In some embodiments, selecting a target transmission path from M candidate transmission paths based on an average link packet loss rate and a transmission node hop count of each candidate transmission path includes:
[0076] Determine at least one candidate transmission path whose average link packet loss rate meets a preset packet loss rate range and whose transmission node hop count meets a preset hop count range as a transmission path to be tested;
[0077] Send different test data packets to the target game server simultaneously through the transmission path to be tested and record the sending time, and receive the confirmation data packet fed back by the target game server for each test data packet and record the receiving time;
[0078] Determine the delay fluctuation time corresponding to each transmission path to be tested based on the sending time and receiving time;
[0079] A transmission path to be tested with the smallest delay fluctuation time is determined as the target transmission path.
[0080] The preset packet loss rate range can be flexibly set according to actual conditions. For example, it can be set to ≤20%, ≤30%, etc., and the embodiments of the present application do not limit this.
[0081] The preset hop count range can be flexibly set according to actual conditions. For example, it can be set to ≤2 hops, ≤3 hops, etc. This embodiment of the present application does not impose any restrictions on this.
[0082] Delay fluctuation time refers to the degree of change in data packet delay time during data transmission.
[0083] Continuing with the above example, assume that the candidate transmission paths include: path S-A1-E, path S-A2-E, path S-A3-E, path S-A1-A2-E, path S-A1-A3-E, path S-A2-A1-E, path S-A2-A3-E, path S-A3-A1-E, path S-A3-A2-E, path S-A1-A2-A3-E, path S-A1-A3-A2-E, path S-A2-A1-A3-E, path S-A2-A3-A1-E, path S-A3-A1-A2-E, path S-A3-A2-E, path S-A2-A1-A3-E, path S-A2-A3-A1-E, path S-A3-A1-A2-E, path S-A3-A2-A1-E, preset The packet loss rate range is ≤20%, and the preset hop count range is ≤2 hops. Then, the average link packet loss rate of each candidate transmission path can be calculated according to the above formula (2), and then the average link packet loss rate of each candidate transmission path is judged to be in line with the preset packet loss rate range (≤20%), and the number of transmission node hops of each candidate transmission path (i.e., the number of intermediate nodes in the path) is judged to be in line with the preset hop count range (≤2 hops). If the average link packet loss rate of a candidate transmission path is in line with the preset packet loss rate range and the number of transmission node hops is in line with the preset hop count range, then the candidate transmission path is determined as the transmission path to be tested. For example, assuming that the average link packet loss rate of path S-A1-E is 10% (in line with the preset packet loss rate range) and the number of transmission node hops is 1 (in line with the preset hop count range), then path S-A1-E can be determined as the transmission path to be tested.
[0084] As an example, the transmission paths to be tested screened in the above manner include: path S-A1-E, path S-A3-E, path S-A1-A3-E, and path S-A3-A1-E.
[0085] The following describes in detail the delay fluctuation time of the path S-A1-E as an example.
[0086] The game accelerator starts the detection thread and sends multiple different test data packets (for example, test data packets 1, 2, 3, ..., m with different data sizes) to the target game server simultaneously through the path S-A1-E, and records the sending time of test data packets 1, 2, 3, ..., m. 、 、 ,..., At the same time, the listening thread is started to receive the confirmation data packets 1, 2, 3, ..., m fed back by the target game server through the path S-A1-E and record the receiving time 、 、 、... According to the sending time of test data packet 1 The reception time of the confirmation packet 1 , calculate the delay time 1, based on the sending time of test data packet 2 The reception time of the confirmation packet 2 , calculate the delay time 2; according to the sending time of test data packet 3 The reception time of the confirmation packet 3 , calculate the delay time 3, and so on, according to the sending time of the test data packet m and receiving time , calculate the delay time m. Determine the delay fluctuation time of the path S-A1-E based on the delay times 1, 2, 3, ..., m. For example, the delay fluctuation time of the path S-A1-E can be determined by calculating the standard deviation or variance of the delay times 1, 2, 3, ..., m.
[0087] Similarly, the delay fluctuation time of other transmission paths to be measured can be calculated by referring to the above method, which will not be described in detail here.
[0088] Finally, the delay fluctuations of the tested transmission paths are compared, and the one with the smallest delay fluctuation is determined as the target transmission path. For example, assuming that the delay fluctuation of the tested transmission path S-A1-E is the smallest, then the tested transmission path S-A1-E can be determined as the target transmission path.
[0089] By using the above method, the transmission path to be tested with the smallest delay fluctuation is selected as the target transmission path, which is beneficial to reducing the network delay and packet loss rate of data packets transmitted through the target transmission path.
[0090] In some embodiments, selecting a target transmission path from M candidate transmission paths based on an average link packet loss rate and a transmission node hop count of each candidate transmission path includes:
[0091] Determine at least one candidate transmission path whose average link packet loss rate meets a preset packet loss rate range and whose transmission node hop count meets a preset hop count range as a transmission path to be tested;
[0092] Determine the current path load and the current available bandwidth of each transmission path to be tested;
[0093] Determine the target transmission path based on the current path load and currently available bandwidth.
[0094] The current path load refers to the amount of tasks being processed or the workload being borne by the transmission path under test during the current cycle. Specifically, the current path load of the transmission path under test can be determined based on the packet forwarding volume and port bandwidth utilization of each intermediate node along the transmission path under test.
[0095] The current available bandwidth refers to the available bandwidth of the transmission path under test in the current period. The available bandwidth is calculated as follows: Available bandwidth = Theoretical bandwidth - Used bandwidth.
[0096] The target transmission path is determined according to the current path load and the current available bandwidth. Specifically, the transmission path to be tested with the smallest current path load and the largest current available bandwidth can be determined as the target transmission path.
[0097] Through the above method, the target transmission path with the smallest current path load and the largest current available bandwidth can be screened out, which is conducive to reducing the network delay and packet loss rate of data packets transmitted through the target transmission path.
[0098] In some embodiments, determining a target transmission mode based on a target current cycle packet loss rate and a target next cycle packet loss rate of a target acceleration node of a target transmission path includes:
[0099] Determine the current cycle link packet loss rate and the next cycle link packet loss rate of the target transmission path based on the target current cycle packet loss rate and the target next cycle packet loss rate of the target acceleration node;
[0100] If the current period link packet loss rate and the next period link packet loss rate are both greater than the first preset threshold and less than the second preset threshold, and the first preset threshold is less than the second preset threshold, the target transmission mode is determined to be the first forward error correction transmission mode.
[0101] As an example, the current period link packet loss rate of the target transmission path can be calculated according to the following formula (3).
[0102] (3);
[0103] In formula (3), Indicates the current period link packet loss rate of the target transmission path; Indicates the current periodic packet loss rate of the segment from the last intermediate node to the end node in the target transmission path; Indicates the first jb represents the total number of intermediate nodes (i.e., target acceleration nodes) in the target transmission path; 、 represents the weight coefficient, and The sum of is 1.
[0104] In practical applications, different sections can be allocated based on the degree of influence they have on the overall transmission efficiency of the target transmission path. and For example, if the packet loss rate of the segment from the last path starting node to the path ending node has a greater impact on the overall transmission efficiency of the target transmission path, then a smaller and larger On the contrary, if the packet loss rate of the section from the last path starting node to the path end node has a smaller impact on the overall transmission efficiency of the target transmission path, then a larger and smaller .
[0105] Similarly, the link packet loss rate of the target transmission path in the next period can be calculated by referring to the above method, which will not be described in detail here.
[0106] The first preset threshold and the second preset threshold can be flexibly set according to actual conditions. For example, the first preset threshold can be set to 0, and the second preset threshold can be set to 30%.
[0107] As an example, assuming that the first preset threshold is 0, the second preset threshold is 30%, the current cycle link packet loss rate of the target transmission path is 20%, and the next cycle link packet loss rate is 15%. Then, the current cycle link packet loss rate (20%) and the next cycle link packet loss rate (15%) are both greater than the first preset threshold (0) and less than the second preset threshold (30%). At this time, the target transmission mode adopts the first forward error correction transmission mode. The first forward error correction transmission mode means that when r (1≤r≤4) original game data packets are sent, r additional redundant data packets are sent. These r redundant data packets contain additional information related to these r original game data packets. The target game server can use these redundant data packets and the received original game data packets to recover the original game data packets that may be lost during the transmission process, thereby improving the integrity and accuracy of data transmission and reducing the impact of packet loss on data transmission scenarios such as game experience.
[0108] In some embodiments, after determining the current-cycle link packet loss rate and the next-cycle link packet loss rate of the target transmission path based on the target current-cycle packet loss rate and the target next-cycle packet loss rate of the target acceleration node, the method further includes:
[0109] If the link packet loss rate of the current period and / or the link packet loss rate of the next period is greater than or equal to a second preset threshold, the target transmission mode is determined to be the second forward error correction transmission mode, and the second redundancy of the second forward error correction transmission mode is greater than the first redundancy of the first forward error correction transmission mode.
[0110] As an example, assuming that the second preset threshold is 30%, the current cycle link packet loss rate of the target transmission path is 10%, and the next cycle link packet loss rate is 40%, then the next cycle link packet loss rate is greater than the second preset threshold. At this time, the target transmission mode is determined to be the second forward error correction transmission mode.
[0111] The second forward error correction transmission method involves sending q redundant packets for every q (4 < q ≤ 20) original game packets. These q redundant packets contain additional information related to the q original game packets. The target game server can use these redundant packets and the received original game packets to recover the original game packets that may have been lost during transmission.
[0112] The first redundancy refers to the number of redundant data packets additionally sent in the first forward error correction transmission mode, and its value range is [1,4].
[0113] The second redundancy refers to the number of redundant data packets additionally sent in the second forward error correction transmission mode, and its value range is (4, 20].
[0114] When the current cycle link packet loss rate and / or the next cycle link packet loss rate of the target transmission path is greater than or equal to the second preset threshold, the second forward error correction transmission mode is used for data transmission, which is beneficial to improve the integrity and accuracy of data transmission and reduce the impact of packet loss on data transmission scenarios such as gaming experience.
[0115] In some embodiments, if the current period link packet loss rate and the next period link packet loss rate are both greater than a first preset threshold and less than a second preset threshold, then after determining that the target transmission mode is the first forward error correction transmission mode, the method further includes:
[0116] Determine the link packet loss rate of the target transmission path for the next two cycles, the link packet loss rate of the next three cycles, and the link packet loss rate of the next four cycles;
[0117] If the link packet loss rate in the next two cycles is greater than the first preset threshold and less than the second preset threshold, maintaining the target transmission mode as the first forward error correction transmission mode;
[0118] If the link packet loss rate in the next two cycles is greater than or equal to a second preset threshold, changing the target transmission mode from the first forward error correction transmission mode to the second forward error correction transmission mode;
[0119] If the link packet loss rate for the next two cycles, the link packet loss rate for the next three cycles, and the link packet loss rate for the next four cycles are all zero, the target transmission mode is changed from the first forward error correction transmission mode to the zero redundancy transmission mode.
[0120] See also Figure 4 The next two-cycle link packet loss rate refers to the link packet loss rate of the target transmission path in the next two cycles. The next three-cycle link packet loss rate refers to the link packet loss rate of the target transmission path in the next three cycles. The next four-cycle link packet loss rate refers to the link packet loss rate of the target transmission path in the next four cycles.
[0121] In the first case, if the link packet loss rate in the next two cycles is greater than the first preset threshold and less than the second preset threshold, then the target transmission mode is maintained as the first forward error correction transmission mode, that is, the first forward error correction transmission mode is continued to be used to transmit the original game data.
[0122] In the second case, if the link packet loss rate for the next two cycles is greater than or equal to a second preset threshold, the target transmission mode is changed from the first forward error correction transmission mode to the second forward error correction transmission mode, thereby increasing the redundancy of forward error correction transmission. This helps improve the integrity and accuracy of data transmission and reduces the impact of packet loss on data transmission scenarios such as gaming experience.
[0123] In the third case, if the link packet loss rate for the next two cycles, the next three cycles, and the next four cycles are all zero, the target transmission mode is changed from the first forward error correction transmission mode to the zero-redundancy transmission mode. Zero-redundancy transmission mode means that only the original game data is transmitted, without redundant data packets. This saves network bandwidth.
[0124] By periodically monitoring the link packet loss rate of the target transmission path and flexibly adjusting the target transmission mode according to the periodic changes in the link packet loss rate of the target transmission path, the network delay and packet loss rate of game users when playing foreign games can be effectively reduced, thereby improving the user's gaming experience.
[0125] All of the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.
[0126] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0127] Figure 5 This is a schematic diagram of the structure of a game accelerator provided by an embodiment of the present application. Figure 5 As shown, the game accelerator 500 includes:
[0128] Response module 501 is configured to respond to a game acceleration request initiated by a game client for an external server game by sending a set of network status detection packets to an acceleration node group according to a preset detection period, and receiving a set of network status data packets fed back by the acceleration node group, wherein the acceleration node group includes multiple acceleration nodes, and the game acceleration request includes a target server identifier and an original game data packet;
[0129] A first determining module 502 is configured to determine a current cycle packet loss rate and a next cycle packet loss rate corresponding to each acceleration node in the acceleration node group based on the network status detection packet set and the network status data packet set;
[0130] The second determination module 503 is configured to determine a target transmission path and a target transmission mode based on the current period packet loss rate and the next period packet loss rate corresponding to each acceleration node;
[0131] The transmission module 504 is configured to transmit the original game data packet to the target game server corresponding to the target server identifier through the target transmission path and the target transmission method to complete the game acceleration.
[0132] In some embodiments, the second determining module 503 includes:
[0133] The first screening unit is configured to screen at least one candidate acceleration node from the acceleration node group based on a current period packet loss rate and a next period packet loss rate corresponding to each acceleration node;
[0134] A construction unit is configured to construct M candidate transmission paths, wherein each candidate transmission path includes a path starting node, at least one path intermediate node, and a path end node, the path starting node is the game client, the path intermediate node is a candidate acceleration node, and the path end node is the target game server, and M is an integer ≥ 1;
[0135] The second screening unit is configured to screen out a target transmission path from the M candidate transmission paths based on the candidate current cycle packet loss rate and the candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path;
[0136] The determining unit is configured to determine a target transmission mode based on a target current cycle packet loss rate and a target next cycle packet loss rate of a target acceleration node of a target transmission path.
[0137] In some embodiments, the determining unit includes:
[0138] A first determining component is configured to determine a current cycle link packet loss rate and a next cycle link packet loss rate of a target transmission path based on a target current cycle packet loss rate and a target next cycle packet loss rate of a target acceleration node;
[0139] The second determination component is configured to determine that the target transmission mode is the first forward error correction transmission mode if the current cycle link packet loss rate and the next cycle link packet loss rate are both greater than the first preset threshold and less than the second preset threshold, and the first preset threshold is less than the second preset threshold.
[0140] In some embodiments, the determining unit further includes:
[0141] The third determination component is configured to determine that the target transmission mode is a second forward error correction transmission mode if the current period link packet loss rate and / or the next period link packet loss rate is greater than or equal to a second preset threshold, and the second redundancy of the second forward error correction transmission mode is greater than the first redundancy of the first forward error correction transmission mode.
[0142] In some embodiments, the determining unit further includes:
[0143] a fourth determining component configured to determine a link packet loss rate of a target transmission path over a next two-cycle period, a link packet loss rate of a next three-cycle period, and a link packet loss rate of a next four-cycle period;
[0144] a maintaining component configured to maintain the target transmission mode as the first forward error correction transmission mode if the link packet loss rate in the next two cycles is greater than a first preset threshold and less than a second preset threshold;
[0145] a first changing component configured to change the target transmission mode from the first forward error correction transmission mode to the second forward error correction transmission mode if the link packet loss rate in the next two cycles is greater than or equal to a second preset threshold;
[0146] The second changing component is configured to change the target transmission mode from the first forward error correction transmission mode to the zero redundancy transmission mode if the link packet loss rate of the next two cycles, the link packet loss rate of the next three cycles, and the link packet loss rate of the next four cycles are all zero.
[0147] In some embodiments, the second screening unit includes:
[0148] a calculation component configured to calculate an average link packet loss rate of the candidate transmission path based on a candidate current cycle packet loss rate and a candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path;
[0149] a hop count determination component configured to determine a transmission node hop count of each candidate transmission path;
[0150] The path screening component is configured to screen out a target transmission path from M candidate transmission paths according to the average link packet loss rate and the number of transmission node hops of each candidate transmission path.
[0151] In some embodiments, the path screening component may be specifically configured as follows:
[0152] Determine at least one candidate transmission path whose average link packet loss rate meets a preset packet loss rate range and whose transmission node hop count meets a preset hop count range as a transmission path to be tested;
[0153] Send different test data packets to the target game server simultaneously through the transmission path to be tested and record the sending time, and receive the confirmation data packet fed back by the target game server for each test data packet and record the receiving time;
[0154] Determine the delay fluctuation time corresponding to each transmission path to be tested based on the sending time and receiving time;
[0155] A transmission path to be tested with the smallest delay fluctuation time is determined as the target transmission path.
[0156] In some embodiments, the response module 501 may be specifically configured to:
[0157] Start the detection thread and send a set of network status detection packets to the acceleration node group according to the preset detection period;
[0158] Start the monitoring thread to receive the network status data packet set returned by the acceleration node group;
[0159] Among them, the network status detection packet set includes multiple detection packet combinations, the network status data packet set includes multiple feedback packet combinations, one acceleration node corresponds to one detection packet combination and one feedback packet combination, one detection packet combination includes multiple network status detection packets, and the feedback packet combination is an empty packet combination or a non-empty packet combination, wherein the number of network status data packets in the empty packet combination is zero, and the non-empty packet combination includes at least one network status data packet.
[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 this application.
[0161] Figure 6 Schematic diagram of an electronic device 600 provided in an embodiment of the present application. Figure 6 As shown, the electronic device 600 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable by the processor 601. When the processor 601 executes the computer program 603, the steps of the above-described method embodiments are implemented. Alternatively, when the processor 601 executes the computer program 603, the functions of the modules / units in the above-described device embodiments are implemented.
[0162] The electronic device 600 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 600 may include but is not limited to a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 6 The electronic device 600 is merely an example and does not limit the electronic device 600 . The electronic device 600 may include more or fewer components than shown in the figure, or different components.
[0163] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0164] Memory 602 can be an internal storage unit of electronic device 600, such as a hard disk or memory of electronic device 600. Memory 602 can also be an external storage device of electronic device 600, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on electronic device 600. Memory 602 can also include both an internal storage unit of electronic device 600 and an external storage device. Memory 602 is used to store computer programs and other programs and data required by the electronic device.
[0165] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and 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 embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0166] If the integrated module / unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a readable storage medium. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments by using a computer program to instruct the relevant hardware. The computer program can be stored in a readable storage medium, and when executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program can include computer program code, which can be in source code form, object code form, executable file, or some intermediate form. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunications signals, and software distribution media. It should be noted that the content included in computer-readable media can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, based on legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunications signals.
[0167] The above embodiments 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, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A game acceleration method, characterized in that: Applied to game accelerators, including: In response to a game acceleration request initiated by a game client for an external game, sending a set of network status detection packets to an acceleration node group according to a preset detection period, and receiving a set of network status data packets fed back by the acceleration node group, wherein the acceleration node group includes multiple acceleration nodes, and the game acceleration request includes a target server identifier and an original game data packet; Determine, based on the network status detection packet set and the network status data packet set, a current period packet loss rate and a next period packet loss rate corresponding to each acceleration node in the acceleration node group; Determine the target transmission path and target transmission mode based on the current cycle packet loss rate and the next cycle packet loss rate corresponding to each acceleration node; Transmitting the original game data packet to the target game server corresponding to the target server identifier through the target transmission path and target transmission method to complete game acceleration; Based on the current and next cycle packet loss rates for each acceleration node, the target transmission path and target transmission mode are determined, including: Selecting at least one candidate acceleration node from the acceleration node group based on a current period packet loss rate and a next period packet loss rate corresponding to each acceleration node; Construct M candidate transmission paths, wherein each candidate transmission path includes a path starting node, at least one path intermediate node, and a path end node, the path starting node is the game client, the path intermediate node is the candidate acceleration node, and the path end node is the target game server, and M is an integer ≥ 1; Selecting a target transmission path from the M candidate transmission paths based on a candidate current cycle packet loss rate and a candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path; Determine the current cycle link packet loss rate and the next cycle link packet loss rate of the target transmission path based on the target current cycle packet loss rate and the target next cycle packet loss rate of the target acceleration node; If the current cycle link packet loss rate and the next cycle link packet loss rate are both greater than a first preset threshold and less than a second preset threshold, and the first preset threshold is less than the second preset threshold, then determining that the target transmission mode is a first forward error correction transmission mode; the first forward error correction transmission mode means that r redundant data packets are additionally sent when r original game data packets are sent, where 1≤r≤4; If the current cycle link packet loss rate and / or the next cycle link packet loss rate is greater than or equal to a second preset threshold, the target transmission mode is determined to be a second forward error correction transmission mode, and the second redundancy of the second forward error correction transmission mode is greater than the first redundancy of the first forward error correction transmission mode. The second forward error correction transmission mode means that when q original game data packets are sent, q additional redundant data packets are sent, where 4<q≤20.
2. The method according to claim 1, characterized in that If the current period link packet loss rate and the next period link packet loss rate are both greater than the first preset threshold and less than the second preset threshold, then after determining that the target transmission mode is the first forward error correction transmission mode, the method further includes: Determine the link packet loss rate of the target transmission path for the next two cycles, the link packet loss rate of the next three cycles, and the link packet loss rate of the next four cycles; If the link packet loss rate for the next two cycles is greater than a first preset threshold and less than a second preset threshold, maintaining the target transmission mode as the first forward error correction transmission mode; If the link packet loss rate in the next two cycles is greater than or equal to a second preset threshold, changing the target transmission mode from the first forward error correction transmission mode to the second forward error correction transmission mode; If the link packet loss rate for the next two cycles, the link packet loss rate for the next three cycles, and the link packet loss rate for the next four cycles are all zero, the target transmission mode is changed from the first forward error correction transmission mode to a zero redundancy transmission mode.
3. The method according to claim 1, characterized in that Based on the candidate current cycle packet loss rate and the candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path, a target transmission path is selected from the M candidate transmission paths, including: Calculating an average link packet loss rate of each candidate transmission path based on a candidate current cycle packet loss rate and a candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path; Determining the number of transmission node hops of each candidate transmission path; A target transmission path is selected from the M candidate transmission paths according to the average link packet loss rate and the number of transmission node hops of each candidate transmission path.
4. The method according to claim 3, characterized in that Selecting a target transmission path from the M candidate transmission paths according to an average link packet loss rate and a transmission node hop count of each candidate transmission path includes: Determine at least one candidate transmission path whose average link packet loss rate meets a preset packet loss rate range and whose transmission node hop count meets a preset hop count range as a transmission path to be tested; Simultaneously sending different test data packets to the target game server via the transmission path to be tested and recording the sending time, and receiving a confirmation data packet fed back by the target game server for each of the test data packets and recording the receiving time; Determine the delay fluctuation time corresponding to each of the transmission paths to be tested based on the sending time and receiving time; A transmission path to be tested with the smallest delay fluctuation time is determined as the target transmission path.
5. The method according to claim 1, wherein Sending a set of network status detection packets to the acceleration node group according to a preset detection period, and receiving a set of network status data packets fed back by the acceleration node group, including: Start the detection thread and send a set of network status detection packets to the acceleration node group according to the preset detection period; Start a listening thread to receive a set of network status data packets returned by the acceleration node group; Among them, the network status detection packet set includes multiple detection packet combinations, the network status data packet set includes multiple feedback packet combinations, one acceleration node corresponds to one detection packet combination and one feedback packet combination, one detection packet combination includes multiple network status detection packets, and the feedback packet combination is an empty packet combination or a non-empty packet combination, wherein the number of network status data packets in the empty packet combination is zero, and the non-empty packet combination includes at least one network status data packet.
6. A game accelerator, characterized in that: include: a response module configured to respond to a game acceleration request initiated by a game client for an external server game by sending a set of network status detection packets to an acceleration node group according to a preset detection period, and receiving a set of network status data packets fed back by the acceleration node group, wherein the acceleration node group includes multiple acceleration nodes, and the game acceleration request includes a target server identifier and an original game data packet; a first determining module configured to determine a current period packet loss rate and a next period packet loss rate corresponding to each acceleration node in the acceleration node group based on the network status detection packet set and the network status data packet set; The second determination module is configured to determine a target transmission path and a target transmission mode based on a current cycle packet loss rate and a next cycle packet loss rate corresponding to each acceleration node; A transmission module is configured to transmit the original game data packet to a target game server corresponding to the target server identifier through the target transmission path and target transmission mode to complete game acceleration; Based on the current and next cycle packet loss rates for each acceleration node, the target transmission path and target transmission mode are determined, including: Selecting at least one candidate acceleration node from the acceleration node group based on a current period packet loss rate and a next period packet loss rate corresponding to each acceleration node; Construct M candidate transmission paths, wherein each candidate transmission path includes a path starting node, at least one path intermediate node, and a path end node, the path starting node is the game client, the path intermediate node is the candidate acceleration node, and the path end node is the target game server, and M is an integer ≥ 1; Selecting a target transmission path from the M candidate transmission paths based on a candidate current cycle packet loss rate and a candidate next cycle packet loss rate of each candidate acceleration node in each candidate transmission path; Determine the current cycle link packet loss rate and the next cycle link packet loss rate of the target transmission path based on the target current cycle packet loss rate and the target next cycle packet loss rate of the target acceleration node; If the current cycle link packet loss rate and the next cycle link packet loss rate are both greater than a first preset threshold and less than a second preset threshold, and the first preset threshold is less than the second preset threshold, then determining that the target transmission mode is a first forward error correction transmission mode; the first forward error correction transmission mode means that r redundant data packets are additionally sent when r original game data packets are sent, where 1≤r≤4; If the current cycle link packet loss rate and / or the next cycle link packet loss rate is greater than or equal to a second preset threshold, the target transmission mode is determined to be a second forward error correction transmission mode, and the second redundancy of the second forward error correction transmission mode is greater than the first redundancy of the first forward error correction transmission mode. The second forward error correction transmission mode means that when q original game data packets are sent, q additional redundant data packets are sent, where 4<q≤20.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Game network testing method and device, electronic equipment and storage medium
CN110247824A