Disclosure of Invention
The application provides a game scene recognition method, a game scene recognition device, electronic equipment and a storage medium, which are used for solving the technical problems that a game scene recognition mode in the prior art needs to consume a large amount of computing resources of a terminal and is limited in use scene.
In a first aspect, the present application provides a game scene recognition method, including:
Acquiring a rendering resource name and a rendering resource identifier required by a target game application when rendering a game picture corresponding to at least one game scene;
Matching the rendering resource name with a rendering resource name in a preset first corresponding relation, wherein the first corresponding relation is used for representing the corresponding relation between the rendering resource name and the game scene;
under the condition that the rendering resource name is successfully matched with the rendering resource name in the first corresponding relation, adding the rendering resource identifier into the first corresponding relation to form a second corresponding relation, wherein the second corresponding relation is used for representing the corresponding relation among the rendering resource name, the rendering resource identifier and the game scene;
Intercepting a target rendering resource identifier corresponding to each frame of game picture rendered by the target game application in the running process in real time, and determining a target game scene matched with the target rendering resource identifier based on the second corresponding relation.
Optionally, the obtaining the name and the identifier of the rendering resource required by the target game application when rendering the game frame corresponding to the at least one game scene includes:
Judging whether the game package names corresponding to the target game application are contained in the associated data of the target file or not under the condition that the target game application is detected to be in a starting stage, wherein the associated data of the target file are used for representing N first corresponding relations associated with N game package names, the N game package names are in one-to-one correspondence with the N game applications, and N is an integer greater than or equal to 1;
And calling a first preset function under the condition that the game package name corresponding to the target game application is contained in the associated data of the target file, wherein the first preset function is used for acquiring the rendering resource name and the rendering resource identifier.
Optionally, before the determining whether the game package name corresponding to the target game application is included in the association data of the target file, the method further includes:
Acquiring rendering resource names required by each game application in the N game applications when rendering a game picture corresponding to at least one game scene, and obtaining N first corresponding relations corresponding to the N game applications;
acquiring N game package names corresponding to the N game applications;
and establishing the corresponding relation between the N first corresponding relations and the N game package names to obtain the associated data of the target file.
Optionally, the capturing, in real time, a target rendering resource identifier corresponding to the target game application when rendering each frame of game picture in the running process includes:
and under the condition that the target game application is detected to be in a game picture rendering stage, a second preset function is called, wherein the second preset function is used for intercepting the target rendering resource identification corresponding to the target game application when rendering each frame of game picture in real time.
Optionally, after the determining, based on the second correspondence, a target game scene that matches the target rendering resource identifier, the method further includes:
and adjusting the running parameters of the terminal equipment running the target game application and/or the display content of the user interface according to the target game scene.
Optionally, the adjusting, according to the target game scene, the operation parameters of the terminal device running the target game application and/or the display content of the user interface includes:
Increasing the frequency of the CPU and the graphics processor in the terminal device in the case where the target game scene is a combat scene, decreasing the frequency of the CPU and the graphics processor in the terminal device in the case where the target game scene is a non-combat scene, or
Controlling the terminal device to vibrate under the condition that the target game scene is a combat scene or a vehicle drift scene, or
Displaying recommendation information on a user interface of the terminal device when the target game scene is a character selection scene, wherein the recommendation information is related information of recommended characters in the target game application, or
And controlling the terminal equipment to broadcast the key information under the condition that the target game scene is the key information broadcasting scene.
Optionally, the render resource names are categorized by a render resource type, the render resource type including at least one of texture, engineering, shader, and frame buffer.
In a second aspect, the present application provides a game scene recognition apparatus, comprising:
the acquisition module is used for acquiring the name and the identification of the rendering resource required by the target game application when rendering the game pictures corresponding to different game scenes;
the matching module is used for matching the rendering resource name with the rendering resource name in a preset first corresponding relation, wherein the first corresponding relation is used for representing the corresponding relation between the rendering resource name and the game scene;
The adding module is used for adding the rendering resource identifier to the first corresponding relation to form a second corresponding relation under the condition that the rendering resource name is successfully matched with the rendering resource name in the first corresponding relation, wherein the second corresponding relation is used for representing the corresponding relation among the rendering resource name, the rendering resource identifier and the game scene;
the determining module is used for intercepting the target rendering resource identifier corresponding to each frame of game picture rendered by the target game application in real time in the running process, and determining a target game scene matched with the target rendering resource identifier based on the second corresponding relation.
In a third aspect, an electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory perform communication with each other through the communication bus;
A memory for storing a computer program;
And the processor is used for realizing the steps of the game scene recognition method in the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the game scene recognition method of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the advantages that the method is used for obtaining the rendering resource name and the rendering resource identifier required by the target game application when rendering the game picture corresponding to at least one game scene, matching the rendering resource name with the rendering resource name in the preset first corresponding relation, wherein the first corresponding relation is used for representing the corresponding relation between the rendering resource name and the game scene, adding the rendering resource identifier into the first corresponding relation to form a second corresponding relation when the rendering resource name is successfully matched with the rendering resource name in the first corresponding relation, wherein the second corresponding relation is used for representing the corresponding relation among the rendering resource name, the rendering resource identifier and the game scene, intercepting the target rendering resource identifier corresponding to the target game application when rendering each frame of game picture in the running process in real time, and determining the target game scene matched with the target rendering resource identifier based on the second corresponding relation. Through the mode, the target game scene corresponding to each frame of game picture can be accurately determined by utilizing the target rendering resource identification and the second corresponding relation corresponding to each frame of game picture when the target game application renders each frame of game picture in the running process, a large amount of computing resources of a terminal are not required to be consumed for carrying out image recognition on the game picture, so that the performance influence on the running of the game is reduced, and meanwhile, the image recognition technology is not required to be relied on for carrying out image recognition on the game picture, so that the requirements of the display position, the feature degree and the like of the image are not required to be limited, and the use scene of the game scene recognition is enlarged.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following disclosure provides many different embodiments, or examples, for implementing different structures of the invention. In order to simplify the present disclosure, components and arrangements of specific examples are described below. They are, of course, merely examples and are not intended to limit the invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
In order to solve the technical problems that a game scene recognition mode in the prior art needs to consume a large amount of computing resources of a terminal and is limited in use scene, the application provides a game scene recognition method, a device, electronic equipment and a storage medium, which can reduce the consumption of computing resources of the terminal and enlarge the use scene of game scene recognition.
Referring to fig. 1, fig. 1 is a schematic flow chart of a game scene recognition method according to an embodiment of the present application. As shown in fig. 1, the game scene recognition method may include the steps of:
step 101, obtaining a rendering resource name and a rendering resource identifier required by the target game application when rendering a game picture corresponding to at least one game scene.
Specifically, the target game application may be any game application installed on an electronic device, where the electronic device may be any terminal device such as a smart phone, a personal computer, a tablet, a notebook, and the like. The rendering resource name refers to a specific Texture (i.e., texture) name, engineering (i.e., program) name, shader (i.e., loader) name, frame buffer (i.e., frame buffer) name, etc., which are used by the target game application when rendering different game screens. The rendering resource identifier refers to a unique identifier corresponding to each rendering resource name.
Step 102, matching the rendering resource name with a rendering resource name in a preset first corresponding relation, wherein the first corresponding relation is used for representing the corresponding relation between the rendering resource name and the game scene.
It should be noted that each game application may include one or more game scenes, and in each game scene, there may be a specific object model, for example, object models such as weapon and winning or losing result of a game may appear in a combat scene, object models such as selection buttons may appear in a character selection scene, and so on. And the rendering resource names corresponding to the object model are needed to be used for drawing the object model, so that the corresponding relation between the rendering resource names and the game scene can be established in advance, and the first corresponding relation is obtained.
When the rendering resource name is matched with the rendering resource name in the preset first corresponding relation, if the rendering resource name is contained in the rendering resource name in the first corresponding relation or the rendering resource name is consistent with the rendering resource name in the first corresponding relation, the rendering resource name can be considered to be successfully matched with the rendering resource name in the first corresponding relation, otherwise, the rendering resource name is failed to be matched with the rendering resource name in the first corresponding relation.
And 103, under the condition that the rendering resource name is successfully matched with the rendering resource name in the first corresponding relation, adding the rendering resource identifier into the first corresponding relation to form a second corresponding relation, wherein the second corresponding relation is used for representing the corresponding relation among the rendering resource name, the rendering resource identifier and the game scene.
After the rendering resource name is matched with the rendering resource name in the preset first corresponding relation, if the rendering resource name is successfully matched with the rendering resource name in the first corresponding relation, the rendering resource identification can be added into the first corresponding relation to form a second corresponding relation, and if the rendering resource name is failed to be matched with the rendering resource name in the first corresponding relation, the game scene of the target game application is stopped from being identified if the rendering resource name is not the game scene in the first corresponding relation.
Step 104, intercepting the target rendering resource identifier corresponding to each frame of game picture rendered by the target game application in real time in the running process, and determining a target game scene matched with the target rendering resource identifier based on the second corresponding relation.
After the second corresponding relation is established, the target rendering resource identifier corresponding to the target game application when rendering each frame of game picture can be intercepted in real time in the running process of the target game application, then the intercepted target rendering resource identifier is matched with the rendering resource identifier in the second corresponding relation, and if the matching is successful, the target game scene matched with the target rendering resource identifier can be determined.
In the embodiment, the target game scene corresponding to each frame of game picture can be accurately determined by utilizing the target rendering resource identification and the second corresponding relation corresponding to each frame of game picture when the target game application renders each frame of game picture in the running process, a large amount of computing resources of a terminal are not required to be consumed for carrying out image recognition on the game picture, so that the performance influence on the running of the game is reduced, and meanwhile, the image recognition technology is not required to carry out image recognition on the game picture, so that the requirements of the display position, the feature degree and the like of the image are not required to be limited, and the use scene of the game scene recognition is enlarged.
Further, the step 101 of obtaining the rendering resource name and the rendering resource identifier required by the target game application when rendering the game frame corresponding to the at least one game scene specifically includes:
Judging whether the game package names corresponding to the target game application are contained in the associated data of the target file or not under the condition that the target game application is detected to be in a starting stage, wherein the associated data of the target file are used for representing N first corresponding relations associated with N game package names, the N game package names are in one-to-one correspondence with the N game applications, and N is an integer greater than or equal to 1;
And calling a first preset function under the condition that the game package name corresponding to the target game application is contained in the associated data of the target file, wherein the first preset function is used for acquiring the rendering resource name and the rendering resource identifier.
Specifically, the first preset function may be a function such as glLabelObjectEXT functions, and the first preset function may acquire a rendering resource name and a rendering resource identifier for a user when the game application is started.
In an embodiment, when it is detected that the target game application is in the start stage, the associated data of the game package name and the target file corresponding to the target game application may be obtained, and the associated data of the game package name and the target file corresponding to the target game application may be compared. If the game package name corresponding to the target game application is contained in the associated data of the target file, the first corresponding relation associated with the target game application is preconfigured in the target file, and a first preset function can be called to obtain the rendering resource name and the rendering resource identifier corresponding to the target game application. If the game package name corresponding to the target game application is not contained in the associated data of the target file, the first corresponding relation associated with the target game application is not preconfigured in the target file, and the game scene identification flow can be ended at this time.
In this embodiment, when the target game application is in the startup stage, the rendering resource name and the rendering resource identifier required by the target game application when rendering the game screen may be obtained by calling the first preset function, so that the second corresponding relationship is obtained according to the corresponding relationship between the rendering resource name and the rendering resource identifier.
Further, before the step of determining whether the game package name corresponding to the target game application is included in the association data of the target file, the method further includes:
acquiring rendering resource names required by each game application in the N game applications when rendering a game picture corresponding to at least one game scene, and obtaining N first corresponding relations corresponding to the N game applications;
acquiring N game package names corresponding to N game applications;
and establishing the corresponding relation between the N first corresponding relations and the N game package names to obtain the associated data of the target file.
In one embodiment, the association data of the target file needs to be preconfigured before determining whether the game package name corresponding to the target game application is included in the association data of the target file. When the associated data of the target file is configured, the rendering resource names required by each game application in the N game applications when rendering the game picture corresponding to at least one game scene are required to be obtained, N first corresponding relations corresponding to the N game applications are obtained, and N game package names corresponding to the N game applications are obtained. And then, based on the obtained N first corresponding relations and N game package names, establishing corresponding relations between the N first corresponding relations and the N game package names to obtain the association data of the target file.
Specifically, the rendering resource name required for each of the N game applications in rendering the game screen corresponding to the at least one game scene may be acquired by a manner of using an image analysis tool or a manner of printing parameters using glLabelObjectEXT functions in the GLES lib library, or the like. Taking the manner in which parameters are printed as a function at glLabelObjectEXT as an example, the function parameters are as follows:
glLabelObjectEXT(GLenum type,GLuint object,GLsizei length,const GLchar*label);
Wherein, the parameter 1type represents the type of the rendering resource assigned, such as gl_ TEXTURE2D, GL _program, and the parameter 4 represents the name character assigned to the resource (i.e. the rendering resource name), the two parameters are printed into a log, then the game is run, the rendering resource with the characteristic name in each game scene is found out, and the rendering resource is configured into a target file (such as xml file, etc.):
<game
name= "game 1"
Type=”texture”
Res= "name 1"
Scene= "Scene a"/>
According to the method, the rendering resource names in other games can be found out, and the rendering resource names are configured into the target file according to the game package names. The configuration flow of the associated data of the target file is as shown in fig. 2:
Step 201, analyzing and finding out the name of rendering resource with characteristics of a certain game application in different scenes.
Step 202, configuring the corresponding relation among the rendering resource type, the rendering resource name, the game scene and the game package name of the game application to the target file.
And 203, analyzing and obtaining the corresponding relation of other game applications under different game scenes in the mode.
And 204, configuring and obtaining the associated data of the target file.
In this embodiment, association data of the target file may be preconfigured according to actual needs, so as to obtain a first corresponding relationship associated with different game applications. And the associated data of the target file can be optimized and adjusted by the subsequent developer, so that the game scene recognition of different game applications is realized.
Further, step 104 of intercepting, in real time, a target rendering resource identifier corresponding to the target game application when rendering each frame of game screen in the running process includes:
and under the condition that the target game application is detected to be in the game picture rendering stage, a second preset function is called, wherein the second preset function is used for intercepting a target rendering resource identifier corresponding to the target game application when rendering each frame of game picture in real time.
Specifically, the second preset function may be glUseProgram, glBindTexture, glBindFramebuffer functions, and the second preset function may intercept the target rendering resource identifier in real time when the game application is in the game screen rendering stage.
In an embodiment, when the target game application is detected to be in the game picture rendering stage, a second preset function can be called, and the target rendering resource identifier corresponding to each frame of game picture rendered by the target game application is intercepted in real time through the second preset function. Therefore, the target game scene matched with the target rendering resource identification is conveniently and subsequently determined based on the second corresponding relation, and the game scene recognition function is realized.
Further, in the step 104, after determining, based on the second correspondence, the target game scene that matches the target rendering resource identifier, the method further includes:
And adjusting the running parameters of the terminal equipment running the target game application and/or the display content of the user interface according to the target game scene.
In an embodiment, after determining the target game scene matched with the target rendering resource identifier, the operation parameters of the terminal device running the target game application may 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 implement different game auxiliary functions.
Further, the step of adjusting the operation parameters of the terminal device running the target game application and/or the display content of the user interface according to the target game scene includes:
increasing the frequency of the CPU and the graphics processor in the terminal device in the case where the target game scene is a combat scene, decreasing the frequency of the CPU and the graphics processor in the terminal device in the case where the target game scene is a non-combat scene, or
Controlling the terminal device to vibrate in the case that the target game scene is a combat scene or a vehicle drift scene, or
Displaying recommendation information on a user interface of the terminal device in the case that the target game scene is a character selection scene, wherein the recommendation information is related information of a recommendation character in the target game application, or
And under the condition that the target game scene is a key information broadcasting scene, controlling the terminal equipment to broadcast the key information.
Specifically, as an alternative implementation manner, the frequencies of the central processor and the graphic processor in the terminal device can be increased when the target game scene is a battle scene, and the frequencies of the central processor and the graphic processor in the terminal device can be reduced when the target game scene is a non-battle scene, so that the adjustment of the frequencies of the central processor and the graphic processor in the battle scene and the non-battle scene is realized, and the performance of the target game application in running is improved.
As yet another alternative embodiment, the terminal device may be controlled to vibrate in the case where the target game scene is a combat scene or a vehicle drift scene. For example, during XX game operation, if a strange jump out of the injury number is identified, the vibration effect can be increased so as to improve the hitting hand feeling of the user, or during XX game operation, if a drifting tire mark is identified, the vibration effect can be increased so as to improve the hand feeling of the user.
As another alternative embodiment, the recommendation information may be displayed in the user interface of the terminal device in case that the target game scene is a character selection scene. For example, during XX game play, hero strategy may be pushed if it is identified which hero is selected by the player, or during XX game play, if it is identified that the current scenario is a hero selection scenario, a powerful hero ranking of the current version of the target game application may be displayed, etc.
As still another alternative embodiment, the terminal device may be controlled to broadcast the key information when the target game scene is a key information broadcast scene. For example, in the XX game running process, if key broadcasting information such as five times, storm king, game play win-lose results and the like is identified, voice broadcasting can be performed after specific broadcasting content is identified by combining an image identification technology.
Further, the rendering asset names are classified by rendering asset types, which include at least one of texture, engineering, shader, and frame buffer.
In an embodiment, the rendering resource type may be one or a combination of texture, engineering, shader, and frame buffer, and the embodiment is not specifically limited. The rendering resource names of each game application may be classified according to the rendering resource types, and then subdivided according to the types to determine the rendering resource names. For example, when the rendering asset type is texture, the rendering asset name may be texture 1, texture 2, texture 3, and so on.
As an optional implementation manner, the game scene recognition method provided by the embodiment of the present application may be applied to a system architecture shown in fig. 3, where the system architecture may include a hardware device layer, a kernel layer, an application framework layer, and an application layer. The hardware device layer includes a central processing unit (Central Processing Unit, abbreviated as CPU), a graphics processor (graphics processing unit, abbreviated as GPU), a random access memory (random access memory, abbreviated as RAM), and a storage device. The central processing unit is a core device of the electronic device, and is used for executing program codes, and generally consists of a logic operation unit, a control unit and a storage unit. The graphics processor is a microprocessor which is specially used for processing images and graphics related operations, and the graphics processor can enable a display card to reduce the dependence on the CPU and perform part of the original CPU operation, especially in the aspect of graphics processing. The kernel layer includes a Process monitor (i.e., process Manager), a storage Manager (i.e., memoryManager), a file system (i.e., FILE SYSTEM), and a Binder Driver. The Binder provides an advanced (Inter-process communication (IPC) mechanism for the android system, and uses technologies such as proxy object, shared memory, serialization and the like to realize functions of Inter-process communication and remote call. The method allows data transmission and method call between different processes, and realizes decoupling between processes. The application framework layer includes Activity service management (ACTIVITY MANAGER SERVICE, abbreviated as AMS), installation package management service (PACKAGE MANAGER SERVICE, abbreviated as PMS), openGLE graphics library, and game scene identification modules. OpenGL is an abbreviation of Open Graphics Library, openGL is a powerful, convenient to invoke underlying graphics library, which defines a cross-programming language, cross-platform, specialized graphics program interface that can be used for processing and rendering two-dimensional or three-dimensional images. OpenGLES is an abbreviation for OpenGL for Embedded Systems, openGLES is a subset of three-dimensional graphics APIOpenGL, designed for embedded devices. The game scene recognition module can run in a system service process of the android system, mainly loads preset associated data, receives parameters of an application programming interface (Application Programming Interface, called API for short) when the game application is rendered, compares the parameters with the data, determines a current game scene through a matching result of key fields, and then sends scene information to a demand terminal. The application layer may include a plurality of game applications, such as game application 1, game application 2, and so on.
After the android system is started, the game scene identification module can read preset associated data in an xml file (namely a target file) under a fixed path, and the associated data is loaded into the memory. In the starting stage of the target game application, whether the associated data contains the game package name can be judged according to the game package name corresponding to the target game application, if the associated data contains the game package name, the rendering resource type and the rendering resource name are spanned Cheng Chuandi into a scene recognition module through Binder communication and pressed into a cache queue when the target game application calls glLabelObjectEXT functions, then the rendering resource name in the queue and the rendering resource name in the associated data are compared, if the two have a containing relationship or an equal relationship, the matching of the rendering resource name is successful, and the rendering resource identifier corresponding to the rendering resource name can be combined into the associated data, so that the corresponding relationship of the rendering resource type, the rendering resource name, the rendering resource identifier and the game scene is established, and the specific process is shown in fig. 4.
When the target game application is in the rendering process, the target game application can call functions such as glBindTexture, glUseProgram to switch game resources, at this time, the rendering resource identifiers in the functions can be transferred to a game scene recognition module in a Binder communication mode, the rendering resource identifiers are compared with the rendering resource identifiers in the associated data, if the rendering resource identifiers are the same, the target game application is indicated to draw the corresponding game scene currently, and then the scene recognition module can transfer the current game scene to a demand module, namely, one-time game scene recognition is completed, and the specific flow is shown in fig. 5.
By the method, the game scene can be identified only by judging the name and the identification of the rendering resources in the running process of the target game application, the computing resources are not additionally consumed, the better performance advantage is achieved, the scene identification range and the identification accuracy are enlarged, and more detailed scene optimization and game auxiliary functions can be developed on the basis.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a game scene recognition device according to an embodiment of the present application. As shown in fig. 6, the game scene recognition device 600 includes:
the obtaining module 601 is configured to obtain a rendering resource name and a rendering resource identifier required by the target game application when rendering game frames corresponding to different game scenes;
The matching module 602 is configured to match the rendering resource name with a rendering resource name in a preset first correspondence, where the first correspondence is used to characterize a correspondence between the rendering resource name and a game scene;
The adding module 603 is configured to add the rendering resource identifier to the first corresponding relationship to form a second corresponding relationship when the rendering resource name is successfully matched with the rendering resource name in the first corresponding relationship, where the second corresponding relationship is used to characterize a corresponding relationship among the rendering resource name, the rendering resource identifier and the game scene;
The determining module 604 is configured to intercept, in real time, a target rendering resource identifier corresponding to each frame of game screen when the target game application renders each frame of game screen in the running process, and determine, based on the second correspondence, a target game scene that is matched with the target rendering resource identifier.
Further, the acquisition module 601 includes:
The judging sub-module is used for judging whether the game package name corresponding to the target game application is contained in the associated data of the target file or not under the condition that the target game application is detected to be in a starting stage, wherein the associated data of the target file are used for representing N first corresponding relations associated with N game package names, the N game package names are in one-to-one correspondence with the N game applications, and N is an integer greater than or equal to 1;
The first calling sub-module is used for calling a first preset function under the condition that the game package name corresponding to the target game application is contained in the associated data of the target file, wherein the first preset function is used for acquiring the rendering resource name and the rendering resource identifier.
Further, the obtaining module 601 further includes:
The first acquisition sub-module is used for acquiring rendering resource names required by each game application in the N game applications when rendering the game pictures corresponding to at least one game scene, and obtaining N first corresponding relations corresponding to the N game applications;
the second acquisition sub-module is used for acquiring N game package names corresponding to N game applications;
the establishing sub-module is used for establishing the corresponding relation between the N first corresponding relations and the N game package names to obtain the associated data of the target file.
Further, the determining module 604 includes:
And the second calling sub-module is used for calling a second preset function under the condition that the target game application is detected to be in the game picture rendering stage, wherein the second preset function is used for intercepting the target rendering resource identification corresponding to the target game application when rendering each frame of game picture in real time.
Further, the apparatus 600 further comprises:
and the adjusting module is used for adjusting the running parameters of the terminal equipment running the target game application and/or the display content of the user interface according to the target game scene.
Further, the adjusting module is specifically configured to:
increasing the frequency of the CPU and the graphics processor in the terminal device in the case where the target game scene is a combat scene, decreasing the frequency of the CPU and the graphics processor in the terminal device in the case where the target game scene is a non-combat scene, or
Controlling the terminal device to vibrate in the case that the target game scene is a combat scene or a vehicle drift scene, or
Displaying recommendation information on a user interface of the terminal device in the case that the target game scene is a character selection scene, wherein the recommendation information is related information of a recommendation character in the target game application, or
And under the condition that the target game scene is a key information broadcasting scene, controlling the terminal equipment to broadcast the key information.
Further, the rendering asset names are classified by rendering asset types, which include at least one of texture, engineering, shader, and frame buffer.
It should be noted that, the apparatus 600 may implement the steps of the game scene recognition method provided in any one of the foregoing method embodiments, and may achieve the same technical effects, which are not described herein in detail.
As shown in fig. 7, the embodiment of the present application further provides an electronic device, which includes a processor 711, a communication interface 712, a memory 713, and a communication bus 714, wherein the processor 711, the communication interface 712, the memory 713 perform communication with each other through the communication bus 714,
A memory 713 for storing a computer program;
In one embodiment of the present application, the processor 711 is configured to implement the game scene recognition method provided in any one of the foregoing method embodiments when executing the program stored in the memory 713, where the method includes:
Acquiring a rendering resource name and a rendering resource identifier required by a target game application when rendering a game picture corresponding to at least one game scene;
Matching the rendering resource name with a rendering resource name in a preset first corresponding relation, wherein the first corresponding relation is used for representing the corresponding relation between the rendering resource name and the game scene;
Under the condition that the rendering resource name is successfully matched with the rendering resource name in the first corresponding relation, adding the rendering resource identifier into the first corresponding relation to form a second corresponding relation, wherein the second corresponding relation is used for representing the corresponding relation among the rendering resource name, the rendering resource identifier and the game scene;
Intercepting a target rendering resource identifier corresponding to each frame of game picture rendered by the target game application in the running process in real time, and determining a target game scene matched with the target rendering resource identifier based on the second corresponding relation.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the game scene recognition method provided in any one of the method embodiments described above.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only, and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," "including," and "having" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order described or illustrated, unless an order of performance is explicitly stated. It should also be appreciated that additional or alternative steps may be used.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.