CN118034843A - Page refreshing method and device, storage medium and electronic equipment - Google Patents

Page refreshing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN118034843A
CN118034843A CN202410336649.4A CN202410336649A CN118034843A CN 118034843 A CN118034843 A CN 118034843A CN 202410336649 A CN202410336649 A CN 202410336649A CN 118034843 A CN118034843 A CN 118034843A
Authority
CN
China
Prior art keywords
page
target
configuration file
refreshed
refreshing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410336649.4A
Other languages
Chinese (zh)
Inventor
张仙凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Du Xiaoman Technology Beijing Co Ltd
Original Assignee
Du Xiaoman Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Du Xiaoman Technology Beijing Co Ltd filed Critical Du Xiaoman Technology Beijing Co Ltd
Priority to CN202410336649.4A priority Critical patent/CN118034843A/en
Publication of CN118034843A publication Critical patent/CN118034843A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a page refreshing method, a page refreshing device, a storage medium and electronic equipment, wherein the method comprises the following steps: when the page switching operation is detected, a target configuration file is obtained, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises a target page indicated by the page switching operation; judging whether the target page is a page to be refreshed or not based on the target configuration file and the local storage data, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing; and if the target page is the page to be refreshed, carrying out page refreshing on the target page. According to the embodiment of the invention, the page refreshing can be conveniently realized under the condition of avoiding the perception of the user, so that the use experience of the user is improved.

Description

Page refreshing method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a page refreshing method, a device, a storage medium, and an electronic apparatus.
Background
At present, most systems adopt a front-end and back-end separated development and deployment mode, and related technologies generally need to wait for a user to manually refresh a page and clear a cache after front-end codes (i.e., front-end resources) are updated, so that the user operation is complicated. Based on this, how to conveniently realize page refreshing without user perception has not yet had a better solution.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a page refreshing method, device, storage medium, and electronic apparatus, so as to solve the problem that in the related art, a user needs to wait for manually refreshing a page and clear a cache, resulting in complicated operation of the user; that is, the embodiment of the invention can conveniently realize page refreshing under the condition of avoiding user perception, thereby improving the use experience of users.
According to an aspect of the embodiment of the present invention, there is provided a page refreshing method, including:
when a page switching operation is detected, acquiring a target configuration file, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises a target page indicated by the page switching operation;
Judging whether the target page is a page to be refreshed or not based on the target configuration file and the local storage data, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing;
And if the target page is the page to be refreshed, carrying out page refreshing on the target page.
According to another aspect of the embodiment of the present invention, there is provided a page refreshing apparatus, including:
The device comprises an acquisition unit, a storage unit and a display unit, wherein the acquisition unit is used for acquiring a target configuration file when a page switching operation is detected, the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises a target page indicated by the page switching operation;
the processing unit is used for judging whether the target page is a page to be refreshed or not based on the target configuration file and the local storage data, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing;
And the processing unit is further used for refreshing the target page if the target page is the page to be refreshed.
According to another aspect of embodiments of the present invention, there is provided an electronic device comprising a processor, and a memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the above mentioned method.
According to another aspect of embodiments of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-mentioned method.
The embodiment of the invention can acquire the target configuration file when the page switching operation is detected, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises the target page indicated by the page switching operation; then, based on the target configuration file and the local storage data, judging whether the target page is a page to be refreshed, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing; and if the target page is the page to be refreshed, carrying out page refreshing on the target page. Therefore, the embodiment of the invention can conveniently realize page refreshing under the condition of avoiding user perception, thereby improving the use experience of users.
Drawings
Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments with reference to the following drawings, in which:
FIG. 1 shows a flow diagram of a page refresh method according to an exemplary embodiment of the invention;
FIG. 2 illustrates a flow diagram of another page refresh method according to an exemplary embodiment of the present invention;
FIG. 3 illustrates a flow diagram of yet another page refresh method according to an exemplary embodiment of the present invention;
FIG. 4 shows a schematic block diagram of a page refresh device according to an exemplary embodiment of the present invention;
fig. 5 shows a block diagram of an exemplary electronic device that can be used to implement an embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the invention is susceptible of embodiment in the drawings, it is to be understood that the invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided to provide a more thorough and complete understanding of the invention. It should be understood that the drawings and embodiments of the invention are for illustration purposes only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below. It should be noted that the terms "first," "second," and the like herein are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by such devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those skilled in the art will appreciate that "one or more" is intended to be construed as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of such messages or information.
In an embodiment of the present invention, a front-end system is contemplated, which may include, but is not limited to: front-end service equipment (i.e., a front-end server), user browsing equipment (i.e., equipment for running a user browser), front-end configuration service equipment, front-end packaging equipment, etc., which are not limited in this embodiment of the present invention; alternatively, the front-end system may include one electronic device (where the front-end service device, the user browsing device, the front-end configuration service device, and the front-end packaging device may be the same electronic device), or the front-end system may also include a plurality of electronic devices (e.g., the front-end service device, the user browsing device, the front-end configuration service device, and the front-end packaging device may be one electronic device, respectively), and the embodiment of the present invention is not limited thereto.
It should be noted that, the execution body of the page refreshing method provided by the embodiment of the present invention may be a user browsing device in a front-end system or a browser (i.e. a user browser) in the user browsing device, etc.; alternatively, when the user browsing device includes one electronic device or a plurality of electronic devices, the execution subject may be one or a plurality of electronic devices or the like constituting the user browsing device, which is not limited by the embodiment of the present invention.
The above electronic device may be a terminal (i.e. a client) or a server, and when the execution body includes a plurality of electronic devices (e.g. a plurality of electronic devices forming a user browsing device) and the plurality of electronic devices include at least one terminal and at least one server, the page refreshing method provided by the embodiment of the present invention may be executed jointly by the terminal and the server. Accordingly, the terminals referred to herein may include, but are not limited to: smart phones, tablet computers, notebook computers, desktop computers, intelligent voice interaction devices, and the like. The server mentioned herein may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and artificial intelligence platforms, and so on.
Based on the above description, the embodiments of the present invention propose a page refreshing method that can be performed by the above-mentioned electronic device, that is, the page refreshing method can be performed by the above-mentioned user browsing device (i.e., the electronic device constituting the user browsing device); or the page refreshing method may be performed by a browser in the user browsing device mentioned above, etc. For convenience of explanation, the page refreshing method is taken as an example of user browsing equipment to execute the page refreshing method; as shown in fig. 1, the page refreshing method may include the following steps S101 to S103:
s101, when the page switching operation is detected, a target configuration file is acquired, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises a target page indicated by the page switching operation.
The at least one page may be a page included in the target application, the target application may be any application, and the target configuration file may be a configuration file corresponding to the target application, where the user browsing device may be used to run the target application. Alternatively, an application may be a website.
Optionally, the user may perform the page switching operation on any page of the at least one page, that is, may perform the page switching operation on any page of the target application, so as to implement switching of the pages, so that the user browsing device detects the page switching operation, that is, may detect the page switching operation for the target application, that is, the application indicated by the page switching operation may be the target application, and the application identifier of the application indicated by the page switching operation may be the application identifier of the target application. Therefore, the user browsing device can monitor the page switching, so that the page switching operation is detected, and when the page switching operation is detected, the target configuration file is triggered to be acquired, namely the target configuration file corresponding to the target application can be triggered to be acquired.
Optionally, any of the above pages may include a page switch button (such as a payment confirmation button, a down button, or a page turning button), where the page switch operation may be a click operation for the page switch button, or a long-press operation for the page switch button, which is not limited in the embodiment of the present invention; or the page switching operation may also be a left-slide operation or a slide-up operation for any page, or the like; the embodiment of the present invention is not limited thereto. The long-press operation may be an operation in which the pressing time period is longer than a preset pressing time period threshold; optionally, the preset pressing duration threshold may be set empirically, or may be set according to actual requirements, which is not limited in this embodiment of the present invention.
In the embodiment of the invention, the target page indicated by the page switching operation may refer to a page after the page switching operation is executed, that is, may refer to a page to be displayed in response to the page switching operation; alternatively, the target page may also be referred to as the current page, i.e. the page that is currently required to be displayed after responding to the page switching operation.
It should be noted that at least one page may include at least one key page (such as a payment procedure page or an order page), and each key page in the at least one key page does not support being refreshed, that is, each key page is a page that does not support being refreshed. Optionally, the supporting to be refreshed in the embodiment of the present invention may refer to supporting to acquire the updated front end code (may also be referred to as a new front end code) to implement page refreshing; accordingly, the embodiment of the invention does not support refreshing, which means that the updated front-end code is not supported to be acquired, so as to realize page refreshing.
S102, judging whether the target page is a page to be refreshed or not based on the target configuration file and the local storage data, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing.
In the embodiment of the invention, the user browsing device can also acquire the local storage data; optionally, the self-storage space of the user browsing device may store local storage data, and at this time, the user browsing device may acquire the local storage data from the self-storage space; or when the user browsing device fails to acquire the local storage data from the self storage space, the user browsing device can also acquire the corresponding project file from the front-end service device and store the acquired project file into the self storage space (namely the local space) so as to realize that the corresponding project file is used as the local storage data, thereby acquiring the local storage data. Alternatively, when the user browsing device fails to acquire the local storage data from the storage space thereof, the user browsing device may acquire the project file containing the online timestamp from the front-end service device, such as the project file containing the online timestamp in the front-end code before the update (may also be referred to as the old front-end code), which is not limited in the embodiment of the present invention. Wherein, a front-end code may include at least one project file, i.e. a front-end code may correspond to at least one project file, and then the at least one project file may be packaged by a front-end packaging online operation on a front-end packaging device to obtain a corresponding front-end code; alternatively, the project file including the online time stamp may be a separate file (i.e. only the online time stamp may be included), or may be the same project file as the project file including part of the front end code (i.e. the project file including the online time stamp may also include part of the front end code), which is not limited in this embodiment of the present invention.
Alternatively, the locally stored data may be obtained from a localStorage included in the storage space itself, that is, the locally stored data may be stored in the localStorage, where the localStorage may be used to store the data of the entire website for a long time, where the stored data has no expiration time until manual deletion.
And S103, if the target page is a page to be refreshed, carrying out page refreshing on the target page.
Specifically, if the target page is a page to be refreshed, the user browsing device may acquire the updated front end code from the front end service device, that is, may request the updated front end code from the front end service device, so as to receive the updated front end code returned by the front end service device, so as to acquire the updated front end code; based on the above, the user browsing device can use the updated front end code to refresh the target page.
Optionally, the user browsing device may call location. Load (a function for enabling the browser to refresh the current page) to refresh the target page, so as to refresh the target page.
The embodiment of the invention can acquire the target configuration file when the page switching operation is detected, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises the target page indicated by the page switching operation; then, based on the target configuration file and the local storage data, judging whether the target page is a page to be refreshed, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing; and if the target page is the page to be refreshed, carrying out page refreshing on the target page. Therefore, the embodiment of the invention can conveniently realize page refreshing under the condition of avoiding user perception, thereby improving the use experience of users.
Based on the above description, the embodiment of the invention also provides a more specific page refreshing method. Accordingly, the page refreshing method may be performed by the above-mentioned electronic device, that is, the page refreshing method may be performed by the above-mentioned user browsing device (i.e., the electronic device constituting the user browsing device); or the page refreshing method may be performed by a browser in the user browsing device mentioned above, etc. For convenience of explanation, the page refreshing method is taken as an example of user browsing equipment to execute the page refreshing method; as shown in fig. 2, the page refresh method may include the following steps S201 to S205:
S201, when the page switching operation is detected, a target configuration file is acquired, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises a target page indicated by the page switching operation.
In one embodiment, the target configuration file may include a page identification and a target online timestamp for each of at least one key page, one key page referring to a page that does not support being refreshed. Alternatively, a page identifier may be a page name of a corresponding page, or may be a page code of a corresponding page, which is not limited in the embodiment of the present invention.
Illustratively, assuming that at least one page includes page 1, page 2, page 3, page 4, and page 5, and at least one key page includes page 2 and page 5, when the target profile includes a page identification and a target online timestamp for each of the at least one key page, the target profile may include a page identification of page 2, a page identification of page 5, and a target online timestamp.
In another embodiment, the target configuration file may include page identifiers of the respective pages (i.e., page identifiers of the respective pages in at least one page), refresh indication identifiers of the respective pages, and a target online timestamp, where one refresh indication identifier may be a supporting refresh identifier or a non-supporting refresh identifier, and a page indicated by the non-supporting refresh identifier may be a key page. Optionally, the refresh supporting identifier and the refresh non-supporting identifier may be a numeric identifier or a letter identifier, which is not limited in the embodiment of the present invention; illustratively, the supported refresh flag may be 1, the unsupported refresh flag may be 2, and so on. Based on this, the refresh enabled flag may be used to indicate a page that is refresh enabled, the refresh disabled flag may be used to indicate a page that is not refresh enabled, i.e., the refresh disabled flag may be used to indicate a key page. Wherein the page identification of one page corresponds to the refresh indication identification of the corresponding page.
Illustratively, assuming that at least one page includes page 1, page 2, page 3, page 4, and page 5, and at least one key page includes page 2 and page 5, when the target profile includes a page identification for each page, a refresh indication identification for each page, and a target online timestamp, the target profile may include: page 1's page identification, page 1's supported refresh identification, page 2's page identification, page 2's unsupported refresh identification, page 3's page identification, page 3's supported refresh identification, page 4's supported refresh identification, page 5's page identification, page 5's unsupported refresh identification, and a target online timestamp.
Optionally, at least one project file corresponding to a front-end code may identify a key page that is not refreshable, for example, by identifying the key page with a refresh-unsupported identifier; based on this, one configuration file may be generated based on the key page identified in the corresponding project file (i.e., the project file corresponding to the corresponding front end code, one front end code corresponding to at least one project file, and one configuration file corresponding to one front end code) and the corresponding online timestamp (i.e., the online timestamp corresponding to the corresponding front end code), and one configuration file may be generated by the front end packaging apparatus upon detecting the corresponding front end packaging online operation, which may be a front end packaging online operation of the at least one project file corresponding to the corresponding front end code by the pointer. Alternatively, an online timestamp may be a timestamp when the corresponding front-end package online operation is detected, or may be a timestamp when the corresponding configuration file is generated, etc., which is not limited by the embodiment of the present invention. The configuration file corresponding to one front-end code can be the configuration file corresponding to the application realized by the corresponding front-end code.
Based on the above, for any front-end code, when the front-end packing device detects the front-end packing online operation of at least one project file corresponding to any front-end code, a configuration file corresponding to any front-end code can be generated, and then a configuration file corresponding to an application realized by any front-end code can be generated. Optionally, when generating the configuration file corresponding to any front end code, the front end packaging device may determine, based on the key pages identified in the at least one project file corresponding to any front end code, a page identifier of each key page in the at least one key page related to any front end code, and generate the configuration file corresponding to any front end code, so as to add the page identifier of each key page and the corresponding online timestamp (i.e., the online timestamp corresponding to any front end code) to the configuration file corresponding to any front end code, so that the configuration file corresponding to any front end code includes the page identifier and the corresponding online timestamp of each key page related to any front end code; or the page identification and the refresh indication identification of each page related to any front-end code can be determined based on the key page identified in at least one project file corresponding to any front-end code, and a corresponding configuration file is generated, so that the page identification and the refresh indication identification of each page related to any front-end code, the corresponding online time stamp, and the like are added into the configuration file corresponding to any front-end code. It should be appreciated that when a page is a critical page, it may be determined that the refresh indication identification of the page is not supporting refresh identification; when a page is a non-critical page (i.e., a page is not a critical page), the refresh indication identification of the page may be determined to support a refresh identification.
In the embodiment of the present invention, the online timestamp support in one configuration file is added to the corresponding project file, that is, the online timestamp corresponding to any front-end code may also be added to the project file corresponding to any front-end code; optionally, the front-end packaging device may select one item file from at least one item file corresponding to any front-end code, and add an online timestamp corresponding to any front-end code to the selected item file, or may generate a new item file, and add an online timestamp corresponding to any front-end code to the generated item file, and add the generated item file to at least one item file corresponding to any front-end code, so that at least one item file corresponding to any front-end code includes the generated item file, and so on; the embodiment of the present invention is not limited thereto. Based on the above, after the user browsing device obtains the updated front end code, the online time stamp corresponding to the updated front end code may be obtained by the user browsing device, and then the user browsing device may update the local storage data by using the project file containing the online time stamp in the updated front end code, so as to update the online time stamp in the local storage data.
Further, the front-end packaging device can upload any configuration file to the front-end configuration service device, so that the user browsing device can acquire the required configuration file from the front-end configuration service device; that is, one configuration file in the front-end provisioning service device may be sent by the front-end packaging device to the front-end provisioning service device. Optionally, after receiving a configuration file corresponding to an application (i.e., a configuration file corresponding to a front end code implementing the application), the front end configuration service device may update a configuration file corresponding to an application identifier of the corresponding application by using the currently received configuration file; the front-end configuration service device may include at least one application identifier and a configuration file corresponding to each application identifier in the at least one application identifier, where one application identifier may correspond to one configuration file, that is, the front-end configuration service device may replace a configuration file corresponding to an application identifier of a corresponding application with a configuration file currently received.
Based on this, when acquiring the target configuration file, the user browsing device may send a configuration file request to the front-end configuration service device, so that the front-end configuration service device determines the target configuration file based on the configuration file request, the configuration file request may include an application identifier of an application acted by the page switching operation, and the front-end configuration service device includes at least one application identifier and a configuration file corresponding to each application identifier in the at least one application identifier, where the target configuration file is determined based on the application identifier of the application acted by the page switching operation; that is, the front-end provisioning service device may determine a profile corresponding to the application identifier in the profile request and take the determined profile as the target profile. Based on the above, the user browsing device may receive the target configuration file returned by the front-end configuration service device, so as to obtain the target configuration file. It can be seen that the front-end configuration service device may trigger the front-end configuration service when the user browses the device to request the configuration file, thereby determining the target configuration file.
S202, if the target online time stamp in the target configuration file is different from the online time stamp in the local storage data, determining that the target page is not refreshed, and judging whether the target page is a key page or not based on the target configuration file.
Optionally, if the target online time stamp is greater than the online time stamp in the local storage data or the target online time stamp is less than the online time stamp in the local storage data, it may be determined that the target online time stamp is different from the online time stamp in the local storage data, so that it may be determined that the target page is not refreshed. Correspondingly, if the target online time stamp is the same as the online time stamp in the local storage data, it can be determined that the target page is refreshed, and at this time, an updated front-end code can be obtained from the front-end service device so as to load the target page by adopting the updated front-end code, as shown in fig. 3; optionally, the updated front-end code may also be stored in the self-storage space of the user browsing device (e.g., stored in the local storage) when the page is refreshed, so that the updated front-end code may be obtained from the self-storage space to load the target page.
In one embodiment, if the target configuration file includes a page identifier of each key page, the user browsing device may determine whether the target configuration file includes a page identifier of the target page, if the target configuration file includes a page identifier of the target page, may determine that the target page is a key page, and if the target configuration file does not include a page identifier of the target page, may determine that the target page is not a key page. In this case, it may be determined whether the target page is a key page based on the page identification of each key page in the target configuration file.
In another embodiment, if the target configuration file includes page identifiers and refresh indication identifiers of the respective pages, the refresh indication identifier of the target page may be determined from the target configuration file based on the page identifiers of the target page, if the determined refresh indication identifier is a refresh supporting identifier, the target page may be determined not to be a key page, and if the determined refresh indication identifier is a refresh supporting identifier, the target page may be determined to be a key page. In this case, whether the target page is a key page may be determined based on the refresh indication identifier corresponding to each page identifier in the target configuration file; one page identifier corresponds to one refresh indication identifier, and one page identifier is used for indicating one page, that is, the refresh indication identifier corresponding to one page identifier may be the refresh indication identifier of the page indicated by the corresponding page identifier.
And S203, if the target page is a key page, determining that the target page does not support to be refreshed, and determining that the target page is not a page to be refreshed.
S204, if the target page is not the key page, determining that the target page supports to be refreshed, so as to determine that the target page is a page to be refreshed, wherein one page to be refreshed refers to a page which is not refreshed and supports to be refreshed.
S205, if the target page is the page to be refreshed, the page refreshing is carried out on the target page.
In the embodiment of the present invention, the application mode corresponding to the at least one page may be a single-page application mode, and each page may be a page segment.
Optionally, the user browsing device may further determine M pages to be refreshed from at least one page based on the target configuration file, where the M pages to be refreshed are pages except for the target page in all pages supported to be refreshed included in the at least one page, and M is a non-negative integer; then, the updated front end code can be obtained, and page refreshing is performed on each page in the M pages to be refreshed by adopting the updated front end code. Based on this, if it is determined that the target online timestamp is different from the online timestamp in the locally stored data, page refreshing can be performed for each page to be refreshed in the at least one page. Optionally, the M pages to be refreshed may be determined when the target page is determined to be a page to be refreshed (i.e., when the target page is determined to be a page to be refreshed, the above-mentioned target configuration file may be triggered to be executed, and the M pages to be refreshed may be determined from at least one page) or may be determined when the target online timestamp is determined to be different from the online timestamp in the local storage data (when the target page is not determined to be a page to be refreshed, that is, when the target online timestamp is different from the online timestamp in the local storage data, the above-mentioned target configuration file may be triggered to be executed, and the M pages to be refreshed may be determined from at least one page). Based on this, page refreshing can be performed for each page of the at least one page except for the at least one key page, respectively.
Optionally, after the page refreshing, the updated front end code may also be stored in the local space (e.g. in a localStorage in the local space), so that the target online timestamp is used to update the online timestamp in the local cache data.
In the embodiment of the invention, if the target page is not a page to be refreshed and the target online time stamp is different from the online time stamp in the local storage data, the target page can be loaded by adopting the front-end code before updating, so that the page refreshing of the target page is not performed. Alternatively, the user browsing device may obtain the front-end code before update from the front-end service device, as shown in fig. 3; or the front-end code before the update may be obtained from the storage space of the front-end code, which is not limited in the embodiment of the present invention. Optionally, after a previous non-key page (i.e. a page supporting to be refreshed displayed before the page switching operation) of a key page is refreshed, the key page may be refreshed when the key page is displayed next time, that is, after the previous non-key page is refreshed, when the page switching operation on the previous non-key page of the key page is detected, each key page located after the previous non-key page may be refreshed; in other words, after a non-critical page is refreshed, the online time stamp in the local cache data may be the same as the target online time stamp, so that when the critical page is loaded, the updated front-end code is used to load the corresponding critical page, so as to refresh the critical page. It should be understood that one refreshed non-critical page may be linked to a new critical page, so that when a page switching operation for the refreshed non-critical page is detected to display a corresponding critical page, loading of the corresponding critical page with the updated front-end code may be implemented, thereby implementing the refreshing of the critical page without affecting the user's use.
Therefore, when the user is in the key flow (i.e. the target page is the key page), the embodiment of the invention can wait for the key flow to finish and refresh the page, that is, can refresh the page when the key page is closed and displayed again through the page switching operation, namely, the updated front end code can be adopted to load the corresponding key page when the page switching operation on the non-key page after refreshing is detected, thereby avoiding the key page from being refreshed in the use process of the user and improving the use experience of the user.
The embodiment of the invention can acquire the target configuration file when the page switching operation is detected, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises the target page indicated by the page switching operation; if the target online time stamp in the target configuration file is different from the online time stamp in the local storage data, determining that the target page is not refreshed, and judging whether the target page is a key page or not based on the target configuration file. Correspondingly, if the target page is a key page, determining that the target page does not support to be refreshed, so as to determine that the target page is not a page to be refreshed; if the target page is not the key page, it may be determined that the target page supports being refreshed, so as to determine that the target page is a page to be refreshed, where one page to be refreshed refers to a page that is not refreshed and supports being refreshed. Further, if the target page is a page to be refreshed, the target page can be refreshed. Therefore, the embodiment of the invention can realize page refreshing by the pure front end without depending on the back end, building a database table, manually writing configuration files and the like, and can effectively control whether the subdivided pages can be refreshed, thereby realizing page refreshing of the pages to be refreshed, effectively avoiding forced refreshing of key pages, and avoiding influencing the use of users; based on the method, the device and the system, the page refreshing can be conveniently realized under the condition of avoiding the perception of the user, so that the use experience of the user is improved.
Based on the description of the related embodiments of the page refreshing method, the embodiments of the present invention further provide a page refreshing apparatus, which may be a computer program (including program code) running in an electronic device, where the electronic device may be an electronic device that constitutes a user browsing device; as shown in fig. 4, the page refreshing apparatus may include an acquisition unit 401 and a processing unit 402. The page refreshing device may perform the page refreshing method shown in fig. 1 or fig. 2, i.e. the page refreshing device may operate the above units:
an obtaining unit 401, configured to obtain, when a page switching operation is detected, a target configuration file, where the target configuration file is used to indicate whether each page in at least one page supports to be refreshed, and the at least one page includes a target page indicated by the page switching operation;
A processing unit 402, configured to determine, based on the target configuration file and the local storage data, whether the target page is a page to be refreshed, where a page to be refreshed refers to a page that is not refreshed and supports to be refreshed;
the processing unit 402 is further configured to perform page refreshing on the target page if the target page is a page to be refreshed.
In one embodiment, the target configuration file includes a page identifier and a target online timestamp of each of at least one key page, where one key page refers to a page that does not support being refreshed; or the target configuration file comprises page identifiers of the pages, refresh indication identifiers of the pages and the target online time stamp, wherein one refresh indication identifier is a refresh supporting identifier or a refresh non-supporting identifier, and the page indicated by the refresh non-supporting identifier is a key page.
In another embodiment, when determining whether the target page is a page to be refreshed based on the target configuration file and the locally stored data, the processing unit 402 may be specifically configured to:
If the target online time stamp in the target configuration file is different from the online time stamp in the local storage data, determining that the target page is not refreshed, and judging whether the target page is a key page or not based on the target configuration file;
If the target page is a key page, determining that the target page does not support to be refreshed, and determining that the target page is not a page to be refreshed;
and if the target page is not the key page, determining that the target page supports refreshing, and determining that the target page is a page to be refreshed.
In another embodiment, when determining whether the target page is a key page based on the target configuration file, the processing unit 402 may be specifically configured to:
If the target configuration file comprises the page identifier of each key page, determining whether the target configuration file comprises the page identifier of the target page, if the target configuration file comprises the page identifier of the target page, determining that the target page is a key page, and if the target configuration file does not comprise the page identifier of the target page, determining that the target page is not a key page; or alternatively
If the target configuration file comprises page identifiers and refresh indication identifiers of all the pages, determining the refresh indication identifier of the target page from the target configuration file based on the page identifiers of the target page, if the determined refresh indication identifier is a refresh supporting identifier, determining that the target page is not a key page, and if the determined refresh indication identifier is a refresh supporting identifier, determining that the target page is a key page.
In another embodiment, the obtaining unit 401, when obtaining the target configuration file, may be specifically configured to:
Sending a configuration file request to front-end configuration service equipment, so that the front-end configuration service equipment determines a target configuration file based on the configuration file request, wherein the configuration file request comprises application identifications of applications acted by the page switching operation, the front-end configuration service equipment comprises at least one application identification and a configuration file corresponding to each application identification in the at least one application identification, and the target configuration file is determined based on the application identifications of the applications acted by the page switching operation;
and receiving the target configuration file returned by the front-end configuration service equipment to acquire the target configuration file.
In another embodiment, one configuration file in the front-end configuration service device is sent to the front-end configuration service device by a front-end packaging device, one configuration file is generated by the front-end packaging device when detecting a corresponding front-end packaging online operation, and one configuration file is generated based on a key page identified in a corresponding project file and a corresponding online timestamp:
wherein the online timestamp support in one configuration file is added to the corresponding project file.
In another embodiment, the application mode corresponding to the at least one page is a single-page application mode, and each page is a page segment; the processing unit 402 may also be configured to:
Determining M pages to be refreshed from the at least one page based on the target configuration file, wherein the M pages to be refreshed are pages except the target page in all pages supporting to be refreshed, which are included in the at least one page, and M is a non-negative integer;
and acquiring updated front-end codes, and refreshing each page in the M pages to be refreshed by adopting the updated front-end codes.
According to one embodiment of the invention, the steps involved in the method of fig. 1 or 2 may be performed by the units of the page refresh device of fig. 4. For example, step S101 shown in fig. 1 may be performed by the acquisition unit 401 shown in fig. 4, and steps S102 and S103 may each be performed by the processing unit 402 shown in fig. 4. As another example, step S201 shown in fig. 2 may be performed by the acquisition unit 401 shown in fig. 4, steps S202 to S205 may each be performed by the processing unit 402 shown in fig. 4, and so on.
According to another embodiment of the present invention, each unit in the page refreshing apparatus shown in fig. 4 may be separately or completely combined into one or several other units, or some unit(s) thereof may be further split into a plurality of units with smaller functions, which may achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present invention. The above units are divided based on logic functions, and in practical applications, the functions of one unit may be implemented by a plurality of units, or the functions of a plurality of units may be implemented by one unit. In other embodiments of the present invention, any page refreshing apparatus may also include other units, and in practical applications, these functions may also be implemented with assistance from other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present invention, the page refreshing apparatus as shown in fig. 4 may be constructed by running a computer program (including program code) capable of executing the steps involved in the respective methods as shown in fig. 1 or 2 on a general-purpose electronic device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), and the like, and a storage element, and the page refreshing method of the embodiment of the present invention is implemented. The computer program may be recorded on, for example, a computer storage medium, and loaded into and run in the above-described electronic device through the computer storage medium.
The embodiment of the invention can acquire the target configuration file when the page switching operation is detected, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises the target page indicated by the page switching operation; then, based on the target configuration file and the local storage data, judging whether the target page is a page to be refreshed, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing; and if the target page is the page to be refreshed, carrying out page refreshing on the target page. Therefore, the embodiment of the invention can conveniently realize page refreshing under the condition of avoiding user perception, thereby improving the use experience of users.
Based on the description of the method embodiment and the apparatus embodiment, the exemplary embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor for causing the electronic device to perform a method according to an embodiment of the invention when executed by the at least one processor.
The exemplary embodiments of the present invention also provide a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is for causing the computer to perform a method according to an embodiment of the present invention.
The exemplary embodiments of the invention also provide a computer program product comprising a computer program, wherein the computer program, when being executed by a processor of a computer, is for causing the computer to perform a method according to an embodiment of the invention.
With reference to fig. 5, a block diagram of an electronic device 500 that may be a server or a client of the present invention will now be described, which is an example of a hardware device that may be applied to aspects of the present invention. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 may also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in electronic device 500 are connected to I/O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. The output unit 507 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 508 may include, but is not limited to, magnetic disks, optical disks. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices over a computer network such as the internet and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the page refresh method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the page refresh method by any other suitable means (e.g., by means of firmware).
Program code for carrying out methods of the present invention may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It is also to be understood that the foregoing is merely illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (10)

1. A page refreshing method, comprising:
when a page switching operation is detected, acquiring a target configuration file, wherein the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises a target page indicated by the page switching operation;
Judging whether the target page is a page to be refreshed or not based on the target configuration file and the local storage data, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing;
And if the target page is the page to be refreshed, carrying out page refreshing on the target page.
2. The method of claim 1, wherein the target profile includes a page identification and a target online timestamp for each of at least one key page, one key page being a page that does not support being refreshed; or the target configuration file comprises page identifiers of the pages, refresh indication identifiers of the pages and the target online time stamp, wherein one refresh indication identifier is a refresh supporting identifier or a refresh non-supporting identifier, and the page indicated by the refresh non-supporting identifier is a key page.
3. The method according to claim 1 or 2, wherein the determining whether the target page is a page to be refreshed based on the target profile and the locally stored data comprises:
If the target online time stamp in the target configuration file is different from the online time stamp in the local storage data, determining that the target page is not refreshed, and judging whether the target page is a key page or not based on the target configuration file;
If the target page is a key page, determining that the target page does not support to be refreshed, and determining that the target page is not a page to be refreshed;
and if the target page is not the key page, determining that the target page supports refreshing, and determining that the target page is a page to be refreshed.
4. The method of claim 3, wherein the determining whether the target page is a critical page based on the target profile comprises:
If the target configuration file comprises the page identifier of each key page, determining whether the target configuration file comprises the page identifier of the target page, if the target configuration file comprises the page identifier of the target page, determining that the target page is a key page, and if the target configuration file does not comprise the page identifier of the target page, determining that the target page is not a key page; or alternatively
If the target configuration file comprises page identifiers and refresh indication identifiers of all the pages, determining the refresh indication identifier of the target page from the target configuration file based on the page identifiers of the target page, if the determined refresh indication identifier is a refresh supporting identifier, determining that the target page is not a key page, and if the determined refresh indication identifier is a refresh supporting identifier, determining that the target page is a key page.
5. The method according to claim 1 or 2, wherein the obtaining the target profile comprises:
Sending a configuration file request to front-end configuration service equipment, so that the front-end configuration service equipment determines a target configuration file based on the configuration file request, wherein the configuration file request comprises application identifications of applications acted by the page switching operation, the front-end configuration service equipment comprises at least one application identification and a configuration file corresponding to each application identification in the at least one application identification, and the target configuration file is determined based on the application identifications of the applications acted by the page switching operation;
and receiving the target configuration file returned by the front-end configuration service equipment to acquire the target configuration file.
6. The method of claim 5, wherein one of the configuration files in the front-end provisioning service device is sent to the front-end provisioning service device by a front-end packaging device, one configuration file is generated by the front-end packaging device upon detection of a corresponding front-end packaging online operation, and one configuration file is generated based on the key pages identified in the corresponding project file and the corresponding online timestamp:
wherein the online timestamp support in one configuration file is added to the corresponding project file.
7. The method according to claim 1 or 2, wherein the application mode corresponding to the at least one page is a single page application mode, and each page is a page segment; the method further comprises the steps of:
Determining M pages to be refreshed from the at least one page based on the target configuration file, wherein the M pages to be refreshed are pages except the target page in all pages supporting to be refreshed, which are included in the at least one page, and M is a non-negative integer;
and acquiring updated front-end codes, and refreshing each page in the M pages to be refreshed by adopting the updated front-end codes.
8. A page refreshing apparatus, the apparatus comprising:
The device comprises an acquisition unit, a storage unit and a display unit, wherein the acquisition unit is used for acquiring a target configuration file when a page switching operation is detected, the target configuration file is used for indicating whether each page in at least one page supports refreshing or not, and the at least one page comprises a target page indicated by the page switching operation;
the processing unit is used for judging whether the target page is a page to be refreshed or not based on the target configuration file and the local storage data, wherein one page to be refreshed refers to a page which is not refreshed and supports refreshing;
And the processing unit is further used for refreshing the target page if the target page is the page to be refreshed.
9. An electronic device, comprising:
a processor; and
A memory in which a program is stored,
Wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method according to any of claims 1-7.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-7.
CN202410336649.4A 2024-03-22 2024-03-22 Page refreshing method and device, storage medium and electronic equipment Pending CN118034843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410336649.4A CN118034843A (en) 2024-03-22 2024-03-22 Page refreshing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410336649.4A CN118034843A (en) 2024-03-22 2024-03-22 Page refreshing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN118034843A true CN118034843A (en) 2024-05-14

Family

ID=90995113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410336649.4A Pending CN118034843A (en) 2024-03-22 2024-03-22 Page refreshing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN118034843A (en)

Similar Documents

Publication Publication Date Title
US10877826B2 (en) Message processing method and apparatus, storage medium, and computer device
EP2854372B1 (en) Method and device for displaying pushed information
US10455542B2 (en) Method of synchronizing notification messages for electronic devices and electronic devices
US10110549B2 (en) Method, server and electronic devices of synchronizing notification messages for electronic devices
US20200333930A1 (en) Information processing method, terminal, server, and computer storage medium
US20120260202A1 (en) Customized launching of applications
WO2017121278A1 (en) Information-pushing device, method, client and machine-readable storage medium
US11829588B2 (en) Method, apparatus, and system for generating resource value transfer request
TW201411467A (en) Data processing method and device
CN113568699B (en) Content display method, device, equipment and storage medium
CN112055072A (en) Cloud audio input method and device, cloud system, electronic equipment and storage medium
CN115309470B (en) Method, device, equipment and storage medium for loading widget
CN114748873B (en) Interface rendering method, device, equipment and storage medium
CN115470432A (en) Page rendering method and device, electronic equipment and computer readable medium
CN113805962A (en) Application page display method and device and electronic equipment
CN107171927B (en) Information processing method and electronic equipment
CN113420002A (en) Data synchronization method and device, electronic equipment and storage medium
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
WO2022237310A1 (en) Method and apparatus for displaying text message, electronic device, and storage medium
CN118034843A (en) Page refreshing method and device, storage medium and electronic equipment
CN115390707A (en) Sharing processing method and device, electronic equipment and storage medium
CN113747423A (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
CN113535020A (en) Method, apparatus, device, medium and product for generating application icons
CN114401300B (en) Cloud application control method, device, equipment, medium and program product
CN113495888B (en) Identification management method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination