A game assistance method, device, equipment and storage medium
By detecting whether the virtual character is facing and close to the resource search area and judging its access status, the problem of virtual characters repeatedly entering the same resource search area in a virtual shooting game is solved, and the effect of saving time and improving the game experience is achieved.
Patent Information
- Application Number
- CN202110401693.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-14
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-04-14
AI Technical Summary
In virtual shooting games, due to the dense distribution of resource search areas, virtual characters of players are prone to repeat the same resource search areas, wasting time and energy and reducing the gaming experience.
By detecting whether the virtual character controlled by the player is facing and close to the resource search area and judging its access status, if the same resource search area is repeatedly accessed, prompt information is generated to avoid repeated entry.
It effectively avoids player virtual characters from repeatedly entering the same resource search area, saving game time and energy and improving game experience.
Smart Images

Figure CN115193040B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of Artificial Intelligence (AI), and in particular, to a game assistance method, device, equipment, and storage medium. Background Art
[0002] Nowadays, various virtual shooting games are emerging on the Internet. Typical examples include First-person shooting games (FPS), Third-person shooting games (TPS), etc., which are deeply loved by a large number of players. Among them, some virtual shooting games will set up resource search areas (such as building areas) with equipment and supplies in their game scenes. Players can control virtual characters to enter the resource search areas in the early stage of the game to collect the required equipment and supplies.
[0003] However, since there are usually many resource search areas set in the game scene, and some resource search areas are very densely distributed in some areas, as a result, it is very easy for players to control virtual characters to repeatedly enter the same resource search area during the game process. For players, this is a great waste of game time and energy, and the game experience is poor. Summary of the Invention
[0004] Embodiments of this application provide a game assistance method, device, equipment, and storage medium, which can detect whether the virtual character controlled by the player repeatedly enters the same resource search area and give corresponding prompts, thereby improving the player's game experience.
[0005] In view of this, a first aspect of this application provides a game assistance method, and the method includes:
[0006] Obtain the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene;
[0007] For a candidate resource search area in a candidate area in the game scene, determine a facing judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle; the facing judgment result is used to represent whether the target virtual character faces the candidate resource search area;
[0008] For the candidate resource search area within the candidate area, determine the position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period; the position judgment result is used to represent whether the target virtual character is approaching the candidate resource search area.
[0009] For the candidate resource search area within the candidate area, judge whether the target virtual character returns to the candidate resource search area according to the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area, and the access status of the target virtual character to the candidate resource search area; if so, generate a target prompt message, and the target prompt message is used to prompt that the target virtual character has visited the candidate resource search area.
[0010] The second aspect of the present application provides a game assistance device, and the device includes:
[0011] An information acquisition module, configured to acquire the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene;
[0012] An orientation judgment module, configured to determine the orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle for the candidate resource search area within the candidate area in the game scene; the orientation judgment result is used to represent whether the target virtual character is facing the candidate resource search area;
[0013] A position judgment module, configured to determine the position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period for the candidate resource search area within the candidate area; the position judgment result is used to represent whether the target virtual character is approaching the candidate resource search area;
[0014] A return prompt module, configured to judge whether the target virtual character returns to the candidate resource search area according to the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area, and the access status of the target virtual character to the candidate resource search area for the candidate resource search area within the candidate area; if so, generate a target prompt message, and the target prompt message is used to prompt that the target virtual character has visited the candidate resource search area.
[0015] The third aspect of the present application provides a device, which includes a processor and a memory:
[0016] The memory is used to store a computer program;
[0017] The processor is used to execute the steps of the game assistance method described in the first aspect above according to the computer program.
[0018] The fourth aspect of the present application provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the steps of the game assistance method described in the first aspect above.
[0019] The fifth aspect of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the game assistance method described in the first aspect above.
[0020] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0021] The embodiment of the present application provides a game assistance method, which innovatively proposes a mechanism for detecting whether a virtual character controlled by a player repeatedly accesses the same resource search area, and gives a corresponding prompt when it is detected that the virtual character returns to a certain resource search area. Specifically, in the game assistance method provided by the embodiment of the present application, first obtain the target position and target orientation angle of the target virtual character in the game scene; then, for the candidate resource search areas in the candidate areas in the game scene, determine the orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the above target position and target orientation angle, and the orientation judgment result can represent whether the target virtual character faces the candidate resource search area; and determine the position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period, and the position judgment result can represent whether the target virtual character approaches the candidate resource search area; furthermore, judge whether the target virtual character is about to return to the candidate resource search area according to the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area and the access state of the target virtual character to the candidate resource search area; if so, generate a target prompt message to prompt that the target virtual character has accessed the candidate resource search area. The above game assistance method comprehensively considers factors such as whether the virtual character faces the resource search area, whether the virtual character is approaching the resource search area, and whether the virtual character has accessed the resource search area before, detects whether the virtual character is currently going to access a resource search area that it has accessed before, and gives relevant prompt information when it is detected that the virtual character is currently going to access a resource search area that it has accessed before; in this way, it is avoided that the player controls the virtual character to repeatedly enter the same resource search area, saving the player's game time and energy and improving the player's game experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a schematic diagram of an application scenario of the game assistance method provided by the embodiment of the present application;
[0023] Figure 2 is a schematic flowchart of the game assistance method provided by the embodiment of the present application;
[0024] Figure 3 is a schematic diagram of an auxiliary function selection interface provided by the embodiment of the present application;
[0025] Figure 4 is a schematic diagram of an implementation manner of an extended candidate matching area provided by the embodiment of the present application;
[0026] Figure 5Schematic diagram of the shooting game interface provided by the embodiment of the present application;
[0027] Figure 6 Schematic diagram of the house area marking process provided by the embodiment of the present application;
[0028] Figure 7 Target scene map with the house area marked by a rectangular frame provided by the embodiment of the present application;
[0029] Figure 8 Schematic diagram of the implementation process for determining the orientation judgment result provided by the embodiment of the present application;
[0030] Figure 9 Schematic diagram of the conversion relationship between five access states provided by the embodiment of the present application;
[0031] Figure 10 Schematic diagram of the overall process for identifying the virtual character's return to the house area provided by the embodiment of the present application;
[0032] Figure 11 Schematic diagram of the implementation process for real-time determining the position of the virtual character in the game scene provided by the embodiment of the present application;
[0033] Figure 12 Schematic diagram of the structure of the first game auxiliary device provided by the embodiment of the present application;
[0034] Figure 13 Schematic diagram of the structure of the second game auxiliary device provided by the embodiment of the present application;
[0035] Figure 14 Schematic diagram of the structure of the third game auxiliary device provided by the embodiment of the present application;
[0036] Figure 15 Schematic diagram of the structure of the fourth game auxiliary device provided by the embodiment of the present application;
[0037] Figure 16 Schematic diagram of the structure of the terminal device provided by the embodiment of the present application;
[0038] Figure 17 Schematic diagram of the structure of the server provided by the embodiment of the present application. Detailed implementation manners
[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.
[0040] The terms "first", "second", "third", "fourth", etc. (if any) in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0041] Artificial Intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning and decision-making.
[0042] Computer Vision Technology (CV) is a science that studies how to enable machines to "see". Further, it refers to using cameras and computers to replace human eyes to perform machine vision such as target recognition and measurement on targets, and further perform graphic processing to make the computer process the images into images that are more suitable for human eyes to observe or be transmitted to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies and attempts to establish artificial intelligence systems that can obtain information from images or multi-dimensional data. Computer vision technology usually includes technologies such as image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, etc., and also includes common biometric recognition technologies such as face recognition and fingerprint recognition.
[0043] The solution provided by the embodiments of this application relates to the computer vision technology of artificial intelligence, and is specifically illustrated through the following embodiments:
[0044] In some virtual shooting games, players usually need to control virtual characters to enter the resource search areas in the game scene to collect the required equipment and supplies. However, since there are usually many resource search areas set in the game scene, and the distribution of resource search areas in some areas is very dense, it is easy to cause players to control virtual characters to repeatedly enter the same resource search area during the game process, which will waste the players' game time and energy and reduce the players' game experience.
[0045] In view of the above problems, the embodiments of the present application provide a game assistance method, which can detect whether the virtual character controlled by the player is about to return to a resource search area that the player has visited before, and give a corresponding prompt when it is detected that the virtual character is about to return to a resource search area that the player has visited before, so as to prevent the player from controlling the virtual character to repeatedly visit the same resource search area.
[0046] Specifically, in the game assistance method provided by the embodiments of the present application, first, the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene are obtained. Then, for the candidate resource search areas in the candidate area of the game scene, according to the position of the candidate resource search area, the above target position and target orientation angle, a facing judgment result of the target virtual character relative to the candidate resource search area is determined, and the facing judgment result is used to represent whether the target virtual character is facing the candidate resource search area; and, for the candidate resource search areas in the candidate area, according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period, a position judgment result of the target virtual character relative to the candidate resource search area is determined, and the position judgment result is used to represent whether the target virtual character is approaching the candidate resource search area. Furthermore, for the candidate resource search areas in the candidate area, according to the facing judgment result and position judgment result of the target virtual character relative to the candidate resource search area, and the access status of the target virtual character to the candidate resource search area, it is judged whether the target virtual character is about to return to the candidate resource search area; if so, a target prompt message is generated, and the target prompt message is used to prompt that the target virtual character has visited the candidate resource search area.
[0047] The above game assistance method innovatively proposes a mechanism for detecting whether a virtual character controlled by a player is about to repeatedly access the same resource search area, and gives corresponding prompts when it is detected that the target virtual character is about to return to a certain resource search area. Specifically, the game assistance method can comprehensively consider factors such as whether the virtual character is facing the resource search area, whether the virtual character is approaching the resource search area, and whether the virtual character has accessed the resource search area before, to detect whether the virtual character is currently about to access a resource search area that it has accessed before, and give relevant prompt information when it is detected that the virtual character is currently about to access a resource search area that it has accessed before. Thus, it can prevent the virtual character controlled by the player from repeatedly entering the same resource search area, save the player's game time and energy, and improve the player's game experience.
[0048] It should be understood that the game assistance method provided by the embodiments of the present application can be applied to devices with data processing capabilities, such as terminal devices or servers. Among them, the terminal device can specifically be a smart phone, a computer, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), a vehicle-mounted terminal, etc.; the server can specifically be an application server or a Web server. In actual deployment, it can be an independent server, or a cluster server or a cloud server.
[0049] To facilitate the understanding of the game assistance method provided by the embodiments of the present application, the application scenario of the game assistance method will be exemplarily introduced below by taking the execution entity of the game assistance method as the server.
[0050] See Figure 1 , Figure 1 which is a schematic diagram of the application scenario of the game assistance method provided by the embodiments of the present application. As Figure 1 shown, this application scenario includes a terminal device 110 and a server 120, and the terminal device 110 and the server 120 can communicate through a network. Among them, a shooting game application (Application, APP) and a game accelerator APP are running on the terminal device 110, and the game accelerator APP can provide game assistance functions for the shooting game APP, such as a reminder function for returning to the resource search area. The server 120 is the background server of the game accelerator APP, and is used to execute the game assistance method provided by the embodiments of the present application.
[0051] In practical applications, players can use the game accelerator APP running on the terminal device 110 to launch the shooting game APP, and then play the shooting game through the shooting game APP. During the process of the player playing the shooting game, the game accelerator APP will control the terminal device 110 to turn on the screen recording function to record the game process, and control the terminal device 110 to transmit the screen recording video obtained by recording the game process to the server 120 in real time through the network, so that the server 120 can detect whether the target virtual character controlled by the player is going to repeatedly access the same resource search area based on the screen recording video.
[0052] After the server 120 obtains the screen recording video transmitted by the terminal device 110, it can capture screenshots of the game interface from the screen recording video, and then based on the captured screenshots of the game interface, detect the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene.
[0053] For the candidate resource search areas within the candidate areas in the game scene, the server 120 can determine whether the target virtual character is facing the candidate resource search area according to the position of the candidate resource search area, the target position where the target virtual character is located, and the target orientation angle of the target virtual character, and accordingly generate an orientation judgment result of the target virtual character relative to the candidate resource search area. For the candidate resource search areas within the candidate areas, the server 120 can also determine whether the target virtual character is approaching the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period, and accordingly generate a position judgment result of the target virtual character relative to the candidate resource search area.
[0054] Furthermore, for the candidate resource search areas within the candidate areas, the server 120 can determine whether the target virtual character is going to return to the candidate resource search area currently according to the orientation judgment result and the position judgment result of the target virtual character relative to the candidate resource search area, and the access status of the target virtual character to the candidate resource search area; the access status of the target virtual character to the candidate resource search area here can represent whether the target virtual character has accessed the candidate resource search area before. If it is determined that the target virtual character is going to return to the candidate resource search area currently, the server 120 can generate a target prompt message and send the target prompt message to the terminal device 110 through the network to prompt the player that the target virtual character has accessed the candidate resource search area before, so as to prevent the player from controlling the target virtual character to repeatedly access the same resource search area.
[0055] It should be understood that Figure 1The application scenarios shown are only examples. In actual applications, the game assistance method provided by the embodiments of the present application can also be executed by the background server of the shooting game APP, or can also be executed by the shooting game APP or the game accelerator APP in the terminal device 110. No limitations are imposed on the application scenarios of the game assistance method provided by the embodiments of the present application here.
[0056] The game assistance method provided by the present application will be introduced in detail below through method embodiments.
[0057] See Figure 2 , Figure 2 which is a schematic flowchart of the game assistance method provided by the embodiments of the present application. For ease of description, the following embodiments will still be introduced by taking the execution subject of the game assistance method as the server as an example. As Figure 2 shown, the game assistance method includes the following steps:
[0058] Step 201: Obtain the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene.
[0059] If the player enables the reminder function for returning to the resource search area for a certain shooting game APP, then the server needs to obtain, in real time, the position of the target virtual character controlled by the player in the game scene as the target position and the orientation angle of the target virtual character in the game scene as the target orientation angle during the process of the player playing the game through the shooting game APP. In the embodiments of the present application, the resource search area is an area in the game scene for storing game equipment resources (such as drugs, protective equipment, etc.), and the resource search area can specifically be manifested as a housing area.
[0060] In a possible implementation manner, the execution subject of the game assistance method provided by the embodiments of the present application can be the background server of the shooting game APP. Since the background server of the shooting game APP usually records the positions and orientation angles of each virtual character in the game scene during the game process, the background server can directly obtain the target position and the target orientation angle of the target virtual character in the game scene currently.
[0061] In another possible implementation, the execution subject of the game assistance method provided by the embodiments of the present application may be the background server of the game accelerator APP. The game accelerator APP is an APP used to provide game assistance functions for specific games; for example, the game accelerator APP may be an APP used to provide game assistance functions for shooting games supported by the target shooting game APP. When the game accelerator APP and the target shooting game APP are running on the terminal device at the same time, if the player chooses to launch the target shooting game APP through the game accelerator APP, then the game accelerator APP may provide relevant game assistance functions during the process of the player playing the shooting game through the target shooting game APP, such as the reminder function of returning to the room area, the enemy situation reminder function, the reminder function of the plane taking off, and so on.
[0062] It should be understood that the game assistance functions provided by the game accelerator APP to the player can be independently selected by the player. For example, the game accelerator APP may provide several candidate game assistance functions for the player, and the player can select the game assistance functions he needs from several candidate game assistance functions on the assistance function selection interface of the game accelerator APP according to his actual needs. Figure 3 For a schematic diagram of an exemplary assistance function selection interface, as Figure 3 shown, the player can choose whether to use the candidate game assistance function by adjusting the switch corresponding to the candidate game assistance function; in the technical solution provided by the embodiments of the present application, if the player turns on the switch corresponding to the reminder function of returning to the room area, the background server of the game accelerator APP will correspondingly execute the game assistance method provided by the embodiments of the present application to detect whether the virtual character controlled by the player is about to return to the room area that he has visited before.
[0063] Considering that the background server of the game accelerator APP may not be able to directly obtain the target position and the target orientation angle of the target virtual character in the game scene in some cases, the embodiments of the present application provide a solution for determining the target position and a solution for determining the target orientation angle applicable to the background server of the game accelerator APP. The solution for determining the target position and the solution for determining the target orientation angle will be introduced separately below.
[0064] The solution for determining the target position will be introduced first. That is, the server can determine the target position of the target virtual character in the game scene in the following way: capture a screenshot of the target game interface from the recorded screen video of the target game process, where the target game process is the game process in which the target virtual character is located; then, based on the target mini-map position, intercept the target mini-map from the captured screenshot of the target game interface; furthermore, match the target mini-map in the target scene map corresponding to the game scene to determine the target reference position of the target mini-map in the target scene map; finally, based on the target reference position, determine the position of the target virtual character in the target scene map as the target position of the target virtual character in the game scene.
[0065] Specifically, when the player launches the target shooting game APP through the game accelerator APP on the terminal device to play the shooting game, the screen recording function of the terminal device can be correspondingly enabled to record the player's current target game process, and the recorded screen video of the target game process can be transmitted to the server in real time through the network. After receiving the recorded screen video of the target game process transmitted by the terminal device, the server can capture screenshots of the target game interface from the recorded screen video at a specific capture frequency. For example, screenshots of the target game interface can be captured from the recorded screen video at a frequency of 1 frame per second.
[0066] Then, the server can intercept the target mini-map in the captured screenshot of the target game interface based on the pre-determined target mini-map area position. It should be noted that many shooting games will display a mini-map on their game interfaces, and this mini-map is used to show the small area where the virtual character controlled by the player is located in the game scene; in the embodiments of the present application, the server will pre-determine the area position of the mini-map in the game interface (i.e., the target mini-map area position), and then crop the area at the target mini-map area position in the captured screenshot of the target game interface to obtain the mini-map shown in the captured screenshot of the target game interface (i.e., the target mini-map).
[0067] Furthermore, the server can match the target mini-map intercepted from the captured screenshot of the target game interface in the target scene map corresponding to the game scene where the target virtual character is located, and determine the target reference position where the target mini-map is located in the target scene map. Exemplarily, the server can adopt the normalized cross-correlation coefficient template matching method, use the target mini-map as the matching template, perform sliding window matching on the target scene map, and determine the area position with the highest matching degree with the target mini-map on the target scene map, so as to obtain the target reference position of the target mini-map in the target scene map.
[0068] Optionally, to improve the matching accuracy, before matching the target mini-map in the target scene map, the server can also first perform standardization processing on the target mini-map. Exemplarily, assuming that the width and height of the target mini-map intercepted from the screenshot of the target game interface are w and h respectively, and the preset standard width is 106, then the server can adjust the height of the intercepted target mini-map based on this standard width, such as calculating the adjusted height of the target mini-map new_h = int(106 * h / w), that is, standardizing the target mini-map into a standard target mini-map with a width of 106 and a height of new_h. Of course, in practical applications, the server can also set other standard parameters and perform standardization processing on the target mini-map intercepted from the screenshot of the target game interface in other ways. The present application does not make any limitation on the standardization processing method of the target mini-map here.
[0069] After the server performs standardization processing on the target mini-map to obtain the standard target mini-map, it can call the matching script and match the standard target mini-map in the target scene map through the normalized correlation coefficient template matching method. Through the above matching script, the matching degree between the standard target mini-map and each area in the target scene map can be obtained. Furthermore, the area in the target scene map with the highest matching degree with the standard target mini-map is determined as the area where the target mini-map is located in the target scene map.
[0070] As an example, the server can obtain the maximum position coordinates (x, y) in the area where the target mini-map is located in the target scene map as the target reference position. This target reference position is the position of the upper left vertex of the target mini-map in the target scene map. Based on the prior knowledge that the position of the target virtual character is the center point of the target mini-map, the server can calculate the position coordinates of the target virtual character in the target scene map as (x - 53, y - int(new_h / 2)) as the target position of the target virtual character. In this way, based on the position of the upper left vertex of the target mini-map in the target scene map as the reference basis, and based on the position of the upper left vertex of the target mini-map in the target scene map, determining the position of the target virtual character in the target scene map can more quickly determine the position of the target virtual character in the target scene map.
[0071] Of course, in practical applications, the server can also directly obtain the central position within the area where the target mini - map is located in the target scene map as the target reference position, and then directly use this target reference position as the target position of the target virtual character. Or the server can also obtain other positions within the area where the target mini - map is located in the target scene map as the target reference position, and then, based on the relationship between this position and the central position of the target mini - map, determine the target position where the target virtual character is located according to this target reference position. This application does not make any limitations on the determined target reference position, nor does it make any limitations on the method of determining the target position based on this target reference position.
[0072] In this way, standardizing the intercepted target mini - map and then matching the standardized target mini - map in the scene map is beneficial to more quickly and accurately matching the target mini - map in the target scene map, and thus is beneficial to more quickly and accurately determining the position of the target virtual character in the target scene map.
[0073] It should be noted that the target mini - map area position based on which the target mini - map is intercepted from the target game interface screenshot in the above text can be determined in the following way: within a preset time period after the start of the target game process, collect multiple frames of reference game interface screenshots from the screen recording video of the target game process; then, through the mini - map area detection model, detect the mini - map area position in each frame of the reference game interface screenshot as the reference mini - map area position corresponding to this reference game interface screenshot; finally, calculate the average mini - map area position based on the reference mini - map area positions corresponding to each frame of the reference game interface screenshots as this target mini - map area position.
[0074] Exemplarily, within 20 seconds after the start of the target game process, the server can collect 20 reference game interface screenshots from the screen recording video of the target game process at a capture frequency of 1 frame per second. Then, for each frame of the reference game interface screenshot, through a pre-trained mini-map area detection model, the area position where the mini-map is located in the frame of the reference game interface screenshot is detected. For example, the positions of the four vertices on the rectangular mini-map in the reference game interface screenshot are detected as the reference mini-map area position corresponding to the reference game interface screenshot. After obtaining the reference mini-map area positions corresponding to each of the 20 frames of the reference game interface screenshots, the server can calculate the average mini-map area position based on the reference mini-map area positions corresponding to each of the 20 frames of the reference game interface screenshots. For example, for each vertex on the mini-map, the server can calculate the average value of the positions of the vertex in the reference mini-map area positions corresponding to each of the 20 frames of the reference game interface screenshots as the position corresponding to the vertex in the target mini-map area position. After obtaining the positions corresponding to each of the four vertices in the target mini-map area position in this way, the target mini-map area position can be determined based on the positions corresponding to each of the four vertices.
[0075] Of course, in practical applications, the server can also use other methods to determine the target mini-map area position in the game interface screenshot. For example, the server can directly determine the area position where the mini-map should be located in the game interface displayed on the terminal device based on the model of the terminal device as the target mini-map area position. The present application does not make any limitations on the method for determining the target mini-map area position.
[0076] It should be noted that the target scene map corresponding to the game scene above can be obtained through the following method: within a preset period after the start of the target game process, multiple frames of reference game interface screenshots are collected from the screen recording video of the target game process; then, through a pre-trained scene detection model, the scene type corresponding to each frame of the reference game interface screenshot is detected; furthermore, based on the scene types corresponding to each of the multiple frames of reference game interface screenshots, the target scene type is determined, and the scene map corresponding to the target scene type is obtained as the target scene map.
[0077] Exemplarily, within 20 seconds after the start of the target game process, the server can collect 20 reference game interface screenshots from the screencast video of the target game process at a capture frequency of 1 frame per second. Then, for each frame of the reference game interface screenshot, through a pre-trained scene detection model, the scene type corresponding to the reference game interface screenshot is detected (including but not limited to island, desert, rainforest, snowfield, valley, etc.); the scene detection model here can, for example, adopt the yolov4-tiny model with an efficientnet backbone network. This scene detection model can detect the scene type corresponding to the mini-map in the reference game interface screenshot and determine this scene type as the scene type corresponding to the reference game interface screenshot. Furthermore, the server can count the occurrence times of the scene types corresponding to the 20 frames of reference game interface screenshots respectively, and finally determine the scene type with the most occurrence times as the target scene type, and obtain the scene map corresponding to this target scene type as the target scene map.
[0078] Of course, in practical applications, the server can also obtain the target scene map through other means. For example, it can directly communicate with the background server of the shooting game APP, learn from the background server of the shooting game APP the game scene where the target virtual character is currently located, and obtain the target scene map corresponding to this game scene; this application does not make any limitation on the method of obtaining the target scene map here.
[0079] It should be understood that after the server collects multiple frames of reference game interface screenshots from the screencast video of the target game process within a preset period after the start of the target game process, it can synchronously determine the target mini-map area position and the target scene map based on the collected multiple frames of reference game interface screenshots in the above manner.
[0080] Optionally, in order to improve the efficiency of matching the target mini-map in the target scene map, the embodiment of this application proposes a mini-map matching method that combines local matching and pooling matching. That is, if the target area corresponding to the target mini-map is successfully matched in the target scene map in the previous position detection cycle, the server can expand the candidate matching area corresponding to the current position detection cycle based on the target area in the target scene map, and match the target mini-map in the target game interface screenshot collected in the current position detection cycle in this candidate matching area. If the target mini-map is not successfully matched in the target scene map in the previous position detection cycle, the server can perform pooling processing of the same scale on the target mini-map and the target scene map in the target game interface screenshot collected in the current position detection cycle to obtain the target pooled mini-map and the target pooled scene map, and then match the target pooled mini-map in the target pooled scene map.
[0081] Specifically, if the server successfully matches the target area corresponding to the target mini - map in the target scene map during the previous position detection cycle, the server can, based on this target area, expand a candidate matching area applicable to the current position detection cycle in the target scene map. For example, Figure 4 The figure shows a schematic diagram of an exemplary implementation method for expanding the candidate matching area. As shown in Figure 4 the figure, the server can take the center point of the target area as the center and expand by the side length of the target mini - map in each of the four directions of up, down, left, and right to obtain a candidate matching area with a side length twice that of the target mini - map. Then, the server can match the target mini - map in the target game interface screenshot collected during the current position detection cycle in this candidate matching area to determine the target reference position of the target mini - map in the target scene map currently, and further determine the target position where the target virtual character is currently located in the game scene.
[0082] It should be understood that the above - mentioned Figure 4 way of expanding the candidate matching area is only an example. In practical applications, the server can also expand the candidate matching area based on the target area in other ways according to actual needs. This application does not make any limitation on the way of expanding this candidate matching area.
[0083] Compared with matching the target mini - map in the complete target scene map, the above - mentioned way of matching the target mini - map in the candidate matching area can effectively save the computational effort required for matching the target mini - map and greatly reduce the performance loss.
[0084] In addition, if the server fails to successfully match the target mini - map in the target scene map during the previous position detection cycle, the server can perform pooling processing of the same scale on the target mini - map in the target game interface screenshot collected during the current position detection cycle and the target scene map, that is, simultaneously reduce the target mini - map in the target game interface screenshot and the complete target scene map by n (n > 1, for example, it can be 4) times to obtain the target pooled mini - map and the target pooled scene map, and then match the target pooled mini - map in the target pooled scene map. In this way, after the pooling processing of the target mini - map and the target scene map, the computational resources required for one mini - map matching operation will be reduced to 1 / n of the original 4 , and it can also greatly reduce the performance loss.
[0085] Next, a solution for determining the target orientation angle will be introduced. That is, the server can determine the target orientation angle of the target virtual character in the game scene in the following way: capture a screenshot of the target game interface from the screencast video of the target game process. Here, the target game process is the game process in which the target virtual character is located; then, match the orientation angle indicator icon in the screenshot of the target game interface, and determine the position of the orientation angle indicator icon in the screenshot of the target game interface; furthermore, based on the position of the orientation angle indicator icon in the screenshot of the target game interface, determine the orientation angle display area in the screenshot of the target game interface; finally, use an angle recognition model to recognize the angle displayed in the orientation angle display area as the target orientation angle of the target virtual character in the game scene.
[0086] Specifically, when the player launches the target shooting game APP through the game accelerator APP on the terminal device to play the shooting game, the screencast function of the terminal device can be correspondingly enabled to record the player's current target game process, and the screencast video of the target game process can be transmitted to the server in real time through the network. After receiving the screencast video of the target game process transmitted by the terminal device, the server can capture screenshots of the target game interface from the screencast video at a specific capture frequency. For example, screenshots of the target game interface can be captured from the screencast video at a frequency of 1 frame per second.
[0087] Furthermore, the server can obtain the orientation angle indicator icon in the shooting game. This orientation angle indicator icon is an icon that points to the orientation angle display area (used to display the orientation angle of the virtual character controlled by the player in the game scene). Exemplarily, this orientation angle indicator icon can be an inverted triangle icon. Figure 5 Shown is a schematic diagram of an exemplary shooting game interface, where the inverted triangle in box 501 is the orientation angle indicator icon. After the server captures a screenshot of the target game interface from the screencast video, it can use the template matching method to match the orientation angle indicator icon in the screenshot of the target game interface and determine the position of the orientation angle indicator in the screenshot of the target game interface.
[0088] Since the positional relationship between the orientation angle indicator icon and the orientation angle area in the game interface screenshot is fixed, after the server determines the position of the orientation angle indicator icon in the screenshot of the target game interface, it can further determine the orientation angle display area in the screenshot of the target game interface based on the positional relationship between the orientation angle indicator icon and the orientation angle display area, according to the position of the orientation angle indicator icon in the screenshot of the target game interface; as Figure 5 shown, box 502 is the orientation angle display area in the screenshot of the target game interface.
[0089] Furthermore, the server can crop the orientation angle display area from the screenshot of the target game interface and use a pre-trained angle recognition model to recognize the angle displayed in the orientation angle display area as the target orientation angle of the target virtual character in the game scene. Specifically, the server can use a pre-trained neural network model for angle detection to detect the content displayed in the orientation angle display area. When the content displayed in the orientation angle display area is a digital angle, the neural network model can directly recognize the digital angle as the target orientation angle. When the content displayed in the orientation angle display area is text (such as east, south, west, north, northeast, southeast, northwest, southwest, etc.), the neural network model can correspondingly convert it into the corresponding angle. For example, "north" is converted to 0 degrees, "east" is converted to 90 degrees, "south" is converted to 180 degrees, "west" is converted to 270 degrees, "northeast" is converted to 45 degrees, "southeast" is converted to 135 degrees, "northwest" is converted to 225 degrees, and "southwest" is converted to 315 degrees, so as to obtain the target orientation angle of the target virtual character.
[0090] Step 202: For the candidate resource search area within the candidate area in the game scene, determine the orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle; the orientation judgment result is used to represent whether the target virtual character faces the candidate resource search area.
[0091] After the server obtains the target position and the target orientation angle of the target virtual character in the game scene through Step 201, the server can, for each candidate resource search area within the candidate area in the game scene, determine whether the target virtual character currently faces the candidate resource search area according to the position of the candidate resource search area, the above target position, and the target orientation angle, so as to generate the orientation judgment result of the target virtual character relative to the candidate resource search area.
[0092] It should be noted that the candidate area in the above game scene can be determined according to the target position of the target virtual character in the game scene currently; exemplarily, the server can determine a circular area with the target position where the target virtual character is currently located as the center and a radius of 20 meters as the above candidate area in the target scene map corresponding to the game scene. Of course, the server can also use other methods to determine the above candidate area based on the target position where the target virtual character is currently located, or the server can directly regard the entire area corresponding to the game scene as the candidate area, and this application does not make any limitation on this candidate area here.
[0093] It should be noted that each resource search area in the target scenario map can specifically be each housing area in the target scenario map. The positions of each housing area in the target scenario map are pre - marked, and the positions of each housing area in the target scenario map are stored in a position record file (such as a file in xml format). After the server determines the candidate area, it can regard the housing areas within the candidate area as candidate resource search areas, and then obtain the positions of each candidate resource search area from the position record file.
[0094] The following introduces the implementation method of marking the positions of housing areas in the target scenario map corresponding to the game scenario. Specifically, the server can obtain the scenario map file corresponding to the target scenario map; then, parse the housing area layer from the scenario map file, and perform binarization processing on the housing area layer to obtain a binarized housing area distribution map; furthermore, detect the pixel connected areas in the binarized housing area distribution map through the connected component detection method to obtain housing areas, and determine the annotation frames of the housing areas; for each housing area, determine the position coordinates of each key point on the annotation frame of the housing area in the game scenario coordinate system as the position of the housing area in the target scenario map.
[0095] To facilitate the understanding of the above - mentioned implementation method of marking housing areas in the target scenario map, the following combines Figure 6 the schematic diagram of the housing area marking process shown in
[0096] As shown in Figure 6As shown in the figure, the server can first obtain the scene map file 601 corresponding to the target scene map. This scene map file is usually a psd (Photoshop Document) file. Then, it parses and merges the layers with building areas from the obtained scene map file 601 to get the building area layer 602. This building area layer 602 is usually a file in the Portable Network Graphics (png) format. Next, it performs binarization processing on the building area layer 602. Exemplarily, it can first use the opacity threshold to segment. By using the transparency channel of the png file, it makes a preliminary division of the foreground and background. The transparent areas in the building area layer 602 are divided into the background, and the opaque areas are divided into the foreground. The opacity threshold here can be set to 200, for example. That is, the areas in the building area layer 602 with pixel opacity greater than or equal to 200 are set as the foreground, and the areas with pixel opacity less than 200 are set as the background. Then, it uses the brightness threshold to segment to remove shadows. The areas with low brightness in the building area layer 602 are set as the background, and the areas with high brightness are set as the foreground. The brightness threshold here can be set to 215, for example. That is, the areas in the building area layer 602 with brightness greater than or equal to 215 are set as the foreground, and the areas with brightness less than 215 are set as the background. In this way, the binary building area distribution map 603 is obtained. In this binary building area distribution map 603, the background is black (0, 0, 0), and the building area foreground is white (255, 255, 255).
[0097] Furthermore, through the connected component detection method, the connected areas in the binary building area distribution map 603 are detected. The detected connected areas are the areas where the building areas are located. Specifically, the server can call the connected component detection script integrated in opencv to detect each independent connected component in the binary building area distribution map 603 to obtain each building area. The connected component detection result is shown in 604.
[0098] In a possible implementation, the server can label a rectangular box for the building areas in the connected component detection result 604, as shown in 605. That is, for each connected component (i.e., building area) in the connected component detection result 604, the server can extract the maximum value xmax and the minimum value xmin of the x coordinate, as well as the maximum value ymax and the minimum value ymin of the y coordinate in this connected component, and use (xmin, ymin, xmax, ymax) to represent the position of this building area in the target scene map. Figure 7 Shown is an exemplary target scene map with rectangular boxes labeling the building areas.
[0099] In another possible implementation, the server may determine a corresponding annotation box for the room in the connected domain detection result 604 according to the real shape of the room, as shown in 606. That is, the server may use a contour extraction method to extract a corresponding contour for each connected domain in the connected domain detection result 604, and determine key points on the contour, and then use the position coordinates of the determined key points as the position of the room corresponding to the connected domain in the target scene map.
[0100] After the server determines the position of each room area in the target scene map in the above manner, the position of each room area in the target scene map can be written into the position record file (xml file) corresponding to the target scene map, so that when the server subsequently performs a return to resource search area detection for the virtual character, the position of the candidate room area in the candidate area can be retrieved from the position record file.
[0101] The server marks the room locations in the scene map in the above manner, which can ensure that each room in the scene map is accurately marked, thereby providing reliable data support for detecting whether the virtual character returns to a room. In addition, the server pre-marks the room locations in the scene map, which is conducive to quickly detecting whether the virtual character controlled by the player is facing the room and approaching the room based on the marked room locations during the game, thereby ensuring the timeliness of the return to room detection.
[0102] When the server determines whether the target virtual character is facing the candidate resource search area based on the position of the candidate resource search area, the target position of the target virtual character in the game scene, and the target orientation angle, the server can first determine the angle range between the target virtual character and the candidate resource search area based on the target position and the positions of each key point on the marked box of the candidate resource search area in the game scene; then, determine whether the target orientation angle is within the angle range; if so, determine that the target virtual character is facing the candidate resource search area; if not, determine that the target virtual character is not facing the candidate resource search area.
[0103] In order to facilitate the understanding of the above implementation process, the following Figure 8 The schematic diagram of the implementation process of determining the direction judgment result shown is an exemplary introduction to the above implementation method.
[0104] like Figure 8As shown in the figure, assume that the candidate resource search area is the candidate housing area, the annotation box of the candidate housing area is a rectangular box, and the position of the candidate housing area is the position coordinates of the four vertices of the rectangular box in the target scene map. Then, the server can first calculate the angles between the lines connecting the position of the target virtual character in the target scene map (i.e., the target position) and the four vertices of the annotation box of the candidate housing area and the reference direction (such as the horizontal direction or the vertical direction, etc.), that is, calculate four angles [angle0, angle1, angle2, angle3], where angle0 < angle1 < angle2 < angle3.
[0105] Then, calculate the angle range between the target virtual character and the candidate housing area according to these four angles. Specifically, if angle3 - angle0 > 180°, the server needs to increase the angles less than 180° among angle0, angle1, angle2, and angle3 by 360°, sort the adjusted angles in ascending order, and obtain the angle range [angle0’, angle1’, angle2’, angle3’] between the target virtual character and the candidate housing area. This angle range is actually from angle0’ to angle3’. If angle3 - angle0 ≤ 180°, the server can directly use [angle0, angle1, angle2, angle3] as the angle range [angle0’, angle1’, angle2’, angle3’] between the target virtual character and the candidate housing area. This angle range is also actually from angle0’ to angle3’.
[0106] Furthermore, determine whether the target orientation angle of the target virtual character in the game scene is within the above angle range. Specifically, if the target orientation angle of the target virtual character in the game scene is less than angle0’, the server can add 360° to the target orientation angle to obtain a new target orientation angle. If the new target orientation angle is within the angle range from angle0’ to angle3’, it is considered that the target virtual character is facing the candidate housing area. Otherwise, if the new target orientation angle is not within the angle range from angle0’ to angle3’, it is considered that the target virtual character is not facing the candidate housing area. If the target orientation angle of the target virtual character in the game scene is not less than angle0’, the server can directly determine whether the target orientation angle is within the angle range from angle0’ to angle3’. If so, it is considered that the target virtual character is facing the candidate housing area. If not, it is considered that the target virtual character is not facing the candidate housing area.
[0107] Step 203: For the candidate resource search area within the candidate area, determine the position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period; the position judgment result is used to represent whether the target virtual character is approaching the candidate resource search area.
[0108] In addition, for the candidate resource search area within the candidate area, the server can also determine whether the target virtual character is approaching the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period, so as to generate the position judgment result of the target virtual character relative to the candidate resource search area.
[0109] Specifically, if the distance last_bp_distance between the target virtual character and the candidate resource search area in the previous position detection period is greater than the distance bp_distance between the target virtual character and the candidate resource search area in the current position detection period, it means that the target virtual character is currently approaching the candidate resource search area; on the contrary, if the distance last_bp_distance between the target virtual character and the candidate resource search area in the previous position detection period is less than the distance bp_distance between the target virtual character and the candidate resource search area in the current position detection period, it means that the target virtual character is currently moving away from the candidate resource search area.
[0110] It should be noted that the above position detection period can be set according to actual needs. For example, the position of the target virtual character is detected once per second, that is, the position detection period is 1 second. Of course, the position detection period can also be other time lengths, such as 30 ms, etc. The present application does not make any limitation on the position detection period here.
[0111] In a possible implementation, the server can determine the distance between the target virtual character and the candidate resource search area in each position detection period in the following manner: Determine the horizontal distance between the target virtual character and the candidate resource search area according to the abscissa in the target position, as well as the maximum abscissa and the minimum abscissa corresponding to the candidate resource search area; the maximum abscissa and the minimum abscissa corresponding to the candidate resource search area are respectively the maximum value and the minimum value among the abscissas corresponding to each key point on the annotation box of the candidate resource search area; Determine the vertical distance between the target virtual character and the candidate resource search area according to the ordinate in the target position, as well as the maximum ordinate and the minimum ordinate corresponding to the candidate resource search area; the maximum ordinate and the minimum ordinate corresponding to the candidate resource search area are respectively the maximum value and the minimum value among the ordinates corresponding to each key point on the annotation box of the candidate resource search area; Furthermore, determine the distance between the target virtual character and the candidate resource search area according to the horizontal distance and the vertical distance between the target virtual character and the candidate resource search area.
[0112] Exemplarily, assume that the target position of the target virtual character in the target scene map is (x, y), and the maximum abscissa, the minimum abscissa, the maximum ordinate, and the minimum ordinate corresponding to the candidate resource search area are xmax, xmin, ymax, and ymin respectively. When specifically calculating the horizontal distance x_distance between the target virtual character and the candidate resource search area, it can first be determined whether (x - xmax) * (x - xmin) is less than 0. If so, it can be determined that x_distance = 0. If not, it can be determined that x_distance = min(abs(x - xmax), abs(x - xmin)). When specifically calculating the vertical distance y_distance between the target virtual character and the candidate resource search area, it can first be determined whether (y - ymax) * (y - ymin) is less than 0. If so, it can be determined that y_distance = 0. If not, it can be determined that y_distance = min(abs(y - ymax), abs(y - ymin)). Furthermore, the distance between the target virtual character and the candidate resource search area can be calculated according to the horizontal distance x_distance and the vertical distance y_distance between the target virtual character and the candidate resource search area.
[0113]
[0114] In addition, the server can also determine whether the target virtual character is outside or inside the candidate resource search area. Specifically, if (x - xmax) * (x - xmin) < 0 and (y - ymax) * (y - ymin) < 0, it can be determined that the target virtual character is inside the candidate resource search area. At this time, the distance between the target virtual character and the candidate resource search area can be determined as -dpr_abs; conversely, if (x - xmax) * (x - xmin) > 0 and / or (y - ymax) * (y - ymin) > 0, it can be determined that the target virtual character is outside the candidate resource search area. At this time, the distance between the target virtual character and the candidate resource search area can be determined as dpr_abs.
[0115] It should be noted that if the server has determined the candidate resource search area faced by the target virtual character in the candidate area before executing step 203, when the server executes step 203, it can only judge whether the target virtual character is approaching the candidate resource search area facing the target virtual character in the candidate area through step 203, so as to save certain computing resources. If the server has determined the candidate resource search area that the target virtual character is approaching in the candidate area before executing step 202, when the server executes step 202, it can only judge whether the target virtual character is facing the candidate resource search area for the candidate resource search area that the target virtual character is approaching in the candidate area, so as to save certain computing resources. If the server executes step 202 and step 203 simultaneously, the server can judge whether the target virtual character is facing each candidate resource search area in the candidate area and whether the target virtual character is approaching the candidate resource search area. This application does not make any restrictions on the execution order of step 202 and step 203.
[0116] Step 204: For the candidate resource search areas in the candidate area, judge whether the target virtual character returns to the candidate resource search area according to the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area, and the access status of the target virtual character to the candidate resource search area; if so, generate a target prompt message, where the target prompt message is used to prompt that the target virtual character has visited the candidate resource search area.
[0117] After the server determines the orientation judgment result of the target virtual character relative to the candidate resource search area within the candidate area through step 202 and determines the position judgment result of the target virtual character relative to the candidate resource search area within the candidate area through step 203, for the candidate resource search area within the candidate area, according to the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area, as well as the access status of the target virtual character to the candidate resource search area, it can be determined whether the target virtual character currently wants to return to the candidate resource search area, that is, it can be determined whether the target virtual character currently wants to repeatedly enter the resource search area that it has previously visited.
[0118] If it is determined that the target virtual character currently wants to return to the candidate resource search area, the server should generate a target prompt message and send the target prompt message to the terminal device through the network to prompt the player that the target virtual character has previously visited the candidate resource search area. For example, the target prompt message can be "You visited this resource search area XX minutes ago". It should be understood that the target prompt message can be a text prompt message or a voice prompt message. When the target prompt message is a text prompt message, the terminal device can correspondingly display the target prompt message on the game interface. When the target prompt message is a voice prompt message, the terminal device can play the target prompt message through the audio playback component. The present application does not make any limitation on the form of the target prompt message here.
[0119] It should be noted that the access status of the target virtual character to the candidate resource search area is used to represent whether the target virtual character has previously visited the candidate resource search area. Exemplarily, the access status of the target virtual character to the candidate resource search area can represent that the target virtual character has never visited the candidate resource search area before, can also represent that the target virtual character is currently within the candidate resource search area, can also represent that the target virtual character has left the candidate resource search area and is near the candidate resource search area, can also represent that the target virtual character has left the candidate resource search area and is far from the candidate resource search area, and can also represent that the target virtual character has left the candidate resource search area and has now returned to the vicinity of the candidate resource search area again; the present application does not make any limitation on the meaning represented by the access status of the target virtual character to the candidate resource search area here.
[0120] In a possible implementation, the server can determine the access status of the target virtual character to the candidate resource search area in the following ways: If the target virtual character has never entered the candidate resource search area during the target game process, determine that the access status of the target virtual character to the candidate resource search area is the first access status; if the target virtual character is currently within the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the second access status; if the target virtual character has left the candidate resource search area but is within the preset distance range corresponding to the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the third access status; if the target virtual character has left the candidate resource search area and is outside the preset distance range corresponding to the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the fourth access status. If the target virtual character returns to the candidate resource search area again, determine that the access status of the target virtual character to the candidate resource search area is the fifth access status; the embodiments of the present application aim to identify whether the current access status of the target virtual character to the candidate resource search area is the fifth access status.
[0121] Exemplarily, Figure 9 is a schematic diagram of the conversion relationship between the five access statuses provided by the embodiments of the present application. As Figure 9As shown, at the start of the game, the access status of the target virtual character to each resource search area in the game scene is the first access status (never), that is, the status of the resource search areas in the game scene that the target virtual character has not visited is the first access status. When the distance between the target virtual character and a certain resource search area in the game scene is less than or equal to -1, it can be determined that the current access status of the target virtual character to this resource search area is the second access status (visiting). In practical applications, it can be converted from any access status to this second access status. The access status of the target virtual character to the resource search area is the third access status (nearby), which needs to meet the following conditions: the target virtual character has visited this resource search area before, and the current distance between the target virtual character and this resource search area is greater than 0 and less than or equal to the preset distance range corresponding to this resource search area (for example, the distance between the target virtual character and this resource search area is less than the preset distance threshold nearby_dpr_threshold = 4 pixels); in practical applications, it can be converted from the second access status to this third access status. The access status of the target virtual character to the resource search area is the fourth access status (visited_left), which needs to meet the following conditions: the target virtual character has visited this resource search area before, and the current distance between the target virtual character and this resource search area is greater than the preset distance range threshold corresponding to this resource search area (for example, the distance between the target virtual character and this resource search area is greater than the preset distance threshold nearby_dpr_threshold = 4 pixels); in practical applications, it can be converted from the third access status to this fourth access status.
[0122] In the method provided in the embodiments of the present application, the server needs to determine whether the current access status of the target virtual character to the candidate resource search area is the fifth access status (approach_again), that is, to determine whether the target virtual character is going to return to the candidate resource search area, based on the orientation judgment result and the position judgment result of the target virtual character with respect to the candidate resource search area, and the access status of the target virtual character to this candidate resource search area.
[0123] In a possible implementation, the server can determine whether the target virtual character is going to return to the candidate resource search area in the following way: if the orientation judgment result of the target virtual character with respect to the candidate resource search area indicates that the target virtual character is facing this candidate resource search area, and the position judgment result of the target virtual character with respect to this candidate resource search area indicates that the target virtual character is approaching this candidate resource search area, and the access status of the target virtual character to this candidate resource search area is the third access status or the fourth access status, then it is determined that the target virtual character is going to return to this candidate resource search area.
[0124] Specifically, if the following relationships are satisfied between the target virtual character and the candidate resource search area: the target virtual character is currently facing the candidate resource search area, the target virtual character is currently approaching the candidate resource search area, the access status of the target virtual character to the candidate resource search area is the third access status (nearby) or the fourth access status (visited_left), then the server can consider that the access status of the target virtual character to the candidate resource search area belongs to the fifth access status, that is, it is considered that the target virtual character is currently about to repeat accessing the candidate resource search area that it has accessed before. Conversely, if none of the above relationships are satisfied between the target virtual character and the candidate resource search area, the server can consider that the access status of the target virtual character to the candidate resource search area is not the fifth access status, that is, it is considered that the target virtual character is not currently about to repeat accessing the candidate resource search area that it has accessed before.
[0125] In another possible implementation, the server can pre-set corresponding time locks for the third access status and the fourth access status respectively. For example, set a corresponding first duration threshold for the third access status and a corresponding second duration threshold for the fourth access status; correspondingly, when identifying whether the target virtual character is currently returning to the candidate resource search area, the time locks corresponding to the access status can be comprehensively considered. In addition, the server can also set a return distance threshold, and when identifying whether the target virtual character is currently returning to the candidate resource search area, this return distance threshold can be comprehensively considered.
[0126] That is, if the result of the orientation judgment of the target virtual character relative to the candidate resource search area indicates that the target virtual character is facing the candidate resource search area, and the result of the position judgment of the target virtual character relative to the candidate resource search area indicates that the target virtual character is approaching the candidate resource search area, and the access status of the target virtual character to the candidate resource search area is the third access status, and the duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the first duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the return distance threshold, then it is determined that the target virtual character is currently about to return to the candidate resource search area. Or, if the result of the orientation judgment of the target virtual character relative to the candidate resource search area indicates that the target virtual character is facing the candidate resource search area, and the result of the position judgment of the target virtual character relative to the candidate resource search area indicates that the target virtual character is approaching the candidate resource search area, and the access status of the target virtual character to the candidate resource search area is the fourth access status, and the duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the second duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the return distance threshold, then it is determined that the target virtual character is currently about to return to the candidate resource search area.
[0127] Exemplarily, assume that the first duration threshold nearby_time_block = 10s is set for the third access state (nearby), the second duration threshold multi_time_block = 30s is set for the fourth access state (visited_left), and the approach distance threshold approach_again_apr_threshold = 4 pixels is set.
[0128] When the target virtual character is currently facing the candidate resource search area, and the target virtual character is currently approaching the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the third access state (nearby), and the duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds nearby_time_block = 10s, and the distance between the target virtual character and the candidate resource search area is less than or equal to approach_again_apr_threshold = 4 pixels, it can be determined that the target virtual character is currently about to return to the candidate resource search area, that is, it is determined that the access state of the target virtual character to the candidate resource search area is the fifth access state (approach_again).
[0129] Alternatively, when the target virtual character is currently facing the candidate resource search area, and the target virtual character is currently approaching the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the fourth access state (visited_left), and the duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds multi_time_block = 30s, and the distance between the target virtual character and the candidate resource search area is less than or equal to approach_again_apr_threshold = 4 pixels, it can be determined that the target virtual character is currently about to return to the candidate resource search area, that is, it is determined that the access state of the target virtual character to the candidate resource search area is the fifth access state (approach_again).
[0130] It should be understood that the above method for determining whether the target virtual character is currently about to return to the candidate resource search area is only an example. In actual applications, the server can also use other methods to determine whether the target virtual character is currently about to return to the candidate resource search area. This application does not make any restrictions on the method for determining whether the target virtual character is currently about to return to the candidate resource search area.
[0131] The above game assistance method innovatively proposes a mechanism for detecting whether a virtual character controlled by a player is about to repeatedly access the same resource search area, and gives corresponding prompts when it is detected that the target virtual character is about to return to a certain resource search area. Specifically, the game assistance method can comprehensively consider factors such as whether the virtual character is facing the resource search area, whether the virtual character is approaching the resource search area, and whether the virtual character has accessed the resource search area before, to detect whether the virtual character is currently about to access a resource search area that it has accessed before, and give relevant prompt information when it is detected that the virtual character is currently about to access a resource search area that it has accessed before. Thus, it can prevent the virtual character controlled by the player from repeatedly entering the same resource search area, saving the player's game time and energy and improving the player's game experience.
[0132] To facilitate a further understanding of the technical solution provided by the embodiments of the present application, the following takes the background server of the game accelerator APP (hereinafter simply referred to as the server) as the execution subject of the game assistance method provided by the embodiments of the present application, and the resource search area in the game scenario is a housing area as an example to give an overall exemplary introduction to the game assistance method.
[0133] Figure 10 It is a schematic diagram of the overall process of identifying a virtual character's return to the housing area provided by the embodiments of the present application. As Figure 10 shown, the solution for identifying a virtual character's return to the housing area can be divided into two parts: The first part is the preprocessing part, which is used to pre-label the position of the housing area in the game scenario map; specifically, the rectangular frame of the housing area can be labeled in an automated manner, and the position of the rectangular frame of the housing area is stored in the position record in xml format. The game scenario map labeled here can be a jpg file in RGB three-channel format of 2048*2048. The second part is the real-time processing part, which is used to detect in real time whether the virtual character is about to return to the housing area according to the housing area position coordinate list and the key information in the game screen; the specific implementation process is as follows: Locate the position of the virtual character and search for nearby housing areas → Determine whether the virtual character is facing the housing area → Determine whether the virtual character is approaching the housing area → Update the access status of the virtual character to the housing area → Determine whether the virtual character is currently returning to the housing area and give corresponding prompts.
[0134] The implementation method of the annotation box for marking each housing area in the game scene map is introduced below. First, the scene map file in psd format can be obtained, and the layers with housing areas are parsed and merged based on this psd file, that is, the housing area layer in png format is exported. In this png file, the foreground represents the housing area and the background is transparent. Then, the binarization process is performed on this housing area layer to obtain a binarized housing area distribution map with a black (0, 0, 0) background and a white (255, 255, 255) housing area foreground. Next, the connected component detection method is used to detect each pixel connected component in the binarized housing area distribution map to obtain each housing area in the binarized housing area distribution map. Furthermore, for each pixel connected component corresponding to a housing area, the minimum and maximum values on the x-axis and the minimum and maximum values on the y-axis are determined to obtain the rectangular box coordinates (xmin, ymin, xmax, ymax) and write them into a position record file in xml format; alternatively, polygon annotation can also be performed, and the position coordinates of each key point on the polygon are written into a position record file in xml format. This position record file can also be a file in json format.
[0135] The implementation method of real-time obtaining the position of a virtual character in the game scene is introduced below. Figure 11 As shown in the schematic diagram of the implementation process for real-time determining the position of a virtual character in the game scene, Figure 11 it can be seen that the target detection method can be used first to determine the global rectangular coordinates (i.e., the position of the target mini-map area) and the map category (including but not limited to island, desert, rainforest, snowfield, valley) of the mini-map at the start of the game; then, according to the detected map category, the high-definition world map of the game (i.e., the target scene map) is loaded, and the mini-map picture is cropped from the specified position of the game screen based on the previously determined global rectangular coordinates of the mini-map; furthermore, the normalized cross-correlation coefficient template matching method is used in real-time, using the cropped mini-map picture as a template, and sliding window matching is performed on the high-definition world map of the game to determine the area position of the mini-map in the high-definition world map of the game, and based on this, the position of the virtual character in the high-definition world map of the game is determined; during the matching process, if the mini-map was successfully matched in the high-definition world map of the game in the previous time, the local matching method can be used this time, and if the mini-map was not successfully matched in the high-definition world map of the game in the previous time, the pooling global matching method can be used this time.
[0136] The implementation method for real-time recognition of whether a virtual character is facing a housing area is introduced below. By recognizing the direction scale numbers at the top of the game screen, the orientation angle of the virtual character in the game scene is recognized. Specifically, the template matching method can be used to match the orientation angle indicator icon (i.e., the inverted triangle icon) in the game screen at the start of the game, and then calculate the position of the orientation angle display area used to display the orientation angle of the virtual character. Then, based on the position of the orientation angle display area, the orientation angle display area is cropped in the game screen in real time, and the target detection method is used to detect the orientation angle of the virtual character in the game scene. Furthermore, according to the position coordinates of the virtual character and the position coordinates of the rectangular annotation box of the housing area, the included angle range between the virtual character and the housing area is calculated, and based on the orientation angle of the virtual character and the included angle range between the virtual character and the housing area, it is determined whether the virtual character is facing the housing area.
[0137] The implementation method for real-time recognition of whether a virtual character is approaching a housing area is introduced below. Record the distance last_bp_distance between the virtual character and a certain housing area during the previous position detection period and the distance bp_distance between the virtual character and the housing area during the current position detection period. If bp_distance < last_bp_distance, it is determined that the virtual character is approaching the housing area.
[0138] The implementation method for real-time recognition of whether a virtual character is returning to a housing area is introduced below. Define the access status of the virtual character to the housing area, and based on the orientation judgment result and position judgment result of the virtual character to the housing area, as well as whether the virtual character has visited the housing area before, determine whether the access status of the virtual character to the housing area is approach_again; when it is determined that the access status of the virtual character to the housing area is approach_again, it is determined that the virtual character is returning to the housing area it visited before, and a housing area return reminder is given through voice on the client side.
[0139] For the game assistance method described above, the present application also provides a corresponding game assistance device to enable the above game assistance method to be applied and implemented in practice.
[0140] See Figure 12 , Figure 12 is a schematic structural diagram of a game assistance device 1200 corresponding to the game assistance method shown above. As Figure 2 shown, the game assistance device 1200 includes: Figure 12 shown, the game assistance device 1200 includes:
[0141] An information acquisition module 1201, configured to acquire the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene;
[0142] The orientation determination module 1202 is configured to determine, for a candidate resource search area within a candidate area in the game scene, an orientation determination result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle; the orientation determination result is used to indicate whether the target virtual character faces the candidate resource search area;
[0143] The position determination module 1203 is configured to determine, for a candidate resource search area within the candidate area, a position determination result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period; the position determination result is used to indicate whether the target virtual character approaches the candidate resource search area;
[0144] The return prompt module 1204 is configured to determine, for a candidate resource search area within the candidate area, whether the target virtual character returns to the candidate resource search area according to the orientation determination result and the position determination result of the target virtual character relative to the candidate resource search area, and the access status of the target virtual character to the candidate resource search area; if so, generate a target prompt message, where the target prompt message is used to prompt that the target virtual character has visited the candidate resource search area.
[0145] Optionally, based on the game assistance device shown in Figure 12 the information acquisition module 1201 is specifically configured to:
[0146] Collect a screenshot of the target game interface from the screen recording video of the target game process; the target game process is the game process in which the target virtual character is located;
[0147] Intercept a target mini - map from the screenshot of the target game interface based on the target mini - map area position;
[0148] Match the target mini - map in the target scene map corresponding to the game scene to determine the target reference position of the target mini - map in the target scene map;
[0149] Determine the position of the target virtual character in the target scene map according to the target reference position as the target position.
[0150] Optionally, based on the game assistance device shown in Figure 12 refer to Figure 13 , Figure 13 which is a schematic structural diagram of another game assistance device 1300 provided by an embodiment of the present application. AsFigure 13 As shown, the device further includes a mini - map area determination module 1301, and the mini - map area determination module 1301 is configured to:
[0151] Within a preset time period after the start of the target game process, collect multiple frames of reference game interface screenshots from the screen recording video of the target game process;
[0152] Through a mini - map area detection model, detect the position of the mini - map area in each frame of the reference game interface screenshot as the reference mini - map area position corresponding to the reference game interface screenshot;
[0153] According to the reference mini - map area positions corresponding to the multiple frames of reference game interface screenshots, calculate the average mini - map area position as the target mini - map area position.
[0154] Optionally, based on the game auxiliary device shown in Figure 12 Refer to Figure 14 , Figure 14 which is a schematic structural diagram of another game auxiliary device 1400 provided by an embodiment of the present application. As Figure 14 shown, the device further includes a scene map acquisition module 1401, and the scene map acquisition module 1401 is configured to:
[0155] Within a preset time period after the start of the target game process, collect multiple frames of reference game interface screenshots from the screen recording video of the target game process;
[0156] Through a scene detection model, detect the scene type corresponding to each frame of the reference game interface screenshot;
[0157] According to the scene types corresponding to the multiple frames of reference game interface screenshots, determine the target scene type; and obtain the scene map corresponding to the target scene type as the target scene map.
[0158] Optionally, based on the game auxiliary device shown in Figure 12 , the information acquisition module 1201 is specifically configured to:
[0159] If the target area corresponding to the target mini - map is successfully matched in the target scene map in the previous position detection period, then expand the candidate matching area corresponding to the current position detection period based on the target area in the target scene map, and match the target mini - map in the target game interface screenshot collected in the current position detection period in the candidate matching area;
[0160] If the target mini - map is not successfully matched in the target scene map during the previous position detection period, perform pooling processing of the same scale on the target mini - map and the target scene map in the target game interface screenshot collected during the current position detection period to obtain a target pooled mini - map and a target pooled scene map, and match the target pooled mini - map in the target pooled scene map.
[0161] Optionally, based on the Figure 12 game assistance device shown, the information acquisition module 1201 is specifically configured to:
[0162] Collect a target game interface screenshot from the screen recording video of the target game process; the target game process is the game process in which the target virtual character is located;
[0163] Match the orientation angle indicator icon in the target game interface screenshot, and determine the position of the orientation angle indicator icon in the target game interface screenshot;
[0164] Determine the orientation angle display area in the target game interface screenshot according to the position of the orientation angle indicator icon in the target game interface screenshot;
[0165] Identify the angle displayed in the orientation angle display area through an angle recognition model as the target orientation angle.
[0166] Optionally, based on the Figure 12 game assistance device shown, refer to Figure 15 , Figure 15 which is a schematic structural diagram of another game assistance device 1500 provided by an embodiment of the present application. As Figure 15 shown, the device further includes a resource search area annotation module 1501, and the resource search area annotation module 1501 is used for:
[0167] Obtain the scene map file corresponding to the target scene map;
[0168] Parse the resource search area layer from the scene map file, and perform binarization processing on the resource search area layer to obtain a binarized resource search area distribution map;
[0169] Detect the pixel connected regions in the binarized resource search area distribution map through the connected component detection method to obtain the resource search area, and determine the annotation box of the resource search area;
[0170] For each resource search area, determine the position coordinates of each key point on the annotation box of the resource search area in the game scene coordinate system as the position of the resource search area in the target scene map.
[0171] Optionally, inFigure 12 Based on the game assistance device shown, the orientation determination module 1202 is specifically configured to:
[0172] Determine the angular range between the target virtual character and the candidate resource search area according to the target position and the positions of each key point on the annotation box of the candidate resource search area in the game scene;
[0173] Determine whether the target orientation angle is within the angular range; if so, determine that the target virtual character is facing the candidate resource search area; if not, determine that the target virtual character is not facing the candidate resource search area.
[0174] Optionally, based on the game assistance device shown, the position determination module 1203 is specifically configured to: Figure 12 Based on the game assistance device shown, the position determination module 1203 is specifically configured to:
[0175] Determine the horizontal distance between the target virtual character and the candidate resource search area according to the abscissa in the target position and the maximum abscissa and minimum abscissa corresponding to the candidate resource search area; the maximum abscissa and minimum abscissa corresponding to the candidate resource search area are respectively the maximum value and the minimum value of the abscissas corresponding to each key point on the annotation box of the candidate resource search area;
[0176] Determine the vertical distance between the target virtual character and the candidate resource search area according to the ordinate in the target position and the maximum ordinate and minimum ordinate corresponding to the candidate resource search area; the maximum ordinate and minimum ordinate corresponding to the candidate resource search area are respectively the maximum value and the minimum value of the ordinates corresponding to each key point on the annotation box of the candidate resource search area;
[0177] Determine the distance between the target virtual character and the candidate resource search area according to the horizontal distance and vertical distance between the target virtual character and the candidate resource search area.
[0178] Optionally, based on the game assistance device shown, the return prompt module 1204 is specifically configured to: Figure 12 Based on the game assistance device shown, the return prompt module 1204 is specifically configured to:
[0179] If the target virtual character has not entered the candidate resource search area during the target game process, determine that the access state of the target virtual character to the candidate resource search area is the first access state; the target game process is the game process in which the target virtual character is located;
[0180] If the target virtual character is currently inside the candidate resource search area, determine that the access state of the target virtual character to the candidate resource search area is the second access state;
[0181] If the target virtual character has left the candidate resource search area but is within the preset distance range corresponding to the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the third access status;
[0182] If the target virtual character has left the candidate resource search area and is outside the preset distance range corresponding to the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the fourth access status.
[0183] Optionally, based on the Figure 12 game assistance device shown, the return prompt module 1204 is specifically configured to:
[0184] If the orientation determination result of the target virtual character relative to the candidate resource search area indicates that the target virtual character is facing the candidate resource search area, and the position determination result of the target virtual character relative to the candidate resource search area indicates that the target virtual character is approaching the candidate resource search area, and the access status of the target virtual character to the candidate resource search area is the third access status or the fourth access status, determine that the target virtual character returns to the candidate resource search area.
[0185] Optionally, based on the Figure 12 game assistance device shown, the return prompt module 1204 is specifically configured to:
[0186] If the orientation determination result of the target virtual character relative to the candidate resource search area indicates that the target virtual character is facing the candidate resource search area, and the position determination result of the target virtual character relative to the candidate resource search area indicates that the target virtual character is approaching the candidate resource search area, and the access status of the target virtual character to the candidate resource search area is the third access status, and the duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the first duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the return distance threshold, determine that the target virtual character returns to the candidate resource search area;
[0187] If the orientation determination result of the target virtual character relative to the candidate resource search area indicates that the target virtual character faces the candidate resource search area, and the position determination result of the target virtual character relative to the candidate resource search area indicates that the target virtual character approaches the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the fourth access state, and the duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the second duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the return distance threshold, then it is determined that the target virtual character returns to the candidate resource search area.
[0188] The above game assistance device innovatively proposes a mechanism for detecting whether a virtual character controlled by a player repeats accessing the same resource search area, and gives corresponding prompts when it detects that a target virtual character is to return to a certain resource search area. Specifically, the game assistance device can comprehensively consider factors such as whether the virtual character faces the resource search area, whether the virtual character approaches the resource search area, and whether the virtual character has accessed the resource search area before, to detect whether the virtual character currently wants to access a resource search area that it has accessed before, and gives relevant prompt information when it detects that the virtual character currently wants to access a resource search area that it has accessed before. Thus, it can prevent the virtual character controlled by the player from repeatedly entering the same resource search area, saving the player's game time and energy, and improving the player's game experience.
[0189] The embodiment of the present application also provides a device for providing game assistance information. This device can specifically be a terminal device or a server. Below, the terminal device and the server provided by the embodiment of the present application will be introduced from the perspective of hardware implementation.
[0190] See Figure 16 , Figure 16 is a schematic structural diagram of the terminal device provided by the embodiment of the present application. As Figure 16 shown, for the sake of convenience of description, only the parts related to the embodiment of the present application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiment of the present application. This terminal can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA), a point of sales (English full name: Point of Sales, English abbreviation: POS), an in-vehicle computer, etc. Taking the terminal as a computer as an example:
[0191] Figure 16 Shown is a block diagram of a part of the structure of a computer related to the terminal provided by the embodiment of the present application. Refer to Figure 16, the computer includes: a Radio Frequency (RF) circuit 1610, a memory 1620, an input unit 1630 (which includes a touch panel 1631 and other input devices 1632), a display unit 1640 (which includes a display panel 1641), a sensor 1650, an audio circuit 1660 (which can be connected to a speaker 1661 and a microphone 1662), a wireless fidelity (WiFi) module 1670, a processor 1680, and a power supply 1690, etc. Those skilled in the art can understand that Figure 16 the computer structure shown in
[0192] does not limit the computer, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. The memory 1620 can be used to store software programs and modules. The processor 1680 executes various functional applications and data processing of the computer by running the software programs and modules stored in the memory 1620. The memory 1620 may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the computer (such as audio data, a phone book, etc.). In addition, the memory 1620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0193] The processor 1680 is the control center of the computer, connects various parts of the entire computer using various interfaces and lines, and executes various functions of the computer and processes data by running or executing the software programs and / or modules stored in the memory 1620, and by calling the data stored in the memory 1620. Optionally, the processor 1680 may include one or more processing units; preferably, the processor 1680 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1680.
[0194] In the embodiment of the present application, the processor 1680 included in the terminal further has the following functions:
[0195] Obtain the target position of the target virtual character in the game scene, and the target orientation angle of the target virtual character in the game scene;
[0196] For the candidate resource search area within the candidate area in the game scenario, determine the orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle; the orientation judgment result is used to represent whether the target virtual character faces the candidate resource search area.
[0197] For the candidate resource search area within the candidate area, determine the position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period; the position judgment result is used to represent whether the target virtual character approaches the candidate resource search area.
[0198] For the candidate resource search area within the candidate area, judge whether the target virtual character returns to the candidate resource search area according to the orientation judgment result and the position judgment result of the target virtual character relative to the candidate resource search area, and the access state of the target virtual character to the candidate resource search area; if so, generate a target prompt message, and the target prompt message is used to prompt that the target virtual character has accessed the candidate resource search area.
[0199] Optionally, the processor 1680 is further configured to execute the steps of any implementation manner of the game assistance method provided in the embodiments of the present application.
[0200] See Figure 17 , Figure 17 FIG. is a schematic structural diagram of a server 1700 provided in an embodiment of the present application. The server 1700 may vary greatly due to configuration or performance differences, and may include one or more central processing units (CPUs) 1722 (for example, one or more processors) and a memory 1732, and one or more storage media 1730 (for example, one or more mass storage devices) for storing application programs 1742 or data 1744. Among them, the memory 1732 and the storage media 1730 may be transient storage or persistent storage. The program stored in the storage media 1730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 1722 may be configured to communicate with the storage media 1730 and execute a series of instruction operations in the storage media 1730 on the server 1700.
[0201] The server 1700 may also include one or more power supplies 1726, one or more wired or wireless network interfaces 1750, one or more input / output interfaces 1758, and / or one or more operating systems such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0202] In the above embodiments, the steps performed by the server may be based on the Figure 17 server structure shown.
[0203] Among them, the CPU 1722 is used to perform the following steps:
[0204] Obtain the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene;
[0205] For the candidate resource search area within the candidate area in the game scene, determine the orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle; the orientation judgment result is used to represent whether the target virtual character faces the candidate resource search area;
[0206] For the candidate resource search area within the candidate area, determine the position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period; the position judgment result is used to represent whether the target virtual character is approaching the candidate resource search area;
[0207] For the candidate resource search area within the candidate area, judge whether the target virtual character returns to the candidate resource search area according to the orientation judgment result and the position judgment result of the target virtual character relative to the candidate resource search area and the access status of the target virtual character to the candidate resource search area; if so, generate a target prompt message, and the target prompt message is used to prompt that the target virtual character has visited the candidate resource search area.
[0208] Optionally, the CPU 1722 may also be used to perform the steps of any implementation manner of the game assistance method provided in the embodiments of the present application.
[0209] The embodiments of the present application also provide a computer-readable storage medium for storing a computer program, and the computer program is used to execute any implementation manner of the game assistance method described in the foregoing embodiments.
[0210] The embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any one of the implementation manners of the game assistance method described in the foregoing various embodiments.
[0211] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0212] In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings, direct couplings, or communication connections shown or discussed with each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can be in electrical, mechanical, or other forms.
[0213] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0214] In addition, each functional unit in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0215] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store computer programs, such as USB flash drives, mobile hard disks, read-only memories (English full name: Read-Only Memory, English abbreviation: ROM), random access memories (English full name: Random Access Memory, English abbreviation: RAM), magnetic disks, or optical discs.
[0216] It should be understood that in this application, "at least one (item)" means one or more, and "multiple" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally means that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0217] As described above, the above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of various embodiments of this application.
Claims
1. A game assistance method, characterized in that, The method includes: Obtaining a target position of a target virtual character in a game scene and a target orientation angle of the target virtual character in the game scene; For a candidate resource search area within a candidate area in the game scene, determining an orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle; the orientation judgment result is used to represent whether the target virtual character faces the candidate resource search area; For the candidate resource search area within the candidate area, determining a position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period; the position judgment result is used to represent whether the target virtual character approaches the candidate resource search area; For the candidate resource search area within the candidate area, judging whether the target virtual character returns to the candidate resource search area according to the orientation judgment result and the position judgment result of the target virtual character relative to the candidate resource search area, and the access state of the target virtual character to the candidate resource search area; if so, generating a target prompt message, where the target prompt message is used to prompt that the target virtual character has accessed the candidate resource search area; Determining the access state of the target virtual character to the candidate resource search area in the following manner: If the target virtual character has not entered the candidate resource search area during a target game process, determining that the access state of the target virtual character to the candidate resource search area is a first access state; the target game process is the game process in which the target virtual character is located; If the target virtual character is currently inside the candidate resource search area, determining that the access state of the target virtual character to the candidate resource search area is a second access state; If the target virtual character has left the candidate resource search area but is within a preset distance range corresponding to the candidate resource search area, determining that the access state of the target virtual character to the candidate resource search area is a third access state; If the target virtual character has left the candidate resource search area and is outside the preset distance range corresponding to the candidate resource search area, determining that the access state of the target virtual character to the candidate resource search area is a fourth access state.
2. The method according to claim 1, characterized in that, The obtaining of the target position of the target virtual character in the game scene includes: Collecting a screenshot of a target game interface from a screen recording video of a target game process; the target game process is the game process in which the target virtual character is located; Intercepting a target mini-map from the screenshot of the target game interface based on the position of a target mini-map area; Matching the target mini-map in a target scene map corresponding to the game scene to determine a target reference position of the target mini-map in the target scene map; Determine the position of the target virtual character in the target scene map according to the target reference position as the target position.
3. The method according to claim 2, characterized in that, Determine the target mini-map area position through the following method: Within a preset period after the start of the target game process, collect multiple frames of reference game interface screenshots from the screen recording video of the target game process; Through the mini-map area detection model, detect the mini-map area position in each frame of the reference game interface screenshot as the reference mini-map area position corresponding to the reference game interface screenshot; Calculate the average mini-map area position according to the reference mini-map area positions corresponding to the multiple frames of reference game interface screenshots as the target mini-map area position.
4. The method according to claim 2, wherein Obtain the target scene map through the following method: Within a preset period after the start of the target game process, collect multiple frames of reference game interface screenshots from the screen recording video of the target game process; Through the scene detection model, detect the scene type corresponding to each frame of the reference game interface screenshot; Determine the target scene type according to the scene types corresponding to the multiple frames of reference game interface screenshots; and obtain the scene map corresponding to the target scene type as the target scene map.
5. The method according to claim 2, wherein The matching of the target mini-map in the target scene map corresponding to the game scene includes: If the target area corresponding to the target mini-map is successfully matched in the target scene map in the previous position detection cycle, then expand the candidate matching area corresponding to the current position detection cycle based on the target area in the target scene map, and match the target mini-map in the target game interface screenshot collected in the current position detection cycle in the candidate matching area; If the target mini-map is not successfully matched in the target scene map in the previous position detection cycle, then perform pooling processing of the same scale on the target mini-map in the target game interface screenshot collected in the current position detection cycle and the target scene map to obtain the target pooled mini-map and the target pooled scene map, and match the target pooled mini-map in the target pooled scene map.
6. The method according to claim 1, wherein The obtaining of the target orientation angle of the target virtual character in the game scene includes: Collect a target game interface screenshot from the screen recording video of the target game process; the target game process is the game process in which the target virtual character is located; Match the orientation angle indication icon in the target game interface screenshot and determine the position of the orientation angle indication icon in the target game interface screenshot; Determine the orientation angle display area in the target game interface screenshot according to the position of the orientation angle indication icon in the target game interface screenshot; Through the angle recognition model, recognize the angle displayed in the orientation angle display area as the target orientation angle.
7. The method according to claim 1, characterized in that, The candidate resource search area is a candidate housing area, and mark the position of the housing area in the target scene map corresponding to the game scene through the following method: Obtain the scene map file corresponding to the target scene map; Parse the housing area layer from the scene map file and perform binarization processing on the housing area layer to obtain a binarized housing area distribution map; Detect the pixel connected regions in the binary house area distribution map through the connected component detection method to obtain the house areas, and determine the annotation frames of the house areas; For each house area, determine the position coordinates of each key point on the annotation frame of the house area in the game scene coordinate system as the position of the house area in the target scene map.
8. The method according to claim 1 or 7, characterized in that, The determination of the orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle includes: Determine the included angle range between the target virtual character and the candidate resource search area according to the target position and the positions of each key point on the annotation frame of the candidate resource search area in the game scene; Judge whether the target orientation angle is within the included angle range; if so, determine that the target virtual character faces the candidate resource search area; if not, determine that the target virtual character does not face the candidate resource search area.
9. The method according to claim 1 or 7, characterized in that Determine the distance between the target virtual character and the candidate resource search area in the following way: Determine the horizontal distance between the target virtual character and the candidate resource search area according to the abscissa in the target position and the maximum abscissa and minimum abscissa corresponding to the candidate resource search area; the maximum abscissa and minimum abscissa corresponding to the candidate resource search area are respectively the maximum value and the minimum value of the abscissas corresponding to each key point on the annotation frame of the candidate resource search area; Determine the vertical distance between the target virtual character and the candidate resource search area according to the ordinate in the target position and the maximum ordinate and minimum ordinate corresponding to the candidate resource search area; the maximum ordinate and minimum ordinate corresponding to the candidate resource search area are respectively the maximum value and the minimum value of the ordinates corresponding to each key point on the annotation frame of the candidate resource search area; Determine the distance between the target virtual character and the candidate resource search area according to the horizontal distance and vertical distance between the target virtual character and the candidate resource search area.
10. The method according to claim 9, characterized in that, The judgment of whether the target virtual character returns to the candidate resource search area according to the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area, and the access state of the target virtual character to the candidate resource search area includes: If the orientation judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character faces the candidate resource search area, and the position judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character approaches the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the third access state or the fourth access state, then determine that the target virtual character returns to the candidate resource search area.
11. The method according to claim 9, characterized in that, Determining whether the target virtual character returns to the candidate resource search area based on the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area, and the access state of the target virtual character to the candidate resource search area, includes: If the orientation judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character faces the candidate resource search area, and the position judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character approaches the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the third access state, and the time duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the first time duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the return distance threshold, then it is determined that the target virtual character returns to the candidate resource search area; If the orientation judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character faces the candidate resource search area, and the position judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character approaches the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the fourth access state, and the time duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the second time duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the return distance threshold, then it is determined that the target virtual character returns to the candidate resource search area.
12. A game auxiliary device, characterized in that, The device includes: An information acquisition module, configured to acquire the target position of the target virtual character in the game scene and the target orientation angle of the target virtual character in the game scene; An orientation judgment module, configured to determine, for a candidate resource search area within a candidate area in the game scene, an orientation judgment result of the target virtual character relative to the candidate resource search area according to the position of the candidate resource search area, the target position, and the target orientation angle; the orientation judgment result is used to indicate whether the target virtual character faces the candidate resource search area; A position judgment module, configured to determine, for the candidate resource search area within the candidate area, a position judgment result of the target virtual character relative to the candidate resource search area according to the distance between the target virtual character and the candidate resource search area in the previous position detection period and the distance between the target virtual character and the candidate resource search area in the current position detection period; the position judgment result is used to indicate whether the target virtual character approaches the candidate resource search area; A return prompt module, which is used to determine whether the target virtual character returns to the candidate resource search area in the candidate area according to the orientation judgment result and position judgment result of the target virtual character relative to the candidate resource search area, and the access status of the target virtual character to the candidate resource search area; if so, generate a target prompt message, where the target prompt message is used to prompt that the target virtual character has visited the candidate resource search area; Specifically, the return prompt module is used for: If the target virtual character has not entered the candidate resource search area during the target game process, determine that the access status of the target virtual character to the candidate resource search area is the first access status; the target game process is the game process in which the target virtual character is located; If the target virtual character is currently inside the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the second access status; If the target virtual character has left the candidate resource search area but is within the preset distance range corresponding to the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the third access status; If the target virtual character has left the candidate resource search area and is outside the preset distance range corresponding to the candidate resource search area, determine that the access status of the target virtual character to the candidate resource search area is the fourth access status.
13. The device according to claim 12, characterized in that, Specifically, the information acquisition module is used for: Collect a screenshot of the target game interface from the recorded screen video of the target game process; the target game process is the game process in which the target virtual character is located; Intercept the target mini-map from the screenshot of the target game interface based on the target mini-map area position; Match the target mini-map in the target scene map corresponding to the game scene, and determine the target reference position of the target mini-map in the target scene map; According to the target reference position, determine the position of the target virtual character in the target scene map as the target position.
14. The device according to claim 13, characterized in that, The device further includes a mini-map area determination module, and the mini-map area determination module is used for: Collect multiple frames of reference game interface screenshots from the recorded screen video of the target game process within a preset time period after the start of the target game process; Detect the position of the mini-map area in each frame of the reference game interface screenshot through a mini-map area detection model as the reference mini-map area position corresponding to the reference game interface screenshot; Calculate the average mini-map area position according to the reference mini-map area positions corresponding to the multiple frames of reference game interface screenshots as the target mini-map area position.
15. The device according to claim 13, characterized in that, The device further includes a scene map acquisition module, and the scene map acquisition module is used for: Collect multiple frames of reference game interface screenshots from the recorded screen video of the target game process within a preset time period after the start of the target game process; Detect the scene type corresponding to each frame of the reference game interface screenshot through a scene detection model; Determine the target scene type according to the scene types corresponding to the multi-frame reference game interface screenshots respectively; and obtain the scene map corresponding to the target scene type as the target scene map.
16. The device according to claim 13, characterized in that The information acquisition module is specifically configured to: If the target area corresponding to the target mini-map is successfully matched in the target scene map in the previous position detection period, expand the candidate matching area corresponding to the current position detection period based on the target area in the target scene map, and match the target mini-map in the target game interface screenshot collected in the current position detection period in the candidate matching area; If the target mini-map is not successfully matched in the target scene map in the previous position detection period, perform pooling processing of the same scale on the target mini-map in the target game interface screenshot collected in the current position detection period and the target scene map to obtain a target pooled mini-map and a target pooled scene map, and match the target pooled mini-map in the target pooled scene map.
17. The device according to claim 12, characterized in that, The information acquisition module is specifically configured to: Collect target game interface screenshots from the screen recording video of the target game process; the target game process is the game process in which the target virtual character is located; Match the orientation angle indicator icon in the target game interface screenshot, and determine the position of the orientation angle indicator icon in the target game interface screenshot; Determine the orientation angle display area in the target game interface screenshot according to the position of the orientation angle indicator icon in the target game interface screenshot; Identify the angle displayed in the orientation angle display area through an angle recognition model as the target orientation angle.
18. The device according to claim 12, characterized in that The device further includes a resource search area annotation module, and the resource search area annotation module is used for: Obtain the scene map file corresponding to the target scene map; Parse out the resource search area layer from the scene map file, and perform binarization processing on the resource search area layer to obtain a binarized resource search area distribution map; Detect the pixel connected areas in the binarized resource search area distribution map through the connected domain detection method to obtain the resource search area, and determine the annotation box of the resource search area; For each resource search area, determine the position coordinates of each key point on the annotation box of the resource search area in the game scene coordinate system as the position of the resource search area in the target scene map.
19. The device according to claim 12 or 18, characterized in that The orientation judgment module is specifically used for: Determine the included angle range between the target virtual character and the candidate resource search area according to the target position and the positions of each key point on the annotation box of the candidate resource search area in the game scene; Judge whether the target orientation angle is within the included angle range; If so, determine that the target virtual character faces the candidate resource search area; if not, determine that the target virtual character does not face the candidate resource search area.
20. The device according to claim 12 or 18, characterized in that, The position judgment module is specifically used for: Determine the horizontal distance between the target virtual character and the candidate resource search area according to the abscissa in the target position, and the maximum abscissa and minimum abscissa corresponding to the candidate resource search area; the maximum abscissa and minimum abscissa corresponding to the candidate resource search area are respectively the maximum value and minimum value of the abscissas corresponding to each key point on the annotation box of the candidate resource search area; Determine the vertical distance between the target virtual character and the candidate resource search area according to the ordinate in the target position, and the maximum ordinate and minimum ordinate corresponding to the candidate resource search area; the maximum ordinate and minimum ordinate corresponding to the candidate resource search area are respectively the maximum value and minimum value of the ordinates corresponding to each key point on the annotation box of the candidate resource search area; Determine the distance between the target virtual character and the candidate resource search area according to the horizontal distance and vertical distance between the target virtual character and the candidate resource search area.
21. The device according to claim 20, wherein The re-entry prompt module is specifically configured to: If the orientation judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character faces the candidate resource search area, and the position judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character approaches the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the third access state or the fourth access state, then determine that the target virtual character re-enters the candidate resource search area.
22. The device according to claim 20, wherein The re-entry prompt module is specifically configured to: If the orientation judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character faces the candidate resource search area, and the position judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character approaches the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the third access state, and the time duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the first time duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the re-entry distance threshold, then determine that the target virtual character re-enters the candidate resource search area; If the orientation judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character faces the candidate resource search area, and the position judgment result of the target virtual character relative to the candidate resource search area indicates that the target virtual character approaches the candidate resource search area, and the access state of the target virtual character to the candidate resource search area is the fourth access state, and the time duration between the current moment and the moment when the target virtual character last left the candidate resource search area exceeds the second time duration threshold, and the distance between the target virtual character and the candidate resource search area is less than the re-entry distance threshold, then determine that the target virtual character re-enters the candidate resource search area.
23. A device, characterized in that, The device includes a processor and a memory; The memory is used to store a computer program; The processor is used to execute the game assistance method according to any one of claims 1 to 11 based on the computer program.
24. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the game assistance method according to any one of claims 1 to 11.
25. A computer program product, characterized in that, The computer program product includes instructions, and when the instructions run on a computer device, the computer device is caused to execute the game assistance method according to any one of claims 1 to 11.