CN108196885B - Object group determination method and device, storage medium and electronic device - Google Patents

Object group determination method and device, storage medium and electronic device Download PDF

Info

Publication number
CN108196885B
CN108196885B CN201711206345.2A CN201711206345A CN108196885B CN 108196885 B CN108196885 B CN 108196885B CN 201711206345 A CN201711206345 A CN 201711206345A CN 108196885 B CN108196885 B CN 108196885B
Authority
CN
China
Prior art keywords
target
subset
account
accounts
subsets
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
CN201711206345.2A
Other languages
Chinese (zh)
Other versions
CN108196885A (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.)
Tencent Technology Shanghai Co Ltd
Original Assignee
Tencent Technology Shanghai 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 Tencent Technology Shanghai Co Ltd filed Critical Tencent Technology Shanghai Co Ltd
Priority to CN201711206345.2A priority Critical patent/CN108196885B/en
Publication of CN108196885A publication Critical patent/CN108196885A/en
Application granted granted Critical
Publication of CN108196885B publication Critical patent/CN108196885B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72427User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting games or graphical animations

Abstract

The invention discloses a method and a device for determining an object group, a storage medium and an electronic device. Wherein, the method comprises the following steps: receiving a target instruction, wherein the target instruction is used for indicating to determine an object group, and two objects in the object group are matched with each other and participate in a game; in response to the target instruction, allocating accounts in a first set to a plurality of subsets, wherein accounts which are requested to participate in the game and come from different game servers are stored in the first set; in the case where two subsets exist among the plurality of subsets, a first subset and a second subset are determined based on the two subsets, and a first object representing the first subset and a second object representing the second subset are set as one object group matched with each other in the game, and accounts in the first subset and the second subset are derived from the two subsets. The invention solves the technical problem of low efficiency in determining the objects matched with each other in the related art.

Description

Object group determination method and device, storage medium and electronic device
Technical Field
The invention relates to the field of internet, in particular to a method and a device for determining an object group, a storage medium and an electronic device.
Background
With the continuous development of science and technology, online games are more popular and accepted by people, but the following problems are ubiquitous in the fields: when two matching game teams are determined, the efficiency is low because any combination of all accounts needs to be traversed.
For example, in a current network game, PVP (Player VS Player) is a popular play mode, and in the PVP play mode, a server selects a game account for each of two competing banks (two objects that match each other) from among a plurality of registered accounts, thereby enabling the competing banks to compete. At present, when team fight matching is carried out, in order to obtain two parties of fighting with matched fighting capacity, all account numbers are firstly arranged in a queue according to a certain sequence, then two battle arrays (namely two game objects) with matched fighting capacity are selected from the queue by traversing any account number combination in the queue (meeting the quantity requirement of one battle array), and the total number of the team of the two battle arrays meets a certain quantity requirement.
Aiming at the technical problem of low efficiency in determining mutually matched objects in the related art, no effective solution is provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining an object group, a storage medium and an electronic device, which are used for at least solving the technical problem of low efficiency in determining objects matched with each other in the related art.
According to an aspect of an embodiment of the present invention, there is provided a method for determining a group of objects, the method including: receiving a target instruction, wherein the target instruction is used for indicating that an object group is determined, and two objects in the object group are matched with each other and participate in a game; in response to the target instruction, allocating accounts in a first set to a plurality of subsets, wherein accounts which are requested to participate in the game and come from different game servers are stored in the first set; in the case where two subsets exist among the plurality of subsets, a first subset and a second subset are determined based on the two subsets, and a first object representing the first subset and a second object representing the second subset are set as one object group matched with each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, and the number of accounts in the first subset and the second subset is a target value, and the difference between the cumulative attribute values of the two subsets on the target attribute is within a first range.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for determining an object group, including: the game processing device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a target instruction, the target instruction is used for indicating to determine an object group, and two objects in the object group are matched with each other and participate in a game; a response unit, configured to respond to the target instruction, allocate accounts in a first set to multiple subsets, where the first set stores accounts that are requested to participate in the game and are from different game servers; and a determining unit, configured to determine a first subset and a second subset according to the two subsets when there are two subsets in the plurality of subsets, and use a first object used for representing the first subset and a second object used for representing the second subset as a group of objects matched with each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, the number of accounts in the first subset and the second subset is a target value, and a difference value between accumulated attribute values of the two subsets on the target attribute is within a first range.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
In the embodiment of the invention, when a target instruction is received, the accounts in a first set are distributed to a plurality of subsets, and the accounts which are requested to participate in the game and come from different game servers are stored in the first set; when two subsets exist in the plurality of subsets (the difference value between the accumulated attribute values of the two subsets on the target attribute is within a first range), a first subset and a second subset are determined according to the two subsets, a first object used for representing the first subset and a second object used for representing the second subset are used as an object group matched with each other in the game, accounts in the first subset and the second subset are derived from the two subsets, the number of the accounts in the first subset and the second subset is a target value, sorting of the accounts in the first subset and sorting of the accounts in the second subset are not needed, all combination modes in the first set are not needed, the technical problem that the efficiency is low when the objects matched with each other are determined in the related technology can be solved, and the technical effect of improving the efficiency of determining the objects matched with each other in the game is achieved.
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 schematic diagram of a hardware environment for a method of object group determination according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative method of object group determination in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative organizational architecture of a cross-server system according to an embodiment of the invention;
FIG. 4 is a schematic diagram of an alternative search path according to an embodiment of the present invention;
FIG. 5 is a flow chart of an alternative method of object group determination in accordance with an embodiment of the present invention;
FIG. 6 is a schematic view of an alternative game interface according to an embodiment of the present invention;
FIG. 7 is a schematic view of an alternative game interface according to an embodiment of the present invention;
FIG. 8 is a schematic view of an alternative game interface according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an alternative object group determination apparatus according to an embodiment of the present invention;
and
fig. 10 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be 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.
According to an aspect of the embodiments of the present invention, there is provided a method embodiment of a method for determining a group of objects. The following briefly describes a hardware environment to which the technical solution of the present application is applied:
alternatively, in the present embodiment, the method for determining the object group may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The method for determining the object group according to the embodiment of the present invention may be executed by the server 102, the terminal 104, or both the server 102 and the terminal 104. The method for determining the object group performed by the terminal 104 according to the embodiment of the present invention may also be performed by a client installed thereon.
The number of the terminals may be multiple (for example, from game terminal 1 to game terminal i), each game terminal is provided with a game client, and the game client logs in an account of a game application, that is, there are i game accounts (or called game users) in total; when each game account plays games, the corresponding game server can be determined according to the location area, the used network facilitator and the like of each game account, and the number of the game servers can be multiple (such as game server 1 to game server n); the game matching server can match the account group or the battle group (namely the object group) of the cross game server and distribute the battle server; the combat-related logic processing is performed by the combat server. The details are described below with reference to specific steps:
in step S11, the game account (i.e., the game terminal) initiates a game request to the respective game server, for example, game terminal 1 initiates a game request to game server 1, and game terminal 2 initiates a game request to game server 2.
In step S12, the game matching server performs a matching operation. The concrete matching steps are as follows:
step S121, allocating accounts in a first set to a plurality of subsets, wherein accounts which are requested to participate in the game and come from different game servers are stored in the first set;
in step S122, in the case that there are two subsets in the plurality of subsets, where the difference between the cumulative attribute values on the target attribute is within the first range (i.e. when there are two subsets in the plurality of subsets, and the difference between the cumulative attribute values on the target attribute of the two subsets is within the first range), a first subset and a second subset are determined according to the two subsets, and a first object representing the first subset and a second object representing the second subset are taken as an object group matched with each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, and the number of accounts in the first subset and the second subset is the target value.
In step S13, a combat server is assigned to the object group (which may be a team including a plurality of accounts or a party including a plurality of account groups), and the current load may be selected from the combat servers 1 to m to be the smallest.
The team as described above consists of one or more players (i.e., accounts, e.g., 1 to 5); a battle group consists of a plurality of battle teams, and the number of players of each battle group is fixed (such as 10); the formation of a battle group refers to selecting a plurality of battle groups to form a battle group; the battle group matching means that two battle groups with similar fighting force values are matched for fighting.
And step S14, the combat server bears game service and processes combat data.
It should be noted that the game server, the game matching server, and the combat server are servers divided according to functions, and in a specific implementation process, the plurality of servers may be further divided or combined, which is not limited in the present application. The technical solution of step S12 is further detailed below:
fig. 2 is a flowchart of a method for determining an optional object group according to an embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
step S202, receiving a target instruction, wherein the target instruction is used for indicating to determine an object group, and two objects in the object group are matched with each other and participate in a game.
The target instruction is an instruction for triggering object group matching, where the target instruction may be used to trigger determination of one object group or multiple object groups, and is preferably used to determine multiple object groups; the object group may be two parties (i.e., two objects) in a game, where the objects may be teams representing multiple accounts (i.e., the elements in the teams are single users or accounts), or teams representing multiple teams (i.e., the elements in the teams are single teams).
Step S204, responding to the target instruction, allocating accounts in the first set to a plurality of subsets, wherein accounts which are requested to participate in the game and come from different game servers are stored in the first set.
As shown in fig. 1, after each terminal initiates a game request, game accounts may be put into a queue (first set) according to the sequence of the request and stored without considering the server from which zone, when matching is started, the accounts in the queue are sequentially read and stored into subsets from the head of the queue to the tail of the queue or from the tail of the queue to the head of the queue, where the subsets are candidate objects to be matched, and each subset may store up to a target value of the accounts.
In step S206, in the case where there are two subsets (the difference between the cumulative attribute values of the two subsets on the target attribute is within the first range) in the plurality of subsets, a first subset and a second subset are determined according to the two subsets, and a first object representing the first subset and a second object representing the second subset are taken as an object group matched with each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, and the number of accounts in the first subset and the second subset is a target value.
The target attribute may be a specific attribute, or a combination of attributes, including but not limited to offensive attributes (e.g., offensive weapon proficiency, experience, agility, intelligence, etc.), defensive attributes (e.g., defensive weapon proficiency, recovery capability, treatment capability, etc.), etc.
Alternatively, in step S206, one object group may be determined, a plurality of object groups may be determined, or all object groups capable of constituting an object group according to a plurality of subsets may be determined.
In the related technology, when team fight matching is carried out, in order to obtain two fight parties with matched fighting capacity, all account numbers are arranged in a queue according to a certain sequence, then any account number combination in the queue is traversed (the quantity requirement of one battle), and then two battle battles with matched fighting capacity are selected from the queue, namely, at least three steps of sequencing once, traversing various combinations and selecting two battle battles are carried out.
Through the above steps S202 to S206, when the target instruction is received, the accounts in the first set are allocated to a plurality of subsets, and the accounts which are requested to participate in the game and come from different game servers are stored in the first set; when two subsets exist in the plurality of subsets, a first subset and a second subset are determined according to the two subsets, a first object used for representing the first subset and a second object used for representing the second subset are used as an object group matched with each other in the game, accounts in the first subset and the second subset are derived from the two subsets, the number of the accounts in the first subset and the number of the accounts in the second subset are target values, sorting of the accounts in the first set is not needed, and traversing all combination modes in the first set is not needed, so that the technical problem that efficiency is low when the objects matched with each other are determined in the related art can be solved, and the technical effect of improving the efficiency of determining the objects matched with each other in the game is achieved.
In the game, in order to enhance the excitement and the organization of the battle, players (namely, account numbers) need to form a fixed-scale battle group or team, and simultaneously, the battle forces of the two battle groups or teams in the battle are required to be balanced as much as possible, so that the rolling phenomenon cannot occur.
The applicant has appreciated that as games evolve, cross-server combat between teams is also necessary because a team who weighs a server has no teams that match its battle strength, and the server has no appeal to the players of the team, potentially causing high-strength players to lose. The technical scheme of the application can be designed to realize that: an extended cross-server system; the time for forming a fixed-scale battle group is greatly shortened; adjusting the forces of two groups of battles; and respectively realizing professional balanced matching under the conditions of non-team formation and team formation.
The technical effects achieved in the technical scheme of the application at least comprise: 1) the accounts in the first set are directly grouped (distributed into subsets) without sequencing and combined traversal, so that a large amount of time overhead is saved; 2) the method can be used for global matching of the accounts crossing the servers, increases the matching degree between objects (teams or groups of war) and avoids the situation that a certain team or group of war is too strong in fighting capacity of a certain server.
In the technical solution provided in step S202, considering the need of team formation for matching battles, and large-scale team formation for matching battles by a plurality of teams in the game, the method of the present application can be used for rapid formation and matching of teams or teams, and make the fighting capacities of two matched teams or teams as close as possible, and at the same time, shorten the average waiting time of the players and reduce the number of players with too long waiting time. The target instruction is an instruction for triggering rapid composition and matching of a battle group or a battle team, and the matched object is the battle group or the battle team.
Target instruction generation opportunities include, but are not limited to: the number of accounts in the queue (first set) reaches a preset value; the timing of the timer is full; the game server triggers autonomously.
In the technical solution provided in step S204, in response to the target instruction, the accounts in the first set are allocated to a plurality of subsets, and the accounts in the first set which are requested to participate in the game and come from different game servers are stored.
In the above embodiment, allocating accounts in the first set to the plurality of subsets comprises allocating each account in the first set as follows: under the condition that a third subset exists in the plurality of subsets, distributing the first target account to the third subset, deleting the first target account from the first set, wherein the sum of the account numbers of the third subset and the first target account is not more than a target value, the first target account is the currently distributed account in the first set, namely the number of required people (the number of accounts) is not less than the subset of the account number of the first target account, and storing the first target account into the subset; in the absence of the third subset from the plurality of subsets, creating a fourth subset, assigning the first target account to the fourth subset, and deleting the first target account from the first set, the created fourth subset being set as one of the plurality of subsets, i.e., the subset requiring the number of people (number of accounts) less than the number of accounts of the first target account is absent, creating one subset for the first target account.
In an alternative embodiment, when the subset (candidate object, or candidate party or team) is assigned, the following steps can be performed:
in step S21, a first target account is determined.
Before the first target account is distributed to the third subset and the first target account is deleted from the first set, all accounts in the account group where the currently distributed account is located are used as the first target account (the obtained object groups can be two groups of battles) under the condition that the currently distributed account requests to participate in the game in the account group mode; in the case where the currently allocated account is not requested to participate in the game as a group of accounts, the currently allocated account is set as the first target account (the object group obtained at this time may be two teams of a team battle or two teams of a team battle).
The order of acquiring the allocated accounts may be from the head of the first set to the end of the first set, or from the end to the head of the first set.
Step S22, assign the first target account to the corresponding subset or create the subset for the first target account.
After all accounts in the first set are allocated, if there is a subset in which the number of accounts is not the target value (i.e., a team or a battle group with insufficient game players), the adjustment is performed as follows:
step S23, after each account in the first set is allocated, all accounts in the subsets whose account number is smaller than the target value in the plurality of subsets are acquired to the second set, that is, all accounts in the subsets whose account number is smaller than the target value are re-aggregated in the second set.
Optionally, the number of accounts in the second target account is greater than zero and not greater than the target value, and before searching for a plurality of second target accounts in the second set that satisfy the target combination manner, the combination manner may be predetermined as follows:
acquiring a plurality of account types of a second target account, wherein the account numbers in two second target accounts with different account types are different, and the account numbers in two second target accounts with the same account type are different; and determining a target combination mode of a plurality of account types according to the account number corresponding to each account type, and combining according to the target combination mode to obtain the account number in the subset as a target value.
The second target account is a set of all accounts belonging to the same team (or called as a group), the number of accounts in each group is at least one, but should be less than the upper limit (e.g. 5) of players of a team, that is, the account groups can be divided into 5 types according to the possible number of accounts (1 to 5) of the group, for example, the number of accounts in the second target account of the first type is 1, the number of accounts in the second target account of the second type is 2, …, and the number of accounts in the second target account of the fifth type is 5.
If the number of accounts in each subset (target value) is 10, then the combination may be determined, for example: the subset may consist of 1 second target account of the second type, 1 second target account of the third type, and 1 second target account of the fifth type; the system consists of 2 second target accounts of a first type, 1 second target account of a third type and 1 second target account of a fifth type; consisting of 1 second target account of the fourth type and 2 second target accounts of the third type.
Step S24, find a plurality of second target accounts in the second set that satisfy the target combination mode, where the second target accounts include all accounts in the same account group that request to participate in the game in the account group mode, and the number of the plurality of second target accounts that satisfy the target combination mode is the target value.
For example, if the number of the second target accounts is 3, then a subset lacking the third type of second target accounts (e.g., a subset consisting of 1 second target account of the second type, 1 second target account of the third type, and 1 second target account of the fifth type) is preferably searched.
Step S25, creating a fifth subset, allocating the found second target accounts to the fifth subset, and deleting the found second target accounts from the second set, where the created fifth subset is set as one of the subsets.
In another alternative embodiment, when the subset (candidate object, or candidate battle group or battle team) is allocated, the following steps can be further performed:
in step S31, a first target account is determined (similar to step S21).
Step S32, find the third subset matching the first target account.
If each subset should be 10 accounts, there are three types of roles, namely the first type of role (e.g., myth), the second type of role (e.g., hero), and the third type of role (e.g., sword fairy). The role combination mode of the subsets can be as follows: 5 first type roles, 3 first type roles, and 2 first type roles, 4 first type roles, and 2 first type roles, and the like.
If each subset has determined its role combination, if the first target account includes 3 roles of the first type, then a search may be made for those lacking 3 roles of the first type.
If each subset has already been determined to match (i.e., as a subset of a group of objects), its role combination can be determined as follows:
and determining a target role combination mode according to the average attribute value of each role type on the target attribute, wherein the difference value of the sum of the first attributes of the sixth subset and the sum of the second attributes of the third subset is within a second range, the sum of the first attributes of the sixth subset is the sum of the average attribute values of the roles of the role types identified by the accounts in the sixth subset on the target attribute, and the sum of the second attributes of the third subset is the sum of the average attribute values of the roles of the role types identified by the accounts in the third subset on the target attribute.
The above-mentioned sixth subset and the third subset are two subsets as an object group, and the sum of the first attributes of the sixth subset, for example, the role combination manner of the sixth subset is: 4 roles of the first type, and 2 roles of the first type, then the sum of the first attributes of the sixth subset is: the sum of the average attribute values of the 4 first-type roles, and the average attribute values of the 2 first-type roles, wherein the average attribute value of the first-type role is the average value of the attribute values of all accounts of the first-type roles on the target attribute, and the rest types are similar.
The calculation manner of the sum of the second attributes of the third subset is similar to that of the sum of the first attributes of the sixth subset, the role type of each account of the first target account may be predetermined, in order to match the third subset with the sixth subset, the role type that the account in the third subset may not be determined may be predetermined, and when the role type of each account of the first target account satisfies the requirement, the role type may be allocated to the third subset.
In step S33, the first target account number is assigned to the third subset.
And under the condition that the role type of the game role identified by the first target account in the game is the first role type (the first role type is a role which is not allocated with an account in a plurality of roles determined for the third subset in advance or is determined according to the sixth subset), allocating the first target account to the third subset, wherein the first role type is the role type currently required by the three subsets, and the role types of all accounts in the subset with the account number of the target value in the plurality of subsets meet the target role combination mode.
In the technical solution provided in step S206, when there are two subsets in the plurality of subsets, a first subset and a second subset are determined according to the two subsets, and a first object representing the first subset and a second object representing the second subset are taken as a group of objects matched with each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, and the number of accounts in the first subset and the second subset is a target value.
Alternatively, when the first subset and the second subset are determined from the two subsets, the two subsets may be directly used as the first subset and the second subset, respectively.
Alternatively, when the first subset and the second subset are determined from the two subsets, the optimization can be performed in the following manner:
step S41, acquiring a plurality of account combination modes determined by the two subsets, wherein each combination mode is used for combining the accounts in the two subsets into two subsets with the same account number, namely, the accounts in the two subsets are recombined, and the account numbers in the two subsets after the unique condition of combination is recombined are the same;
step S42, determining the cumulative attribute values of the two subsets in each account combination mode (i.e. the sum of the attribute values of the roles of all accounts in the subset on the target attribute), where the cumulative attribute value is the sum of the attribute values of the roles identified by all accounts in the subset on the target attribute;
step S43, searching a target account combination mode with the minimum difference between the accumulated attribute values of two subsets in the multiple account combination modes;
step S44, the two subsets obtained by combining the target account combination methods are used as the first subset and the second subset.
As an alternative example, the following detailed description is given with reference to the specific embodiments:
the current battle group matching algorithm is based on depth-first search, and the algorithm is that when a player or a team requests to match into a battle group, the player or the team is added into a linked list to be searched, and then the player or the team capable of forming the battle group is searched in the linked list. However, the algorithm is an exhaustive algorithm with the complexity of O (2^ N, namely the power N of 2), if the number of players or teams is too large, the algorithm cannot work normally due to too high time complexity, the algorithm does not consider the cross-clothing condition and the matching of professional balance, and the obtained matching pairs between the battle teams are low.
The application provides a cross-clothing system as shown in fig. 3, which can put players of a plurality of game servers together for fighting, particularly, the cross-clothing system can enhance the stimulation of the players when the clothing is inexperienced, and simultaneously, the system also supports the players to form a battle group after the players form a team, thereby preventing the players in the battle group from being strange and enhancing the compactness and the organization of the battle group.
The organizational structure of the cross-server system is shown in fig. 3, where the game server n is a game logic server (a storage server and a network connection server may also be configured for matching), the game matching server is a server responsible for matching a battle group, the game servers 1 to n represent servers where players or teams to be matched are located, the battle servers 1 to m represent servers for battle after the players or teams to be matched are successfully matched, and if the battle servers have no storage, the outcome of the battle is sent back to the original game server by executable mail, the increment of the executable mail sending data, such as the variable a in the battle server is changed from 3 to 4, increment 1 is sent back to the original server, if the variable a of the original server is changed from 3 to 5 before, and increment 1 is added to the variable a, the value of the variable a is changed to 6, and the strategy can avoid the data inconsistency.
Players or teams of the game server apply for matching to the game matching server to form a battle group through registration, then the game matching server matches the players or teams into the battle group and balances the battle force, and then the two battle groups are transmitted to the fighting server with lower pressure. The servers establish communication through three-way handshake, and the four-way waving breaks communication, so that the cross-server system has the advantages of stable message transmission and balanced pressure of the combat servers.
In the technical scheme of the application, the rapid composition of the fixed-scale battle group can be realized (for example, a barrel pressing method is used), so that the time complexity of the battle group composition is reduced to O (N) which is far lower than the time complexity O (2^ N) based on search (which represents the power of N of 2). When a player or team applies to form a battle group, the player or team is added to the tail of the queue. Then traversing the queue in the heartbeat of the game, if the number of the currently traversed players or teams plus the number of the people in the bucket is smaller than a fixed scale, adding the current players or teams into the bucket and deleting the players or teams from the queue; otherwise, a new bucket is built, and the player or team (the number of the team is 1 to 5) is added into the new bucket. And finding out all full buckets, sequencing the buckets according to the sum of the battle power values of all players in the buckets, selecting two groups with the closest battle power values each time to carry out the adjustment of the battle power balance, and then transmitting the two groups to a battle server for fighting.
The barrel-pressing method is a greedy algorithm selected for saving time, and players or teams that can form a battle group may be missed, so that a table look-up method may be used to try again to form a battle group of a fixed size for the remaining players and teams after barrel-pressing. First, all combinations that can form two fixed-size teams (the number of teams being one, the number of teams being two, the number of teams being five) are exhausted and stored in set, which is globally unique and only needs to be done once. Then, the remaining players and teams are counted, and the number of teams with the number of the players being one, two. If the number of the remaining players or teams is one to five, the number of the teams is larger than a certain element in the set, the element in the set indicates that the combination of the two fixed-size teams can be formed, and the element is deleted from the remaining players or teams until the remaining players or teams cannot form the two fixed-size teams.
In order to realize the balance of the two groups of battles, after the two groups of battles with fixed scale are formed, players in the two groups of battles are adjusted by inquiring a pre-generated table, so that the battles of the two groups of battles are equal as much as possible, and the fighting thrill is enhanced. The method comprises the steps of firstly, exhaustively enumerating all possibilities of forming two fixed-scale battle groups, storing the possibilities in a table map, wherein key words key of the map are character strings, the key words uniquely identify the formation of the battle groups (the number of teams is one, the number of teams is two, the number of teams is five), the value of the map is a vector container, and storing all the possibilities of splitting the current key into the two fixed-scale battle groups in the vector. When adjusting the forces of two groups, the map is used to inquire the possibility of two groups which can be formed by two groups, and then all the possibilities are traversed to find the combination which has the closest force of two groups.
And then respectively designing a matching algorithm for occupation balance in the case of non-team formation and team formation. The reason for designing the occupation (also called character) balance algorithm is that the injuries caused by different occupations are different, and even if the fighting power values are the same, the injury value of the player with the occupation being a trick is obviously lower than that of the player with the occupation being a hero. Therefore, in the battle of 10v10 (or 5v5, 3v3), 10 players with venues are mostly lost to 10 players with venues, and therefore, balanced matching of the venues of both battles is required, for example, 5 venues and 5 heroes are provided for both sides. Professional equalization algorithms are different in non-team situations and team situations. In the non-team case, assume that there are currently 100 players: 50 insect-producing teachers, 30 heroes and 20 swords require that the numbers of the insect-producing teachers, the heroes and the swords in each party of the team of 10v10 are 5, 3 and 2 respectively. Firstly, dividing the parasitic amateurs into 10 barrels, and putting 5 people in each barrel into an array A; dividing the heroes into 10 barrels, putting 3 persons in each barrel, and putting the groups B; the sword mesona was divided into 10 buckets, 2 people each, and placed into array C. The 10 buckets in array A then call the force leveling algorithm mentioned above from left to right, for the number of buckets in array A, and likewise for array B, C. Array A, B is then sorted in ascending order, then A, B corresponding positions are combined into array D, then array C, D is sorted in ascending order. Finally C, D corresponding positions are combined into an array E, each barrel of the array E is provided with 10 players, the numbers of the game player, the hero and the sword immortal are 5, 3 and 2 respectively, and the battle force is also balanced.
In the case of team formation, assuming that each team has 1-5 people and still matches 10v10 teams, the number of the trick, the hero and the swordsman in each team is 5, 3 and 2 respectively, the search tree is established for all teams by taking the number of the professional people as nodes, the first layer is a root Node, the second layer is six nodes with the number of the trick masters 0, 1, 2, 3, 4 and 5 respectively, the third layer is six nodes with the number of the hero 0, 1, 2, 3, 4 and 5 respectively, the fourth layer is six nodes with the number of the swordsman 0, 1, 2, 3, 4 and 5 respectively, each Node is provided with the number of team satisfying all conditions on the path from the root Node to the Node, for example, the father Node of the Node with the number of the swordsman 2 on the third layer is a Node with the number of the trick masters 1, the number of the nodes is 1, the number of the swordsman is 2, and the search tree is established only once, only the operations of adding or deleting teams are needed later. Firstly, the number of parasitic trotters is exhaustive, and all the possibilities of the parasitic trotters 5 can be formed, for example, the number of parasitic trotters in two teams is 2, 3, 1, 4, 0 and 5; the three teams are 1, 2 or 0, 2, 3 or 0, 1, 4 respectively, and up to 10 teams are enumerated. For each case, the search tree is searched, for example, the number of players of two teams is 2 and 3, and if the number of players of 2 and 3 on the second level of the search tree is not more than 0, the search tree is searched for the number of players of two teams is 1 and 4; otherwise, the number of exhaustive heroes can form all the possibilities of 3, for example, the number of heroes in two teams is 2, 1 or 0, 3 respectively, and at most 10 teams are enumerated.
For each case, the search tree is searched, for example, the number of people who are two teams of people who are heroes is 2 and 1, the number of people who are heroes is 2 and 3 along the second layer of nodes to the third layer of nodes, the number of people who are heroes is 2, 1 or 1 and 2, if the number of teams who are heroes 2 and 1 on the third layer of the search tree is more than 0, all the possibilities that the number of people who can form 2 by the sword immortals are enumerated, for example, the number of people who are fairy in two swords is 1, 1 or 0 and 2, and 10 teams are enumerated at most. For each case, searching is carried out on a search tree, for example, searching is carried out when the number of two teams of sword fairies is 1 and 1 respectively, searching is carried out from the searched heroic node on the third layer to the sword fairy node on the fourth layer, and searching is carried out when the number of sword fairies is 1 and 1 respectively, if the number of teams with the number of sword fairies being 1 and 1 on the fourth layer on the search tree is more than 0, the search is finished, thus 10 teams are searched, and team A: venomous insect 2, hero 2, sword immortal 1, team B: parasitic cup 3, hero 1 and sword immortal 1, and 10 team playing parasitic cup 5, hero 3 and sword immortal 2. The search path of the search tree is shown in fig. 4.
After all 10 teams are searched according to the search method, assuming that teams including a mysterious teacher 2, a heroic man 2 and a sword fairy 1 in the above example have a1, a2 and A3, including a mysterious teacher 3, a heroic man 1 and a sword fairy 1 have B1, B2 and B3, and assuming that a1, a2 and A3 are sorted in ascending order and are a1, A3 and a2, and assuming that B1, B2 and B3 are sorted in descending order and are B3, B1 and B2, a1 and B3, A3 and B1, a2 and B2 are respectively combined into 10 teams.
After the player or team of the original server applies for matching, the crossServer (matching server) performs matching by using a barrel pressing method, and makes up the deficiency of the barrel pressing method by using a table look-up method; then the crossbar Server adjusts the warfare balance of the two matched warfare groups to make the warfare of the two warfare groups as close as possible; and finally, the crossbar Server transmits the two groups to a combat server for combat.
The algorithm is suitable for a fixed-scale rapid formation technology of vocational equilibrium and combat power equilibrium in a cross-uniform system, after the cross-uniform system is successfully matched according to the algorithm, the vocational and combat power of both parties are balanced and are both 10-person combat groups, and both parties in a picture are transmitted to a combat server of the cross-uniform system for combat. The specific matching process is shown in fig. 5:
step S501, a player or team of the game server applies for matching, as shown in FIG. 6, the user can enter 10-to-10 single person matching in a "test sword platform" mode, or battle team matching in a "magic block" mode, click "start matching", enter a matching interface as shown in FIG. 7, display "good sword matching" and "matching you being" in the interface, and the time of matching, the user can select "cancel matching", or "retract the interface";
step S502, judging whether the occupation is matched, if so, executing step S508, otherwise, executing step S503;
step S503, the matching server performs matching by using a barrel pressing method;
step S504, matching by using a table look-up method;
step S505, judging whether the remaining players after matching can form a battle group, if so, executing step S504, otherwise, executing step S506;
step S506, using a table look-up method to adjust the battle effectiveness;
step S507, transmitting the result obtained by matching to a combat server;
step S508, determining whether the current player can form a team, if yes, performing step S513, otherwise, performing step S509;
step S509, matching is carried out by a barrel pressing method according to occupation;
step S510, the matching server utilizes a table look-up method to adjust the battle effectiveness;
step S511, combining all professional players;
step S512, establishing a search tree;
step S513, searching team combinations on the search tree according to the occupation;
step S514, searching teams on the search tree according to the occupation;
in step S515, the team is assembled and the interface for entering the game is shown in fig. 8, where the ID and related information of the player are displayed on the left side and the "point board" of the party is displayed on the right side.
The technical scheme designs a cross-clothing combat system to enhance the entertainment of the game; the time for forming the battle group is greatly shortened, so that the waiting time of the players is as short as possible; adjusting the fighting power of the fighting group to be as balanced as possible and enhancing the fighting thrill; and finally, respectively designing a matching algorithm for occupation balance under the conditions of non-team formation and team formation.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another aspect of the embodiments of the present invention, there is also provided an object group determination apparatus for implementing the object group determination method. Fig. 9 is a schematic diagram of an alternative object group determination apparatus according to an embodiment of the present invention, and as shown in fig. 9, the apparatus may include: a receiving unit 91, a response unit 93 and a determination unit 95.
The receiving unit 91 is configured to receive a target instruction, where the target instruction is used to instruct to determine an object group, and two objects in the object group are a group of objects that match each other and participate in the game.
The target instruction is an instruction for triggering object group matching, where the target instruction may be used to trigger determination of one object group or multiple object groups, and is preferably used to determine multiple object groups; the object group may be two parties (i.e., two objects) in a game, where the objects may be teams representing multiple accounts (i.e., the elements in the teams are single users or accounts), or teams representing multiple teams (i.e., the elements in the teams are single teams).
A response unit 93, configured to respond to the target instruction, allocate accounts in a first set to multiple subsets, where the accounts in the first set store accounts from different game servers and requested to participate in the game.
As shown in fig. 1, after each terminal initiates a game request, game accounts may be put into a queue (first set) according to the sequence of the request and stored without considering the server from which zone, when matching is started, the accounts in the queue are sequentially read and stored into subsets from the head of the queue to the tail of the queue or from the tail of the queue to the head of the queue, where the subsets are candidate objects to be matched, and each subset may store up to a target value of the accounts.
A determining unit 95, configured to determine a first subset and a second subset according to two subsets in the plurality of subsets (the difference between the cumulative attribute values of the two subsets on the target attribute is within a first range), and set a first object representing the first subset and a second object representing the second subset as a group of objects that match each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, and the number of accounts in the first subset and the second subset is a target value.
The target attribute may be a specific attribute, or a combination of attributes, including but not limited to offensive attributes (e.g., offensive weapon proficiency, experience, agility, intelligence, etc.), defensive attributes (e.g., defensive weapon proficiency, recovery capability, treatment capability, etc.), etc.
Alternatively, one object group may be determined, a plurality of object groups may be determined, or all object groups that can constitute an object group according to a plurality of subsets may be determined.
In the related technology, when team fight matching is carried out, in order to obtain two fight parties with matched fighting capacity, all account numbers are arranged in a queue according to a certain sequence, then any account number combination in the queue is traversed (the quantity requirement of one battle), and then two battle battles with matched fighting capacity are selected from the queue, namely, at least three steps of sequencing once, traversing various combinations and selecting two battle battles are carried out.
It should be noted that the receiving unit 91 in this embodiment may be configured to execute step S202 in this embodiment, the responding unit 93 in this embodiment may be configured to execute step S204 in this embodiment, and the determining unit 95 in this embodiment may be configured to execute step S206 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the module, when a target instruction is received, the accounts in the first set are distributed to a plurality of subsets, and the accounts which are requested to participate in the game and come from different game servers are stored in the first set; when two subsets exist in the plurality of subsets, a first subset and a second subset are determined according to the two subsets, a first object used for representing the first subset and a second object used for representing the second subset are used as an object group matched with each other in the game, accounts in the first subset and the second subset are derived from the two subsets, the number of the accounts in the first subset and the number of the accounts in the second subset are target values, sorting of the accounts in the first set is not needed, and traversing all combination modes in the first set is not needed, so that the technical problem that efficiency is low when the objects matched with each other are determined in the related art can be solved, and the technical effect of improving the efficiency of determining the objects matched with each other in the game is achieved.
Alternatively, the response unit may include: the first allocation module is used for allocating the first target account to a third subset and deleting the first target account from the first set under the condition that the third subset exists in the plurality of subsets, wherein the sum of the account numbers of the third subset and the first target account is not more than a target value, and the first target account is the currently allocated account in the first set; and the creating module is used for creating a fourth subset under the condition that the third subset does not exist in the plurality of subsets, allocating the first target account to the fourth subset and deleting the first target account from the first set, wherein the created fourth subset is set as one of the plurality of subsets.
Before the first allocation module allocates the first target account to the third subset and deletes the first target account from the first set, the first allocation module is further configured to determine the first target account as follows: and under the condition that the currently allocated account requests to participate in the game in a mode of account group, taking all accounts in the account group where the currently allocated account is located as a first target account.
Optionally, the response unit further comprises: a first obtaining module, configured to obtain, after each account in the first set is allocated, all accounts in the subsets whose number of accounts is smaller than the target value from among the plurality of subsets to a second set; the searching module is used for searching a plurality of second target accounts which meet the target combination mode in the second set, wherein the second target accounts comprise all accounts in the same account group which request to participate in the game in the account group mode, and the number of the accounts of the plurality of second target accounts which meet the target combination mode is the target value; and the second distributing module is used for creating a fifth subset, distributing the found second target accounts to the fifth subset, and deleting the found second target accounts from the second set, wherein the created fifth subset is set as one subset of the plurality of subsets.
Optionally, the number of accounts in the second target account is greater than zero and not greater than the target value, wherein the response unit may further include: the second acquisition module is used for acquiring a plurality of account types of a second target account, wherein the account numbers in two second target accounts with different account types are different, and the account numbers in two second target accounts with the same account type are different; and the determining module is used for determining a target combination mode of a plurality of account types according to the account number corresponding to each account type, wherein the account number in the subset obtained by combination according to the target combination mode is a target value.
The first allocation module is further configured to allocate the first target account to a third subset when the role type of the game role identified by the first target account in the game is the first role type, where the first role type is a role type currently required by the three subsets, and the role types of all accounts in the subset whose account number is the target value in the plurality of subsets satisfy the target role combination mode.
Before the first target account is allocated to the third subset, the first allocation module may determine the target role combination manner according to an average attribute value of each role type on the target attribute, where a difference between a sum of first attributes of the sixth subset and a sum of second attributes of the third subset is within a second range, the sum of first attributes of the sixth subset is a sum of average attribute values of roles on the target attribute of the role type belonging to the role identified by the account in the sixth subset, and the sum of second attributes of the third subset is a sum of average attribute values of roles on the target attribute of the role type belonging to the role identified by the account in the third subset.
When the determining unit determines the first subset and the second subset according to the two subsets, a plurality of account combination modes determined by the two subsets are obtained, and each combination mode is used for enabling accounts in the two subsets to form two subsets with the same account number; determining the cumulative attribute values of the two subsets in each account combination mode, wherein the cumulative attribute value is the sum of the attribute values of the roles identified by all accounts in the subsets on the target attribute; searching a target account combination mode with the minimum difference value between the accumulated attribute values of two subsets in the multiple account combination modes; and taking the two subsets obtained by combining the target account combination modes as a first subset and a second subset.
The technical scheme designs a cross-clothing combat system to enhance the entertainment of the game; the time for forming the battle group is greatly shortened, so that the waiting time of the players is as short as possible; adjusting the fighting power of the fighting group to be as balanced as possible and enhancing the fighting thrill; and finally, respectively designing a matching algorithm for occupation balance under the conditions of non-team formation and team formation.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the present invention, there is also provided a server or a terminal for implementing the method for determining an object group.
Fig. 10 is a block diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 10, the terminal may include: one or more (only one shown in fig. 10) processors 1001, memory 1003, and transmission apparatus 1005 (such as the transmission apparatus in the above embodiments), as shown in fig. 10, the terminal may further include an input-output device 1007.
The memory 1003 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for determining an object group in the embodiment of the present invention, and the processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1003, that is, implements the method for determining an object group. The memory 1003 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1003 may further include memory located remotely from the processor 1001, which may be connected to a terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmitting device 1005 is used for receiving or transmitting data via a network, and can also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmitting device 1005 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmitting device 1005 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 1003 is used to store an application program, in particular.
The processor 1001 may call an application stored in the memory 1003 via the transmitting device 1005 to perform the following steps:
receiving a target instruction, wherein the target instruction is used for indicating that an object group is determined, and two objects in the object group are matched with each other and participate in a game;
in response to the target instruction, allocating accounts in a first set to a plurality of subsets, wherein accounts which are requested to participate in the game and come from different game servers are stored in the first set;
in the case where two subsets exist among the plurality of subsets, a first subset and a second subset are determined based on the two subsets, and a first object representing the first subset and a second object representing the second subset are set as one object group matched with each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, and the number of accounts in the first subset and the second subset is a target value.
The processor 1001 is further configured to perform the following steps:
acquiring a plurality of account combination modes determined by the two subsets, wherein each combination mode is used for combining the accounts in the two subsets into two subsets with the same account number;
determining the cumulative attribute values of the two subsets in each account combination mode, wherein the cumulative attribute value is the sum of the attribute values of the roles identified by all accounts in the subsets on the target attribute;
searching a target account combination mode with the minimum difference value between the accumulated attribute values of two subsets in the multiple account combination modes;
and taking the two subsets obtained by combining the target account combination modes as a first subset and a second subset.
By adopting the embodiment of the invention, when a target instruction is received, the accounts in the first set are distributed to a plurality of subsets, and the accounts which request to participate in the game and come from different game servers are stored in the first set; when two subsets exist in the plurality of subsets, a first subset and a second subset are determined according to the two subsets, a first object used for representing the first subset and a second object used for representing the second subset are used as an object group matched with each other in the game, accounts in the first subset and the second subset are derived from the two subsets, the number of the accounts in the first subset and the number of the accounts in the second subset are target values, sorting of the accounts in the first set is not needed, and traversing all combination modes in the first set is not needed, so that the technical problem that efficiency is low when the objects matched with each other are determined in the related art can be solved, and the technical effect of improving the efficiency of determining the objects matched with each other in the game is achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 10 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 10 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing the method for determining the object group.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s51, receiving a target instruction, wherein the target instruction is used for indicating that an object group is determined, and two objects in the object group are matched with each other and participate in a game;
s52, responding to the target instruction, allocating accounts in a first set to a plurality of subsets, wherein accounts which are requested to participate in the game and come from different game servers are stored in the first set;
s53, in the case where there are two subsets among the plurality of subsets (the difference between the cumulative attribute values of the two subsets on the target attribute is within the first range), determining a first subset and a second subset based on the two subsets, and regarding a first object representing the first subset and a second object representing the second subset as a group of objects that match each other in the game, wherein the accounts in the first subset and the second subset are derived from the two subsets, and the number of accounts in the first subset and the second subset is the target value.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s61, acquiring a plurality of account combination modes determined by the two subsets, wherein each combination mode is used for combining the accounts in the two subsets into two subsets with the same account number;
s62, determining the cumulative attribute values of the two subsets in each account combination mode, wherein the cumulative attribute values are the sum of the attribute values of the roles identified by all accounts in the subsets on the target attribute;
s63, searching a target account combination mode with the minimum difference between the accumulated attribute values of the two subsets in the multiple account combination modes;
and S64, using the two subsets obtained by combining the target account combination modes as a first subset and a second subset.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: 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 above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above 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 several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
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 several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be 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 network 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 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 (13)

1. A method for determining a group of objects, comprising:
receiving a target instruction, wherein the target instruction is used for indicating that an object group is determined, and two objects in the object group are matched with each other and participate in a game;
responding to the target instruction, allocating accounts in a first set to a plurality of subsets, wherein the accounts which are requested to participate in the game and come from different game servers are stored in the first set, the accounts from different game servers perform data interaction in a form of data increment sending, the plurality of subsets are obtained by sequentially reading the accounts from a queue head to a queue tail or from the queue tail to the queue head and directly grouping, and the queue puts the accounts in the first set into the stored queue according to the sequence of the requests;
wherein allocating accounts in a first set to a plurality of subsets comprises allocating each account in the first set as follows: under the condition that a third subset exists in the plurality of subsets, allocating a first target account to the third subset, and deleting the first target account from the first set, wherein the sum of the account numbers of the third subset and the first target account is not more than a target value, and the first target account is the currently allocated account in the first set;
in the absence of the third subset from the plurality of subsets, creating a fourth subset, assigning the first target account to the fourth subset, and deleting the first target account from the first set, wherein the created fourth subset is set as one of the plurality of subsets;
and in the case that two subsets exist in the plurality of subsets, determining a first subset and a second subset according to the two subsets, and regarding a first object used for representing the first subset and a second object used for representing the second subset as one object group matched with each other in the game, wherein accounts in the first subset and the second subset are derived from the two subsets, the number of accounts in the first subset and the second subset is a target value, and the difference value between the accumulated attribute values of the two subsets on the target attribute is within a first range.
2. The method of claim 1, wherein prior to assigning the first target account to the third subset and deleting the first target account from the first set, the method further comprises determining the first target account as follows:
and under the condition that the currently allocated account requests to participate in the game in a account group mode, taking all accounts in the account group where the currently allocated account is located as the first target account.
3. The method of claim 1 or 2, wherein assigning accounts in the first set to a plurality of subsets further comprises:
after each account in the first set is distributed, all accounts in the subsets of which the number of accounts is smaller than the target value are acquired to a second set;
searching a plurality of second target accounts meeting a target combination mode in the second set, wherein the second target accounts comprise all accounts in the same account group which requests to participate in the game in a account group mode, and the number of the accounts of the plurality of second target accounts meeting the target combination mode is the target value;
creating a fifth subset, distributing the found second target accounts to the fifth subset, and deleting the found second target accounts from the second set, wherein the created fifth subset is set as one subset of the plurality of subsets.
4. The method of claim 3, wherein the number of accounts in the second target account is greater than zero and not greater than the target value, and wherein before searching for a plurality of second target accounts in the second set that satisfy the target combination, the method further comprises:
acquiring a plurality of account types of the second target account, wherein the account numbers in two second target accounts with different account types are different, and the account numbers in two second target accounts with the same account type are different;
and determining a target combination mode of a plurality of account types according to the account number corresponding to each account type, wherein the account number in the subset obtained by combination according to the target combination mode is the target value.
5. The method of claim 1, wherein assigning the first target account number to the third subset comprises:
and under the condition that the role type of the game role identified by the first target account in the game is a first role type, allocating the first target account to the third subset, wherein the first role type is the role type currently required by the three subsets, and the role types of all accounts in the subsets of which the account number is the target value in the plurality of subsets meet the target role combination mode.
6. The method of claim 1 or 5, wherein prior to assigning the first target account number to the third subset, the method further comprises:
and determining a target role combination mode according to the average attribute value of each role type on the target attribute, wherein the difference value of the sum of the first attributes of a sixth subset and the sum of the second attributes of a third subset is within a second range, the sum of the first attributes of the sixth subset is the sum of the average attribute values of the roles on the target attribute, which belong to the role type of the role identified by the account in the sixth subset, and the sum of the second attributes of the third subset is the sum of the average attribute values of the roles on the target attribute, which belong to the role type of the role identified by the account in the third subset.
7. The method of claim 1, wherein determining the first subset and the second subset from the two subsets comprises:
acquiring a plurality of account combination modes determined by the two subsets, wherein each combination mode is used for combining accounts in the two subsets into two subsets with the same account number;
determining the cumulative attribute values of the two subsets in each account combination mode, wherein the cumulative attribute values are the sum of the attribute values of the roles identified by all accounts in the subsets on the target attribute;
searching a target account combination mode with the minimum difference value between the accumulated attribute values of the two subsets in the multiple account combination modes;
and using two subsets obtained by combining the target account combination modes as the first subset and the second subset.
8. An apparatus for determining a group of objects, comprising:
the game processing device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a target instruction, the target instruction is used for indicating to determine an object group, and two objects in the object group are matched with each other and participate in a game;
a response unit, configured to respond to the target instruction, allocate accounts in a first set to multiple subsets, where the accounts in the first set store accounts which are requested to participate in the game and come from different game servers, and the accounts from different game servers perform data interaction in a form of sending data increments, where the multiple subsets are obtained by sequentially reading the accounts from a queue in sequence from a head of the queue to a tail of the queue or from the tail of the queue to the head of the queue, and the queue is a queue in which the accounts in the first set are placed in the stored queue in sequence of requests;
the response unit includes:
a first allocating module, configured to, when a third subset exists in the multiple subsets, allocate a first target account to the third subset, and delete the first target account from the first set, where a sum of account numbers of the third subset and the first target account is not greater than a target value, and the first target account is a currently allocated account in the first set;
a creating module, configured to create a fourth subset if the third subset does not exist in the plurality of subsets, allocate the first target account to the fourth subset, and delete the first target account from the first set, where the created fourth subset is set as one of the plurality of subsets;
a determining unit, configured to, when two subsets exist in the plurality of subsets, determine a first subset and a second subset according to the two subsets, and use a first object used for representing the first subset and a second object used for representing the second subset as one of the object groups matched with each other in the game, where account numbers in the first subset and the second subset are derived from the two subsets, and the number of account numbers in the first subset and the second subset is a target value, and a difference value between cumulative attribute values of the two subsets on the target attribute is within a first range.
9. The apparatus of claim 8, wherein the first assignment module, prior to assigning the first target account to the third subset and deleting the first target account from the first set, is further configured to determine the first target account as follows:
and under the condition that the currently allocated account requests to participate in the game in a account group mode, taking all accounts in the account group where the currently allocated account is located as the first target account.
10. The apparatus according to claim 8 or 9, wherein the response unit further comprises:
a first obtaining module, configured to obtain, after each account in the first set is allocated, all accounts in the subsets whose account numbers are smaller than the target value from among the multiple subsets to a second set;
the searching module is used for searching a plurality of second target accounts meeting a target combination mode in the second set, wherein the second target accounts comprise all accounts in the same account group which requests to participate in the game in an account group mode, and the number of the accounts of the plurality of second target accounts meeting the target combination mode is the target value;
a second allocating module, configured to create a fifth subset, allocate the found second target accounts to the fifth subset, and delete the found second target accounts from the second set, where the created fifth subset is set as one subset of the plurality of subsets.
11. The apparatus of claim 10, wherein the number of accounts in the second target account is greater than zero and not greater than the target value, and wherein the response unit further comprises:
a second obtaining module, configured to obtain multiple account types of the second target account, where the number of accounts in two second target accounts with different account types is different, and the number of accounts in two second target accounts with the same account type is different;
and the determining module is used for determining a target combination mode of a plurality of account types according to the account number corresponding to each account type, wherein the account number in the subset obtained by combination according to the target combination mode is the target value.
12. A storage medium, characterized in that the storage medium includes a stored program, wherein,
the program when executed performs the method of any of the preceding claims 1 to 7.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 7 by means of the computer program.
CN201711206345.2A 2017-11-27 2017-11-27 Object group determination method and device, storage medium and electronic device Active CN108196885B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711206345.2A CN108196885B (en) 2017-11-27 2017-11-27 Object group determination method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711206345.2A CN108196885B (en) 2017-11-27 2017-11-27 Object group determination method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN108196885A CN108196885A (en) 2018-06-22
CN108196885B true CN108196885B (en) 2021-07-27

Family

ID=62573198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711206345.2A Active CN108196885B (en) 2017-11-27 2017-11-27 Object group determination method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN108196885B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111091253A (en) * 2018-10-23 2020-05-01 北京嘀嘀无限科技发展有限公司 Network appointment vehicle team forming method, device, equipment and storage medium
CN109568964A (en) * 2018-11-23 2019-04-05 网易(杭州)网络有限公司 Fight matched processing method and device
CN109646942A (en) * 2018-12-21 2019-04-19 北京金山安全软件有限公司 Match method and device for battle game members and electronic equipment
CN111035936B (en) * 2019-12-17 2021-03-26 腾讯科技(深圳)有限公司 Account set adjusting method and device, storage medium and electronic device
CN111111215B (en) * 2019-12-24 2023-06-27 北京像素软件科技股份有限公司 Game matching method, game matching device, server and readable storage medium
CN112044058B (en) * 2020-09-10 2022-03-18 腾讯科技(深圳)有限公司 Virtual object control method, device, terminal and storage medium
CN112546634A (en) * 2020-12-09 2021-03-26 杭州电魂网络科技股份有限公司 Game player match matching method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050239A (en) * 2014-05-27 2014-09-17 重庆爱思网安信息技术有限公司 Correlation matching analyzing method among multiple objects
CN104063574A (en) * 2013-06-03 2014-09-24 腾讯科技(深圳)有限公司 Team battle matching method and server
CN104133821A (en) * 2013-05-01 2014-11-05 谢志宏 User matching method and user matching network system using stable matching theory and stable matching algorithm
CN104424302A (en) * 2013-09-04 2015-03-18 阿里巴巴集团控股有限公司 Method and device for matching homogeneous data objects
CN104606884A (en) * 2014-10-30 2015-05-13 腾讯科技(成都)有限公司 Matching method and device in game battle
CN105582673A (en) * 2015-11-09 2016-05-18 广州多益网络科技有限公司 Object matching method and system
CN105955790A (en) * 2016-05-20 2016-09-21 广州华多网络科技有限公司 Data processing method and apparatus
CN107103089A (en) * 2017-05-04 2017-08-29 腾讯科技(深圳)有限公司 The matching process and device of object

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060084489A1 (en) * 2004-10-18 2006-04-20 Boehm Karl P Design matching game with bar code for confirmation
JP2011221133A (en) * 2010-04-06 2011-11-04 Sony Corp Information processing device, client device, server device, list generating method, list retrieving method, list providing method, and program
US8412771B2 (en) * 2010-10-21 2013-04-02 Yahoo! Inc. Matching items of user-generated content to entities
US20150065241A1 (en) * 2013-08-27 2015-03-05 Zynga Inc. Gaming systems and methods for facilitating item grouping and group actions
CN106534302A (en) * 2016-11-10 2017-03-22 北京航空航天大学 Multi-task demand service combination method and system
CN106779809B (en) * 2016-11-25 2021-01-19 增立智造信息科技有限公司 Price information optimization combination method and system for big data platform

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133821A (en) * 2013-05-01 2014-11-05 谢志宏 User matching method and user matching network system using stable matching theory and stable matching algorithm
CN104063574A (en) * 2013-06-03 2014-09-24 腾讯科技(深圳)有限公司 Team battle matching method and server
CN104424302A (en) * 2013-09-04 2015-03-18 阿里巴巴集团控股有限公司 Method and device for matching homogeneous data objects
CN104050239A (en) * 2014-05-27 2014-09-17 重庆爱思网安信息技术有限公司 Correlation matching analyzing method among multiple objects
CN104606884A (en) * 2014-10-30 2015-05-13 腾讯科技(成都)有限公司 Matching method and device in game battle
CN105582673A (en) * 2015-11-09 2016-05-18 广州多益网络科技有限公司 Object matching method and system
CN105955790A (en) * 2016-05-20 2016-09-21 广州华多网络科技有限公司 Data processing method and apparatus
CN107103089A (en) * 2017-05-04 2017-08-29 腾讯科技(深圳)有限公司 The matching process and device of object

Also Published As

Publication number Publication date
CN108196885A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN108196885B (en) Object group determination method and device, storage medium and electronic device
US8425330B1 (en) Dynamic battle session matchmaking in a multiplayer game
CN108553903B (en) Method and device for controlling robot player
CN107837532A (en) User matching method, device, server and storage medium
TWI789087B (en) Method and apparatus for selecting virtual role, computer device, computer-readable storage medium, and computer program product
US8870644B2 (en) Dynamic battle session matchmaking
CN113134237A (en) Virtual reward resource distribution method and device, electronic equipment and storage medium
CN110496394B (en) Method, device, equipment and medium for controlling NPC (neural network controller) based on artificial intelligence
CN112675548B (en) Matching method, device and equipment and readable storage medium
CN110585697A (en) Cross-server control method and device in game
JP2016087016A (en) Game system, server system, and program
JP5806789B1 (en) Automatic supply of game objects for characters in online games
CN112619146B (en) Virtual resource allocation method and device, storage medium and electronic device
CN110102047B (en) Game operation processing method and device, and game effect display method and device
KR20150083488A (en) Method for providing online game and game sever thereof
CN111475268B (en) Task item distribution method, device, equipment and readable storage medium
JP2021079083A (en) Method for providing close-range battle royale game of dynamically determining number of participants and playable zone, and game server using the same
CN113368500B (en) Game countermeasure data processing method and device, storage medium and computer equipment
WO2023103601A1 (en) Game control method and apparatus, computer device and storage medium
CN114307150B (en) Method, device, equipment, medium and program product for interaction between virtual objects
JP5421477B1 (en) Game server, game control method, game program, game program recording medium, and game system
KR101308134B1 (en) Method for providing online third person shooting game and system there of
CN110124306B (en) Resource configuration information recommendation method, device, equipment and medium
CN111803958B (en) Virtual object queuing method and device and storage medium
KR20200126628A (en) Apparatus and Method for Providing Real-Time Strategy Battle(RTSB) Game, And Program and Information Recording Medium thereof

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