CN108619717B - Method and device for determining operation object, storage medium and electronic device - Google Patents

Method and device for determining operation object, storage medium and electronic device Download PDF

Info

Publication number
CN108619717B
CN108619717B CN201810236887.2A CN201810236887A CN108619717B CN 108619717 B CN108619717 B CN 108619717B CN 201810236887 A CN201810236887 A CN 201810236887A CN 108619717 B CN108619717 B CN 108619717B
Authority
CN
China
Prior art keywords
target
distance
weight
determining
current
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
CN201810236887.2A
Other languages
Chinese (zh)
Other versions
CN108619717A (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 Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810236887.2A priority Critical patent/CN108619717B/en
Publication of CN108619717A publication Critical patent/CN108619717A/en
Application granted granted Critical
Publication of CN108619717B publication Critical patent/CN108619717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6045Methods for processing data by generating or executing the game program for mapping control signals received from the input arrangement into game commands
    • A63F2300/6054Methods for processing data by generating or executing the game program for mapping control signals received from the input arrangement into game commands by generating automatically game commands to assist the player, e.g. automatic braking in a driving game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/65Methods for processing data by generating or executing the game program for computing the condition of a game character
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for determining an operation object, a storage medium and an electronic device. Wherein, the method comprises the following steps: under the condition that target operation is detected, acquiring a current object in a current display interface; acquiring attribute values corresponding to a plurality of characteristic attributes of each object in the current object; determining a target weight corresponding to each object according to an attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, wherein the target weight is used for indicating the accuracy of each object as an operation object corresponding to target operation; and determining the object with the target weight meeting the target condition in the current object as an operation object corresponding to the target operation. The method and the device solve the technical problem of low accuracy when the operation object corresponding to the target operation is determined.

Description

Method and device for determining operation object, storage medium and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for determining an operation object, a storage medium, and an electronic apparatus.
Background
In some applications, when an operation is performed in an application, it is necessary to determine the object on which the operation is performed. Such as: in game applications, to control a character to attack using skills, an attack object of the attack is determined. Traditional games typically employ several schemes: directly clicking a target to select the target; automatically selecting the closest target when releasing the skill; and when no locking target exists, automatically selecting the nearest target in a certain range at intervals. However, none of the above schemes may be the most suitable target to choose for the current operation. The traditional target selection scheme in the application program is not easy for the user to achieve the operation of correct result, and the user experience is very poor.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining an operation object, a storage medium and an electronic device, which are used for at least solving the technical problem of low accuracy in determining the operation object corresponding to target operation.
According to an aspect of the embodiments of the present invention, there is provided a method for determining an operation object, including: under the condition that target operation is detected, acquiring a current object in a current display interface; acquiring attribute values corresponding to a plurality of characteristic attributes of each object in the current object; determining a target weight corresponding to each object according to the attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, wherein the target weight is used for indicating the accuracy of each object as an operation object corresponding to the target operation; and determining the object of which the target weight meets the target condition in the current object as an operation object corresponding to the target operation.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for determining an operation object, including: the first acquisition module is used for acquiring a current object in a current display interface under the condition that target operation is detected; a second obtaining module, configured to obtain attribute values corresponding to multiple feature attributes of each object in the current object; a first determining module, configured to determine, according to the attribute value corresponding to each of the plurality of feature attributes, a target weight corresponding to each object, where the target weight is used to indicate an accuracy rate of each object as an operation object corresponding to the target operation; and the second determining module is used for determining the object of which the target weight meets the target condition in the current object as the operation object corresponding to the target operation.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, characterized in that the storage medium stores therein a computer program, wherein the computer program is configured to execute the method described in any one of the above when executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory and a processor, wherein the memory stores therein a computer program, and the processor is configured to execute the method described in any one of the above through the computer program.
In the embodiment of the invention, under the condition that the target operation is detected, the current object in the current display interface is obtained; acquiring attribute values corresponding to a plurality of characteristic attributes of each object in the current object; determining a target weight corresponding to each object according to an attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, wherein the target weight is used for indicating the accuracy of each object as an operation object corresponding to target operation; determining the object with the target weight meeting the target condition in the current object as the mode of the operation object corresponding to the target operation, in the process of determining the operation object corresponding to the target operation, considering the influence of the multi-dimensional characteristic attributes of each possible operation object on the operation accuracy, determining the target weight corresponding to each object by referring to the attribute values corresponding to the plurality of characteristic attributes of each object to indicate the accuracy rate of each object as the operation object, and compares the respective target weights, determines an object whose target weight satisfies a target condition as an operation object, thereby selecting the operation object which can best meet the operation effect of the target operation by referring to the characteristic attributes of a plurality of dimensions, thereby realizing the technical effect of improving the accuracy rate when the operation object corresponding to the target operation is determined, and the technical problem of low accuracy in determining the operation object corresponding to the target operation is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an alternative method for determining an operand according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application environment of an alternative method for determining an operation object according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative method of determining an operand according to an alternative embodiment of the invention;
FIG. 4 is a schematic diagram of another alternative method of determining an operand in accordance with an alternative embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative operand determination apparatus according to an embodiment of the present invention;
fig. 6 is a first schematic application scenario of an optional operation object determination method according to an embodiment of the present invention;
fig. 7 is a schematic application scenario diagram ii of an optional operation object determination method according to an embodiment of the present invention;
fig. 8 is a schematic application scenario diagram three of an optional operation object determination method according to an embodiment of the present invention; and
FIG. 9 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, there is provided a method for determining an operation object, as shown in fig. 1, the method including:
s102, acquiring a current object in a current display interface under the condition that target operation is detected;
s104, acquiring attribute values corresponding to a plurality of characteristic attributes of each object in the current object;
s106, determining a target weight corresponding to each object according to an attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, wherein the target weight is used for indicating the accuracy of each object as an operation object corresponding to target operation;
and S108, determining the object with the target weight meeting the target condition in the current object as an operation object corresponding to the target operation.
Alternatively, in this embodiment, the method for determining the operation object may be applied to a hardware environment formed by the terminal 202 shown in fig. 2. As shown in fig. 2, when the target operation is detected, the terminal 202 acquires a current object in the current display interface, acquires attribute values corresponding to a plurality of characteristic attributes of each object in the current object, and determines a target weight corresponding to each object according to the attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, where the target weight is used to indicate an accuracy rate of each object as an operation object corresponding to the target operation, and determines an object whose target weight satisfies a target condition in the current object as the operation object corresponding to the target operation.
Optionally, in this embodiment, the method for determining an operation object may be, but is not limited to, applied in a scene where an operation object corresponding to a target operation on a client is determined. The client may be, but not limited to, various types of applications, such as an online education application, an instant messaging application, a community space application, a game application, a shopping application, a browser application, a financial application, a multimedia application, a live application, and the like. Specifically, the method may be applied to, but not limited to, a scene in which an operation object corresponding to a target operation is determined in the game application, or may also be applied to, but not limited to, a scene in which an operation object corresponding to a target operation is determined in the shopping application, so as to improve accuracy in determining an operation object corresponding to a target operation. The above is only an example, and this is not limited in this embodiment.
It should be noted that, in this embodiment, the client takes a game client as an example, and the manner of determining the operation object on other types of clients is similar to that of the game client, and is not described herein again.
Optionally, in this embodiment, the target operation may include, but is not limited to: a release skill operation in a game, an operation of performing a task in a game, an operation of launching an attack in a game, and the like.
Optionally, in this embodiment, the obtained current object in the current display interface may be different according to different target operations, for example: for skill release operations of the attack class, the current object obtained may be a hostile player, NPC, monster, BOSS, etc. on the display interface. For gain-type skill release operations, the current object captured may be a friend player on the display interface. For the operation of executing the task class, the acquired current object may be a strange, a BOSS, an NPC, a prop, and the like specified by the task on the display interface.
Optionally, in this embodiment, the information such as the feature attribute and the target condition may be configured according to the type of the client and the requirement of the target operation. Such as: taking the MMORPG type game as an example, the feature attributes may include: blood volume: i.e., the player character's blood volume value (which may be expressed as a percentage of blood volume remaining), distance: the Euclidean distance between the player character and the object and the target orientation included angle: i.e. the angle between the player orientation vector and the player-object vector, PK pattern related factors: target types (player, general monster, elite monster, world Boss), hostility, red players, etc., object-specific status may be included: and the task object, the currently selected object, the currently locked object and the object which is attacking the object corresponding to the client currently.
Alternatively, in this embodiment, the target weight may be determined by, but not limited to, a target automatic selector based on a multi-factor weight formula arranged in the client, the client inputs the attribute values into the target automatic selector based on the multi-factor weight formula after acquiring the attribute values corresponding to the plurality of characteristic attributes of each object, the target automatic selector based on the multi-factor weight formula determines the target weight corresponding to each object by substituting the attribute values into the weight formula, and the client determines an object of the current object whose target weight satisfies the target condition as an operation object corresponding to the target operation after acquiring the target weight.
Optionally, in this embodiment, for the target operation in a special scene, a special target preference selector based on user specification is provided to obtain a special factor variable (i.e. characteristic attribute), and transmit data to the target automatic selector based on a factor weight formula, so as to automatically select a specific intended target.
For example: in the MMORPG-like game, several special factors are created according to the scene needs:
task object type: i.e. the target type of a specific task, is applied to the task-doing scenario.
The current locking target is: namely, the target manually designated by the user is applied to a multi-person battle scene. The user can select the UI through the target and designate the target of the prior attack.
The target of the object corresponding to the client is being attacked: namely, the target of the attack on the object corresponding to the client currently. When the method is applied to the field monster brushing scene, the selector can preferentially select and attack my monster or other players, so that the self can be well protected from being attacked in the process of monster brushing.
In an alternative embodiment, taking the player operating character releasing skill in the game client as an example, in the case that the client detects that player 1 performs the target operation of releasing skill 1, acquiring the current object in the current display interface includes: game player 2, game player 3, NPC1, and monster 1, the feature attributes in this scenario are set to: blood volume, distance and object type, wherein the weighting coefficients of the characteristic attributes are that the weighting coefficient of the blood volume is 0.6, the weighting coefficient of the distance is 0.4, different object types correspond to different weighting coefficients, the weighting coefficient of the player type is 0.7, the weighting coefficient of the NPC type is 1, the weighting coefficient of the common strange is 0.3, and attribute values corresponding to the characteristic attributes of each object in the current object are obtained, for example: the blood volume of the game player 2 is 43%, the distance between the game player 2 and the player 1 is 5.2m, and the object type is the player type; game player 3 has a blood volume of 78%, and is 3.4m away from player 1, and the object type is player type; the blood volume of the NPC1 is 100%, the distance between the NPC1 and the player 1 is 5.5m, and the object type is the NPC type; the blood volume of strange 1 is 13%, the distance between the strange 1 and the player 1 is 6.6m, the object type is a common strange type, and the target weight corresponding to each object is determined by calculating the weighted sum of the blood volume and the distance and multiplying the weighted sum by the weight coefficient of the object type, for example: the target weight of game player 2 is (43 × 0.6+5.2 × 0.4) × 0.7 is 19.516, the target weight of game player 3 is (78 × 0.6+3.4 × 0.4) × 0.7 is 33.712, the target weight of game player 3 is (100 × 0.6+5.5 × 0.4) × 1 is 62.2, and the target weight of strange 1 is (13 × 0.6+6.6 × 0.4) × 0.3 is 3.132. The target weight is used for indicating the accuracy of each object as an operation object corresponding to the target operation, and the smaller the target weight is, the higher the indicated accuracy is. If the object with the smallest target weight among the current objects is determined as the operation object corresponding to the target operation, it is determined that, among game player 2, game player 3, NPC1, and wild monster 1, wild monster 1 is determined as the operation object corresponding to the target operation.
Alternatively, in this embodiment, for a special scene such as a task executed in a game, a target weight corresponding to a task target may be set individually, so that an object specified in the task target can be selected immediately.
Optionally, in this embodiment, after the operation object is determined, the loss of the operation object may also be implemented by a target automatic loss device based on threshold limit. The loss device can introduce a threshold variable on the basis of the distance, and iteratively calculates the current target loss distance through a formula, thereby realizing the intelligent loss of the target.
In an alternative embodiment, as shown in fig. 3, the operation object determination of the target operation includes the following processes: detecting IO operation (equivalent to the target operation) at a game frame inlet, judging whether the IO operation is specific target UI operation, if so, acquiring factor data through a specific target priority selector, then selecting an operation object through the target automatic selector according to the factor data, if not, judging whether the IO operation is skill UI operation, if so, selecting the operation object through the target automatic selector, and if not, executing other operations through a role controller. After the operation object is selected, data of the client object and the operation object are obtained, and whether the operation object is lost or not is detected by the target automatic loss device according to the data of the client object and the operation object.
In this alternative embodiment, as shown in fig. 4, in the current scenario, three players and one monster are around the character itself, the target operation on the client is detected as the skill of releasing the common attack, and the operating result of the target automatic selector does not select the monster or other player closest to the target through the above-mentioned determination process of the operation object, but selects the player with the least amount of blood.
It can be seen that, through the above steps, in the process of determining the operation object corresponding to the target operation, considering the influence of the multidimensional characteristic attribute of each possible operation object on the operation accuracy, the target weight corresponding to each object is determined by referring to the attribute values corresponding to the plurality of characteristic attributes of each object to indicate the accuracy of each object as the operation object, and each target weight is compared, and the object whose target weight meets the target condition is determined as the operation object, so that the operation object which can best meet the operation effect of the target operation is selected by referring to the characteristic attributes of the plurality of dimensions, thereby achieving the technical effect of improving the accuracy when the operation object corresponding to the target operation is determined, and further solving the technical problem of low accuracy when the operation object corresponding to the target operation is determined.
As an optional scheme, the obtaining attribute values corresponding to a plurality of feature attributes of each object in the current object includes:
s1, acquiring target characteristic attribute information corresponding to a target operation from a preset configuration table, wherein the configuration table records operation and characteristic attribute information with corresponding relations, and the target characteristic attribute information is used for indicating a plurality of characteristic attributes;
and S2, acquiring attribute values corresponding to a plurality of characteristic attributes of each object according to the target characteristic attribute information.
Optionally, in this embodiment, the preset configuration table records operation and feature attribute information having a corresponding relationship, and the operation and feature attribute information having a corresponding relationship may be determined by modeling some key elements in the game.
As an optional scheme, determining the target weight corresponding to each object according to the attribute value corresponding to each of the plurality of characteristic attributes includes:
s1, acquiring target weight function information corresponding to target characteristic attribute information from a preset configuration table, wherein the configuration table records characteristic attribute information and weight function information with corresponding relations, and the target weight function information is used for indicating a weight function corresponding to each of a plurality of characteristic attributes and a weight coefficient corresponding to each of the plurality of characteristic attributes;
s2, inputting the attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes corresponding to each object into the weight function corresponding to each characteristic attribute to obtain the sub-weight corresponding to each characteristic attribute;
and S3, acquiring the weighted sum of the sub-weight corresponding to each characteristic attribute and the weight coefficient corresponding to each characteristic attribute, and determining the weighted sum as the target weight corresponding to each object.
Optionally, in this embodiment, the preset configuration table further records feature attribute information and weight function information having a corresponding relationship, and the target weight function information is used to indicate a weight function corresponding to each of the plurality of feature attributes and a weight coefficient corresponding to each of the plurality of feature attributes.
Optionally, in this embodiment, the weighting function may be configured according to, but not limited to, the characteristics of the characteristic attribute. For example: in the MMORPG game, the blood volume, distance, and target orientation are multi-stage linear change factors, and a weighting function that linearly changes in stages may be provided.
Optionally, in this embodiment, the weighting factor corresponding to each feature attribute may be configured according to the importance of each feature attribute to the operation object determination process.
As an optional scheme, determining, as an operation object corresponding to the target operation, an object whose target weight satisfies the target condition in the current object includes:
s1, when the number of the operation objects of the target operation is one, determining a first object with the highest target weight in the current objects as an object with the target weight meeting the target condition, and determining the first object as the operation object corresponding to the target operation; and/or
S2, acquiring the target number of the operation objects of the target operation when the number of the operation objects of the target operation is multiple; and determining a target number of second objects with higher target weight in the current objects as objects with target weight meeting the target condition, and determining the target number of second objects as operation objects corresponding to the target operation.
Alternatively, in this embodiment, the target condition to be satisfied by the target weight may be determined according to the number of operation objects specified by the target operation. For example: for the skill of a single attack object, the object with the highest target weight can be selected as an operation object, and for the group attack class skill, the objects meeting the group attack requirement and the number of the objects can be selected as the operation objects.
As an optional scheme, after determining, as an operation object corresponding to a target operation, an object whose target weight satisfies a target condition in a current object, the method further includes:
s1, acquiring a first distance between a first object initiating the target operation and the operation object, wherein the first distance is used for indicating the distance between the first object and the operation object when an object with a target weight meeting a target condition in the current object is determined as the operation object corresponding to the target operation;
s2, determining a target lost distance based on the first distance and the target distance threshold;
s3, determining that the target operation lost the operation object when the first object and the operation object move such that the second distance between the first object and the operation object exceeds the target lost distance.
Alternatively, in this embodiment, the target distance threshold may be configured according to information such as an operation range of the target operation, an operation attribute of the target operation, and the like.
Optionally, in this embodiment, whether to perform the loss processing on the operation object is determined according to a distance between the first object and the operation object and a preset target distance threshold. For example: during the battle in the game, especially the running battle, a new target is to be reselected, and the currently selected target is lost firstly, and the traditional practice is that: the method comprises the steps of directly clicking a new target to switch the target, using a strange key to switch the target, waiting for the currently selected target to leave the visual field or die, and simply selecting the target closest to the currently selected target to switch the target and other operation object losing modes. However, the methods are not intelligent and convenient enough, and the target is easily lost by mistake.
As an alternative, determining the target lost distance based on the first distance and the target distance threshold comprises:
s1, determining the target lost distance as the sum of the first distance and the target distance threshold value, in the case where the first distance is greater than the minimum target lost distance and the first object and the operation object move in directions away from each other;
s2, determining the target lost distance as the sum of the second distance and the target distance threshold value, in a case where the first distance is greater than the minimum target lost distance and the first object and the operation object move in directions to approach each other;
s3, determining the target lost distance as the minimum target lost distance, in case the first distance is less than or equal to the minimum target lost distance;
wherein, the minimum target loss distance is the minimum value of the preset target loss distances.
Optionally, in this embodiment, a threshold variable is introduced on the basis of the distance, and the current target loss distance is iteratively calculated through a formula, so that the intelligent loss of the target is realized.
For example, in an alternative embodiment, dtIndicating the current target miss distance, dl the last calculated target miss distance, D the distance between the current operation object and the player object, λ the miss distance threshold, and D the minimum target miss distance.
dlInitialization is performed by the following formula:
dl=d+λ
after initialization, d is updated iteratively during the game as followst
Figure BDA0001604214730000111
dl=dt
Through the calculation model, the player can be ensured to intelligently lose the target in the following scenes after selecting the visible target at any far distance:
scene one, the initial distance exceeds D, and the player and the operation object move in the far direction, DtIs maintained at the initialized value and exceeds d at the distance between the twotThe target is then automatically lost.
Scene two, the initial distance exceeds D, and the player and target move in the direction of approach, then DtThe distance between the player and the target exceeds d when the player and the target move in the direction away from each othertThe target is then automatically lost.
Scene three, if the initial distance is less than or equal to D, then DtLocked to D, and thereafter, at a distance exceeding D, regardless of the movement of the player and the targettThe target is then automatically lost.
In this alternative embodiment, taking D ═ 10 and λ ═ 1 as an example, for scene one, if there is a current first object between the first object and the target objectIs 15, then the initial distance exceeds D (10) and the first object and the operator object move in the direction of the separation, then D is 16, then DtRemaining at 16, the target object is automatically lost after the distance between the two exceeds 16. For scene two, if the distance between the current first object and the target object is 15, the initial distance is 15+1 — 16, the initial distance exceeds D (10), and the first object and the operation object move in the approaching direction, DtContinuously decrease, that is, when the two approach to a distance of 12, d is measuredtAt 12+1, 13, if the player and the target move in the direction away from each other, the target is automatically lost after the distance between the two exceeds 13. For scene three, if the distance between the current first object and the target object is 9, then the initial distance is 9+1 — 10, which is equal to D (10), then DtLocked to 10, after which the target is automatically lost after the distance between the first object and the target object exceeds 10, regardless of how the first object and the target object move.
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 operation object determining apparatus for implementing the operation object determining method, as shown in fig. 5, the apparatus includes:
1) a first obtaining module 52, configured to, in a case that a target operation is detected, obtain a current object in a current display interface;
2) a second obtaining module 54, configured to obtain attribute values corresponding to multiple feature attributes of each object in the current object;
3) a first determining module 56, configured to determine a target weight corresponding to each object according to an attribute value corresponding to each of the plurality of characteristic attributes, where the target weight is used to indicate an accuracy rate of each object as an operation object corresponding to a target operation;
4) and a second determining module 58, configured to determine, as an operation object corresponding to the target operation, an object whose target weight satisfies the target condition in the current objects.
Alternatively, in this embodiment, the above-described determination apparatus of the operation object may be applied to a hardware environment constituted by the terminal 202 shown in fig. 2. As shown in fig. 2, when the target operation is detected, the terminal 202 acquires a current object in the current display interface, acquires attribute values corresponding to a plurality of characteristic attributes of each object in the current object, and determines a target weight corresponding to each object according to the attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, where the target weight is used to indicate an accuracy rate of each object as an operation object corresponding to the target operation, and determines an object whose target weight satisfies a target condition in the current object as the operation object corresponding to the target operation.
Optionally, in this embodiment, the determining apparatus of the operation object may be applied to, but is not limited to, a scene for determining an operation object corresponding to a target operation on a client. The client may be, but not limited to, various types of applications, such as an online education application, an instant messaging application, a community space application, a game application, a shopping application, a browser application, a financial application, a multimedia application, a live application, and the like. Specifically, the method may be applied to, but not limited to, a scene in which an operation object corresponding to a target operation is determined in the game application, or may also be applied to, but not limited to, a scene in which an operation object corresponding to a target operation is determined in the shopping application, so as to improve accuracy in determining an operation object corresponding to a target operation. The above is only an example, and this is not limited in this embodiment.
It should be noted that, in this embodiment, the client takes a game client as an example, and the manner of determining the operation object on other types of clients is similar to that of the game client, and is not described herein again.
Optionally, in this embodiment, the target operation may include, but is not limited to: a release skill operation in a game, an operation of performing a task in a game, an operation of launching an attack in a game, and the like.
Optionally, in this embodiment, the obtained current object in the current display interface on the client may be different according to different target operations, for example: for skill release operations of the attack class, the current object obtained may be a hostile player, NPC, monster, BOSS, etc. on the display interface. For gain-type skill release operations, the current object captured may be a friend player on the display interface. For the operation of executing the task class, the acquired current object may be a strange, a BOSS, an NPC, a prop, and the like specified by the task on the display interface.
Optionally, in this embodiment, the information such as the feature attribute and the target condition may be configured according to the type of the client and the requirement of the target operation. Such as: taking the MMORPG type game as an example, the feature attributes may include: blood volume: i.e., the player character's blood volume value (which may be expressed as a percentage of blood volume remaining), distance: the Euclidean distance between the player character and the object and the target orientation included angle: i.e. the angle between the player orientation vector and the player-object vector, PK pattern related factors: target types (player, general monster, elite monster, world Boss), hostility, red players, etc., object-specific status may be included: and the task object, the currently selected object, the currently locked object and the object which is attacking the object corresponding to the client currently.
Alternatively, in this embodiment, the target weight may be determined by, but not limited to, a target automatic selector based on a multi-factor weight formula arranged in the client, the client inputs the attribute values into the target automatic selector based on the multi-factor weight formula after acquiring the attribute values corresponding to the plurality of characteristic attributes of each object, the target automatic selector based on the multi-factor weight formula determines the target weight corresponding to each object by substituting the attribute values into the weight formula, and the client determines an object of the current object whose target weight satisfies the target condition as an operation object corresponding to the target operation after acquiring the target weight.
Optionally, in this embodiment, for the target operation in a special scene, a special target preference selector based on user specification is provided to obtain a special factor variable (i.e. characteristic attribute), and transmit data to the target automatic selector based on a factor weight formula, so as to automatically select a specific intended target.
For example: in the MMORPG-like game, several special factors are created according to the scene needs:
task object type: i.e. the target type of a specific task, is applied to the task-doing scenario.
The current locking target is: namely, the target manually designated by the user is applied to a multi-person battle scene. The user can select the UI through the target and designate the target of the prior attack.
The target of the object corresponding to the client is being attacked: namely, the target of the attack on the object corresponding to the client currently. When the method is applied to the field monster brushing scene, the selector can preferentially select and attack my monster or other players, so that the self can be well protected from being attacked in the process of monster brushing.
In an alternative embodiment, taking the player operating character releasing skill in the game client as an example, in the case that the client detects that player 1 performs the target operation of releasing skill 1, acquiring the current object in the current display interface includes: game player 2, game player 3, NPC1, and monster 1, the feature attributes in this scenario are set to: blood volume, distance and object type, wherein the weighting coefficients of the characteristic attributes are that the weighting coefficient of the blood volume is 0.6, the weighting coefficient of the distance is 0.4, different object types correspond to different weighting coefficients, the weighting coefficient of the player type is 0.7, the weighting coefficient of the NPC type is 1, the weighting coefficient of the common strange is 0.3, and attribute values corresponding to the characteristic attributes of each object in the current object are obtained, for example: the blood volume of the game player 2 is 43%, the distance between the game player 2 and the player 1 is 5.2m, and the object type is the player type; game player 3 has a blood volume of 78%, and is 3.4m away from player 1, and the object type is player type; the blood volume of the NPC1 is 100%, the distance between the NPC1 and the player 1 is 5.5m, and the object type is the NPC type; the blood volume of strange 1 is 13%, the distance between the strange 1 and the player 1 is 6.6m, the object type is a common strange type, and the target weight corresponding to each object is determined by calculating the weighted sum of the blood volume and the distance and multiplying the weighted sum by the weight coefficient of the object type, for example: the target weight of game player 2 is (43 × 0.6+5.2 × 0.4) × 0.7 is 19.516, the target weight of game player 3 is (78 × 0.6+3.4 × 0.4) × 0.7 is 33.712, the target weight of game player 3 is (100 × 0.6+5.5 × 0.4) × 1 is 62.2, and the target weight of strange 1 is (13 × 0.6+6.6 × 0.4) × 0.3 is 3.132. The target weight is used for indicating the accuracy of each object as an operation object corresponding to the target operation, and the smaller the target weight is, the higher the indicated accuracy is. If the object with the smallest target weight among the current objects is determined as the operation object corresponding to the target operation, it is determined that, among game player 2, game player 3, NPC1, and wild monster 1, wild monster 1 is determined as the operation object corresponding to the target operation.
Alternatively, in this embodiment, for a special scene such as a task executed in a game, a target weight corresponding to a task target may be set individually, so that an object specified in the task target can be selected immediately.
Optionally, in this embodiment, after the operation object is determined, the loss of the operation object may also be implemented by a target automatic loss device based on threshold limit. The loss device can introduce a threshold variable on the basis of the distance, and iteratively calculates the current target loss distance through a formula, thereby realizing the intelligent loss of the target.
In an alternative embodiment, as shown in fig. 3, the operation object determination of the target operation includes the following processes: detecting IO operation (equivalent to the target operation) at a game frame inlet, judging whether the IO operation is specific target UI operation, if so, acquiring factor data through a specific target priority selector, then selecting an operation object through the target automatic selector according to the factor data, if not, judging whether the IO operation is skill UI operation, if so, selecting the operation object through the target automatic selector, and if not, executing other operations through a role controller. After the operation object is selected, data of the client object and the operation object are obtained, and whether the operation object is lost or not is detected by the target automatic loss device according to the data of the client object and the operation object.
In this alternative embodiment, as shown in fig. 4, in the current scenario, three players and one monster are around the character itself, the target operation on the client is detected as the skill of releasing the common attack, and the operating result of the target automatic selector does not select the monster or other player closest to the target through the above-mentioned determination process of the operation object, but selects the player with the least amount of blood.
Therefore, by the device, in the process of determining the operation object corresponding to the target operation, considering the influence of the multidimensional characteristic attribute of each possible operation object on the operation accuracy, the target weight corresponding to each object is determined by referring to the attribute values corresponding to the characteristic attributes of each object to indicate the accuracy of each object as the operation object, the target weights are compared, the object with the target weight meeting the target condition is determined as the operation object, and the operation object most meeting the operation effect of the target operation is selected by referring to the characteristic attributes of the plurality of dimensions, so that the technical effect of improving the accuracy in determining the operation object corresponding to the target operation is achieved, and the technical problem of low accuracy in determining the operation object corresponding to the target operation is solved.
As an optional scheme, the second obtaining module includes:
1) the device comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining target characteristic attribute information corresponding to target operation from a preset configuration table, the configuration table records operation and characteristic attribute information with corresponding relation, and the target characteristic attribute information is used for indicating a plurality of characteristic attributes;
2) and the second acquisition unit is used for acquiring attribute values corresponding to a plurality of characteristic attributes of each object according to the target characteristic attribute information.
Optionally, in this embodiment, the preset configuration table records operation and feature attribute information having a corresponding relationship, and the operation and feature attribute information having a corresponding relationship may be determined by modeling some key elements in the game.
As an alternative, the first determining module includes:
1) a third obtaining unit, configured to obtain target weight function information corresponding to target feature attribute information from a preset configuration table, where feature attribute information and weight function information having a correspondence relationship are recorded in the configuration table, and the target weight function information is used to indicate a weight function corresponding to each of the plurality of feature attributes and a weight coefficient corresponding to each of the plurality of feature attributes;
2) the input unit is used for inputting an attribute value corresponding to each characteristic attribute in a plurality of characteristic attributes corresponding to each object into a weight function corresponding to each characteristic attribute to obtain a sub-weight corresponding to each characteristic attribute;
3) and the first processing unit is used for acquiring a weighted sum of the sub-weight corresponding to each characteristic attribute and the weight coefficient corresponding to each characteristic attribute, and determining the weighted sum as the target weight corresponding to each object.
Optionally, in this embodiment, the preset configuration table further records feature attribute information and weight function information having a corresponding relationship, and the target weight function information is used to indicate a weight function corresponding to each of the plurality of feature attributes and a weight coefficient corresponding to each of the plurality of feature attributes.
Optionally, in this embodiment, the weighting function may be configured according to, but not limited to, the characteristics of the characteristic attribute. For example: in the MMORPG game, the blood volume, distance, and target orientation are multi-stage linear change factors, and a weighting function that linearly changes in stages may be provided.
Optionally, in this embodiment, the weighting factor corresponding to each feature attribute may be configured according to the importance of each feature attribute to the operation object determination process.
As an alternative, the second determining module includes:
1) the second processing unit is used for determining a first object with the highest target weight in the current objects as an object with the target weight meeting the target condition under the condition that the number of the operation objects of the target operation is one, and determining the first object as an operation object corresponding to the target operation; and/or
2) A third processing unit configured to acquire a target number of operation objects of a target operation in a case where the number of operation objects of the target operation is plural; and determining a target number of second objects with higher target weight in the current objects as objects with target weight meeting the target condition, and determining the target number of second objects as operation objects corresponding to the target operation.
Alternatively, in this embodiment, the target condition to be satisfied by the target weight may be determined according to the number of operation objects specified by the target operation. For example: for the skill of a single attack object, the object with the highest target weight can be selected as an operation object, and for the group attack class skill, the objects meeting the group attack requirement and the number of the objects can be selected as the operation objects.
As an optional solution, the apparatus further includes:
1) the third acquisition module is used for acquiring a first distance between a first object initiating the target operation and an operation object, wherein the first distance is used for indicating the distance between the first object and the operation object when an object with a target weight meeting a target condition in the current object is determined as the operation object corresponding to the target operation;
2) a third determining module for determining a target lost distance based on the first distance and a target distance threshold;
3) and the fourth determination module is used for determining that the target operation loses the operation object when the first object and the operation object move to the condition that the second distance between the first object and the operation object exceeds the target loss distance.
Alternatively, in this embodiment, the target distance threshold may be configured according to information such as an operation range of the target operation, an operation attribute of the target operation, and the like.
Optionally, in this embodiment, whether to perform the loss processing on the operation object is determined according to a distance between the first object and the operation object and a preset target distance threshold. For example: during the battle in the game, especially the running battle, a new target is to be reselected, and the currently selected target is lost firstly, and the traditional practice is that: the method comprises the steps of directly clicking a new target to switch the target, using a strange key to switch the target, waiting for the currently selected target to leave the visual field or die, and simply selecting the target closest to the currently selected target to switch the target and other operation object losing modes. However, the methods are not intelligent and convenient enough, and the target is easily lost by mistake.
As an optional solution, the third determining module includes:
1) a first determination unit configured to determine, when the first distance is greater than the minimum target lost distance and the first object and the operation object move in directions away from each other, the target lost distance as a sum of the first distance and a target distance threshold;
2) a second determination unit configured to determine the target lost distance as a sum of the second distance and a target distance threshold in a case where the first distance is greater than the minimum target lost distance and the first object and the operation object move in directions to approach each other;
3) a third determining unit configured to determine the target lost distance as a minimum target lost distance when the first distance is less than or equal to the minimum target lost distance;
wherein, the minimum target loss distance is the minimum value of the preset target loss distances.
Optionally, in this embodiment, a threshold variable is introduced on the basis of the distance, and the current target loss distance is iteratively calculated through a formula, so that the intelligent loss of the target is realized.
For example, in an alternative embodiment, dtIndicating the current target lost distance, dlIndicating the last calculated target miss distance, D indicating the distance between the current operation object and the player object, λ indicating a miss distance threshold, and D indicating a minimum target miss distance.
dlInitialization is performed by the following formula:
dl=d+λ
after initialization, d is updated iteratively during the game as followst
Figure BDA0001604214730000201
dl=dt
Through the calculation model, the player can be ensured to intelligently lose the target in the following scenes after selecting the visible target at any far distance:
scene one, the initial distance exceeds D, and the first object of the player and the operation object move in the far direction, DtIs maintained at the initialized value and exceeds d at the distance between the twotThe target is then automatically lost.
Scene two, the initial distance exceeds D, and the player and target move in the direction of approach, then DtThe distance between the player and the target exceeds d when the player and the target move in the direction away from each othertThe target is then automatically lost.
Scene three, if the initial distance is less than or equal to D, then DtLocked to D, and thereafter, at a distance exceeding D, regardless of the movement of the player and the targettThe target is then automatically lost.
In this alternative embodiment, taking D as 10 and λ as 1 as an example, for scene one, if the distance between the current first object and the target object is 15, the initial distance is 15+1 as 16, the initial distance exceeds D (10), and the first object and the operation object move in the away direction, D is DtRemaining at 16, the target object is automatically lost after the distance between the two exceeds 16. For scene two, if the distance between the current first object and the target object is 15, the initial distance is 15+1 — 16, the initial distance exceeds D (10), and the first object and the operation object move in the approaching direction, DtContinuously decrease, that is, when the two approach to a distance of 12, d is measuredtAt 12+1, 13, if the player and the target move in the direction away from each other, the target is automatically lost after the distance between the two exceeds 13. For scene three, if the distance between the current first object and the target object is 9, then the initial distance is 9+1 — 10, which is equal to D (10), then DtLocked to 10, after which the target is automatically lost after the distance between the first object and the target object exceeds 10, regardless of how the first object and the target object move.
The application environment of the embodiment of the present invention may refer to the application environment in the above embodiments, but is not described herein again. The embodiment of the invention provides an optional specific application example of the connection method for implementing the real-time communication.
As an alternative embodiment, the above method for determining an operation object may be, but is not limited to, applied in the scene of determining an operation object as shown in fig. 6. Some of the game nouns in this scenario are explained and illustrated below:
MMORPG: a massively multiplayer online role-playing game.
Occupation: the type of character selected by the player in the game.
PK mode: the fighting mode in the game determines the friendship or hostility relationship among different crowds in the game.
NPC: non-player characters in a game mainly refer to some functional standing characters, such as role objects like a task of picking up and the like.
The red players: other players maliciously killed in the game can obtain the gas killing value, the gas killing value is accumulated to be more than 200 and becomes red, and the backpack objects are damaged with a high probability when the players are attacked and die by the NPC.
In this scenario, a target intelligent assistance system for MMORPG hand-tour is provided. One pain point of the current game is that on a mobile platform, due to the particularity of the mobile platform, including small visual screen and limited IO operation, the selection and the loss of targets in the game process are operations which are not easy to achieve correct results for players, and finally the game experience is poor. Aiming at the pain point, in the scene, the characteristics of the MMORPG game and the mobile platform operation are comprehensively considered, a set of intelligent auxiliary system for selecting and losing the operation object is provided, the intelligence, the convenience and the correctness of the player when selecting and losing the operation object are ensured, and the user experience is greatly improved. The system mainly comprises the following parts:
1) an automatic target selector based on a multi-factor weight formula.
According to the game type and the game scene, certain key elements in the game are modeled to determine factor variables (equivalent to the characteristic attributes), establish a weight function and determine weight coefficients corresponding to the factors. When the player releases the skill, the system will input the data into the object automatic selector and automatically select the operation object.
The selector introduces factors, weights and other important variables, the target weights are calculated through the following formula, and the selector can automatically select the object with the highest weight as an operation object, so that the intelligent selection of the target is realized.
Figure BDA0001604214730000221
ωi=f(x)
Where ω is the target weight corresponding to each object, ωiIs a certainSub-weights of a factor, σiIs the weight coefficient of a certain factor, x is the discrete value of a certain factor, and f (x) is the weight function corresponding to the factor.
Optionally, in this embodiment, the weighting coefficient may be used to isolate each factor for independent weight calculation (i.e. abstract the weighting function f (x)) and weight ω of each factor in the formulaiNormalized by sigmaiThe weight occupied by each factor is adjusted to determine the importance of the factor. By the weight coefficient design, a planner and a developer can debug the value and the function of the system more conveniently.
In the MMORPG game, a set of factor variables closely related to the occupation of a player character is designed, and an independent factor weight coefficient table is configured for each occupation so as to record data such as the weight function, the factors and the weight coefficients. Specific factor variables are as follows:
blood volume: i.e., the amount of blood of the player character, may be expressed in the game as a percentage of the amount of blood remaining.
Distance: i.e. the euclidean distance between the player character and the object.
Target orientation angle: i.e. the angle between the player orientation vector and the player-object vector.
PK pattern related factors: object type (player, common monster, elite monster, world Boss), hostility relationship, red players.
Target-specific state: the task object, the currently selected object, the currently locked object, and the object that is currently attacking the player character.
The blood volume, the distance and the target orientation are multi-stage linear change factors, and a weight function can be designed by adopting a weight function model which is linearly changed in stages. For example: the weight estimation function for blood volume is as follows:
Figure BDA0001604214730000231
wherein f (x) is a weight function, kiIs a linearly changing slope, xi0Is a factor starting value, f (x)i0) Is a factor of the initial weight, xi1Is the end-of-factor value, f (x)i1) Is the factoring end weight, x is the factoring value.
2) Based on a user-specified target preference selector.
In some special game scenes, such as a task scene, a multi-player battle scene, etc., the above factors cannot meet the selection requirements of specific targets (such as task targets, enemy targets, etc.). At this time, according to the needs of the scene, a special factor can be set through the specific target priority selector, and finally, the specific target can be automatically selected through the target automatic selector again.
The selector automatically selects a specific intention operation object by introducing some special factor variables and transmitting data to a target automatic selector based on a factor weight formula.
In the MMORPG game, according to the scene needs, the following special factors are created:
task object type: i.e., the object type of a particular task, may be applied to do a task scenario.
The current locking target is: namely, the manually specified operation object, can be applied to a multi-person battle scene. As shown in fig. 6, the object of the priority attack is specified by the target selection UI.
Targets that are attacking the player character: i.e., the target that is currently under attack on the player character. When the method is applied to an outdoor monster brushing scene, the selector can preferentially select monsters or other players attacking the player characters, so that the method can well protect the player characters from being attacked in the process of monster brushing.
3) A target auto-loser based on threshold limits.
In the game process, how to intelligently lose the currently selected target is an important prerequisite for target switching and how to select the target. For example, in the battle process, when the target is switched intelligently, the currently selected target must be lost first, because the currently selected target is an important factor which occupies a large weight. If the remote professional character wants to attack the selected target while running, the target is lost only by distance, which easily causes the target to be lost wrongly. Like the traditional hand game, the information check of the selection of the player and the NPC is limited in a narrow range, so that the information of other people is not easy to check by the player, the range selection is limited, and the problem of losing the selected target is solved. The automatic target loss device introduces a threshold variable, and meets the requirement that the selected target is lost intelligently after reaching a certain condition. On the basis, the target what you see is a good user experience which can be selected can be conveniently realized.
The loss device introduces a threshold variable on the basis of the distance, and iteratively calculates the current target loss distance through a formula, thereby realizing the intelligent loss of the target.
In the present embodiment, d is settIndicating the current target lost distance, dlRepresents the last calculated object miss distance, D represents the distance between the current object and the player, λ represents the miss distance threshold, and D represents the minimum object miss distance.
dlInitialization is performed by the following formula:
dl=d+λ
after initialization, d is updated iteratively during the game as followst
Figure BDA0001604214730000241
dl=dt
Through the calculation model, the intelligent target losing method can ensure that after the player selects visible objects at any far distance, the target is intelligently lost after the following actions:
1) the initial distance exceeds D and the player and target move in a distancing direction, then DtIs maintained at the initialized value and exceeds d at the distance between the twotThe target is then automatically lost.
2) The initial distance exceeds D and the player and target move in the direction of approach, then DtContinuously decrease, if the player and the target move in the direction away from each other, the distance between the player and the target is increasedOver dtThe target is then automatically lost.
3) Initial distance is less than or equal to D, then DtLocked to D, and thereafter, at a distance exceeding D, regardless of the movement of the player and the targettThe target is then automatically lost.
In the MMORPG game, taking a fighter profession as an example, the data used are D-12 and λ -5. When the operation object is selected, the distance between the player character and the operation object is 7.7 m as shown in fig. 7, and when the distance between the player character and the operation object exceeds 12 m as shown in fig. 8, the target is automatically lost.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic apparatus for implementing the above determination of an operation object, as shown in fig. 9, the electronic apparatus including: one or more processors 902 (only one of which is shown in the figure), in which a computer program is stored, a memory 904, in which a sensor 906, an encoder 908 and a transmitting device 910 are arranged to carry out the steps of any of the above-described method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring the current object in the current display interface under the condition that the target operation is detected;
s2, acquiring attribute values corresponding to a plurality of characteristic attributes of each object in the current object;
s3, determining a target weight corresponding to each object according to the attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, wherein the target weight is used for indicating the accuracy of each object as an operation object corresponding to the target operation;
and S4, determining the object with the target weight meeting the target condition in the current objects as the operation object corresponding to the target operation.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for determining an operation object in the embodiment of the present invention, and the processor 904 executes various functional applications and data processing by executing the software programs and modules stored in the memory 902, that is, implementing the control method of the target component described above. The memory 902 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 902 may further include memory located remotely from the processor 904, which may be connected to the 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 transmission device 910 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 910 includes a network adapter (NIC) that can be connected to a router via a network cable and other network devices so as to communicate with the internet or a local area network. In one example, the transmission device 910 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Wherein the memory 902 is used for storing, inter alia, application programs.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring the current object in the current display interface under the condition that the target operation is detected;
s2, acquiring attribute values corresponding to a plurality of characteristic attributes of each object in the current object;
s3, determining a target weight corresponding to each object according to the attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes, wherein the target weight is used for indicating the accuracy of each object as an operation object corresponding to the target operation;
and S4, determining the object with the target weight meeting the target condition in the current objects as the operation object corresponding to the target operation.
Optionally, the storage medium is further configured to store a computer program for executing the steps included in the method in the foregoing embodiment, which is not described in detail in this embodiment.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing 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 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 an operation object, comprising:
under the condition that target operation is detected, acquiring a current object in a current display interface;
acquiring attribute values corresponding to a plurality of characteristic attributes of each object in the current object;
determining a target weight corresponding to each object according to the attribute values corresponding to the plurality of characteristic attributes, wherein the target weight is used for indicating the accuracy of each object as an operation object corresponding to the target operation;
determining the object of which the target weight meets the target condition in the current object as an operation object corresponding to the target operation;
acquiring a first distance between a first object initiating the target operation and the operation object, wherein the first distance is used for indicating the distance between the first object and the operation object when an object of which the target weight meets a target condition in the current object is determined as the operation object corresponding to the target operation;
determining a target lost distance based on the first distance and a target distance threshold;
and determining that the operation object is lost by the target operation when the first object and the operation object move to the condition that a second distance between the first object and the operation object exceeds the target loss distance.
2. The method of claim 1, wherein obtaining attribute values corresponding to a plurality of feature attributes of each of the current objects comprises:
acquiring target characteristic attribute information corresponding to the target operation from a preset configuration table, wherein the configuration table records operation and characteristic attribute information with corresponding relations, and the target characteristic attribute information is used for indicating the plurality of characteristic attributes;
and acquiring the attribute values corresponding to the characteristic attributes of each object according to the target characteristic attribute information.
3. The method of claim 2, wherein determining the target weight for each object according to the attribute values corresponding to the plurality of feature attributes comprises:
acquiring target weight function information corresponding to the target characteristic attribute information from the preset configuration table, wherein the configuration table records characteristic attribute information and weight function information with a corresponding relationship, and the target weight function information is used for indicating a weight function corresponding to each of the plurality of characteristic attributes and a weight coefficient corresponding to each of the plurality of characteristic attributes;
inputting an attribute value corresponding to each characteristic attribute in the plurality of characteristic attributes corresponding to each object into a weight function corresponding to each characteristic attribute to obtain a sub-weight corresponding to each characteristic attribute;
and acquiring a weighted sum of the sub-weight corresponding to each characteristic attribute and the weight coefficient corresponding to each characteristic attribute, and determining the weighted sum as the target weight corresponding to each object.
4. The method according to claim 3, wherein determining the object of the current object whose target weight satisfies the target condition as the operation object corresponding to the target operation comprises:
under the condition that the number of the operation objects of the target operation is one, determining a first object with the highest target weight in the current objects as an object with the target weight meeting the target condition;
and determining the first object as the operation object corresponding to the target operation.
5. The method according to claim 3, wherein determining the object of the current object whose target weight satisfies the target condition as the operation object corresponding to the target operation comprises:
acquiring the target number of the operation objects of the target operation under the condition that the number of the operation objects of the target operation is multiple;
determining the second objects with higher target weights in the current objects as the objects with the target weights meeting the target conditions;
and determining the target number of second objects as the operation objects corresponding to the target operation.
6. The method of claim 1, wherein determining the target lost distance based on the first distance and the target distance threshold comprises:
determining the target lost distance as the sum of the first distance and the target distance threshold in the case where the first distance is greater than a minimum target lost distance and the first object and the operation object move in directions away from each other;
determining the target lost distance as the sum of the second distance and the target distance threshold in a case where the first distance is greater than the minimum target lost distance and the first object and the operation object move in directions close to each other;
determining the target lost distance as the minimum target lost distance if the first distance is less than or equal to the minimum target lost distance;
wherein the minimum target loss distance is a minimum value of the preset target loss distances.
7. An apparatus for determining an operation object, comprising:
the first acquisition module is used for acquiring a current object in a current display interface under the condition that target operation is detected;
a second obtaining module, configured to obtain attribute values corresponding to multiple feature attributes of each object in the current object;
a first determining module, configured to determine, according to the attribute value corresponding to each of the plurality of feature attributes, a target weight corresponding to each object, where the target weight is used to indicate an accuracy rate of each object as an operation object corresponding to the target operation;
a second determining module, configured to determine, as an operation object corresponding to the target operation, an object whose target weight satisfies a target condition in the current object;
a third obtaining module, configured to obtain a first distance between a first object initiating the target operation and the operation object, where the first distance is used to indicate a distance between the first object and the operation object when an object whose target weight satisfies a target condition in the current object is determined as the operation object corresponding to the target operation;
a third determining module to determine a target lost distance based on the first distance and a target distance threshold;
a fourth determining module, configured to determine that the operation object is lost by the target operation when the first object and the operation object move such that a second distance between the first object and the operation object exceeds the target loss distance.
8. The apparatus of claim 7, wherein the second obtaining module comprises:
a first obtaining unit, configured to obtain target feature attribute information corresponding to the target operation from a preset configuration table, where the configuration table records operations and feature attribute information having a corresponding relationship, and the target feature attribute information is used to indicate the plurality of feature attributes;
a second obtaining unit, configured to obtain the attribute values corresponding to the plurality of feature attributes of each object according to an instruction of the target feature attribute information.
9. The apparatus of claim 8, wherein the first determining module comprises:
a third obtaining unit, configured to obtain target weight function information corresponding to the target feature attribute information from the preset configuration table, where feature attribute information and weight function information having a corresponding relationship are recorded in the configuration table, and the target weight function information is used to indicate a weight function corresponding to each of the plurality of feature attributes and a weight coefficient corresponding to each of the plurality of feature attributes;
an input unit, configured to input an attribute value corresponding to each feature attribute of the plurality of feature attributes corresponding to each object into a weight function corresponding to each feature attribute, so as to obtain a sub-weight corresponding to each feature attribute;
a first processing unit, configured to obtain a weighted sum of the sub-weight corresponding to each feature attribute and the weight coefficient corresponding to each feature attribute, and determine the weighted sum as the target weight corresponding to each object.
10. The apparatus of claim 9, wherein the second determining module comprises:
a second processing unit, configured to, when the number of the operation objects of the target operation is one, determine that a first object with a highest target weight among the current objects is an object whose target weight satisfies the target condition, and determine the first object as the operation object corresponding to the target operation; and/or
A third processing unit, configured to, when the number of the operation objects of the target operation is multiple, obtain a target number of the operation objects of the target operation; determining the second objects with higher target weights in the current objects as the objects with the target weights meeting the target conditions, and determining the second objects with the target numbers as the operation objects corresponding to the target operation.
11. The apparatus of claim 10, wherein the third determining module comprises:
a first determination unit configured to determine that the target lost distance is a sum of the first distance and the target distance threshold when the first distance is greater than a minimum target lost distance and the first object and the operation object move in directions away from each other;
a second determination unit configured to determine, when the first distance is greater than the minimum target lost distance and the first object and the operation object move in directions to approach each other, that the target lost distance is a sum of the second distance and the target distance threshold;
a third determining unit, configured to determine that the target loss distance is the minimum target loss distance when the first distance is less than or equal to the minimum target loss distance;
wherein the minimum target loss distance is a minimum value of the preset target loss distances.
12. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
13. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN201810236887.2A 2018-03-21 2018-03-21 Method and device for determining operation object, storage medium and electronic device Active CN108619717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810236887.2A CN108619717B (en) 2018-03-21 2018-03-21 Method and device for determining operation object, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810236887.2A CN108619717B (en) 2018-03-21 2018-03-21 Method and device for determining operation object, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN108619717A CN108619717A (en) 2018-10-09
CN108619717B true CN108619717B (en) 2020-06-16

Family

ID=63696174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810236887.2A Active CN108619717B (en) 2018-03-21 2018-03-21 Method and device for determining operation object, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN108619717B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111151007B (en) * 2019-12-27 2023-09-08 上海米哈游天命科技有限公司 Object selection method, device, terminal and storage medium
CN111399743B (en) * 2020-03-18 2022-05-27 网易(杭州)网络有限公司 Display control method and device in game
CN111569433B (en) * 2020-05-11 2023-09-12 上海米哈游天命科技有限公司 Game cheating detection method, device, equipment and storage medium
CN113599829B (en) * 2021-08-06 2023-08-22 腾讯科技(深圳)有限公司 Virtual object selection method, device, terminal and storage medium
CN113694526B (en) * 2021-09-18 2023-06-09 腾讯科技(深圳)有限公司 Virtual object control method, system, device, equipment, medium and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101493507B1 (en) * 2013-06-11 2015-02-17 (주)위메이드엔터테인먼트 Method and apparatus for tageting automatically at objects appeared in an on-line game
CN105117579B (en) * 2015-07-21 2018-07-31 网易(杭州)网络有限公司 Object select method and apparatus
CN105582674B (en) * 2015-12-25 2019-05-14 网易(杭州)网络有限公司 The selection method and device of target in game
CN107291317B (en) * 2016-03-31 2018-12-11 腾讯科技(深圳)有限公司 The selection method and device of target in a kind of virtual scene
CN107341139A (en) * 2017-06-30 2017-11-10 北京金山安全软件有限公司 Multimedia processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108619717A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
CN108619717B (en) Method and device for determining operation object, storage medium and electronic device
CN108211358B (en) Information display method and device, storage medium and electronic device
CN109499068B (en) Object control method and device, storage medium and electronic device
CN109481939B (en) Region adjusting method and device, storage medium and electronic device
CN111298430A (en) Virtual item control method and device, storage medium and electronic device
CN108310768B (en) Virtual scene display method and device, storage medium and electronic device
JP7325537B2 (en) Target virtual object determination method, device, terminal and computer program
CN110917621B (en) Position display method and device, storage medium and electronic device
CN111672123A (en) Control method and device of virtual operation object, storage medium and electronic equipment
CN113559507A (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN111773682B (en) Shooting direction prompting method and device, electronic equipment and storage medium
CN111265870A (en) Control method and device of virtual operation object and storage medium
CN112691366A (en) Virtual item display method, device, equipment and medium
CN108144301B (en) Virtual object information display method and device, storage medium and electronic device
CN114210065B (en) Object control method and device, storage medium and electronic equipment
CN110917620B (en) Virtual footprint display method and device, storage medium and electronic device
CN110102047B (en) Game operation processing method and device, and game effect display method and device
CN108771869B (en) Performance test method and device, storage medium and electronic device
CN111318014A (en) Image display method and apparatus, storage medium, and electronic apparatus
KR101404635B1 (en) Method for processing a drag input in online game
CN108310774B (en) Method and device for transmitting operation result, storage medium and electronic device
CN112138379B (en) Interaction method and device among different application modes and storage medium
CN113599821A (en) Method and device for displaying current blood volume of virtual character
CN111135566A (en) Control method and device of virtual prop, storage medium and electronic device
CN111111165A (en) Control method and device of virtual prop, storage medium and electronic device

Legal Events

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