Page updating method and related device
By employing a single-page rendering instance mechanism and caching database download configuration items in iOS applications, the problem of low efficiency due to frequent updates in mobile application development is solved, thereby improving page rendering speed and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-01
AI Technical Summary
In iOS mobile application development, pure native code development lacks flexibility in dealing with rapidly changing business needs, resulting in frequent and inefficient updates, slow content update speed, and poor user experience.
A single-page rendering instance mechanism is adopted, which does not destroy page rendering instances during application runtime. Web page configuration items are downloaded in advance through a cache database, and the configuration items are allocated and updated only when the content is displayed, reducing the process of instance creation and destruction, and rendering page content using native code.
It improves page rendering speed, reduces system memory consumption, and enhances user experience, especially ensuring smooth animation and fast operation response in highly interactive scenarios.
Smart Images

Figure CN121958682A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development technology, and in particular to a page updating method and related apparatus. Background Technology
[0002] In mobile application development, iOS (iPhone Operating System) applications are typically developed using native code to achieve superior performance, interaction, and system integration. However, pure native code development lacks flexibility when dealing with rapidly changing business needs (such as marketing campaigns and configurable pages), and frequent feature updates require frequent version updates, leading to inefficiency. Especially in highly interactive mobile scenarios, this approach results in slow content update speeds, leading to a poor user experience. Summary of the Invention
[0003] In view of the above problems, this application provides a page updating method and related apparatus to improve page rendering speed and user experience. The specific solution is as follows:
[0004] The first aspect of this application provides a page updating method, including:
[0005] In response to the application initialization signal, the page rendering instance of the application is initialized, and the destruction operation of the page rendering instance and the creation operation after the destruction operation are no longer executed during the application's runtime;
[0006] If the target content exists in the current display interface of the application, the application's cache database is determined to have a webpage configuration item that matches the target content based on the webpage configuration lookup information of the target content. The target content is content displayed using a webpage view, and the webpage configuration lookup information represents the storage location of the webpage configuration item of the target content in the cache database.
[0007] If the webpage configuration item exists and the webpage configuration item is within the validity period of the current webpage version, then when the target display content is selected for display, the webpage configuration item is assigned to the page rendering instance for use, and the page is updated.
[0008] If the webpage configuration item does not exist or is not within the validity period of the current webpage version, the webpage configuration item for the target display content is downloaded so that when the target display content is selected for display, the downloaded new webpage configuration item is allocated to the page rendering instance for use, and the page is updated.
[0009] In one possible implementation, the page update method further includes:
[0010] In response to a page content switching operation in the webpage view, the switched page parameters are passed to the native code of the operating system based on a target message passing mechanism for rendering the switched page content. The target message passing mechanism is a message passing function carried in the operating system where the application resides.
[0011] In one possible implementation, initializing the page rendering instance of the application includes:
[0012] Allocate instance storage space in the operating system, obtain the code of the page rendering instance, and store the code in the instance storage space.
[0013] In one possible implementation, the webpage configuration lookup information includes: a page index value and a version identifier. The step of determining whether a webpage configuration item matching the target display content exists in the application's cache database based on the webpage configuration lookup information of the target display content includes:
[0014] Based on the page index value, determine whether the target webpage configuration item associated with the page index value exists in the cache database, wherein the page index value is an identifier representing the webpage configuration;
[0015] When it is determined that the target webpage configuration item exists, it is determined whether the target version identifier of the target webpage configuration item is consistent with the version identifier;
[0016] If the target version identifier and the version identifier are consistent, then the target webpage configuration item is used as the webpage configuration item that is adapted to the target display content.
[0017] In one possible implementation, the process of determining whether the webpage configuration item is within the validity period includes:
[0018] Determine whether the lookup time for the webpage configuration item in the cache database is within the target valid time period, where the target valid time period is the version valid time period of the current webpage version;
[0019] If the search time is within the target valid time period, then the webpage configuration item is determined to be within the validity period.
[0020] In one possible implementation, the process of building the cache database includes:
[0021] When initializing the page rendering instance of the application, a cache folder for the application is created in the operating system, and page cache files are created in the cache folder for use as the cache database.
[0022] A second aspect of this application provides a page updating apparatus, comprising:
[0023] An instance initialization module is used to initialize the page rendering instance of the application in response to the application initialization signal, and will not execute the destruction operation of the page rendering instance and the creation operation after the destruction operation during the application's operation.
[0024] The configuration item determination module is used to determine whether there is a web page configuration item that matches the target display content in the application's cache database based on the web page configuration lookup information of the target display content if the target display content exists in the current display interface of the application. The target display content is content displayed using a web page view, and the web page configuration lookup information represents the storage location of the web page configuration item of the target display content in the cache database.
[0025] The configuration item matching module is configured to, if the webpage configuration item exists and is within the validity period of the current webpage version, allocate the webpage configuration item to the page rendering instance when the target display content is selected for display, thereby updating the page; and,
[0026] The configuration item update module is used to download the webpage configuration item for the target display content if the webpage configuration item does not exist or the webpage configuration item is not within the validity period of the current webpage version. When the target display content is selected for display, the downloaded new webpage configuration item is allocated to the page rendering instance for use to update the page.
[0027] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the page update method of the first aspect or any implementation thereof.
[0028] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0029] The memory is used to store computer programs;
[0030] The processor is used to execute the computer program to enable the electronic device to implement the page update method of the first aspect or any implementation thereof.
[0031] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to perform a page update method according to the first aspect or any implementation thereof.
[0032] By employing the above technical solution, the page update method provided in this application can initialize the application's page rendering instance in response to the application initialization completion signal after the application starts. During application runtime, it avoids destroying existing page rendering instances and creating new ones, reducing frequent instance creation and destruction, thereby reducing system memory consumption and improving rendering speed. Before displaying target content using a webpage view, the method searches the database for webpage configuration items based on the target content's attribute information. If no configuration item is found or expired, the downloader is invoked to download the configuration item. If the download is complete or the configuration item exists in the database and is valid, it is allocated to the page rendering instance when the target content is selected for display. By pre-downloading and storing relevant page configuration items while maintaining the page rendering instance's operation, configuration information can be directly retrieved from the cached database during page updates, eliminating the need for page rendering instance creation and destruction. This effectively reduces download and page rendering instance update waiting time, further improving page rendering update speed and enhancing user experience. Attached Figure Description
[0033] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0034] Figure 1 An architecture diagram of a page update system provided in this application;
[0035] Figure 2 A flowchart of a page update method provided in this application;
[0036] Figure 3 A page structure diagram of an application homepage provided in this application;
[0037] Figure 4 A display effect diagram of a webpage view provided for this application;
[0038] Figure 5 A structural diagram of a page updating device provided in this application;
[0039] Figure 6 This is a structural diagram of an electronic device provided in this application. Detailed Implementation
[0040] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0041] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0042] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0043] See Figure 1 , Figure 1 A schematic diagram of the architecture of a page update system is shown. The system may include a terminal 100 and a server 200.
[0044] The terminal 100 may have an application installed. The application and webpage can provide an interface. The terminal 100 can receive user operations on the application interface and download initialization data and configuration data from the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.
[0045] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.
[0046] The following description Figure 1 The product form of the mid-terminal 100;
[0047] The terminal 100 in this application embodiment can be a mobile phone, tablet computer, laptop computer, netbook, etc., and this application embodiment does not impose any restrictions on it.
[0048] Terminal 100 may include a radio frequency unit, memory, input unit, display unit, camera (optional), audio circuitry (optional), speaker (optional), microphone (optional), headphone jack (optional), processor, external interface, power supply, and other components. Those skilled in the art will understand that the above-mentioned components are merely examples and do not constitute a limitation on the terminal or multifunctional device; it may include more or fewer components, or a combination of certain components, or different components.
[0049] The input unit can be used to receive input numeric or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit may include a touchscreen (optional) and / or other input devices. Other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0050] Among them, the input device can receive input data, etc.
[0051] The display unit can be used to display information input by the user or information provided to the user, various menus of the terminal, interactive interfaces, file display, and / or playback of any multimedia file. In the embodiments of this application, the display unit can be used to display the interface of an application, processing results, etc.
[0052] The memory can be used to store software code related to the page update method, the processor can execute the steps of the page update method, and can also schedule other units (such as the above-mentioned input unit and display unit) to achieve the corresponding functions.
[0053] This radio frequency unit (optional) can be used to receive and send signals during information transmission or calls.
[0054] In this embodiment of the application, the radio frequency unit can send data to the server 200 and receive the processing results sent by the server 200.
[0055] It should be understood that this radio frequency unit is optional and can be replaced with other communication interfaces, such as a network port.
[0056] Terminal 100 also includes a power source (such as a battery) for supplying power to the various components.
[0057] Terminal 100 also includes an external interface, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication or to connect a charger to charge terminal 100.
[0058] Server 200 includes a bus, a processor, a communication interface, and memory. The processor, memory, and communication interface communicate with each other via the bus.
[0059] Introducing HTML5 technology into an application allows users to browse web pages directly within the application interface by embedding a web page view, enabling them to do so without leaving the application. However, HTML5 technology suffers from performance bottlenecks primarily because its rendering engine is relatively complex and cumbersome, resulting in slow initialization. Rendering pages requires dynamically downloading configuration items, consuming significant CPU resources and time, leading to decreased rendering performance and causing page stuttering, thus negatively impacting the user experience.
[0060] To address the aforementioned problems, this application provides a page update method. The page update method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0061] Reference Figure 2 , Figure 2 This is a flowchart illustrating a page update method provided in an embodiment of this application, as follows: Figure 2 As shown in the figure, the page update method provided in this application embodiment may include steps S201 to S204, which are described in detail below.
[0062] S201. In response to the application initialization signal, initialize the application's page rendering instance, and do not perform the destruction operation of the page rendering instance or the creation operation after the destruction operation during application runtime.
[0063] Specifically, the page rendering instance here refers to the concrete entity created at runtime by the program responsible for rendering in the webpage view; it is the actual process of program code being loaded into the terminal's memory and executed. The webpage view is an embedded browser component used to display webpage content in mobile applications, allowing developers to load webpage content directly into the application interface, enabling users to browse webpages without leaving the application.
[0064] Currently, the use of page rendering instances involves creating a new instance each time a page is opened and destroying it when the page is closed. Frequent creation and destruction consume significant system resources (such as system memory), severely impacting page rendering speed. Therefore, a single-page rendering instance (SPEI) approach is adopted, where only one SPEI exists within an application. This SPEI remains intact until the application is completely closed (i.e., the application is fully exited, not running in the background), and can be directly invoked when needed.
[0065] The term "application runtime" refers to the application running in the foreground and background of the user's terminal. In other words, as long as the application is still running on the user's terminal (whether in the foreground or the system background) and the relevant threads have not been terminated, the application is always running.
[0066] To prevent the destruction and subsequent creation of the page rendering instance from occurring during application runtime—ensuring the page rendering instance remains valid after initialization—this can be achieved by having the operating system reuse the same page rendering instance. Specifically, this can be done by intercepting or disabling the operating system's default page rendering instance destruction logic and caching the page rendering instance in a global container. When the webpage content to be displayed is updated, the destruction instruction is intercepted, and the current page rendering instance is directly retrieved from the global container, allowing the system to reuse the same instance instead of destroying and recreating it.
[0067] S202. If the target display content exists in the current display interface of the application, the application's cache database is determined based on the web page configuration lookup information of the target display content to determine whether there is a web page configuration item that matches the target display content. The target display content is the content displayed using a web page view, and the web page configuration lookup information represents the storage location of the web page configuration item of the target display content in the cache database.
[0068] Specifically, to reduce the need for dynamically downloading configuration items during page rendering, which slows down rendering and further improves page rendering speed, the application can identify content displayed using web views. Upon detection of such content, the relevant web page configuration items can be downloaded in advance, without waiting for user interaction, and stored in a compressed file in the database. This allows for direct retrieval of configuration items from the database, eliminating the need for dynamic downloads and improving rendering efficiency.
[0069] The webpage configuration items can include the page size required for rendering, top, bottom, left, and right margins, the color of each block of content, font size, etc., and data (for example, for homepage recommendations, data refers to detailed information such as video names and cover images). When storing configuration items, they can be stored in key-value pairs based on the attribute information of the webpage configuration item, such as page identifier and type.
[0070] When identifying target content, it can be determined based on the categories of content displayed on the current interface, thereby identifying whether there is content that needs to be displayed in the webpage view, for example, referring to... Figure 3As shown, there is a button at the bottom of the application's homepage. The content associated with this button is displayed in a webpage view. For example, when the button is clicked, a dialog box will open, which will be displayed in a webpage view.
[0071] It is understood that those skilled in the art can adjust and select the above-mentioned webpage configuration items according to the needs of webpage rendering, and will not be elaborated further here.
[0072] S203. If a webpage configuration item exists and is within the validity period of the current webpage version, then when the target content is selected for display, the webpage configuration item will be assigned to the page rendering instance for use, and the page will be updated.
[0073] Specifically, when a user clicks on a webpage view to view it, and the database retrieves a matching configuration item, it is necessary to consider whether the configuration item is within its validity period, because the content of the webpage may change due to version updates.
[0074] When the configuration item retrieved from the database is within its validity period, it can be assigned to the page rendering instance to generate and render the page on the webpage view after the target display content is selected by the user.
[0075] S204. If no webpage configuration item exists or the webpage configuration item is not within the validity period of the current webpage version, the webpage configuration item for the target content to be displayed is downloaded. When the target content to be displayed is selected for display, the downloaded new webpage configuration item is allocated to the page rendering instance for use, and the page is updated.
[0076] Specifically, if the corresponding webpage configuration item is not found in the database, or if the webpage configuration item is not within its validity period, the downloader can be called to download the configuration item from the corresponding address and update the database with the downloaded configuration item. In this way, when the user selects the target content to be displayed, the configuration item can be directly obtained from the database, thereby greatly reducing the time for dynamically downloading configuration items and further improving the page rendering speed.
[0077] This page update method sets up only one page rendering instance in each application and does not destroy this instance until the application stops running. The instance can be directly invoked for page rendering, eliminating the frequent creation and destruction of instances and reducing system memory consumption. Furthermore, by downloading the webpage configuration items required for page rendering in advance before the page rendering instance runs, the step of dynamically downloading webpage configuration items during page rendering is eliminated, further reducing memory consumption and improving rendering efficiency. By ensuring that the same page rendering instance is always running, configuration information can be directly retrieved from the cached database when updating the page, eliminating the process of creating and destroying page rendering instances. This effectively reduces the download and update time of the page rendering instance, further improving page rendering speed and enhancing user experience.
[0078] In another embodiment, to enable the display of dynamic content in a webpage view and improve the ability of the webpage view to play action effects, the page update method further includes the following steps:
[0079] In response to page content switching operations in the webpage view, the parameters of the switched page are passed to the native code of the operating system based on the target message passing mechanism for rendering the page content after the switch. The target message passing mechanism is the message passing function carried by the operating system where the application resides.
[0080] For details, please refer to Figure 4 As shown, a webpage view may contain multiple interactive options, typically allowing clicks, long presses, and drags, each with different effects. For example, some blog feeds (information streams, a content distribution mechanism that dynamically displays user-subscribed or system-recommended content) have numerous clickable elements (username, avatar, highlighted text, a row of interactive buttons at the bottom, etc.), each with different results (some open a new page, some display a pop-up). Since the interactive logic in a webpage relies on a JavaScript engine, which runs on a single thread, frequent clicks and drags in these highly interactive scenarios trigger extensive engine calculations, easily blocking the main thread and causing animation frame drops and delayed feedback. Especially on mobile clients, using webpage views for interaction in these scenarios is clearly unsuitable and will directly impact the user experience.
[0081] Native code, on the other hand, is the built-in functional code of the terminal's operating system. It enables various display effects, has undergone system optimization, and boasts higher execution efficiency, especially in the handling of touch events (such as long-press recognition, swipe gestures, and pressure sensing), which has been deeply optimized. Furthermore, these functions are specifically developed for the terminal, ensuring efficiency. Compared to using H5 compatibility for rendering motion effects, it offers significantly higher rendering efficiency. When performing page operations such as page transition animations (used for page switching) and interactive animations (e.g., clicking a button), JS_Bridge passes page parameters to the native code in the terminal responsible for implementing the corresponding functions, ensuring smooth animation. JS_Bridge acts as a communication bridge connecting the webpage's JavaScript and native applications (such as Android / iOS), allowing both to call interfaces and exchange data.
[0082] The parameters here can be determined based on the content of the page you are redirected to. For example, to open someone's "personal homepage," you only need to pass that person's user ID (similar to an ID card number, assigned by the backend of various application services to uniquely identify a user). If you want to reply to someone's Moments post, you need to pass parameters such as "original Moments post data," "newly posted content," and "public status."
[0083] In another embodiment, to avoid the initialization process of the page rendering instance affecting application startup and ensure smooth application startup, the initialization process of the page rendering instance is performed after application initialization is complete. Application initialization mainly involves loading the startup page, which is generally the application's main interface. To determine whether the application initialization process is complete, the loading progress of the target page's content after application startup can be monitored, and an initialization completion signal can be generated once the target page's content is loaded. The application startup status can be monitored using the state monitoring methods provided by the operating system to determine whether the application initialization process is complete. The target page is generally the first page displayed after application startup, i.e., the homepage.
[0084] The initialization of a page rendering instance mainly involves allocating instance storage space in the operating system, obtaining the page rendering instance's code through a code download interface, and storing this code in the instance storage space. During the allocation of physical storage space, the terminal's built-in memory allocation strategy can be used to allocate local memory according to the required size of the instance storage space.
[0085] In some embodiments, to achieve precise management of each webpage configuration item in the database and provide a reliable reference for matching subsequent pages and configuration items, the webpage configuration lookup information may include: page index value and version identifier. Therefore, determining whether a webpage configuration item matching the target display content exists in the application's cache database based on the webpage configuration lookup information of the target display content may specifically include:
[0086] Step 101: Based on the page index value, determine whether the target webpage configuration item associated with the page index value exists in the cache database. The page index value is an identifier that represents the webpage configuration.
[0087] Step 102: When it is determined that a target webpage configuration item exists, determine whether the target version identifier of the target webpage configuration item is consistent with the version identifier.
[0088] Step 103: If the target version identifier matches the version identifier, then the target webpage configuration item is used as the webpage configuration item that is compatible with the target display content.
[0089] Specifically, the page index value can be a field that represents the target content type of a webpage configuration item. First, the page index value is used to distinguish whether a configuration item belongs to the settings page, the homepage recommendation, or the personal homepage, etc.
[0090] As features are developed, the functionality and display style of each page version may differ. The version number identifies which webpage configuration option is used by the current application version. Additionally, in certain special scenarios, some page functions are only displayed on specific holidays or at specific times; the expiration time controls whether the configuration option is still usable and whether a new version needs to be downloaded.
[0091] When retrieving configuration items from the database, the system uses the page index value to determine if a target configuration item exists in the database that matches the page index value. Upon finding the target configuration item, it checks if the target version identifier matches the version identifier and then determines the validity period of the configuration item.
[0092] It is understandable that, in order to accurately match the data required by different pages and different application versions, those skilled in the art can adjust and select the dimensions of the above attribute information as needed, which will not be elaborated here.
[0093] Furthermore, based on the above process of searching for webpage configuration items, to facilitate quick and easy determination of validity and improve the speed and accuracy of the determination, the process of determining whether a webpage configuration item is within its validity period can specifically include:
[0094] Determine whether the lookup time for the webpage configuration item in the cache database is within the target valid time period, which is the version validity period of the current webpage version.
[0095] If the search time is within the target valid time period, then the webpage configuration item is confirmed to be valid.
[0096] Specifically, as described in the above embodiment, if the version of a webpage configuration item is valid during certain holidays or festivals, but the current configuration item lookup time obtained from the database is no longer within that valid period, it can be determined that the configuration item is no longer valid and can no longer be used. In this case, a download will be triggered from the corresponding download address.
[0097] Correspondingly, the cache database used to store data can be created synchronously with the storage database used by the application. When initializing the application's page rendering instance, the application's cache folder can be created in the operating system, and page cache files can be created in the cache folder as a cache database. As the application runs, the corresponding web page configuration items can be directly searched, improving the accuracy of rendering.
[0098] The above describes a page update method provided by an embodiment of this application. The following will describe the apparatus for performing the above page update method.
[0099] Please see Figure 5 , Figure 5 This is a schematic diagram of a page update device provided in an embodiment of this application. Figure 5 As shown, the page updating device includes:
[0100] The instance initialization module 501 is used to initialize the application's page rendering instance in response to the application initialization signal, and will not perform the destruction operation of the page rendering instance and the creation operation after the destruction operation during the application runtime.
[0101] The configuration item determination module 502 is used to determine whether there is a web page configuration item in the application's cache database that matches the target display content if the target display content exists in the current display interface of the application. The target display content is the content displayed using a web page view, and the web page configuration lookup information represents the storage location of the web page configuration item of the target display content in the cache database.
[0102] The configuration item matching module 503 is used to, if a webpage configuration item exists and is within the validity period of the current webpage version, allocate the webpage configuration item to the page rendering instance and update the page when the target content is selected for display; and,
[0103] The configuration item update module 504 is used to download the web page configuration items for the target display content if no web page configuration items exist or if the web page configuration items are not within the validity period of the current web page version. When the target display content is selected for display, the downloaded new web page configuration items are allocated to the page rendering instance for use to update the page.
[0104] In one possible implementation, it also includes: a local rendering module, which responds to page content switching operations in the web page view, and renders the page content after switching by passing the switched page parameters to the operating system's native code based on a target message passing mechanism, wherein the target message passing mechanism is a message passing function carried by the operating system where the application resides.
[0105] In one possible implementation, the process by which instance initialization module 501 initializes the application's page rendering instance includes:
[0106] Allocate instance storage space in the operating system, obtain the code of the page rendering instance, and store the code in the instance storage space.
[0107] In one possible implementation, the webpage configuration lookup information includes: a page index value and a version identifier. The configuration item determination module 502 determines whether a webpage configuration item matching the target display content exists in the application's cache database based on the webpage configuration lookup information of the target display content, including:
[0108] Based on the page index value, determine whether the target webpage configuration item associated with the page index value exists in the cache database. The page index value is an identifier that represents the webpage configuration.
[0109] When it is determined that a target webpage configuration item exists, it is determined whether the target version identifier of the target webpage configuration item is consistent with the version identifier;
[0110] If the target version identifier and the version identifier are consistent, then the target webpage configuration item will be used as the webpage configuration item that is adapted to the target display content.
[0111] In one possible implementation, the process of determining whether a webpage configuration item is within its validity period in the configuration item matching module 503 includes:
[0112] Determine whether the lookup time for the webpage configuration item in the cache database is within the target valid time period, which is the version validity period of the current webpage version;
[0113] If the search time is within the target valid time period, then the webpage configuration item is confirmed to be valid.
[0114] In one possible implementation, the process of constructing the cache database in configuration item determination module 502 includes:
[0115] When initializing the application's page rendering instance, a cache folder for the application is created in the operating system, and page cache files are created in the cache folder to be used as a cache database.
[0116] This application also provides an electronic device in its embodiments. (See reference...) Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, tablets, desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0117] like Figure 6 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0118] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0119] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the page update methods provided in this application.
[0120] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the page update methods provided in this application.
[0121] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0123] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0124] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A page update method, characterized in that, include: In response to the application initialization signal, the page rendering instance of the application is initialized, and the destruction operation of the page rendering instance and the creation operation after the destruction operation are no longer executed during the application's runtime; If the target content exists in the current display interface of the application, the application's cache database is determined to have a webpage configuration item that matches the target content based on the webpage configuration lookup information of the target content. The target content is content displayed using a webpage view, and the webpage configuration lookup information represents the storage location of the webpage configuration item of the target content in the cache database. If the webpage configuration item exists and the webpage configuration item is within the validity period of the current webpage version, then when the target display content is selected for display, the webpage configuration item is assigned to the page rendering instance for use, and the page is updated. If the webpage configuration item does not exist or is not within the validity period of the current webpage version, the webpage configuration item for the target display content is downloaded so that when the target display content is selected for display, the downloaded new webpage configuration item is allocated to the page rendering instance for use, and the page is updated.
2. The page update method according to claim 1, characterized in that, Also includes: In response to a page content switching operation in the webpage view, the switched page parameters are passed to the native code of the operating system based on a target message passing mechanism for rendering the switched page content. The target message passing mechanism is a message passing function carried in the operating system where the application resides.
3. The page update method according to claim 1, characterized in that, The initialization of the application's page rendering instance includes: Allocate instance storage space in the operating system, obtain the code of the page rendering instance, and store the code in the instance storage space.
4. The page update method according to claim 1, characterized in that, The webpage configuration lookup information includes: page index value and version identifier. The process of determining whether a webpage configuration item matching the target display content exists in the application's cache database based on the webpage configuration lookup information of the target display content includes: Based on the page index value, determine whether the target webpage configuration item associated with the page index value exists in the cache database, wherein the page index value is an identifier representing the webpage configuration; When it is determined that the target webpage configuration item exists, it is determined whether the target version identifier of the target webpage configuration item is consistent with the version identifier; If the target version identifier and the version identifier are consistent, then the target webpage configuration item is used as the webpage configuration item that is adapted to the target display content.
5. The page update method according to any one of claims 1 to 4, characterized in that, The process for determining whether the webpage configuration item is within the validity period includes: Determine whether the search time for the webpage configuration item in the cache database is within the target valid time period, where the target valid time period is the version valid time period of the current webpage version; If the search time is within the target valid time period, then the webpage configuration item is determined to be within the validity period.
6. The page update method according to claim 1, characterized in that, The process of building the cache database includes: When initializing the page rendering instance of the application, a cache folder for the application is created in the operating system, and page cache files are created in the cache folder for use as the cache database.
7. A page updating device, characterized in that, include: An instance initialization module is used to initialize the page rendering instance of the application in response to the application initialization signal, and will not execute the destruction operation of the page rendering instance and the creation operation after the destruction operation during the application's operation. The configuration item determination module is used to determine whether there is a web page configuration item that matches the target display content in the application's cache database based on the web page configuration lookup information of the target display content if the target display content exists in the current display interface of the application. The target display content is content displayed using a web page view, and the web page configuration lookup information represents the storage location of the web page configuration item of the target display content in the cache database. The configuration item matching module is configured to, if the webpage configuration item exists and is within the validity period of the current webpage version, allocate the webpage configuration item to the page rendering instance when the target display content is selected for display, thereby updating the page; and, The configuration item update module is used to download the webpage configuration item for the target display content if the webpage configuration item does not exist or the webpage configuration item is not within the validity period of the current webpage version. When the target display content is selected for display, the downloaded new webpage configuration item is allocated to the page rendering instance for use, thereby updating the page.
8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the page update method as described in any one of claims 1 to 6.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to enable the electronic device to implement the page update method as described in any one of claims 1 to 6.
10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the page update method as described in any one of claims 1 to 6.