CN109499058B - Matching determination method and device in game - Google Patents

Matching determination method and device in game Download PDF

Info

Publication number
CN109499058B
CN109499058B CN201811384935.9A CN201811384935A CN109499058B CN 109499058 B CN109499058 B CN 109499058B CN 201811384935 A CN201811384935 A CN 201811384935A CN 109499058 B CN109499058 B CN 109499058B
Authority
CN
China
Prior art keywords
client
service node
communication
preset
matched
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
CN201811384935.9A
Other languages
Chinese (zh)
Other versions
CN109499058A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811384935.9A priority Critical patent/CN109499058B/en
Publication of CN109499058A publication Critical patent/CN109499058A/en
Application granted granted Critical
Publication of CN109499058B publication Critical patent/CN109499058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/34Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers using peer-to-peer connections
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0858One way delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/121Shortest path evaluation by minimising delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Child & Adolescent Psychology (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for determining matching in a game. Wherein, the method comprises the following steps: acquiring a first communication delay time from a target client to a target service node in a matching queue; acquiring a first preset number of clients to be matched in a matching queue according to a first communication delay time and a first preset delay threshold, wherein a second communication delay time of the clients to be matched is less than or equal to the difference between the first preset delay threshold and the first communication delay time; determining a client from a first preset number of clients to be matched according to a preset rule, wherein the client is used as a client successfully matched with a target client; and determining a target communication line based on the client successfully matched with the target client, the data transmission line between the target service node and the target client.

Description

Matching determination method and device in game
Technical Field
The invention relates to the technical field of network services, in particular to a method and a device for determining matching in a game.
Background
In the related art, if a communication link between clients is to be established to implement game fight between the clients, when the client for the game fight is matched, only the type of the server corresponding to the client is usually considered, and the client and the server, and the client are not considered, so that matching between the client with high delay and the client with high delay is often caused, which causes inconvenience in fight between the clients and affects game experience of users.
Meanwhile, due to the play type of many games, a scheme of putting all game logic on a client for calculation is adopted. For the battle of such games, data exchange between clients is required, and there are two general ways to exchange data, P2P and forwarding suits. P2P refers to direct communication between clients, but there are many limitations; the forwarding service mode is based on a server/client mode, and data is forwarded to the participating clients through the server, so that some defects of P2P can be overcome. However, the conventional forwarding method has a drawback in that the influence is large, which significantly increases the communication delay time, because the data may bypass the forwarding server and have a path more than P2P, for example, the forwarding server and the client are no longer in the same region and are far away from each other, when the client communicates, the client may bypass the forwarding server in the region, which results in significantly longer communication time and communication distance, and finally, the communication delay between the client and the server is high, which results in significantly reduced communication quality. For example, if two clients are in the state of Guangzhou and the server is installed in the state of Hangzhou, the communication between the clients will go around the state of Hangzhou, and compared with the direct communication between two points in the state of Guangzhou in P2P, the delay will be significantly increased, and the communication link that passes through is longer, and the problem of packet loss and the like will be more likely to occur. Secondly, the distribution machine has limitations, and both parties of the client involved in the battle must be distributed to the same server to communicate, so that the flexibility is slightly poor.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining matching in a game, which are used for at least solving the technical problems that the communication delay between matched clients is high and the game quality is influenced because the total delay time of the clients is not considered in the matching between the clients in the related technology.
According to an aspect of an embodiment of the present invention, there is provided a match determination method in a game, including: acquiring a first communication delay time from a target client to a target service node in a matching queue; acquiring a first preset number of clients to be matched in a matching queue according to the first communication delay time and a first preset delay threshold, wherein a second communication delay time of the clients to be matched is less than or equal to a difference between the first preset delay threshold and the first communication delay time; determining a client from the first preset number of clients to be matched according to a preset rule, wherein the client is used as a client successfully matched with the target client; and determining a target communication line based on the client successfully matched with the target client, the data transmission line between the target service node and the target client.
Further, the method for determining matching in the game includes: before acquiring target clients and a first preset number of clients to be matched in a matching queue, acquiring communication delay time from the target clients to each service node in a plurality of service nodes every a first preset time period; sequencing the collected communication delay durations; and selecting a communication delay time from the sequenced communication delay times according to a preset service rule, and taking a service node corresponding to the communication delay time as the target service node.
Further, obtaining a first preset number of clients to be matched in the matching queue according to the first communication delay duration and a first preset delay threshold includes: calculating a difference value between the first preset delay threshold and the first communication delay time; and when the second communication delay time length is less than or equal to the difference, determining the client corresponding to the difference as the clients to be matched in the first preset number.
Further, the method for determining matching in the game further includes: after a first communication delay time from a target client to a target service node in a matching queue is obtained, when the sum of the first communication delay time and the second communication delay time is greater than a first preset delay threshold value, stopping the matching operation between the target client and the client to be matched.
Further, a plurality of service nodes are configured in a plurality of geographical partitions, and each service node establishes communication connection with each client in the geographical partition in advance.
Further, the pre-establishing, by the service node, a communication connection with each client in the geographical zone in which the service node is located includes: the service node sends out a sniffing signal, wherein the sniffing signal is used for determining whether the service node can establish a communication link with each client of the regional partition where the service node is located, and acquiring the communication delay time of the service node reaching each client of the regional partition where the service node is located under the condition that the service node can establish the communication link with the client; and under the condition that the communication delay time length is lower than a second preset delay threshold value, the service node establishes communication connection with the client.
Further, the service nodes between different geographical partitions are connected by a preset dedicated communication line, wherein the data transmission rate of the preset dedicated communication line is higher than a preset transmission rate threshold.
Further, when the service nodes are updated, a second preset number of service nodes are selected to be offline in a second preset time period, and after the offline service nodes are maintained, the rest service nodes are selected to be offline in a third preset time period.
According to another aspect of the embodiments of the present invention, there is also provided a match determination method in a game, including: a client acquires a service node list, wherein the service node list comprises address information of each service node; the client acquires the communication delay time of the client and each service node every other preset time period; the client sends application information, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating a client for matching and fighting, and the application information carries the communication delay time for the client to reach each service node; when the matching link is established to the client, the client acquires the total delay time of reaching each client to be matched in the matching queue, wherein the total delay time is the sum of the first communication delay time of reaching the service node by the client and the second communication delay time of reaching the service node by each client to be matched in the matching queue; taking the client to be matched with the total delay duration lower than a first preset delay threshold value as the client successfully matched with the client; and determining a target communication line based on the client successfully matched with the client, the data transmission line between the service node and the client.
Further, the obtaining, by the client, the communication delay duration between the client and each service node every preset time period includes: the client sends a delayed sniffing signal to each service node every other preset time period through a preset communication protocol, wherein the delayed sniffing signal is used for determining whether the client can establish a communication link with each service node of the regional partition, and acquiring the communication delay time of the client reaching each service node of the regional partition under the condition of determining that the communication link with the service node can be established; if the client does not receive the communication delay time returned by the service node, recording the obtained delay time as a preset value, wherein the preset value indicates that the service node cannot be communicated; and if the client receives the communication delay time returned by the service node, updating the recorded communication delay time of the service node in the service node list.
Further, the method for determining matching in the game further includes: after the client acquires the total delay time of each client to be matched in the matching queue, when the total delay time from the client to each client to be matched in the matching queue is greater than the first preset delay threshold, the first preset delay threshold is modified into a third preset delay threshold, wherein the third preset delay threshold is greater than the first preset delay threshold.
Further, the method for determining matching in the game further includes: after the client side obtains the total delay time of each client side to be matched in the matching queue, when the total delay time from the client side to each client side to be matched in the matching queue is larger than the first preset delay threshold value, one client side to be matched is randomly selected from the matching queue to be matched with the client side for match matching.
According to another aspect of the embodiments of the present invention, there is also provided a match determination apparatus in a game, including: the first obtaining unit is used for obtaining a first communication delay time from a target client to a target service node in the matching queue; a second obtaining unit, configured to obtain a first preset number of clients to be matched in a matching queue according to the first communication delay duration and a first preset delay threshold, where a second communication delay duration of the clients to be matched is less than or equal to a difference between the first preset delay threshold and the first communication delay duration; a first determining unit, configured to determine, according to a preset rule, a client from the first preset number of clients to be matched, as a client that is successfully matched with the target client; and the second determining unit is used for determining a target communication line based on the client successfully matched with the target client and the data transmission line between the target service node and the target client.
Further, the in-game match determination device includes: the system comprises an acquisition unit, a matching unit and a processing unit, wherein the acquisition unit is used for acquiring the communication delay time from a target client to each service node in a plurality of service nodes every first preset time period before acquiring the target clients and a first preset number of clients to be matched in a matching queue; the sequencing unit is used for sequencing the collected communication delay durations; and the selection unit is used for selecting one communication delay time from the sequenced communication delay times according to a preset service rule and taking the service node corresponding to the communication delay time as the target service node.
Further, the second acquisition unit includes: the calculating module is used for calculating the difference value between the first preset delay threshold and the first communication delay time; and the first determining module is configured to determine, when the second communication delay duration is less than or equal to the difference, that the client corresponding to the difference is the client to be matched in the first preset number.
Further, the match determination device in the game further includes: and the stopping unit is used for stopping the matching operation between the target client and the client to be matched when the sum of the first communication delay time and the second communication delay time is greater than the first preset delay threshold after the first communication delay time from the target client to the target service node in the matching queue is obtained.
Further, the match determination device in the game further includes: the system comprises an establishing unit, a judging unit and a judging unit, wherein the establishing unit is used for configuring a plurality of service nodes in a plurality of geographical partitions, and each service node is in communication connection with each client of the geographical partition in advance.
Further, the establishing unit includes: the system comprises a sending module, a sending module and a sending module, wherein the sending module is used for sending a sniffing signal by the service node, the sniffing signal is used for determining whether the service node can establish a communication link with each client of the regional partition where the service node is located, and acquiring the communication delay time of the service node reaching each client of the regional partition where the service node is located under the condition that the service node can establish the communication link with the client; and the establishing module is used for establishing communication connection between the service node and the client under the condition that the communication delay time length is lower than a second preset delay threshold value.
Further, the service nodes between different geographical partitions are connected by a preset dedicated communication line, wherein the data transmission rate of the preset dedicated communication line is higher than a preset transmission rate threshold.
Further, when the service nodes are updated, a second preset number of service nodes are selected to be offline in a second preset time period, and after the offline service nodes are maintained, the rest service nodes are selected to be offline in a third preset time period.
According to another aspect of the embodiments of the present invention, there is also provided a match determination apparatus in a game, including: a third obtaining unit, configured to obtain, by a client, a service node list, where the service node list includes address information of each service node; a fourth obtaining unit, configured to obtain, by the client, a communication delay duration between the client and each service node every preset time period; the client side sends application information, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating the client side in matching fight, and the application information carries the communication delay time for the client side to reach each service node; a third obtaining unit, configured to, when it is time to establish a matching link with the client, obtain, by the client, a total delay time to reach each client to be matched in the matching queue, where the total delay time is a sum of a first communication delay time for the client to reach the service node and a second communication delay time for each client to be matched in the matching queue to reach the service node; a third determining unit, configured to use the client to be matched whose total delay duration is lower than a first preset delay threshold as the client successfully matched with the client; and the fourth determining unit is used for determining a target communication line based on the client matched with the client successfully and the data transmission line between the service node and the client.
Further, the fourth acquiring unit includes: the first sending module is used for sending a delayed sniffing signal to each service node once by the client through a preset communication protocol every other preset time period, wherein the delayed sniffing signal is used for determining whether the client can establish a communication link with each service node of the regional partition where the client is located, and acquiring the communication delay time of the client reaching each service node of the regional partition where the client is located under the condition that the client can establish the communication link with the service node; the recording module is used for recording the acquired delay time as a preset value when the client does not receive the communication delay time returned by the service node, wherein the preset value indicates that the service node cannot be communicated; and the updating module is used for updating the communication delay time of the service node in the recorded service node list when the client receives the communication delay time returned by the service node.
Further, the match determination device in the game further includes: and a modifying unit, configured to modify the first preset delay threshold to a third preset delay threshold after the client obtains a total delay time to reach each client to be matched in the matching queue, and when it is determined that the total delay time from the client to each client to be matched in the matching queue is greater than the first preset delay threshold, where the third preset delay threshold is greater than the first preset delay threshold.
Further, the match determination device in the game further includes: and the selecting unit is used for randomly selecting one client to be matched from the matching queue to match with the client when the total delay time from the client to each client to be matched in the matching queue is greater than the first preset delay threshold after the client obtains the total delay time to each client to be matched in the matching queue.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the in-game match determination method of any of the above via execution of the executable instructions.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the method for determining matching in a game according to any one of the above.
In the embodiment of the invention, a first communication delay time from a target client to a target service node in a matching queue is obtained, a first preset number of clients to be matched in the matching queue is obtained according to the first communication delay time and a first preset delay threshold, wherein a second communication delay time of the clients to be matched is less than or equal to the difference between the first preset delay threshold and the first communication delay time, a client is determined from the first preset number of clients to be matched according to a preset rule and is used as a client successfully matched with the target client, and a target communication line is determined based on a data transmission line between the client successfully matched with the target client, the target service node and the target client. In the embodiment, the total delay duration of the clients of the two matching parties can be limited, the matching butt joint can be established between the clients only when the sum of the second communication delay duration and the first communication delay duration is lower than or equal to the first preset delay threshold, and for the matching between the two competing parties in the game, the total delay of the two competing parties can be kept within a stable duration, the situation of matching of the two competing parties cannot occur, the situation of matching of the two competing parties at an excessively high delay is reduced, and the problem that the communication delay between the matched clients is high and the game quality is influenced because the total delay duration of the two competing parties is not considered in the matching between the clients in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of determining a match in a game according to an embodiment of the present invention;
FIG. 2 is a flow diagram of another alternative in-game match determination method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an in-game match determination apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative in-game match determination apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be 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 the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The following embodiments of the present invention can be applied to various communication forwarding applications, improve the quality of a communication forwarding service network, reduce the total delay time between matched clients, and allow a client to periodically collect the delay of a server and collect the communication condition of the server.
In the invention, the servers are established into geographical zones, each server performs network communication forwarding on the client side of the geographical zone, and a special communication line is established among the geographical zones, so that the problems in the forwarding process are reduced when the distance between the client sides is relatively long. The network communication between the client and the server can ensure the shortest distance in regions, for example, the client in the Guangzhou can directly send to the server in the Guangzhou and then forward through the server in the Guangzhou, while the client in the Chengzhou can directly send to the server in the Chengzhou and then forward through the server in the Chengzhou, and then the server between the regional partitions forwards the communication data by using a communication diversion line, if the client 1 in the Guangzhou needs to communicate with the client 2 in the Chengzhou, the forwarding line is the client 1 in the Guangzhou, the server in the Chengzhou and the client 2 in the Chengzhou, so that the situation that the communication delay is lengthened due to the need of a bypass of the original client can be reduced, for example, when the client in the Guangzhou communicates with the server, the communication can be interfered by various situations, the communication distance between the client and the server is reduced, and the rapid communication between the servers (for example, establishing a special line between the servers) is ensured, so that the total communication delay is reduced.
Of course, in the present invention, during matching, only the same server may be described, for example, for a server with a uniform resource allocation, the total delay time of two clients reaching the server may be collected, and it is determined whether the matching between the two clients is achieved.
In the invention, when matching between clients, the shortest path screening mechanism based on client delay automatically ignores the server or network with problems, so that the distributed server is always the path which is currently available and has the best quality. The present invention will be described in detail below with reference to examples.
Example one
In accordance with an embodiment of the present invention, there is provided an embodiment of a match determination method in a game, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
Optionally, in the embodiment of the present invention, in terms of a communication architecture, the communication architecture in the embodiment of the present invention is that direct communication is established between a client and a server, the communication architecture is divided into a plurality of geographical partitions nationwide, each geographical partition is provided with a corresponding number of servers, each client may be connected to any server, for example, the client a is connected to the server 1, the client B is connected to the server 2, the server 1 and the server 2 may be different servers or may be the same server, and during passing, the client a sends communication data to the server 1, the server 1 sends a message to the server 2, and the server 2 sends the communication data to the client B.
The manner of setting the servers for the geographical partitions may be to deploy a plurality of groups of servers in different geographical partitions according to the geographical concentration of the user, for example, setting a east China partition, a north China partition, a south China partition, and the like; the background searches the delay information of all the servers at intervals; after the client operates, the delay time of reaching the server of the regional zone is collected once at intervals, the delay time of reaching the server of the regional zone is used as the delay time of the server according to the average delay of the delay time of the latest times, the delay time from the client to each server can be sent to the matched server during matching, and the shortest communication path is calculated by the matched server according to the delay of reaching the server by the client and the delay among the servers, so that the target communication line is obtained.
Through the shortest path algorithm, the communication between the clients can go through the shortest link in the actual communication. The two opposite parties are connected with servers of different regional nodes, and the congested public lines can be avoided by deploying inter-regional dedicated lines, so that the communication quality is further improved.
Fig. 1 is a flowchart of a match determination method in a game according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S102, obtaining a first communication delay time from a target client to a target service node in a matching queue;
step S104, acquiring a first preset number of clients to be matched in a matching queue according to a first communication delay time and a first preset delay threshold, wherein a second communication delay time of the clients to be matched is less than or equal to the difference between the first preset delay threshold and the first communication delay time;
step S106, determining a client from a first preset number of clients to be matched according to a preset rule, wherein the client is used as a client successfully matched with a target client;
and step S108, determining a target communication line based on the client successfully matched with the target client, the data transmission line between the target service node and the target client.
Through the steps, a first communication delay time from a target client to a target service node in a matching queue is obtained, a first preset number of clients to be matched in the matching queue are obtained according to the first communication delay time and a first preset delay threshold, wherein a second communication delay time of the clients to be matched is smaller than or equal to the difference between the first preset delay threshold and the first communication delay time, a client is determined from the first preset number of clients to be matched according to a preset rule and serves as a client successfully matched with the target client, and a target communication line is determined based on the client successfully matched with the target client, a data transmission line between the target service node and the target client. In the embodiment, the total delay duration of the clients of the two matching parties can be limited, the matching butt joint can be established between the clients only when the sum of the second communication delay duration and the first communication delay duration is lower than or equal to the first preset delay threshold, and for the matching between the two competing parties in the game, the total delay of the two competing parties can be kept within a stable duration, the situation of matching of the two competing parties cannot occur, the situation of matching of the two competing parties at an excessively high delay is reduced, and the problem that the communication delay between the matched clients is high and the game quality is influenced because the total delay duration of the two competing parties is not considered in the matching between the clients in the prior art is solved.
The above steps will be described in detail below.
The number of the matching clients in the following embodiments of the present invention may be determined by itself according to the number of the clients that need to be matched for each application, for example, in an MOBA (multiplayer online tactical sports game), if 5 to 5 team games may occur, 10 clients need to be matched, and when matching, the technical solution of the present invention may also be used.
The following embodiments are described with reference to a processing center of a server, where the processing center of the server needs to consider the delay between clients when matching between the clients, so as to ensure that the delay between the two matching clients is not too high.
In the embodiment of the invention, except for considering the normal matching condition of the application, the following screening of network communication delay is added, a first preset delay threshold value is set to obtain the delay of the shortest path of the two matched parties, if the delay is lower than the first preset delay threshold value, the matching can be carried out, if the delay is higher than the delay, the filtering is carried out, of course, in the invention, if the client corresponding to the target client is not matched within a certain time period, namely, the screening result does not contain any other client applying for matching, the delay threshold value is widened, and the try is carried out again until the opponent is matched or the timeout is reached.
The normal matching condition for the above-described application may be a matching condition included in the application itself, and for example, in one game application, if matching between both the client terminals of the player and the client terminals of the player is to be established, it is necessary to consider a game screening condition such as a player level, a player slot, a system used by the player, and a communication carrier of the player.
Step S102, obtaining a first communication delay time from a target client to a target service node in a matching queue.
For example, after the client sends a fight request, the address of the client may be recorded in the matching queue, and at this time, the client may be used as a matched object. And if the matching queue indicates that the client is in turn, the client can be taken as the target client so as to realize the matching of the target client. For example, after the client a applies for match matching, the client a is added to the matching queue, and when a matching is completed, a first preset number of other clients applying for matching are taken from the head of the matching queue to perform screening of matching conditions.
Optionally, the first preset number may be set by itself, for example, 5, that is, 5 clients to be matched are selected, and whether there is a client that can be matched with the target client is determined, where the 5 clients to be matched and the target client may be in the same geographical partition or not, and preferably, when matching, the clients in the same geographical partition may be preferentially matched, so as to reduce a communication distance between the clients, and also reduce a communication delay.
In the embodiment of the invention, one service node is taken as an explanation, namely, when the two clients are matched, the communication delay of the two clients reaching the server node is considered, whether a communication line is established or not is determined, and the matching of the two clients is realized.
In an optional example, before the target clients and a first preset number of clients to be matched in the matching queue are obtained, communication delay time from the target clients to each service node in the plurality of service nodes is collected every other first preset time period; sequencing the collected communication delay durations; and selecting a communication delay time from the sequenced communication delay times according to a preset service rule, and taking a service node corresponding to the communication delay time as a target service node.
The first preset time period may be set by itself, for example, 1 minute, that is, the client needs to collect the communication delay time of reaching the service node every 1 minute.
The preset service rule indicates a manner of extracting the communication delay time and the number of the extracted communication delay time, for example, after the communication delay time is sorted, the top 5 of the communication delay time are taken as the communication delay time to be selected, then, a communication delay time is selected from the communication delay time to be selected, and the service node with the communication delay time is determined as the target service node, that is, the service node with the lower communication delay time can be selected as the target service node in the application.
Step S104, a first preset number of clients to be matched in the matching queue is obtained according to the first communication delay time and a first preset delay threshold, wherein the second communication delay time of the clients to be matched is less than or equal to the difference between the first preset delay threshold and the first communication delay time.
And during matching, selecting one of the clients to be matched in the matching queue as the client to be matched, and then determining whether the two clients can be successfully matched or not through screening.
In this application, obtaining a first preset number of clients to be matched in a matching queue according to a first communication delay duration and a first preset delay threshold includes: calculating a difference value between a first preset delay threshold and a first communication delay time; and when the second communication delay time length is less than or equal to the difference, determining the client corresponding to the difference as the clients to be matched in the first preset number. For example, a first preset delay threshold is set as T, and a first communication delay duration from a current target ue to a target service node is detected as La, at this time, a difference between the first preset delay threshold and the first communication delay duration may be calculated as T-La, and a communication delay interval from a ue that can be matched by the target ue to the target service node is [0, T-La ], that is, only when a communication delay between another ue to be matched and the target service node is greater than 0 and less than or equal to T-La, the ue can join the first preset number of ues. Since La is closer to T, T-La is smaller; the smaller La is, the larger T-La is, namely, a high-delay user can only match a low-delay user, and a low-delay user can match a user with a larger delay interval, so that the total variance of the communication delay is reduced under the condition that the mathematical expectation value of the communication delay is unchanged.
Optionally, the method for determining matching in the game further includes: after the first communication delay time from the target client to the target service node in the matching queue is obtained, when the sum of the first communication delay time and the second communication delay time is greater than a first preset delay threshold value, the matching operation between the target client and the client to be matched is stopped. Namely, the matching operation between the two clients can be stopped when the communication delay time length of the two clients exceeds the set threshold value.
The above steps indicate that the client can be determined as the client to be matched only when the communication delay between the client and the client is lower than a preset delay threshold.
Step S106, determining a client from the first preset number of clients to be matched according to a preset rule, wherein the client is used as the client successfully matched with the target client.
The method can establish a matching list for the clients to be matched, then select a first preset number of the clients to be matched, namely randomly select an opponent (select a client) from the matching list, inform the two parties of connecting servers which are connected in the shortest path and start fighting (namely determining a target communication line).
And step S108, determining a target communication line based on the client successfully matched with the target client, the data transmission line between the target service node and the target client.
In the step S108, it is indicated that a communication connection can be established between the target client, the target service node, and the client successfully matched with the target client, so as to establish a fight link between the target client and the client successfully matched.
In the embodiment of the invention, when the service nodes are updated, a second preset number of service nodes are selected to be offline in a second preset time period, and after the offline service nodes are maintained, the rest service nodes are selected to be offline in a third preset time period. Namely, the uninterrupted update of the service node can be realized.
The following is a detailed description of the specific deployment of the service node of the present invention.
In the embodiment of the invention, the service nodes can be deployed in the core cities of all regional partitions in the deployment process, for example, the service nodes can be deployed in Beijing for the North China partition, the service nodes can be deployed in Guangzhou for the south China partition, and when the service nodes are matched, the clients in the same region can be matched, the communication distance is shortened, and the communication time is reduced. In the process of deployment, different machine room deployment modes are slightly different: BGP (border gateway protocol, namely equipment using the border gateway protocol) machine room can only monitor the external network address if the internal network address and the external network address exist, otherwise, the internal network address can be allocated as a relay address, and thus, the machine room cannot communicate with the external network address; the three-wire computer room has a plurality of external addresses, such as communication, mobile and telecommunication, the address of the fastest line is selected as the relay address, and the relay address cannot be allocated by depending on the line of the client, because the addresses between different operators cannot communicate
In the embodiment of the invention, a plurality of service nodes are configured in a plurality of geographical partitions, and each service node establishes communication connection with each client in the geographical partition in advance.
In the embodiment of the present invention, the pre-establishing, by the service node, a communication connection with each client in the geographical partition includes: the method comprises the steps that a service node sends out a sniffing signal, wherein the sniffing signal is used for determining whether the service node can establish a communication link with each client of a regional partition where the service node is located, and under the condition that the service node can establish the communication link with the client, the communication delay time of the service node reaching each client of the regional partition where the service node is located is obtained; and under the condition that the communication delay time is lower than a second preset delay threshold, the service node establishes communication connection with the client.
Optionally, the service nodes in different geographical partitions are connected by a preset dedicated communication line, where a data transmission rate of the preset dedicated communication line is higher than a preset transmission rate threshold. The preset transmission rate threshold may be a transmission rate threshold set by a developer or a user, and the preset data transmission rate of the dedicated communication line indicates a transmission rate at which data is transmitted by using a dedicated optical fiber, a communication tunnel, or the like.
In the embodiment of the invention, the original mode of searching the shortest communication path, namely a weighted undirected graph shortest path algorithm-Dijkstra algorithm, is abandoned, the communication path is established by deploying the special line among the service nodes and searching the service node closest to the regional partition of the client, the shortest path generally does not exceed 4 nodes (client-server 1-server 2-client 2), and the condition of the inter-server flow can not be considered, so the shortest path algorithm is simplified into traversing 3 sections of paths to obtain the shortest path.
In the embodiment of the invention, at least two days of servers can be deployed in each regional partition, so that the fault tolerance is improved, the machine rooms in different regional partitions have different conditions, and the deployment mode of each machine room can be adjusted according to the local characteristics and the shape and the area of the deployment space.
In addition, in the embodiment of the invention, the AWS machine needs to configure the network in a NAT (network address translation) manner, and establish mapping between the intranet IP and the egress IP.
The online process of the server comprises the following steps: deploying a server according to the region partition and the machine room type, starting the server, and not accessing the server list; after the test is correct, accessing a server list; and finishing the on-line.
And the offline process for the server comprises the following steps: removing the server address from the list; removing the server address from the inter-server delay list; and when the communication quantity on the server is returned to 0, the server can be closed and recovered.
In the application, when the service nodes are updated, a second preset number of service nodes are selected to be offline in a second preset time period, and after the offline service nodes are maintained, the rest service nodes are selected to be offline in a third preset time period. Wherein the second preset time period may indicate the update time, for example, 8 o 'clock-11 o' clock at night, and the specific time period indicated by the second preset time period is not limited in this application. The second preset number may refer to a number that can be updated in one updating process, for example, half of the servers may be selected as the number of one updating, and then after updating and re-online, the other half of the servers may be selected for updating. For example, a server update/maintenance flow, comprising: half of the servers in each zone are offline (there are at least 2 servers in each zone); after updating/maintaining, the system is on-line again; and performing updating maintenance operation on the remaining half of the servers in each area.
Through the server updating process, normal updating of the server can be guaranteed under the condition that a user does not sense the server updating process.
The communication matching method of the present invention will be described below with reference to a client as an implementation agent.
After the client is started, the client can acquire a service node list capable of performing communication forwarding, and during acquisition, the client can acquire the list of service nodes capable of forwarding the client according to communication between an installed application and a service processing center.
Fig. 2 is a flowchart of another alternative match determination method in a game according to an embodiment of the present invention, as shown in fig. 2, the method including:
step S201, a client acquires a service node list, wherein the service node list comprises address information of each service node;
step S203, the client acquires the communication delay time of the client and each service node every other preset time period;
step S205, the client sends application information, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating the client for matching and fighting, and the application information carries the communication delay time of the client reaching each service node;
step S207, when the matching link is established by the client, the client acquires the total delay time of each client to be matched in the arrival matching queue, wherein the total delay time is the sum of the first communication delay time of the client to the service node and the second communication delay time of each client to be matched in the arrival matching queue to the service node;
step S209, the client to be matched with the total delay duration of which is lower than the first preset delay threshold is taken as the client successfully matched with the client;
step S211, determining a target communication line based on the client successfully matched with the client, the data transmission line between the service node and the client.
Through the steps, the client side obtains a service node list, wherein the service node list comprises address information of each service node, the client side obtains communication delay time between the client side and each service node every preset time period, and sends application information, the application information is used for requesting to join a matching queue, the matching queue is used for indicating the client side in matching fight, the application information carries the communication delay time for the client side to reach each service node, when the matching link is established by the client side, the client side obtains the total delay time for the client side to reach each client side to be matched in the matching queue, the total delay time is the sum of first communication delay time for the client side to reach the service node and second communication delay time for the client side to reach the service node to be matched in the matching queue, and the client side to be matched, the total delay time of which is lower than a first preset delay threshold value, is used as the client side successfully matched with the client side And determining a target communication line based on the client matched with the client successfully, the data transmission line between the service node and the client. In the embodiment, when the client is matched, the communication delay time from the client to each service node can be collected, by limiting the total delay time of the clients of the two matched clients, the matched docking can be established between the clients only when the sum of the second communication delay time and the first communication delay time is lower than or equal to a first preset delay threshold, for the matching between the two parties in the game, the total delay of the two parties can be kept within a stable time length, the condition of matching between the two parties with over-high delay can not occur, the condition that the high-delay client is matched with the high-delay client in the prior art is reduced, therefore, the technical problems that in the related art, because the total delay time of the two clients is not considered in the matching between the clients, the communication delay between the matched clients is high and the game quality is influenced are solved.
The above-described respective implementation steps are explained in detail below.
Step S201, the client acquires a service node list, where the service node list includes address information of each service node.
The service node list may be a forwarding service node list, that is, a list corresponding to a service node that can forward a message of a client.
Step S203, the client acquires the communication delay time between the client and each service node every preset time period.
For the preset time period, it may be self-set, for example, 1 minute or 1 hour, etc. In the invention, when the client acquires the communication delay time, the client can acquire the communication delay time from the service node through a self-defined echo protocol.
In the embodiment of the present invention, the obtaining, by the client, the communication delay duration between the client and each service node every preset time period includes: the method comprises the steps that a client sends a delay sniffing signal to each service node once every preset time period through a preset communication protocol, wherein the delay sniffing signal is used for determining whether the client can establish a communication link with each service node of a regional partition where the client is located, and the communication delay time of the client reaching each service node of the regional partition where the client is located is obtained under the condition that the client can establish the communication link with the service node; if the client does not receive the communication delay time returned by the service node, recording the obtained delay time as a preset value, wherein the preset value indicates that the service node cannot be communicated; and if the client receives the communication delay time returned by the service node, updating the recorded communication delay time of the service node in the service node list.
The preset value may be-1, that is, the preset value may indicate that the communication delay time for the client to reach the service node is not obtained, at this time, the service node is not available, and if the communication delay time is received, the communication delay time of the service node may be updated.
The client can record a plurality of communication delay durations for each service node, or update the communication delay durations, if the latest delay durations are not preset values, the service node can communicate, and at the moment, the communication delay duration which reaches the service node last time can be used as the communication delay duration of the service node.
Of course, in the embodiment of the present invention, the setting of the preset time period may be divided into two ways, in a normal case, the preset time period may be ET1, and if the return value of the delay is taken as a preset value or exceeds a specific threshold ETH, the next preset time period is set as ET2, and ET1 is longer than ET2, because in a case that the network is good, the sampling interval may be longer, which reduces the extra load on the server due to the sampling delay, and in a case that the network is poor, the sampling delay needs to be more frequent, and it is desirable to capture the situation of network quality recovery earlier.
Step S205, the client sends application information, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating the client for matching and fighting, and the application information carries the communication delay time of the client reaching each service node.
Namely, the client can apply for joining the matching queue, and at the moment, the client can submit the communication delay time reaching each service node detected by the client to the matching service node, so that the service node can judge how to match.
Step S207, when the matching link is established by the client, the client obtains the total delay time of reaching each client to be matched in the matching queue, wherein the total delay time is the sum of the first communication delay time of reaching the service node by the client and the second communication delay time of reaching the service node by each client to be matched in the matching queue.
When the client is matched for the first time, a first preset delay threshold value can be set, a preset number of pieces of client information to be matched are taken out from the matching queue, the total delay time of the shortest path is calculated through the communication delay information of the client to be matched and the communication delay information between the service nodes, and if the total delay time is less than or equal to the first preset delay threshold value, matching can be carried out.
In the embodiment of the invention, when the shortest communication path between the clients is calculated, a common weighted undirected graph shortest path algorithm, namely Dijkstra algorithm, is not adopted, but simplified, because the more nodes are communicated, the more loss is, the shortest path does not exceed 4 nodes (client-server 1-server 2-client 2) under the topological structure, and the condition of the flow between the servers can not be considered, so the shortest path algorithm is simplified into traversing 3 paths to obtain the shortest path.
Step S209, the client to be matched whose total delay duration is lower than the first preset delay threshold is taken as the client successfully matched with the client.
Step S211, determining a target communication line based on the client successfully matched with the client, the data transmission line between the service node and the client.
In an optional example of this embodiment, after the client obtains the total delay time to reach each client to be matched in the matching queue, when it is determined that the total delay time from the client to each client to be matched in the matching queue is greater than a first preset delay threshold, one client to be matched is randomly selected from the matching queue to perform match matching with the client. That is, when there is no matching client, one client is randomly taken out from the existing matching queue as a competing client, and both sides are notified of the service node to be connected to each other in the shortest path, thereby performing game competing.
As another optional example of this embodiment, the method for determining matching in a game further includes: after the client obtains the total delay time of each client to be matched in the arrival matching queue, when the total delay time from the client to each client to be matched in the matching queue is larger than a first preset delay threshold value, the first preset delay threshold value is modified into a third preset delay threshold value, wherein the third preset delay threshold value is larger than the first preset delay threshold value.
That is, when there is no matching to the client, the next screening of the matching opponent may be performed after a period of time, and the delay threshold is expanded to a third preset delay threshold, where the third preset delay threshold is arbitrarily set and may be greater than the first preset delay threshold. The third preset delay threshold is changed to ensure that clients can be normally matched, if the total communication delay between service nodes is very high within a certain period of time, the total communication delay time between the clients is improved, if one client cannot be matched with the client according to the first preset delay threshold, the delay threshold can be relaxed, and the client can be retried until the client is matched, so that the game fight is realized.
By the embodiment, shortest path calculation between the clients can be achieved, the client Cl element periodically acquires the communication delay of each service node, the communication delay is informed to the service node server when matching is carried out, and then the service node can select the shortest communication path according to the delay of the two parties and the internal delay of the forwarding server node. In addition, in the embodiment of the invention, the shortest path delay of the two parties is used as a matching condition, the matching can be carried out when the shortest path delay is smaller than a certain delay party, the high-delay player and the low-delay player are matched, and the medium-delay player and the low-delay player are matched with each other, so that the total delay of the game application is improved. The two opposite parties are connected with servers of different regional nodes, and the congested public lines can be avoided by deploying inter-regional dedicated lines, so that the communication quality is further improved, and the optimal communication quality is achieved.
EXAMPLE III
The present invention will be described in detail below with reference to a matching determination device in a game.
Fig. 3 is a schematic diagram of an in-game match determination apparatus according to an embodiment of the present invention, which, as shown in fig. 3, may include: a first acquisition unit 31, a second acquisition unit 33, a first determination unit 35, a second determination unit 37, wherein,
a first obtaining unit 31, configured to obtain a first communication delay duration from a target client to a target service node in a matching queue;
a second obtaining unit 33, configured to obtain a first preset number of clients to be matched in the matching queue according to the first communication delay duration and a first preset delay threshold, where a second communication delay duration of the clients to be matched is less than or equal to a difference between the first preset delay threshold and the first communication delay duration;
the first determining unit 35 is configured to determine a client as a client successfully matched with the target client from a first preset number of clients to be matched according to a preset rule;
and a second determining unit 37, configured to determine the target communication line based on the client successfully matched with the target client, the data transmission line between the target service node and the target client.
The matching determination device in the game obtains the first communication delay time from the target client to the target service node in the matching queue through the first obtaining unit 31, a second obtaining unit 33 obtains a first preset number of clients to be matched in the matching queue according to the first communication delay duration and the first preset delay threshold, wherein the second communication delay time of the client to be matched is less than or equal to the difference between the first preset delay threshold and the first communication delay time, a client is determined from the first preset number of clients to be matched according to the preset rule by the first determining unit 35, and is used as the client successfully matched with the target client, the target communication line is determined by the second determination unit 37 based on the client that is successfully matched with the target client, the data transmission line between the target service node and the target client. In the embodiment, the total delay duration of the clients of the two matched parties can be limited, the matching butt joint can be established between the clients only when the sum of the second communication delay duration and the first communication delay duration is lower than or equal to the preset delay threshold, for the matching between the two parties in the game, the total delay of the two parties in the game can be kept in a stable duration, the situation of matching between the two parties with too high delay can not occur, and the situation that the existing high-delay client is matched with the high-delay client is reduced, so that the technical problems that the communication delay between the matched clients is high and the game quality is influenced because the total delay duration of the two parties is not considered in the matching between the clients in the related art are solved.
The match determination device in the game includes: the system comprises an acquisition unit, a matching unit and a processing unit, wherein the acquisition unit is used for acquiring the communication delay time from a target client to each service node in a plurality of service nodes every first preset time period before acquiring the target clients and a first preset number of clients to be matched in a matching queue; the sequencing unit is used for sequencing the collected communication delay durations; and the selection unit is used for selecting one communication delay time from the sequenced communication delay times according to a preset service rule and taking the service node corresponding to the communication delay time as a target service node.
In addition, the second acquisition unit includes: the calculating module is used for calculating the difference value between the first preset delay threshold and the first communication delay time; and the first determining module is used for determining that the client corresponding to the difference is the client to be matched in the first preset number when the second communication delay time length is less than or equal to the difference.
Further, the match determination device in the game further includes: and the stopping unit is used for stopping the matching operation between the target client and the client to be matched when the sum of the first communication delay time and the second communication delay time is greater than a first preset delay threshold after the first communication delay time from the target client to the target service node in the matching queue is obtained.
In an embodiment of the present invention, the matching determination apparatus in a game further includes: the system comprises an establishing unit, a judging unit and a judging unit, wherein the establishing unit is used for configuring a plurality of service nodes in a plurality of geographical partitions, and each service node is in communication connection with each client of the geographical partition in advance.
It should be noted that the establishing unit includes: the system comprises a sending module, a sending module and a sending module, wherein the sending module is used for sending a sniffing signal by a service node, the sniffing signal is used for determining whether the service node can establish a communication link with each client of a geographical zone where the service node is located, and acquiring the communication delay time of the service node reaching each client of the geographical zone where the service node is located under the condition that the service node can establish the communication link with the client; and the establishing module is used for establishing communication connection between the service node and the client under the condition that the communication delay time length is lower than a second preset delay threshold value.
Optionally, the service nodes in different geographical partitions are connected by a preset dedicated communication line, where a data transmission rate of the preset dedicated communication line is higher than a preset transmission rate threshold.
Optionally, when the service node is updated, a second preset number of service nodes are selected to be offline in a second preset time period, and after the offline service nodes are maintained, the remaining service nodes are selected to be offline in a third preset time period.
Fig. 4 is a schematic diagram of another alternative match determination apparatus in a game according to an embodiment of the present invention, as shown in fig. 4, the apparatus may include: a third acquisition unit 41, a fourth acquisition unit 42, a sending unit 43, a third acquisition unit 44, a third determination unit 45, a fourth determination unit 46, wherein,
a third obtaining unit 41, configured to obtain, by the client, a service node list, where the service node list includes address information of each service node;
a fourth obtaining unit 42, configured to obtain, by the client, a communication delay duration between the client and each service node every preset time period;
a sending unit 43, configured to send application information by a client, where the application information is used to request to join a matching queue, the matching queue is used to indicate a client in matching engagement, and the application information carries communication delay time for the client to reach each service node;
a third obtaining unit 44, configured to, when it is a turn to establish a matching link with a client, obtain, by the client, a total delay time to reach each client to be matched in a matching queue, where the total delay time is a sum of a first communication delay time for the client to reach a service node and a second communication delay time for each client to be matched in the matching queue to reach the service node;
a third determining unit 45, configured to use the to-be-matched client whose total delay duration is lower than the first preset delay threshold as the client that is successfully matched with the client;
and a fourth determination unit 46, configured to determine the target communication line based on the client successfully matched with the client, the data transmission line between the service node and the client.
The matching determination device in the game comprises a third obtaining unit 41 for obtaining a service node list by a client, wherein the service node list comprises address information of each service node, a fourth obtaining unit 42 for obtaining communication delay time of the client and each service node every preset time period by the client, and a sending unit 43 for sending application information by the client, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating a client for matching and fighting, the application information carries the communication delay time of the client reaching each service node, and when a matching link is established by the third obtaining unit 44 to the client, the client obtains the total delay time of each client to be matched in the matching queue, wherein the total delay time is the first communication delay time when the client reaches the service node and the second communication delay time when each client to be matched in the matching queue reaches the service node And the sum of the lengths is determined by the third determining unit 45, the client to be matched, the total delay duration of which is lower than the first preset delay threshold, is used as the client successfully matched with the client, and the target communication line is determined by the fourth determining unit 46 based on the client successfully matched with the client, the data transmission line between the service node and the client. In the embodiment, when the client is matched, the communication delay time from the client to each service node can be collected, by limiting the total delay time of the clients at both sides, the matching butt joint can be established between the clients only when the sum of the second communication delay time and the first communication delay time is lower than or equal to the preset delay threshold, for the matching between the two parties in the game, the total delay of the two parties can be kept within a stable time length, the condition of matching between the two parties with over-high delay can not occur, the condition that the high-delay client is matched with the high-delay client in the prior art is reduced, therefore, the technical problems that in the related art, because the total delay time of the two clients is not considered in the matching between the clients, the communication delay between the matched clients is high and the game quality is influenced are solved.
The fourth acquiring unit includes: the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending a delay sniffing signal to each service node once by a client through a preset communication protocol every other preset time period, the delay sniffing signal is used for determining whether the client can establish a communication link with each service node of a geographical zone where the client is located, and acquiring the communication delay time of the client reaching each service node of the geographical zone where the client is located under the condition that the client can establish the communication link with the service node; the recording module is used for recording the acquired delay time as a preset value when the client does not receive the communication delay time returned by the service node, wherein the preset value indicates that the service node cannot be communicated; and the updating module is used for updating the communication delay time of the service node in the recorded service node list when the client receives the communication delay time returned by the service node.
The match determination device in the game described above further includes: and the modifying unit is used for modifying the first preset delay threshold value into a third preset delay threshold value when the total delay time from the client to each client to be matched in the matching queue is greater than a first preset delay threshold value after the client acquires the total delay time reaching each client to be matched in the matching queue, wherein the third preset delay threshold value is greater than the first preset delay threshold value.
In addition, the in-game matching determination device further includes: and the selecting unit is used for randomly selecting one client to be matched from the matching queue to match with the client when the total delay time from the client to each client to be matched in the matching queue is greater than a first preset delay threshold after the client obtains the total delay time to each client to be matched in the matching queue.
The matching determination device in the game may further include a processor and a memory, the first acquiring unit 31, the second acquiring unit 33, the first determining unit 35, the second determining unit 37, the third acquiring unit 41, the fourth acquiring unit 42, the transmitting unit 43, the third acquiring unit 44, the third determining unit 45, the fourth determining unit 46, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls a corresponding program unit from the memory. The kernel can be set to be one or more, and the target communication line is determined based on the client successfully matched with the target client, the data transmission line between the target service node and the target client by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, and fig. 5 is a schematic diagram of an alternative electronic device according to the embodiments of the present invention, as shown in fig. 5, the electronic device 510 includes a memory 520 and a processor 530, where the memory is used for storing executable instructions of the processor, and the processor is configured to execute a program of the following steps by executing the executable instructions: the method comprises the steps that a client side obtains a service node list, wherein the service node list comprises address information of each service node; the client acquires the communication delay time of the client and each service node every other preset time period; the client sends application information, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating the client for matching and fighting, and the application information carries the communication delay time of the client reaching each service node; when the matching link is established to the client, the client acquires the total delay time of each client to be matched in the arrival matching queue, wherein the total delay time is the sum of the first communication delay time of the client to the service node and the second communication delay time of each client to be matched in the arrival matching queue to the service node; taking the client to be matched with the total delay duration lower than a first preset delay threshold value as a client successfully matched with the client; and determining a target communication line based on the client matched with the client successfully, the data transmission line between the service node and the client.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute any one of the above-mentioned match determination methods in a game.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (16)

1. A method for determining a match in a game, comprising:
acquiring a first communication delay time from a target client to a target service node in a matching queue;
acquiring a first preset number of clients to be matched in a matching queue according to the first communication delay time and a first preset delay threshold, wherein a second communication delay time of the clients to be matched is less than or equal to a difference between the first preset delay threshold and the first communication delay time, and the second communication delay time refers to the communication delay time of each client to be matched in the first preset number;
determining a client from the first preset number of clients to be matched according to a preset rule, wherein the client is used as a client successfully matched with the target client;
and determining a target communication line based on the client successfully matched with the target client, the data transmission line between the target service node and the target client.
2. The method of claim 1, prior to obtaining the first communication delay period from the target ue to the target service node in the matching queue, comprising:
acquiring communication delay time from the target client to each service node in a plurality of service nodes every other first preset time period;
sequencing the collected communication delay durations;
and selecting a communication delay time from the sequenced communication delay times according to a preset service rule, and taking a service node corresponding to the communication delay time as the target service node.
3. The method of claim 1, wherein obtaining a first preset number of clients to be matched in a matching queue according to the first communication delay duration and a first preset delay threshold comprises:
calculating a difference value between the first preset delay threshold and the first communication delay time;
and when the second communication delay time length is less than or equal to the difference, determining the client corresponding to the difference as the clients to be matched in the first preset number.
4. The method of claim 1, wherein after obtaining the first communication delay period from the target client to the target service node in the matching queue, further comprising:
and when the sum of the first communication delay time and the second communication delay time is greater than the first preset delay threshold, stopping the matching operation between the target client and the client to be matched.
5. The method of claim 1, wherein a plurality of service nodes are configured in a plurality of geographical zones, and wherein each service node establishes a communication connection with a respective client of the geographical zone.
6. The method of claim 5, wherein the pre-establishing, by the service node, the communication connection with each client in the geographical zone comprises:
the service node sends out a sniffing signal, wherein the sniffing signal is used for determining whether the service node can establish a communication link with each client of the regional partition where the service node is located, and acquiring the communication delay time of the service node reaching each client of the regional partition where the service node is located under the condition that the service node can establish the communication link with the client;
and under the condition that the communication delay time length is lower than a second preset delay threshold value, the service node establishes communication connection with the client.
7. The method of claim 5, wherein the service nodes between different geographical zones are connected by a predetermined dedicated communication line, wherein a data transmission rate of the predetermined dedicated communication line is higher than a predetermined transmission rate threshold.
8. The method according to claim 5, wherein when the service node is updated, a second preset number of service nodes are selected to be offline in a second preset time period, and after the offline service nodes are maintained, the remaining service nodes are selected to be offline in a third preset time period.
9. A method for determining a match in a game, comprising:
a client acquires a service node list, wherein the service node list comprises address information of each service node;
the client acquires the communication delay time of the client and each service node every other preset time period;
the client sends application information, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating a client for matching and fighting, and the application information carries the communication delay time for the client to reach each service node;
when the matching link is established to the client, the client acquires the total delay time of reaching each client to be matched in the matching queue, wherein the total delay time is the sum of the first communication delay time of reaching the service node by the client and the second communication delay time of reaching the service node by each client to be matched in the matching queue;
taking the client to be matched with the total delay duration lower than a first preset delay threshold value as the client successfully matched with the client;
and determining a target communication line based on the client successfully matched with the client, the data transmission line between the service node and the client.
10. The method of claim 9, wherein the obtaining, by the client, the communication delay duration between the client and each service node every preset time period comprises:
the client sends a delayed sniffing signal to each service node every other preset time period through a preset communication protocol, wherein the delayed sniffing signal is used for determining whether the client can establish a communication link with each service node of the regional partition, and acquiring the communication delay time of the client reaching each service node of the regional partition under the condition of determining that the communication link with the service node can be established;
if the client does not receive the communication delay time returned by the service node, recording the obtained delay time as a preset value, wherein the preset value indicates that the service node cannot be communicated;
and if the client receives the communication delay time returned by the service node, updating the recorded communication delay time of the service node in the service node list.
11. The method of claim 9, wherein after the client obtains the total delay time to reach each client to be matched in the matching queue, the method further comprises:
when it is determined that the total delay time from the client to each client to be matched in the matching queue is greater than the first preset delay threshold, modifying the first preset delay threshold to a third preset delay threshold, wherein the third preset delay threshold is greater than the first preset delay threshold.
12. The method of claim 9, wherein after the client obtains the total delay time to reach each client to be matched in the matching queue, the method further comprises:
and when the total delay time from the client to each client to be matched in the matching queue is determined to be greater than the first preset delay threshold, one client to be matched is randomly selected from the matching queue to be matched with the client for battle matching.
13. An in-game match determination apparatus, comprising:
the first obtaining unit is used for obtaining a first communication delay time from a target client to a target service node in the matching queue;
a second obtaining unit, configured to obtain a first preset number of clients to be matched in a matching queue according to the first communication delay duration and a first preset delay threshold, where a second communication delay duration of the clients to be matched is less than or equal to a difference between the first preset delay threshold and the first communication delay duration, and the second communication delay duration refers to a communication delay duration of each client to be matched in the first preset number;
a first determining unit, configured to determine, according to a preset rule, a client from the first preset number of clients to be matched, as a client that is successfully matched with the target client;
and the second determining unit is used for determining a target communication line based on the client successfully matched with the target client and the data transmission line between the target service node and the target client.
14. An in-game match determination apparatus, comprising:
a third obtaining unit, configured to obtain, by a client, a service node list, where the service node list includes address information of each service node;
a fourth obtaining unit, configured to obtain, by the client, a communication delay duration between the client and each service node every preset time period;
the client side sends application information, wherein the application information is used for requesting to join a matching queue, the matching queue is used for indicating the client side in matching fight, and the application information carries the communication delay time for the client side to reach each service node;
a third obtaining unit, configured to, when it is time to establish a matching link with the client, obtain, by the client, a total delay time to reach each client to be matched in the matching queue, where the total delay time is a sum of a first communication delay time for the client to reach the service node and a second communication delay time for each client to be matched in the matching queue to reach the service node;
a third determining unit, configured to use the client to be matched whose total delay duration is lower than a first preset delay threshold as the client successfully matched with the client;
and the fourth determining unit is used for determining a target communication line based on the client matched with the client successfully and the data transmission line between the service node and the client.
15. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the in-game match determination method of any of claims 9 to 12 via execution of the executable instructions.
16. A storage medium comprising a stored program, wherein a device on which the storage medium is located is controlled to execute the match determination method in a game according to any one of claims 1 to 12 when the program is executed.
CN201811384935.9A 2018-11-20 2018-11-20 Matching determination method and device in game Active CN109499058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811384935.9A CN109499058B (en) 2018-11-20 2018-11-20 Matching determination method and device in game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811384935.9A CN109499058B (en) 2018-11-20 2018-11-20 Matching determination method and device in game

Publications (2)

Publication Number Publication Date
CN109499058A CN109499058A (en) 2019-03-22
CN109499058B true CN109499058B (en) 2022-05-03

Family

ID=65749270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811384935.9A Active CN109499058B (en) 2018-11-20 2018-11-20 Matching determination method and device in game

Country Status (1)

Country Link
CN (1) CN109499058B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110251943B (en) * 2019-07-19 2022-11-29 北京字节跳动网络技术有限公司 Game player matching method, device, equipment and storage medium
CN110795632B (en) * 2019-10-30 2022-10-04 北京达佳互联信息技术有限公司 State query method and device and electronic equipment
CN111013131B (en) * 2019-10-31 2023-08-01 咪咕互动娱乐有限公司 Delay data acquisition method, electronic device and storage medium
CN111314165B (en) * 2019-12-18 2022-02-01 上海米哈游天命科技有限公司 Game server determination method, device, server and medium
CN111135586B (en) * 2019-12-24 2023-06-27 网易(杭州)网络有限公司 Game matching method, game matching device, storage medium and electronic equipment
CN111111193B (en) * 2019-12-25 2023-09-22 北京奇艺世纪科技有限公司 Game control method and device and electronic equipment
CN112843675B (en) * 2021-03-22 2024-02-13 网易(杭州)网络有限公司 Matching method and device for game playing method, computer equipment and storage medium
CN113359727A (en) * 2021-06-04 2021-09-07 北京三快在线科技有限公司 Unmanned vehicle remote control method and device and electronic equipment
CN113521729B (en) * 2021-07-02 2023-10-20 咪咕互动娱乐有限公司 Cloud game delay detection method, server, client, system and medium
CN114904265A (en) * 2022-04-20 2022-08-16 西安万像电子科技有限公司 Data processing method, data processing device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103143169A (en) * 2011-12-07 2013-06-12 株式会社万代南梦宫游戏 Server device, management server system and communication game system
JP2015144841A (en) * 2015-03-19 2015-08-13 グリー株式会社 game management method and game management system
CN105553821A (en) * 2015-12-14 2016-05-04 网易(杭州)网络有限公司 Game battle matching method and device
CN106790729A (en) * 2017-03-30 2017-05-31 努比亚技术有限公司 The apparatus and method communicated with client
CN107823887A (en) * 2017-10-25 2018-03-23 广州南瞻部洲互动娱乐有限公司 A kind of game object matching process

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9776091B1 (en) * 2014-05-16 2017-10-03 Electronic Arts Inc. Systems and methods for hardware-based matchmaking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103143169A (en) * 2011-12-07 2013-06-12 株式会社万代南梦宫游戏 Server device, management server system and communication game system
JP2015144841A (en) * 2015-03-19 2015-08-13 グリー株式会社 game management method and game management system
CN105553821A (en) * 2015-12-14 2016-05-04 网易(杭州)网络有限公司 Game battle matching method and device
CN106790729A (en) * 2017-03-30 2017-05-31 努比亚技术有限公司 The apparatus and method communicated with client
CN107823887A (en) * 2017-10-25 2018-03-23 广州南瞻部洲互动娱乐有限公司 A kind of game object matching process

Also Published As

Publication number Publication date
CN109499058A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN109499058B (en) Matching determination method and device in game
CN108293009B (en) Software defined data center and scheduling method of service cluster in software defined data center
EP3326074B1 (en) Methods, systems, and apparatus for geographic location using trace routes
AU2008334808B2 (en) Method of establishing a connection
CN105704034B (en) Access the method and central server of network
US8572180B2 (en) Systems, methods and media for distributing peer-to-peer communications
CN106131031B (en) Method and device for cleaning and processing DDoS (distributed denial of service) flow
US9474967B2 (en) Internet distance-based matchmaking
US20090147698A1 (en) Network automatic discovery method and system
JPWO2008126179A1 (en) Network verification system
JP2010283862A (en) Base station for managing neighboring state of cells and cell operation
RU2006132723A (en) ALARM CONTROL IN DATA TRANSMISSION NETWORK
US20180367608A1 (en) Online matchmaking for p2p topologies
CN108600040A (en) A kind of distributed system node failure detection method based on High Availabitity detection node
CN113132227A (en) Method, device, computer equipment and storage medium for updating routing information
EP3264681A1 (en) Method and device for processing, at a network equipment, a processing request from a terminal
CN109857439B (en) Game version updating method and device
CN110012076B (en) Connection establishing method and device
CN105591892B (en) A kind of starting method and apparatus of smooth restarting process
CN113098797B (en) Network connection method and device based on distributed networking system and computer equipment
CN104869118B (en) A kind of method and system for realizing DDoS defence based on dynamic tunneling technique
CN114900502B (en) Network registration method, device, electronic equipment and readable storage medium
CN104301221B (en) A kind of method and device of route messages
CN113542775B (en) Live broadcast keep-alive service system, live broadcast keep-alive management method, server and medium
CN111049697A (en) Network link quality monitoring 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