Game element identification method, electronic equipment and computer program product
By directly analyzing the texture information, vertex information, and transformation matrix information in the data stream of game applications, the problem of slow speed and low accuracy of game element recognition in existing technologies is solved, and efficient and accurate game element recognition is achieved.
Patent Information
- Application Number
- CN202410861080.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-12-30
AI Technical Summary
Existing methods for identifying game elements suffer from problems such as high system resource consumption, slow recognition speed, low recognition rate, and susceptibility to differences in display device screen size and graphic complexity.
By reading the data stream of the target game application, texture information, vertex information, and transformation matrix information are extracted. The game data is directly analyzed by using texture data labels or texture binary data, vertex data, or vertex index cache objects for identification, thus avoiding the system overhead and data stretching and distortion of screenshots and image recognition.
It achieves fast and accurate game element recognition, reduces the consumption of system resources, improves the recognition rate, and avoids deviations caused by stretching and deformation of display data.
Smart Images

Figure CN121236655A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to methods for identifying game elements, electronic devices, and computer program products. Background Technology
[0002] For third-party game enhancements, a crucial requirement is the identification of game elements, but game developers haven't provided open interfaces for third-party use. Current technologies primarily rely on screenshots combined with image recognition, but this approach has drawbacks. Firstly, screenshotting and image recognition are resource-intensive, impacting system speed and response time, hindering efficient element identification. Secondly, variations in screen size cause image stretching, reducing the accuracy of image recognition from screenshots. Furthermore, the accuracy drops further when the surrounding graphics of the target game element are complex. In short, limitations in graphic complexity and display resolution significantly reduce the accuracy of game element identification. Summary of the Invention
[0003] The main purpose of this application is to provide a method, electronic device, and computer program product for identifying game elements, addressing the technical problem of how to accurately and efficiently identify game elements.
[0004] To at least achieve the above objectives, this application provides a game element identification method, comprising: reading a data stream to be identified from a target game application; extracting target image drawing description parameters from the data stream to be identified, wherein the type of the target image drawing description parameters includes at least two of texture information, vertex information, and transformation matrix information, wherein the texture information is identified through a texture data label or texture binary data, and the vertex information is identified through vertex data or a vertex index cache object; and identifying target game elements based on the target image drawing description parameters.
[0005] In addition, to at least achieve the above objectives, this application also provides an electronic device, the electronic device comprising: a memory, a processor, and a game element recognition program stored in the memory and executable on the processor, wherein the game element recognition program, when executed by the processor, implements the game element recognition method as described above.
[0006] In addition, to at least achieve the above objectives, this application also provides a computer-readable storage medium storing a game element recognition program, which, when executed by a processor, implements the game element recognition method as described above.
[0007] In addition, to at least achieve the above objectives, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the game element recognition method described above.
[0008] This application provides a game element identification method, electronic device, and computer program product. The technical solution of this application involves reading the data stream of a target game application and extracting target image rendering description parameters from it. These parameters include at least two of the following: texture information, vertex information, and transformation matrix information. Texture information is identified using texture data labels or texture binary data, while vertex information is identified using vertex data or vertex index cache objects. Then, the target game element is identified based on the extracted target image rendering description parameters. This application identifies target game elements based on the extracted target image rendering description parameters, enabling direct data processing and comprehensive judgment. It operates quickly with minimal impact on system operation. Furthermore, it directly analyzes game data, eliminating data deviations caused by display data stretching or distortion, resulting in high accuracy. Therefore, it can accurately and efficiently identify the target game element requiring identification. Attached Figure Description
[0009] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0011] Figure 1 This is a flowchart illustrating the first embodiment of the game element recognition method of this application;
[0012] Figure 2 This is a flowchart illustrating the second embodiment of the game element recognition method of this application.
[0013] Figure 3 This is a flowchart illustrating the fourth embodiment of the game element recognition method of this application;
[0014] Figure 4 This is a flowchart illustrating the fifth embodiment of the game element recognition method of this application;
[0015] Figure 5This is a flowchart illustrating the sixth embodiment of the game element recognition method of this application;
[0016] Figure 6 A schematic diagram of the framework provided for a specific embodiment of this application;
[0017] Figure 7 A schematic diagram of the fixed element identification process provided in a specific embodiment of this application;
[0018] Figure 8 A schematic diagram illustrating the identification process of non-fixed elements in a 2D game according to a specific embodiment of this application;
[0019] Figure 9 A schematic diagram illustrating the process of identifying non-fixed elements in a 3D game according to a specific embodiment of this application;
[0020] Figure 10 This is a schematic diagram of the device structure of the hardware operating environment involved in the game element recognition method in this application embodiment.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0024] The main solution of this application embodiment is: read the data stream to be identified of the target game application, extract the target image drawing description parameters from the data stream to be identified, the type of the target image drawing description parameters includes at least two of texture information, vertex information and transformation matrix information; and identify the target game elements according to the target image drawing description parameters.
[0025] This application embodiment reads the data stream of the target game application to be identified, extracts target image rendering description parameters from the data stream, and the types of these target image rendering description parameters include at least two of the following: texture information, vertex information, and transformation matrix information. Then, based on the target image rendering description parameters, the target game elements are identified. This application embodiment identifies target game elements based on the extracted target image rendering description parameters, thereby enabling direct data processing and comprehensive judgment. It operates quickly with minimal impact on system operation. Furthermore, it directly analyzes game data, eliminating data deviations caused by display data stretching and distortion, resulting in high accuracy. Therefore, it can accurately and efficiently identify the target game elements requiring identification.
[0026] It should be noted that the execution subject of the embodiments of this application is an electronic device. This electronic device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs (Television), desktop computers, etc., or any electronic device capable of performing the above functions. The embodiments of this application do not specifically limit this. The following description uses an electronic device as the execution subject to illustrate the various embodiments of this application.
[0027] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0028] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the game element recognition method of this application.
[0029] This application proposes a game element recognition method according to a first embodiment, including steps S100 to S200:
[0030] Step S100: Read the data stream to be identified from the target game application, and extract the target image drawing description parameters from the data stream to be identified. The types of the target image drawing description parameters include at least two of the following: texture information, vertex information, and transformation matrix information.
[0031] For example, the texture information is identified by a texture data label or texture binary data, and the vertex information is identified by vertex data or a vertex index cache object.
[0032] As those skilled in the art will recognize, in computer graphics, image rendering description parameters refer to the parameters used to describe how an image is drawn on the screen. Generally speaking, image rendering description parameters cover everything from basic geometric information to advanced visual effects settings, and are key information used by the rendering engine to generate the final image.
[0033] In one exemplary embodiment, image rendering description parameters may include, but are not limited to, one or more of the following: such as vertex information, texture information, transformation matrix information, lighting information, depth and occlusion information, blending and transparency information, etc.
[0034] Vertices are the basic units that make up polygons, defining the shape and structure of an object. Vertex information can include vertex position coordinates, vertex color, vertex texture coordinates, and other vertex data, used to describe the geometry of in-game graphics.
[0035] Textures are images applied to the surface of a model to simulate the realism of various materials. Texture information can include texture data such as color textures, transparency textures, and specular textures, used to increase the detail and realism of in-game graphics.
[0036] A transformation matrix is a mathematical tool used to describe transformations such as the position, rotation, and scaling of objects in space. Transformation matrix information can include matrix data such as translation matrices, selection matrices, and scaling matrices, used to change the position, orientation, and size of game objects or geometry.
[0037] It is easy to understand that in this embodiment, the target game application is a game application that needs to identify game elements. The target image drawing description parameters are extracted from the data stream to be identified of the target game application and are used to describe the parameters of how to draw the image (i.e., game elements) required by the target game application on the screen of the electronic device. The target image drawing description parameters include at least two of the following: texture information, vertex information, and transformation matrix information.
[0038] Furthermore, it should be noted that a texture data label is a tag used to identify and classify texture data. Texture data stores the actual image information, consisting of pixels, while the texture data label provides additional information on how to use and manage the texture data. Texture binary data, on the other hand, is texture data stored in binary format.
[0039] In this embodiment, texture information can be identified using either texture data labels or texture binary data, thereby extracting the identified texture information from the data stream to be identified. Identification using texture data labels allows for quick and accurate location of texture data within the data stream, avoiding the cancellation operation of full-stream scanning and thus improving the efficiency and accuracy of game element identification. Identification using texture binary data allows direct access to the binary data, reducing the conversion process from labels to data, accelerating texture information extraction, and improving the efficiency of game element identification. Furthermore, direct access to texture binary data ensures the integrity and original quality of the texture information, avoiding potential loss of detail due to conversion or compression, thus contributing to improved accuracy in game element identification.
[0040] In addition, it should be noted that vertex data is a collection of information about vertices, and a vertex index cache object is a data structure or object used to store indexes that point to vertex data.
[0041] In this embodiment, vertex information can be identified through vertex data or through a vertex index cache object, thereby extracting the identified vertex information from the data stream to be identified.
[0042] This embodiment can extract target image rendering description parameters from the data stream generated during the operation of the target game application to identify specific game elements.
[0043] Step S200: Draw description parameters based on the target image to identify target game elements.
[0044] It should be noted that game elements refer to visual and interactive objects that can be identified and analyzed within the game environment; that is, objects that players see in the game screen, such as characters, items, backgrounds, interfaces, and controls—graphical elements within the game environment. Game elements are generally defined by texture information (such as texture maps and materials), vertex information (the geometric structure of the model), and transformation matrix information (position, rotation, and scaling).
[0045] In this embodiment, the target game element is the game element that needs to be identified among the game elements of the target game application. The target game element can be determined according to actual needs. For example, when a user needs to identify a specific character in the target game application, the target game element can be that specific character.
[0046] In this embodiment, after extracting at least two of the target image rendering description parameters, including texture information, vertex information, and transformation matrix information, the specific game element in the target game application, i.e. the target game element, can be identified based on the texture information, vertex information, or transformation matrix information contained in the target image rendering description parameters.
[0047] In one feasible implementation, before reading the data stream to be identified from the target game application, steps S110 to S120 are further included:
[0048] Step S110: The data stream passed from the target game application is intercepted in the graphics library at the system's underlying layer.
[0049] Step S120: The intercepted data stream is used as the data stream to be identified by the target game application.
[0050] As those skilled in the art will know, the underlying graphics library of a system is a core component or library in the operating system responsible for handling graphics rendering and display. It provides an interface between the application and the hardware, enabling the software to control and utilize the graphics hardware to render images and animations. In other words, it allows the software to pass data streams containing information such as how to draw scenes, textures, lighting, and animations into the graphics library, and then use the graphics library to control the graphics hardware to complete the graphics rendering task.
[0051] This implementation intercepts the data stream from the target game application in the system's underlying graphics library and uses the intercepted data stream as the data stream to be identified by the target game application. This bypasses any buffering or processing mechanisms that may exist within the application and directly extracts the latest and most original graphics drawing description parameters, ensuring the timeliness and accuracy of game element identification and avoiding information loss caused by data conversion or compression.
[0052] Compared to game element recognition methods based on screenshots and image recognition, this implementation intercepts the data stream at the system level, resulting in higher real-time performance. It eliminates the delay of rendering images to the screen and then reading data from screenshots. Furthermore, this implementation obtains the most original texture information, vertex information, and transformation matrix information, unaffected by rendering quality and display effects, and does not rely on image processing algorithms. This leads to higher accuracy in game element recognition. In addition, this implementation can restrict the transmission of sensitive information (such as player location, game progress, etc.) between higher-level applications (such as screenshot programs, image recognition applications, etc.), effectively reducing the risk of data leakage and providing higher privacy.
[0053] This application embodiment reads the data stream to be identified from the target game application and extracts target image rendering description parameters from the data stream. These parameters include at least two of the following types: texture information, vertex information, and transformation matrix information. The texture information is identified using texture data labels or texture binary data, and the vertex information is identified using vertex data or vertex index cache objects. Then, based on the target image rendering description parameters, the target game elements are identified. This application embodiment identifies target game elements based on the extracted target image rendering description parameters, enabling direct data processing and comprehensive judgment. It operates quickly with minimal impact on system operation. Furthermore, it directly analyzes game data, eliminating data deviations caused by display data stretching or distortion, resulting in high accuracy. Therefore, it can accurately and efficiently identify the target game elements requiring identification.
[0054] Based on the first embodiment described above, a game element recognition method according to the second embodiment of this application is proposed.
[0055] In the second embodiment of this application, the same or similar content as in the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0056] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the game element recognition method of this application.
[0057] In this embodiment, before reading the data stream to be identified from the target game application, the method may include steps S130 to S140:
[0058] Step S130: Identify the game type of the target game application.
[0059] Step S140: Determine the type of drawing description parameters for the target image to be extracted based on the game type of the target game application.
[0060] In this embodiment, before reading the data stream to be identified from the target game application, the game type of the target game application is first identified. Based on the game type, the type of the target image rendering description parameters to be extracted is determined. Therefore, when extracting image rendering description parameters from the data stream to be identified, only the target image rendering description parameters corresponding to the game type of the target game application are extracted, reducing resource consumption, minimizing unnecessary data processing, improving extraction efficiency, and thus improving the recognition efficiency of game elements. The game type can be a category based on game name, game visuals, gameplay, or game theme, etc.
[0061] For example, in one possible implementation, step S140 includes step S141:
[0062] Step S141, if the game type of the target game application is a three-dimensional game, determine the type of the target image drawing description parameters to be extracted, including texture information, vertex information and transformation matrix information.
[0063] It should be noted that 3D games refer to games that use a three-dimensional spatial coordinate system to construct the game environment and characters. Objects and scenes in the game not only have length and width, but also depth, and players can move in three dimensions.
[0064] In this embodiment, when the target game application is identified as a 3D game, to accurately identify and understand game elements within the 3D game genre, when identifying game elements based on image rendering description parameters, it is necessary to use texture information to identify and distinguish the material and surface features of different game elements, vertex information to identify and distinguish the geometric shapes and structures of different game elements, and transformation matrix information to identify and distinguish the position, orientation, and size changes of different game elements in the game. Therefore, this embodiment determines that the types of target image rendering description parameters to be extracted include texture information, vertex information, and transformation matrix information. This ensures the accuracy of game element identification by extracting target image rendering description parameters that include texture information, vertex information, and transformation matrix information from the data stream to be identified.
[0065] In another feasible implementation, step S140 includes step S142:
[0066] Step S142, if the game type of the target game application is a two-dimensional game type, determine that the type of the target image drawing description parameters to be extracted includes texture information and vertex information.
[0067] It should be noted that 2D games refer to games in which the game environment and characters are constructed on a two-dimensional plane. The objects and scenes in the game only have length and width, but no depth, and players can only move in two dimensions.
[0068] In this embodiment, when the target game application is identified as a two-dimensional game, to accurately identify and understand game elements within this type of game, it is necessary to use texture information to identify and distinguish the appearance and attributes of different game elements, and vertex information to identify and distinguish the contours and shapes of different game elements when identifying game elements based on image rendering description parameters. However, transformation matrix information is generally not needed to determine the depth and rotation state of game elements. Therefore, this embodiment determines that the type of target image rendering description parameters to be extracted includes texture information and vertex information. Thus, when extracting image rendering description parameters from the data stream to be identified, target image rendering description parameters including texture information and vertex information are extracted, ensuring the accuracy of game element identification while reducing the amount of data processing.
[0069] Based on the above embodiments, a game element recognition method according to the third embodiment of this application is proposed.
[0070] In the third embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0071] In this embodiment, the step of identifying target game elements based on the drawing description parameters of the target image may include step S210:
[0072] Step S210: Identify the target game elements based on the target image drawing description parameters and the preset identification code database.
[0073] For example, in one feasible implementation, step S210 includes steps S211 to S212:
[0074] Step S211: Determine the element description features corresponding to the target game element from the preset identification code database.
[0075] Step S212: Based on the target image drawing description parameters, identify elements that match the element description features as target game elements.
[0076] It should be noted that, in this embodiment, the element description feature refers to the feature used to describe the game element, and the preset identification code database is a pre-created database that stores the element description features corresponding to various game elements.
[0077] This embodiment can determine the element description features corresponding to the target game element by querying a preset identification code database, and then draw description information based on the target image. Through feature matching, elements that match the element description features can be quickly identified from the complex game environment as the target game element.
[0078] Based on the third embodiment described above, a game element recognition method according to the fourth embodiment of this application is proposed.
[0079] In the fourth embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0080] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating the fourth embodiment of the game element recognition method of this application.
[0081] In this embodiment, the texture information is identified through texture data labels or texture binary data, and the vertex information is identified through vertex data or vertex index cache objects. When the type of the target image rendering description parameters to be extracted includes texture information, vertex information, and transformation matrix information, the step of identifying elements matching the element description features based on the target image rendering description parameters as target game elements includes steps S300 to S400:
[0082] Step S300: If a vertex index cache object is identified in the target image drawing description parameters, a target vertex index cache object that matches the element description feature is searched in the vertex index cache object.
[0083] It is easy to understand that the target vertex index cache object is a vertex index cache object that matches the element description features corresponding to the target game element.
[0084] Step S400: If the target vertex index cache object can be found, the element that matches the element description feature is identified as the target game element based on the texture information and the transformation matrix information.
[0085] In this embodiment, the types of target image rendering description parameters to be extracted include texture information, vertex information, and transformation matrix information. Therefore, when extracting image rendering description parameters from the data stream to be identified, target image rendering description parameters containing texture information, vertex information, and transformation matrix information are extracted.
[0086] In this embodiment, when identifying elements matching the element description features corresponding to target game elements based on the target image rendering description parameters, the first step is to check whether a vertex index cache object exists in the target image rendering description parameters. If a vertex index cache object is found, the target vertex index cache object is searched from the extracted vertex index cache objects. If the target vertex index cache object can be found, the element matching the element description features can be identified based on texture information and transformation matrix information, and thus identified as the target game element. This embodiment utilizes a vertex index caching mechanism to avoid repeated calculations for the same or similar game elements, significantly improving the speed of game element identification. Simultaneously, by leveraging texture information and transformation matrix information, it ensures accurate identification of game elements even under complex scenes and changing viewpoints.
[0087] Furthermore, in one feasible implementation, the method further includes steps S500 to S600:
[0088] Step S500: If it is found that there is no vertex index cache object in the target image drawing description parameters, search for target vertex data that matches the element description features in the vertex data.
[0089] It is easy to understand that target vertex data is vertex data that matches the element description features corresponding to the target game element.
[0090] Step S600: If the target vertex data can be found, perform the step of identifying elements that match the element description features based on the texture information and the transformation matrix information, and using them as target game elements.
[0091] In this embodiment, when the vertex index cache object is not found in the target image rendering description parameters, the target vertex data is searched from the extracted vertex data. If the target vertex data can be found, elements matching the element description features can be identified based on texture information and transformation matrix information, and these elements are then used as target game elements. Thus, even in the absence of a vertex index cache, the task of identifying game elements can be completed using vertex data, making it more applicable.
[0092] Based on the fourth embodiment described above, a game element recognition method according to the fifth embodiment of this application is proposed.
[0093] In the fifth embodiment of this application, the same or similar content as in the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0094] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating the fifth embodiment of the game element recognition method of this application.
[0095] In this embodiment, the step of identifying elements matching the element description features based on the texture information and the transformation matrix information as target game elements includes steps S410 to S420:
[0096] Step S410: If it is determined that there is target texture information in the texture information that matches the element description feature, obtain the element transformation matrix corresponding to the element pointed to by the target texture information from the transformation matrix information.
[0097] It is easy to understand that the target texture information is the texture information that matches the element description features corresponding to the target game element.
[0098] It should be noted that in game development and computer graphics, an element transformation matrix is a mathematical tool used to describe the position, rotation, and scaling of objects in 3D space.
[0099] In this embodiment, when identifying elements that match the element description features corresponding to the target game element based on the extracted texture information and transformation matrix information, the first step is to determine whether the target texture information exists in the extracted texture information.
[0100] Exemplarily, in one feasible implementation, the method further includes steps A10 to A20:
[0101] Step A10: If a texture data label is identified from the target image drawing description parameters, find the target texture data label that matches the element description feature.
[0102] It is easy to understand that the target texture data Label is a texture data label that matches the element description features corresponding to the target game element.
[0103] Step A20: If the target texture data Label can be found, determine that there is target texture information in the texture information that matches the element description feature.
[0104] In this embodiment, when determining whether there is target texture information matching the element description feature in the extracted texture information, the first step is to identify whether a texture data label exists in the target image rendering description parameters. If a texture data label is identified from the target image rendering description parameters, the target texture data label is searched from the extracted texture data label. If the target texture data label can be found, it can be determined that there is target texture information matching the element description feature in the extracted texture information.
[0105] In another feasible implementation, the method further includes steps B10 to B20:
[0106] Step B10: If no texture data label is identified from the target image drawing description parameters, search for target texture binary data that matches the element description feature in the texture binary data.
[0107] It is easy to understand that the target texture binary data is the texture binary data that matches the element description features corresponding to the target game element.
[0108] Step B20: If the binary data of the target texture can be found, determine that there is target texture information in the texture information that matches the element description feature.
[0109] In this embodiment, if no texture data label is identified from the target image drawing description parameters, the target texture binary data is searched from the extracted texture binary data. If the target texture binary data can be found, it can be determined that the extracted texture information contains target texture information that matches the element description feature.
[0110] In this embodiment, if it is determined that there is target texture information in the extracted texture information that matches the element description feature, the element transformation matrix corresponding to the element pointed to by the target texture information is obtained from the extracted transformation matrix information.
[0111] Step S420: If the element transformation matrix matches the target transformation matrix corresponding to the element description feature, the element pointed to by the target texture information is taken as the target game element.
[0112] It is easy to understand that the target transformation matrix is the element transformation matrix corresponding to the element description features of the target game element.
[0113] In this embodiment, if the element transformation matrix corresponding to the element specified by the target texture information matches the target transformation matrix, the element pointed to by the target texture information is taken as the target game element.
[0114] Based on vertex information matching, this embodiment compares texture information and transformation matrix. It uses texture information to confirm visual features and transformation matrix to ensure accurate correspondence between position and pose, thereby accurately identifying and locating specific elements in the game.
[0115] Based on the third embodiment described above, a game element recognition method according to the sixth embodiment of this application is proposed.
[0116] In the sixth embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0117] Please refer to Figure 5 , Figure 5 This is a flowchart illustrating the sixth embodiment of the game element recognition method of this application.
[0118] In this embodiment, when the type of the target image rendering description parameters to be extracted includes texture information and vertex information, the step of identifying elements matching the element description features based on the target image rendering description parameters as target game elements may include steps S700 to S800:
[0119] Step S700: If a vertex index cache object is identified in the target image drawing description parameters, a target vertex index cache object that matches the element description feature is searched in the vertex index cache object.
[0120] Step S800: If the target vertex index cache object can be found, the element that matches the element description feature is identified based on the texture information and used as the target game element.
[0121] It is worth mentioning that, in one feasible implementation, the step of identifying elements matching the element description features based on the texture information as target game elements includes step S810:
[0122] Step S810: If it is determined that there is target texture information in the texture information that matches the element description feature, the element pointed to by the target texture information is taken as the target game element.
[0123] Furthermore, in one feasible implementation, the method further includes steps S910 to S920:
[0124] Step S910: If it is found that there is no vertex index cache object in the target image drawing description parameters, search for target vertex data that matches the element description features in the vertex data.
[0125] Step S920: If the target vertex data can be found, perform the step of identifying elements that match the element description features based on the texture information as target game elements.
[0126] In this embodiment, when the types of drawing description parameters for the target image to be extracted include texture information and vertex information, the target game element is initially identified through vertex index cache objects or vertex data. If the target vertex index cache object or target vertex data can be found, it is determined whether the extracted texture information contains target texture information. If target texture information exists, the element pointed to by the target texture information is taken as the target game element.
[0127] To facilitate understanding of the technical concept or principle of the game element recognition method of this application as described above, a specific embodiment is provided below:
[0128] This specific embodiment is implemented from the system's bottom layer, intercepting data passed from the game in the graphics library, directly processing and comprehensively judging the data. It runs fast, has minimal impact on system operation, and because it directly analyzes game data, there is no data deviation caused by display data stretching or distortion, achieving an accuracy rate of 100%. Furthermore, this specific embodiment can analyze and identify all elements in the game, making it widely applicable.
[0129] like Figure 6 As shown, mobile games run on top of the Application Framework. The Application Framework provides a set of APIs (Application Programming Interfaces) for games, enabling them to access system services, hardware resources, and other functions. These APIs correspond to different Libraries, which encapsulate various components, such as the OpenGL ES (Open Graphics Library for Embedded Systems) component for graphics processing, the Surface Manager component for screen display management, and the Media Framework component for audio and video processing. The Linux Kernel, as the lowest-level foundation, supports the Libraries and the Application Framework, ultimately serving the various game applications.
[0130] This specific embodiment achieves game element recognition by intercepting and analyzing data in OpenGL ES within the system's underlying graphics library.
[0131] In one exemplary implementation, the process for game element recognition is as follows:
[0132] First, by injecting code into the graphics engine development library at the system's underlying level, it is possible to obtain all the graphics data sent by the game to the GPU (Graphics Processing Unit) (that is, by intercepting the data stream passed by the target game application in the graphics library at the system's underlying level). Then, by analyzing the data stream of each interface, it is possible to determine what kind of element it is, and by directly modifying the drawing instructions, the display form of the game elements can be modified.
[0133] Secondly, such as Figure 7 As shown, Figure 7 The schematic diagram of the fixed element identification process provided in a specific embodiment of this application shows the following specific steps:
[0134] Step T10, Fixed element identification;
[0135] Step T20: Does the position match? If not, proceed to step T50; if yes, proceed to step T30.
[0136] Step T30: Is a texture data Label matched? If not, proceed to step T40; if yes, proceed to step T60.
[0137] Step T40: Is texture binary data matched? If not, proceed to step T50; if yes, proceed to step T60.
[0138] Step T50, no element recognized;
[0139] Step T60: Identify elements.
[0140] In this specific embodiment, for elements with fixed positions in the game, such as buttons and various indicator icons, because their positions are fixed and the displayed content is relatively stable, this specific embodiment can determine them using position data (i.e., vertex information) and texture data (i.e., texture information). Texture data can be identified using its Label attribute (i.e., texture data label). It should be noted that not all elements have a Label. If the Label is unrecognizable, further texture binary comparison is required. The binary data of the texture (i.e., texture binary data) can also be effectively identified. The binary data of a game element texture is determined, and the binary data can be compared by data size and data content.
[0141] like Figure 8 As shown, Figure 8 The schematic diagram of the identification process for non-fixed elements in a 2D game provided in a specific embodiment of this application is as follows:
[0142] Step K10: Identification of non-fixed elements in 2D games;
[0143] In step K20, is there a vertex index cache object? If not, proceed to step K40; if yes, proceed to step K30.
[0144] Step K30: Check if the vertex index cache object matches. If not, proceed to step K80; if yes, proceed to step K50.
[0145] Step K40: Check if the vertex data matches. If not, proceed to step K80; if yes, proceed to step K50.
[0146] Step K50: Is a texture data Label matched? If not, proceed to step K60; if yes, proceed to step K70.
[0147] Step K60: Does the texture binary data match? If not, proceed to step K80; if yes, proceed to step K70.
[0148] Step K70: Identify elements;
[0149] Step K80, element not recognized.
[0150] In this specific embodiment, for non-fixed game elements in a 2D game, the modeling information (i.e., vertex information) is determined through their vertex data. Considering that graphics libraries may enable caching to improve performance, this embodiment can simultaneously check whether the vertex index cache object is valid. If the modeling information matches, it can be confirmed that it is the same model, but texture data is still needed for this embodiment to confirm whether it is the specified element (i.e., the target game element). The comparison of texture data can be referred to the previous content.
[0151] like Figure 9 As shown, Figure 9 This is a schematic diagram illustrating the process of recognizing non-fixed elements in a 3D game according to a specific embodiment of this application.
[0152] The specific steps are as follows:
[0153] Step Y10, 3D game non-fixed element identification;
[0154] In step Y20, is there a vertex index cache object? If not, proceed to step Y40; if yes, proceed to step Y30.
[0155] Step Y30: Check if the vertex index cache object matches. If not, proceed to step Y90; if yes, proceed to step Y50.
[0156] Step Y40: Check if the vertex data matches. If not, proceed to step Y90; if yes, proceed to step Y50.
[0157] Step Y50: Is a texture data Label matched? If not, proceed to step Y60; if yes, proceed to step Y70.
[0158] Step Y60: Is texture binary data matched? If not, proceed to step Y90; if yes, proceed to step Y70.
[0159] Step Y70: Is a transformation matrix matched? If not, proceed to step Y90; if yes, proceed to step Y80.
[0160] Step Y80: Identify elements;
[0161] Step Y90, element not recognized.
[0162] In this specific embodiment, for 3D games, the graphics library typically adds several transformation matrices to achieve various data deformations of the model data, enabling operations such as positioning, scaling, and movement in the world coordinate system. Therefore, in locating non-fixed game elements in 3D games, in addition to vertex data / vertex index cache objects and texture data, this specific embodiment also adds transformation matrix information to determine the uniqueness of the game element.
[0163] For specific needs where it is not necessary to locate a unique game element, this specific embodiment may also disregard transformation matrix information. In this way, a class of elements can be identified based solely on modeling information. For example, in shooting games, if you want to identify all players and highlight all players within the visible range, there is no need to determine the transformation matrix.
[0164] For fixed game elements in specific scenes of certain 3D games, such as turn-based combat 3D games, because they often have special 2D identifiers, this specific embodiment can use fixed element detection to determine the scene, which can also achieve good results.
[0165] Finally, after identifying the game element, the object is identified as an element in the corresponding game (i.e., the target game element in the target game application), and the system is notified that the game element has been identified so that the system can perform further processing.
[0166] It should be noted that, in an exemplary implementation, the data stream transmitted by the target game application can also be intercepted based on the user's input of the game element to be searched. The intercepted data stream can be used as the data stream to be identified by the target game application. The game element to be searched and a preset identification code database can be used to identify whether the game element to be searched exists in the current data stream.
[0167] It should be noted that the above examples are only for the purpose of assisting in understanding this application and do not constitute a limitation on the game element identification method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0168] In addition, please refer to Figure 10 , Figure 10 This is a schematic diagram of the device structure of the hardware operating environment involved in the game element recognition method in this application embodiment.
[0169] This application also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the game element recognition method described above.
[0170] The following is for reference. Figure 10 The diagram illustrates a structural schematic of an electronic device suitable for implementing the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs (Television), desktop computers, or any electronic device capable of performing the above functions. Figure 10 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0171] like Figure 10As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0172] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0173] The electronic device provided in this application, employing the game element recognition method described in the above embodiments, can solve the technical problem of how to accurately and efficiently identify game elements. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the game element recognition method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0174] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0175] In addition, this application also provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the game element recognition method in the above embodiments.
[0176] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0177] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0178] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to: read the data stream to be identified from the target game application; extract target image rendering description parameters from the data stream to be identified, wherein the types of the target image rendering description parameters include at least two of texture information, vertex information, and transformation matrix information; and identify target game elements based on the target image rendering description parameters.
[0179] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0181] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0182] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the above-described game element recognition method, which can solve the technical problem of how to accurately and efficiently identify game elements. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the game element recognition method provided in the above embodiments, and will not be repeated here.
[0183] Furthermore, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the game element recognition method as described in the above embodiments.
[0184] The computer program product provided in this application solves the technical problem of how to accurately and efficiently identify game elements. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the game element identification method provided in the above embodiments, and will not be repeated here.
[0185] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A game element recognition method characterized by, The method comprises the following steps: reading a data stream to be identified of a target game application, extracting a target image rendering description parameter from the data stream to be identified, the type of the target image rendering description parameter comprising at least two of texture information, vertex information and transformation matrix information; identifying a target game element according to the target image rendering description parameter.
2. The game element recognition method of claim 1, wherein, Before reading the data stream to be identified of the target game application, the method comprises the following steps: identifying a game type of the target game application; determining the type of the target image rendering description parameter to be extracted according to the game type of the target game application.
3. The game element recognition method of claim 2, wherein, The step of determining the type of the target image rendering description parameter to be extracted according to the game type of the target game application comprises the following steps: in a case where the game type of the target game application is a three-dimensional game type, determining that the type of the target image rendering description parameter to be extracted comprises texture information, vertex information and transformation matrix information.
4. The game element recognition method of claim 2, wherein, The step of determining the type of the target image rendering description parameter to be extracted according to the game type of the target game application comprises the following steps: in a case where the game type of the target game application is a two-dimensional game type, determining that the type of the target image rendering description parameter to be extracted comprises texture information and vertex information.
5. The game element recognition method according to any one of claims 1 to 4, characterized in that, Before reading the data stream to be identified of the target game application, the method further comprises the following steps: intercepting a data stream input by the target game application in a graphics library at a system bottom layer; taking the intercepted data stream as the data stream to be identified of the target game application.
6. The game element recognition method according to any one of claims 1 to 4, characterized in that, The step of identifying the target game element according to the target image rendering description parameter and a preset identification code database comprises the following steps: determining an element description feature corresponding to the target game element from the preset identification code database; 7. The game element recognition method of claim 6, wherein, identifying an element matching the element description feature as the target game element based on the target image rendering description parameter. In a case where the type of the target image rendering description parameter to be extracted comprises texture information, vertex information and transformation matrix information, the step of identifying an element matching the element description feature as the target game element based on the target image rendering description parameter comprises the following steps: in a case where a vertex index buffer object is identified in the target image rendering description parameter, finding a target vertex index buffer object matching the element description feature in the vertex index buffer object; 8. The game element recognition method of claim 7, wherein, in a case where the target vertex index buffer object can be found, identifying an element matching the element description feature as the target game element according to the texture information and the transformation matrix information. The method further comprises the following steps: in a case where no vertex index buffer object is identified in the target image rendering description parameter, finding target vertex data matching the element description feature in vertex data.
9. The game element recognition method of claim 8, wherein, In a case that the target vertex data can be found, the step of identifying an element matching the element description feature as a target game element according to the texture information and the transformation matrix information is performed.
10. The game element recognition method of claim 8, wherein, The step of identifying an element matching the element description feature as a target game element according to the texture information and the transformation matrix information comprises: In a case that the target texture information matching the element description feature is determined to exist in the texture information, an element transformation matrix corresponding to an element pointed by the target texture information is acquired from the transformation matrix information; In a case that the element transformation matrix matches a target transformation matrix corresponding to the element description feature, the element pointed by the target texture information is identified as a target game element.
11. The game element recognition method of claim 10, wherein, The method further comprises: In a case that a texture data label Label is identified from the target image rendering description parameter, target texture data Label matching the element description feature is searched in the texture data label Label; In a case that the target texture data Label can be found, it is determined that target texture information matching the element description feature exists in the texture information.
12. The game element recognition method of claim 10, wherein, The method further comprises: In a case that a texture data label Label is not identified from the target image rendering description parameter, target texture binary data matching the element description feature is searched in texture binary data; In a case that the target texture binary data can be found, it is determined that target texture information matching the element description feature exists in the texture information.
13. An electronic device, comprising: It comprises: A memory, a processor and a game element identification program stored in the memory and executable on the processor, the game element identification program, when executed by the processor, implements the game element identification method according to any one of claims 1 to 12.
14. A computer program product, characterised in that, The computer program product comprises a computer program, which, when executed by a processor, implements the steps of the game element identification method according to any one of claims 1 to 12.