Method and apparatus for detecting abnormal situation in game, and electronic device and storage medium
Patent Information
- Application Number
- PCT/CN2026/081824
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-19
- Filing Date
- 2026-03-06
- Publication Date
- 2026-09-24
Smart Images

Figure CN2026081824_24092026_PF_FP_ABST
Abstract
Description
Methods, devices, electronic equipment, and storage media for detecting anomalies in games.
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510331658.9, filed on March 19, 2025, entitled “Method, Apparatus, Electronic Device and Storage Medium for Detecting Abnormal Situations in Games”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, electronic device, and storage medium for detecting anomalies in games. Background Technology
[0004] In shooting games, players may use cheat software to gain an advantage in competition with other players, achieving higher aiming accuracy. For example, some cheat software reads the enemy's coordinates in the game, calculates the enemy's orientation, and then modifies the memory value corresponding to the camera's orientation through high-frequency memory writes, controlling how the player aims at the enemy. This allows the player to gain an advantage in aiming and defeat opponents more quickly.
[0005] In related technologies, game clients can record gameplay videos before and after a player's kill, then upload them to the game server. The server then provides these videos to reviewers who use their gaming experience to determine if cheat software has been used. Machine learning can also be used to replace manual review with artificial intelligence. However, in most cases, the gameplay of skilled players closely resembles that of players using cheat software, making it difficult to detect and resulting in low accuracy. Furthermore, both manual and AI-based reviews require significant manpower and hardware resources when dealing with large volumes of gameplay videos, leading to high costs and low efficiency. Summary of the Invention
[0006] In view of this, the purpose of this disclosure is to provide a method, device, electronic device and storage medium for detecting abnormal situations in games, so as to improve the accuracy of cheat detection, reduce the cost of cheat detection and improve the efficiency of cheat detection.
[0007] In a first aspect, embodiments of this disclosure provide a method for detecting abnormal situations in a game, which provides a graphical user interface through a terminal device; the method includes: acquiring game data; determining current game state information based on the game data; the current game state information includes preset first orientation data of a virtual camera; the virtual camera is bound to a controlled virtual character in the game scene; the orientation of the virtual camera corresponds to the aiming direction of a virtual prop carried by the controlled virtual character in the game scene; after rendering and generating a first game scene image based on the current game state information, acquiring second orientation data of the virtual camera; and determining whether an abnormal situation has occurred based on the first orientation data and the second orientation data.
[0008] Secondly, embodiments of this disclosure provide an anomaly detection device in a game, which provides a graphical user interface through a terminal device; the device includes: a game state information determination module, configured to acquire game data and determine current game state information based on the game data; the current game state information includes preset first orientation data of a virtual camera; the virtual camera is bound to a controlled virtual character in the game scene; the orientation of the virtual camera corresponds to the aiming direction of a virtual prop carried by the controlled virtual character in the game scene; a second orientation data determination module, configured to acquire second orientation data of the virtual camera after rendering and generating a first game scene screen based on the current game state information; and an anomaly judgment module, configured to determine whether an anomaly has occurred based on the first orientation data and the second orientation data.
[0009] Thirdly, this disclosure provides an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described abnormal situation detection method in the game.
[0010] Fourthly, embodiments of this disclosure provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described abnormal situation detection method in the game.
[0011] The embodiments disclosed herein bring the following beneficial effects:
[0012] The aforementioned method, device, electronic device, and storage medium for detecting anomalies in games acquire game data, determine the current game state information based on the game data, and include preset first orientation data of a virtual camera; after rendering a first game scene based on the current game state information, acquire second orientation data of the virtual camera; and determine whether an anomaly has occurred based on the first and second orientation data. This method, by comparing the orientation data of the virtual camera before and after rendering the graphical user interface, can determine whether any cheat software has rewritten the virtual camera's orientation data during the interface rendering process, thus improving the accuracy, reducing the cost, and increasing the efficiency of cheat detection.
[0013] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure are realized and obtained through the structures particularly pointed out in the description, claims and drawings.
[0014] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this disclosure, the accompanying drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 is a flowchart of one of the abnormal situation detection methods in a game provided by an embodiment of this disclosure;
[0017] Figure 2 is a schematic diagram of the composition of one of the game frames provided in the embodiments of this disclosure;
[0018] Figure 3 is a schematic diagram of the structure of one of the abnormal situation detection devices in a game provided in the embodiments of this disclosure;
[0019] Figure 4 is a schematic diagram of the structure of one of the electronic devices provided in the embodiments of this disclosure. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0021] Aimbots are a common form of cheating software in shooting games. These programs allow players to quickly and accurately aim at enemies, severely impacting game balance. Furthermore, because the camera movement logic resides entirely on the game client, it's difficult for the game server to develop a reliable and accurate detection system for aimbots.
[0022] In shooting games, cheaters often use cheat software with features like aimbots and teleportation to gain an advantage over other players. Detecting aimbots, in particular, is notoriously difficult because unlike teleportation, aimbots don't have obvious distinguishing characteristics. In many cases, the performance of skilled players closely resembles that of those using aimbots. Therefore, accurately detecting aimbots without harming legitimate players is crucial for maintaining a fair gaming environment.
[0023] In related technologies, the game client records gameplay videos before and after a player's kill, then uploads them to the game server. The server then submits the videos to reviewers who use their gaming experience to determine whether the player is using aimbots or performs machine learning based on the videos, using artificial intelligence to replace manual review.
[0024] The above solution has the following disadvantages:
[0025] 1. The accuracy of aimbot detection is difficult to achieve a satisfactory level. The higher the skill level of the player, the closer their shooting performance in the game is to aimbots. Whether it is human review or artificial intelligence judgment, they can only give an ambiguous judgment in this case.
[0026] 2. Whether it is manual review or artificial intelligence review, a lot of human or machine hardware resources are needed when dealing with a massive amount of game videos.
[0027] 3. In terms of detection speed, AI review is faster than human review, but it still requires a certain time period to make a judgment. At least several minutes of game video need to be played completely before a conclusion can be drawn.
[0028] Based on this, the present disclosure provides a method, apparatus, electronic device and storage medium for detecting abnormal situations in games. This technology can be applied to scenarios that require cheat detection.
[0029] In one embodiment of this disclosure, the game anomaly detection method can run on a local terminal device or a server. When the game anomaly detection method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0030] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of the abnormal situation detection method in the game are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0031] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0032] Referring to Figure 1, a method for detecting abnormal situations in a game provided by an embodiment of this disclosure will be described first. The method includes the following steps:
[0033] Step S102: Obtain game data and determine the current game state information based on the game data; the current game state information includes the preset first orientation data of the virtual camera; the virtual camera is bound to the controlled virtual character in the game scene; the orientation of the virtual camera corresponds to the aiming direction of the virtual props carried by the controlled virtual character in the game scene.
[0034] The aforementioned game data can include various types. Specifically, it can be game data generated by the game server based on instructions from various terminal devices controlling virtual characters within the game scene. It can also include preset information within the game scene, such as the position and display effects of certain scene objects. The specific settings can be configured according to requirements and are not limited here.
[0035] After obtaining game data, it can typically be processed based on preset calculation logic to determine the current game state information. This current game state information can include the position and state of various virtual objects in the game scene. Virtual objects can be virtual characters, non-biological objects, etc. The state of a virtual character can be such as being in a skill-casting state or under attack. Non-biological objects can be in a damaged state, etc.
[0036] The current game status information typically includes the initial orientation data of the virtual camera bound to the controlled virtual character on the current terminal device. The orientation of the virtual camera usually represents the field of view of the controlled virtual character in the game scene. The scene view of the game scene displayed on the terminal device can be considered as a picture taken by the virtual camera of the game scene. When the controlled virtual character carries virtual items, and these virtual items can be used for aiming and shooting, the orientation of the virtual camera corresponds to the aiming direction of the virtual items carried by the controlled virtual character in the game scene.
[0037] Step S104: After rendering and generating the first game scene based on the current game state information, obtain the second orientation data of the virtual camera.
[0038] After determining the current game state information, it's possible to determine which virtual objects in the game scene need to be displayed in the graphical user interface, and what state those virtual objects should be in, thereby determining the rendering parameters. Based on these rendering parameters, the first game scene screen is then rendered and generated in the graphical user interface.
[0039] The process of acquiring game data, determining the current game state based on that data, and then rendering the first game scene based on that state can be viewed as generating a game frame. This process can be divided into two parts: generating a logical frame (determining the current game state based on game data) and generating a rendering frame (rendering the first game scene based on the current game state). After generating the first game scene, the process of generating game frames is usually repeated to create another game scene, causing changes in the game scene displayed in the graphical user interface and providing players with a dynamic visual experience.
[0040] The current game state information is usually stored in a corresponding memory address. During the rendering process, the game program itself does not modify the game state information. If the camera orientation parameter in the current game state information changes during the rendering of the graphical user interface based on the current game state information, it can be assumed that in addition to the game program, other programs have changed the camera orientation parameter. This process can usually be regarded as a "cheating" process.
[0041] After generating the first game scene, it is necessary to immediately acquire the current orientation data of the virtual camera. To distinguish it from the first orientation data mentioned above, the acquired orientation data is referred to as "second orientation data." Acquiring the second orientation data typically requires reading the memory address used to store the camera's orientation data to obtain the required data.
[0042] After generating the first game scene, it is usually necessary to acquire game data again, update the current game state information based on the game data, and then render the graphical user interface based on the updated current game state information, so that it updates the displayed scene. By performing this step at a set frequency, continuous screen changes can be formed, bringing players a dynamic visual experience.
[0043] The second orientation parameter of the virtual camera can be obtained directly after the function that generates the first game scene image finishes execution, or it can be obtained when game data acquisition is detected to resume. When both the rendering process and the process of determining the current scene information are implemented through functions, the timing of obtaining the second orientation parameter can be either when the function used for rendering ends or when the function used for determining the current scene information begins. The specific timing can be set according to requirements and is not limited here.
[0044] Step S106: Based on the first orientation data and the second orientation data, determine whether an abnormal situation has occurred.
[0045] Since game programs typically do not change the current game state information during rendering, a discrepancy between the first orientation data and the second orientation data indicates an anomaly. If they match, no anomaly is considered to have occurred.
[0046] The aforementioned method for detecting anomalies in games involves acquiring game data and determining the current game state information based on this data. The current game state information includes preset first orientation data of the virtual camera. After rendering a first game scene based on the current game state information, second orientation data of the virtual camera is acquired. Based on the first and second orientation data, it is determined whether an anomaly has occurred. This method, by comparing the orientation data of the virtual camera before and after rendering the graphical user interface, can determine whether any cheat software has rewritten the virtual camera's orientation data during the interface rendering process. This improves the accuracy of cheat detection, reduces the cost of cheat detection, and increases the efficiency of cheat detection.
[0047] The following embodiments provide a specific method for determining the current game state information based on game data.
[0048] In practical applications, game programs typically pre-define logical calculation functions to determine the current game state based on game data. These functions can be multiple or a single; there is no restriction. Specifically, the logical calculation function is run based on the game data to determine the current game state. Upon completion of the logical calculation function, the first orientation data of the virtual camera is acquired. After the logical calculation function finishes running, the game program does not actively change the current game state information.
[0049] In practical applications, logical computation functions typically include a termination function. Once the termination function has finished executing, the logical computation function can be considered to have finished running. Therefore, in response to the termination function of the logical computation function, data can be read from the memory address, and the read data can be determined as the first orientation data of the virtual camera.
[0050] To obtain the first orientation parameter, it is typically necessary to determine the memory address of the virtual camera's orientation data. The logical calculation function usually includes a camera orientation-related function, which can be located first. Then, based on the camera orientation-related function, the memory address of the virtual camera's orientation data is determined. This memory address is used to store either the virtual camera's first or second orientation data. Specifically, the logic of the camera orientation-related function can be parsed to determine which memory address to store the virtual camera's orientation data, and this memory address is then identified as the virtual camera's orientation data memory address.
[0051] The following embodiments provide a specific method for obtaining second orientation data of a virtual camera after generating a first game scene.
[0052] As mentioned above, after generating the first game scene, the current game state information is typically updated based on the updated game data using a logic calculation function. The second orientation data of the virtual camera can be obtained when the logic calculation function starts running.
[0053] In practical applications, logical computation functions typically include a start function. When the start function begins running, the logical computation function can be considered to have started running. Therefore, in response to the start function of the logical computation function, data can be read from the memory address, and the read data can be determined as the second orientation data of the virtual camera.
[0054] Similar to obtaining the first orientation data of the virtual camera, it is necessary to read the data in the memory address of the virtual camera's orientation data and determine the read data as the second orientation data of the virtual camera.
[0055] The following embodiments provide a specific method for determining whether an abnormal situation has occurred based on first orientation data and second orientation data.
[0056] In practice, the first orientation data and the second orientation data can be compared. If the first orientation data and the second orientation data are inconsistent, an anomaly is determined to have occurred; if the first orientation data and the second orientation data are consistent, no anomaly is determined to have occurred.
[0057] When this method is applied to a terminal device, if an abnormal situation occurs, relevant information about the abnormal situation, such as the time of occurrence, the identifier of the rendered scene, and the two orientation data being compared, can be recorded in the log. The game account and virtual camera orientation data of the terminal device can then be sent to the game server so that the game server can handle the situation.
[0058] The following embodiments illustrate specific applications in games, and the method is implemented based on the method shown in Figure 1. This method greatly improves detection accuracy and speed; that is, the detection accuracy is extremely high, with no false positives found in actual testing, and the detection speed is fast, completing the process within seconds. Furthermore, it does not require additional human or hardware resources, thus significantly saving costs.
[0059] The principle of aimbot cheats is to read enemy coordinate information from game memory outside the game process, calculate the camera orientation of the enemy to be aimed at through a series of world coordinate transformations, and finally modify the memory value corresponding to the camera orientation (equivalent to "virtual camera orientation data") through high-frequency memory writes outside the process, thereby controlling the player's camera orientation to aim at the enemy, so that the cheat player can gain an advantage in aiming and defeat the opponent faster.
[0060] Aimbots have the following characteristics:
[0061] 1. Modified the memory settings for camera orientation in the game.
[0062] 2. High-frequency memory write modifications.
[0063] Since players modify the memory value corresponding to the camera orientation when they move the camera normally in the game, the key to detecting aimbot cheats lies in how to distinguish whether the modification of game memory comes from the player's normal operation or from the memory writing and modification by the cheat.
[0064] Therefore, the second characteristic of cheats needs to be utilized: high-frequency memory write and modification. Since the cheat itself needs to take over control of the game's camera orientation, and the enemy's position in shooting games is often constantly changing, aimbots need to continuously modify the memory values corresponding to the camera orientation at a high frequency so that the camera is aimed in the desired direction.
[0065] At this point, the logical frame feature of the game engine can be utilized, which means that changes in the game's logic occur within a fixed time interval. Outside of this interval, during the rendering process, the game itself will not make any modifications to the logic-related memory values in memory.
[0066] The specific detection approach is as follows: If there are any abnormal changes in the memory data corresponding to the player's camera orientation within a time interval outside of the logical frames in the game (i.e., the process of acquiring game data and determining the current game state information based on that data), it can be determined that an aimbot is being used. In other words, if the memory data corresponding to the player's camera orientation changes during the rendering of the first game scene based on the current game state information, it can be determined that an aimbot is being used.
[0067] Just as video frames are stitched together, game frames are also composed of game frames that combine to form a complete game image on the screen. A complete game frame (also called a "game engine frame") contains logic frames and rendering frames, which are responsible for calculating game logic and rendering visuals, respectively. Logic frames execute before rendering frames, and their execution time within a game frame is approximately 9:1. Therefore, there can be a small time interval between two adjacent logic frames, as shown in Figure 2.
[0068] As mentioned above, in order to take over control of the game's camera orientation, aimbots modify the data in the memory address where the virtual camera's orientation data is located at a relatively high frequency. From the perspective of the game frame, the timing of the cheat's writing is observed, that is, when it writes to the game memory during the rendering frame, as shown in Figure 2.
[0069] Because of the inherent characteristics of game frames—logic frames take significantly longer to occupy than rendering frames—most of the time when cheat programs write to memory falls within logical frames, with a small portion falling within rendering frames. The game's own logic also modifies the camera orientation, and this logic occurs within logical frames, typically implemented by camera orientation-related functions within pre-defined logic calculation functions. Therefore, when a cheat program writes to memory within a logical frame's timeframe, it's impossible to distinguish whether the change in camera orientation is abnormal. Only when the cheat program writes to memory within a rendering frame's timeframe can an abnormal change in camera orientation be definitively determined by the inconsistency between the camera orientation data at the end of the previous logical frame (equivalent to the "first orientation data" mentioned above) and the camera orientation data at the beginning of the current logical frame (equivalent to the "second orientation data" mentioned above).
[0070] Aimbots are generally not turned off once they are enabled. Even if the cheat only modifies the camera orientation when shooting, the time it usually takes for players to engage in a firefight in a shooting game is between 3 and 5 seconds. Based on a frame rate of 30 frames per second, there are about 100 frames of data that can be used to determine whether the cheat is modifying the camera orientation. As long as the cheat's memory modification falls within the time interval of the rendering frame, it will be detected.
[0071] To monitor the memory data corresponding to the player's camera orientation during time intervals outside of normal game logic frames, it is necessary to obtain the memory address corresponding to the current player's camera orientation data, access this memory address at the beginning and end of the game logic frame, and record the data.
[0072] Specifically, this is achieved through the following methods:
[0073] 1. Locate the function related to camera orientation logic in the game engine. Specifically, it can be a camera orientation function. Based on the function logic, obtain the memory address corresponding to the current player's camera orientation data, and save this memory address for easy access later.
[0074] 2. In the game engine code, when the logical frame starts and ends, the camera orientation data corresponding to the memory address obtained in step one is accessed. At this time, the camera orientation data at the start and end of the current logical frame can be obtained.
[0075] 3. During the execution of each frame of data, it is only necessary to save the camera orientation data at the end of the previous logical frame and the camera orientation data at the beginning of the current logical frame, and then compare these two sets of data. Based on the characteristics of game logical frames, under normal circumstances, these two sets of data should be completely consistent.
[0076] 4. When the camera orientation data at the end of the previous logical frame is inconsistent with the camera orientation data at the beginning of the current logical frame, a log is recorded, and the player's ID and camera orientation information are reported to the server. After receiving the log, the server will impose corresponding penalties on the player.
[0077] This method only requires accessing a specific memory address at the start and end times of the game's logic frame to detect aimbots, significantly reducing the performance overhead of anti-cheat logic. Since most current game engines operate on a frame update loop, this approach is highly versatile.
[0078] For the above method embodiments, refer to Figure 3, which shows an anomaly detection device in a game. The device includes:
[0079] The game status information determination module 302 is configured to acquire game data and determine the current game status information based on the game data. The current game status information includes the preset first orientation data of the virtual camera; the virtual camera is bound to the controlled virtual character in the game scene; the orientation of the virtual camera corresponds to the aiming direction of the virtual props carried by the controlled virtual character in the game scene.
[0080] The second orientation data determination module 306 is configured to obtain the second orientation data of the virtual camera after rendering and generating the first game scene screen based on the current game state information;
[0081] The abnormal situation judgment module 308 is configured to perform a judgment based on the first orientation data and the second orientation data to determine whether an abnormal situation has occurred.
[0082] The aforementioned anomaly detection device in a game acquires game data and, based on this data, determines the current game state information. This current game state information includes preset first orientation data of a virtual camera. After rendering a first game scene based on the current game state information, second orientation data of the virtual camera is acquired. Based on the first and second orientation data, it is determined whether an anomaly has occurred. This method, by comparing the orientation data of the virtual camera before and after rendering the graphical user interface, can determine whether any cheat software has rewritten the virtual camera's orientation data during the interface rendering process. This improves the accuracy of cheat detection, reduces the cost of cheat detection, and increases the efficiency of cheat detection.
[0083] Optionally, the above device further includes: a first memory address determination module, configured to determine the memory address of the virtual camera's orientation data; the second orientation data determination module is further configured to: read data from the memory address and determine the read data as the second orientation data of the virtual camera.
[0084] Optionally, the game state information determination module is further configured to: run a preset logic calculation function based on game data to determine the current game state information; and obtain the first orientation data of the virtual camera in response to the end of the logic calculation function.
[0085] Optionally, the aforementioned second orientation data acquisition module is further configured to perform: after generating the first game scene screen, update the game data, and based on the updated game data, run a preset logic calculation function to update the current game state information; in response to the start of the logic calculation function, acquire the second orientation data of the virtual camera.
[0086] Optionally, the aforementioned preset logical calculation function includes a camera orientation related function; the aforementioned device further includes: a second memory address determination module, configured to execute a function based on the camera orientation to determine the memory address of the virtual camera's orientation data, the memory address being used to store the virtual camera's first orientation data or second orientation data.
[0087] Optionally, the game state information determination module is also configured to perform the following: in response to the end of the execution of the logic calculation function, read the data in the memory address and determine the read data as the first orientation data of the virtual camera.
[0088] Optionally, the aforementioned second orientation data determination module is further configured to perform: in response to the start function of the logical calculation function, read data from the memory address and determine the read data as the second orientation data of the virtual camera.
[0089] Optionally, the above-mentioned anomaly judgment module is also configured to perform: comparing the first orientation data and the second orientation data; if the first orientation data and the second orientation data are inconsistent, determine that an anomaly has occurred; if the first orientation data and the second orientation data are consistent, determine that no anomaly has occurred.
[0090] Optionally, the above-mentioned device is installed on a terminal device; the above-mentioned device further includes: an orientation data transmission module, configured to send the orientation data of the game account and virtual camera running on the terminal device to the game server if an abnormal situation occurs.
[0091] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-mentioned abnormal situation detection method in the game, for example:
[0092] Acquire game data, and based on the game data, determine the current game state information; the current game state information includes the first orientation data of the preset virtual camera; the virtual camera is bound to the controlled virtual character in the game scene; the orientation of the virtual camera corresponds to the aiming direction of the virtual props carried by the controlled virtual character in the game scene; after rendering and generating the first game scene screen based on the current game state information, acquire the second orientation data of the virtual camera; based on the first orientation data and the second orientation data, determine whether an abnormal situation has occurred.
[0093] The above method, by comparing whether the orientation data of the virtual camera before and after rendering the graphical user interface is consistent, can determine whether any external software has rewritten the orientation data of the virtual camera during the interface rendering process. This improves the accuracy of external software detection, reduces the cost of external software detection, and increases the efficiency of external software detection.
[0094] Optionally, the above method further includes: determining the memory address of the virtual camera's orientation data; and obtaining the second orientation data of the virtual camera, including: reading the data in the memory address and determining the read data as the second orientation data of the virtual camera.
[0095] Optionally, the steps for determining the current game state information based on game data include: running a preset logic calculation function based on game data to determine the current game state information; and obtaining the first orientation data of the virtual camera in response to the end of the logic calculation function.
[0096] Optionally, the step of obtaining the second orientation data of the virtual camera after the first game scene is generated based on the game data includes: after generating the first game scene, updating the game data; based on the updated game data, running a preset logic calculation function to update the current game state information; and in response to the start of the logic calculation function, obtaining the second orientation data of the virtual camera.
[0097] Optionally, the aforementioned preset logical calculation function includes a camera orientation related function; the method further includes: determining the memory address of the virtual camera's orientation data based on the camera orientation related function; the memory address is used to store the virtual camera's first orientation data or second orientation data.
[0098] Optionally, the above-mentioned response to the end of the logical calculation function to obtain the first orientation data of the virtual camera includes: in response to the end of the execution of the logical calculation function, reading the data in the memory address and determining the read data as the first orientation data of the virtual camera.
[0099] Optionally, the above-mentioned response to the start of the logical calculation function to obtain the second orientation data of the virtual camera includes: in response to the start of the start function of the logical calculation function, reading the data in the memory address and determining the read data as the second orientation data of the virtual camera.
[0100] Optionally, the above steps for determining whether an abnormal situation has occurred based on the first orientation data and the second orientation data include: comparing the first orientation data and the second orientation data; if the first orientation data and the second orientation data are inconsistent, determining that an abnormal situation has occurred; if the first orientation data and the second orientation data are consistent, determining that no abnormal situation has occurred.
[0101] Optionally, the above method is applied to the terminal device; the above method further includes: if an abnormal situation occurs, sending the game account running on the terminal device and the orientation data of the virtual camera to the game server.
[0102] Referring to Figure 4, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the abnormal situation detection method in the above game.
[0103] Furthermore, the electronic device shown in Figure 4 also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103, and the memory 101 connected via the bus 102.
[0104] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only a single bidirectional arrow is used in Figure 4, but this does not indicate that there is only one bus or one type of bus.
[0105] The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The methods disclosed in the embodiments of this disclosure can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information in memory 101 and, in conjunction with its hardware, completes the method of the aforementioned embodiments.
[0106] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the abnormal situation detection method in the above-mentioned game.
[0107] This disclosure provides a method, apparatus, and electronic device for detecting abnormal situations in games, including a computer-readable storage medium storing program code. The program code includes instructions that can be used to execute the methods described in the preceding method embodiments, for example:
[0108] Acquire game data, and based on the game data, determine the current game state information; the current game state information includes the first orientation data of the preset virtual camera; the virtual camera is bound to the controlled virtual character in the game scene; the orientation of the virtual camera corresponds to the aiming direction of the virtual props carried by the controlled virtual character in the game scene; after rendering and generating the first game scene screen based on the current game state information, acquire the second orientation data of the virtual camera; based on the first orientation data and the second orientation data, determine whether an abnormal situation has occurred.
[0109] The above method, by comparing whether the orientation data of the virtual camera before and after rendering the graphical user interface is consistent, can determine whether any external software has rewritten the orientation data of the virtual camera during the interface rendering process. This improves the accuracy of external software detection, reduces the cost of external software detection, and increases the efficiency of external software detection.
[0110] Optionally, the above method further includes: determining the memory address of the virtual camera's orientation data; and obtaining the second orientation data of the virtual camera, including: reading the data in the memory address and determining the read data as the second orientation data of the virtual camera.
[0111] Optionally, the steps for determining the current game state information based on game data include: running a preset logic calculation function based on game data to determine the current game state information; and obtaining the first orientation data of the virtual camera in response to the end of the logic calculation function.
[0112] Optionally, the step of obtaining the second orientation data of the virtual camera after the first game scene is generated based on the game data includes: after generating the first game scene, updating the game data; based on the updated game data, running a preset logic calculation function to update the current game state information; and in response to the start of the logic calculation function, obtaining the second orientation data of the virtual camera.
[0113] Optionally, the aforementioned preset logical calculation function includes a camera orientation related function; the method further includes: determining the memory address of the virtual camera's orientation data based on the camera orientation related function; the memory address is used to store the virtual camera's first orientation data or second orientation data.
[0114] Optionally, the above-mentioned response to the end of the logical calculation function to obtain the first orientation data of the virtual camera includes: in response to the end of the execution of the logical calculation function, reading the data in the memory address and determining the read data as the first orientation data of the virtual camera.
[0115] Optionally, the above-mentioned response to the start of the logical calculation function to obtain the second orientation data of the virtual camera includes: in response to the start of the start function of the logical calculation function, reading the data in the memory address and determining the read data as the second orientation data of the virtual camera.
[0116] Optionally, the above steps for determining whether an abnormal situation has occurred based on the first orientation data and the second orientation data include: comparing the first orientation data and the second orientation data; if the first orientation data and the second orientation data are inconsistent, determining that an abnormal situation has occurred; if the first orientation data and the second orientation data are consistent, determining that no abnormal situation has occurred.
[0117] Optionally, the above method is applied to the terminal device; the above method further includes: if an abnormal situation occurs, sending the game account running on the terminal device and the orientation data of the virtual camera to the game server.
[0118] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0119] Furthermore, in the description of the embodiments of this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure based on the specific circumstances.
[0120] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this disclosure, or the parts that contribute to related technologies, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0121] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0122] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for detecting abnormal situations in a game, the method comprising: Acquire game data, and determine the current game state information based on the game data; The current game status information includes the preset first orientation data of the virtual camera; The virtual camera is bound to a controlled virtual character in the game scene; The orientation of the virtual camera corresponds to the aiming direction of the virtual props carried by the controlled virtual character in the game scene; After rendering and generating the first game scene based on the current game state information, the second orientation data of the virtual camera is obtained; Based on the first orientation data and the second orientation data, determine whether an abnormal situation has occurred.
2. The method according to claim 1, wherein, The method further includes: Determine the memory address of the virtual camera's orientation data; The step of obtaining the second orientation data of the virtual camera includes: Read the data from the memory address and determine the read data as the second orientation data of the virtual camera.
3. The method according to claim 1, wherein, The steps for determining the current game state information based on the game data include: Based on the game data, a preset logical calculation function is run to determine the current game state information; In response to the completion of the logical calculation function, the first orientation data of the virtual camera is obtained.
4. The method according to claim 1, wherein, The step of obtaining the second orientation data of the virtual camera after rendering and generating the first game scene based on the game data includes: After generating the first game scene screen, the game data is updated, and based on the updated game data, a preset logical calculation function is run to update the current game state information; In response to the start of the logical calculation function, the second orientation data of the virtual camera is acquired.
5. The method according to claim 3 or 4, wherein, The preset logical calculation function includes a camera orientation related function; The method further includes: Based on the camera orientation correlation function, the memory address of the virtual camera's orientation data is determined, and the memory address is used to store the first orientation data or the second orientation data of the virtual camera.
6. The method according to claim 5, wherein, The step of obtaining the first orientation data of the virtual camera in response to the completion of the logical calculation function includes: In response to the termination of the logic calculation function, the data in the memory address is read and the read data is determined as the first orientation data of the virtual camera.
7. The method according to claim 5, wherein, The step of acquiring the second orientation data of the virtual camera in response to the start of the logical calculation function includes: In response to the start function of the logical calculation function, the data in the memory address is read and the read data is determined as the second orientation data of the virtual camera.
8. The method according to claim 1, wherein, The step of determining whether an abnormal situation has occurred based on the first orientation data and the second orientation data includes: Compare the first orientation data and the second orientation data; If the first orientation data is inconsistent with the second orientation data, an anomaly is determined. If the first orientation data is consistent with the second orientation data, it is determined that no abnormality has occurred.
9. The method according to claim 1, wherein, The method is applied to terminal devices; The method further includes: If an anomaly occurs, the game account running on the terminal device and the orientation data of the virtual camera are sent to the game server.
10. An anomaly detection device in a game, the device comprising: The game status information determination module is configured to acquire game data and determine the current game status information based on the game data. The current game state information includes preset first orientation data of the virtual camera; the virtual camera is bound to a controlled virtual character in the game scene; The orientation of the virtual camera corresponds to the aiming direction of the virtual props carried by the controlled virtual character in the game scene; The second orientation data determination module is configured to obtain the second orientation data of the virtual camera after rendering and generating the first game scene based on the current game state information; The abnormal situation judgment module is configured to determine whether an abnormal situation has occurred based on the first orientation data and the second orientation data.
11. An electronic device comprising a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the abnormal situation detection method in a game according to any one of claims 1-9.
12. A machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the abnormal situation detection method in a game as described in any one of claims 1-9.