Game scene recognition method, apparatus, electronic device and storage medium

By obtaining and matching the rendering resource names and logos during game application rendering, the game scene is identified in real time, and the problems of large computing resources consumption and limited use scenarios in the prior art are solved, achieving more efficient and extensive game scene recognition.

WO2025030823A1PCT designated stage expired Publication Date: 2025-02-13ZTE CORP

Patent Information

Application Number
PCT/CN2024/080965
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-07
Filing Date
2024-03-11
Publication Date
2025-02-13

AI Technical Summary

Technical Problem

The existing game scene recognition method requires the consumption of a large amount of computing resources at the terminal and the usage scenarios are limited.

Method used

By obtaining the rendering resource name and identity of the target game application when rendering the game scene, and matching it based on the preset correspondence relationship, a new correspondence relationship is formed to identify the game scene in real time.

Benefits of technology

It reduces the consumption of terminal computing resources, expands the usage scenarios for game scene recognition, and improves the accuracy and performance of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080965_13022025_PF_FP_ABST
    Figure CN2024080965_13022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a game scene recognition method, an apparatus, an electronic device and a storage medium. The method comprises: acquiring a rendering resource name and a rendering resource identifier which are required by a target game application for rendering game screens corresponding to at least one game scene; matching the rendering resource name with a rendering resource name of a preset first correspondence relationship; when the rendering resource name is successfully matched the rendering resource name of the first correspondence relationship, adding the rendering resource identifier to the first correspondence relationship, so as to form a second correspondence relationship; and capturing in real time a target rendering resource identifier corresponding to the operating target game application rendering each game screen frame and, on the basis of the second correspondence relationship, determining a target game scene matched with the target rendering resource identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Game scene recognition method, device, electronic device and storage medium

[0001] Related applications

[0002] This application claims priority to Chinese patent application No. 202310989366.5 filed on August 7, 2023, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of software development technology, and in particular to a game scene recognition method, device, electronic device and storage medium. Background Art

[0004] With the development of the gaming market, terminal manufacturers often make performance adjustments for different gaming scenarios in order to improve user experience. For example, the performance requirements for combat scenes in a game are often higher than those for dialogue scenes. Therefore, it is necessary to identify different gaming scenarios.

[0005] Current game scene recognition methods are typically based on image recognition technology. Before game scene recognition, it's necessary to pre-train based on multiple game screens to establish a correspondence between game images and game scenes. Then, based on image recognition technology, real-time images captured while the game is running are used for image recognition, and the recognized images are matched with pre-set game images. If a match is successful, the scene corresponding to the pre-set game image is used as the current game scene. However, this approach has the following drawbacks:

[0006] 1. Image recognition technology is required, which consumes a large amount of terminal computing resources during game operation, affecting game performance;

[0007] 2. Image recognition technology has high requirements for the display position and feature level of images, so some usage scenarios cannot be identified by image recognition technology.

[0008] Therefore, how to better realize game scene recognition has become a technical problem that needs to be solved urgently.

[0009] Summary of the Invention

[0010] The present application provides a game scene recognition method, device, electronic device and storage medium to solve the technical problems in the prior art that the game scene recognition method consumes a large amount of terminal computing resources and has limited usage scenarios.

[0011] In a first aspect, the present application provides a method for identifying a game scene, comprising:

[0012] Obtaining a rendering resource name and a rendering resource identifier required by a target game application when rendering a game screen corresponding to at least one game scene;

[0013] Matching the rendering resource name with a rendering resource name in a preset first correspondence relationship, wherein the first correspondence relationship is set to represent a correspondence between the rendering resource name and the game scene;

[0014] If the rendering resource name successfully matches the rendering resource name in the first correspondence, adding the rendering resource identifier to the first correspondence to form a second correspondence, wherein the second correspondence is set to represent the correspondence between the rendering resource name, the rendering resource identifier and the game scene;

[0015] The target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation is intercepted in real time, and based on the second corresponding relationship, a target game scene matching the target rendering resource identifier is determined.

[0016] In a second aspect, the present application provides a game scene recognition device, comprising:

[0017] An acquisition module configured to acquire the rendering resource name and rendering resource identifier required by the target game application when rendering game screens corresponding to different game scenes;

[0018] a matching module configured to match the rendering resource name with a rendering resource name in a preset first correspondence relationship, wherein the first correspondence relationship is configured to represent a correspondence between the rendering resource name and the game scene;

[0019] an adding module configured to add the rendering resource identifier to the first corresponding relationship to form a second corresponding relationship when the rendering resource name successfully matches the rendering resource name in the first corresponding relationship, wherein the second corresponding relationship is configured to represent a corresponding relationship between the rendering resource name, the rendering resource identifier, and the game scene;

[0020] The determination module is configured to intercept in real time the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation, and determine the target game scene that matches the target rendering resource identifier based on the second corresponding relationship.

[0021] In a third aspect, the present application provides an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0022] The memory is configured to store a computer program;

[0023] The processor is configured to implement the steps of the game scene recognition method described in the first aspect when executing the program stored in the memory.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the game scene recognition method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0027] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0028] FIG1 is a flow chart of a method for identifying a game scene according to an embodiment of the present application;

[0029] FIG2 is a schematic diagram of a process for configuring associated data of a target file according to an embodiment of the present application;

[0030] FIG3 is a schematic diagram of a system architecture provided in an embodiment of the present application;

[0031] FIG4 is a schematic diagram of a process for establishing a second correspondence relationship according to an embodiment of the present application;

[0032] FIG5 is a schematic diagram of a process for identifying a game scene according to an embodiment of the present application;

[0033] FIG6 is a schematic diagram of the structure of a game scene recognition device provided in an embodiment of the present application;

[0034] FIG7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0036] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0037] In order to solve the technical problem that the game scene recognition method in the existing technology consumes a large amount of terminal computing resources and has limited usage scenarios, the present application provides a game scene recognition method, device, electronic device and storage medium, which can reduce the terminal computing resource consumption and expand the usage scenarios of game scene recognition.

[0038] See Figure 1, which is a flow chart of a method for identifying a game scene according to an embodiment of the present application. As shown in Figure 1, the method for identifying a game scene may include the following steps:

[0039] Step 101: Obtain a rendering resource name and a rendering resource identifier required by a target game application when rendering a game screen corresponding to at least one game scene.

[0040] The target game application can be any game application installed on an electronic device, and the electronic device here can be any terminal device such as a smartphone, personal computer, tablet, laptop, etc. The rendering resource name refers to the specific texture (i.e., Texture) name, project (i.e., Program) name, shader (i.e., Shader) name, frame buffer (i.e., FrameBuffer) name, etc. used by the target game application when rendering different game screens. The rendering resource identifier refers to the unique identifier corresponding to each rendering resource name.

[0041] Step 102: Match the rendering resource name with a rendering resource name in a preset first correspondence relationship, wherein the first correspondence relationship is used to represent the correspondence between the rendering resource name and the game scene.

[0042] Each game application includes one or more game scenes, and each scene contains specific object models. For example, in a battle scene, object models such as weapons and match results appear, while in a character selection scene, object models such as a selection button appear. Drawing these object models requires the use of corresponding rendering resource names. Therefore, a correspondence between rendering resource names and game scenes can be established in advance to obtain the first correspondence described above.

[0043] When matching the rendering resource name with the rendering resource name in the preset first correspondence, if the rendering resource name is included in the rendering resource name in the first correspondence, or the rendering resource name is consistent with the rendering resource name in the first correspondence, it can be considered that the rendering resource name matches the rendering resource name in the first correspondence successfully; otherwise, the rendering resource name fails to match the rendering resource name in the first correspondence.

[0044] Step 103: When the rendering resource name successfully matches the rendering resource name in the first correspondence, the rendering resource identifier is added to the first correspondence to form a second correspondence, wherein the second correspondence is used to represent the correspondence between the rendering resource name, the rendering resource identifier and the game scene.

[0045] After matching the rendering resource name with the rendering resource name in the preset first correspondence relationship, if the rendering resource name matches the rendering resource name in the first correspondence relationship successfully, it means that the game scene of the target game application belongs to the game scene in the first correspondence relationship, and the rendering resource identifier can be added to the first correspondence relationship to form a second correspondence relationship; if the rendering resource name fails to match the rendering resource name in the first correspondence relationship, it means that the game scene of the target game application does not belong to the game scene in the first correspondence relationship, and the identification of the game scene of the target game application is stopped.

[0046] Step 104: intercept in real time the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation, and determine the target game scene that matches the target rendering resource identifier based on the second corresponding relationship.

[0047] After establishing the second corresponding relationship, the target rendering resource identifier corresponding to the target game application when rendering each frame of the game screen can be intercepted in real time during the running process of the target game application, and then the intercepted target rendering resource identifier is matched with the rendering resource identifier in the second corresponding relationship. If the match is successful, the target game scene that matches the target rendering resource identifier can be determined.

[0048] In this embodiment, the target rendering resource identifier and the second corresponding relationship corresponding to each frame of the game screen rendered by the target game application during operation can be used to accurately determine the target game scene corresponding to each frame of the game screen, without consuming a large amount of terminal computing resources to perform image recognition on the game screen, thereby reducing the performance impact on the game operation; at the same time, since there is no need to rely on image recognition technology to perform image recognition on the game screen, there is no need to be restricted by the display position, feature degree and other requirements of the image, which expands the use scenarios of game scene recognition.

[0049] In one embodiment, the above step 101 of obtaining the rendering resource name and rendering resource identifier required by the target game application when rendering the game screen corresponding to at least one game scene specifically includes:

[0050] When detecting that the target game application is in the startup phase, determining whether the game package name corresponding to the target game application is included in the associated data of the target file, wherein the associated data of the target file is used to represent N first correspondences associated with N game package names, where the N game package names correspond one-to-one to the N game applications, and N is an integer greater than or equal to 1;

[0051] In a case where the game package name corresponding to the target game application is included in the associated data of the target file, a first preset function is called, wherein the first preset function is used to obtain a rendering resource name and a rendering resource identifier.

[0052] In one embodiment, the first preset function may be a function such as a glLabelObjectEXT function, and the first preset function may obtain a rendering resource name and a rendering resource identifier for a user when a game application is started.

[0053] In one embodiment, when it is detected that the target game application is in the startup phase, the game package name corresponding to the target game application and the associated data of the target file can be obtained, and the game package name corresponding to the target game application can be compared with the associated data of the target file. If the game package name corresponding to the target game application is included in the associated data of the target file, it means that the target file is pre-configured with a first corresponding relationship associated with the target game application. At this time, the first preset function can be called to obtain the rendering resource name and rendering resource identifier corresponding to the target game application. If the game package name corresponding to the target game application is not included in the associated data of the target file, it means that the target file is not pre-configured with a first corresponding relationship associated with the target game application. At this time, the game scene recognition process can be terminated.

[0054] In this embodiment, when the target game application is in the startup phase, the rendering resource name and rendering resource identifier required by the target game application when rendering the game screen can be obtained by calling the first preset function, so as to facilitate the subsequent acquisition of the second corresponding relationship based on the corresponding relationship between the rendering resource name and the rendering resource identifier.

[0055] In one embodiment, before the above step of determining whether the game package name corresponding to the target game application is included in the associated data of the target file, the method further includes:

[0056] Obtaining a name of a rendering resource required by each of N game applications when rendering a game screen corresponding to at least one game scene, and obtaining N first corresponding relationships corresponding to the N game applications;

[0057] Get N game package names corresponding to N game applications;

[0058] A correspondence between the N first correspondences and the N game package names is established to obtain associated data of the target file.

[0059] In one embodiment, before determining whether the game package name corresponding to the target game application is included in the associated data of the target file, the associated data of the target file needs to be pre-configured. When configuring the associated data of the target file, it is necessary to obtain the name of the rendering resource required by each of N game applications when rendering the game screen corresponding to at least one game scene, obtain N first correspondences corresponding to the N game applications, and obtain the N game package names corresponding to the N game applications. Then, based on the obtained N first correspondences and N game package names, a correspondence between the N first correspondences and the N game package names is established to obtain the associated data of the target file.

[0060] You can use image analysis tools or print parameters using the glLabelObjectEXT function in the GLES library to obtain the name of the rendering resource required by each of N game applications when rendering the game screen corresponding to at least one game scene. For example, using the glLabelObjectEXT function to print parameters, the function parameters are as follows:

[0061] glLabelObjectEXT(GLenum type,GLuint object,GLsizei length,const GLchar*label);

[0062] Among them, parameter 1: type represents the type of rendering resource to be assigned, such as GL_TEXTURE2D, GL_PROGRAM, etc., and parameter 4 represents the name character assigned to this resource (i.e., the rendering resource name). Print these two parameters to the log, and then run the game to find the rendering resources with characteristic names in each game scene and configure them into the target file (such as an xml file, etc.): <game Name=”Game 1” Type=”texture” Res=”Name 1” Scene=”Scene A” / >

[0063] According to this method, the rendering resource names in other games can be found and configured into the target file according to the game package name. The configuration process of the associated data of this target file is shown in Figure 2:

[0064] Step 201: Analyze and find the rendering resource names with characteristics of a certain game application in different scenes.

[0065] Step 202: Configure the corresponding relationships among the rendering resource type, rendering resource name, game scene, and game package name of this game application into the target file.

[0066] Step 203: Analyze and obtain the corresponding relationships of other game applications in different game scenes in this way.

[0067] Step 204: Configure and obtain the associated data of the target file.

[0068] In this embodiment, the associated data of the target file can be pre-configured according to actual needs to obtain the first corresponding relationship associated with different game applications. And subsequently, developers can optimize and adjust the associated data of the target file to achieve game scene recognition for different game applications.

[0069] In an implementation manner, in step 104 above, the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation is intercepted in real time, including:

[0070] When it is detected that the target game application is in the game screen rendering stage, a second preset function is called, where the second preset function is used to intercept in real time the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application.

[0071] In an implementation manner, the above second preset function can be functions such as glUseProgram, glBindTexture, glBindFramebuffer, etc., and this second preset function can intercept the target rendering resource identifier in real time when the game application is in the game screen rendering stage.

[0072] In one embodiment, when the target game application is detected to be in the game screen rendering phase, a second preset function can be called to capture, in real time, the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application. This facilitates subsequent determination of the target game scene that matches the target rendering resource identifier based on the second correspondence, thereby implementing a game scene recognition function.

[0073] In one embodiment, after determining the target game scene that matches the target rendering resource identifier based on the second corresponding relationship in step 104, the method further includes:

[0074] According to the target game scenario, the operating parameters of the terminal device running the target game application and / or the display content of the user interface are adjusted.

[0075] In one embodiment, after determining the target game scene that matches the target rendering resource identifier, the operating parameters of the terminal device running the target game application can be adjusted according to the target game scene, so as to optimize the performance of the target game application on the terminal device, and / or adjust the display content of the user interface of the terminal device running the target game application, so as to achieve different game auxiliary functions.

[0076] In one embodiment, the step of adjusting the operating parameters and / or the display content of the user interface of the terminal device running the target game application according to the target game scenario includes:

[0077] When the target game scene is a combat scene, the frequencies of the central processing unit and the graphics processing unit in the terminal device are increased; when the target game scene is a non-combat scene, the frequencies of the central processing unit and the graphics processing unit in the terminal device are reduced; or

[0078] When the target game scene is a battle scene or a vehicle drifting scene, controlling the terminal device to vibrate; or

[0079] In the case where the target game scene is a character selection scene, recommendation information is displayed on the user interface of the terminal device, wherein the recommendation information is related information of the recommended character in the target game application; or

[0080] When the target game scene is a key information broadcasting scene, the terminal device is controlled to broadcast the key information.

[0081] As an optional implementation, when the target game scene is a combat scene, the frequencies of the central processing unit and graphics processing unit in the terminal device can be increased; when the target game scene is a non-combat scene, the frequencies of the central processing unit and graphics processing unit in the terminal device can be reduced, thereby adjusting the frequencies of the central processing unit and graphics processing unit in combat scenes and non-combat scenes, and improving the performance of the target game application during runtime.

[0082] As another optional implementation, the terminal device can be controlled to vibrate when the target game scene is a combat scene or a vehicle drifting scene. For example, when a damage number pops up when a monster is killed during the game, a vibration effect can be added to enhance the user's combat experience; or when drifting tire tracks are detected during the game, a vibration effect can be added to enhance the user's experience.

[0083] As another optional implementation, recommendation information can be displayed on the terminal device's user interface when the target game scene is a character selection scene. For example, when the player is running XX game and the player's selected hero is identified, a hero guide can be pushed; or when the player is running XX game and the current scene is identified as a hero selection scene, a ranking of the top heroes in the current version of the target game application can be displayed.

[0084] As another optional implementation, when the target game scene is a key information broadcast scene, the terminal device can be controlled to broadcast key information. For example, during the running of the XX game, if key broadcast information such as the five consecutive ultimates, the Storm Dragon King, and the game result is recognized, the specific broadcast content can be identified by combining image recognition technology and then voice broadcasted.

[0085] In one embodiment, the rendering resource names are classified according to the rendering resource type, and the rendering resource type includes at least one of a texture, a project, a shader, and a frame buffer.

[0086] In one embodiment, the rendering resource type can be one or a combination of texture, project, shader, and frame buffer, which is not specifically limited in this embodiment. The rendering resource names of each game application can be first classified by rendering resource type, and then further subdivided by type to determine the rendering resource name. For example, when the rendering resource type is texture, the rendering resource name can be Texture 1, Texture 2, Texture 3, etc.

[0087] As an optional implementation, the game scene recognition method provided in the embodiment of the present application can be applied to the system architecture shown in Figure 3, which may include a hardware device layer, a kernel layer, an application framework layer, and an application layer. Among them, the hardware device layer includes a central processing unit (CPU), a graphics processing unit (GPU), a random access memory (RAM), and a storage device. The CPU is the core component of the electronic device, used to execute program code, and is generally composed of a logic operation unit, a control unit, and a storage unit. The graphics processor is a microprocessor that specializes in processing image and graphics-related operations. The graphics processor can reduce the graphics card's dependence on the CPU and perform some of the original CPU's work, especially in graphics processing, which is faster than the CPU. The kernel layer includes a process monitor (i.e., Process Manager), a storage manager (i.e., Memory Manager), a file system (i.e., File System), and a Binder driver (i.e., Binder Driver). Binder is a high-level inter-process communication (IPC) mechanism provided by the Android system. It uses proxy objects, shared memory, and serialization technologies to implement inter-process communication and remote call functions. It allows data transmission and method calls between different processes, achieving decoupling between processes. The application framework layer includes the Activity Manager Service (AMS), the Package Manager Service (PMS), the OpenGL graphics library, and the game scene recognition module. OpenGL is the abbreviation of Open Graphics Library. OpenGL is a powerful and easy-to-call low-level graphics library that defines a professional graphics programming interface that is cross-programming language and cross-platform and can be used for processing and rendering two-dimensional or three-dimensional images. OpenGLES is the abbreviation of OpenGL for Embedded Systems. OpenGLES is a subset of the three-dimensional graphics API OpenGL, designed for embedded devices. The game scene recognition module can run in the system service process of the Android system. It mainly loads pre-set associated data and calls the Application Programming Interface (API) when receiving game application rendering. Interface (API) parameters and compare data, determine the current game scene through the matching results of key fields, and then send the scene information to the demand side.The application layer may include multiple game applications, such as game application 1, game application 2, and so on.

[0088] After the Android system is turned on, the game scene recognition module can read the preset associated data in the XML file (i.e., the target file) under a fixed path and load the associated data into the memory. During the target game application startup phase, the game package name corresponding to the target game application can be used to determine whether the associated data contains the game package name. If the associated data contains the game package name, when the target game application calls the glLabelObjectEXT function, the game package name, rendering resource type, and rendering resource name can be passed to the scene recognition module through Binder communication across processes and pushed into the cache queue. The rendering resource name in the queue is then compared with the rendering resource name in the associated data. If the two have an inclusion relationship or an equality relationship, it means that the rendering resource name matches successfully. The rendering resource identifier corresponding to the rendering resource name can be merged into the associated data, thereby establishing a corresponding relationship between the rendering resource type, rendering resource name, rendering resource identifier, and game scene. The specific process is shown in Figure 4.

[0089] When the target game application is in the rendering process, the target game application will call functions such as glBindTexture and glUseProgram to switch game resources. At this time, the rendering resource identifiers in these functions can be passed to the game scene recognition module through Binder communication, and the rendering resource identifier is compared with the rendering resource identifier in the associated data. If the two are the same, it means that the target game application is currently drawing the corresponding game scene. Then the scene recognition module can pass the current game scene to the demand module, and a game scene recognition is completed. The specific process is shown in Figure 5.

[0090] Through the above method, during the operation of the target game application, the game scene can be identified only by judging the rendering resource name and rendering resource identifier, without consuming additional computing resources, with better performance advantages. At the same time, it also expands the scope and accuracy of scene recognition. On this basis, more detailed scene optimization and game assistance functions can be developed.

[0091] Referring to FIG6 , FIG6 is a schematic diagram of the structure of a game scene recognition device provided in an embodiment of the present application. As shown in FIG6 , the game scene recognition device 600 includes:

[0092] An acquisition module 601 is used to acquire the rendering resource names and rendering resource identifiers required by the target game application when rendering game screens corresponding to different game scenes;

[0093] A matching module 602 is configured to match the rendering resource name with a rendering resource name in a preset first correspondence relationship, wherein the first correspondence relationship is used to represent a correspondence between the rendering resource name and the game scene;

[0094] Adding module 603 is used to add the rendering resource identifier to the first corresponding relationship to form a second corresponding relationship when the rendering resource name successfully matches the rendering resource name in the first corresponding relationship, wherein the second corresponding relationship is used to represent the corresponding relationship between the rendering resource name, the rendering resource identifier and the game scene;

[0095] The determination module 604 is used to intercept in real time the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation, and determine the target game scene that matches the target rendering resource identifier based on the second corresponding relationship.

[0096] In one embodiment, the acquisition module 601 includes:

[0097] a determination submodule, configured to, upon detecting that the target game application is in the startup phase, determine whether the game package name corresponding to the target game application is included in the associated data of the target file, wherein the associated data of the target file is used to represent N first correspondences associated with N game package names, where the N game package names correspond one-to-one to the N game applications, and N is an integer greater than or equal to 1;

[0098] The first calling submodule is used to call a first preset function when the game package name corresponding to the target game application is included in the associated data of the target file, wherein the first preset function is used to obtain the rendering resource name and the rendering resource identifier.

[0099] In one embodiment, the acquisition module 601 further includes:

[0100] A first acquisition submodule is configured to acquire a name of a rendering resource required by each of N game applications when rendering a game screen corresponding to at least one game scene, and obtain N first corresponding relationships corresponding to the N game applications;

[0101] The second acquisition submodule is used to obtain N game package names corresponding to N game applications;

[0102] A submodule is established to establish a correspondence between N first correspondences and N game package names to obtain associated data of the target file.

[0103] In one embodiment, the determining module 604 includes:

[0104] The second calling submodule is used to call the second preset function when it is detected that the target game application is in the game screen rendering stage, wherein the second preset function is used to intercept the target rendering resource identifier corresponding to the target game application when rendering each frame of the game screen in real time.

[0105] In one embodiment, the apparatus 600 further includes:

[0106] The adjustment module is used to adjust the operating parameters and / or the display content of the user interface of the terminal device running the target game application according to the target game scene.

[0107] In one embodiment, the adjustment module is specifically configured to:

[0108] When the target game scene is a combat scene, the frequencies of the central processing unit and the graphics processing unit in the terminal device are increased; when the target game scene is a non-combat scene, the frequencies of the central processing unit and the graphics processing unit in the terminal device are reduced; or

[0109] When the target game scene is a battle scene or a vehicle drifting scene, controlling the terminal device to vibrate; or

[0110] In the case where the target game scene is a character selection scene, recommendation information is displayed on the user interface of the terminal device, wherein the recommendation information is related information of the recommended character in the target game application; or

[0111] When the target game scene is a key information broadcasting scene, the terminal device is controlled to broadcast the key information.

[0112] In one embodiment, the rendering resource names are classified according to the rendering resource type, and the rendering resource type includes at least one of a texture, a project, a shader, and a frame buffer.

[0113] The device 600 can implement the steps of the game scene recognition method provided by any of the aforementioned method embodiments and achieve the same technical effects, which will not be described in detail here.

[0114] As shown in FIG7 , an embodiment of the present application further provides an electronic device, including a processor 711, a communication interface 712, a memory 713, and a communication bus 714, wherein the processor 711, the communication interface 712, and the memory 713 communicate with each other via the communication bus 714.

[0115] Memory 713, for storing computer programs;

[0116] In one embodiment of the present application, the processor 711 is configured to execute a program stored in the memory 713 to implement the game scene recognition method provided by any of the aforementioned method embodiments, including:

[0117] Obtaining a rendering resource name and a rendering resource identifier required by a target game application when rendering a game screen corresponding to at least one game scene;

[0118] Matching the rendering resource name with a rendering resource name in a preset first correspondence relationship, wherein the first correspondence relationship is used to represent the correspondence between the rendering resource name and the game scene;

[0119] If the rendering resource name successfully matches the rendering resource name in the first correspondence, the rendering resource identifier is added to the first correspondence to form a second correspondence, wherein the second correspondence is used to represent the correspondence between the rendering resource name, the rendering resource identifier, and the game scene;

[0120] The target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation is intercepted in real time, and based on the second corresponding relationship, a target game scene matching the target rendering resource identifier is determined.

[0121] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the game scene recognition method provided in any of the aforementioned method embodiments are implemented.

[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0123] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.

[0124] The terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0125] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.

Claims

1. A method for identifying a game scene, wherein: The method comprises: Obtaining a rendering resource name and a rendering resource identifier required by a target game application when rendering a game screen corresponding to at least one game scene; Matching the rendering resource name with a rendering resource name in a preset first correspondence relationship, wherein the first correspondence relationship is used to represent a correspondence between a rendering resource name and a game scene; When the rendering resource name successfully matches the rendering resource name in the first corresponding relationship, the rendering resource identifier is added to the first corresponding relationship to form a second corresponding relationship, wherein the second corresponding relationship is used to represent the corresponding relationship between the rendering resource name, the rendering resource identifier and the game scene; The target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation is intercepted in real time, and based on the second corresponding relationship, a target game scene matching the target rendering resource identifier is determined.

2. The method according to claim 1, wherein: The obtaining of the rendering resource name and rendering resource identifier required by the target game application when rendering a game screen corresponding to at least one game scene includes: In the case where it is detected that the target game application is in the startup phase, determining whether the game package name corresponding to the target game application is included in the associated data of the target file, wherein the associated data of the target file is used to represent N first corresponding relationships associated with N game package names, the N game package names correspond one-to-one to the N game applications, and N is an integer greater than or equal to 1; In a case where the game package name corresponding to the target game application is included in the associated data of the target file, a first preset function is called, wherein the first preset function is used to obtain the rendering resource name and the rendering resource identifier.

3. The method according to claim 2, wherein: Before determining whether the game package name corresponding to the target game application is included in the associated data of the target file, the method further includes: Obtaining a name of a rendering resource required by each of the N game applications when rendering a game screen corresponding to at least one game scene, and obtaining N first corresponding relationships corresponding to the N game applications; Obtain N game package names corresponding to the N game applications; A correspondence between the N first correspondences and the N game package names is established to obtain associated data of the target file.

4. The method according to claim 1, wherein: The real-time interception of the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation includes: When it is detected that the target game application is in the game screen rendering stage, a second preset function is called, wherein the second preset function is used to intercept in real time the target rendering resource identifier corresponding to the target game application when rendering each frame of the game screen.

5. The method according to claim 1, wherein: After determining the target game scene matching the target rendering resource identifier based on the second corresponding relationship, the method further includes: According to the target game scenario, the operating parameters of the terminal device running the target game application and / or the display content of the user interface are adjusted.

6. The method according to claim 5, wherein: The adjusting, according to the target game scenario, operating parameters of a terminal device running the target game application and / or display content of a user interface includes: When the target game scene is a combat scene, the frequencies of the central processing unit and the graphics processing unit in the terminal device are increased; when the target game scene is a non-combat scene, the frequencies of the central processing unit and the graphics processing unit in the terminal device are decreased; or When the target game scene is a battle scene or a vehicle drifting scene, controlling the terminal device to vibrate; or, In the case where the target game scene is a character selection scene, displaying recommendation information on the user interface of the terminal device, wherein the recommendation information is related information of a recommended character in the target game application; or When the target game scene is a key information broadcasting scene, the terminal device is controlled to broadcast the key information.

7. The method according to claim 1, wherein: The rendering resource names are classified according to rendering resource types, and the rendering resource types include at least one of texture, project, shader, and frame buffer.

8. A game scene recognition device, wherein: The device comprises: An acquisition module is configured to acquire the rendering resource name and rendering resource identifier required by the target game application when rendering game screens corresponding to different game scenes; A matching module, configured to match the rendering resource name with a rendering resource name in a preset first corresponding relationship, wherein the first corresponding relationship is configured to represent a corresponding relationship between the rendering resource name and the game scene; an adding module, configured to add the rendering resource identifier to the first corresponding relationship to form a second corresponding relationship when the rendering resource name successfully matches the rendering resource name in the first corresponding relationship, wherein the second corresponding relationship is configured to represent the corresponding relationship between the rendering resource name, the rendering resource identifier and the game scene; The determination module is configured to capture in real time the target rendering resource identifier corresponding to each frame of the game screen rendered by the target game application during operation, and determine the target game scene matching the target rendering resource identifier based on the second corresponding relationship.

9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via the communication bus; The memory is configured to store a computer program; The processor is configured to implement the steps of the game scene recognition method described in any one of claims 1-7 when executing the program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the steps of the game scene recognition method described in any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Resource configuration method and device, terminal and storage medium

    CN109582463A

  • Game data processing method and device and storage medium

    CN112316424A

  • Game resource processing method and device, processor and storage medium

    CN112799737A

  • Virtual object rendering method and device and electronic equipment

    CN113140028A

  • Game scene generation method and device, storage medium and electronic device

    CN113398580A

Cited By

  • Cloud rendering method and system based on computer

    CN120459629A