Page rendering method and device, equipment, storage medium and program product
The graphic rendering process of transferring the applet page frames through the client process solves the problem of excessive memory and forced closure caused by the browser process to render the applet, and achieves the stable operation of the applet.
Patent Information
- Application Number
- CN202310732158.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, rendering the page frames of the applet through the browser process leads to excessive browser memory usage, which increases the risk of the applet being forced to close.
The client process pulls up the browser process to execute the business logic code of the applet, and when the business logic code calls the rendering function, the browser process calls are converted into the call of the client process, and the client process uses the page frame graphics Render.
Reduces the memory consumption of the browser, reduces the possibility of forced stopping of the browser process, reduces the risk of forced shutdown of the applet, and realizes the unbinding of the page frame rendering of the browser and applets, avoiding the browser upgrade. Effect on rendering.
Smart Images

Figure CN119166920A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to graphics processing technology, and in particular to a page rendering method, device, equipment, storage medium and program product. Background Art
[0002] Mini programs are applications that can be used without downloading and installing, thus providing great convenience for users in using different applications. In the related art, the operation of mini programs is achieved with the help of embedded browsers (such as WebView). That is, the business logic code of the mini program is interpreted and executed by the browser process, and the graphics rendering function is called by the browser process to render the page frame of the mini program. However, using the browser process to render the page frame of the mini program will increase the risk of the mini program being forced to close. Summary of the invention
[0003] Embodiments of the present application provide a page rendering method, apparatus, device, computer-readable storage medium, and computer program product, which can reduce the risk of a mini-program being forcibly closed.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application embodiment provides a page rendering method, including:
[0006] In response to a start operation for the applet, launching a browser process of the browser through a client process, and executing the business logic code of the applet through the browser process;
[0007] In response to the business logic code calling a first rendering function for the page frame of the applet, sending a call processing request to the client process through the browser process; wherein the first rendering function is a graphics rendering function that can be called by the browser process;
[0008] In response to the call processing request, determining, by the client process, a corresponding second rendering function for the first rendering function, and calling the second rendering function; wherein the second rendering function is a graphics rendering function that can be called by the client process;
[0009] The second rendering function is used to perform graphics rendering on the page frame of the mini program to obtain a rendering result of the page frame of the mini program.
[0010] The present application provides a page rendering device, including:
[0011] A process launching module, used to launch a browser process of a browser through a client process in response to a startup operation for a mini-program, and execute the business logic code of the mini-program through the browser process;
[0012] A request sending module, configured to call a first rendering function for a page frame of the applet in response to the business logic code, and send a call processing request to the client process through the browser process; wherein the first rendering function is a graphics rendering function that can be called by the browser process;
[0013] A calling processing module, configured to, in response to the calling processing request, determine a corresponding second rendering function for the first rendering function through the client process, and call the second rendering function; wherein the second rendering function is a graphics rendering function that can be called by the client process;
[0014] A graphics rendering module is used to perform graphics rendering on the page frame of the mini program through the second rendering function to obtain a rendering result of the page frame of the mini program.
[0015] In some embodiments of the present application, the request sending module is also used to call the first rendering function for the page frame of the mini-program in response to the business logic code, and write the call information of the first rendering function in the command cache through the browser process; generate the call processing request for the command cache through the browser process, and send the call processing request to the client process.
[0016] In some embodiments of the present application, the request sending module is also used to generate the call processing request for the command cache through the browser process and send the call processing request to the client process when the first rendering function called by the business logic code is a synchronous rendering function with a return value.
[0017] In some embodiments of the present application, the request sending module is also used to generate the call processing request for the command cache through the browser process and send the call processing request to the client process when the call information of each of the multiple first rendering functions that need to be called when rendering the page frame has been recorded in the command cache.
[0018] In some embodiments of the present application, the page rendering device also includes: a script processing module, used to generate the script code of the command cache through the client process, and inject the script code of the command cache into the browser process; the script code of the command cache is used to create the command cache, and control the browser process to write the call information of the first rendering function into the command cache.
[0019] In some embodiments of the present application, the request sending module is also used to set the access address of the call processing request to the service address of the client process through the browser process; through the client process, the call processing request is intercepted at the service address to complete sending the call processing request to the client process.
[0020] In some embodiments of the present application, the request sending module is also used to, when the first rendering function is a synchronous rendering function with a return value, call the first rendering function for the page frame of the mini-program in response to the business logic code, return a virtual return value for the first rendering function through the browser process, and write the virtual return value and the calling information of the first rendering function into the command cache together.
[0021] In some embodiments of the present application, the page rendering device also includes: a mapping generation module, which is used to parse the command cache from the call processing request through the client process, and extract the virtual return value from the command cache; through the client process, the return value of the second rendering function is used as the real return value of the first rendering function, and establish a mapping relationship between the real return value and the virtual return value; wherein the mapping relationship is used to determine the corresponding real return value for the virtual return value in the command cache at a future time.
[0022] In some embodiments of the present application, the calling information includes: calling parameters; the calling processing module is further used to parse the calling parameters of the first rendering function from the command cache through the client process, and convert the calling information of the first rendering function into calling parameters of the second rendering function; through the client process, the calling parameters of the second rendering function are passed to the second rendering function to complete the call to the second rendering function.
[0023] An embodiment of the present application provides an electronic device, including:
[0024] Memory for storing computer executable instructions or computer programs;
[0025] The processor is used to implement the page rendering method provided in the embodiment of the present application when executing the computer executable instructions or computer programs stored in the memory.
[0026] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program for causing a processor to execute and implement the page rendering method provided in the embodiment of the present application.
[0027] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, can implement the page rendering method provided in the embodiment of the present application.
[0028] The embodiments of the present application have the following beneficial effects: when a user starts a mini-program, the electronic device will first start the browser process through the client process, execute the business logic code of the mini-program through the browser, and when the business logic code needs to call the first rendering function, send a call processing request to the client process through the browser process, so as to convert the browser process's call to the first rendering function into a call to the second rendering function by the client process through the call processing request, and perform graphics rendering on the page frame of the mini-program through the second rendering function. In this way, the graphics rendering process of the page frame of the mini-program can be transferred to the client implementation, so that the browser only serves as an executor of the business logic code, thereby greatly reducing the browser's memory consumption and reducing the possibility of the browser process being forced to stop, and ultimately reducing the risk of the mini-program being forced to close. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a rendering diagram of the applet's page frame;
[0030] Figure 2 It is a schematic diagram of the architecture of the page rendering system provided in an embodiment of the present application;
[0031] Figure 3 The embodiment of this application provides Figure 2 A schematic diagram of the structure of the terminal in FIG.
[0032] Figure 4 This is a schematic diagram of the process of the page rendering method provided in the embodiment of the present application. Figure 1 ;
[0033] Figure 5 This is a schematic diagram of the process of the page rendering method provided in the embodiment of the present application. Figure 2 ;
[0034] Figure 6 This is a schematic diagram of the process of the page rendering method provided in the embodiment of the present application. Figure 3 ;
[0035] Figure 7 It is a schematic diagram of the principle of rendering the game screen of a mini-game provided in an embodiment of the present application;
[0036] Figure 8 It is a schematic diagram of recording the call of the WebGL function provided by an embodiment of the present application;
[0037] Fig. 9 This is another schematic diagram for recording calls to WebGL functions provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0039] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0040] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0042] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0043] 1) Mini Program, also known as Web Program, is a program developed based on a front-end language (such as JavaScript) to implement services in a Hypertext Markup Language (HTML) page. It is downloaded by the client via a network (such as the Internet) and interpreted and executed in the client's browser or embedded browser, saving the steps of installation in the client. For example, you can download and run a mini program in a social network client to implement check-in or game services.
[0044] 2) Clients are applications that users need to download and install on their terminals (e.g., smartphones) before they can use the application, such as browser clients or social network clients.
[0045] 3) Client process: It is a process allocated to the client on the terminal and is used to implement various functions of the client.
[0046] 4) Embedded browser (WebView) is a browser embedded in native applications (referring to applications that can run directly on the operating system). Native applications can use embedded browsers to display web pages. Different operating systems will have different embedded browsers. For example, some operating systems can use UIWebView and WKWebview to display web pages.
[0047] 5) Browser process: It is a process allocated by the embedded browser on the terminal and is used to implement various functions of the browser process.
[0048] 6) Page frame refers to the unit of rendering and display of the screen content of the mini program. That is, the screen content of the mini program is rendered in units of one page frame and displayed in units of one page frame. Therefore, the screen content of the mini program can be dynamically presented by continuously displaying multiple page frames.
[0049] 7) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time and may have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.
[0050] Mini programs are applications that can be used without downloading and installing, thus providing great convenience for users in using different applications. For example, users can use mini programs to clock in and out without installing the corresponding client, or play games and entertainment without installing the corresponding client.
[0051] In the related art, the operation of the applet is realized by means of an embedded browser (such as WebView), that is, the business logic code of the applet is interpreted and executed by the browser process, and the graphics rendering function is called by the browser process to render the page frame of the applet.
[0052] For example, Figure 1 This is a schematic diagram of the rendering of the applet's page frame. Figure 1 The code of the applet is usually divided into business logic code (i.e., code written by the creator of the applet to implement the functions of the applet) 1-1, an application programming interface (API) 1-2 for calling the client, and a rendering function 1-3, which is used to render the page frame of the applet. When the client detects the startup operation for the applet, the client process will pull up the browser process of the embedded browser of the operating system, the browser process executes the business logic code 1-1, and calls the rendering function 1-3, and at the same time calls the client process through the API 1-2 to implement file reading and writing, information logging, etc.
[0053] However, as the use time of the mini program increases, the number of page frames required for rendering in this way will also increase, which will cause the embedded browser's memory usage to be too high, resulting in the browser process being forcibly stopped by the terminal, and ultimately making the mini program unusable. It can be seen that in the related art, using the browser process to render the page frames of the mini program will result in a high risk of the mini program being forcibly closed.
[0054] In addition, the embedded browser may be upgraded along with the terminal's operating system (i.e., when the operating system is upgraded, the embedded browser may also be upgraded accordingly). However, the upgrade of the embedded browser may bring some operational failures (bugs), so when the browser process is used to render the page frame of the applet, a failure may also occur, thereby affecting the normal use of the applet.
[0055] The embodiments of the present application provide a page rendering method, apparatus, device, computer-readable storage medium, and computer program product, which can reduce the risk of the mini-program being forcibly closed. The following describes an exemplary application of an electronic device for page rendering provided by an embodiment of the present application. The electronic device provided by an embodiment of the present application can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), and can also be implemented as a server. Below, an exemplary application when the electronic device is implemented as a terminal will be described.
[0056] See also Figure 2 , Figure 2 It is a schematic diagram of the architecture of the page rendering system provided in the embodiment of the present application. In order to support a page rendering application, in the page rendering system 100, the terminal 400 (the terminal 400-1 and the terminal 400-2 are shown as examples) is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two. In the page rendering system 100, a database 500 is also provided for providing data support to the server 200. Among them, the database 500 can be independent of the server 200, or it can be configured in the server 200. Figure 2 The illustrated case is that the database 500 is independent of the server 200 .
[0057] Terminal 400-1 and terminal 400-2 are used to respond to the user's startup operation on the small program on the graphical interface 410-1 and the graphical interface 410-2, respectively, download the program code of the small program from the server 200 through the client process and pull up the browser process of the browser, and execute the business logic code in the program code of the small program through the browser process; in response to the business logic code, call the first rendering function for the page frame of the small program, send a call processing request to the client process through the browser process, wherein the first rendering function is a graphics rendering function that can be called by the browser process; in response to the call processing request, determine the corresponding second rendering function for the first rendering function through the client process, and call the second rendering function; wherein the second rendering function is a graphics rendering function that can be called by the client process; through the second rendering function, perform graphics rendering on the page frame of the small program to obtain the rendering result of the page frame of the small program; and display the rendering result of each page frame in turn on the graphical interface 410-1 and the graphical interface 410-2.
[0058] The server 200 is used to send the program code of the mini-program to the terminal 400 - 1 and the terminal 400 - 2 .
[0059] The embodiments of the present application can be implemented with the help of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network within a wide area network or a local area network to achieve data computing, storage, processing, and sharing.
[0060] Cloud computing is a general term for network technology, information technology, integration technology, management platform, and application technology based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The system background services of the technical network require a large amount of computing and storage resources, which need to be realized through cloud computing.
[0061] Exemplarily, server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminals 400-1 and 400-2 may be smart phones, tablet computers, laptops, desktop computers, smart speakers, smart watches, smart home appliances, car terminals, etc., but are not limited thereto. The terminals and servers may be directly or indirectly connected via wired or wireless communications, which is not limited in the embodiments of the present application.
[0062] See also Figure 3 , Figure 3 The embodiment of this application provides Figure 2 A schematic diagram of the structure of a terminal (an implementation of an electronic device) in FIG. Figure 3 The terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 3 Various buses are labeled as bus system 440 .
[0063] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0064] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0065] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0066] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0067] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0068] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0069] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB);
[0070] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0071] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0072] In some embodiments, the page rendering device provided in the embodiments of the present application can be implemented in a software manner. Figure 3 The page rendering device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a process starting module 4551, a request sending module 4552, a call processing module 4553, a graphics rendering module 4554, a script processing module 4555 and a mapping generation module 4556. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0073] In other embodiments, the page rendering device provided in the embodiments of the present application can be implemented in hardware. As an example, the page rendering device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the page rendering method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.
[0074] In some embodiments, a terminal or a server (both are possible implementations of electronic devices) can implement the page rendering method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a social network APP or an instant messaging APP; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.
[0075] The embodiments of the present application can be applied to the page rendering scenarios of small programs of application software, operating systems, etc. Below, the page rendering method provided by the embodiments of the present application is described. As mentioned above, the electronic device that implements the page rendering method of the embodiments of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeated in the following.
[0076] The page rendering method provided in the embodiment of the present application will be described in combination with the exemplary application and implementation of the electronic device provided in the embodiment of the present application.
[0077] See also Figure 4 , Figure 4 This is a schematic diagram of the process of the page rendering method provided in the embodiment of the present application. Figure 1 , will combine Figure 4 The steps shown are explained.
[0078] S101. In response to a start-up operation for a small program, a browser process of a browser is launched through a client process, and a business logic code of the small program is executed through the browser process.
[0079] The embodiment of the present application is implemented in the scenario of performing graphic rendering on the page frame of the applet, and the page frame after the graphic rendering is used to present the screen content of the applet. In the embodiment of the present application, the electronic device will detect in real time whether the user has performed a startup operation on the applet. When it is detected that the user has triggered the running of the applet through the startup operation, the browser process of the browser will be pulled up through the client process, and the business logic code of the applet will be interpreted and executed through the browser process, thereby realizing the business function of the applet.
[0080] The mini-program in the embodiment of the present application may be a game mini-program (also referred to as a mini-game), an office software mini-program, or various types of mini-programs such as music mini-programs, and the embodiment of the present application is not limited thereto.
[0081] It should be noted that in the embodiments of the present application, the client process refers to the process of the client of the application program embedded with the mini program, that is, the mini program is embedded in the client of the application program and runs, so the startup operation for the mini program refers to the operation of entering the mini program triggered on the client of the application software (hereinafter referred to as the client). The startup operation can be achieved by clicking the icon of the mini program, scanning the QR code of the mini program, etc. Among them, the above-mentioned application can refer to a social network application, or a music application, a game application, etc., so that the client can be a social network client, a music client, a game client, etc. The mini program can be embedded in these clients and run to provide the functions of the mini program to users who have installed these clients.
[0082] The browser in the embodiment of the present application can be a browser provided by the client, or an embedded browser provided by the operating system of the electronic device, which is not limited in the embodiment of the present application. The browser process refers to the process allocated by the electronic device to the browser.
[0083] The business logic code of a mini program is the code used to implement the specific functions of the mini program, which is generally written by the creator of the mini program. The business logic code of the mini program will be pulled from the server by the client when the mini program is started for the first time. It can also be extracted from the client's cache file when it is not started for the first time.
[0084] S102: In response to the business logic code calling the first rendering function for the page frame of the applet, a call processing request is sent to the client process through the browser process.
[0085] In order to display the screen content of the applet, the business logic code will call the first rendering function to render the page frames of the applet one by one or in parallel. It should be noted that the first rendering function is a graphics rendering function that can be called by the browser process, and the business logic code is executed through the browser process, so that the electronic device responds to the business logic code to call the first rendering function, which is actually calling the first rendering function through the browser process to perform page rendering. However, when the browser process calls the first rendering function to render the page, it is very easy to cause the memory occupied by the browser to be too large, causing the browser process to be forced to stop. In order to avoid this situation, in an embodiment of the present application, the electronic device will forward the function call of the page rendering in the browser process to the client process by calling the processing request, so as to implement the function call of the page rendering through the client. In this way, the browser can be regarded as only an executor of the business logic code, and only needs to load very few pages or blanks, thereby reducing the memory consumption of the browser.
[0086] In the embodiment of the present application, the browser process can send a call processing request to the client process in a variety of ways.
[0087] See also Figure 5 , Figure 5 This is a schematic diagram of the process of the page rendering method provided in the embodiment of the present application. Figure 2 In some embodiments of the present application, Figure 4 The process of S102, that is, in response to the business logic code calling the first rendering function for the page frame of the applet, sending a call processing request to the client process through the browser process, can be implemented through S1021-S1022 as follows:
[0088] S1021. In response to the business logic code calling the first rendering function for the page frame of the mini-program, the calling information of the first rendering function is written into the command cache through the browser process.
[0089] When the business logic code calls the first rendering function, the electronic device will write the calling information of the first function into the command cache through the browser process to record the calling of the first rendering function through the command cache. The browser process can write the calling information of all the first rendering functions called for each page frame into the same command cache, or write the calling information of each first rendering function into the command cache allocated to it (that is, the browser process allocates a command cache for each first rendering function, and only the calling information of the corresponding first rendering function is written into each command cache).
[0090] In the embodiment of the present application, the calling information of the first rendering function needs to include at least the function identifier of the first rendering function and the calling parameters of the first rendering function (which can also be understood as the input parameters of the first rendering function). Among them, the function identifier is used to distinguish different first rendering functions, and the function identifier can be the function name of the first rendering function, or it can be the function identifier of the first rendering function. The calling parameters of the first rendering function can vary according to the specific rendering function of the first rendering function. For example, when the first rendering function is a graphics drawing function, the calling parameters of the first rendering function are the coordinates of each point of the graphics. When the first rendering function is a shading function, the calling parameters of the first rendering function are the color code.
[0091] It should be noted that the command cache in the embodiment of the present application can be created by the browser process itself, or it can be created by the client process and injected into the browser process.
[0092] In some embodiments, Figure 5 Before S1021, that is, in response to the business logic code calling the first rendering function for each page frame of the mini-program, and before writing the calling information of the first rendering function in the command cache through the browser process, the method may also include the following processing: generating the script code of the command cache through the client process, and injecting the script code of the command cache into the browser process.
[0093] It should be noted that the script code of the command cache is used to create the command cache and control the browser process to write the call information of the first rendering function into the command cache. That is, the client process generates a section of script code that can be automatically executed. The script code is used to open a command cache that can be read and written, intercept the call of the first rendering function, and control the browser process to record the corresponding call information. Among them, the script code of the command cache is injected into the browser process. It can be achieved by creating a thread in the browser process and making the thread execute the script code of the command cache, or by generating an executable file corresponding to the script code and using the executable file to replace the code segment that originally called the first rendering function in the browser process.
[0094] S1022. Generate a call processing request for the command cache through the browser process, and send the call processing request to the client process.
[0095] After the electronic device writes the call information of the first rendering function in the command cache through the browser process, it will generate a call processing request for the first rendering function through the browser process, and pack the command cache with the call information written into the call processing request, and send the call processing request to the client process through cross-process communication. In this way, after receiving the call processing request, the client process can parse the command cache therefrom to obtain the call information of the first rendering function.
[0096] It should be noted that in an embodiment of the present application, the electronic device can, after the browser process writes the call information of the first rendering function into the command cache, immediately generate a call processing request for the command cache through the browser process and send it to the client process; or, after the browser process writes the call information of the first rendering function into the command cache, when certain request sending conditions are met (i.e., when the call processing request needs to be sent), generate a call processing request for the command cache through the browser process and send it to the client.
[0097] Among them, the request sending condition may mean that the first rendering function is a synchronous rendering function with a return value (such as the gl.createBuffer function), or that the calling information of all first rendering functions called for the page frame has been recorded in the command cache. The embodiment of the present application is not limited here.
[0098] More specifically, in some embodiments, Figure 5 In S1022, that is, through the browser process, a call processing request is generated for the command cache, and the call processing request is sent to the client process, which can be achieved by the following processing: when the first rendering function called by the business logic code is a synchronous rendering function with a return value, the call processing request is generated for the command cache through the browser process, and the call processing request is sent to the client process.
[0099] It should be noted that the synchronous rendering function can only continue to run after obtaining the return value, otherwise it will remain in a suspended state to continue waiting for the return value. Therefore, when the first rendering function is a synchronous rendering function with a return value, the command cache needs to be submitted to the client process in a timely manner so that the client process generates a corresponding return value for the first rendering function and returns, so that the first rendering function can continue to execute.
[0100] In other embodiments, Figure 5In S1022, that is, generating a call processing request for the command cache through the browser process, and sending the call processing request to the client process, it can also be achieved through the following processing: when the call information of multiple first rendering functions that need to be called when the page frame is rendered has been recorded in the command cache, generating a call processing request for the command cache through the browser process, and sending the call processing request to the client process.
[0101] It is understandable that cross-process communication takes a certain amount of time to achieve, and a page frame may need to call multiple, for example dozens or hundreds of first rendering functions, to complete graphics rendering. These first rendering functions can all be regarded as the first rendering functions that the page frame needs to call when rendering. When the call information of each of these first rendering functions has been recorded in the command cache, the electronic device will generate a call processing request for the command cache through the browser process and send it to the client process. In this way, the calls of all the first rendering functions required for a page frame can be submitted to the client process in batches, thereby reducing the number of cross-process communications and improving the processing efficiency of the page frame during graphics rendering.
[0102] It should be noted that in the embodiment of the present application, sending the call processing request to the client process can be implemented through an XMLHttpRequest (XHR) request, or based on technologies such as the WebSocket protocol, which is not limited in the embodiment of the present application.
[0103] In more detail, in some embodiments, sending the call processing request to the client process can be achieved through the following processing: through the browser process, the access address of the call processing request is set to the service address of the client process; through the client process, the call processing request is intercepted at the service address to complete the sending of the call processing request to the client process.
[0104] That is, the browser process directly uses the service address of the client process as the access address for calling the processing request. Then the client process can intercept the request coming from the browser process at its service address through the request interception control (such as the WKURLSchemeHandler control) to achieve cross-process communication between the browser process and the client process and complete the sending of the calling processing request.
[0105] S103: In response to the call processing request, determine, through the client process, a corresponding second rendering function for the first rendering function, and call the second rendering function.
[0106] The electronic device responds to the call processing request through the client process, and determines a second rendering function with the same graphics rendering function as the first rendering function, and the second rendering function is an image rendering function that can be called by the client. Then, the electronic device calls the second rendering function through the client process, thereby converting the call to the first rendering function into a call to the second rendering function, so as to subsequently use the second rendering function to render the page frame of the applet.
[0107] That is to say, in the embodiment of the present application, the first rendering function and the second rendering function can perform the same graphics rendering function, but are different in the way they are called. For example, if the first rendering function is a function for creating a buffer object (such as the creatBuffer function in WebGL), the second rendering function is also a function for creating a buffer object (such as a function for creating a buffer object in OpenGL).
[0108] It should be noted that the second rendering function can be obtained by the client process according to the function of the first rendering function, by screening from the existing graphics rendering functions that can be called by the client process, or it can be obtained by the client process after converting and rewriting the first rendering function. The embodiment of the present application is not limited here.
[0109] In an embodiment of the present application, when the calling information includes calling parameters, calling the second rendering function can be implemented by the following processing: through the client process, parsing the calling parameters of the first rendering function from the command cache, and converting the calling information of the first rendering function into the calling parameters of the second rendering function; through the client process, passing the calling parameters of the second rendering function to the second rendering function, thereby completing the call to the second rendering function.
[0110] The electronic device parses the call processing request to obtain the command cache through the client process, obtains the call parameters of the first rendering function from the command cache, and converts them into call parameters available for the second rendering function, and finally passes the converted call parameters as input parameters of the second rendering function to the second rendering function to implement the call of the second rendering function. For example, when the call parameters of the first rendering function are the coordinate points of the graphics to be drawn, the electronic device converts them according to the second rendering function parameter format through the client process, and inputs the conversion results into the second rendering parameters to complete the call.
[0111] S104. Performing graphics rendering on the page frame of the mini program through a second rendering function to obtain a rendering result of the page frame of the mini program.
[0112] The electronic device uses the second rendering function to perform graphics rendering processing on each page frame of the mini-program, such as drawing patterns and coloring each page frame. After completing the graphics rendering, the rendering result of each page frame can be obtained.
[0113] It can be understood that compared with the related art, calling the graphics rendering function through the browser process to render the page frame of the mini-program will cause the browser's memory usage to be too high, thereby causing a high risk of the mini-program being forced to close. In the embodiment of the present application, the electronic device will first pull up the browser process through the client process when the user starts the mini-program, execute the business logic code of the mini-program through the browser, and when the business logic code needs to call the first rendering function, send a call processing request to the client process through the browser process, so as to convert the browser process's call to the first rendering function into a call to the second rendering function by the client process through the call processing request, and perform graphics rendering on the mini-program's page frame through the second rendering function. In this way, the graphics rendering process of the mini-program's page frame can be transferred to the client implementation, so that the browser only acts as an executor of the business logic code without the resource overhead required to call the graphics processor, thereby greatly reducing the browser's memory consumption and reducing the possibility of the browser process being forced to stop, and ultimately reducing the risk of the mini-program being forced to close. In addition, the graphics rendering process of the mini-program's page frame is transferred to the client, which unbinds the graphics rendering of the browser and the mini-program's page frame. In this way, even if the browser upgrade may cause operational failures, it will not affect the graphics rendering of the mini-program's page frame, thereby ensuring the normal use of the mini-program.
[0114] It should be noted that in the above scheme, when the first rendering function is a synchronous rendering function with a return value, the browser process will immediately carry the command cache in the call processing request and send it to the client process to realize the submission of the command cache, and will continue the subsequent execution only after obtaining the return value. It can be seen that this method still takes some time to continue to write the subsequent call information of the first rendering function into the command cache and submit the command cache because it needs to wait for the return value to be returned, thereby affecting the operation efficiency.
[0115] For this, see Figure 6 , Figure 6 This is a schematic diagram of the process of the page rendering method provided in the embodiment of the present application. Figure 3 In some embodiments of the present application, Figure 5 Before S1022, that is, before generating a call processing request for the command cache through the browser process and sending the call processing request to the client process, the method may further include the following processing:
[0116] S1023. When the first rendering function is a synchronous rendering function with a return value, in response to the business logic code, the first rendering function is called for the page frame of the mini-program, and a virtual return value is returned for the first rendering function through the browser process, and the virtual return value and the calling information of the first rendering function are written into the command cache together.
[0117] That is to say, when the first rendering function is a synchronous rendering function with a return value, the electronic device will first generate a virtual return value for the first rendering function through the browser process, and return the virtual return value to the first rendering function, so that the first rendering function can continue to run. In this way, the browser process does not need to wait for the return value of the first rendering function, so that it can continue to record the call information of other subsequent first rendering functions, and after completing the recording of the call information of all first rendering functions for the page frame, submit the command cache to the client process at one time. Among them, the virtual return value can be randomly generated by the browser process according to the format of the return value of the first rendering function, or it can be the historical return value of the first rendering function, which is not limited in the embodiments of the present application.
[0118] It should be noted that in order to enable the subsequent client process to correctly convert the call to the first rendering function into a call to the second rendering function, the electronic device will write the calling information (i.e., function identifier, calling parameters, etc.) and the virtual return value of the first rendering function into the command cache through the browser process, so that the subsequent client process can parse the calling information and virtual return value of the first rendering function from the command cache.
[0119] When there is a virtual return value of the first rendering function in the command cache, in some embodiments of the present application, after performing graphics rendering on the page frame of the mini-program through the second rendering function and obtaining the rendering result of the page frame of the mini-program, the method further includes: through the client process, parsing the command cache from the call processing request, and extracting the virtual return value from the command cache; through the client process, using the return value of the second rendering function as the real return value of the first rendering function, and establishing a mapping relationship between the real return value and the virtual return value.
[0120] The mapping relationship is used to determine the real return value corresponding to the virtual return value in the command cache at a future time.
[0121] It should be noted that, in the embodiment of the present application, the call to the first rendering function is converted into a call to the second rendering function, so that the second rendering function has the same function as the first rendering function, and therefore, the return value of the second rendering function can be used as the real return value of the first rendering function. For example, when the function of the first rendering function is to create a buffer object, the function of the second rendering function is also to create a buffer object, so that the return value of the second rendering function can be the identifier of the buffer object (for example, buffer ID), and the return value of the first rendering function should also be the identifier of the buffer object. Therefore, the electronic device will directly determine the return value of the second rendering function as the real return value of the first rendering function through the client process, and bind the real return value and the virtual return value by establishing a mapping relationship between the real return value and the virtual return value. In this way, when the browser process transmits the virtual return value to the client process again for the first rendering function in the future, the client process can directly determine the real return value for the first rendering function through the mapping relationship, so as to facilitate the subsequent functions.
[0122] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0123] The embodiment of the present application is implemented in the scenario of rendering the game screen (called page frame) of a small game (called applet). In the embodiment of the present application, the rendering of the game screen of the small game is switched from WebView (called browser) to the client of the social application.
[0124] Figure 7 Schematic diagram of the principle of rendering the game screen of the mini-game provided by the embodiment of the present application. Figure 7 In the embodiment of the present application, the call of the We bGL function 7-3 (called the first rendering function) in the WebView process 7-1 (called the browser process) is forwarded to the client process 7-2 through cross-process communication, while the business logic code of the mini-game, that is, the JS code 7-4, is still running in the WebView process 7-1, and at the same time, the client process 7-2 is called through the API 7-5 to realize file reading and writing, information login, etc.
[0125] However, there are many interfaces for WebGL functions, and the JS code may need to call dozens or even hundreds of times for each frame of the game screen. If each WebGL function is called, it needs to be forwarded to the client process through cross-process communication, which makes the rendering performance of the game screen of the mini-game very poor. Therefore, in the embodiment of the present application, the call of the WebGL function will be recorded in the CommandBuffer (called the command buffer) through the WebView process, and when it needs to be submitted, the call of the WebGL function will be submitted to the client process in batches at one time through cross-process communication for batch processing.
[0126] During implementation, the client process will inject the CommandBuffer script (called the command buffer script code) into the WebView process. The script is used to intercept the call of the WebGL function of the JS code and record the call of the WebGL function into the CommandBuffer.
[0127] For example, Figure 8 This is a schematic diagram of recording the call of the WebGL function provided by the embodiment of the present application. When the JS code executes the WebGL function, the WebView process writes the call of the WebGL function, that is, the function ID (called function identification) of the WebGL function and the call parameters, into CommandBuffer for subsequent batch submission.
[0128] When a frame ends or a synchronous function (called a synchronous rendering function) is called, the CommandBuffer needs to be submitted to the client process. In the embodiment of the present application, CommandBuffer can be converted into binary data, so that cross-process communication can be implemented using XHR, that is, the WebView process will carry the CommandBuffer data through an XHR request and submit it to the client process, and the client process intercepts the XHR request (called a call processing request) through WKURLSchemeHandler. Of course, cross-process communication can also be implemented through WebScoket, Prompt, postMessage, etc.
[0129] Under normal circumstances, when a synchronous function with a return value is called, such as calling gl.createBuffer, the WebView process will submit the CommandBuffer once and wait for the return value, so that the rendering efficiency is not very high. In this regard, in an embodiment of the present application, when a synchronous function with a return value is called, the call can be written into the CommandBuffer without triggering a synchronous submission. At this time, when the synchronous function is called, the WebView process returns a false BufferID (called a virtual return value) and writes the false BufferID together with the function call into the CommandBuffer. After the client process parses the CommandBuf fer and generates a true BufferID (called a real return value), it maps the true BufferID and the false BufferID. After that, when the WebView process passes the false BufferID again, the client process can directly replace the false BufferID with the true BufferID based on the mapping relationship to achieve the function.
[0130] For example, Fig. 9 This is another schematic diagram of recording the call of the WebGL function provided by the embodiment of the present application. In CommandBuffer, in addition to recording the function IDs and call parameters of some WebGL functions that do not have return values, a fake BufferID is also recorded for the createBuffer function so that it can be passed to the client process.
[0131] When the client process is rendering, that is, when the client process receives the instruction from the WebView process indicating that a canvas needs to be created and calls the WebGL function through getContext (the client process does not execute the instruction at this time), the corresponding drawing layer (such as EAGLView) and EAGLContext will be created on the client. After that, after the client process receives the CommandBuffer, it will convert the call of the WebGL function into an OpenGL ES function (called the second rendering function) to achieve rendering.
[0132] Finally, WebView is only used as an executor of JS code. At this time, WebView only needs to load a very small or even blank HTML page (which can ensure the normal execution of JS code), without GPU resource-related overhead, which can greatly reduce the memory consumption of WebView itself. At the same time, since WebView is no longer needed for rendering, the impact of WebView upgrade failure on the rendering of the game screen of the mini-game can be avoided.
[0133] The following is a description of an exemplary structure of a page rendering device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 3 As shown, the software modules stored in the page rendering device 455 of the memory 450 may include:
[0134] A process launching module 4551 is used to launch a browser process of a browser through a client process in response to a startup operation on a mini-program, and execute the business logic code of the mini-program through the browser process;
[0135] A request sending module 4552 is used to send a call processing request to a client process through the browser process in response to the business logic code calling a first rendering function for a page frame of the applet; wherein the first rendering function is a graphics rendering function that can be called by the browser process;
[0136] A call processing module 4553 is used to determine, in response to the call processing request, a corresponding second rendering function for the first rendering function through the client process, and call the second rendering function; wherein the second rendering function is a graphics rendering function that can be called by the client process;
[0137] The graphics rendering module 4554 is used to perform graphics rendering on the page frame of the mini program through the second rendering function to obtain the rendering result of the page frame of the mini program.
[0138] In some embodiments of the present application, the request sending module 4552 is also used to call the first rendering function for the page frame of the mini-program in response to the business logic code, and write the call information of the first rendering function in the command cache through the browser process; generate the call processing request for the command cache through the browser process, and send the call processing request to the client process.
[0139] In some embodiments of the present application, the request sending module 4552 is also used to generate the call processing request for the command cache through the browser process and send the call processing request to the client process when the first rendering function called by the business logic code is a synchronous rendering function with a return value.
[0140] In some embodiments of the present application, the request sending module 4552 is also used to generate the call processing request for the command cache through the browser process and send the call processing request to the client process when the call information of each of the multiple first rendering functions that need to be called when rendering the page frame has been recorded in the command cache.
[0141] In some embodiments of the present application, the page rendering device 455 also includes: a script processing module 4555, which is used to generate the script code of the command cache through the client process, and inject the script code of the command cache into the browser process; the script code of the command cache is used to create the command cache, and control the browser process to write the call information of the first rendering function into the command cache.
[0142] In some embodiments of the present application, the request sending module 4552 is also used to set the access address of the call processing request to the service address of the client process through the browser process; through the client process, the call processing request is intercepted at the service address to complete sending the call processing request to the client process.
[0143] In some embodiments of the present application, the request sending module 4552 is also used to, when the first rendering function is a synchronous rendering function with a return value, call the first rendering function for the page frame of the mini-program in response to the business logic code, return a virtual return value for the first rendering function through the browser process, and write the virtual return value and the calling information of the first rendering function into the command cache together.
[0144] In some embodiments of the present application, the page rendering device 455 also includes: a mapping generation module 4556, which is used to parse the command cache from the call processing request through the client process, and extract the virtual return value from the command cache; through the client process, the return value of the second rendering function is used as the real return value of the first rendering function, and establish a mapping relationship between the real return value and the virtual return value; wherein the mapping relationship is used to determine the corresponding real return value for the virtual return value in the command cache at a future time.
[0145] In some embodiments of the present application, the call information includes: call parameters; the call processing module 4553 is also used to parse the call parameters of the first rendering function from the command cache through the client process, and convert the call information of the first rendering function into call parameters of the second rendering function; through the client process, the call parameters of the second rendering function are passed to the second rendering function to complete the call of the second rendering function.
[0146] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the page rendering method described in the embodiment of the present application.
[0147] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the page rendering method provided by the present application embodiment, for example, Figure 4 The page rendering method is shown.
[0148] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0149] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0150] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0151] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0152] In summary, through the embodiments of the present application, when the user starts the applet, the electronic device will first pull up the browser process through the client process, execute the business logic code of the applet through the browser, and when the business logic code needs to call the first rendering function, send a call processing request to the client process through the browser process, so as to convert the browser process's call to the first rendering function into a call to the second rendering function by the client process through the call processing request, and perform graphics rendering on the page frame of the applet through the second rendering function. In this way, the graphics rendering process of the page frame of the applet can be transferred to the client implementation, so that the browser is only used as an executor of the business logic code, thereby greatly reducing the memory consumption of the browser and reducing the possibility of the browser process being forced to stop, and ultimately reducing the risk of the applet being forced to close. In addition, the graphics rendering process of the page frame of the applet is transferred to the client implementation, which realizes the unbinding of the graphics rendering of the page frame of the browser and the applet. In this way, even if the upgrade of the browser may cause an operating failure, it will not affect the graphics rendering of the page frame of the applet, thereby ensuring the normal use of the applet.
[0153] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A page rendering method, It is characterized in that The method comprises: In response to a start operation for the applet, launching a browser process of the browser through a client process, and executing the business logic code of the applet through the browser process; In response to the business logic code calling a first rendering function for the page frame of the applet, sending a call processing request to the client process through the browser process; wherein the first rendering function is a graphics rendering function that can be called by the browser process; In response to the call processing request, determining, by the client process, a corresponding second rendering function for the first rendering function, and calling the second rendering function; wherein the second rendering function is a graphics rendering function that can be called by the client process; The second rendering function is used to perform graphics rendering on the page frame of the mini program to obtain a rendering result of the page frame of the mini program.
2. The method according to claim 1, It is characterized in that The calling of the first rendering function for the page frame of the applet in response to the business logic code, and sending a call processing request to the client process through the browser process, comprises: In response to the business logic code calling a first rendering function for the page frame of the applet, writing calling information of the first rendering function in a command cache through the browser process; The call processing request is generated for the command cache through the browser process, and the call processing request is sent to the client process.
3. The method according to claim 2, It is characterized in that The step of generating the call processing request for the command cache through the browser process and sending the call processing request to the client process includes: When the first rendering function called by the business logic code is a synchronous rendering function with a return value, the call processing request is generated for the command cache through the browser process, and the call processing request is sent to the client process.
4. The method according to claim 2, It is characterized in that The step of generating the call processing request for the command cache through the browser process and sending the call processing request to the client process includes: When the calling information of each of the multiple first rendering functions that need to be called when rendering the page frame has been recorded in the command cache, the browser process generates the calling processing request for the command cache and sends the calling processing request to the client process.
5. The method according to any one of claims 2 to 4, It is characterized in that In response to the business logic code calling the first rendering function for the page frame of the applet, before writing the calling information of the first rendering function in the command cache through the browser process, the method further includes: The script code of the command cache is generated through the client process, and the script code of the command cache is injected into the browser process; the script code of the command cache is used to create the command cache, and control the browser process to write the call information of the first rendering function into the command cache.
6. The method according to claim 3 or 4, It is characterized in that The sending the call processing request to the client process includes: By means of the browser process, setting the access address of the call processing request to the service address of the client process; The call processing request is intercepted at the service address through the client process, and the call processing request is sent to the client process.
7. The method according to claim 2, It is characterized in that Before generating the call processing request for the command cache through the browser process and sending the call processing request to the client process, the method further includes: When the first rendering function is a synchronous rendering function with a return value, in response to the business logic code calling the first rendering function for the page frame of the applet, a virtual return value is returned for the first rendering function through the browser process, and the virtual return value and the calling information of the first rendering function are written together into the command cache.
8. The method according to claim 7, It is characterized in that After performing graphics rendering on the page frame of the mini-program through the second rendering function to obtain the rendering result of the page frame of the mini-program, the method further includes: By means of the client process, the command cache is parsed from the call processing request, and the virtual return value is extracted from the command cache; By means of the client process, taking the return value of the second rendering function as the real return value of the first rendering function, and establishing a mapping relationship between the real return value and the virtual return value; The mapping relationship is used to determine the corresponding real return value for the virtual return value in the command cache at a future time.
9. The method according to any one of claims 2 to 4, It is characterized in that The calling information includes: calling parameters; the calling of the second rendering function includes: By means of the client process, the calling parameters of the first rendering function are parsed from the command cache, and the calling information of the first rendering function is converted into the calling parameters of the second rendering function; The calling parameter of the second rendering function is passed to the second rendering function through the client process to complete the calling of the second rendering function.
10. A page rendering device, It is characterized in that The device comprises: A process launching module, used to launch a browser process of a browser through a client process in response to a startup operation for a mini-program, and execute the business logic code of the mini-program through the browser process; A request sending module, configured to call a first rendering function for a page frame of the applet in response to the business logic code, and send a call processing request to the client process through the browser process; wherein the first rendering function is a graphics rendering function that can be called by the browser process; A calling processing module, configured to, in response to the calling processing request, determine a corresponding second rendering function for the first rendering function through the client process, and call the second rendering function; wherein the second rendering function is a graphics rendering function that can be called by the client process; A graphics rendering module is used to perform graphics rendering on the page frame of the mini program through the second rendering function to obtain a rendering result of the page frame of the mini program.
11. An electronic device, It is characterized in that The electronic device comprises: Memory for storing computer executable instructions or computer programs; The processor is used to implement the page rendering method described in any one of claims 1 to 9 when executing the computer executable instructions or computer programs stored in the memory.
12. A computer-readable storage medium storing computer-executable instructions or a computer program, It is characterized in that When the computer executable instructions are executed by a processor, the page rendering method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program or computer executable instructions, It is characterized in that When the computer program or computer executable instruction is executed by a processor, the page rendering method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Interaction implementation method and electronic equipment
CN120255971A
An interaction implementation method and electronic device
CN120255971B
Page rendering method and apparatus, and electronic device, computer-readable storage medium and computer program product
EP4645122A1
