A page rendering optimization method, device, browser system and medium
By caching refresh events and data, setting refresh interval thresholds, and using WebWorker threads to handle non-page rendering tasks, the problem of low fluency of the WebView interface is solved, performance and stability are improved, and development costs are reduced.
Patent Information
- Application Number
- CN202410546030.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-06
AI Technical Summary
WebView cannot guarantee user experience and has low fluency in interfaces with higher performance requirements and more user interactions.
By judging refresh actions, caching page refresh events and data, setting refresh interval thresholds, and only executing page refresh events when the interval exceeds the threshold, using WebWorker threads to handle non-page rendering related tasks, reducing main thread pressure, and calling through caching and optimization interfaces , Reduce unnecessary rendering and interface calls.
It improves the fluency and response speed of the interface, reduces the performance consumption of the browser system, reduces development costs, and enhances the stability and flexibility of the system.
Smart Images

Figure CN118132880B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a page rendering optimization method for a browser system based on Native interaction, a page rendering optimization device for a browser system based on Native interaction, a browser system and a readable storage medium. Background Art
[0002] At present, as App functions become more and more complete and demands increase, the original Native-based development model can no longer meet the needs of rapid iteration. Therefore, WebView controls are gradually introduced, and a Hybrid development model is adopted.
[0003] However, in actual use, there is a problem: WebView needs to load HTML, CSS and JS according to the URL before it can display the page content normally, which increases network requests. As a result, WebView cannot guarantee the user experience in interfaces with high performance requirements and more user interactions, and the fluency is low. Summary of the invention
[0004] The present invention solves the technical problem that WebView cannot guarantee user experience and has low fluency in interfaces with high performance requirements and more user interactions.
[0005] To solve the above problems, the present invention provides a page rendering optimization method for a browser system based on Native interaction, the page rendering optimization method comprising: judging whether there is a refresh action; in the case of a refresh action, caching a page refresh event and refresh data in the refresh action into a page refresh set; judging whether the page executes a page refresh event according to a refresh interval; in the case of a refresh interval greater than an interval threshold, the page executes a page refresh event, and executes a page rendering action according to the refresh data; in the case of a refresh action, caching the page refresh event and refresh data in the refresh action into a page refresh set, including: in the case of a refresh action, triggering a page refresh event and requesting refresh data; creating a new page refresh set, and arranging the page refresh event and refresh data in sequence and caching them into the page refresh set.
[0006] Compared with the prior art, the technical effect achieved by adopting this technical solution is as follows: In this application, a page refresh event is triggered by a refresh action. After the page refresh event is triggered, a new page refresh set is created, and the refresh data of the page is cached in the page refresh set; at the same time, when the page refresh event is triggered, it indicates that the page needs to be refreshed, and the page refresh event enters the page refresh set in sequence; an interval threshold is set, and when the refresh interval exceeds the interval threshold, the page refresh events in the page refresh set are executed in sequence to refresh the interface. The uniqueness of the set elements is used to exclude multiple triggers of the same event; but when there is no page refresh event in the page refresh set, the page continues to be not refreshed at this time, so even if the interval threshold is set, the interface will not be refreshed, reducing the performance consumption of the browser system. For interfaces with strong interaction and real-time UI refresh, the UI data (that is, refresh data) is cached, not refreshed in real time, and the UI performance loss caused by page rendering is reduced, which increases fluency. When there is a refresh action, a page refresh event and a data request action will be triggered, and refresh data needs to be requested, and page rendering actions are performed according to the refresh data and page refresh events. Page refresh events and refresh data are arranged and cached in sequence in a newly created page refresh set. The page refresh set can reduce the UI performance loss caused by page rendering and improve fluency.
[0007] In one embodiment of the present invention, when there is a refresh action, a page refresh event is triggered and refresh data is requested, including: when there is a refresh action, a page refresh event and a data request action are triggered; the UI main thread sends a data request action to a WebWorker thread; the WebWorker thread receives the data request action and processes the network data to obtain refresh data; the WebWorker thread notifies the UI main thread to receive the refresh data; wherein the network data includes refresh data and ordinary data.
[0008] Compared with the prior art, the technical effect achieved by adopting this technical solution is: Since JS is a single-threaded language and can only do one thing at the same time, it cannot refresh the UI and data logic processing at the same time, so the page rendering is slow. In view of this, the WebWorker thread is introduced, and the logic processing not involved is placed in the WebWorker thread processing, so that the main thread can refresh the UI while the WebWorker thread performs logic processing. In this application, the UI main thread notifies the WebWorker thread to perform data processing (including data request, data calculation, etc.). After the data processing is completed, the UI main thread is notified to receive the data. At this time, the UI main thread will render and refresh the data; WebWorker is used to process operations unrelated to the page UI, and WebWorker runs independently in the background, will not block the user interface of the page, and can be used to perform computationally intensive tasks and time-consuming tasks, such as network requests, data processing, etc. Under this process, the main thread is only responsible for page rendering, and all data related to non-page rendering is handed over to the WebWorker thread to do, which greatly reduces the pressure on the main thread, so that UI and data logic processing can be performed simultaneously, improves the page rendering speed, and ensures the fluency and response speed of the UI. At the same time, the introduction of WebWorker thread processing logic enables the browser system to better handle large amounts of data and complex calculations, providing greater flexibility for future functional expansion.
[0009] In one example of the present invention, the page rendering optimization method also includes: when there is a refresh action, determining whether the browser system triggers the page rendering action for the first time; when the browser system does not trigger the page rendering action for the first time, determining whether to trigger a data request action based on whether there is refresh data in the page refresh set; and when the browser system triggers the page rendering action for the first time, triggering a data request action.
[0010] Compared with the prior art, the technical effect achieved by adopting this technical solution is as follows: determining whether the browser system triggers the page rendering action for the first time, and determining the subsequent process based on whether the browser system is triggered for the first time: when the browser system triggers the page rendering action for the first time, triggering the data request action to obtain refresh data for executing the page rendering action; when the browser system does not trigger the page rendering action for the first time, determining whether to trigger the data request action based on whether there is refresh data in the page refresh set.
[0011] In one example of the present invention, when the browser system does not trigger the page rendering action for the first time, it determines whether to trigger the data request action based on whether there is refresh data in the page refresh set, including: when there is no refresh data in the page refresh set, triggering the data request action; when there is refresh data in the page refresh set, no longer triggering the data request action.
[0012] Compared with the prior art, the technical effect achieved by adopting this technical solution is as follows: when the browser system does not trigger the page rendering action for the first time, that is, when the component renders again, it first queries whether the current interface has a cache. If there is a cache (that is, there is refresh data in the page refresh set), the interface will no longer be requested (that is, the data request action will no longer be triggered), and the cached data (here is the refresh data) will be directly used for the first rendering. If the interface is no longer requested, there will be no secondary rendering, which optimizes performance. By caching data and optimizing interface calls, developers can reduce the debugging and optimization work of the code, thereby reducing development costs. By reducing the number of page renderings and optimizing interface calls, the probability of problems caused by frequent rendering and interface calls can be reduced, thereby improving the stability of the system. Since unnecessary rendering and interface calls are reduced, the power consumption of the device is reduced, which is particularly important for mobile devices and battery-powered devices.
[0013] In an example of the present invention, when refresh data exists in the page refresh set, the data request action is no longer triggered, and the page rendering action is performed according to the refresh data.
[0014] Compared with the existing technology, the technical effect achieved by adopting this technical solution is as follows: when there is refresh data in the page refresh set, the data request action is no longer triggered, and the page rendering action is performed according to the refresh data in the page refresh set. By caching data and optimizing interface calls, the developer's debugging and optimization work on the code can be reduced, thereby reducing development costs.
[0015] In one embodiment of the present invention, a new page refresh set is created, and page refresh events and refresh data are sequentially arranged and cached in the page refresh set, including: creating a new page refresh set; and arranging page refresh events and refresh data sequentially and cached in the page refresh set in key-value form.
[0016] Compared with the existing technology, the technical effect achieved by adopting this technical solution is: the page refresh events and refresh data are arranged in sequence and cached in the page refresh set in the form of key-value, where the key corresponds to the URL, and the value corresponds to the response data of the interface. Storing in the form of key-value has the effects of flexible storage mode, high point query performance, easy expansion and high availability.
[0017] On the other hand, an embodiment of the present invention also provides a page rendering optimization device for a browser system based on Native interaction, the page rendering optimization device comprising: a first judgment module, the first judgment module is used to judge whether there is a refresh action; a first execution module, the first execution module is used to cache the page refresh event and refresh data in the refresh action to a page refresh set when there is a refresh action; a second judgment module, the second judgment module is used to judge whether the page executes a page refresh event according to a refresh interval; a second execution module, the second execution module is used to execute a page refresh event on the page when the refresh interval is greater than an interval threshold, and execute a page rendering action according to the refresh data.
[0018] Compared with the prior art, the technical effect achieved by adopting this technical solution is as follows: the page rendering optimization device of the browser system based on Native interaction in this embodiment is used to implement the page rendering optimization method of the browser system based on Native interaction as in any embodiment of the present invention, so it has all the beneficial effects of the page rendering optimization method of the browser system based on Native interaction as in any embodiment of the present invention, which will not be repeated here.
[0019] On the other hand, an embodiment of the present invention further provides a browser system, which includes: a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the page rendering optimization method of the browser system based on Native interaction as described in any of the above embodiments are implemented.
[0020] Compared with the prior art, the technical effect achieved by adopting this technical solution is as follows: the browser system in this embodiment runs the page rendering optimization method of the browser system based on Native interaction as in any embodiment of the present invention, so it has all the beneficial effects of the page rendering optimization method of the browser system based on Native interaction as in any embodiment of the present invention, which will not be repeated here.
[0021] On the other hand, an embodiment of the present invention further provides a readable storage medium, which stores a program or instruction. When the program or instruction is executed by a processor, the steps of the page rendering optimization method of a browser system based on Native interaction as described in any of the above embodiments are implemented.
[0022] Compared with the prior art, the technical effect achieved by adopting this technical solution is as follows: the readable storage medium in this embodiment is used to store the page rendering optimization method of the browser system based on Native interaction as in any embodiment of the present invention, so it has all the beneficial effects of the page rendering optimization method of the browser system based on Native interaction as in any embodiment of the present invention, which will not be repeated here.
[0023] After adopting the technical solution of the present invention, the following technical effects can be achieved:
[0024] (1) For interfaces with strong interactions and real-time UI refresh, cache UI data (that is, refresh data) instead of refreshing in real time, which reduces UI performance loss caused by page rendering and increases fluency;
[0025] (2) Set an interval threshold. When the refresh interval exceeds the interval threshold, execute the page refresh events in the page refresh set in sequence to refresh the interface. By using the uniqueness of the set elements, multiple triggering of the same event will be excluded. However, when there is no page refresh event in the page refresh set, the page will not be refreshed. Therefore, even if the interval threshold is set, the interface will not be refreshed, reducing the performance consumption of the browser system.
[0026] (3) The main thread is only responsible for page rendering, and all non-page rendering related data is handed over to the WebWorker thread, which greatly reduces the pressure on the main thread, allowing UI and data logic processing to be performed simultaneously, improving the page rendering speed and ensuring the smoothness and response speed of the UI. At the same time, the introduction of WebWorker thread processing logic enables the browser system to better handle large amounts of data and complex calculations, providing greater flexibility for future functional expansion;
[0027] (4) By reducing the number of page rendering times and optimizing interface calls, the probability of problems caused by frequent rendering and interface calls can be reduced, thereby improving the stability of the system; by reducing unnecessary rendering and interface calls, the power consumption of the device is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flowchart of a method for optimizing page rendering in a browser system based on Native interaction provided in the first embodiment of the present invention;
[0029] Figure 2 A schematic block diagram of the structure of a page rendering optimization device for a browser system based on Native interaction provided in a second embodiment of the present invention;
[0030] Figure 3 A block diagram of a browser system provided in accordance with a third embodiment of the present invention;
[0031] Figure 4 A schematic diagram of the structure of a readable storage medium provided for a fourth embodiment of the present invention;
[0032] Description of reference numerals:
[0033] 100-page rendering optimization device of browser system based on Native interaction; 101-first judgment module; 102-first execution module; 103-second judgment module; 104-second execution module; 200-browser system; 210-memory; 211-computer program; 220-processor; 300-readable storage medium; 310-computer executable instructions. DETAILED DESCRIPTION
[0034] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] [Example 1]
[0036] See also Figure 1 , which is a page rendering optimization method of a browser system based on Native interaction provided by the first embodiment of the present invention, and the page rendering optimization method includes:
[0037] Step S100: Determine whether there is a refresh action;
[0038] Step S200: When there is a refresh action, cache the page refresh event and refresh data in the refresh action into a page refresh set;
[0039] Step S300: determining whether the page executes a page refresh event according to the refresh interval;
[0040] Step S400: when the refresh interval is greater than the interval threshold, the page executes a page refresh event and performs a page rendering action according to the refresh data.
[0041] In a specific embodiment, in the prior art, general page refreshes: user click events, data requests, etc. cause the current page to be updated. For example, an interface that displays time needs to refresh the page once per second to update the display of the second area. Under normal circumstances, this is no problem, and the performance consumption of refreshing the page once per second is completely affordable for the browser system. However, when the page needs to be refreshed ten or even dozens of times per second (for example, the current page is displayed at the millisecond level or the page needs to be refreshed to the real-time bullet screen scrolling style of the live broadcast platform), the performance consumption of the browser system begins to soar, which will cause page freezes and unsmooth operations.
[0042] Therefore, in this application, a page refresh event is triggered by a refresh action. After the page refresh event is triggered, a new page refresh set is created, and the refresh data of the page is cached in the page refresh set; at the same time, when the page refresh event is triggered, it indicates that the page needs to be refreshed, and the page refresh event enters the page refresh set in sequence; an interval threshold is set, and when the refresh interval exceeds the interval threshold, the page refresh events in the page refresh set are executed in sequence to refresh the interface. The uniqueness of the set elements is used to exclude multiple triggering of the same event; but when there is no page refresh event in the page refresh set, the page continues to not be refreshed at this time, so even if the interval threshold is set, the interface will not be refreshed, reducing the performance consumption of the browser system. Among them, the page refresh set is a collection of page refresh events and refresh data; the page refresh event can be a manually triggered refresh event or a function trigger; preferably, the interval threshold can be set to 100ms; the browser system is WebView.
[0043] Step S200 specifically includes:
[0044] Step S210: When a refresh action is performed, a page refresh event is triggered to request refresh data;
[0045] Step S220: create a new page refresh set, and sequentially arrange the page refresh events and refresh data and cache them in the page refresh set.
[0046] Specifically, when there is a refresh action, a page refresh event and a data request action will be triggered. Refresh data needs to be requested, and the page rendering action is performed according to the refresh data and the page refresh event. The page refresh event and the refresh data are sequentially cached to the newly created page refresh set. By caching UI data (in this embodiment, UI data is refresh data, and UI data is data that needs to be displayed on the page), real-time refresh is reduced, thereby reducing UI performance loss caused by page rendering and improving fluency.
[0047] Further, step S210 specifically includes:
[0048] Step S211: in the case of a refresh action, triggering a page refresh event and a data request action;
[0049] Step S212: the UI main thread sends a data request action to the WebWorker thread;
[0050] Step S213: the WebWorker thread receives the data request action and processes the network data to obtain refresh data;
[0051] Step S214: The WebWorker thread notifies the UI main thread to receive refresh data;
[0052] Among them, network data includes refresh data and normal data.
[0053] Specifically, in this embodiment, when there is a refresh action, the UI main thread needs to refresh the data. In order to reduce the pressure on the UI main thread and avoid jamming, the UI main thread does not directly process network data; the UI main thread sends a data request action to the WebWorker thread. The data request action is to request network data through the interface network. The network data includes refresh data and ordinary data. The refresh data is the data that needs to be displayed on the page (ie, UI), which can also be called UI data. The ordinary data is the data that does not need to be displayed on the page; the WebWorker thread receives the data request action, and after completing the data request action, stores the requested network data in the page refresh set; finally, the WebWorker thread notifies the UI main thread to receive the refresh data.
[0054] In this application, the UI main thread notifies the webwork thread to perform data processing (including data request, data calculation, etc.). After the data processing is completed, the UI main thread is notified to receive the data. At this time, the UI main thread will render and refresh the data; WebWorker is used to process operations unrelated to the page UI, and WebWorker runs independently in the background without blocking the user interface of the page. It can be used to perform computationally intensive and time-consuming tasks, such as network requests, data processing, etc. Under this process, the main thread is only responsible for page rendering, and all data not related to page rendering is handed over to the WebWorker thread, which greatly reduces the pressure on the main thread, allowing UI and data logic processing to be performed simultaneously, improving the page rendering speed, and ensuring the smoothness and responsiveness of the UI. At the same time, the introduction of WebWorker thread processing logic enables the browser system to better handle large amounts of data and complex calculations, providing greater flexibility for future functional expansion.
[0055] Furthermore, the page rendering optimization method also includes:
[0056] In the case of a refresh action, determine whether the browser system triggers the page rendering action for the first time;
[0057] When the browser system does not trigger the page rendering action for the first time, it determines whether to trigger the data request action based on whether there is refresh data in the page refresh set;
[0058] When the browser system triggers the page rendering action for the first time, a data request action is triggered.
[0059] Specifically, when there is a refresh action, the page refresh event is triggered and the page will be switched. In general page switching, the uninstallation and addition of components are involved. When the component is added, the component will be initialized. At this time, the network request interface related to the component UI will be executed. When the network interface data is requested, the component will present the relevant data, which will trigger the page to be rendered again. This means that the previous page rendering is useless, which wastes the performance of WebView and is not very good for the user experience. Therefore, the first page rendering needs to be optimized.
[0060] Therefore, when there is a refresh action, it is determined whether the browser system triggers the page rendering action for the first time, and the subsequent process is determined based on whether it is the first time the browser system is triggered: when the browser system triggers the page rendering action for the first time, the data request action is triggered, and steps S212-S214 are executed to obtain refresh data for executing the page rendering action; when the browser system does not trigger the page rendering action for the first time, it is determined whether to trigger the data request action based on whether there is refresh data in the page refresh set.
[0061] Furthermore, when the browser system does not trigger the page rendering action for the first time, judging whether to trigger the data request action according to whether there is refresh data in the page refresh set includes:
[0062] When there is no refresh data in the page refresh set, the data request action is triggered;
[0063] When refresh data exists in the page refresh set, the data request action is no longer triggered.
[0064] Specifically, when the browser system triggers the page rendering action for the first time, that is, when the component renders again, it will first query whether the current interface is cached. If it is cached (that is, there is refresh data in the page refresh set), it will no longer request the interface (that is, it will no longer trigger the data request action), and directly use the cached data (here is the refresh data) for the first rendering. If the interface is no longer requested, there will be no secondary rendering, which optimizes performance. By caching data and optimizing interface calls, developers can reduce the debugging and optimization work of the code, thereby reducing development costs. By reducing the number of page renderings and optimizing interface calls, the probability of problems caused by frequent rendering and interface calls can be reduced, thereby improving the stability of the system. Since unnecessary rendering and interface calls are reduced, the power consumption of the device is reduced, which is especially important for mobile devices and battery-powered devices.
[0065] Furthermore, when refresh data exists in the page refresh set, the data request action is no longer triggered, and the page rendering action is performed according to the refresh data.
[0066] Specifically, when refresh data exists in the page refresh set, the data request action is no longer triggered, and the page rendering action is performed according to the refresh data in the page refresh set. By caching data and optimizing interface calls, the developer's debugging and optimization work on the code can be reduced, thereby reducing development costs.
[0067] Furthermore, step S220 specifically includes:
[0068] Step S221: create a new page refresh set;
[0069] Step S222: Cache the page refresh event and refresh data in sequence into a page refresh set in key-value format.
[0070] Specifically, the page refresh events and refresh data are arranged in sequence and cached in the page refresh set in a key-value format, where the key corresponds to the URL and the value corresponds to the response data of the interface. Storing in the key-value format has the effects of flexible storage mode, high point query performance, easy scalability and high availability.
[0071] [Example 2]
[0072] See also Figure 2 This embodiment also provides a page rendering optimization device 100 for a browser system based on Native interaction, including: a first judgment module 101, the first judgment module 101 is used to judge whether there is a refresh action; a first execution module 102, the first execution module 102 is used to cache the page refresh event and refresh data in the refresh action to a page refresh set when there is a refresh action; a second judgment module 103, the second judgment module 103 is used to judge whether the page executes a page refresh event according to a refresh interval; a second execution module 104, the second execution module 104 is used to, when the refresh interval is greater than an interval threshold, the page executes a page refresh event and executes a page rendering action according to the refresh data.
[0073] In a specific embodiment, the first judgment module 101, the first execution module 102, the second judgment module 103 and the second execution module 104 of the page rendering optimization device 100 of the browser system based on Native interaction cooperate to implement the page rendering optimization method of the browser system based on Native interaction as described in the first embodiment above, which will not be repeated here.
[0074] [Example 3]
[0075] See also Figure 3This embodiment provides a structural diagram of a browser system 200, the browser system 200 includes a processor 220 and a memory 210 electrically connected to the processor 220, the memory 210 stores a computer program 211, and the processor 220 loads the computer program 211 to implement the page rendering optimization method of the browser system based on Native interaction as in the first embodiment.
[0076] [Example 4]
[0077] See also Figure 4 This embodiment also provides a readable storage medium 300, which stores computer executable instructions 310. When the computer executable instructions 310 are read and executed by the processor, the browser system where the readable storage medium 300 is located is controlled to implement the page rendering optimization method of the browser system based on Native interaction as in the first embodiment.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are only illustrative. For example, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0079] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A page rendering optimization method for a browser system based on Native interaction, characterized in that: The page rendering optimization method comprises: Determine whether there is a refresh action; In the case where the refresh action exists, caching the page refresh event and refresh data in the refresh action into a page refresh set; Determine whether the page executes the page refresh event according to the refresh interval; When the refresh interval is greater than the interval threshold, the page executes the page refresh event and performs a page rendering action according to the refresh data; In the case where the refresh action exists, caching the page refresh event and refresh data in the refresh action into a page refresh set, including: In the case where the refresh action occurs, a page refresh event is triggered to request refresh data; Create a new page refresh set, and sequentially arrange the page refresh event and the refresh data and cache them in the page refresh set; In the case where the refresh action exists, triggering a page refresh event and requesting refresh data includes: In the case where the refresh action exists, triggering the page refresh event and the data request action; The UI main thread sends the data request action to the WebWorker thread; The WebWorker thread receives the data request action and processes the network data to obtain the refresh data; The WebWorker thread notifies the UI main thread to receive the refresh data; Wherein, the network data includes the refresh data and common data.
2. The page rendering optimization method according to claim 1, characterized in that: The page rendering optimization method further includes: In the case where the refresh action exists, determining whether the browser system triggers the page rendering action for the first time; In the case where the browser system does not trigger the page rendering action for the first time, judging whether to trigger the data request action according to whether the refresh data exists in the page refresh set; When the browser system triggers the page rendering action for the first time, the data request action is triggered.
3. The page rendering optimization method according to claim 2, characterized in that: In the case where the browser system does not trigger the page rendering action for the first time, judging whether to trigger the data request action according to whether the refresh data exists in the page refresh set includes: In the case that the refresh data does not exist in the page refresh set, triggering the data request action; When the refresh data exists in the page refresh set, the data request action is no longer triggered.
4. The page rendering optimization method according to claim 3, characterized in that: In the case where the refresh data exists in the page refresh set, the data request action is no longer triggered, and the page rendering action is performed according to the refresh data.
5. The page rendering optimization method according to claim 1, characterized in that: The creating the page refresh set, arranging the page refresh event and the refresh data in sequence and caching them in the page refresh set, includes: Create the page refresh set; The page refresh event and the refresh data are sequentially arranged and cached in the page refresh set in a key-value format.
6. A page rendering optimization device for a browser system based on Native interaction, characterized in that: The page rendering optimization device applies the page rendering optimization method according to any one of claims 1 to 5, and the page rendering optimization device comprises: A first judgment module, the first judgment module is used to judge whether there is a refresh action; a first execution module, configured to cache, when the refresh action exists, a page refresh event and refresh data in the refresh action into a page refresh set; A second judgment module, the second judgment module is used to judge whether the page executes the page refresh event according to the refresh interval; The second execution module is used for executing the page refresh event on the page and performing a page rendering action according to the refresh data when the refresh interval is greater than the interval threshold.
7. A browser system, characterized in that: The browser system includes: a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the page rendering optimization method of the browser system based on Native interaction as described in any one of claims 1 to 5 are implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the page rendering optimization method of the browser system based on Native interaction as described in any one of claims 1 to 5 are implemented.
