Page data loading method and device, electronic equipment and nonvolatile storage medium

By determining the page version number and marking expired data, the problem of cached data failing to be updated to the latest data due to the chaotic management of browser page data update mechanisms is solved, enabling fast loading and access to page data.

CN115048600BActive Publication Date: 2025-12-12SUPCON TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210751728.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2025-12-12
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

In industrial monitoring scenarios, browser page data loading is slow and easily affected by network quality. Existing technologies have chaotic page data update mechanisms, resulting in cached data failing to be updated to the latest data.

Method used

By determining the first and second version numbers of the target page, marking expired data and updating page data tags, the latest data is ensured to be loaded. This update mechanism, which marks page tag information, improves the speed of page data access.

Benefits of technology

It solves the problem of slow browser page loading and enables timely updates and fast access to page data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048600B_ABST
    Figure CN115048600B_ABST
Patent Text Reader

Abstract

The application discloses a page data loading method and device, electronic equipment and a nonvolatile storage medium. The method comprises the following steps: determining a first version number and a second version number corresponding to a target page in a target page set; marking a first label for page data stored in a target device in the case that the first version number and the second version number are inconsistent, wherein the first label is used to indicate that the corresponding page data is expired; determining to-be-loaded page data and corresponding label information stored in the target device, and determining target to-be-loaded page data, wherein the label information comprises the first label and a second label, and the second label is used to indicate that the corresponding page data is not expired; and loading the target page according to the target to-be-loaded page data. The application solves the technical problem of slow browser page loading caused by the fact that the cache data cannot be updated to the latest data due to the chaotic management of the current browser page data update mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer software, in particular to a page data loading method and device, electronic equipment and nonvolatile storage medium. BACKGROUND

[0002] In an industrial monitoring scenario, when a browser-based monitoring client is used to open and page a monitoring page, the transmission process of page data request and response is slow in the process of the browser sending instructions to the backend to request data, and is also easily affected by network quality, resulting in long page data loading time, low page browsing efficiency and poor experience.

[0003] At present, most of the page data loading of the browser in the related art is cached through the local disk, and the page to be updated is determined based on the comparison of the page file modification time or through the configuration file. However, the update of the page data based on the time or the configuration file has the risk of being tampered with, causing the management of the page data update mechanism to be chaotic, resulting in the cached data being unable to be updated to the latest data, and causing the loading of the latest page data to fail and other problems.

[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY

[0005] The embodiments of the present application provide a page data loading method and device, electronic equipment and nonvolatile storage medium, to at least solve the technical problem of slow browser page loading caused by the fact that most of the browser page data update mechanism is currently managed chaotically, resulting in the cached data being unable to be updated to the latest data.

[0006] According to an aspect of the embodiments of the present application, a page data loading method is provided, comprising: determining a first version number and a second version number corresponding to a target page in a target page set, wherein the first target page data corresponding to the first version number is page data stored locally in a target device, the second target page data corresponding to the second version number is page data updated at a first target time, the first target time is a page data update time closest to a second target time, and the second target time is a time at which the target device receives a page display instruction; marking the page data stored in the target device with a first label in a case where the first version number and the second version number are inconsistent, wherein the first label is used to indicate that the corresponding page data is expired; determining target to-be-loaded page data and corresponding label information of the target to-be-loaded page data stored in the target device, wherein the to-be-loaded page data is page data corresponding to any target page in the target page set, the target to-be-loaded page data is to-be-loaded page data stored in the target device and marked with a second label, and the label information comprises the first label and the second label, and the second label is used to indicate that the corresponding page data is not expired; and loading a target interface according to the target to-be-loaded page data.

[0007] Optionally, the determining of the target to-be-loaded page data and the corresponding label information of the target to-be-loaded page data comprises: judging whether the target device contains the to-be-loaded page data and the to-be-loaded page data is marked with the second label; in a case where the target device contains the to-be-loaded page data and the to-be-loaded page data is marked with the second label, determining that the to-be-loaded page data in the target device is the target to-be-loaded page data; and in a case where the target device does not contain the to-be-loaded page data or the target device contains the to-be-loaded page data but the to-be-loaded page data is marked with the first label, acquiring the to-be-loaded page data and determining that the to-be-loaded page data is the target to-be-loaded page data.

[0008] Optionally, the acquiring of the to-be-loaded page data and the determining of the to-be-loaded page data as the target to-be-loaded page data in a case where the target device does not contain the to-be-loaded page data or the target device contains the to-be-loaded page data but the to-be-loaded page data is marked with the first label comprises: in a case where the target device does not contain the to-be-loaded page data, acquiring the to-be-loaded page data into the target device and marking the to-be-loaded page data with the second label, and determining that the to-be-loaded page data is the target to-be-loaded page data; and in a case where the target device contains the to-be-loaded page data but the to-be-loaded page data is marked with the first label, acquiring a first label and a second label of the to-be-loaded page data, wherein the first label is a unique identifier corresponding to the page data acquired by the target device, and the second label is a unique identifier corresponding to the page data updated at the first target time; and determining the target to-be-loaded page data according to the first label and the second label of the to-be-loaded page data.

[0009] Optionally, the target page data to be loaded is determined according to the first label and the second label of the page data to be loaded, and the target page data to be loaded is determined as follows: in a case where the first label is consistent with the second label, the first label of the page data stored in the target device is replaced by the second label, and the target page data to be loaded is determined as the page data to be loaded; and in a case where the first label is inconsistent with the second label, the page data to be loaded is obtained, updated to the target device, marked with the second label, and determined as the target page data to be loaded.

[0010] Optionally, the target interface is loaded according to the target page data to be loaded, and the method further comprises: detecting whether the target pre-cached page data set exists in the target device and whether the pre-cached page data in the target pre-cached page data set is marked with the second label, wherein the pre-cached page data in the target pre-cached page data set is the first pre-set number of page data adjacent to the target page data to be loaded in the target device; and in a case where the target pre-cached page data set does not exist in the target device, obtaining at least one pre-cached page data, updating the at least one pre-cached page data to the target device, and marking the at least one pre-cached page data with the second label.

[0011] Optionally, in a case where the target pre-cached page data set does not exist in the target device, the at least one pre-cached page data is obtained as follows: obtaining the first label and the second label of all the pre-cached page data in the target device; determining a candidate pre-cached page data set in the target device, wherein the pre-cached page data in the candidate pre-cached page data set is the pre-cached page data with the consistent first label and second label; and obtaining the pre-cached page data in the target pre-cached page data set except the candidate pre-cached page data set to the target device and marking the pre-cached page data with the second label.

[0012] Optionally, in a case where the first version number is inconsistent with the second version number, the page data stored in the target device is marked with the first label, and the method further comprises: updating the first version number in the target device to the second version number; and obtaining the second pre-set number of page data to the target device and marking the page data with the second label.

[0013] According to another aspect of the embodiments of the present application, a page data loading apparatus is also provided, which comprises: a version judging module, configured to determine a first version number and a second version number corresponding to a target page in a target page set, wherein the first target page data corresponding to the first version number is page data stored locally in a target device, the second target page data corresponding to the second version number is page data updated at a first target time, the first target time is a page data update time closest to a second target time, and the second target time is a time at which the target device receives a page display instruction; a label marking module, configured to mark the page data stored in the target device with a first label in a case where the first version number and the second version number are inconsistent, wherein the first label is used to indicate that the corresponding page data is expired; a data determining module, configured to determine target to-be-loaded page data and label information corresponding thereto stored in the target device, and determine target to-be-loaded page data, wherein the to-be-loaded page data is page data corresponding to any target page in the target page set, the target to-be-loaded page data is to-be-loaded page data stored in the target device and marked with a second label, and the label information comprises the first label and the second label, and the second label is used to indicate that the corresponding page data is not expired; and a page drawing module, configured to load a target interface according to the target to-be-loaded page data.

[0014] According to still another aspect of the embodiments of the present application, an electronic device is also provided, which comprises a processor configured to run a program, wherein the program is configured to execute the page data loading method when running.

[0015] According to yet another aspect of the embodiments of the present application, a nonvolatile storage medium is also provided, which comprises a stored program, wherein the program is configured to control a device in which the nonvolatile storage medium is located to execute the page data loading method when running.

[0016] In the embodiment of the present application, the first version number corresponding to the target page in the target page set and the second version number are determined, wherein the first target page data corresponding to the first version number is the page data stored locally in the target device, the second target page data corresponding to the second version number is the page data updated at the first target time, the first target time is the page data update time closest to the second target time, and the second target time is the time when the target device receives the page display instruction; in the case where the first version number and the second version number are inconsistent, the page data stored in the target device is marked with a first label, wherein the first label is used to indicate that the corresponding page data has expired; the target device stores the target page data to be loaded and the corresponding label information, and the target page data to be loaded is determined, wherein the target page data to be loaded is the page data corresponding to any target page in the target page set, the target page data to be loaded is the page data stored in the target device and marked with a second label, and the label information includes the first label and the second label, and the second label is used to indicate that the corresponding page data is not expired; according to the target page data to be loaded, the target interface is loaded in the mode, and through the update mechanism of marking the page label information, the purpose of improving the page data access speed is achieved, thereby solving the technical problem of slow browser page loading caused by the fact that the current browser page data update mechanism is in disorder and the cache data cannot be updated to the latest data. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:

[0018] Figure 1 is a schematic diagram of a page data loading method provided by an embodiment of the present application;

[0019] Figure 2 is a schematic diagram of a page data loading method in a starting process provided by an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a target page data loading method provided by an embodiment of the present application;

[0021] Figure 4 is a structural schematic diagram of a page data loading device provided by an embodiment of the present application;

[0022] Figure 5 is a hardware structural block diagram of a computer terminal (or electronic device) for implementing a page data loading method provided by an embodiment of the present application. DETAILED DESCRIPTION

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

[0024] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described accompanying drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units need not be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0025] In order to facilitate those skilled in the art to better understand the embodiments of the present application, some technical terms or nouns involved in the embodiments of the present application are explained as follows:

[0026] Indexdb: Cache database of the browser, used to speed up the speed of accessing data of the browser, is a disk file, supports permanent serialization.

[0027] Hash value (hash value or hash value): is to transform the input of arbitrary length into fixed length output through hash algorithm, and the output is hash value. Simply put, it is a kind of message digest that compresses any length message to a certain fixed length message.

[0028] Embodiment 1

[0029] According to the embodiments of the present application, a method for loading page data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order from that shown herein.

[0030] Figure 1 is a schematic diagram of a method for loading page data according to the embodiments of the present application, as shown in Figure 1 The method comprises the following steps:

[0031] In step S102, the first version number and the second version number corresponding to the target page in the target page set are determined, wherein the first target page data corresponding to the first version number is the page data stored locally in the target device, and the second target page data corresponding to the second version number is the page data updated at the first target time, the first target time is the page data update time closest to the second target time, and the second target time is the time when the target device receives the page display instruction.

[0032] In the embodiment, the first version number and the second version number are version numbers corresponding to device configuration data in the industrial control system, and the first version number is stored locally in the target device, and the second version number is obtained from the backend server.

[0033] In the embodiment, in the case where the first version number does not exist in the browser cache, it is determined that the first version number is inconsistent with the second version number.

[0034] In step S104, in the case where the first version number is inconsistent with the second version number, the page data stored in the target device is marked with the first label, wherein the first label is used to indicate that the corresponding page data is expired.

[0035] In some embodiments of the present application, after the page data stored in the target device is marked with the first label in the case where the first version number is inconsistent with the second version number, the first version number in the target device is updated to the second version number, and the second preset number of page data is obtained to the target device and marked with the second label.

[0036] Specifically, in the case where the version numbers are inconsistent, the configuration version information (i.e., the first version number) in the current target device is updated first, then all the page data in the browser cache (indexdb) is marked with the "expired" label (i.e., the first label), and N copies of page data are requested from the backend server, all the N copies of page data obtained by the request are marked with the "not expired" label (i.e., the second label) and updated to the browser cache, and then the subsequent rendering logic of the monitoring page is executed, wherein N is an arbitrary positive integer set by the user.

[0037] In step S106, the target page data to be loaded and the corresponding label information stored in the target device are determined, and the target page data to be loaded is determined, wherein the page data to be loaded is the page data corresponding to any target page in the target page set, the target page data to be loaded is the page data to be loaded stored in the target device and marked with the second label, and the label information includes the first label and the second label, and the second label is used to indicate that the corresponding page data is not expired.

[0038] In some embodiments of the present application, the target page data stored in the target device and the corresponding label information thereof are determined, and the determination of the target page data includes: determining whether the target device contains the page data to be loaded and whether the page data to be loaded is marked with the second label; in the case that the target device contains the page data to be loaded and the page data to be loaded is marked with the second label, determining that the page data to be loaded in the target device is the target page data to be loaded; in the case that the target device does not contain the page data to be loaded or the target device contains the page data to be loaded but is marked with the first label, obtaining the page data to be loaded and determining that the page data to be loaded is the target page data to be loaded.

[0039] In some embodiments of the present application, in the case that the target device does not contain the page data to be loaded or the target device contains the page data to be loaded but is marked with the first label, obtaining the page data to be loaded and determining that the page data to be loaded is the target page data to be loaded includes: in the case that the target device does not contain the page data to be loaded, obtaining the page data to be loaded into the target device and marking the second label thereon, and determining that the page data to be loaded is the target page data to be loaded; in the case that the target device contains the page data to be loaded but is marked with the first label, obtaining the first label and the second label of the page data to be loaded, wherein the first label is a unique identifier corresponding to the page data obtained in the target device, and the second label is a unique identifier corresponding to the page data updated at the first target time; determining the target page data to be loaded according to the first label and the second label of the page data to be loaded.

[0040] In some embodiments of the present application, determining the target page data to be loaded according to the first label and the second label of the page data to be loaded includes: in the case that the first label and the second label are consistent, replacing the first label of the page data to be loaded stored in the target device with the second label, and determining that the page data to be loaded is the target page data to be loaded; in the case that the first label and the second label are inconsistent, obtaining the page data to be loaded, updating it into the target device and marking the second label, and determining that the page data to be loaded is the target page data to be loaded.

[0041] In the present embodiment, the page data in the target device is stored in the browser cache (indexdb), the first label is an "expired" label, the second label is an "unexpired" label, the first label is a Hash value corresponding to the page data obtained in the browser cache (indexdb), the second label is a Hash value corresponding to the page data updated at the first target time obtained from the backend server, and the page data to be loaded is the page data corresponding to the page requested by the target user to be displayed by the target device.

[0042] In step S108, the target interface is loaded according to the target page data to be loaded.

[0043] In some embodiments of the present application, after loading the target interface according to the target page data to be loaded, the method further comprises: detecting whether the target pre-cached page data set exists in the target device and whether the pre-cached page data in the target pre-cached page data set are marked with the second label, wherein the pre-cached page data in the target pre-cached page data set are the first pre-set number of page data adjacent to the target page data to be loaded in the directory sequence number in the target device; and in the case that the target pre-cached page data set does not exist in the target device, obtaining at least one pre-cached page data, updating to the target device and marking the second label.

[0044] In some embodiments of the present application, in the case that the target pre-cached page data set does not exist in the target device, obtaining at least one pre-cached page data comprises: obtaining the first label and the second label of all the pre-cached page data in the target device; determining the candidate pre-cached page data set in the target device, wherein the pre-cached page data in the candidate pre-cached page data set are the pre-cached page data with the same first label and second label; and obtaining the pre-cached page data in the target pre-cached page data set except the candidate pre-cached page data set to the target device and marking the second label.

[0045] Specifically, the pre-cached page data are the first M page data and the last M page data adjacent to the target page data to be loaded in the directory sequence number in the browser cache, and after the target page is loaded, it is detected whether the first M page data and the last M page data adjacent to the target page data to be loaded in the directory sequence number in the browser cache are in the "not expired" state, and if not or do not exist, the page data is requested to the background, inserted into the cache and marked with the "not expired" label, wherein M is a pre-set arbitrary positive integer.

[0046] In this embodiment, if the user does not open the page in sequence, but directly jumps to any page to load and open, there is a one-time update of 2M page data.

[0047] In addition, in this embodiment, in the case of receiving the reset page command, all the page data and the first version number in the target device are emptied, and the page data loading method shown in Figure 1 is re-executed.

[0048] In this embodiment, a part of page data is pre-loaded into the local browser cache at the program startup time, which is faster than the on-demand loading mode. The loaded page data is directly cached in the indexdb cache of the browser itself, which is faster in storage and reading based on the disk. The page data adopts the flag recording mode, and the Hash value of the comparison file is used to judge whether the page is updated, which prevents the risk of file tampering in the middle.

[0049] The page data loading method in steps S102 to S104 of the embodiment of the present application is further described below.

[0050] Figure 2 is a schematic diagram of a method flow of loading page data in a startup process according to an embodiment of the present application, as shown in the figure, comprising the following steps: Figure 2

[0051] S202, starting a browser client, requesting a backend service to obtain a current configuration version (i.e., a second version number) and comparing the current configuration version with a locally stored configuration version (i.e., a first version number), if the locally stored configuration version does not exist, regarding the configuration version information as inconsistent.

[0052] S204, if the version information is inconsistent after comparison, updating the locally stored configuration version information first, and then marking all page data in the browser cache with an "expired" tag.

[0053] S206, requesting N copies of page data from the backend service, marking all the N copies of page data obtained by request with a "not expired" tag and updating the cache (indexdb), and then executing a subsequent rendering logic of a monitoring page. If the version information is consistent, directly executing the subsequent rendering logic of the monitoring page.

[0054] The page data loading method in steps S106 to S108 of the embodiment of the present application is further described below.

[0055] Figure 3 is a schematic diagram of a method flow of loading target page data according to an embodiment of the present application, as shown in the figure, comprising the following steps: Figure 3

[0056] S302, when loading the i-th page data, wherein i is a directory serial number in the browser cache, if not in the cache, actively requesting page data from the backend, updating the cache and marking with a not expired tag;

[0057] S304, if the page data is in the cache and not expired, using the page data in the cache to draw a picture;

[0058] S306, if expired in the cache, requesting a hash value of the page from the backend, comparing whether the hash value is consistent with the hash of the page in the cache, if consistent, changing the "expired" tag of the cache to "not expired", if inconsistent, actively requesting page data from the backend, updating the cache and marking with a "not expired" tag.

[0059] ​​In the embodiment, after the i-th sub-page is drawn, it is detected whether the cached page corresponds to the [i-M, i+M] sub-page data before and after the page is expired, if not or does not exist, the background is requested to the page data, the cache is inserted and the "not expired" label is marked. In an extreme scenario, it may be necessary to update 2M sub-pages at a time, for example, the user does not open the page in the order of the directory serial number, but directly jumps to the page whose directory serial number is out of the range of [i-M, i+M], but if it is a sequential page loading page, actually only one sub-page data needs to be updated each time.

[0060] Through the above steps, the updating mechanism of the page label information can be realized, and the purpose of improving the page data access speed is achieved, thereby solving the technical problem of slow browser page loading caused by the fact that the current browser page data updating mechanism is disordered and the cache data cannot be updated to the latest data.

[0061] Embodiment 2

[0062] According to the embodiment of the application, an embodiment of a page data loading device is also provided. Figure 4 It is a structural schematic diagram of a page data loading device provided by the embodiment of the application. As shown in the figure, Figure 4 The device comprises:

[0063] A version determining module 40 is configured to determine a first version number and a second version number corresponding to a target page in a target page set, wherein the first target page data corresponding to the first version number is the page data stored in the local of the target device, and the second target page data corresponding to the second version number is the page data updated at a first target time, the first target time is the page data updating time closest to the second target time, and the second target time is the time when the target device receives the page display instruction;

[0064] A label marking module 42 is configured to mark the first label to the page data stored in the target device in the case that the first version number and the second version number are inconsistent, wherein the first label is used to indicate that the corresponding page data is expired;

[0065] A data determining module 44 is configured to determine the target page data to be loaded and the corresponding label information stored in the target device, and determine the target target page data to be loaded, wherein the target page data to be loaded is the page data corresponding to any target page in the target page set, the target target page data to be loaded is the target page data to be loaded stored in the target device and marked with the second label, and the label information comprises the first label and the second label, and the second label is used to indicate that the corresponding page data is not expired;

[0066] A page drawing module 46 is configured to load the target interface according to the target target page data to be loaded.

[0067] It should be noted that the page data loading apparatus provided in the embodiment can be used to execute the page data loading method shown in the embodiment, and thus the related explanations of the page data loading method are also applicable to the embodiment, and will not be described herein. Figure 1 It should be noted that the page data loading apparatus provided in the embodiment can be used to execute the page data loading method shown in the embodiment, and thus the related explanations of the page data loading method are also applicable to the embodiment, and will not be described herein.

[0068] According to the embodiment of the present application, an embodiment of a computer terminal for implementing the method for loading page data is further provided. Figure 5 is a hardware structure block diagram of a computer terminal (or electronic device) for implementing the method for loading page data according to the embodiment of the present application. As shown in Figure 5 , the computer terminal 50 (or electronic device 50) can include one or more processors (the processor can include but is not limited to a microprocessor MCU or a programmable logic device FPGA processing device, etc.), a memory 504 for storing data, and a transmission module 506 for communication function. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 5 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 50 can include more or less components than Figure 5 , or have a different configuration from Figure 5 .

[0069] It should be noted that the one or more processors and / or other data processing circuits described above can be referred to as "data processing circuits" herein. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any combination thereof. In addition, the data processing circuit can be a single independent processing module, or any one of the other elements combined into the computer terminal 50 (or electronic device) in whole or in part. As referred to in the embodiments of the present application, the data processing circuit serves as a processor control (for example, selection of a variable resistance terminal path connected to an interface).

[0070] The memory 504 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the page data loading method in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 504, i.e. implements the page data loading method described above. The memory 504 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 504 can further include a memory remotely arranged with respect to the processor, which can be connected to the computer terminal 50 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0071] The transmission module 506 is used to receive or send data via a network. Specific examples of the above-mentioned network can include a wireless network provided by a communication provider of the computer terminal 50. In one example, the transmission device 506 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 506 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.

[0072] The display can be, for example, a touch screen type liquid crystal display (LCD), which can enable a user to interact with the user interface of the computer terminal 50 (or electronic device).

[0073] It should be noted that, in some optional embodiments, the above-mentioned Figure 5 The computer device (or electronic device) shown can include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that, Figure 5 is only one example of a particular implementation and is intended to illustrate the types of components that can exist in the above-mentioned computer device (or electronic device).

[0074] It should be noted that, Figure 5 The electronic device for page data loading shown is used to execute Figure 1 The method for page data loading shown, so the relevant explanations in the above-mentioned method for page data loading also apply to the electronic device for page data loading, which will not be described here.

[0075] According to the embodiment of the present application, an embodiment of a nonvolatile storage medium is also provided, which comprises a stored program. When the program is executed, the device in which the nonvolatile storage medium is located performs the following method for loading page data: determining a first version number and a second version number corresponding to a target page in a target page set, wherein the first target page data corresponding to the first version number is page data stored locally in the target device, the second target page data corresponding to the second version number is page data updated at a first target time, the first target time is the closest page data update time to a second target time, and the second target time is the time at which the target device receives a page display instruction; in the case where the first version number and the second version number are inconsistent, marking the page data stored in the target device with a first label, wherein the first label is used to indicate that the corresponding page data is expired; determining the to-be-loaded page data stored in the target device and the corresponding label information, and determining the target to-be-loaded page data, wherein the to-be-loaded page data is the page data corresponding to any target page in the target page set, and the target to-be-loaded page data is the to-be-loaded page data stored in the target device and marked with a second label, and the label information comprises the first label and the second label, and the second label is used to indicate that the corresponding page data is not expired; and loading the target interface according to the target to-be-loaded page data.

[0076] The above sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0077] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0078] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the embodiment described above is only illustrative, and for example, the division of units can be a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0079] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0080] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0081] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions 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 causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0082] The above is only the preferred embodiment of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A method of loading page data, characterized by, The method comprises the following steps: determining a first version number and a second version number corresponding to a target page in a target page set, wherein the first version number corresponds to first target page data stored locally in a target device, the target device locally stores multiple copies of page data, the second version number corresponds to second target page data updated at a first target time, the first target time is the closest page data update time to a second target time, and the second target time is the time when the target device receives a page display instruction; in the case where the first version number and the second version number are inconsistent, marking the page data stored in the target device with a first label, wherein the first label is used to indicate that the corresponding page data has expired; determining target page data to be loaded and its corresponding label information stored in the target device, and determining target target page data to be loaded, wherein the page data to be loaded is the page data corresponding to any target page in the target page set, the page data to be loaded is the page data corresponding to the page displayed by the target device requested by a target user, the target target page data to be loaded is the page data to be loaded stored in the target device and marked with a second label, and the label information comprises the first label and the second label, and the second label is used to indicate that the corresponding page data has not expired; loading a target interface according to the target target page data to be loaded; wherein determining the target target page data to be loaded comprises: in the case where the target device contains the page data to be loaded but is marked with the first label, obtaining a first label and a second label of the page data to be loaded, wherein the first label is a unique identifier corresponding to the page data to be loaded obtained in the target device, the first label is a hash value corresponding to the page data obtained in the target device, the second label is a unique identifier corresponding to the page data to be loaded updated at the first target time, and the second label is a hash value corresponding to the page data updated at the first target time obtained from a backend server; in the case where the first label and the second label are consistent, replacing the first label of the page data to be loaded stored in the target device with the second label, and determining that the page data to be loaded is the target target page data to be loaded.

2. The page data loading method of claim 1, wherein, Determining the target target page data to be loaded and its corresponding label information stored in the target device comprises: judging whether the target device contains the page data to be loaded and the page data to be loaded is marked with the second label; in the case where the target device contains the page data to be loaded and the page data to be loaded is marked with the second label, determining that the page data to be loaded in the target device is the target target page data to be loaded; in the case where the target device does not contain the page data to be loaded or the target device contains the page data to be loaded but is marked with the first label, obtaining the page data to be loaded, and determining that the page data to be loaded is the target target page data to be loaded.

3. The page data loading method of claim 2, wherein, In the case that the target device does not contain the to-be-loaded page data or the target device contains the to-be-loaded page data but is marked with the first label, the to-be-loaded page data is acquired, and it is determined that the to-be-loaded page data is the target to-be-loaded page data, including: In the case that the target device does not contain the to-be-loaded page data, the to-be-loaded page data is acquired and updated into the target device and marked with the second label, and it is determined that the to-be-loaded page data is the target to-be-loaded page data; In the case that the target device contains the to-be-loaded page data but is marked with the first label, the target to-be-loaded page data is determined according to the first label and the second label of the to-be-loaded page data.

4. The page data loading method of claim 3, wherein, The target to-be-loaded page data is determined according to the first label and the second label of the to-be-loaded page data, including: In the case that the first label and the second label are inconsistent, the to-be-loaded page data is acquired, updated into the target device and marked with the second label, and it is determined that the to-be-loaded page data is the target to-be-loaded page data.

5. The method of claim 1, wherein, After the target interface is loaded according to the target to-be-loaded page data, the method further includes: Detecting whether a target pre-cached page data set exists in the target device, wherein the pre-cached page data in the target pre-cached page data set are marked with the second label, and the pre-cached page data in the target pre-cached page data set are a first preset number of page data adjacent to the target to-be-loaded page data in a directory sequence number in the target device; In the case that the target pre-cached page data set does not exist in the target device, the pre-cached page data is acquired, updated into the target device and marked with the second label.

6. The page data loading method of claim 5, wherein, In the case that the target pre-cached page data set does not exist in the target device, the at least one pre-cached page data is acquired, including: Acquiring the first label and the second label of all the pre-cached page data in the target device; Determining a candidate pre-cached page data set in the target device, wherein the pre-cached page data in the candidate pre-cached page data set are the pre-cached page data with consistent first labels and second labels; Acquiring the pre-cached page data in the target pre-cached page data set except the candidate pre-cached page data set into the target device and marked with the second label.

7. The method of claim 1, wherein, In the case that the first version number and the second version number are inconsistent, the page data stored in the target device is marked with the first label, and the method further includes: Updating the first version number in the target device to the second version number; Acquiring a second preset number of page data into the target device, and marking the page data with the second label.

8. A page data loading apparatus characterized by comprising: including: A version judging module is configured to determine a first version number and a second version number corresponding to a target page in a target page set, wherein the first target page data corresponding to the first version number is page data stored locally in a target device, the target device locally stores multiple copies of page data, the second target page data corresponding to the second version number is page data updated at a first target time, the first target time is a page data update time closest to a second target time, and the second target time is a time at which the target device receives a page display instruction. A label marking module is configured to mark the page data stored in the target device with a first label in a case where the first version number and the second version number are inconsistent, wherein the first label is used to indicate that the corresponding page data is outdated. A data determining module is configured to determine target to-be-loaded page data and corresponding label information of the target to-be-loaded page data stored in a target device, wherein the to-be-loaded page data is page data corresponding to any target page in the target page set, the target to-be-loaded page data is the to-be-loaded page data stored in the target device and marked with a second label, the label information includes the first label and the second label, and the second label is used to indicate that the corresponding page data is not outdated. A page drawing module is configured to load a target interface according to the target to-be-loaded page data. The method includes the following steps: in a case where the target device contains the to-be-loaded page data but is marked with the first label, obtaining a first label and a second label of the to-be-loaded page data, wherein the first label is a unique identifier of the to-be-loaded page data obtained in the target device, the first label is a hash value of the page data obtained in the target device, the second label is a unique identifier of the to-be-loaded page data updated at the first target time, and the second label is a hash value of the page data updated at the first target time obtained from a backend server; and in a case where the first label and the second label are consistent, replacing the first label of the to-be-loaded page data stored in the target device with the second label, and determining that the to-be-loaded page data is the target to-be-loaded page data.

9. A non-volatile storage medium, comprising: The nonvolatile storage medium includes a stored program, wherein the program controls the device in which the storage medium is located to perform the page data loading method in any one of claims 1 to 7 when the program is running.

10. An electronic device comprising a processor, characterized in that The processor is configured to run a program, wherein the program performs the page data loading method in any one of claims 1 to 7 when the program is running.

Citation Information

Patent Citations

  • Webpage access method, client side, webpage server and programmable equipment

    CN107784011A

  • Webpage content loading method, device and system

    CN110020297A

  • Page display method, device and equipment

    CN110209964A

  • Data processing method and device, computer equipment and storage medium

    CN114021050A