Page loading method and device, storage medium and electronic device

By comparing the page version information of the terminal and the server, dynamically clearing the terminal cache and reloading it, the problem of delayed page data update caused by browser cache is solved, and timely update of page data is achieved.

CN115484246BActive Publication Date: 2025-10-03HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211051040.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2025-10-03
Estimated Expiration
2042-08-30

AI Technical Summary

Technical Problem

In the prior art, browser caching causes delays in updating page data, making it difficult for users to obtain the latest version of page data in a timely manner.

Method used

By comparing the page version information stored locally on the terminal with the version information on the server, if there is any inconsistency, the local page data on the terminal is cleared and a loading request is sent to ensure that the loaded page data is consistent with the server.

Benefits of technology

This enables timely updates of page data, avoids the need to periodically clear the cache, and ensures that the terminal obtains the latest page data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484246B_ABST
    Figure CN115484246B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for loading page data, a storage medium and an electronic device. The method includes: responding to a page data loading operation, obtaining first version information and second version information, wherein the page data loading operation is used to request loading of page data of a target page, the first version information is used to indicate the version information of the target page stored locally on the terminal, and the second version information is the version information of the target page received from the server; comparing the first version information with the second version information to obtain a version comparison result; when the version comparison result indicates that the first version information and the second version information are inconsistent, clearing the page data of the target page corresponding to the first version information stored locally on the terminal, and sending a page loading request; obtaining the page data of the target page to be loaded. The present application solves the technical problem of delay in updating page data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a page loading method and device, a storage medium, and an electronic device. Background Art

[0002] When a browser requests to load page data, it stores each result and cache identifier in the browser cache. When the browser initiates a new request, it first searches the browser cache for the result and cache identifier. Consequently, the page presented to the user is the previous page. Users must manually clear the cache or wait for the browser to periodically clear the cache before the latest page data is available. This can make it difficult for users to obtain the latest version of the target page in a timely manner.

[0003] That is to say, in the page data loading method provided by the related art, the update of the page data is delayed due to the influence of the browser cache.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present application provide a method and apparatus for loading page data, a storage medium, and an electronic device to at least solve the technical problem of delay in updating page data.

[0006] According to one aspect of an embodiment of the present application, a method for loading page data is provided, including: responding to a page data loading operation, obtaining first version information and second version information, wherein the page data loading operation is used to request loading page data of a target page, the first version information is used to indicate the version information of the target page stored locally in the terminal, and the second version information is the version information of the target page received from the server; comparing the first version information with the second version information to obtain a version comparison result; when the version comparison result indicates that the first version information is inconsistent with the second version information, clearing the page data of the target page corresponding to the first version information stored locally in the terminal, and sending a page loading request; obtaining the page data of the target page to be loaded.

[0007] According to another aspect of an embodiment of the present application, a page data loading device is also provided, including: a first acquisition unit, used to respond to a page data loading operation, obtain first version information and second version information, wherein the above-mentioned page data loading operation is used to request loading of page data of a target page, the above-mentioned first version information is used to indicate the version information of the above-mentioned target page stored locally in the terminal, and the above-mentioned second version information is the version information of the above-mentioned target page received from the server; a comparison unit, used to compare the above-mentioned first version information with the above-mentioned second version information to obtain a version comparison result; a clearing unit, used to clear the page data of the above-mentioned target page corresponding to the above-mentioned first version information stored locally in the above-mentioned terminal when the above-mentioned version comparison result indicates that the above-mentioned first version information is inconsistent with the above-mentioned second version information, and send a page loading request; a second acquisition unit, used to obtain the page data of the above-mentioned target page to be loaded.

[0008] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned method for loading page data when running.

[0009] According to another aspect of an embodiment of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described method for loading page data.

[0010] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned page data loading method through the computer program.

[0011] In an embodiment of the present application, after comparing first version information indicating the version information of a target page stored locally on a terminal with second version information of the target page received from a server to obtain a version comparison result, if the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page load request is sent. Thus, when requesting to load the page data of the target page, a dynamic determination is made based on the version comparison result whether to clear the page data of the target page corresponding to the first version information stored locally on the terminal. If the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page load request is sent. This ensures that the version information of the page data loaded by the terminal is consistent with the version information of the target page received from the server, thereby achieving the purpose of promptly clearing the page data of the target page stored locally on the terminal when the version information of the target page on the server changes, so that the terminal can obtain data that matches the version information of the target page on the server. This eliminates the need to wait for the terminal to periodically and automatically clear the stored page data of the target page. This allows for timely page updates, solving the technical issue of delayed page data updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0013] Figure 1 is a schematic diagram of an application environment of an optional method for loading page data according to an embodiment of the present application;

[0014] Figure 2 is a flow chart of an optional method for loading page data according to an embodiment of the present invention;

[0015] Figure 3 is a flowchart of another optional method for loading page data according to an embodiment of the present invention;

[0016] Figure 4 is a flowchart of another optional method for loading page data according to an embodiment of the present invention;

[0017] Figure 5 is a schematic structural diagram of an optional device for loading page data according to an embodiment of the present application;

[0018] Figure 6It is a schematic structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] According to one aspect of the embodiment of the present application, a method for loading page data is provided. Optionally, as an optional implementation, the method for loading page data can be applied to, but is not limited to, Figure 1 The page data loading system in the environment shown.

[0022] The page data loading system may include, but is not limited to, a terminal device 102, a network 104, a server 106, and a database 108. The target client runs on the terminal device 102. The terminal device 102 includes a human-computer interaction screen, a processor, and memory. The human-computer interaction screen is used to display the page data of the target page and also provides a human-computer interaction interface for receiving human-computer interaction operations. The processor is used to generate interaction instructions in response to the human-computer interaction operations and send the interaction instructions to the server. The memory is used to store relevant data, such as the first version information and the second version information.

[0023] In addition, server 106 includes a processing engine configured to perform storage or read operations on database 108. Specifically, the processing engine reads relevant data from database 108 to obtain the second version information of the target page, and then sends the second version information to terminal device 102, so that terminal device 102 receives the second version information.

[0024] Optionally, in this embodiment, the terminal device may be a terminal device configured with a target client, which may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, an MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client may be a video client, an instant messaging client, a browser client, an education client, etc. The network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network, and a wide area network, and the wireless network includes: Bluetooth, WIFI, and other networks that realize wireless communication. The server may be a single server, or a server cluster consisting of multiple servers, or a cloud server.

[0025] The specific process is as follows: In step S100, in response to a page data loading operation, first version information and second version information are obtained. The page data loading operation is used to request the loading of page data for a target page. The first version information indicates the version information of the target page stored locally on the terminal, and the second version information is the version information of the target page received from the server. Then, in step S102, server 106 transmits the second version information to terminal device 102 via network 104. Then, in step S104, terminal device 102 transmits the result of obtaining the second version information to server 106 via network 104. This result may include, but is not limited to, "acquired" or "not acquired." Then, in step S106, the first version information is compared with the second version information to obtain a version comparison result. Then, in step S108, if the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page loading request is sent. Furthermore, in step S110, the page data of the target page to be loaded is obtained. The above is only an example and is not limited in this embodiment.

[0026] It should be noted that in this embodiment, after comparing the first version information indicating the version information of the target page stored locally on the terminal with the second version information of the target page received from the server to obtain a version comparison result, if the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page load request is sent. Thus, when requesting to load the page data of the target page, a dynamic determination is made based on the version comparison result whether to clear the page data of the target page corresponding to the first version information stored locally on the terminal. If the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page load request is sent. This ensures that the version information of the page data loaded by the terminal is consistent with the version information of the target page received from the server, thereby achieving the purpose of promptly clearing the page data of the target page stored locally on the terminal when the version information of the target page on the server changes, so that the terminal can obtain data that matches the version information of the target page on the server. This eliminates the need to wait for the terminal to periodically and automatically clear the stored page data of the target page. This allows for timely page updates, solving the technical issue of delayed page data updates.

[0027] Alternatively, as an optional implementation, Figure 2 As shown, the method for loading the above page data includes:

[0028] S202, in response to a page data loading operation, obtaining first version information and second version information, wherein the page data loading operation is used to request loading of page data of a target page, the first version information is used to indicate version information of the target page stored locally on the terminal, and the second version information is version information of the target page received from the server;

[0029] Optionally, in this embodiment, the above-mentioned page data loading operation may include but is not limited to the terminal user clicking on a hypertext link, picture, text, audio or video. Optionally, the above-mentioned page data loading operation may include but is not limited to the terminal user clicking on "jump" or pressing "enter" after entering a uniform resource locator. The above-mentioned terminal can communicate with the server, which can be a wired connection or a wireless connection. The version information of the target page stored locally on the above-mentioned terminal may be, but is not limited to, the page data of the target page stored in the browser cache on the terminal. The above-mentioned second version information may be, but is not limited to, consistent with the above-mentioned first version information. The above-mentioned second version information may be, but is not limited to, inconsistent with the above-mentioned first version information. The above-mentioned method of requesting to load the page data of the target page may be, but is not limited to, through an HTTP request.

[0030] S204, comparing the first version information with the second version information to obtain a version comparison result;

[0031] Optionally, in an embodiment of the present application, the version comparison result may, but is not limited to, indicate that the second version information is inconsistent with the first version information. The version comparison result may, but is not limited to, indicate that the second version information is consistent with the first version information. The first version information and the second version information may, but are not limited to, include the version number of the target page and a version number processing mechanism.

[0032] S206: If the version comparison result indicates that the first version information is inconsistent with the second version information, clear the page data of the target page corresponding to the first version information stored locally in the terminal and send a page load request;

[0033] Optionally, in this embodiment, the above-mentioned clearing of the page data of the target page corresponding to the first version information stored locally on the terminal may be, but is not limited to, clearing cache information stored by the browser on the terminal. The above-mentioned clearing of the page data of the target page corresponding to the first version information stored locally on the terminal may be, but is not limited to, triggered by a shortcut key. The above-mentioned clearing process may be, but is not limited to, being triggered by clicking a cache clear button configured on the browser with a mouse.

[0034] S208: Obtain page data of the target page to be loaded.

[0035] Optionally, in this embodiment, the page data of the target page to be loaded is page data that matches the version information of the target page received from the server.

[0036] Combine Figure 3 As shown, the page data loading process is specifically described: as shown in step S302, the terminal user clicks on a hyperlink to request the loading of the page data of the target page. The hyperlink corresponds to the uniform resource locator of the target page. Then, the version information of the target page stored locally on the terminal is obtained. And, as shown in step S304, the terminal obtains the second version information through the server. Then, as shown in step S306, the server returns the second version information, i.e., the version information of the target page, to the terminal. The first version information is then compared with the second version information to obtain a version comparison result. If the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page loading request is sent. If the version comparison result indicates that the first version information and the second version information are consistent, a page loading request is sent. Then, the terminal obtains the page data of the target page to be loaded.

[0037] above Figure 3 This is an optional example. The embodiment of the present application does not impose any restrictions on the method for obtaining the second version information and the method for obtaining the first version information involved in the method for loading page data.

[0038] According to the embodiments provided herein, after comparing first version information indicating the version information of a target page stored locally on a terminal with second version information of the target page received from a server to obtain a version comparison result, if the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page load request is sent. Thus, when requesting to load the page data of the target page, a dynamic determination is made based on the version comparison result whether to clear the page data of the target page corresponding to the first version information stored locally on the terminal. If the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared, and a page load request is sent. This ensures that the version information of the page data loaded by the terminal is consistent with the version information of the target page received from the server, thereby achieving the purpose of promptly clearing the page data of the target page stored locally on the terminal when the version information of the target page on the server changes, so that the terminal can obtain data that matches the version information of the target page on the server. This eliminates the need to wait for the terminal to periodically and automatically clear the stored page data of the target page. This allows for timely page updates, solving the technical issue of delayed page data updates.

[0039] As an optional solution, the first version information is compared with the second version information, and the version comparison result obtained includes at least one of the following:

[0040] S1, comparing a first version identifier included in the first version information and a second version identifier included in the second version information;

[0041] S2, comparing the first version update timestamp included in the first version information and the second version update timestamp included in the second version information;

[0042] S3: Compare the first version description information included in the first version information with the second version description information included in the second version information.

[0043] It should be noted that the above-mentioned first version identifier may be, but is not limited to, the version number of the target page stored locally on the terminal. The above-mentioned second version identifier may be, but is not limited to, the version number of the target page received from the server. The above-mentioned first version update timestamp may be, but is not limited to, the timestamp of when the target page stored locally on the terminal was last deployed. The above-mentioned second version update timestamp may be, but is not limited to, the timestamp of when the target page received from the server was last updated. The above-mentioned first version description information may be, but is not limited to, description information of the version of the target page stored locally on the terminal. The above-mentioned second version description information may be, but is not limited to, description information of the version of the target page received from the server.

[0044] Through the embodiments provided by the present application, by comparing the first version identifier contained in the first version information with the second version identifier contained in the second version information; or comparing the first version update timestamp contained in the first version information with the second version update timestamp contained in the second version information; or comparing the first version description information contained in the first version information with the second version description information contained in the second version information. This achieves the positioning of the specific identity identification area to be identified, and utilizes multiple transcription layers to convert feature information into recognition results. This improves the diversity of characters in the candidate character set, thereby improving the accuracy of identifying identification characters.

[0045] As an optional solution, in response to the page data loading operation, obtaining the first version information includes:

[0046] S1, in response to the page data loading operation, obtain a version information file, wherein the version information file records the version information newly stored each time the target page is deployed;

[0047] S2: Determine the version information with the latest deployment time in the version information file as the first version information of the target page.

[0048] It should be noted that the aforementioned version information file is not limited to recording the version information newly stored each time the target page is deployed. Optionally, a version information file is added when the target page is deployed, and the version information in the file is incremented according to the release. When the user terminal detects a change in the target page version, it will promptly refresh the page and obtain the latest page data from the server to ensure that the latest H5 page is displayed to the user.

[0049] Through the embodiments provided by this application, in response to a page data loading operation, a version information file is obtained, wherein the version information file records the version information newly stored each time the target page is deployed; and the version information with the latest deployment time in the version information file is determined as the first version information of the target page. This achieves the purpose of obtaining the version information of the target page stored locally on the terminal.

[0050] As an optional solution, in response to the page data loading operation, obtaining the second version information includes:

[0051] S1, in response to the page data loading operation, sends a version acquisition request to the server, wherein the version acquisition request is used to obtain the version information of the target page stored in the server;

[0052] S2: Determine the version information of the target page received from the server as the second version information.

[0053] It should be noted that the above-mentioned version acquisition request can be, but is not limited to, sent via HTTP communication. For example, in response to a page data loading operation, an HTTP request is sent to the server to obtain the version information of the target page stored in the server. The version information of the target page received from the server is then determined as the second version information. Through the embodiment provided by the present application, in response to a page data loading operation, a version acquisition request is sent to the server, wherein the version acquisition request is used to obtain the version information of the target page stored in the server; and the version information of the target page received from the server is determined as the second version information. Thus, the purpose of obtaining the second version information of the target page received from the server is achieved.

[0054] As an optional solution, sending the page load request includes: sending a page data load request to a distributed server associated with the server;

[0055] Acquiring the page data of the target page to be loaded includes: acquiring the page data of the target page corresponding to the second version information from the distributed server.

[0056] It should be noted that the server can, but is not limited to, synchronize the target page data to the above-mentioned distributed server associated with the server in advance through DNS synchronization update. Specifically, after the target page is published, the original target page data in the distributed server will be cleared first, and then overwritten with the latest page file. For example: Figure 4As shown in step S402, the DNS is updated synchronously. That is, the target page refreshes the DNS for synchronization when it is published. Then, as shown in step S404, the terminal user clicks a hyperlink to request the loading of the target page's page data. The hyperlink corresponds to the uniform resource locator of the target page. Next, the version information of the target page stored locally on the terminal is obtained. Furthermore, as shown in step S406, the terminal obtains second version information from the server. Then, as shown in step S408, the server returns the second version information, i.e., the version information of the target page, to the terminal. The first version information is then compared with the second version information to obtain a version comparison result. If the version comparison result indicates that the first version information and the second version information are inconsistent, the page data of the target page corresponding to the first version information stored locally on the terminal is cleared. Then, as shown in step S410, the terminal sends a page data loading request to the distributed server. Then, as shown in step S412, the distributed server returns the page data of the target page corresponding to the second version information to the terminal.

[0057] Through the embodiments provided by the present application, a page data loading request is sent to a distributed server associated with the server, and the page data of the target page corresponding to the second version information is obtained from the distributed server. Furthermore, the page data of the target page corresponding to the second version information can be obtained from the distributed server associated with the server.

[0058] As an optional solution, obtaining the page data of the target page corresponding to the second version information from the distributed server includes:

[0059] S1, when the distributed server stores page data of the target page corresponding to the second version information, the distributed server returns the page data of the target page corresponding to the second version information to the terminal;

[0060] S2: When the distributed server does not store page data of the target page corresponding to the second version information, the distributed server sends a synchronization update request to the server to obtain page data of the target page corresponding to the updated second version information.

[0061] As an optional implementation, when the target page is distributed, the original page data of the target page in the distribution server is cleared and the latest page file is overwritten. Then the distribution server directly returns the page data of the target page corresponding to the second version information to the terminal.

[0062] As another optional implementation, when the distributed server does not store the page data of the target page corresponding to the second version information, the distributed server sends a synchronization update request to the server to request the server to return the page data of the target page corresponding to the second version information to the distributed server.

[0063] Through the embodiments provided by this application, if the distributed server stores the page data of the target page corresponding to the second version information, the distributed server returns the page data of the target page corresponding to the second version information to the terminal; if the distributed server does not store the page data of the target page corresponding to the second version information, the distributed server sends a synchronization update request to the server to obtain the page data of the target page corresponding to the updated second version information. This improves the reliability of obtaining the page data of the target page corresponding to the second version information from the distributed server.

[0064] As an optional solution, before sending the page load request, also include:

[0065] S1, the distributed server periodically receives page data of a target page corresponding to the second version information sent by the server.

[0066] It should be noted that the time for receiving the target page data corresponding to the second version information sent by the server can be, but is not limited to, once every two days, once every eight hours, or once a week, and the specific time can be determined based on actual needs. For example, the distributed server can receive the target page data corresponding to the second version information sent by the server once a week.

[0067] Through the embodiment provided by the present application, the distributed server regularly receives the page data of the target page corresponding to the second version information sent by the server, thereby achieving the purpose of the distributed server regularly receiving the data of the latest version of the target page.

[0068] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0069] According to another aspect of the embodiment of the present application, a device for loading page data for implementing the above-mentioned method for loading page data is also provided. Figure 5 As shown in , the device includes:

[0070] A first acquiring unit 502 is configured to acquire first version information and second version information in response to a page data loading operation, wherein the page data loading operation is used to request loading of page data of a target page, the first version information is used to indicate version information of the target page stored locally on the terminal, and the second version information is version information of the target page received from the server;

[0071] A comparison unit 504 is configured to compare the first version information with the second version information to obtain a version comparison result;

[0072] The clearing unit 506 is configured to clear the page data of the target page corresponding to the first version information stored locally in the terminal and send a page loading request when the version comparison result indicates that the first version information is inconsistent with the second version information;

[0073] The second acquiring unit 508 is configured to acquire page data of the target page to be loaded.

[0074] Optionally, in this embodiment, the embodiments to be implemented by the above-mentioned various unit modules can refer to the above-mentioned various method embodiments, which will not be repeated here.

[0075] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned method for loading page data is also provided. The electronic device may be Figure 6 The terminal device or server shown in FIG. This embodiment is described by taking the electronic device as an example of a server. Figure 6 As shown, the electronic device includes a memory 602 and a processor 604. The memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments through the computer program.

[0076] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0077] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0078] S1, in response to a page data loading operation, obtaining first version information and second version information, wherein the page data loading operation is used to request loading page data of a target page, the first version information is used to indicate version information of the target page stored locally on the terminal, and the second version information is version information of the target page received from the server;

[0079] S2, comparing the first version information with the second version information to obtain a version comparison result;

[0080] S3: If the version comparison result indicates that the first version information is inconsistent with the second version information, clear the page data of the target page corresponding to the first version information stored locally in the terminal and send a page load request;

[0081] S4, obtaining page data of the target page to be loaded.

[0082] Alternatively, those skilled in the art will appreciate that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other terminal devices. Figure 6 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 6 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 6 Different configurations shown.

[0083] Among them, the memory 602 can be used to store software programs and modules, such as the program instructions / modules corresponding to the page data loading method and device in the embodiment of the present application, and the processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, that is, realizing the above-mentioned page data loading method. The memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 602 may further include a memory remotely located relative to the processor 604, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. Among them, the memory 602 can be specifically but not limited to being used to store relevant attribute data, such as the candidate character set that matches each identification character in the identity identification of the target object, and information such as the identification character verification code that matches the identification character. As an example, Figure 6 As shown, the memory 602 may include, but is not limited to, the acquisition unit 502, the first identification unit 504, the comparison unit 506, and the second identification unit 508 in the device for loading page data. Furthermore, the memory 602 may also include, but is not limited to, other module units in the device for loading page data, which will not be described in detail in this example.

[0084] Optionally, the transmission device 606 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one embodiment, the transmission device 606 includes a network interface controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In one embodiment, the transmission device 606 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0085] In addition, the electronic device further includes: a display 608 for displaying the target identification characters contained in the identification of the identified target object; and a connection bus 610 for connecting various module components in the electronic device.

[0086] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting multiple nodes through network communication. The nodes may form a peer-to-peer (P2P) network, and any computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0087] According to one aspect of the present application, a computer program product is provided, comprising a computer program / instructions containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component and / or installed from a removable medium. When the computer program is executed by a central processing unit, the various functions provided in the embodiments of the present application are performed.

[0088] A computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) or programs loaded from the storage unit into random access memory (RAM). The RAM also stores various programs and data required for system operation. The CPU, the read-only memory, and the RAM are connected to each other via a bus. Input / output interfaces (I / O interfaces) are also connected to the bus.

[0089] The following components are connected to the input / output interface: an input section including a keyboard, mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section including a hard disk; and a communication section including a network interface card such as a local area network card and a modem. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc. are installed in the drive as needed so that computer programs read from them can be installed into the storage section as needed.

[0090] In particular, according to an embodiment of the present application, the processes described in the various method flow charts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the flow charts. In such an embodiment, the computer program can be downloaded and installed from a network via a communication portion, and / or installed from a removable medium. When the computer program is executed by a central processing unit, the various functions defined in the system of the present application are performed.

[0091] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0092] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the page data loading method provided in the various optional implementations described above.

[0093] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0094] S1, in response to a page data loading operation, obtaining first version information and second version information, wherein the page data loading operation is used to request loading page data of a target page, the first version information is used to indicate version information of the target page stored locally on the terminal, and the second version information is version information of the target page received from the server;

[0095] S2, comparing the first version information with the second version information to obtain a version comparison result;

[0096] S3: If the version comparison result indicates that the first version information is inconsistent with the second version information, clear the page data of the target page corresponding to the first version information stored locally in the terminal and send a page load request;

[0097] S4, obtaining page data of the target page to be loaded.

[0098] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0099] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.

[0100] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0101] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.

[0102] 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0103] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0104] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for loading page data, characterized in that: include: In response to receiving an interactive operation triggered by a user, obtaining a version information file and sending a version acquisition request to a server, wherein the version information file records the version information newly stored each time the target page is deployed, and the interactive operation is used to request to load page data of the target page; Determining the version information with the latest deployment time in the version information file as the first version information of the target page, and determining the version information of the target page received from the server as the second version information, wherein the first version information is used to indicate the version information of the target page stored in the browser cache on the terminal; Comparing the first version information with the second version information to obtain a version comparison result; If the version comparison result indicates that the first version information is inconsistent with the second version information, clearing the page data of the target page corresponding to the first version information in the browser cache on the terminal, and sending a page data loading request to the distributed server associated with the server, wherein, if the target page is published to the distributed server, clearing the page data of the target page historically stored in the distributed server, and overwriting the page data of the target page in the distributed server; Obtain page data of a target page corresponding to the second version information from the distributed server.

2. The method according to claim 1, characterized in that The comparison of the first version information with the second version information to obtain a version comparison result includes at least one of the following: comparing a first version identifier included in the first version information and a second version identifier included in the second version information; comparing a first version update timestamp included in the first version information with a second version update timestamp included in the second version information; The first version description information included in the first version information is compared with the second version description information included in the second version information.

3. The method according to claim 1, characterized in that The acquiring, from the distributed server, page data of the target page corresponding to the second version information includes: In a case where the page data of the target page corresponding to the second version information is stored in the distributed server, the distributed server returns the page data of the target page corresponding to the second version information to the terminal; In a case where the page data of the target page corresponding to the second version information is not stored in the distributed server, the distributed server sends a synchronization update request to the server to obtain the updated page data of the target page corresponding to the second version information.

4. The method according to claim 1, wherein Before sending the page data loading request to the distributed server associated with the server, the method further includes: The distributed server periodically receives page data of the target page corresponding to the second version information sent by the server.

5. A device for loading page data, characterized in that: include: The first acquisition unit is configured to, in response to receiving an interactive operation triggered by a user, acquire a version information file and send a version acquisition request to a server, wherein the version information file records the version information newly stored each time the target page is deployed, and the interactive operation is used to request to load page data of the target page; determine the latest version information deployed in the version information file as the first version information of the target page, and determine the version information of the target page received from the server as the second version information, wherein the first version information is used to indicate the version information of the target page stored in the browser cache on the terminal a comparison unit, configured to compare the first version information with the second version information to obtain a version comparison result; a clearing unit configured to, when the version comparison result indicates that the first version information is inconsistent with the second version information, clear the page data of the target page corresponding to the first version information in the browser cache on the terminal, and send a page data loading request to a distributed server associated with the server, wherein, when the target page is published to the distributed server, clear the page data of the target page historically stored in the distributed server, and overwrite the page data of the target page in the distributed server; The second acquiring unit is configured to acquire the page data of the target page corresponding to the second version information from the distributed server.

6. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein the program is executed by a processor to perform the method according to any one of claims 1 to 4.

7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 4 through the computer program.

Citation Information

Patent Citations

  • Page display method and device, electronic equipment and storage medium

    CN113094141A

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

    CN114021050A