Control method and electronic equipment
By intercepting the rendered data of the game application to identify the scene and adjusting the parameters of the electronic device, the problem of different user experience needs in different scenarios is solved, and the comprehensive improvement of the game experience is achieved.
Patent Information
- Application Number
- CN202311254463.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2043-09-26
AI Technical Summary
In game applications, users' experience needs vary depending on the scenarios, and it is difficult for the prior art to effectively adjust the parameters of electronic devices to meet the needs of different scenarios.
By intercepting the rendering data of the game application, identifying the scenes in which the characters are located, and adjusting the relevant parameters of the electronic device according to the preset optimization strategy, such as improving the CPU/GPU frequency or enhancing the image quality.
It realizes dynamic adjustment of electronic device parameters according to different game scenarios to improve user's gaming experience, including comprehensive improvements in performance, picture quality and power consumption.
Smart Images

Figure CN119746405A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal equipment, and in particular to a control method and electronic equipment. Background Art
[0002] Currently, many electronic devices support game applications. In some game applications, there are different scenarios. In different scenarios, users have different needs.
[0003] For example, the game maps in many current game applications are large, and there are many areas distributed in the map. Each area has its own unique style and gameplay. Accordingly, the game load, picture quality, etc. are also different, and the experience requirements of game players are also different. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a control method and an electronic device to enhance the user experience in gaming applications.
[0005] In the first aspect, the present application provides a control method, which is applied to an electronic device, and the method includes: intercepting first rendering data of a rendering process in a first application, identifying a first scene in which a first character is located according to feature data and the first rendering data, wherein the first scene includes a first marker, and the feature data is data representing the features of the markers of each scene in the first application stored in the electronic device, and the feature data includes first feature data corresponding to the first marker, and determining whether a first distance between the first character and the first marker is less than a first threshold value according to the first rendering data, and if so, adjusting the parameter value of a parameter related to the first optimization strategy in the electronic device according to the first optimization strategy corresponding to the first scene. In this way, different optimization strategies can be used to adjust the relevant parameters of the electronic device for different scenes in applications, such as characters in game applications, to flexibly meet the experience needs of users in different scenes and enhance the user experience.
[0006] According to the first aspect, intercepting first rendering data in a rendering process of a first application includes: intercepting the first rendering data in the rendering process of the first application by hooking a rendering instruction.
[0007] According to the first aspect, identifying a first scene in which a first character is located based on feature data and first rendering data includes: comparing the first rendering data with the feature data; if the first rendering data matches first feature data in the feature data, identifying that the first character is in the first scene.
[0008] According to the first aspect, before determining whether the first distance between the first person and the first marker is less than the first threshold, it also includes: parsing first model matrix data, first coordinate data of the first person and first vertex data of the first marker from the first rendering data; determining the first distance between the first person and the first marker based on the first vertex data, the first model matrix data and the first coordinate data.
[0009] According to the first aspect, the first distance between the first person and the first marker is determined based on the first vertex data, the first model matrix data and the first coordinate data, including: obtaining the first local coordinate data of the first center point based on the first vertex data, the first center point being the center point of the first marker; converting the first local coordinate data into first world coordinate data using the first model matrix data; obtaining the first distance between the first person and the first marker based on the first coordinate data and the first world coordinate data.
[0010] According to the first aspect, before adjusting the parameter value of the parameter related to the first optimization strategy in the electronic device according to the first optimization strategy corresponding to the first scene, it also includes: searching the first optimization strategy corresponding to the first scene from the correspondence between preset scenes and optimization strategies.
[0011] According to the first aspect, the characteristic data includes any one or more of the following data: size data of a data cache buffer; target data in the data cache buffer.
[0012] According to the first aspect, it also includes: intercepting the second rendering data in the rendering process of the first application; identifying the first scene in which the first person is located based on the feature data and the second rendering data; determining whether the second distance between the first person and the first marker is less than the first threshold based on the second rendering data; if not, modifying the parameter value of the parameter related to the first optimization strategy in the electronic device to the parameter value before adjustment.
[0013] According to the first aspect, it also includes: intercepting the third rendering data in the rendering process of the first application, identifying the second scene in which the first person is located based on the feature data and the third rendering data, the second scene includes a second marker, and the feature data includes second feature data corresponding to the second marker; based on the third rendering data, determining whether the third distance between the first person and the second marker is less than a second threshold; if so, adjusting the parameter value of the parameter related to the second optimization strategy in the electronic device according to the second optimization strategy corresponding to the second scene.
[0014] According to the first aspect, it also includes: intercepting the fourth rendering data in the rendering process of the first application, and identifying the first scene in which the first person is located based on the feature data and the fourth rendering data; determining whether the fourth distance between the first person and the first marker is less than the first threshold based on the fourth rendering data; if so, keeping the adjusted parameter value unchanged.
[0015] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is coupled to the processor; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes any one of the control methods of the first aspect.
[0016] In a third aspect, the present application provides a computer-readable storage medium, comprising a computer program, which, when executed on an electronic device, enables the electronic device to execute any one of the control methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic structural diagram of an illustrative electronic device 100;
[0018] Figure 2 1 is a software structure block diagram of an electronic device 100 according to an embodiment of the present application;
[0019] Figure 3 The following is an exemplary flowchart of a control method in an embodiment of the present application;
[0020] Figure 4 This is an example diagram of a map in a game application;
[0021] Figure 5 is a schematic diagram of an exemplary coordinate conversion process;
[0022] Figure 6 The following is a schematic diagram showing an exemplary control process for a game application;
[0023] Figure 7 A flowchart of a method for controlling a game application is shown as an example;
[0024] Figure 8 For example, Figure 7 Detailed flow chart of the control process;
[0025] FIG. 9( a ) is a diagram showing an example of an instruction sequence of a drawing model 1 corresponding to an image frame;
[0026] FIG9( b) is a diagram showing an example of vertex coordinate data;
[0027] FIG9(c) is an example diagram of the instruction flow corresponding to the vertex coordinate data shown in FIG9(b);
[0028] FIG9( d ) is a complete data example diagram of the vertex coordinate data in FIG9( b );
[0029] FIG9( e ) is an example diagram of the derived data of the vertex coordinate data in FIG9( d );
[0030] FIG. 10( a ) is a diagram showing an exemplary content of a vertex shader;
[0031] FIG10( b ) is an example diagram of variable storage content corresponding to FIG10( a );
[0032] Fig.11 is an exemplary diagram showing the contents of buffer 5634;
[0033] Fig.12 An example diagram showing a landmark model and a bounding box. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0035] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0036] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0037] This application optimizes the gaming experience based on location recognition. It can identify the location of characters in the game (i.e., which area of the map the character is currently in), match corresponding optimization strategies for different areas, and improve the user's comprehensive experience in terms of game performance, image quality, power consumption, and heat.
[0038] This embodiment provides a control method, which can be applied to electronic devices such as mobile phones and tablets, but is not limited to these electronic devices.
[0039] In this embodiment, the structure of the electronic device can be as follows Figure 1 shown.
[0040] Figure 1 FIG. 1 is a schematic diagram of the structure of an electronic device 100 exemplarily shown. It should be understood that Figure 1 The illustrated electronic device 100 is merely one example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different configuration of components. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0041] See also Figure 1 The electronic device 100 may include: a processor 110, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, an indicator 192, a camera 193, etc.
[0042] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0043] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0044] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.
[0045] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0046] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0047] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0048] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0049] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0050] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0051] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0052] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0053] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0054] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
[0055] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0056] Of course, in addition to the above components, the electronic device 100 may also include other hardware components, which are not listed here one by one.
[0057] Figure 2 1 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
[0058] The layered architecture of the electronic device 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system may include an application layer, an application framework layer, a system library, and a kernel layer.
[0059] The application layer can include a series of application packages.
[0060] like Figure 2 As shown, the application package may include camera, gallery, map, WLAN, music, short message, call, navigation, Bluetooth, video and other applications. Of course, these applications are only exemplary. In other embodiments, the application layer may include Figure 2 Applications not shown in the figure may also not include Figure 2 One or more applications shown in .
[0061] like Figure 2 As shown, the application framework layer may include a window manager, a resource manager, a view system, etc.
[0062] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0063] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0064] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0065] like Figure 2 As shown, the application framework layer may include a control module, and the control module is used to execute the control method of the embodiment of the present application.
[0066] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0067] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0068] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0069] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0070] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0071] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0072] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0073] A 2D graphics engine is a drawing engine for 2D (two-dimensional) drawing.
[0074] The kernel layer is the layer between hardware and software.
[0075] like Figure 2 As shown, the kernel layer may include display driver, Wi-Fi driver, audio driver, sensor driver, Bluetooth driver, etc.
[0076] Understandably, Figure 2 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.
[0077] Figure 3 Schematic diagram of the control method in the embodiment of the present application. Figure 3 In this embodiment, the control method process may include the following steps:
[0078] S301, intercepting first rendering data in a rendering process of a first application.
[0079] S302, identifying a first scene in which the first character is located based on the feature data and the first rendering data, wherein the first scene includes a first marker, and the feature data is data stored in the electronic device and represents features of the markers of each scene in the first application, and the feature data includes first feature data corresponding to the first marker.
[0080] S303: Determine, according to the first rendering data, whether a first distance between the first person and the first marker is less than a first threshold.
[0081] S304: If yes, adjust the parameter value of the parameter related to the first optimization strategy in the electronic device according to the first optimization strategy corresponding to the first scenario.
[0082] The characteristic data may be obtained by the developer in the following manner and stored in the electronic device after being obtained:
[0083] Reading an image frame from a first application;
[0084] The read image frames are analyzed to obtain feature data, where the feature data includes feature data corresponding to the markers of each scene in the first application.
[0085] In this article, landmark is the abbreviation of iconic object.
[0086] Here, the concept of the scene in this embodiment is explained. Figure 4 The following is an example diagram of a map in a game application. Figure 4 The overall map is divided into three areas by dotted lines. Each area corresponds to a scene, namely scene 1, scene 2 and scene 3. That is, the scenes and areas in the map are one-to-one corresponding. Each scene has a unique landmark corresponding to the scene, such as Figure 4 , the marker of scene 1 is marker 1, the marker of scene 2 is marker 2, and the marker of scene 3 is marker 3.
[0087] Each scene (area) has a unique style and gameplay. In this embodiment, a corresponding optimization strategy is pre-configured for each scene. Among them, one scene can correspond to one or more optimization strategies. For example, the corresponding relationship between the scene and the optimization strategy can be shown in Table 1.
[0088] Table 1
[0089] Scenario Optimization strategy Scenario 1 Optimization strategy 1, optimization strategy 2 Scenario 2 Optimization Strategy 5 Scene 3 Optimization Strategy 4
[0090] This embodiment can identify the location area of the characters in the game, match the corresponding optimization method according to the unique style and gameplay of each area, and improve the user's comprehensive experience in game performance, image quality, power consumption and heat.
[0091] by Figure 4Take scene 1 in the map as an example. If there are many players, heavy load, and fierce battle in scene 1, when the characters are identified in scene 1, the heavy load requirement of scene 1 can be met by adjusting the scheduling strategy (increasing the CPU (central processing unit), GPU (graphics processing unit), DDR (double-rate synchronous dynamic random access memory) frequency, etc.) to ensure the performance of players in this location. At the same time, the interpolation solution can also be used to further improve the smooth experience during fierce battles. Here, increasing the CPU, GPU, DDR frequency and interpolation are the optimization strategies corresponding to scene 1.
[0092] The content of the optimization strategy can be shown in Table 2.
[0093] Table 2
[0094] Optimization strategy number Optimize strategy content Optimization strategy 1 Increase CPU / GPU / DDR frequency Optimization strategy 2 Keying Optimization Strategy 3 Drop Frames Optimization Strategy 4 Enhanced image quality Optimization Strategy 5 GPU load shedding …… ……
[0095] Figure 5 is a schematic diagram showing an exemplary coordinate transformation process. Figure 5 In this embodiment, the coordinate system composed of various coordinates in the coordinate conversion process in the game application includes local coordinates, world coordinates, observation coordinates, clipping coordinates and screen coordinates. Among them:
[0096] Local coordinates: refers to the coordinates of the object relative to the local origin, which is also the coordinates where the object starts.
[0097] World coordinates: also known as world space coordinates, refers to a coordinate system with a larger spatial range, through the M matrix (i.e. Figure 5 The M matrix in (model matrix) transforms local coordinates into world space coordinates.
[0098] Observation coordinates: refers to the coordinates observed from the perspective of the camera or observer, through the V matrix (i.e. Figure 5 The Vmatrix in (the observation matrix) can transform world space coordinates into observation space coordinates.
[0099] Clipping coordinates: refers to defining a frustum, clipping objects outside the frustum, and normalizing the coordinates to the range of -1.0 to 1.0, through P (i.e. Figure 5 The P matrix in (projection matrix) is implemented.
[0100] Finally, the clipping coordinates are converted into screen coordinates through viewport transformation, which can be implemented through the glViewPort function.
[0101] During the game rendering process, each object is composed of several vertices. These vertices are transformed by the model matrix, observation matrix, projection matrix and viewport transformation and finally present the final position in the screen space. Of course, textures can also be added to these object models during the rendering process to give players a real experience.
[0102] Figure 6 This is a schematic diagram showing an exemplary control process for a game application. Figure 6 In this embodiment, the operation is performed in the middle of the rendering process, the game rendering instruction is intercepted, and the vertex data, MVP data (referring to the data of the M matrix, V matrix, and P matrix) and character coordinate data of a certain scene marker model are obtained; then, the coordinates of the marker model in the world space coordinate system are obtained through the vertex data and the M matrix, and the distance between the character and the marker is further obtained. When the distance is less than a certain threshold, it is determined that the character is currently in a certain location and scene in the game, thereby enabling appropriate optimization solutions to enhance the gaming experience. At the same time, the distance value is refreshed every frame, and the user's position can be determined in real time, when to enter the position, and when to leave the position, and the effective time and range of various optimization strategies can be accurately controlled.
[0103] Here, the control method of the present application is explained by taking the control process of a game application as an example.
[0104] Figure 7 The figure is a flowchart of a method for controlling a game application. Figure 8 For example, Figure 7 Detailed flowchart of the control process.
[0105] See also Figure 7 and Figure 8 In this embodiment, the process of the method for controlling the game application may include the following steps:
[0106] Step S1, capturing image frames of the game application for offline analysis to obtain unique landmark feature data for each scene of the game.
[0107] The offline analysis contents include: Figure 8 This is shown in the “Offline Analysis” box in the upper left corner.
[0108] The marker feature data may include data such as the size of the data buffer and the target.
[0109] By analyzing shader variables offline, the data structure can be analyzed, and then the data in the buffer can be parsed, such as the MVP matrix and the coordinates of the Camera in the world space.
[0110] In one example, unique marker feature data of each scene of the game is obtained through captured image frames, and the marker feature data is stored in an electronic device.
[0111] Each scene in the game has a unique landmark. Figure 4 For example, the only landmark in scene 1 is Figure 4 When the rendering instruction stream starts to render marker 1, it can be determined that the person has appeared near the location (i.e., marker 1). By further calculating the distance between the person and marker 1, it is possible to accurately determine the person's location at the location and when he or she leaves the location.
[0112] That is, when the distance between the person and the marker 1 is less than a preset threshold, it can be determined that the person is near the marker 1 (at this time, the person is in the Figure 4 When the distance between the person and the marker 1 is greater than or equal to a preset threshold, it can be determined that the person is not near the marker 1 (the person is in the circle 1 at this time). Figure 4 outside the circle 1 in the figure), at this time the character leaves the marker 1.
[0113] The frame is captured and analyzed offline to determine the characteristics of the marker 1, the corresponding label during rendering, the data size, the target type of the cache Buffer, the data organization method, etc. The vertex data of the marker 1 is shown in Table 3 below.
[0114] Table 3
[0115]
[0116]
[0117] In Table 3, "VIX" represents (the serial number of the object model vertex), "IDX" represents (the index value of the object model vertex), and "in_ATTRIBUTE0" represents (the coordinate value of the object model vertex in the local coordinate system).
[0118] Step S2, by hooking the rendering instruction, intercepting the rendering data and matching it with the offline analysis features.
[0119] In this step, the offline analysis feature is the marker feature of step S1.
[0120] The detailed process of this step can be as follows Figure 8 As shown in steps S801 to S805:
[0121] Step S801, HOOK instruction and intercept data.
[0122] Step S802, performing landmark feature matching, that is, performing landmark feature matching according to the intercepted rendering data.
[0123] Step S803, determine whether the marker feature matching is successful, if yes, that is, the matching is successful, execute step S804, otherwise end.
[0124] Step S804, performing data Buffer feature matching.
[0125] Step S805, determine whether the data Buffer feature match is successful, if yes, that is, the match is successful, execute step S806, otherwise end.
[0126] Hook is a technique used to obtain or change certain data during program execution, or to change the program execution process. In this step, the following data can be intercepted through the HOOK instruction:
[0127] (1) Intercepting vertex data
[0128] Hook game rendering instructions, intercept vertex data through glGenBuffer, glBindBuffer, glBufferData, glBufferSubData and other instructions, determine what vertex attributes to use for vertex position information, determine the organization of vertex data, including using vertex array cache, index array, etc. for organization; parse data and cache it.
[0129] For example, buffer ID = 111. The corresponding program code is as follows:
[0130] Name
[0131] glGenBuffers-generate buffer object names
[0132] C Specification
[0133] void glGenBuffers(GLsizei n,
[0134] GLuint* buffers);
[0135] It can be seen from the above code that here, the name of the cache object is generated by the function glGenBuffer, and the name is a unique identifier 111 of the cache.
[0136] It is necessary to intercept these two targets: GL_ELEMENT_ARRAY_BUFFER, GL_ARRAY_BUFFER; indicate the operation ID: bufferID is 111. The corresponding program code is as follows:
[0137] Name
[0138] glBindBuffer-bind a named buffer object
[0139] C Specification
[0140] void glBindBuffer(GLenum target,
[0141] GLuint buffer);
[0142] According to the above code, here, the buffer object generated by the function glGenBuffer is bound by the function glBindBuffer.
[0143] The corresponding bufferID is 111; these two targets need to be intercepted: GL_ELEMENT_ARRAY_BUFFER, GL_ARRAY_BUFFER.
[0144] Cache data and size to memory according to ID; if size == 0 or data == nullptr, then only allocate space without caching data. The corresponding program code is as follows:
[0145] Name
[0146] glBufferData, glNamedBufferData-creates and initializes a bufferobject's data store
[0147] C Specification
[0148] void glBufferData(GLenum target,
[0149] GLsizeiptr size,
[0150] const void*data,
[0151] GLenum usage);
[0152] As can be seen from the above code, here, the function glBufferData is used to allocate space and store data for the cache object.
[0153] Then, the data at the corresponding position is transferred. The corresponding program code is as follows:
[0154] glBufferSubData, glNamedBufferSubData-updates a subset of a bufferobject's data store
[0155] C Specification
[0156] void glBufferSubData(GLenum target,
[0157] GLintptr offset,
[0158] GLsizeiptr size,
[0159] const void* data);
[0160] As can be seen from the above code, here, the data in the buffer object is updated through the function glBufferSubData.
[0161] For example, use renderDoc to capture an image frame in a game application. Figure 9(a) is an example diagram of the instruction sequence of the drawing model 1 corresponding to the image frame. As shown in Figure 9(a), for Draw No. 56, the instruction sequence corresponding to its drawing model is located in the lower half of the figure, that is, the instruction sequence numbered from 979 to 989 in Figure 9(a).
[0162] FIG9(b) is an example diagram of vertex coordinate data, and FIG9(c) is an example diagram of the instruction flow corresponding to the vertex coordinate data shown in FIG9(b). As can be seen from FIG9(b), the vertex coordinate is vertex attribute 0 (i.e., in_ATTRIBUTE0). From the instruction flow shown in FIG9(c), 985_glVertexAttribPointer sets the parsing method of vertex attribute 0, and the corresponding vertex buffer is 5634, i.e., the parameter of 984_glBindBuffer. From the instruction flow 983_glBindBuffer, the vertex index buffer object is buffer 5632. By combining the data exports of vertex buffer 5634 and index object buffer 5632, it can be seen that it is the vertex of the current Draw (Draw #56), i.e., drawing model 1.
[0163] FIG9(d) is a complete data example diagram of the vertex coordinate data in FIG9(b). FIG9(e) is an example diagram of the derived data of the vertex coordinate data in FIG9(d). For example, the first row of data (6.81526, 44.39426, 1564.0105) in the table Buffer 5634-Contents in FIG9(e) is one of the data of the vertex buffer 5634 derived from FIG9(d), and the first row of data 0 (located in the data column) in the table Buffer 5632-Contents in FIG9(e) is one of the data of the index object buffer 5632 derived from FIG9(d).
[0164] (2) Intercept M matrix, V matrix, P matrix data, and character coordinate data
[0165] In game applications, the camera moves with the character, so the camera coordinates can be used directly to replace the character's position coordinates in the world space.
[0166] 21. Analyze the corresponding VS shader (vertex shader) to determine the uniform variable names of the M matrix, V matrix, P matrix, and Camera; the uniform variable name of the M matrix is Primitive_LocalToWorldTranslated, and the uniform variable names of the V matrix and P matrix are View_TranslatedWorldToClip.
[0167] 22. Determine the value transfer method of M matrix, V matrix, P matrix, and Camera variable
[0168] 23. Get the corresponding M matrix, V matrix, P matrix, and Camera coordinate values in the world space.
[0169] Figure 10(a) is an example of the contents in the vertex shader, and Figure 10(b) is an example of the variable storage contents corresponding to Figure 10(a). From Figures 10(a) and 10(b), we can see that the Primitive_LocalToWorldTranslated variable is stored in Buffer 10626, and the View_TranslatedWorldToClip variable is stored in Buffer 2832, corresponding to shader 2039.
[0170] Step S3, if the match is successful, parse the Buffer data and save the drawn model vertex data, M matrix, V matrix, P matrix data and character coordinate data.
[0171] This step corresponds to Figure 8Step S806 (parse Buffer data and save vertex, M matrix, character coordinates and other data).
[0172] The purpose of step S3 is to cache vertex position information buffer 5634, index data buffer 5632, M matrix, V matrix, P matrix data (Buffer 10626 and Buffer 2832). It is necessary to record the buffer ID when the buffer is created, cache the corresponding data when the data is passed into the buffer, and synchronously update the cached data when the buffer is updated.
[0173] Take buffer 5634 as an example. Fig.11 For an example diagram showing the contents of buffer 5634, see Fig.11 , store the buffer parameter as bufferID=5634 when the glGenBuffers instruction is called; allocate a bytesize memory block for bufferID_5634 when the glBufferData instruction is called ( Fig.11 In the example, the memory size is 7044) to store the corresponding data. In other examples, glBufferSubData can also be called to update the cached data according to specific parameters.
[0174] Step S4, calculate the distance between the center coordinates of the marker and the character coordinates to determine the position and scene of the character in the game.
[0175] This step corresponds to Figure 8 Step S807 (calculating the distance between the person and the landmark to determine the person's location and scene).
[0176] In one example, after the vertex data of the marker model is obtained, the center coordinates of the marker model may be calculated using the concept of an AABB (Axis-aligned bounding box) bounding box.
[0177] Fig.12 : is an example diagram of a landmark model and a bounding box. Fig.12 As shown, the marker model is placed in a bounding box, the maximum value of the X-axis of the bounding box is x_max, and the minimum value is x_min; the maximum value of the Y-axis of the bounding box is y_max, and the minimum value is y_min; the maximum value of the Z-axis of the bounding box is z_max, and the minimum value is z_min.
[0178] In this way, the coordinates of the center point of the landmark model (center_x, center_y, center_z) are calculated as follows:
[0179] center_x = (x_min + x_max) / 2;
[0180] center_y = (y_min + y_max) / 2;
[0181] center_z=(z_min+z_max) / 2.
[0182] That is, the X-axis value of the coordinates of the center point of the marker model is equal to the average of the maximum and minimum values of the X-axis of the marker model bounding box, the Y-axis value of the coordinates of the center point of the marker model is equal to the average of the maximum and minimum values of the Y-axis of the marker model bounding box, and the Z-axis value of the coordinates of the center point of the marker model is equal to the average of the maximum and minimum values of the Z-axis of the marker model bounding box.
[0183] Then directly perform matrix operations on the coordinates of the center point of the marker model to obtain the coordinate value of the center point of the marker model in the world space coordinate system. The M matrix is Primitive_LocalToWorldvb1. The style of the M matrix is as follows:
[0184]
[0185] In actual applications, the “*” symbol is replaced by a specific number.
[0186] Assume the local coordinates of the vertex are: V1: {45, 51, 65, 11}
[0187] Then, the world coordinates of the vertex are: M*V1={x, y, z, w}={5, 23, 4, 5}
[0188] Among them, x, y, and z are the coordinates of the point on the X-axis, Y-axis, and Z-axis respectively, and w
[0189] After obtaining the coordinate value of the center point of the marker model in the world space coordinate system, the distance between the center coordinates of the marker and the camera coordinates (i.e., the character coordinates) can be calculated based on the coordinate value of the center point of the marker model in the world space coordinate system and the character coordinate data, and then the character's position and scene in the game can be determined based on the distance.
[0190] For example, assuming that the coordinates of the center point of the landmark model in the world space coordinate system are {x1, y1, z1, w1}, and the camera coordinates are {x2, y2, z2, w2}, then the distance d between the two can be calculated according to the following formula (1):
[0191]
[0192] S5, enable appropriate optimization strategies according to different scenarios.
[0193] This step corresponds to Figure 8 Step S808 in (enabling appropriate optimization strategy according to location scenario matching).
[0194] This step improves the user gaming experience by enabling appropriate optimization strategies according to different scenarios.
[0195] Among them, the appropriate optimization strategy refers to the optimization strategy that matches the scenario.
[0196] For example, when players are in a popular game venue, there are many players and the battle is fierce. Players have high requirements for game performance, fluency, tracking, and network latency. Therefore, SOC (System on Chip) frequency upscaling, frame insertion, touch enhancement, network acceleration and other optimization strategies can be enabled in this scene. When players are in a casual scene, they do not have high requirements for performance but high requirements for image quality. Therefore, you can consider enabling the optimization strategy of image quality enhancement to improve the gaming experience.
[0197] In this embodiment, the optimization strategies are all based on the aforementioned location identification for selection and matching.
[0198] The control method of this embodiment is further described in detail below by using examples.
[0199] Example 1
[0200] In offline analysis, select Figure 1 Enter the game mode. The character controlled by the user in the game is character 1. Figure 1 In the example, the combination of parameter values of the parameters related to the gaming experience in the electronic device is parameter value combination 0. Figure 1 The scene is like Figure 4 As shown. The electronic device grabs the location of the game application 1 Figure 1 The image frames of scene 1, scene 2, and scene 3 are analyzed offline to obtain feature data of scene 1, scene 2, and scene 3: feature data 1, feature data 2, and feature data 3. Feature data 1, feature data 2, and feature data 3 are stored in the electronic device. It should be noted that the offline analysis is performed in advance by the developer, and after obtaining the feature data of the scene, the feature data of the scene is stored in the electronic device. When the user uses the application, the electronic device no longer performs offline analysis during the execution of the control method provided in this embodiment.
[0201] After the user opens the game application 1, the electronic device intercepts the instruction stream 1 of the rendering process in the game application 1, and identifies that the character 1 is in the scene 1 according to the feature data and the instruction stream 1, and the scene 1 includes the marker 1. The identification method may be: the rendering data 1 extracted from the instruction stream 1 includes the marker feature data 1, and the marker feature data 1 matches the feature data 1, so it is confirmed that the character 1 is in the scene 1.
[0202] The electronic device determines, based on the rendering data 1 extracted from the instruction stream 1 , that the distance 1 between the person 1 and the marker 1 is less than the threshold 1 at this moment.
[0203] The electronic device enables optimization strategy 1 and optimization strategy 2 corresponding to scene 1, and adjusts the parameter values of parameters related to optimization strategy 1 and optimization strategy 2 in the electronic device according to optimization strategy 1 and optimization strategy 2 corresponding to scene 1 (see Table 1 and Table 2 above), that is, increases the frequency of the CPU, GPU and DDR in the electronic device, and performs frame insertion processing on the display video of game application 1.
[0204] For the convenience of subsequent description, the parameter value combination after this adjustment is referred to as parameter value combination 1, and the parameter value combination before this adjustment is the aforementioned parameter value combination 0.
[0205] Example 2
[0206] Continue with Example 1.
[0207] After intercepting instruction stream 1, the electronic device performs the following operations.
[0208] The electronic device intercepts instruction stream 2 of the rendering process in the game application 1, and recognizes that the character 1 is still in the scene 1 according to the feature data and the instruction stream 2. The recognition method may be: the rendering data 2 extracted from the instruction stream 2 includes the marker feature data 1, and the marker feature data 1 matches the feature data 1, so that the character 1 is confirmed to be in the scene 1.
[0209] The electronic device determines, based on the rendering data 2 extracted from the instruction stream 2 , that the distance 2 between the person 1 and the marker 1 is still smaller than the threshold 1 at this time.
[0210] The electronic device keeps the aforementioned parameter value combination 1 unchanged. That is, after intercepting the instruction stream 2, the parameter value combination in the electronic device is still the parameter value combination 1.
[0211] Example 3
[0212] Continue with Example 2.
[0213] After intercepting instruction stream 2, the electronic device performs the following operations.
[0214] The electronic device intercepts the instruction stream 3 of the rendering process in the game application 1, and recognizes that the character 1 is still in the scene 1 according to the feature data and the instruction stream 3. The recognition method may be: the rendering data 3 extracted from the instruction stream 3 includes the marker feature data 1, and the marker feature data 1 matches the feature data 1, so it is confirmed that the character 1 is in the scene 1.
[0215] The electronic device determines, based on the rendering data 3 extracted from the instruction stream 3 , that the distance 3 between the person 1 and the marker 1 is greater than the threshold 1 at this moment.
[0216] The electronic device stops enabling optimization strategy 1 and optimization strategy 2 corresponding to scene 1, that is, the electronic device adjusts the parameter values of the parameters related to optimization strategy 1 and optimization strategy 2 in the electronic device, so that the parameter value combination after this adjustment is the aforementioned parameter value combination 0, which is the same as the parameter value combination before optimization strategy 1 and optimization strategy 2 corresponding to scene 1 is not enabled.
[0217] Example 4
[0218] Continue with Example 3.
[0219] After intercepting instruction stream 3, the electronic device performs the following operations.
[0220] The electronic device intercepts the instruction stream 4 of the rendering process in the game application 1, and identifies that the character 1 is in the scene 3 according to the feature data and the instruction stream 4, and the scene 3 includes a marker 3. The identification method may be: the rendering data 4 extracted from the instruction stream 4 includes the marker feature data 3, and the marker feature data 3 matches the aforementioned feature data 3, so that the character 1 is confirmed to be in the scene 3.
[0221] The electronic device determines, based on the rendering data 4 extracted from the instruction stream 4 , that the distance 4 between the person 1 and the marker 3 is greater than the threshold 3 at this moment.
[0222] The electronic device keeps the aforementioned parameter value combination 0 unchanged. That is, after intercepting the instruction stream 4, the parameter value combination in the electronic device is still the parameter value combination 0. In this example, the electronic device does not enable any optimization strategy.
[0223] Example 5
[0224] Continue with Example 4.
[0225] After intercepting instruction stream 4, the electronic device performs the following operations.
[0226] The electronic device intercepts the instruction stream 5 of the rendering process in the game application 1, and recognizes that the character 1 is still in the scene 3 according to the feature data and the instruction stream 5, and the scene 3 includes the marker 3. The recognition method may be: the rendering data 5 extracted from the instruction stream 5 includes the marker feature data 3, and the marker feature data 3 matches the aforementioned feature data 3, so it is confirmed that the character 1 is in the scene 3.
[0227] The electronic device determines, based on the rendering data 5 extracted from the instruction stream 5 , that the distance 5 between the person 1 and the marker 3 is less than the threshold 3 at this moment.
[0228] The electronic device enables optimization strategy 3 corresponding to scenario 3, and according to optimization strategy 3 corresponding to scenario 3 (see Table 1 and Table 2 above), adjusts the parameter values of the parameters related to optimization strategy 3 in the electronic device, that is, performs image quality enhancement processing on the display video of game application 1. For the convenience of subsequent description, the parameter value combination after this adjustment is referred to as parameter value combination 2.
[0229] Afterwards, the electronic device can continue to intercept the instruction stream, determine the scene in which character 1 is located based on the instruction stream, and obtain the distance between character 1 and the landmarks in the scene, and then determine whether to enable the optimization strategy corresponding to the current scene based on the relationship between the distance and the corresponding threshold.
[0230] Example 6
[0231] Continue with Example 5.
[0232] User from game app 1 Figure 1 Exit, select Figure 2 Enter the game mode, the character controlled by the user in the game is character 2. Figure 1 In the example, the combination of parameter values of parameters related to gaming experience in the electronic device is parameter value combination 0.
[0233] The electronic devices respectively capture the location of the game application 1 Figure 2 The image frames of scene 4, scene 5, and scene 6 are analyzed offline to obtain feature data of scene 4, scene 5, and scene 6: feature data 4, feature data 5, and feature data 6.
[0234] Then, as in Examples 2 to 5 above, the electronic device intercepts the instruction stream of the rendering process in game application 1, identifies the scene in which character 2 is located (the scene at this time is one of scene 4, scene 5, and scene 6) based on feature data 4, feature data 5, feature data 6 and the intercepted instruction stream, and obtains the distance between character 2 and the landmark in the scene, and then determines whether to enable the optimization strategy corresponding to the current scene based on the relationship between the distance and the corresponding threshold.
[0235] The control method of this embodiment can use different optimization strategies to adjust relevant parameters of electronic devices according to different applications, such as different scenes where characters are located in game applications, flexibly meet the experience requirements of users in different scenes, and improve the user experience.
[0236] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory is coupled to the processor, and the memory stores program instructions. When the program instructions are executed by the processor, the electronic device performs the control method executed by the aforementioned electronic device.
[0237] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0238] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the control method in the above-mentioned embodiment.
[0239] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the control method in the above-mentioned embodiment.
[0240] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the control method in the above-mentioned method embodiments.
[0241] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0242] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0243] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0244] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0245] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0246] Any content of each embodiment of the present application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.
[0247] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0248] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0249] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0250] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0251] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A control method, characterized in that: Applied to electronic equipment, the method comprises: Intercepting first rendering data in a first application rendering process; Identify a first scene in which a first person is located according to feature data and the first rendering data, wherein the first scene includes a first marker, the feature data is data stored in the electronic device that characterizes features of markers of various scenes in the first application, and the feature data includes first feature data corresponding to the first marker; Determining, according to the first rendering data, whether a first distance between the first person and the first marker is less than a first threshold; If yes, according to a first optimization strategy corresponding to the first scenario, adjust the parameter value of the parameter related to the first optimization strategy in the electronic device.
2. The method according to claim 1, characterized in that Intercepting first rendering data in a first application rendering process, including: By hooking the rendering instruction, the first rendering data in the rendering process of the first application is intercepted.
3. The method according to claim 1, characterized in that Identifying a first scene in which a first person is located according to the feature data and the first rendering data includes: comparing the first rendering data with the feature data; If the first rendering data matches the first feature data in the feature data, it is recognized that the first person is in the first scene.
4. The method according to claim 1, characterized in that: Before determining whether the first distance between the first person and the first marker is less than a first threshold, the method further includes: Parsing first model matrix data, first coordinate data of the first character, and first vertex data of the first marker from the first rendering data; A first distance between the first person and the first marker is determined based on the first vertex data, the first model matrix data, and the first coordinate data.
5. The method according to claim 4, characterized in that Determining a first distance between the first person and the first marker according to the first vertex data, the first model matrix data, and the first coordinate data includes: Obtaining first local coordinate data of a first center point according to the first vertex data, where the first center point is the center point of the first marker; Using the first model matrix data, converting the first local coordinate data into first world coordinate data; A first distance between the first person and the first marker is obtained according to the first coordinate data and the first world coordinate data.
6. The method according to claim 1, characterized in that Before adjusting the parameter value of the parameter related to the first optimization strategy in the electronic device according to the first optimization strategy corresponding to the first scenario, the method further includes: A first optimization strategy corresponding to the first scenario is searched from the correspondence between preset scenarios and optimization strategies.
7. The method according to claim 1, characterized in that The characteristic data includes any one or more of the following data: The size of the data cache buffer; The target data in the data cache buffer.
8. The method according to claim 1, characterized in that Also includes: Intercepting second rendering data in the rendering process of the first application; identifying the first scene in which the first character is located according to the feature data and the second rendering data; determining, according to the second rendering data, whether a second distance between the first person and the first marker is less than the first threshold; If not, the parameter value of the parameter related to the first optimization strategy in the electronic device is modified to the parameter value before adjustment.
9. The method according to claim 1 or 8, characterized in that: Also includes: intercepting third rendering data in the rendering process of the first application, and identifying a second scene in which the first person is located according to the feature data and the third rendering data, wherein the second scene includes a second marker, and the feature data includes second feature data corresponding to the second marker; determining, according to the third rendering data, whether a third distance between the first person and the second marker is less than a second threshold; If yes, adjust the parameter values of the parameters related to the second optimization strategy in the electronic device according to the second optimization strategy corresponding to the second scenario.
10. The method according to claim 1, characterized in that Also includes: intercepting fourth rendering data in the rendering process of the first application, and identifying the first scene in which the first person is located according to the feature data and the fourth rendering data; determining, according to the fourth rendering data, whether a fourth distance between the first person and the first marker is less than the first threshold; If yes, keep the adjusted parameter value unchanged.
11. An electronic device, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the control method according to any one of claims 1 to 10.
12. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device is enabled to execute the control method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and system for dynamic adjustment of rendering level in game
CN109771949A
Image rendering calculation method and device, storage medium and terminal
CN112529995A
Target identification method and device based on virtual scene and electronic equipment
CN114218769A
Data processing method and related device
CN116091292A
Systems and methods for adjusting one or more parameters of a GPU
US20210158597A1