A rendering task processing method, device, equipment and storage medium

By intercepting the rendering tasks of the background application and generating virtual response information, the problem of the background application occupying hardware rendering resources is solved, and the resource optimization utilization is achieved.

CN114995978BActive Publication Date: 2024-12-27ECARX TECHNOLOGY PTE LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210657610.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-10
Publication Date
2024-12-27
Estimated Expiration
2042-06-10

AI Technical Summary

Technical Problem

Applications running in the background occupy rendering resources, resulting in wasted hardware resources.

Method used

By determining how the target application runs when receiving the rendering task, if it is running in the background, the submission of the rendering task is intercepted, and virtual rendering response information is generated to feedback to the application to ensure its normal operation.

Benefits of technology

It effectively avoids the hardware rendering resources occupied by backend applications, optimizes the utilization of hardware resources, and improves system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114995978B_ABST
    Figure CN114995978B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for processing rendering tasks. The method comprises: upon receiving a rendering task generated relative to a target application, determining the operation mode of the target application, wherein the operation mode includes foreground operation and background operation; if the operation mode of the target application is background operation, intercepting the submission of the rendering task and generating virtual rendering response information; and feeding back the virtual rendering response information to the target application so that the target application can run normally in the background. The technical solution of the embodiment of the present invention solves the problem that the application runs in the background but occupies hardware rendering resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a method, device, equipment and storage medium for processing a rendering task. Background Art

[0002] With the continuous development of Internet technology, rendering technology has a wide range of applications, such as computer and video games, simulated reality, film or TV special effects, and visual design, etc. Among them, the process of converting the shapes stored in the computer memory into the corresponding shapes actually drawn on the screen is called rendering.

[0003] In the traditional indirect rendering framework, the application redraws the texture and updates the display screen according to user events (such as touch screen, etc.). This process needs to be "approved" by the display service before the application can redraw the texture and submit the rendering task. Based on the DRI (Direct Rendering Infrastructure) framework, the display screen update process triggered by user events can get rid of the "approval" dependence of the display service, that is, the user event can be reported to the application, and the rendering task can be submitted after the texture is directly redrawn. Among them, the display service only participates in the process of updating the screen, which optimizes the efficiency of human-computer interaction.

[0004] However, the application does not need the "approval" of the display service and can directly submit the rendering process of the rendering task, resulting in the application running in the background still occupying the rendering resources, thereby causing a waste of hardware resources. Summary of the invention

[0005] The present invention provides a method, device, equipment and storage medium for processing a rendering task, so as to solve the problem that a background-running application occupies rendering resources.

[0006] In a first aspect, an embodiment of the present invention provides a method for processing a rendering task, comprising:

[0007] When receiving a rendering task generated relative to a target application, determining an operation mode of the target application, wherein the operation mode includes foreground operation and background operation;

[0008] If the target application is running in background mode, intercepting the submission of the rendering task and generating virtual rendering response information;

[0009] The virtual rendering response information is fed back to the target application so that the target application can run normally in the background.

[0010] In a second aspect, an embodiment of the present invention provides a rendering task processing device, including:

[0011] An operation mode determination module, configured to determine the operation mode of the target application when receiving a rendering task generated by the target application, wherein the operation mode includes foreground operation and background operation;

[0012] A response information generation module, configured to intercept the submission of the rendering task and generate virtual rendering response information if the target application is running in background mode;

[0013] The virtual rendering response information feedback module is used to feed back the virtual rendering response information to the target application so that the target application can run normally in the background.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0015] at least one processor;

[0016] and a memory communicatively coupled to the at least one processor;

[0017] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can perform the processing method of the rendering task of the first aspect mentioned above.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the processing method of the rendering task of the first aspect when executed.

[0019] The processing scheme for rendering tasks provided by an embodiment of the present invention determines the operating mode of the target application when receiving a rendering task generated relative to the target application, wherein the operating mode includes foreground operation and background operation. If the operating mode of the target application is background operation, the submission of the rendering task is intercepted, and virtual rendering response information is generated, and the virtual rendering response information is fed back to the target application so that the target application can run normally in the background. By adopting the above technical scheme, the operating mode of the target application is first confirmed according to the received rendering task, and then if it is determined that the operating mode is background operation, the submission of the rendering task is intercepted, and virtual rendering response information is generated, and finally the virtual rendering response information is fed back to the target application, which solves the problem that the application runs in the background but occupies hardware rendering resources.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flowchart of a method for processing a rendering task provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flowchart of a method for processing a rendering task provided according to Embodiment 2 of the present invention;

[0024] Figure 3 is a schematic diagram of the structure of a rendering task processing device provided according to Embodiment 3 of the present invention;

[0025] Figure 4 It is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are an "or" relationship. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Embodiment 1

[0029] Figure 1 A flowchart of a method for processing a rendering task is provided for the first embodiment of the present invention. This embodiment is applicable to the case of processing a rendering task. The method can be executed by a processing device for the rendering task. The processing device for the rendering task can be implemented in the form of hardware and / or software. The processing device for the rendering task can be configured in an electronic device. The electronic device can be composed of two or more physical entities or one physical entity.

[0030] like Figure 1 As shown, the first embodiment of the present invention provides a method for processing a rendering task, which specifically includes the following steps:

[0031] S101: upon receiving a rendering task generated for a target application, determining an operation mode of the target application.

[0032] The operation modes include foreground operation and background operation.

[0033] In this embodiment, when the target application generates a rendering task, the rendering task can be submitted to the kernel of the operating system. After receiving the rendering task, the kernel of the control system can determine the specific operation mode of the target application. Among them, the control system can be a Linux system, and the foreground operation includes top full screen operation, top operation, and full screen operation, etc., and the background operation includes non-top non-full screen operation, non-top operation, and non-full screen operation, etc. The target application can generate a rendering task due to the perception of a touch screen event or due to the running process, etc. The touch screen event includes events such as click or two-finger zoom.

[0034] For example, taking the car's central control system as an example, after the user gets in the car and starts the ignition successfully, the car's central control system starts and performs texture rendering. The user opens a game application to experience the game service of the central control system. After a while, the user opens a navigation application and prepares to navigate home. At this time, the game application and navigation application of the car's central control system are running at the same time. If the game application or the navigation application generates a rendering task, the car's central control system can determine the running mode of the application relative to the rendering task, that is, the running mode of the target application, after receiving the rendering task.

[0035] S102: If the target application is running in background mode, intercept the submission of the rendering task and generate virtual rendering response information.

[0036] In this embodiment, if the kernel of the control system determines that the target application is running in the background, the kernel of the control system intercepts the rendering task that should be submitted to the GPU (Graphics Processing Unit) without perception, and generates virtual rendering response information, so that the GPU does not need to process the rendering task submitted by the background program, and intercepts the occupation of GPU resources by the background application. Among them, GPU is a microprocessing unit that specializes in image and graphics related computing work on personal computers, workstations, game consoles and mobile devices. The virtual rendering response information and the regular rendering response information have the same function, and are both used to indicate to the specified application, such as the target application, that the rendering task has been completed.

[0037] For example, taking the car's central control system as an example, if the user is navigating home with the navigation application running in the foreground and the game application running in the background, the navigation application running in the foreground can fully obtain GPU rendering resources, and the game application running in the background can continue to update the game progress. However, the rendering tasks generated by the game application running in the background will be intercepted, and the car's central control system will generate virtual rendering response information.

[0038] S103: Feedback virtual rendering response information to the target application, so that the target application can run normally in the background.

[0039] In this embodiment, the kernel of the control system feeds back the virtual rendering response information to the target application. After receiving the virtual rendering response information, the target application can run normally in the background, such as submitting the next rendering task.

[0040] The method for processing rendering tasks provided in an embodiment of the present invention determines the running mode of the target application when receiving a rendering task generated relative to a target application, wherein the running mode includes foreground running and background running. If the running mode of the target application is background running, the submission of the rendering task is intercepted, and virtual rendering response information is generated, and the virtual rendering response information is fed back to the target application so that the target application can run normally in the background. The technical solution of an embodiment of the present invention first confirms the running mode of the target application according to the received rendering task, and then if it is determined that the running mode is background running, the submission of the rendering task is intercepted, and virtual rendering response information is generated, and finally the virtual rendering response information is fed back to the target application, which solves the problem that the application runs in the background but occupies hardware rendering resources.

[0041] Embodiment 2

[0042] Figure 2 This is a flow chart of a method for processing a rendering task provided in the second embodiment of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method for processing a rendering task is given.

[0043] Optionally, determining the running mode of the target application includes: obtaining an application identifier of the target application, searching for the application identifier from a pre-recorded application-layer association table; if a layer identifier associated with the application identifier exists in the application-layer association table, determining the running mode of the target application as foreground running; otherwise, determining the running mode of the target application as background running. The advantage of such a setting is that the running mode of the application is accurately determined, providing support for solving the problem of wasting hardware rendering resources.

[0044] Optionally, intercepting the rendering task submitted to the graphics processing unit and generating virtual rendering response information includes: intercepting the submission of the rendering task to the image processing unit through a pre-built virtual rendering interaction mechanism, and generating virtual rendering response information by virtualizing the graphics processing unit's response to the rendering task. The advantage of such a setting is that while intercepting the rendering task of the background application, it also ensures the normal operation of the application, achieving the purpose of imperceptible interception of the background rendering task.

[0045] like Figure 2 As shown, a method for processing a rendering task provided by Embodiment 2 of the present invention specifically includes the following steps:

[0046] S201. When receiving a rendering task generated relative to a target application, obtain an application identifier of the target application, and search for the application identifier in a pre-recorded application-layer association table.

[0047] Specifically, when receiving a rendering task, the kernel of the control system can obtain the application identifier of the target application and search for the application identifier in a pre-recorded application-layer association table, wherein the application-layer association table may include application identifiers and layer identifiers.

[0048] The exemplary pre-recording can be understood as, whenever the application meets the recording conditions, such as when running in full screen, the relevant information can be added to the application-layer association table. When the application is not running in full screen, the relevant information in the application-layer association table can be deleted, and the relevant information of the new full-screen running application can be added to the application-layer association table.

[0049] Optionally, the application-layer association table includes a binary relationship group consisting of a target layer identifier and a target application identifier; wherein the target layer identifier is the layer identifier of the layer where the current window interface is located, the layer where the current window interface is located is in a top state, and the interface size is full screen size; the target application identifier is the application identifier of the application to which the current window interface belongs.

[0050] Specifically, the application-layer association table may include: a target layer identifier, a target application identifier, and a corresponding relationship between the target layer identifier and the target application identifier, i.e., a binary relationship group. The target layer identifier may be understood as the identifier of the layer in the top full screen display, and the target application identifier may be understood as the identifier of the application in the top full screen display.

[0051] Furthermore, the above steps also include: when a switching operation of the display interface is received, updating the application layer association table.

[0052] Specifically, if the current top-mounted full-screen application or layer is switched, the corresponding information in the application layer association table needs to be updated to ensure the accuracy of the information in the application layer association table.

[0053] Furthermore, the updating of the application-layer association table includes: determining each window interface currently presented on the display screen, and determining a candidate window interface whose interface size is full-screen size from each window interface; determining a current window interface whose layer is in a top state from each candidate window interface; obtaining a current layer identifier of the layer where the current window interface is located, and a current application identifier of the application to which the current window interface belongs; obtaining a binary relationship group including the current layer identifier and the current application identifier, and replacing the existing binary relationship group in the application-layer association table.

[0054] Specifically, the specific process of updating the application-layer association table can be understood as follows: first, determine the full-screen display interface from the currently displayed window interfaces, and determine it as the candidate window interface; then determine the current window interface displayed on top and its corresponding layer from the candidate window interfaces; then obtain the layer identifier of the layer, that is, the current layer identifier, and the application identifier of the application to which the layer belongs, that is, the current application identifier of the application to which the current window interface belongs; finally, add the current layer identifier and the current application identifier to the application-layer association table to form a new binary relationship group, thereby replacing the existing binary relationship group in the application-layer association table.

[0055] S202: If there is a layer identifier associated with the application identifier in the application-layer association table, the running mode of the target application is determined to be foreground running; otherwise, the running mode of the target application is determined to be background running.

[0056] Specifically, if the layer identifier associated with the application identifier of the target application is in the application-layer association table, it can be determined that the running mode of the target application is foreground running, otherwise, it is background running.

[0057] S203: If the target application is running in background mode, the submission of the rendering task to the image processing unit is intercepted through a pre-built virtual rendering interaction mechanism, and the virtual graphics processing unit responds to the rendering task to generate virtual rendering response information.

[0058] Specifically, if the kernel of the control system determines that the target application is running in the background, the virtual rendering interaction mechanism can be triggered to intercept the rendering task to be submitted to the GPU. In order to be compatible with the normal rendering process, the kernel of the control system can generate rendering response information to virtualize the GPU's response to the rendering task. Among them, the virtual rendering interaction mechanism can be understood as a virtual fence interrupt mechanism.

[0059] S204: Feedback virtual rendering response information to the target application, so that the target application can run normally in the background.

[0060] The rendering task processing method provided by the embodiment of the present invention first determines the running mode of the target application by querying the application-layer association table after receiving the rendering task. If the running mode of the target application is background running, a pre-built virtual rendering interaction mechanism is used to intercept the submission of the rendering task to the image processing unit, and the generated virtual rendering response information is fed back to the target application to ensure the normal operation of the target application, thereby realizing imperceptible interception of background rendering tasks. While intercepting the rendering tasks of the background running application, the normal operation of the background application is also guaranteed, thereby solving the problem of waste of hardware rendering resources.

[0061] Based on the above embodiment, the method may further include: if the target application runs in foreground mode, submitting the rendering task to the image processing unit, and receiving rendering response information formed after the graphics processing unit completes the rendering task; and feeding back the rendering response information to the target application so that the target application can run normally in the foreground.

[0062] Specifically, if the kernel of the control system determines that the target application is running in the foreground, the kernel of the control system submits the rendering task to the GPU for processing. After the GPU completes the processing and sends the rendering response information to the kernel of the control system, the kernel of the control system feeds back the rendering response information to the target application based on the received rendering response information to ensure that the target application runs normally in the foreground.

[0063] For example, for example, taking the car central control system as an example, if the user is navigating home, the navigation application runs in the foreground and the game application runs in the background. If the navigation application senses the user's touch screen behavior, such as pinching to zoom in, the navigation application will generate a rendering task and submit the rendering task to the car's central control system. After receiving the rendering task, the car's central control system determines that the navigation application is running in the foreground, and then submits the rendering task to the GPU for processing. After the GPU processing is completed, it will generate rendering response information and send it to the car's central control system. Based on the received rendering response information, the car's central control system feeds back the rendering response information to the navigation application.

[0064] Embodiment 3

[0065] Figure 3 This is a schematic diagram of the structure of a rendering task processing device provided by Embodiment 3 of the present invention. Figure 3 As shown, the device includes: an operation mode determination module 301, a response information generation module 302 and a virtual rendering response information feedback module 303, wherein:

[0066] An operation mode determination module, configured to determine the operation mode of the target application when receiving a rendering task generated by the target application, wherein the operation mode includes foreground operation and background operation;

[0067] A response information generation module, configured to intercept the submission of the rendering task and generate virtual rendering response information if the target application is running in background mode;

[0068] The virtual rendering response information feedback module is used to feed back the virtual rendering response information to the target application so that the target application can run normally in the background.

[0069] The rendering task processing device provided by the embodiment of the present invention first confirms the running mode of the target application according to the received rendering task, and then if it is determined that the running mode is background running, intercepts the submission of the rendering task, generates virtual rendering response information, and finally feeds back the virtual rendering response information to the target application, thereby solving the problem that the application runs in the background but occupies hardware rendering resources.

[0070] Optionally, the operation mode determination module includes:

[0071] An application identifier search unit, used to obtain the application identifier of the target application and search for the application identifier from a pre-recorded application-layer association table;

[0072] a background operation determination unit, configured to determine the operation mode of the target application as foreground operation if the layer identifier associated with the application identifier exists in the application-layer association table;

[0073] The foreground operation determination unit is used to determine the operation mode of the target application as background operation if the layer identifier associated with the application identifier does not exist in the application-layer association table.

[0074] Furthermore, the application-layer association table includes a binary relationship group consisting of a target layer identifier and a target application identifier; wherein the target layer identifier is the layer identifier of the layer where the current window interface is located, the layer where the current window interface is located is in a top state, and the interface size is full screen size; the target application identifier is the application identifier of the application to which the current window interface belongs.

[0075] Optionally, the operation mode determination module further includes:

[0076] The association table updating unit is used to update the application layer association table when receiving a switching operation of the display interface.

[0077] Furthermore, the updating of the application-layer association table includes: determining each window interface currently presented on the display screen, and determining a candidate window interface whose interface size is full-screen size from each window interface; determining a current window interface whose layer is in a top state from each candidate window interface; obtaining a current layer identifier of the layer where the current window interface is located, and a current application identifier of the application to which the current window interface belongs; obtaining a binary relationship group including the current layer identifier and the current application identifier, and replacing the existing binary relationship group in the application-layer association table.

[0078] Optionally, the response information generation module includes:

[0079] The virtual rendering response information unit is used to intercept the submission of the rendering task to the image processing unit through a pre-built virtual rendering interaction mechanism, and to generate virtual rendering response information by virtualizing the response of the graphics processing unit to the rendering task.

[0080] Optionally, the device further comprises:

[0081] A rendering response information receiving module, used for submitting the rendering task to the graphics processing unit if the target application is running in the foreground, and receiving rendering response information formed after the graphics processing unit completes the rendering task;

[0082] The rendering response information sending module is used to feed back the rendering response information to the target application so that the target application can run normally in the foreground.

[0083] The rendering task processing device provided in the embodiment of the present invention can execute the rendering task processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0084] Embodiment 4

[0085] Figure 4 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0086] like Figure 4 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0087] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0088] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 performs the various methods and processes described above, such as a processing method for rendering tasks.

[0089] In some embodiments, the processing method of the rendering task may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the processing method of the rendering task described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the processing method of the rendering task in any other appropriate manner (e.g., by means of firmware).

[0090] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0091] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0092] The computer device provided above can be used to execute the processing method of the rendering task provided by any of the above embodiments, and has corresponding functions and beneficial effects.

[0093] Embodiment 5

[0094] In the context of the present invention, a computer-readable storage medium may be a tangible medium, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a processing method for a rendering task, the method comprising:

[0095] When receiving a rendering task generated relative to a target application, determining an operation mode of the target application, wherein the operation mode includes foreground operation and background operation;

[0096] If the target application is running in background mode, intercepting the submission of the rendering task and generating virtual rendering response information;

[0097] The virtual rendering response information is fed back to the target application so that the target application can run normally in the background.

[0098] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by an instruction execution system, device or equipment or used with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0099] The computer device provided above can be used to execute the processing method of the rendering task provided by any of the above embodiments, and has corresponding functions and beneficial effects.

[0100] It is worth noting that in the embodiment of the processing device for the above-mentioned rendering task, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0101] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for processing a rendering task, characterized in that: include: When receiving a rendering task generated relative to a target application, determining an operation mode of the target application, wherein the operation mode includes foreground operation and background operation; If the target application is running in background mode, the submission of the rendering task to the image processing unit is intercepted through a pre-built virtual rendering interaction mechanism, and the virtual graphics processing unit responds to the rendering task to generate virtual rendering response information; The virtual rendering response information is fed back to the target application so that the target application can run normally in the background.

2. The method according to claim 1, characterized in that Determining the operation mode of the target application includes: Obtaining an application identifier of the target application, and searching for the application identifier from a pre-recorded application-layer association table; If the layer identifier associated with the application identifier exists in the application-layer association table, the running mode of the target application is determined to be foreground running; otherwise, The target application is run in a background mode.

3. The method according to claim 2, characterized in that The application-layer association table includes a binary relationship group consisting of a target layer identifier and a target application identifier; The target layer identifier is the layer identifier of the layer where the current window interface is located, the layer where the current window interface is located is in a top state, and the interface size is a full-screen size; The target application identifier is the application identifier of the application to which the current window interface belongs.

4. The method according to claim 2 or 3, characterized in that: Also includes: When a display interface switching operation is received, the application-layer association table is updated.

5. The method according to claim 4, characterized in that The updating application-layer association table includes: Determine each window interface currently presented on the display screen, and determine a candidate window interface having an interface size of a full screen size from each of the window interfaces; Determine the current window interface whose layer is in the top state from the candidate window interfaces; Obtaining the current layer identifier of the layer where the current window interface is located, and the current application identifier of the application to which the current window interface belongs; A binary relationship group including the current layer identifier and the current application identifier is obtained, and the existing binary relationship group in the application-layer association table is replaced.

6. The method according to claim 1, characterized in that Also includes: If the target application is in foreground operation, submitting the rendering task to the graphics processing unit, and receiving rendering response information generated after the graphics processing unit completes the rendering task; The rendering response information is fed back to the target application so that the target application can run normally in the foreground.

7. A rendering task processing device, characterized in that: include: An operation mode determination module, configured to determine the operation mode of the target application when receiving a rendering task generated by the target application, wherein the operation mode includes foreground operation and background operation; A response information generation module is used to intercept the submission of the rendering task to the image processing unit through a pre-built virtual rendering interaction mechanism if the target application is running in the background, and to generate virtual rendering response information by virtualizing the response of the graphics processing unit to the rendering task; The virtual rendering response information feedback module is used to feed back the virtual rendering response information to the target application so that the target application can run normally in the background.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for processing a rendering task according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the processing method of the rendering task described in any one of claims 1 to 6 when executed.

Citation Information

Patent Citations

  • Cloud rendering resource scheduling method and device, electronic equipment and storage medium

    CN111061560A

  • Method and device for recovering application software from background to foreground and controller

    CN112817654A

  • Pre-rendering of application user interface in user device

    CN114144777A

  • Declaratively defined user interface timeline views

    US20210397463A1