CN108156247B - Data communication method, device, system, terminal and readable storage medium - Google Patents

Data communication method, device, system, terminal and readable storage medium Download PDF

Info

Publication number
CN108156247B
CN108156247B CN201711450436.0A CN201711450436A CN108156247B CN 108156247 B CN108156247 B CN 108156247B CN 201711450436 A CN201711450436 A CN 201711450436A CN 108156247 B CN108156247 B CN 108156247B
Authority
CN
China
Prior art keywords
address
service request
terminal
request message
game
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711450436.0A
Other languages
Chinese (zh)
Other versions
CN108156247A (en
Inventor
杨志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201711450436.0A priority Critical patent/CN108156247B/en
Publication of CN108156247A publication Critical patent/CN108156247A/en
Application granted granted Critical
Publication of CN108156247B publication Critical patent/CN108156247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services

Abstract

The embodiment of the invention provides a data communication method, a device, a system, a terminal and a readable storage medium. The method is applied to the terminal and comprises the following steps: when monitoring that a service request message aiming at a target game is generated, determining whether the IP address of the terminal is positioned in a domestic IP section; the IP address of the game server corresponding to the target game is located in a preset foreign IP section; if not, sending the service request message to a preset first forwarding line so that a first group of proxy servers in the first forwarding line forward the service request message to a game server based on an intranet where the terminal is located; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section. By applying the scheme provided by the embodiment of the invention to carry out data communication, the game experience of overseas game players is improved.

Description

Data communication method, device, system, terminal and readable storage medium
Technical Field
The present invention relates to the field of data communication technologies, and in particular, to a data communication method, apparatus, system, terminal, and readable storage medium.
Background
At present, after a Chinese national game openers develop a network game, game servers of the network game are often deployed in China. In this deployment method, the game server is assigned a domestic intranet IP (Internet Protocol) address, that is, the IP address of the game server is located in the domestic IP segment. Wherein the game server may be configured to: and responding to the service request for the game sent by the terminal. The service request includes but is not limited to: game registration and prop purchase.
The inventor finds that in the deployment mode, the domestic players play the games more smoothly, and the foreign game players often have the phenomenon of game jamming in the game process, so that the foreign game players play the games not smoothly, and the foreign game players cannot obtain good game experience.
Therefore, how to improve the game experience of overseas game players becomes a technical problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention aims to provide a data communication method, a data communication device, a data communication system, a data communication terminal and a readable storage medium, so as to improve the game experience of overseas game players.
In a first aspect, an embodiment of the present invention provides a data communication method, which is applied to a terminal, and the method may include:
when monitoring that a service request message aiming at a target game is generated, judging whether the IP address of the terminal is positioned in a domestic IP section; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
if not, sending the service request message to a preset first forwarding line so that a first group of proxy servers in the first forwarding line forward the service request message to a game server based on an intranet where the terminal is located; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section.
Optionally, in an embodiment of the present invention, the method may further include:
if so, sending the service request message to a preset second forwarding line so that a second group of proxy servers in the second forwarding line forward the service request message to the game server based on the public network; the IP address of any proxy server in the second set of proxy servers is located within the domestic IP segment.
Optionally, the step of sending the service request packet to a preset second forwarding line, so that a second group of proxy servers in the second forwarding line forwards the service request packet to the game server based on the public network, may include:
determining an IP address of each proxy server in the second set of proxy servers;
and sending the service request message to a proxy server in the second group of proxy servers, wherein the IP address of the proxy server is closest to the IP address of the terminal, so that the service request message is forwarded to the game server based on the proxy server and the public network.
Optionally, the second forwarding circuit may include: and the special route is used for forwarding the service request message of the target game.
Optionally, the destination address of the service request packet may be: the IP address of the game server, or the IP address of the reverse proxy server;
wherein, the IP address of the reverse proxy server is positioned in the foreign IP section; the reverse proxy server is configured to: and when the destination address of the service request message is the IP address of the reverse proxy server, receiving the service request message sent by the first group of proxy servers and sending the received service request message to the game server.
In a second aspect, an embodiment of the present invention provides a data communication apparatus, where the apparatus is applied to a terminal, and the apparatus may include:
the judging unit is used for judging whether the IP address of the terminal is positioned in the domestic IP section or not when the generation of the service request message aiming at the target game is monitored; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
the first sending unit is used for sending the service request message to a preset first forwarding line when the determination result of the judging unit is negative, so that a first group of proxy servers in the first forwarding line forward the service request message to the game server based on the intranet where the terminal is located; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section.
Optionally, in an embodiment of the present invention, the apparatus may further include:
the second sending unit is used for sending the service request message to a preset second forwarding line when the determination result of the judging unit is yes, so that a second group of proxy servers in the second forwarding line forward the service request message to the game server based on the public network; the IP address of any proxy server in the second set of proxy servers is located within the domestic IP segment.
Optionally, in this embodiment of the present invention, the second sending unit may include:
a determining subunit, configured to determine an IP address of each proxy server in the second set of proxy servers;
and the sending subunit is used for sending the service request message to a proxy server in the second group of proxy servers, wherein the IP address of the proxy server is closest to the IP address of the terminal, so that the service request message is forwarded to the game server based on the proxy server and the public network.
Optionally, the second forwarding circuit may include: and the special route is used for forwarding the service request message of the target game.
Optionally, the destination address of the service request packet may be: the IP address of the game server, or the IP address of the reverse proxy server; the IP address of the reverse proxy server is positioned in a foreign IP section;
the reverse proxy server is configured to: and when the destination address of the service request message is the IP address of the reverse proxy server, receiving the service request message sent by the first group of proxy servers and sending the received service request message to the game server.
In a third aspect, an embodiment of the present invention provides a data communication system, including: a terminal, a first set of proxy servers and a game server; the first group of proxy servers are servers in a preset first forwarding line;
the terminal is used for: when monitoring that a service request message aiming at a target game is generated, judging whether the IP address of the terminal is positioned in a domestic IP section; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
the terminal is further configured to: when the IP address of the terminal is determined not to be in the domestic IP section, the service request message is sent to a first group of proxy servers in a first forwarding line;
the first set of proxy servers is to: receiving a service request message sent by a terminal; based on the intranet where the terminal is located, forwarding the service request message to a game server; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section;
the game server is used for: and receiving a service request message.
Optionally, the system may further include: a second set of proxy servers; the second group of proxy servers are servers in a preset second forwarding line;
the terminal is further configured to: when the IP address of the terminal is determined to be located in the domestic IP section, the service request message is sent to a second group of proxy servers in a second forwarding line;
the second group of proxy servers is used for: receiving a service request message sent by a terminal; based on the public network, forwarding the service request message to a game server; the IP address of any proxy server in the second set of proxy servers is located within the domestic IP segment.
Alternatively, in embodiments of the present invention,
the terminal is specifically configured to: when the IP address of the terminal is determined to be located in the domestic IP section, determining the IP address of each proxy server in the second group of proxy servers; sending the service request message to a proxy server which has the IP address closest to the IP address of the terminal in a second group of proxy servers;
the proxy server in the second group of proxy servers with the IP address closest to the IP address of the terminal is used for: receiving a service request message sent by a terminal; and forwarding the service request message to a game server based on the public network.
Optionally, the second forwarding circuit may include: and the special route is used for forwarding the service request message of the target game.
Optionally, the system may further include: a reverse proxy server; the destination address of the service request message is: the IP address of the game server, or the IP address of the reverse proxy server; the IP address of the reverse proxy server is positioned in a foreign IP section;
the first group of proxy servers is specifically configured to: receiving a service request message sent by a terminal; when the destination address of the service request message is the IP address of the reverse proxy server, the service request message is sent to the reverse proxy server through the intranet where the terminal is located;
the reverse proxy server is configured to: receiving a service request message sent by a first group of proxy servers; and forwarding the service request message to the game server.
In a fourth aspect, an embodiment of the present invention further provides a terminal, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the method steps provided by any of the embodiments of the data communication method in the first aspect when executing the program stored in the memory.
In a fifth aspect, an embodiment of the present invention further provides a readable storage medium, where the readable storage medium is a readable storage medium in a terminal, and a computer program is stored in the readable storage medium, and when being executed by a processor, the computer program implements the method steps provided in any of the data communication method embodiments of the first aspect.
In the embodiment of the invention, the phenomenon of game jamming often occurs when a terminal in foreign countries (such as China foreign countries) accesses a game server deployed in the domestic countries (such as China domestic). Thus, the game server can be deployed abroad (e.g., japan) where no national firewall is provided, that is, the IP address of the game server is located within the foreign IP segment. Also, in order to enable game players in foreign countries (e.g., japan, korea, and the united states) to obtain a better game experience, the game server may be deployed in a foreign IP segment having a better smooth evaluation result, i.e., a preset foreign IP segment. It should be noted that the above-mentioned domestic means the domestic of a certain country a, and the foreign means the foreign of the country a, and is not limited to the domestic of china and the foreign of china.
When any terminal monitors that a service request message aiming at a target game is generated, whether the IP address of the terminal is located in a domestic IP section or not can be determined, namely, whether the IP address of the terminal is a domestic IP or not can be determined. If not, the terminal is a foreign terminal. At this time, the terminal may send the service request packet to a preset first forwarding line. Wherein, because the IP address of the first group proxy server in the first forwarding line and the IP address of the terminal are located in the same IP segment, it can be known that: the service request message may be forwarded through a first set of proxy servers in the country where the terminal is located.
Then, the first group of proxy servers can forward the service request message to the game server through the intranet where the terminal is located. Therefore, when a foreign game terminal accesses the game server, a national firewall in China (for example, China is domestic) is not needed, the packet loss rate is reduced, the problems of data interception and the like are avoided, and the forwarding speed of the service request message is increased. Therefore, the game playing smoothness of the foreign game player is improved, and the game experience of the foreign game player is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a data communication method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a data communication system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data communication device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that some countries (e.g., china) have a network firewall, which is a network security system located between a national internal network (e.g., china internal network) and a foreign network (e.g., a network outside china). And, the network security system allows data satisfying a specific rule to pass through.
Due to such network limitation, when a foreign terminal needs to send a service request packet to a game server deployed in the country (e.g., in china), the service request packet needs to pass through a national firewall before being sent to the game server. The problems of packet loss, data interception and the like are usually caused by the firewall, so that the game is blocked, foreign game players play the game smoothly, and the foreign game players cannot obtain good game experience. The above-mentioned domestic means the domestic of a certain country A, and the foreign means the foreign of the country A, and is not limited to the domestic of China and the foreign of China.
In order to solve the above technical problem, embodiments of the present invention provide a data communication method, apparatus, system, terminal, and readable storage medium.
The following first describes a data communication method provided in an embodiment of the present invention.
Referring to fig. 1, a data communication method provided in an embodiment of the present invention is applied to a terminal, and the method may include the following steps:
s101: when monitoring that a service request message aiming at a target game is generated, judging whether the IP address of the terminal is positioned in a domestic IP section; the IP address of the game server corresponding to the target game is located in a preset foreign IP section; if not, executing step S102;
s102: sending the service request message to a preset first forwarding line so that a first group of proxy servers in the first forwarding line forward the service request message to a game server based on an intranet where the terminal is located; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section.
In the embodiment of the invention, the phenomenon of game jamming often occurs when a terminal in foreign countries (such as China foreign countries) accesses a game server deployed in the domestic countries (such as China domestic). Thus, the game server can be deployed abroad (e.g., japan) where no national firewall is provided, that is, the IP address of the game server is located within the foreign IP segment. Also, in order to enable game players in foreign countries (e.g., japan, korea, and the united states) to obtain a better game experience, the game server may be deployed in a foreign IP segment having a better smooth evaluation result, i.e., a preset foreign IP segment. It should be noted that the above-mentioned domestic means the domestic of a certain country a, and the foreign means the foreign of the country a, and is not limited to the domestic of china and the foreign of china. When any terminal monitors that a service request message aiming at a target game is generated, whether the IP address of the terminal is located in a domestic IP section or not can be determined, namely, whether the IP address of the terminal is a domestic IP or not can be determined. If not, the terminal is a foreign terminal. At this time, the terminal may send the service request packet to a preset first forwarding line. Wherein, because the IP address of the first group proxy server in the first forwarding line and the IP address of the terminal are located in the same IP segment, it can be known that: the service request message may be forwarded through a first set of proxy servers in the country where the terminal is located.
Then, the first group of proxy servers can forward the service request message to the game server through the intranet where the terminal is located. Therefore, when a foreign game terminal accesses the game server, a national firewall in China (for example, China is domestic) is not needed, the packet loss rate is reduced, the problems of data interception and the like are avoided, and the forwarding speed of the service request message is increased. Therefore, the game playing smoothness of the foreign game player is improved, and the game experience of the foreign game player is improved.
The number of the proxy servers in the first group of proxy servers may be one or more, and those skilled in the art may set the number according to actual situations. When there are a plurality of proxy servers, those skilled in the art may set the routing rule of each proxy server, and the routing rule is not described in detail herein.
In addition, any proxy server in the first group of proxy servers may be installed with an agent application program, that is, a proxy application program, and the agent application program is used for forwarding the service request message. Moreover, the any proxy server may be an amazon cloud server, but is not limited thereto.
The data communication method provided by the embodiment of the present invention is described in detail below with reference to specific examples.
Suppose that a chinese national game openers a, after developing a style of network game K, can deploy a game server F of the game K in japan without a national firewall. And when any terminal monitors that a service request message aiming at the game K is generated, the terminal can judge whether the IP address of the terminal is in the domestic IP section (namely the IP section of China).
If not in the domestic IP segment, this indicates that the terminal is a foreign (e.g., japanese and usa) terminal. Referring to fig. 2, in this case, the terminal may send the service request message to: the terminal is in the first forwarding line of the country in which it is located. Therefore, the service request message can be forwarded through the first group of proxy servers in the first forwarding line.
Among them, since a large number of foreign (for example, the united states, japan, and the like) game players are located in countries where no national firewall is provided. That is, in foreign countries, electronic devices between countries are accessible to each other. Therefore, the last hop proxy server in the first group of proxy servers can forward the service request message to the game server F through the intranet of the country where the terminal is located. Therefore, the terminal does not need to access the game server F through a national firewall of China, but only needs to access the game server F arranged in Japan through an intranet of the country where the terminal is located, so that the packet loss rate is reduced, the network delay generated by forwarding the service request message is reduced, and the game playing smoothness of foreign game players can be improved.
Wherein, among the servers in the first group of proxy servers, the service request message is forwarded through the intranet of the country where the terminal is located.
In addition, it is understood that the game server F of the game K may also be pre-deployed in korea without a national firewall, although not limited thereto. Among them, it is possible to evaluate how smoothly the game players play in various countries other than the middle country when the game server F is pre-deployed in korea. And evaluates the smoothness of game play by the game players in the respective countries other than the central country when the game server F is deployed in japan. If the smoothness of japan is evaluated to be high, the game server F is deployed in japan in practical use.
When the game server F is deployed in japan, and a game player in china and abroad plays a game, the network delay generated by the service request message is shortened from 200 milliseconds originally (when deployed in china and China) to 30 milliseconds or less.
Note that the above domestic is explained by taking china as an example, and in this example, foreign means foreign in china. Of course, in the embodiment of the present invention, it is reasonable to set the country of a country a provided with the national firewall to be domestic and the country of the country a to be foreign.
The following description will be given taking an example in which the game server F is deployed in japan.
After the game server F is set in japan, the game experience of the game players in china is not affected. That is, in order to balance the game experience of the game players at home and abroad, a second forwarding route may be set at home in china. And the IP address of any proxy server in the second group of proxy servers in the second forwarding route is positioned in the IP section of China.
For example, when a terminal in China monitors that a service request message for a game K is generated, it can be determined that the IP address of the terminal is located in the domestic IP field. The terminal may then send the service request message to a second set of proxy servers in a second forwarding line as shown in fig. 2. Therefore, the second group of proxy servers can forward the service request message.
Wherein, China is provided with a national firewall. Therefore, the last hop proxy server in the second group of proxy servers needs to forward the service request message to the game server F through the public network. In this case, the service request message does not need to be forwarded through a line which is provided by the china service operator and has a long distance, but the message can be forwarded through the second group of proxy servers in the preset second forwarding route, so that the forwarding speed of the message is increased, the network delay generated by forwarding the message is reduced, and the game experience of the game players in China can be improved.
The number of the proxy servers in the second group of proxy servers may be one or more, and those skilled in the art may set the number according to actual situations. When there are a plurality of proxy servers, those skilled in the art may set the routing rule of each proxy server, and the routing rule is not described in detail herein.
For example, the second group of proxy servers includes: a Beijing proxy server, a Guangdong proxy server and a hong Kong proxy server. The routing rule corresponding to the second group of proxy servers is as follows: the Beijing proxy server transmits the received message to the Guangdong proxy server, the Guangdong proxy server transmits the received message to the hong Kong server, and the hong Kong server transmits the received message to the game server.
In addition, any proxy server in the second group of proxy servers may be installed with an agent application program, that is, a proxy application program, where the agent application program is used to implement forwarding of the service request message. Moreover, the any proxy server may be an update cloud server, but is not limited thereto.
It can be understood that, in order to increase the forwarding speed of the service request packet, the second forwarding line may be: and the special route is used for forwarding the service request message of the game K. Thus, the second set of proxy servers is: and the special server group is used for forwarding the service request message of the game K. That is, the method is only used for forwarding the service request message of the game K, but not forwarding messages of other games, so that the message forwarding speed is increased, and the game smoothness of the domestic players can be improved.
The public network and the internal network are both access modes of the Internet. The public network access mode: the IP address obtained by the terminal is an unreserved address on the internet, and the terminal of the public network and other terminals on the internet can freely access each other.
In order to avoid the service request message sent by the terminal in China, the service request message needs to be sent to the Beijing proxy server first, and then is sequentially forwarded to the Guangdong proxy server and the hong Kong proxy server. The terminal may also determine an IP address for each proxy server in the second set of proxy servers. Then, a proxy server in the second group of proxy servers whose IP address is closest to the IP address of the terminal is determined. Because the IP addresses of the same geographic area are relatively close, the method can determine the proxy server which is closest to the terminal in physical distance. Wherein, the closer the values of the 4 segment bits of the two IP addresses are, the closer the two IP addresses are.
Assume that the resulting proxy server is determined to be a Guangdong proxy server. The service request message may then be sent to the Guangdong proxy server. Thus, the Guangdong proxy server may forward the service request packet to the hong Kong proxy server, and then the hong Kong proxy server forwards the service request packet to the game server F through the public network. Therefore, the network delay generated by forwarding the service request message is reduced, and the game playing smoothness of domestic game players can be improved.
It is to be understood that the game server F may be one server or a server cluster including a plurality of servers.
When the game server F is a server cluster, each server has an IP address. Thus, the destination address of the service request message needs to be configured according to the IP address of the server that needs to be accessed. In order to reduce the complexity of configuration, a uniform entry (i.e., a uniform IP address) may be provided to the outside through the reverse proxy server shown in fig. 2, so as to implement proxy to each server in the server cluster, that is, only the target address of the service request packet to be generated needs to be configured as the IP address of the reverse proxy server.
Therefore, the service request message sent by the first group of proxy servers and/or the second group of proxy servers can be received by the reverse proxy server, and the received service request message is sent to the game server. Wherein the IP address of the reverse proxy server is located in a foreign IP segment (i.e., an IP segment in japan).
It can be understood that the reverse proxy server may also send the received service request message to the load balancing device first. Then, the load balancing device determines, according to the information such as the service type carried in the service request message: it is also reasonable to which server the service request message is specifically sent.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a data communication apparatus, where the apparatus is applied to a terminal, and referring to fig. 3, the apparatus may include:
a judging unit 301, configured to, when it is monitored that a service request packet for a target game is generated, judge whether an IP address of a terminal is located in a domestic IP segment; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
a first sending unit 302, configured to send the service request packet to a preset first forwarding line when the determination result of the determining unit 301 is negative, so that a first group of proxy servers in the first forwarding line forwards the service request packet to the game server based on an intranet where the terminal is located; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section.
In the embodiment of the invention, the phenomenon of game jamming often occurs when a terminal in foreign countries (such as China foreign countries) accesses a game server deployed in the domestic countries (such as China domestic). Thus, the game server can be deployed abroad (e.g., japan) where no national firewall is provided, that is, the IP address of the game server is located within the foreign IP segment. Also, in order to enable game players in foreign countries (e.g., japan, korea, and the united states) to obtain a better game experience, the game server may be deployed in a foreign IP segment having a better smooth evaluation result, i.e., a preset foreign IP segment. It should be noted that the above-mentioned domestic means the domestic of a certain country a, and the foreign means the foreign of the country a, and is not limited to the domestic of china and the foreign of china.
When any terminal monitors that a service request message aiming at a target game is generated, whether the IP address of the terminal is located in a domestic IP section or not can be determined, namely, whether the IP address of the terminal is a domestic IP or not can be determined. If not, the terminal is a foreign terminal. At this time, the terminal may send the service request packet to a preset first forwarding line. Wherein, because the IP address of the first group proxy server in the first forwarding line and the IP address of the terminal are located in the same IP segment, it can be known that: the service request message may be forwarded through a first set of proxy servers in the country where the terminal is located.
Then, the first group of proxy servers can forward the service request message to the game server through the intranet where the terminal is located. Therefore, when a foreign game terminal accesses the game server, a national firewall in China (for example, China is domestic) is not needed, the packet loss rate is reduced, the problems of data interception and the like are avoided, and the forwarding speed of the service request message is increased. Therefore, the game playing smoothness of the foreign game player is improved, and the game experience of the foreign game player is improved.
Optionally, in an embodiment of the present invention, the apparatus may further include:
a second sending unit, configured to send the service request packet to a preset second forwarding line when the determination result of the determining unit 301 is yes, so that a second group of proxy servers in the second forwarding line forwards the service request packet to the game server based on the public network; the IP address of any proxy server in the second set of proxy servers is located within the domestic IP segment.
Optionally, in this embodiment of the present invention, the second sending unit may include:
a determining subunit, configured to determine an IP address of each proxy server in the second set of proxy servers;
and the sending subunit is used for sending the service request message to a proxy server in the second group of proxy servers, wherein the IP address of the proxy server is closest to the IP address of the terminal, so that the service request message is forwarded to the game server based on the proxy server and the public network.
Optionally, in this embodiment of the present invention, the second forwarding line is: and the special route is used for forwarding the service request message of the target game.
Optionally, in this embodiment of the present invention, a destination address of the service request packet is: the IP address of the game server, or the IP address of the reverse proxy server; the IP address of the reverse proxy server is positioned in a foreign IP section;
the reverse proxy server is configured to: and when the destination address of the service request message is the IP address of the reverse proxy server, receiving the service request message sent by the first group of proxy servers and sending the received service request message to the game server.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a data communication system, and referring to fig. 3, the system may include: a terminal, a first set of proxy servers and a game server; the first group of proxy servers are servers in a preset first forwarding line;
the terminal is used for: when monitoring that a service request message aiming at a target game is generated, judging whether the IP address of the terminal is positioned in a domestic IP section; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
the terminal is further configured to: when the IP address of the terminal is determined not to be in the domestic IP section, the service request message is sent to a first group of proxy servers in a first forwarding line;
the first set of proxy servers is to: receiving a service request message sent by a terminal; based on the intranet where the terminal is located, forwarding the service request message to a game server; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section;
the game server is used for: and receiving a service request message.
In the embodiment of the invention, the phenomenon of game jamming often occurs when a terminal in foreign countries (such as China foreign countries) accesses a game server deployed in the domestic countries (such as China domestic). Thus, the game server can be deployed abroad (e.g., japan) where no national firewall is provided, that is, the IP address of the game server is located within the foreign IP segment. Also, in order to enable game players in foreign countries (e.g., japan, korea, and the united states) to obtain a better game experience, the game server may be deployed in a foreign IP segment having a better smooth evaluation result, i.e., a preset foreign IP segment. It should be noted that the above-mentioned domestic means the domestic of a certain country a, and the foreign means the foreign of the country a, and is not limited to the domestic of china and the foreign of china.
When any terminal monitors that a service request message aiming at a target game is generated, whether the IP address of the terminal is located in a domestic IP section or not can be determined, namely, whether the IP address of the terminal is a domestic IP or not can be determined. If not, the terminal is a foreign terminal. At this time, the terminal may send the service request packet to a preset first forwarding line. Wherein, because the IP address of the first group proxy server in the first forwarding line and the IP address of the terminal are located in the same IP segment, it can be known that: the service request message may be forwarded through a first set of proxy servers in the country where the terminal is located.
Then, the first group of proxy servers can forward the service request message to the game server through the intranet where the terminal is located. Therefore, when a foreign game terminal accesses the game server, a national firewall in China (for example, China is domestic) is not needed, the packet loss rate is reduced, the problems of data interception and the like are avoided, and the forwarding speed of the service request message is increased. Therefore, the game playing smoothness of the foreign game player is improved, and the game experience of the foreign game player is improved.
Optionally, the system may further include: a second set of proxy servers; the second group of proxy servers are servers in a preset second forwarding line;
the terminal is further configured to: when the IP address of the terminal is determined to be located in the domestic IP section, the service request message is sent to a second group of proxy servers in a second forwarding line;
the second group of proxy servers is used for: receiving a service request message sent by a terminal; based on the public network, forwarding the service request message to a game server; the IP address of any proxy server in the second set of proxy servers is located within the domestic IP segment.
Optionally, in the embodiment of the present invention, the terminal is specifically configured to: when the IP address of the terminal is determined to be located in the domestic IP section, determining the IP address of each proxy server in the second group of proxy servers; sending the service request message to a proxy server which has the IP address closest to the IP address of the terminal in a second group of proxy servers;
the proxy server in the second group of proxy servers with the IP address closest to the IP address of the terminal is used for: receiving a service request message sent by a terminal; and forwarding the service request message to a game server based on the public network.
Optionally, in this embodiment of the present invention, the second forwarding line is: and the special route is used for forwarding the service request message of the target game.
Optionally, the system may further include: a reverse proxy server; the destination address of the service request message is: the IP address of the game server, or the IP address of the reverse proxy server; the IP address of the reverse proxy server is positioned in a foreign IP section;
correspondingly, the first group of proxy servers is specifically configured to: receiving a service request message sent by a terminal; when the destination address of the service request message is the IP address of the reverse proxy server, the service request message is sent to the reverse proxy server through the intranet where the terminal is located;
the reverse proxy server is configured to: receiving a service request message sent by a first group of proxy servers; and forwarding the service request message to the game server.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a terminal, referring to fig. 4, the terminal may include a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404;
a memory 403 for storing a computer program;
the processor 401 is configured to implement the method steps provided by any of the above-mentioned embodiments of the data communication method when executing the program stored in the memory 403.
In the embodiment of the invention, the phenomenon of game jamming often occurs when a terminal in foreign countries (such as China foreign countries) accesses a game server deployed in the domestic countries (such as China domestic). Thus, the game server can be deployed abroad (e.g., japan) where no national firewall is provided, that is, the IP address of the game server is located within the foreign IP segment. Also, in order to enable game players in foreign countries (e.g., japan, korea, and the united states) to obtain a better game experience, the game server may be deployed in a foreign IP segment having a better smooth evaluation result, i.e., a preset foreign IP segment. It should be noted that the above-mentioned domestic means the domestic of a certain country a, and the foreign means the foreign of the country a, and is not limited to the domestic of china and the foreign of china.
When any terminal monitors that a service request message aiming at a target game is generated, whether the IP address of the terminal is located in a domestic IP section or not can be determined, namely, whether the IP address of the terminal is a domestic IP or not can be determined. If not, the terminal is a foreign terminal. At this time, the terminal may send the service request packet to a preset first forwarding line. Wherein, because the IP address of the first group proxy server in the first forwarding line and the IP address of the terminal are located in the same IP segment, it can be known that: the service request message may be forwarded through a first set of proxy servers in the country where the terminal is located.
Then, the first group of proxy servers can forward the service request message to the game server through the intranet where the terminal is located. Therefore, when a foreign game terminal accesses the game server, a national firewall in China (for example, China is domestic) is not needed, the packet loss rate is reduced, the problems of data interception and the like are avoided, and the forwarding speed of the service request message is increased. Therefore, the game playing smoothness of the foreign game player is improved, and the game experience of the foreign game player is improved.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Corresponding to the above method embodiments, an embodiment of the present invention provides a readable storage medium, where the readable storage medium is a readable storage medium in a terminal, and a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, the computer program implements the method steps provided by any of the above data communication method embodiments.
In the embodiment of the invention, the phenomenon of game jamming often occurs when a terminal in foreign countries (such as China foreign countries) accesses a game server deployed in the domestic countries (such as China domestic). Thus, the game server can be deployed abroad (e.g., japan) where no national firewall is provided, that is, the IP address of the game server is located within the foreign IP segment. Also, in order to enable game players in foreign countries (e.g., japan, korea, and the united states) to obtain a better game experience, the game server may be deployed in a foreign IP segment having a better smooth evaluation result, i.e., a preset foreign IP segment. It should be noted that the above-mentioned domestic means the domestic of a certain country a, and the foreign means the foreign of the country a, and is not limited to the domestic of china and the foreign of china.
When any terminal monitors that a service request message aiming at a target game is generated, whether the IP address of the terminal is located in a domestic IP section or not can be determined, namely, whether the IP address of the terminal is a domestic IP or not can be determined. If not, the terminal is a foreign terminal. At this time, the terminal may send the service request packet to a preset first forwarding line. Wherein, because the IP address of the first group proxy server in the first forwarding line and the IP address of the terminal are located in the same IP segment, it can be known that: the service request message may be forwarded through a first set of proxy servers in the country where the terminal is located.
Then, the first group of proxy servers can forward the service request message to the game server through the intranet where the terminal is located. Therefore, when a foreign game terminal accesses the game server, a national firewall in China (for example, China is domestic) is not needed, the packet loss rate is reduced, the problems of data interception and the like are avoided, and the forwarding speed of the service request message is increased. Therefore, the game playing smoothness of the foreign game player is improved, and the game experience of the foreign game player is improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, system, terminal and readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (17)

1. A data communication method, applied to a terminal, the method comprising:
when monitoring that a service request message aiming at a target game is generated, judging whether the IP address of the terminal is positioned in a domestic IP section; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
if not, sending the service request message to a preset first forwarding line, so that a first group of proxy servers in the first forwarding line forward the service request message to the game server based on the intranet where the terminal is located; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section;
and the game server corresponding to the target game is in a country without a national firewall.
2. The method of claim 1, further comprising:
if so, sending the service request message to a preset second forwarding line so that a second group of proxy servers in the second forwarding line forward the service request message to the game server based on a public network; the IP address of any proxy server in the second group of proxy servers is located in the domestic IP section.
3. The method according to claim 2, wherein the step of sending the service request packet to a preset second forwarding line, so that a second group of proxy servers in the second forwarding line forward the service request packet to the game server based on a public network, comprises:
determining an IP address of each proxy server in the second set of proxy servers;
and sending the service request message to a proxy server in a second group of proxy servers, wherein the IP address of the proxy server is closest to the IP address of the terminal, so that the service request message is forwarded to the game server based on the proxy server and the public network.
4. A method according to claim 2 or 3, characterized in that the second forwarding line comprises: and the special route is used for forwarding the service request message of the target game.
5. The method according to claim 1, wherein the destination address of the service request message is: the IP address of the game server, or the IP address of the reverse proxy server;
wherein the IP address of the reverse proxy server is located within the foreign IP segment; the reverse proxy server is configured to: and when the destination address of the service request message is the IP address of the reverse proxy server, receiving the service request message sent by the first group of proxy servers and sending the received service request message to the game server.
6. A data communication apparatus, wherein the apparatus is applied to a terminal, the apparatus comprising:
the judging unit is used for judging whether the IP address of the terminal is positioned in the domestic IP section or not when the generation of a service request message aiming at the target game is monitored; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
a first sending unit, configured to send the service request packet to a preset first forwarding line when the determination result of the determining unit is negative, so that a first group of proxy servers in the first forwarding line forwards the service request packet to the game server based on an intranet where the terminal is located; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section;
and the game server corresponding to the target game is in a country without a national firewall.
7. The apparatus of claim 6, further comprising:
a second sending unit, configured to send the service request packet to a preset second forwarding line when the determination result of the determining unit is yes, so that a second group of proxy servers in the second forwarding line forwards the service request packet to the game server based on a public network; the IP address of any proxy server in the second group of proxy servers is located in the domestic IP section.
8. The apparatus of claim 7, wherein the second sending unit comprises:
determining a subunit for the IP address of each proxy server in the second set of proxy servers;
and the sending subunit is configured to send the service request packet to a proxy server in the second group of proxy servers, where the IP address of the proxy server is closest to the IP address of the terminal, so as to forward the service request packet to the game server based on the proxy server and a public network.
9. The apparatus of claim 7 or 8, wherein the second forwarding line comprises: and the special route is used for forwarding the service request message of the target game.
10. The apparatus according to claim 6, wherein the destination address of the service request message is: the IP address of the game server, or the IP address of the reverse proxy server; the IP address of the reverse proxy server is located in the foreign IP section;
the reverse proxy server is configured to: and when the destination address of the service request message is the IP address of the reverse proxy server, receiving the service request message sent by the first group of proxy servers and sending the received service request message to the game server.
11. A data communication system, the system comprising: a terminal, a first set of proxy servers and a game server; the first group of proxy servers are servers in a preset first forwarding line;
the terminal is used for: when monitoring that a service request message aiming at a target game is generated, judging whether the IP address of the terminal is positioned in a domestic IP section; the IP address of the game server corresponding to the target game is located in a preset foreign IP section;
the terminal is further configured to: when the IP address of the terminal is determined not to be in the domestic IP section, the service request message is sent to a first group of proxy servers in a first forwarding line;
the first set of proxy servers is to: receiving a service request message sent by the terminal; based on the intranet where the terminal is located, forwarding the service request message to the game server; the IP address of any proxy server in the first group of proxy servers and the IP address of the terminal are positioned in the same IP section;
the game server is configured to: receiving a service request message;
and the game server corresponding to the target game is in a country without a national firewall.
12. The system of claim 11, further comprising: a second set of proxy servers; the second group of proxy servers are servers in a preset second forwarding line;
the terminal is further configured to: when the IP address of the terminal is determined to be located in the domestic IP section, the service request message is sent to a second group of proxy servers in a second forwarding line;
the second set of proxy servers is to: receiving a service request message sent by the terminal; based on public network, forwarding the service request message to the game server; the IP address of any proxy server in the second group of proxy servers is located in the domestic IP section.
13. The system of claim 12,
the terminal is specifically configured to: when the IP address of the terminal is determined to be located in the domestic IP section, determining the IP address of each proxy server in the second group of proxy servers; sending the service request message to a proxy server which has the IP address closest to the IP address of the terminal in a second group of proxy servers;
the proxy server in the second group of proxy servers, whose IP address is closest to the IP address of the terminal, is configured to: receiving a service request message sent by the terminal; and forwarding the service request message to the game server based on the public network.
14. The system according to claim 12 or 13, wherein the second forwarding line comprises: and the special route is used for forwarding the service request message of the target game.
15. The system of claim 11, further comprising: a reverse proxy server; the destination address of the service request message is as follows: the IP address of the game server, or the IP address of the reverse proxy server; the IP address of the reverse proxy server is located in the foreign IP section;
the first group of proxy servers is specifically configured to: receiving a service request message sent by the terminal; when the destination address of the service request message is the IP address of the reverse proxy server, the service request message is sent to the reverse proxy server through the intranet where the terminal is located;
the reverse proxy server is configured to: receiving the service request message sent by the first group of proxy servers; and forwarding the service request message to the game server.
16. A terminal is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
17. A readable storage medium, characterized in that the readable storage medium is a readable storage medium in a terminal, in which a computer program is stored which, when being executed by a processor, realizes the method steps of any one of claims 1-5.
CN201711450436.0A 2017-12-27 2017-12-27 Data communication method, device, system, terminal and readable storage medium Active CN108156247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711450436.0A CN108156247B (en) 2017-12-27 2017-12-27 Data communication method, device, system, terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711450436.0A CN108156247B (en) 2017-12-27 2017-12-27 Data communication method, device, system, terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN108156247A CN108156247A (en) 2018-06-12
CN108156247B true CN108156247B (en) 2021-05-28

Family

ID=62462496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711450436.0A Active CN108156247B (en) 2017-12-27 2017-12-27 Data communication method, device, system, terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN108156247B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582726B (en) * 2018-12-18 2021-09-07 网易(杭州)网络有限公司 Data table processing method and device
CN111193713A (en) * 2019-12-05 2020-05-22 贵阳语玩科技有限公司 System and method for managing global data of different countries by single server cluster
CN112190925A (en) * 2020-10-20 2021-01-08 厦门快快网络科技有限公司 Game accelerator based on reverse proxy

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506670A (en) * 2014-12-31 2015-04-08 北京奇虎科技有限公司 Method, device and system for establishing online game connection
CN106170008A (en) * 2016-05-17 2016-11-30 北京畅游天下网络技术有限公司 A kind of inter-network means of communication, device and load equalizer
CN106302434A (en) * 2016-08-11 2017-01-04 腾讯科技(深圳)有限公司 Server adaptation method, device and system
US9558632B2 (en) * 2012-12-21 2017-01-31 Cadillac Jack, Inc. Electronic gaming device with card tournament functionality
CN106599309A (en) * 2016-12-29 2017-04-26 中国建设银行股份有限公司 Cross-border account information inquiring method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10212238B2 (en) * 2013-05-15 2019-02-19 Level 3 Communications, Llc Selecting a content providing server in a content delivery network
CN103259865A (en) * 2013-05-23 2013-08-21 中国科学院计算机网络信息中心 Self-adaptive DNS zone file transmission method and system based on network coding
CN106921703B (en) * 2015-12-25 2020-11-27 阿里巴巴集团控股有限公司 Cross-border data synchronization method and system, and domestic and overseas data centers
CN107124461A (en) * 2017-05-04 2017-09-01 北京奇艺世纪科技有限公司 A kind of data transmission method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9558632B2 (en) * 2012-12-21 2017-01-31 Cadillac Jack, Inc. Electronic gaming device with card tournament functionality
CN104506670A (en) * 2014-12-31 2015-04-08 北京奇虎科技有限公司 Method, device and system for establishing online game connection
CN106170008A (en) * 2016-05-17 2016-11-30 北京畅游天下网络技术有限公司 A kind of inter-network means of communication, device and load equalizer
CN106302434A (en) * 2016-08-11 2017-01-04 腾讯科技(深圳)有限公司 Server adaptation method, device and system
CN106599309A (en) * 2016-12-29 2017-04-26 中国建设银行股份有限公司 Cross-border account information inquiring method and system

Also Published As

Publication number Publication date
CN108156247A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN109561141B (en) CDN node selection method and equipment
WO2018152919A1 (en) Path selection method and system, network acceleration node, and network acceleration system
US9819697B2 (en) Diffusing denial-of-service attacks by using virtual machines
CN109547286B (en) CDN node selection method, device and storage medium
CN109040243B (en) Message processing method and device
CN108156247B (en) Data communication method, device, system, terminal and readable storage medium
CN108199925A (en) A kind of data transmission method for uplink, method of reseptance and device
CN105991347A (en) Redirection method of DNS request message and device
CN104506549A (en) Method, device and system for establishing online game connection
CN110808967B (en) Detection method for challenging black hole attack and related device
CN108401040B (en) Content receiving method, content sending method, device and system for NDN
CN108124504B (en) TFO transmission method, proxy server and system
CN109412976B (en) Data transmission method, device, system, server, electronic device and medium
CN107278364B (en) Node authentication method and node authentication system
CN113300962A (en) Path acquisition method, access method, device and equipment
CN108235800A (en) A kind of network failure probing method and control centre's equipment
CN110708293B (en) Method and device for distributing multimedia service
CN109218182B (en) Method and device for synchronizing routing information
CN104869118B (en) A kind of method and system for realizing DDoS defence based on dynamic tunneling technique
CN113010314B (en) Load balancing method and device and electronic equipment
CN111866046A (en) Method for realizing cluster and related equipment
CN110808909A (en) Message processing method and device across virtual systems
CN111107006B (en) Routing management method and device
CN105991372B (en) Link detection method and device
CN114567679B (en) Data transmission method and device

Legal Events

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