Virtual object control method and device, program product and electronic equipment

By using pre-trained target network and ray detection technology to determine the target location of the AI ​​survival virtual object in competitive games, the problem of poor random arrival of the AI ​​survival virtual object is solved, reducing resource consumption and improving combat experience.

CN120132358APending Publication Date: 2025-06-13NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510518768.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In competitive games, the random arrival of AI survival virtual objects may be in empty spaces or strange terrain, resulting in the inability to effectively play with the supervisory virtual objects and reduce the player's combat experience. At the same time, simply using reinforcement learning to determine the target location leads to high consumption of computing resources and difficulty in landing.

Method used

By obtaining the current game data and inputting it into the pre-trained target network, the first primary location of the target survival virtual object is determined. Then, the radiation detection is used to determine whether the first main position meets the preset conditions. If it meets, it is determined as the target position, otherwise the optimal position will be found within the preset range. Finally, the control target survival virtual object moves to the determined target position.

Benefits of technology

Reduced resource consumption, solved the problem of high consumption of computing resources and difficulty in landing caused by reinforcement learning to determine the target location, improved the intensity and anthropomorphism of AI survival virtual objects, and improved the combat experience of players.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120132358A_ABST
    Figure CN120132358A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual object control method and device, a program product and electronic equipment, and relates to the technical field of computers. The method comprises the following steps: acquiring current game data, and inputting the current game data into a pre-trained target network to obtain a first main position of a target survival virtual object in a current game; determining a first position of a first supervision virtual object included in the current game data, and in response to the fact that a ray detection result between the first main position and the first position meets a second preset condition, determining the first main position as a target position; and controlling the target survival virtual object to move to the target position. The consumption of computing resources is reduced, and the game experience of players is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In a competitive game, there are virtual survival objects and virtual supervisor objects. The main task of the virtual survival object is to open the game gate in the shortest time to win, while the virtual supervisor object is opposed to the virtual survival object. In this competitive game, in order to avoid the virtual supervisor object having a long matching waiting time, different levels of AI need to be added to the game, and the AI ​​serves as the virtual survival object.

[0003] In a game match, when a virtual survival object is controlled by a supervising virtual object, the AI, as a survivor, will directly use rescue or randomly move to the supervision range of the supervising virtual object to buy more time to open the game gate for other virtual survival objects. However, the location where the AI ​​survival virtual object is randomly moved is likely to be an empty space or a location with strange terrain, and it is impossible to compete with the supervising virtual object, reducing the player's combat experience.

[0004] In order to solve the problem of random positions of AI survival virtual objects, related technologies directly use pure reinforcement learning to determine the target positions of AI survival virtual objects. However, due to the large number of players at different levels in the game, it consumes a huge amount of computing resources, and the method of simply using reinforcement learning to determine the target position basically remains in the theoretical stage. Summary of the invention

[0005] The present disclosure provides a virtual object method to at least to some extent solve the problems in the related art that the strength and anthropomorphism of AI survival virtual objects are insufficient, resulting in a reduced player combat experience and the difficulty and uncontrollability of using pure supervised learning to determine the target location.

[0006] According to a first aspect of the present disclosure, a virtual object control method is provided, the method comprising:

[0007] Acquire current game data, input the current game data into a pre-trained target network, and obtain a first main position of a target survival virtual object in the current game; wherein the training data of the target network is obtained based on target historical game data, the training data includes position data of the first survival virtual object in the target historical game data, and the label of the training data includes a main position determined based on a movement state of the first survival virtual object;

[0008] determining a first position of a first supervision virtual object included in the current game data, and in response to a ray detection result between the first main position and the first position meeting a second preset condition, determining the first main position as a target position;

[0009] Control the target survival virtual object to move to the target position.

[0010] According to a second aspect of the present disclosure, there is provided a virtual object control device, the device comprising:

[0011] A first main position determination module, configured to obtain current game data, input the current game data into a pre-trained target network, and obtain a first main position of a target survival virtual object in the current game; wherein, the training data of the target network is obtained based on target historical game data, the training data includes position data of a first survival virtual object in the target historical game data, and the label of the training data includes a main position determined based on the movement state of the first survival virtual object;

[0012] A target position determination module, configured to determine a first position of a first supervision virtual object included in the current game data, and in response to a ray detection result between the first main position and the first position meeting a second preset condition, determine the first main position as the target position;

[0013] A virtual object movement module, configured to control the target survival virtual object to move to the target position.

[0014] According to a third aspect of the present disclosure, there is provided a computer program product, including a computer program, which when executed by a processor implements the method of the first aspect and its possible implementation manners.

[0015] According to a fourth aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the method of the first aspect and its possible implementation manners by executing the executable instructions.

[0016] A virtual object control method provided by an embodiment of the present disclosure obtains current game data, inputs the current game data into a pre-trained target network, and obtains a first main position of a target survival virtual object in the current game; wherein, the training data of the target network is obtained based on target historical game data, the training data includes position data of a first survival virtual object in the target historical game data, and the label of the training data includes a main position determined based on the movement state of the first survival virtual object; determines a first position of a first supervision virtual object included in the current game data, and in response to the ray detection result between the first main position and the first position meeting a second preset condition, determines the first main position as the target position; controls the target survival virtual object to move to the target position. On the one hand, by obtaining the current game data and inputting the current game data into the pre-trained target network to obtain the first position of the target survival virtual object in the current game, and after obtaining the first main position of the target survival virtual object, determining the target position based on the first main position, it reduces resource consumption and solves the problems in the related art that simply using reinforcement learning to determine the target position leads to large consumption of computing resources and high difficulty in landing. On the other hand, after obtaining the first main position, rays are mutually emitted between the first main position and the first position of the first supervision virtual object. In response to the ray detection result between the first main position and the first position meeting the second preset condition, the first main position is determined as the target position. Through this ray, it is determined whether the first main position determined by the target network is the target position, improving the calculation efficiency of the target position. On the further hand, when it is determined that the first main position is the target position, controlling the target survival virtual object to move to the target position solves the problem in the related art that the AI survival virtual object is randomly located in an open space or a position with strange terrain, improving the strength and anthropomorphic degree of the AI survival virtual object and enhancing the player's combat experience. Description of the Drawings

[0017] Figure 1 A flowchart showing a virtual object control method in this exemplary embodiment;

[0018] Figure 2 A flowchart showing a method for determining the movement state of a first survival virtual object within a logical update cycle in this exemplary embodiment;

[0019] Figure 3 A flowchart showing a method for determining the main position based on the movement state of the first survival virtual object in this exemplary embodiment;

[0020] Figure 4A flowchart showing a method in the present exemplary embodiment for determining the first main position as the target position in response to the ray detection result between the first main position and the first position meeting the second preset condition;

[0021] Figure 5 A schematic diagram showing a collision point in the present exemplary embodiment;

[0022] Figure 6 A flowchart showing a virtual object control method when the ray detection result between the first main position and the first position does not meet the second preset condition in the present exemplary embodiment;

[0023] Figure 7 A schematic diagram showing a first secondary position of a target survival virtual object in the present exemplary embodiment;

[0024] Figure 8 A flowchart showing a method in the present exemplary embodiment for determining the target position based on the first collision point;

[0025] Figure 9 A schematic diagram showing the structure of a virtual object control device in the present exemplary embodiment;

[0026] Figure 10 A schematic diagram showing the structure of an electronic device in the present exemplary embodiment. Detailed implementation manners

[0027] The following will more comprehensively describe the exemplary embodiments of the present disclosure with reference to the accompanying drawings.

[0028] The accompanying drawings are schematic diagrams of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. The embodiments can be implemented in various forms and should not be construed as limited to the examples described herein. The features, structures, or characteristics described in the present disclosure can be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to give a full explanation of the embodiments of the present disclosure. However, those skilled in the art should be aware that one or more specific details can be omitted when implementing the technical solutions of the present disclosure, or other methods, components, devices, steps, etc. can be used to replace one or more specific details.

[0029] In competitive games, especially in asymmetric 1v4 games, that is, one supervising virtual object confronts four surviving virtual objects. If the number of surviving virtual objects is similar to that of the supervising virtual object, it will inevitably lead to the player controlling the supervising virtual object being unable to match the corresponding number of surviving virtual objects in a short time. Therefore, it is necessary to introduce AI into the game.

[0030] In this competitive game, when a surviving virtual object is controlled by a supervising virtual object, at least one of the remaining surviving virtual objects can utilize the detection mechanism of the supervising virtual object to prevent the supervising virtual object from moving away from the controlled surviving virtual object, thus gaining more escape time for other surviving virtual objects. However, when there are AI surviving virtual objects in the game round, when a surviving virtual object is controlled by a supervising virtual object, the AI surviving virtual object will either directly rescue or randomly go to a position within the detection range of the supervising virtual object, but this position is very likely to be an empty space or a position with strange terrain, resulting in the inability of the supervising virtual object to play against the AI surviving virtual object and reducing the player's combat experience.

[0031] In related technologies, to solve the problem that the AI surviving virtual object will randomly go to flat ground or a position with strange terrain within the detection range of the supervising virtual object, pure supervised learning and reinforcement learning are directly adopted to determine the target position for the AI surviving virtual object. However, due to the excessive number of virtual objects in the game, huge resource consumption will occur during the learning process, making the method of simply using supervised learning and reinforcement learning to determine the target position for the AI virtual object remain at the theoretical stage.

[0032] In view of the above problems, the exemplary embodiments of the present disclosure provide a virtual object control method. Refer to Figure 1 As shown, the virtual object control method may include the following steps:

[0033] Step S110. Obtain the current game data, input the current game data into a pre-trained target network, and obtain the first main position of the target surviving virtual object in the current game; wherein, the training data of the target network is obtained based on the target historical game data, the training data includes the position data of the first surviving virtual object in the target historical game data, and the label of the training data includes the main position determined based on the movement state of the first surviving virtual object.

[0034] Step S120. Determine the first position of the first supervising virtual object included in the current game data, and in response to the ray detection result between the first main position and the first position meeting the second preset condition, determine the first main position as the target position.

[0035] Step S130. Control the target survival virtual object to move to the target position.

[0036] In the above virtual object control method, obtain the current game data, input the current game data into a pre-trained target network to obtain the first main position of the target survival virtual object in the current game; wherein, the training data of the target network is obtained based on the target historical game data, the training data includes the position data of the first survival virtual object in the target historical game data, and the label of the training data includes the main position determined based on the movement state of the first survival virtual object; determine the first position of the first supervision virtual object included in the current game data, and in response to the ray detection result between the first main position and the first position meeting the second preset condition, determine the first main position as the target position; control the target survival virtual object to move to the target position. On the one hand, obtain the current game data, input the current game data into a pre-trained target network to obtain the first position of the target survival virtual object in the current game. After obtaining the first main position of the target survival virtual object, determine the target position according to the first main position, reducing resource consumption and solving the problem in the related art that simply using reinforcement learning to determine the target position results in large computational resource consumption and high landing difficulty. On the other hand, after obtaining the first main position, emit rays between the first main position and the first position of the first supervision virtual object. In response to the ray detection result between the first main position and the first position meeting the second preset condition, determine the first main position as the target position. Through this ray, determine whether the first main position determined by the target network is the target position, improving the computational efficiency of the target position. On the further hand, when determining that the first main position is the target position, control the target survival virtual object to move to the target position, solving the problem in the related art that the AI survival virtual object is randomly located in an open space or a position with strange terrain, improving the strength and anthropomorphic degree of the AI survival virtual object and enhancing the player's combat experience.

[0037] Next, steps S110 to S130 will be further explained and described.

[0038] In step S110, obtain the current game data, input the current game data into a pre-trained target network to obtain the first main position of the target survival virtual object in the current game; wherein, the training data of the target network is obtained based on the target historical game data, the training data includes the position data of the first survival virtual object in the target historical game data, and the label of the training data includes the main position determined based on the movement state of the first survival virtual object.

[0039] Among them, the current game can be a symmetric competitive game or an asymmetric competitive game, and no specific limitation is made in this exemplary embodiment. The current game data may include the position data of the survival virtual objects and the position data of the supervision virtual objects. The number of survival virtual objects may be multiple, and the number of supervision virtual objects may be 1 or multiple, and no specific limitation is made in this exemplary embodiment. The survival virtual objects may include target survival virtual objects, and the target survival virtual objects are AI survival virtual objects. The target network is a model obtained by training a supervised learning network based on target historical game data, and the training data for training the supervised learning network is obtained based on the target historical game data. The target historical game data includes the position data of the first survival virtual object that meets the first preset condition. The first survival virtual object may be an AI survival virtual object or may not be an AI survival virtual object, that is, a survival virtual object controlled by a player. The first survival virtual object is the object in the game that rescues the virtual object controlled by the first supervision virtual object. The number of the first survival virtual objects may be one or multiple, and no specific limitation is made in this exemplary embodiment. The training data includes label data, and the label data is the main position determined based on the movement state of the first survival virtual object in the target historical game data. Whether the current position of the first survival virtual object in the current game logic update cycle is the main position can be determined according to the movement situation of the first survival virtual object in the previous game logic update cycle of the current game logic update cycle and the movement situation of the first survival virtual object in the next game logic update cycle of the current game logic update cycle.

[0040] In an exemplary embodiment, the target historical game data is the game data within the target game logic update cycle that meets the first preset condition in the historical game data of the game round. Among them, the first preset condition is that within the target game logic update cycle, the distance between the position of the supervision virtual object and the position where the survival virtual object is to perform the task is less than a preset threshold; the first survival virtual object is the virtual object that completes the to-be-executed task.

[0041] Specifically, obtain the historical video data of online players in the game, and screen the historical video data of online players to obtain the target historical game data. The target historical game data includes game round data, and the game round data includes data of all virtual objects, password cracking data in the game round, virtual object interaction point data, etc. In this exemplary embodiment, the target historical game data is not specifically limited. The historical video data of online players includes multiple historical game round data. Screening the historical video data of online players, that is, screening multiple historical game round data. When screening, the game data within the target game logic update period that meets the first preset condition in the multiple historical game round data can be determined as the target historical game data. Among them, the first preset condition is that the distance between the position of the supervised virtual object and the position of the task to be executed by the survival virtual object within the target game logic update period is less than the preset threshold. The survival virtual object is a virtual object controlled by the player. The task to be executed by the survival virtual object can be that the survival virtual object rescues the controlled survival virtual object. The first survival virtual object is the virtual object that completes the task to be executed within the target game logic update period. The target game logic update period can be one game logic update period or multiple game logic update periods. One game logic update period is 1 tick, and tick is the number of times the game logic is refreshed within 1 second. The preset threshold can be 2 meters or 3 meters. In this exemplary embodiment, the preset threshold is not specifically limited.

[0042] Exemplarily, when in the historical game round data, the substitute personality 1 is the virtual object that rescues the survival virtual object controlled by the supervised virtual object, and "Kenfei" is the supervised virtual object. When the distance between the substitute personality 1 and Kenfei in this game round is 0.2 meters, which is less than the preset threshold of 2 meters, therefore, this historical game round data can be retained, and the supervised learning network can be trained based on this historical game round data.

[0043] In an exemplary embodiment, the movement state of the first survival virtual object is the movement state of the first survival virtual object within one game logic update period. Refer to Figure 2 As shown, the movement state of the first survival virtual object within one logic update period is determined in the following manner:

[0044] Step S210. Determine the first position of the first survival virtual object within one logic update period in the target historical game data;

[0045] Step S220. Obtain the second position of the first survival virtual object at the preset time before the game logic update period, and obtain the distance difference based on the first position and the second position;

[0046] Step S230. Obtain the moving speed of the first survival virtual object, and based on the moving speed and the distance difference, obtain the moving state of the first survival virtual object within one game logic update cycle.

[0047] Hereinafter, steps S210 - S230 will be further explained and described. Specifically, obtain the first position of the first survival virtual object within one game logic update cycle in the target historical game data, and the second position of the first survival virtual object at a preset time before this game logic update cycle. Based on the first position and the second position, obtain the distance difference, that is, the moving distance of the first survival virtual object within the preset time. Among them, the preset time can be 1s, and in this exemplary embodiment, the preset time is not specifically limited. After obtaining the distance difference, the moving speed of the first survival virtual object can be obtained, and based on the moving speed and the distance difference, the moving state of the first survival virtual object within one game logic update cycle can be obtained. In the game session, the moving speed of the first survival virtual object can be uniform or non-uniform, and in this exemplary embodiment, the moving speed of the first survival virtual object is not specifically limited. When and only when the inequality (1) holds, the moving state of the first survival virtual object is the fast moving state, otherwise the moving state of the first survival virtual object is the slow moving state.

[0048]

[0049] In (1), tick is how many times the 1s game logic needs to run, 1 / tick is how often the game logic runs, and speed is the moving speed of the first survival virtual object. Due to the influence of the terrain in the game, even if the first survival virtual object is in the fast moving state, it may not be able to move a distance of speed / tick in a straight line. Therefore, β is a constant set by artificial experts that is close to 1.

[0050] In one exemplary embodiment, referring to Figure 3 as shown, the label of the training data includes the main position determined based on the moving state of the first survival virtual object, specifically including:

[0051] Step S310. Determine the current position of the first survival virtual object in the target historical game data and the corresponding current game logic update cycle;

[0052] Step S320. Determine the previous game logic update cycle of the current game logic update cycle and the first moving state of the first survival virtual object within the previous game logic update cycle;

[0053] Step S330. Determine the subsequent game logic update cycle of the current game logic update cycle and the second movement state of the first survival virtual object within the subsequent game logic update cycle;

[0054] Step S340. When the first movement state is different from the second movement state, determine the current position of the first survival virtual object within the current game logic update cycle as the main position;

[0055] Step S350. Determine the main position as the label corresponding to the first survival virtual object.

[0056] Next, steps S310 - S350 will be further explained and described. Specifically, determine the current position of the first survival virtual object in the target historical game data and the current game logic update cycle in which the current position is located. After determining the current game logic update cycle, the previous game logic update cycle of the current game logic update cycle and the first movement state of the first survival virtual object within the previous game logic update cycle can be obtained. The subsequent game logic update cycle of the current game logic update cycle and the second movement state of the first survival virtual object within the subsequent game logic update cycle can also be obtained. When the first movement state is different from the second movement state, determine the current position of the first survival virtual object within the current game logic update cycle as the main position, and determine the main position as the label corresponding to the first survival virtual object.

[0057] Among them, obtaining the first movement state and the second movement state of the first survival virtual object may include: obtaining the distance difference corresponding to the previous game logic update cycle of the current game logic update cycle and the distance difference corresponding to the subsequent game logic update cycle of the current game logic update cycle, and determining whether the current position of the first survival virtual object is the main position according to the distance difference corresponding to the previous game logic update cycle and the distance difference corresponding to the subsequent game logic update cycle. Among them, the game logic update cycle is tick, and the distance difference is D, then the calculation results shown in Table 1 can be obtained:

[0058] Table 1 Distance differences corresponding to the game logic update cycle

[0059] Current tick Tick 1 Tick 2 Tick 3 … Tick n Distance difference <![CDATA[D 1 > <![CDATA[D 2 > <![CDATA[D 3 > … <![CDATA[D n >

[0060] When the current game logic update cycle is tick2, the movement state of the first survival virtual object in tick1 can be calculated according to the distance difference D in the previous game logic update cycle tick1 1 , and the movement state of the first survival virtual object in tick1 can be calculated according to the distance difference D in the subsequent game logic update cycle tick3 3, calculate the movement state of the first survival virtual object in this tick3. When calculating the movement state based on the distance difference, it can be determined according to the inequality . When the inequality (1) holds, the movement state of the first survival virtual object is the fast movement state; otherwise, the movement state of the first survival virtual object is the slow movement state. If the movement state of the first survival virtual object in the previous game logic update cycle tick1 is the fast movement state, and the movement state of the first survival virtual object in the subsequent game logic update cycle tick3 is the slow movement state, at this time, it is determined that in the current game logic update cycle, the current position of the first survival virtual object is the main position.

[0061] After obtaining the label corresponding to the current position, the label can be input into the supervised learning network to train the supervised learning network to obtain the target network. Before inputting the current game data into the pre-trained target network, the method further includes:

[0062] Obtain the third position of the second survival virtual object and the fourth position of the second supervision virtual object in the current game logic update cycle included in the target historical game data;

[0063] Based on the third position, the fourth position, the current position, and the label of the current position, train the supervised learning network to obtain the target network.

[0064] Specifically, obtain the third position of the second survival virtual object and the fourth position of the second supervision virtual object in the current game logic update cycle included in the target historical game data. The second survival virtual object is a survival virtual object other than the survival virtual object controlled by the second supervision virtual object and the first survival virtual object in the game session. The number of the second survival virtual objects can be one or more. In this exemplary embodiment, the number of the second survival virtual objects is not specifically limited.

[0065] After obtaining the third position and the fourth position, it is also possible to obtain the password cracking data and the interaction point data of the virtual object in the current game logic update cycle, and input the third position, the fourth position, the current position, the label of the current position, the password cracking data, and the interaction point data into the supervised learning network to train the supervised learning network to obtain the target network. Among them, the password cracking data can be the progress of the password machine cracking in the current game logic update cycle, and the interaction point data can be whether each interaction point is damaged in the current game logic update cycle.

[0066] In an exemplary embodiment, after obtaining the target network, the current game data can be input into the pre-trained target network to obtain the first main position of the target survival virtual object in the current game.

[0067] Continue to refer to Figure 1 As shown, in step S120, determine the first position of the first supervised virtual object included in the current game data. In response to the ray detection result between the first main position and the first position meeting the second preset condition, determine the first main position as the target position.

[0068] Among them, after obtaining the first main position of the target survival virtual object, since this first main position is not necessarily the optimal position of the target survival virtual object, it is necessary to further judge this first main position to determine whether it is the optimal position. When the first main position is the optimal position, determine the first main position as the target position and control the target survival virtual object to move to this optimal position. When the first main position is not the optimal position, it is necessary to find the optimal position for the target survival virtual object again. During the actual game process, the current game data can be obtained. After obtaining the current game data, the first position of the first supervised virtual object included in the current game data can be obtained, and based on the first position of the first supervised virtual object and the first main position of the target survival virtual object, determine whether the first main position is the target position.

[0069] Judging whether the first main position is the optimal position may include: obtaining the first position of the first supervised virtual object in the current game, performing double-ray detection between the first main position and the first position, and determining whether the first main position of the target survival virtual object is the optimal position based on the double-ray detection result.

[0070] In an exemplary embodiment, refer to Figure 4 As shown, the step of determining the first main position as the target position in response to the ray detection result between the first main position and the first position meeting the second preset condition includes:

[0071] Step S410. Send a ray from the first main position to the first position to obtain a first collision point;

[0072] Step S420. Send a ray from the first position to the first main position to obtain a second collision point;

[0073] Step S430. When the first distance between the first collision point and the second collision point is less than the preset distance, determine the first main position as the target position.

[0074] The following will further explain and illustrate steps S410 - S430. Specifically, a ray is sent from the first main position of the target survival virtual object to the first position of the first supervision virtual object to obtain the first collision point A. Here, the first collision point is the collision point between the ray and the virtual model when the ray is blocked by other virtual models in the game scene. The virtual model can be a building model in the game scene or a plant model in the game scene, and no specific limitation is made in this exemplary embodiment; a ray is sent from the first position of the first supervision virtual object to the first main position of the target survival virtual object to obtain the second collision point B. Here, the second collision point is the collision point between the ray and the virtual model when the ray is blocked by other virtual models in the game scene. The virtual model can be a building model in the game scene or a plant model in the game scene, and no specific limitation is made in this exemplary embodiment. Calculate the first distance between the first collision point A and the second collision point B. When this first distance is less than the preset distance, determine the first main position of the target survival virtual object as the optimal position, that is, this first main position is the target position. When the first distance between collision point A and collision point B is greater than the preset distance, it means that there are multiple layers of collisions between the target survival virtual object and the first supervision virtual object, that is, the first main position of the target survival virtual object is not the optimal position, and other optimal positions need to be found. The preset distance can be 1 meter, and no specific limitation is made to this preset distance in this exemplary embodiment.

[0075] Exemplarily, referring to Figure 5 As shown, when sending a ray from the first main position to the first position, the collision point A is the collision point closer to the target survival virtual object on the target survival virtual object side. When sending a ray from the first position to the first main position, the collision point B is the collision point closer to the first supervision virtual object on the first supervision virtual object side.

[0076] In one exemplary embodiment, referring to Figure 6 As shown, when the ray detection result between the first main position and the first position does not meet the second preset condition, the method further includes:

[0077] Step S610. With the first main position as the center, determine a circumference corresponding to the first main position with a preset length as the radius;

[0078] Step S620. Based on a preset angular interval, determine a plurality of first secondary positions to be traversed on the circumference;

[0079] Step S630. In response to the ray detection result between the traversed first secondary position and the first position meeting the second preset condition, determine the first secondary position as the target position.

[0080] The following will further explain and illustrate steps S610 - S630. Specifically, when the first distance between collision point A and collision point B is not less than the preset distance, the first secondary position of the target survival virtual object can be determined based on this first primary position. When determining the first secondary position, a circle corresponding to the first primary position can be determined with the first primary position of the target survival virtual object as the center and a preset length as the radius. After determining the circle, a plurality of first secondary positions to be traversed are determined in this circle based on a preset angular interval. Among them, the preset angle can be 45 degrees or 60 degrees. In this exemplary embodiment, the preset angle is not specifically limited. After obtaining the first secondary position, double-ray detection can be performed between the first secondary position and the first position. In response to the ray detection result between the traversed first secondary position and the first position meeting the second preset condition, this first secondary position is determined as the target position. That is, when a ray is emitted from the first secondary position to the first position to obtain a third collision point, and a ray is sent from the first position to the first secondary position to obtain a fourth collision point, when the distance between the third collision point and the fourth collision point meets the second preset condition, this first secondary position is determined as the target position. Among them, the second preset condition is that the distance between the third collision point and the fourth collision point is less than the preset distance. Among them, the preset distance can be 1 meter. In this exemplary embodiment, the preset distance is not specifically limited.

[0081] Exemplarily, when the first primary position of the target survival virtual object is not the optimal position, a circle can be determined with the first primary position of the target survival virtual object as the center and a radius of 2. Points at intervals of 45 degrees in this circle are used as the first secondary positions, and the first secondary positions are as Figure 7 shown.

[0082] In one exemplary embodiment, the method further includes:

[0083] If the ray detection results between the plurality of first secondary positions and the first position do not meet the second preset condition, obtain the first collision point when a ray is sent from the first primary position to the first position, and determine the target position based on the first collision point.

[0084] Specifically, when the distance between the third collision point obtained by emitting a ray from the first secondary position to the first position and the fourth collision point obtained by emitting a ray from the first position to the first secondary position is not less than a preset distance, it indicates that there are multiple layers of collisions between the target survival virtual object and the first supervision virtual object, and there is no optimal position in the first secondary position. Therefore, it is necessary to move the target survival virtual object to a new position, and determine the target position for the target survival virtual object based on the new position. When moving the target survival virtual object to the new position, the first collision point when emitting a ray from the first main position to the first position can be obtained, and this first collision point can be used as the new position of the target survival virtual object, and the target position can be determined for the target survival virtual object based on the position where this first collision point is located.

[0085] In an exemplary embodiment, referring to Figure 8 as shown, determining the target position based on the first collision point includes:

[0086] Step S810. Obtain a preset range centered on the first collision point, determine a fifth position that the target survival virtual object can reach within the preset range, and control the target survival virtual object to move to the fifth position;

[0087] Step S820. In response to the ray detection result between the fifth position and the first position meeting the second preset condition, determine the fifth position as the target position.

[0088] Hereinafter, steps S810 and S820 will be further explained and described. Specifically, taking the first collision point as the center and a preset value as the radius, obtain the preset range of the first collision point. Within this preset range, the engine interface can be called to determine the fifth position that the target survival virtual object can reach within this preset range. After determining the fifth position, control the target survival virtual object to move to this fifth position. After the target survival virtual object moves to the fifth position, this fifth position can be determined as the main position of the target survival virtual object. At this main position, determine whether this fifth position is the target position based on double-ray detection. When this fifth position is not the target position, taking this fifth position as the center, determine the corresponding circumference for this fifth position, determine the second secondary position within this circumference, and perform double-ray detection based on the second secondary position to determine the target position. The double-ray detection method and the method for determining the secondary position have been described in detail in the above embodiments, and will not be explained here.

[0089] Continuing to refer to Figure 1 , in step S130, control the target survival virtual object to move to the target position.

[0090] After determining the target position of the target survival virtual object, control is performed to move the target survival virtual object to the target position, so that the target survival virtual object plays a game with the first supervision virtual object, improving the player's combat experience.

[0091] The virtual object control method provided by the exemplary embodiment of the present disclosure has at least the following advantages: On the one hand, the current game data is obtained, and the current game data is input into the pre-trained target network to obtain the first position of the target survival virtual object in the current game. After obtaining the first main position of the target survival virtual object, the target position is determined according to the first main position, reducing resource consumption and solving the problem in the related art that simply using reinforcement learning to determine the target position leads to large consumption of computing resources and great difficulty in landing; On the other hand, after obtaining the first main position, rays are mutually emitted between the first main position and the first position of the first supervision virtual object. In response to the ray detection result between the first main position and the first position meeting the second preset condition, the first main position is determined as the target position. Through this ray, it is determined whether the first main position determined by the target network is the target position, improving the calculation efficiency of the target position; On the further hand, when it is determined that the first main position is the target position, control is performed to move the target survival virtual object to the target position, solving the problem in the related art that the AI survival virtual object is randomly located in an open space or a position with strange terrain, improving the strength and anthropomorphic degree of the AI survival virtual object, and improving the player's combat experience.

[0092] The exemplary embodiment of the present disclosure also provides a virtual object control device. Refer to Figure 9 As shown, the virtual object control device includes the following:

[0093] The first main position determination module 910 is configured to obtain the current game data and input the current game data into the pre-trained target network to obtain the first main position of the target survival virtual object in the current game; wherein, the training data of the target network is obtained based on the target historical game data, the training data includes the position data of the first survival virtual object in the target historical game data, and the label of the training data includes the main position determined based on the movement state of the first survival virtual object.

[0094] The target position determination module 920 is configured to determine the first position of the first supervision virtual object included in the current game data, and in response to the ray detection result between the first main position and the first position meeting the second preset condition, determine the first main position as the target position.

[0095] The virtual object movement module 930 is configured to control the target survival virtual object to move to the target position.

[0096] In an exemplary embodiment, the target historical game data is the game data within the target game logic update period that meets the first preset condition in the historical game data of the game session, where the first preset condition is that within the target game logic update period, the distance between the position of the supervision virtual object and the position where the survival virtual object is to perform a task is less than a preset threshold; the first survival virtual object is the virtual object that has completed the to-be-executed task.

[0097] In an exemplary embodiment, the movement state of the first survival virtual object is the movement state of the first survival virtual object within one logic update period;

[0098] The movement state of the first survival virtual object within one logic update period is determined in the following manner:

[0099] Determine the first position of the first survival virtual object in the target historical game data within one game logic update period;

[0100] Obtain the second position of the first survival virtual object at a preset time before the game logic update period, and obtain the distance difference based on the first position and the second position;

[0101] Obtain the movement speed of the first survival virtual object, and obtain the movement state of the first survival virtual object within one game logic update period based on the movement speed and the distance difference.

[0102] In an exemplary embodiment, the label of the training data includes the main position determined based on the movement state of the first survival virtual object, specifically including:

[0103] Determine the current position of the first survival virtual object in the target historical game data and the corresponding current game logic update period;

[0104] Determine the previous game logic update period of the current game logic update period and the first movement state of the first survival virtual object within the previous game logic update period;

[0105] Determine the next game logic update period of the current game logic update period and the second movement state of the first survival virtual object within the next game logic update period;

[0106] When the first movement state is different from the second movement state, determine the current position of the first survival virtual object within the current game logic update period as the main position;

[0107] Determine the main position as the label corresponding to the first survival virtual object.

[0108] In an exemplary embodiment, the target position determination module includes:

[0109] A first collision point determination module, configured to send a ray from the first main position to the first position to obtain a first collision point;

[0110] A second collision point determination module, configured to send a ray from the first position to the first main position to obtain a second collision point;

[0111] A first distance judgment module, configured to determine the first main position as the target position when a first distance between the first collision point and the second collision point is less than a preset distance.

[0112] In an exemplary embodiment, the target position determination module includes:

[0113] A circumference determination module, configured to determine a circumference corresponding to the first main position with the first main position as the center and a preset length as the radius;

[0114] A slave position determination module, configured to determine a plurality of first slave positions to be traversed in the circumference based on a preset angular interval;

[0115] A second distance judgment module, configured to determine the first slave position as the target position in response to a ray detection result between the traversed first slave position and the first position meeting a second preset condition.

[0116] In an exemplary embodiment, the target position determination module includes:

[0117] A new position determination module, configured to, if ray detection results between the plurality of first slave positions and the first position do not meet the second preset condition, obtain a first collision point when sending a ray from the first main position to the first position, and determine the target position based on the first collision point.

[0118] In an exemplary embodiment, the new position determination module includes:

[0119] A fifth position determination module, configured to obtain a preset range with the first collision point as the center point, determine a fifth position that the target survival virtual object can reach within the preset range, and control the target survival virtual object to move to the fifth position;

[0120] A second target position determination module, configured to determine the fifth position as the target position in response to a ray detection result between the fifth position and the first position meeting the second preset condition.

[0121] The specific details of each part in the above device have been described in detail in the embodiments of the method part. For the details not disclosed, reference can be made to the content of the embodiments in the method part, so they will not be elaborated here.

[0122] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0123] In addition, although the steps of the method in the present invention are described in a specific order in the drawings, this does not require or imply that these steps must be executed in this specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution, etc.

[0124] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.

[0125] Those skilled in the art to which the present invention pertains can understand that various aspects of the present invention can be implemented as a system, method, or program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuitry", "module", or "system" here.

[0126] Next, refer to Figure 10 to describe the electronic device 1000 according to this embodiment of the present invention. Figure 10 The electronic device 1000 shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.

[0127] As Figure 10 shown, the electronic device 1000 is presented in the form of a general-purpose computing device. The components of the electronic device 1000 may include but are not limited to: at least one of the above processing units 1010, at least one of the above storage units 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.

[0128] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section of the present specification above. For example, the processing unit 1010 can execute as Figure 1 the steps S110 shown in: obtain current game data, input the current game data into a pre-trained target network, and obtain a first main position of a target survival virtual object in the current game; wherein, the training data of the target network is obtained based on target historical game data, the training data includes the position data of a first survival virtual object in the target historical game data, and the label of the training data includes the main position determined based on the movement state of the first survival virtual object; S120: determine a first position of a first supervision virtual object included in the current game data, and in response to the ray detection result between the first main position and the first position meeting a second preset condition, determine the first main position as the target position; S130: control the target survival virtual object to move to the target position.

[0129] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202, and may further include a read-only storage unit (ROM) 10203.

[0130] The storage unit 1020 may further include a program / utilities 10204 having a set (at least one) of program modules 10205. Such program modules 10205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0131] The bus 1030 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.

[0132] The electronic device 1000 can also communicate with one or more external devices 1100 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 1050. Moreover, the electronic device 1000 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 1060. As shown in the figure, the network adapter 1060 communicates with other modules of the electronic device 1000 through the bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, etc.

[0133] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by the way of software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present invention.

[0134] In an exemplary embodiment of the present invention, there is also provided a computer-readable storage medium, on which a program product capable of implementing the above method of this specification is stored. In some possible implementation manners, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification.

[0135] A program product for implementing the above method according to an embodiment of the present invention may be a portable compact disc read-only memory (CD-ROM), include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0136] The program product may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but not be limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0137] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0138] The program code contained on the readable medium may be transmitted by any appropriate medium, including but not limited to wireless, wired, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.

[0139] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).

[0140] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, rather than for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes can be executed, for example, synchronously or asynchronously in multiple modules.

[0141] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include the known common general knowledge or conventional technical means in the technical field of the present invention that are not invented by the present invention. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the claims.

Claims

1. A virtual object control method, characterized in that: include: Acquire current game data, input the current game data into a pre-trained target network, and obtain a first main position of a target survival virtual object in the current game; wherein the training data of the target network is obtained based on target historical game data, the training data includes position data of the first survival virtual object in the target historical game data, and the label of the training data includes a main position determined based on a movement state of the first survival virtual object; determining a first position of a first supervision virtual object included in the current game data, and in response to a ray detection result between the first main position and the first position meeting a second preset condition, determining the first main position as a target position; Control the target survival virtual object to move to the target position.

2. The method according to claim 1, characterized in that The target historical game data is game data within a target game logic update cycle that meets a first preset condition in the historical game data, wherein the first preset condition is that within the target game logic update cycle, the distance between the position of the supervision virtual object and the position of the survival virtual object to perform the task is less than a preset threshold; and the first survival virtual object is a virtual object that completes the task to be performed.

3. The method according to claim 1, characterized in that The movement state of the first survival virtual object is the movement state of the first survival virtual object within a logical update cycle; The movement state of the first survival virtual object in a logical update cycle is determined in the following manner: Determine a first position of a first survival virtual object in the target historical game data within a game logic update cycle; Acquire a second position of the first survival virtual object at a preset time before the game logic update cycle, and obtain a distance difference according to the first position and the second position; The moving speed of the first survival virtual object is obtained, and the moving state of the first survival virtual object within a game logic update cycle is obtained according to the moving speed and the distance difference.

4. The method according to claim 3, characterized in that The label of the training data includes a main position determined based on the movement state of the first survival virtual object, specifically including: Determine a current position of a first survival virtual object in the target historical game data and a current game logic update cycle corresponding to the current position; Determine a previous game logic update cycle of the current game logic update cycle and a first movement state of the first survival virtual object in the previous game logic update cycle; Determine a subsequent game logic update cycle of the current game logic update cycle and a second movement state of the first survival virtual object in the subsequent game logic update cycle; When the first moving state is different from the second moving state, determining the current position of the first survival virtual object in the current game logic update cycle as the main position; The main position is determined as a label corresponding to the first survival virtual object.

5. The method according to claim 1, characterized in that: In response to the ray detection result between the first main position and the first position meeting a second preset condition, determining the first main position as a target position includes: Sending a ray from the first main position to the first position to obtain a first collision point; Send a ray from the first position to the first main position to obtain a second collision point; When a first distance between the first collision point and the second collision point is less than a preset distance, the first main position is determined to be a target position.

6. The method according to claim 5, characterized in that When the ray detection result between the first main position and the first position does not meet the second preset condition, the method further includes: Taking the first main position as the center and a preset length as the radius, determine a circumference corresponding to the first main position; determining a plurality of first slave positions to be traversed in the circle based on preset angular intervals; In response to a ray detection result between the traversed first slave position and the first position meeting a second preset condition, the first slave position is determined to be a target position.

7. The method according to claim 6, characterized in that The method further comprises: If the ray detection results between the multiple first slave positions and the first position do not meet the second preset condition, a first collision point when sending rays from the first master position to the first position is obtained, and the target position is determined based on the first collision point.

8. The method according to claim 7, characterized in that The determining the target position based on the first collision point includes: Acquire a preset range with the first collision point as the center point, determine a fifth position that the target survival virtual object can reach within the preset range, and control the target survival virtual object to move to the fifth position; In response to the ray detection result between the fifth position and the first position meeting the second preset condition, the fifth position is determined to be the target position.

9. A virtual object control device, characterized in that: include: A first main position determination module is used to obtain current game data, input the current game data into a pre-trained target network, and obtain a first main position of a target survival virtual object in the current game; wherein the training data of the target network is obtained based on target historical game data, the training data includes position data of the first survival virtual object in the target historical game data, and the label of the training data includes a main position determined based on a movement state of the first survival virtual object; a target position determination module, configured to determine a first position of a first supervision virtual object included in the current game data, and in response to a ray detection result between the first main position and the first position meeting a second preset condition, determine the first main position as a target position; The virtual object moving module is used to control the target survival virtual object to move to the target position.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 8 by executing the executable instructions.