Browser page rendering methods, devices, electronic devices, and readable storage media
By employing a dual-thread mechanism in the browser, separating the logic thread and the rendering thread, the logic thread pushes data update events to the trigger queue within a set time, while the rendering thread renders the page all at once. This solves the browser interface lag problem, improves the user experience, and simplifies code maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-07
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, multiple consecutive renderings of browser pages cause interface lag and a poor user experience.
A dual-thread mechanism is adopted. The logic thread pushes all page data update events in the trigger queue to the rendering thread within a set time. The rendering thread renders the browser page at once based on the page template code and data update events, avoiding multiple renderings in the single-thread mechanism.
Reduce page rendering times, improve user experience, achieve near-native JavaScript writing effects, reduce code volume, and simplify maintenance.
Smart Images

Figure CN116186439B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and more specifically, to a browser page rendering method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] With the development of internet technology, people can access the internet anytime, anywhere, and frequently use browsers during this process. Currently, the page rendering mechanism of a browser is as follows:
[0003] When a user opens a webpage in a browser, the JavaScript thread first executes synchronous tasks. After completing the synchronous tasks, it executes microtasks from the microtask queue. Once the microtask queue is empty, the JavaScript thread pauses. If the previously executed tasks involve page rendering updates, the GUI (Graphical User Interface) thread immediately starts and executes page rendering. After page rendering is complete, the JavaScript thread continues executing macrotasks. During the execution of macrotasks, new synchronous tasks or even microtasks may be generated that need to be executed. All of these processes may involve page updates, causing the GUI thread to start and continue executing page rendering.
[0004] In this scenario, if there are multiple macro tasks, the GUI thread may render pages continuously. Multiple consecutive page renderings can cause the browser interface to lag, resulting in a poor user experience. Summary of the Invention
[0005] The purpose of this invention is to provide a browser page rendering method, apparatus, electronic device, and readable storage medium to improve the problems existing in the prior art.
[0006] The embodiments of the present invention can be implemented as follows:
[0007] In a first aspect, the present invention provides a browser page rendering method applied to an electronic device, wherein the electronic device has a browser installed and runs a logic thread and a rendering thread of the browser, and the logic thread maintains a trigger queue; the method includes:
[0008] When the logic thread does not generate a new page data update event within a set time, it pushes all page data update events in the trigger queue to the rendering thread.
[0009] The rendering thread renders the browser page based on the obtained page template code and the update events of all page data.
[0010] In an optional implementation, before the step of pushing all page data update events in the trigger queue to the rendering thread when the logic thread does not generate a new page data update event within a set time, the method further includes:
[0011] The browser obtains page resources; the page resources include the browser page's logic code and the page template code;
[0012] The logic thread generates at least one page data update event based on the logic code, and sequentially puts each page data update event into the trigger queue.
[0013] In an optional implementation, the logic code includes at least one piece of trigger code; the step of the logic thread generating at least one page data update event based on the logic code includes:
[0014] Locate all trigger codes within the stated logic code;
[0015] For each of the aforementioned trigger codes, a corresponding page data update event is generated.
[0016] In an optional implementation, prior to the step of the browser obtaining page resources, the method further includes:
[0017] The browser responds to the user's click operation on the browser and obtains initial page resources; the initial page resources include the initial logic code and the initial page template code of the initial browsing interface;
[0018] The browser starts the logical thread;
[0019] The logic thread executes the initial logic code, and pushes the initial rendering event to the rendering thread when the initial rendering event is triggered;
[0020] The rendering thread executes the initial rendering event based on the initial page template code to render the initial browsing interface.
[0021] Secondly, the present invention provides a browser page rendering device for use in an electronic device, wherein the electronic device is equipped with a browser; the device includes a logic module and a rendering module of the browser.
[0022] The logic module is used to maintain a trigger queue and push all page data update events in the trigger queue to the rendering module when no new page data update events are generated within a set time.
[0023] The rendering module is used to render the browser page based on the obtained page template code and the update event of all page data.
[0024] In an optional implementation, the apparatus further includes an acquisition module, prior to the logic module pushing all page data update events in the trigger queue to the rendering module:
[0025] The acquisition module is used to obtain page resources; the page resources include the logic code of the browser page and the page template code;
[0026] The logic module is also used to generate at least one page data update event based on the logic code, and to put each page data update event into the trigger queue in sequence.
[0027] In an optional implementation, the logic code includes at least one piece of trigger code; the logic module, when generating at least one page data update event based on the logic code, is specifically used for:
[0028] Locate all trigger codes within the stated logic code;
[0029] For each of the aforementioned trigger codes, a corresponding page data update event is generated.
[0030] In an optional implementation, before the acquisition module acquires the page resources, the acquisition module is further configured to:
[0031] In response to a user's click action on the browser, initial page resources are obtained; the initial page resources include the initial logic code and initial page template code of the initial browsing interface;
[0032] Start the aforementioned logical thread;
[0033] The logic module is also used for:
[0034] Execute the initial logic code, and push the initial rendering event to the rendering module when the initial rendering event is triggered;
[0035] The initial rendering event is executed based on the initial page template code to render the initial browsing interface.
[0036] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to implement the browser page rendering method as described in any of the foregoing embodiments.
[0037] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the browser page rendering method described in any of the foregoing embodiments.
[0038] Compared with existing technologies, embodiments of the present invention provide a browser page rendering method, apparatus, electronic device, and readable storage medium. The method is applied to an electronic device with a browser installed and running a browser logic thread and a rendering thread. When the logic thread does not generate new page data update events within a set time, it pushes all page data update events in the trigger queue to the rendering thread. The rendering thread renders the browser page based on the obtained page template code and all page data update events. Compared with existing technologies, this solution adopts a dual-thread mechanism, where the logic thread submits all page data update events in the trigger queue to the rendering thread, allowing the rendering thread to render the browser page in one go, avoiding browser page lag caused by multiple renderings in a single-thread mechanism. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is one of the flowcharts illustrating a browser page rendering method provided in an embodiment of the present invention.
[0041] Figure 2 This is a second flowchart illustrating a browser page rendering method provided in an embodiment of the present invention.
[0042] Figure 3 This is a schematic diagram of the structure of a browser page rendering device provided in an embodiment of the present invention.
[0043] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0045] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0046] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0047] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0048] Here, we will first introduce the keywords or key terms involved in this invention:
[0049] 1. DOM: Document Object Model. The DOM is a programming interface for HTML (Hypertext Markup Language) and XML (Hypertext Markup Language) documents. It provides a structured representation of a document and defines a way to access this structure from within a program, thereby changing the document's structure, style, and content. The DOM resolves a document into a structured collection of nodes and objects (objects containing properties and methods). In short, it connects web pages with scripts or programming languages;
[0050] 2. React: A JavaScript library for building user interfaces; it is an open-source JavaScript library that renders data as HTML views.
[0051] 3. Vue: A progressive JavaScript framework for building user interfaces.
[0052] To address the issue of browser lag caused by multiple consecutive page renderings in existing technologies, as mentioned in the background section, a mainstream approach in current technologies is to adopt a virtual DOM architecture, such as React and Vue.
[0053] The main idea behind using a virtual DOM architecture to solve the problem of continuous and repeated page rendering is to transform the operations required for page rendering into a series of virtual tasks.
[0054] In this way, when a rendering task is originally required, it is converted into a virtual task (which is not executed at this time, meaning the GUI will not perform page rendering). Then the JS thread will continue to execute macro tasks until the last macro task is completed. The virtual DOM architecture then converts these accumulated virtual tasks into actual rendering tasks all at once. In this way, the browser will merge multiple page renderings into one rendering, thereby improving the user experience.
[0055] Taking Vue as an example, due to the framework's limitations, the code is divided into template code and script code. During code compilation and runtime, the compiler (including but not limited to webpack, rollup, etc.) will convert the template code into virtual DOM code for rendering, thereby optimizing the rendering effect.
[0056] The advantages of using a virtual DOM architecture are: decoupling the view and data at the code level, which facilitates maintenance; and reducing the number of page renderings, thereby improving the user experience.
[0057] However, using a virtual DOM architecture also has the following drawbacks:
[0058] For developers, in order to convert rendering tasks into virtual tasks, a large amount of architecture code needs to be inserted during the development phase. Such a large amount of architecture code will increase a lot of code maintenance work.
[0059] To facilitate code maintenance, the underlying layer needs to compare the differences between the virtual DOM before and after each data update, and then perform the corresponding page update operation, which is too costly.
[0060] Because JavaScript is an interpreted language, it needs to be translated into machine language by an interpreter before execution, making it much slower in computation than various compiled languages.
[0061] Based on the discovery of the aforementioned technical problems, the inventors, through creative labor, proposed the following technical solutions to solve or improve these problems. It should be noted that the deficiencies in the solutions of the prior art are all results derived by the inventors after practical experience and careful research. Therefore, the discovery process of the aforementioned problems and the solutions proposed in the embodiments of this application below should be considered contributions made by the inventors to this application during the inventive process, and should not be construed as technical content known to those skilled in the art.
[0062] In view of this, embodiments of the present invention provide a browser page rendering method that abandons the existing DOM architecture and adopts a dual-thread mechanism. The logic thread submits all page data update events in the trigger queue to the rendering thread, enabling the rendering thread to render the browser page in one go, thus avoiding browser page lag caused by multiple renderings in a single-thread mechanism. The following detailed description, through embodiments and in conjunction with the accompanying drawings, provides further elaboration.
[0063] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a browser page rendering method according to an embodiment of the present invention. The execution subject of this method can be an electronic device with a browser installed, and the electronic device runs a browser logic thread and a rendering thread. The logic thread maintains a trigger queue. The method includes the following steps:
[0064] S170. When the logic thread does not generate a new page data update event within the set time, all page data update events in the trigger queue will be pushed to the rendering thread.
[0065] It is understandable that a trigger queue can be used to store a series of page data update events, each of which can indicate data changes related to a component object on the browser page.
[0066] S180, The rendering thread renders the browser page based on the obtained page template code and all page data update events.
[0067] In this embodiment, the rendering thread does not execute any business logic code; it only exposes an interface for the logic thread to call. Therefore, the logic thread can push all page data update events in the trigger queue to the rendering thread by calling the interface provided by the rendering thread.
[0068] Therefore, the rendering thread can complete the rendering of the browser page in one go based on the obtained page template code and all page data update events.
[0069] The browser page rendering method provided in this invention is applied to an electronic device with a browser installed and running, consisting of a browser logic thread and a rendering thread. When the logic thread does not generate new page data update events within a set time, it pushes all page data update events in the trigger queue to the rendering thread. The rendering thread then renders the browser page based on the obtained page template code and all page data update events. Compared to existing technologies, this solution employs a dual-thread mechanism. The logic thread submits all page data update events from the trigger queue to the rendering thread, allowing the rendering thread to render the browser page in one go, avoiding browser page lag caused by multiple renderings in a single-threaded mechanism. Furthermore, this solution abandons the virtual DOM architecture, which can reduce the amount of code processed by the browser to some extent.
[0070] In the optional implementation, please continue to see Figure 1 Prior to step S170 above, the following may also be included:
[0071] S150, the browser obtains page resources.
[0072] In one possible scenario, while using a browser, a user can enter a link to a webpage in the browser's address bar, or the user can click somewhere on the browser page and the address bar will automatically redirect to the link. The browser can then use DNS (Domain Name System) to resolve the IP address mapped to the domain name in the link. The browser then establishes a connection with that IP address and simultaneously sends an HTTP (Hypertext Transfer Protocol) request to the server where that IP address is located, waiting for its response.
[0073] The server containing the IP address receives the HTTP request and waits to process it; after processing the HTTP request, the server returns the page resources to the browser.
[0074] In another possible scenario, the server has an active push mechanism, whereby the server can periodically or according to certain rules push messages to the browser, and the browser can obtain page resources from the push messages.
[0075] Optionally, page resources include the browser page's logic code and page template code.
[0076] S160. The logic thread generates at least one page data update event based on the logic code, and puts each page data update event into the trigger queue in sequence.
[0077] It is understandable that the logic thread will first execute the logic code. In the process of executing the logic code, the logic thread will execute synchronous tasks, micro tasks, macro tasks, etc. At the same time, every time a page update is involved, a page data update event will be generated, and the page data update event will be put into the trigger queue to continue executing tasks.
[0078] Furthermore, if no page update occurs within the set time, no new page data update events will be generated. The logic thread can then push all accumulated page data update events in the trigger queue to the rendering thread for rendering. It should be noted that when the logic thread pushes all page data update events in the trigger queue to the rendering thread, it means that the trigger queue is cleared, waiting for subsequent logic threads to generate new page data update events.
[0079] Optionally, the set time can be adaptively set based on the acceptable waiting time for actual users. For example, the set time can be set to 200ms or 300ms, etc. This example is only for illustration and is not a limitation.
[0080] It is understandable that if a user interacts with the current browser page multiple times, the browser will continuously request data from the server, and the server can continuously return feedback data to the browser within a preset time (e.g., 200~300 milliseconds).
[0081] The logic thread then generates several page data update events based on the continuously received feedback data and stores them in the trigger queue. If no new page data update events are generated within a set time, the logic thread pushes all page data update events in the trigger queue to the rendering thread. Thus, the rendering thread can render based on the current browser page's template code and all page data update events, resulting in the presentation of multiple page interaction results on the current browser page.
[0082] Optionally, the logic code may include more than one trigger code; correspondingly, the sub-steps of S160 may include:
[0083] S161. The logic thread searches for all trigger codes in the logic code;
[0084] S162. For each trigger code, the logic thread generates the page data update event corresponding to the trigger code.
[0085] It's understandable that the trigger code isn't source code written by the developers, but rather a code segment inserted during the compilation phase of development. While developers are creating web pages, they still write code using the widely used View / Model framework, which is then compiled into the web.
[0086] In this solution, the template code (page template code) can be directly rendered onto the page without being converted into a virtual DOM by the compiler. The compiler will parse the script code (logic code) according to the AST (Abstract Syntax Tree) structure. After parsing, trigger code will be inserted in every place in the code that involves page updates.
[0087] In an optional implementation, the following describes the browser startup process. Figure 1 Based on this, please refer to Figure 2 Prior to step S150 above, the following may also be included:
[0088] S110. The browser responds to the user's click action on the browser and obtains the initial page resources.
[0089] In this embodiment, the initial page resources include the initial logic code and the initial page template code of the initial browsing interface.
[0090] S120, Browser starts a logical thread.
[0091] Optionally, the existing JS thread (rendering thread) can be used to start a new thread (logic thread) using web worker or WebAssembly.
[0092] S130. The logic thread executes the initial logic code and pushes the initial rendering event to the rendering thread when the initial rendering event is triggered.
[0093] S140. The rendering thread executes the initial rendering event based on the initial page template code to render the initial browsing interface.
[0094] Taking a mobile phone as an example, when a user clicks the browser icon on the phone's desktop, the browser starts running. The browser can first obtain the initial page resources of the initial browsing interface. At the same time, the browser starts a logic thread, which then executes the initial logic code. When the initial rendering event is triggered, it pushes the initial rendering event to the rendering thread, which then executes the initial rendering event based on the initial page template code to render the initial browsing interface.
[0095] It should be noted that the execution order of each step in the above method embodiments is not limited to that shown in the attached figures, and the execution order of each step shall be subject to the actual application situation.
[0096] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0097] By employing a dual-thread mechanism to separate logic from rendering, the number of page renders is reduced, thus improving the user experience. The virtual DOM intermediary layer is eliminated, and the diff algorithm is removed, resulting in a near-native JavaScript experience. View and data are decoupled at the code level, simplifying maintenance. The framework integration essentially involves only the rendering thread's code, significantly reducing runtime code.
[0098] In order to perform the corresponding steps in the above method embodiments and various possible implementations, an implementation method of a browser page rendering device is given below.
[0099] Please see Figure 3 , Figure 3 A schematic diagram of the structure of a browser page rendering apparatus provided in an embodiment of the present invention is shown. The browser page rendering apparatus 200 is applied to an electronic device equipped with a browser, and includes a browser logic module 220 and a rendering module 230.
[0100] The logic module 220 is used to maintain the trigger queue and push all page data update events in the trigger queue to the rendering module when no new page data update events are generated within a set time.
[0101] Rendering module 230 is used to render the browser page based on the obtained page template code and all page data update events.
[0102] In an optional implementation, the browser page rendering apparatus 200 may further include an acquisition module 210, prior to the logic module 220 pushing all page data update events in the trigger queue to the rendering module:
[0103] The acquisition module 210 can be used to obtain page resources; page resources include the browser page's logic code and page template code;
[0104] The logic module 220 is also used to generate at least one page data update event based on the logic code, and to put each page data update event into the trigger queue in sequence.
[0105] In an optional implementation, the logic code includes at least one piece of trigger code; when the logic module 220 generates at least one page data update event based on the logic code, it can specifically be used to: find all the trigger codes in the logic code; and generate a page data update event corresponding to each trigger code.
[0106] In an optional implementation, before the acquisition module 210 acquires page resources, the acquisition module 210 is further configured to: acquire initial page resources in response to a user's click operation on the browser; the initial page resources include initial logic code and initial page template code for the initial browsing interface; and start a logic thread. The logic module 220 is further configured to: execute the initial logic code and push the initial rendering event to the rendering module when the initial rendering event is triggered; and execute the initial rendering event based on the initial page template code to render the initial browsing interface.
[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the browser page rendering device 200 described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0108] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 300 includes a processor 310, a memory 320, and a bus 330, with the processor 310 connected to the memory 320 via the bus 330.
[0109] Memory 320 can be used to store software programs, for example, Figure 3 The browser page rendering device 200 shown is included. The memory 320 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0110] The processor 310 can be an integrated circuit chip with signal processing capabilities. The processor 310 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0111] The memory 320 stores machine-readable instructions executable by the processor 310. When the processor 310 executes the machine-readable instructions, it implements the browser page rendering method disclosed in the above embodiments.
[0112] It is understood that electronic device 300 can be, but is not limited to, smartphones, tablets, personal computers, servers, virtual machines, etc. And... Figure 3 The structure shown is for illustrative purposes only; the electronic device 300 may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.
[0113] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the browser page rendering method disclosed in the above embodiments. The computer-readable storage medium can be, but is not limited to, various media capable of storing program code, such as a USB flash drive, external hard drive, ROM, RAM, PROM, EPROM, EEPROM, FLASH disk, or optical disk.
[0114] In summary, this invention provides a browser page rendering method, apparatus, electronic device, and readable storage medium. The method is applied to an electronic device with a browser installed and running a browser logic thread and a rendering thread. When the logic thread does not generate new page data update events within a set time, it pushes all page data update events in the trigger queue to the rendering thread. The rendering thread renders the browser page based on the obtained page template code and all page data update events. Compared to existing technologies, this solution employs a dual-thread mechanism, where the logic thread submits all page data update events from the trigger queue to the rendering thread, allowing the rendering thread to render the browser page in one go, avoiding browser page lag caused by multiple renderings in a single-thread mechanism.
[0115] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A browser page rendering method, characterized in that, The method is applied to an electronic device, which has a browser installed and runs a logic thread and a rendering thread of the browser, wherein the logic thread maintains a trigger queue; the method includes: When the logic thread does not generate a new page data update event within a set time, it pushes all page data update events in the trigger queue to the rendering thread. The rendering thread renders the browser page based on the obtained page template code and the update events of all page data.
2. The method according to claim 1, characterized in that, Before the step of pushing all page data update events in the trigger queue to the rendering thread when the logic thread does not generate a new page data update event within a set time, the method further includes: The browser obtains page resources; the page resources include the browser page's logic code and the page template code; The logic thread generates at least one page data update event based on the logic code, and sequentially puts each page data update event into the trigger queue.
3. The method according to claim 2, characterized in that, The logic code includes at least one piece of trigger code; The steps of generating at least one page data update event based on the logic code by the logic thread include: Locate all trigger codes within the stated logic code; For each of the aforementioned trigger codes, a corresponding page data update event is generated.
4. The method according to claim 2, characterized in that, Prior to the step of the browser obtaining page resources, the method further includes: The browser responds to the user's click operation on the browser and obtains initial page resources; the initial page resources include the initial logic code and the initial page template code of the initial browsing interface; The browser starts the logical thread; The logic thread executes the initial logic code, and pushes the initial rendering event to the rendering thread when the initial rendering event is triggered; The rendering thread executes the initial rendering event based on the initial page template code to render the initial browsing interface.
5. A browser page rendering device, characterized in that, Applied to an electronic device, the electronic device being equipped with a browser; the device includes a logic module and a rendering module of the browser; The logic module is used to maintain a trigger queue and push all page data update events in the trigger queue to the rendering module when no new page data update events are generated within a set time. The rendering module is used to render the browser page based on the obtained page template code and the update event of all page data.
6. The apparatus according to claim 5, characterized in that, The device further includes an acquisition module, which is used before the logic module pushes all page data update events in the trigger queue to the rendering module: The acquisition module is used to obtain page resources; the page resources include the logic code of the browser page and the page template code; The logic module is also used to generate at least one page data update event based on the logic code, and to put each page data update event into the trigger queue in sequence.
7. The apparatus according to claim 6, characterized in that, The logic code includes at least one piece of trigger code; the logic module, when generating at least one page data update event based on the logic code, is specifically used for: Locate all trigger codes within the stated logic code; For each of the aforementioned trigger codes, a corresponding page data update event is generated.
8. The apparatus according to claim 6, characterized in that, Before the acquisition module is used to obtain page resources, the acquisition module is also used to: In response to a user's click action on the browser, initial page resources are obtained; the initial page resources include the initial logic code and initial page template code of the initial browsing interface; Start a logical thread; The logic module is also used for: Execute the initial logic code, and push the initial rendering event to the rendering module when the initial rendering event is triggered; The initial rendering event is executed based on the initial page template code to render the initial browsing interface.
9. An electronic device, characterized in that, include: The electronic device includes a memory and a processor, the memory storing machine-readable instructions executable by the processor, which, when the electronic device is in operation, are executed by the processor to implement the browser page rendering method as described in any one of claims 1-4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the browser page rendering method according to any one of claims 1-4.
Citation Information
Patent Citations
Method, server and system for rendering webpages
CN102902576A
Web application page rendering optimization
CN104933078A