CN116501344A - Page updating method and device - Google Patents

Page updating method and device Download PDF

Info

Publication number
CN116501344A
CN116501344A CN202310342272.9A CN202310342272A CN116501344A CN 116501344 A CN116501344 A CN 116501344A CN 202310342272 A CN202310342272 A CN 202310342272A CN 116501344 A CN116501344 A CN 116501344A
Authority
CN
China
Prior art keywords
page
application version
information
version information
server
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
CN202310342272.9A
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.)
Boc Financial Technology Co ltd
Original Assignee
Boc Financial Technology 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 Boc Financial Technology Co ltd filed Critical Boc Financial Technology Co ltd
Priority to CN202310342272.9A priority Critical patent/CN116501344A/en
Publication of CN116501344A publication Critical patent/CN116501344A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a page updating method and a page updating device, which relate to the technical field of information processing and comprise the following steps: under the condition that a first trigger condition is met, application version query request information of a first page is sent to a server, wherein the version query request information is used for indicating the server to query current application version information of the first page, and the first trigger condition comprises at least one of the following: a sending condition triggered based on page operation and a sending condition triggered based on period; and receiving the current application version information sent by the server, and controlling the refreshing operation of the first page according to the local application version information and the current application version information of the first page. And actively sending application version inquiry request information of the first page to the server, further acquiring latest current application version information from the server, and then controlling whether the first page is refreshed or not according to the current application version information and the local application version information, wherein the whole process does not need operation of a user.

Description

Page updating method and device
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for updating a page.
Background
With the development of technology, the content loaded in the web page is more and more abundant, for example, a single page application is loaded in many web pages, and the single page application is a web page application program which loads a single web page and dynamically updates the page when a user interacts with the application program.
After the version is updated, the client side obtains the latest version due to the cache of the browser, so that the user cannot see the latest content in time, and even the system is abnormal due to the inconsistency of the versions. In order to solve the problem, the user usually needs to manually refresh the web page to obtain the latest version, the operation in the mode is complex, the manual refresh mode is passive, the user does not know whether to refresh or not in many cases, the web page is refreshed but not in some cases, the user experience is poor, and the data flow of the user is wasted.
Disclosure of Invention
The invention provides a page updating method and device, which are used for solving the defect that in the prior art, a client side has delay in acquiring the latest version due to the cache of a browser after version updating of a single page application.
The invention provides a page updating method, which comprises the following steps:
under the condition that a first trigger condition is met, application version query request information of a first page is sent to a server, wherein the version query request information is used for indicating the server to query current application version information of the first page, and the first trigger condition comprises at least one of the following: a sending condition triggered based on page operation and a sending condition triggered based on period;
and receiving the current application version information sent by the server, and controlling the refreshing operation of the first page according to the local application version information of the first page and the current application version information.
According to the page updating method provided by the invention, the application version query request information comprises the routing information of the first page, or the routing information of each single-page application in the first page.
According to the page updating method provided by the invention, the current application version information comprises the following steps: the method comprises the steps of enabling current overall version information of a first page and current application version information of each single-page application in the first page; the local application version information includes: and the local overall version information of the first page and the local application version information of each single-page application are cached locally.
According to the page updating method provided by the invention, the refreshing operation of the first page is controlled according to the local application version information and the current application version information of the first page, and the method comprises the following steps:
acquiring current application version information and local application version information of each single-page application in the first page under the condition that the current overall version information is inconsistent with the local application version information;
and controlling the first page to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page does not comprise a form interface.
According to the page updating method provided by the invention, after the step of acquiring the current application version information and the local application version information of each single-page application in the first page, the method further comprises the following steps:
controlling the first page not to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page comprises a form interface;
or under the condition that the current application version information and the local application version information of all the single-page applications are consistent, controlling the first page not to execute the refreshing operation.
According to the page updating method provided by the invention, the refreshing operation of the first page is controlled according to the local application version information and the current application version information of the first page, and the method comprises the following steps:
and under the condition that the current application version information comprises a preset character string and the first page does not comprise a form interface, controlling the first page to execute refreshing operation.
According to the page updating method provided by the invention, after the step of sending the application version query request information of the first page to the server, the method further comprises the following steps:
after N times of application version query request information are sent to the server, the current application version information sent by the server is not received in a first preset time period, and the application version query request information is stopped from being sent to the server in the current session period.
The invention provides another page updating method, which comprises the following steps:
receiving application version query request information of a first page sent by a webpage terminal, wherein the application version query request information comprises routing information of the first page or routing information of each single-page application in the first page;
matching application version information corresponding to the routing information in a preset information base to obtain current application version information of the first page, and sending the current application version information of the first page to the webpage terminal;
the current application version information of the first page is used for indicating the webpage terminal to carry out refreshing control of the first page; the preset information base stores at least one page of routing information, and each piece of routing information is associated with and stores application version information of a page corresponding to the routing information.
According to the page updating method provided by the invention, the method further comprises the following steps:
and under the condition that the page component corresponding to the target routing information in the preset information base is subjected to version change, updating the application version information corresponding to the target routing information in the preset information base.
The invention also provides a page updating device, which comprises:
the sending module is configured to send, to a server, application version query request information of a first page if a first trigger condition is satisfied, where the version query request information is used to instruct the server to query current application version information of the first page, and the first trigger condition includes at least one of: a sending condition triggered based on page operation and a sending condition triggered based on period;
and the control module is used for receiving the current application version information sent by the server and controlling the refreshing operation of the first page according to the local application version information of the first page and the current application version information.
According to the page updating device provided by the invention, the current application version information comprises: the method comprises the steps of enabling current overall version information of a first page and current application version information of each single-page application in the first page; the local application version information includes: and the local overall version information of the first page and the local application version information of each single-page application are cached locally.
According to the page updating device provided by the invention, the device is further used for:
acquiring current application version information and local application version information of each single-page application in the first page under the condition that the current overall version information is inconsistent with the local application version information;
and controlling the first page to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page does not comprise a form interface.
According to the page updating device provided by the invention, the device is further used for:
controlling the first page not to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page comprises a form interface;
or under the condition that the current application version information and the local application version information of all the single-page applications are consistent, controlling the first page not to execute the refreshing operation.
According to the page updating device provided by the invention, the device is further used for:
after N times of application version query request information are sent to the server, the current application version information sent by the server is not received in a first preset time period, and the application version query request information is stopped from being sent to the server in the current session period.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the page updating method as described above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a page update method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a page update method as described in any one of the above.
According to the page updating method and device, the application version query request information of the first page is actively sent to the server under the condition that the sending condition triggered by page operation or the sending condition triggered by period is met, the latest current application version information is further obtained from the server, whether the first page is refreshed or not is controlled according to the current application version information and the local application version information, the whole process does not need operation of a user, page refreshing can be automatically carried out when version updating of single page application in the page occurs automatically, new version content is obtained, the problem that manual refreshing of the user is needed is avoided, and the use experience of the user is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a page update method according to an embodiment of the present application;
FIG. 2 is a second schematic diagram of a page update method according to an embodiment of the present application
FIG. 3 is a schematic diagram of a page update apparatus according to an embodiment of the present disclosure;
FIG. 4 is a second schematic diagram of a page updating apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of a page update method according to an embodiment of the present application, as shown in fig. 1, including:
step 110, sending application version query request information of a first page to a server under the condition that a first trigger condition is met, wherein the version query request information is used for indicating the server to query current application version information of the first page, and the first trigger condition comprises at least one of the following: a sending condition triggered based on page operation and a sending condition triggered based on period;
the first page described in the embodiment of the present application may specifically be a web page or an application page that is being used by a user in the foreground, where the first page may include one or more single-page applications, and may also include other content, such as form information, text information, and so on.
In the embodiment of the present application, the first trigger condition may be at least one of a transmission condition triggered based on a page operation or a transmission condition triggered based on a period.
Specifically, the sending condition triggered based on the page operation may refer to a case where the user is detected to operate a specific identifier in the first page, or a case where the user is detected to not operate within a first preset period of time.
For example, in the case that the user clicks the second level submenu identifier in the first page, it is stated that the user may need to use the lower level menu function, and at this time, it may attempt to check the application version information of the first page, so as to avoid error reporting caused by inconsistent versions when the user uses the first page.
For another example, if any operation of the first page by the user is not detected within 3min, it is indicated that the user may temporarily not use the device at this time, and at this time, in order to facilitate the subsequent use by the user, the verification of the application version information of the first page may be actively attempted.
In this embodiment of the present application, if the first trigger condition is met, it is considered that the web page terminal may actively attempt to check the application version information, and at this time, the web page terminal may actively send the application version query request information of the first page to the corresponding server.
The web page terminal may specifically be a terminal device for opening a web page, such as a smart phone.
The application version query request information described in the embodiment of the present application may specifically be route information of the first page, and may also include route information of each single-page application in the first page.
The server described in the embodiment of the present application may specifically monitor the version of each route through preset configuration in the process of system development, record the version information of the application in the updated route, and record and store the version information and the routing address by using the routing address as a key and the version number as a value, for example { ' all ': 20221212', '/path1': 20221211', ' path2': 20221212' }, and may also store the application version information and the routing address in an associated manner. The version record file is deployed to the web server along with the code file. all marks the integral version number, each time can be changed, when there is a great change and a special version, the version value is manually updated to be the special version, the conventional version number adopts the form of the current date, and the special version uses the character strings in the forms of v1.0 and v 2.0.
And in the system development process, the change condition of each component is recorded, and the components can comprise components of a single-page application. If the component is changed, the change content and change operation (deletion, editing, and addition) are recorded. The version information is correspondingly updated in the updatemoute.
In this embodiment of the present application, after receiving the application version query request information of the first page, the server may query, according to the routing information, the current application version information of the corresponding first page, and then send the current application version information back to the local device.
And 120, receiving the current application version information sent by the server, and controlling the refreshing operation of the first page according to the local application version information and the current application version information of the first page.
After receiving the current application version information sent back by the server, the web page terminal firstly judges whether the current application version information is special version information containing special characters, and if the current application version information is the special version information and the first page does not contain a form interface, the first page is correspondingly and directly refreshed.
If the current application version information is the special version information containing the special characters, whether the version is inconsistent or not is further judged through consistency comparison of the local application version information and the current application version information, and then refreshing operation of the first page is controlled according to a consistency comparison result.
In this embodiment of the present application, the refresh operation of the first page may be specifically controlled by controlling the first page to perform refresh operation, or may be controlled by controlling the first page not to perform refresh operation.
In the embodiment of the application, under the condition that the sending condition triggered by the page operation or the sending condition triggered by the period is met, the application version query request information of the first page is actively sent to the server, the latest current application version information is further obtained from the server, then whether the first page is refreshed or not is controlled according to the current application version information and the local application version information, the whole process does not need operation of a user, page refreshing can be automatically carried out when version updating of single-page application in the page occurs automatically, new version content is obtained, the problem that the user needs to manually refresh is solved, and the use experience of the user is improved.
Optionally, the current application version information includes: the method comprises the steps of enabling current overall version information of a first page and current application version information of each single-page application in the first page; the local application version information includes: and the local overall version information of the first page and the local application version information of each single-page application are cached locally.
In this embodiment of the present application, the current global version information specifically refers to global version information of all component version information stored in the server, and the local global version information refers to global version information of all component version information stored in the web page terminal.
In the embodiment of the present application, each single-page application in the first page may specifically refer to a single-page application loaded in the first page, for example, a video playing single-page application, or a text editing single-page application.
In this embodiment of the present application, each single-page application may specifically also correspond to a route, and each corresponding single-page application also corresponds to version information.
In the embodiment of the invention, whether version updating is needed or not can be effectively judged by the current integral version information of the first page, the current application version information of each single-page application in the first page, the local integral version information of the first page and the local application version information of each single-page application which are cached locally.
Optionally, controlling the refresh operation of the first page according to the local application version information and the current application version information of the first page includes:
acquiring current application version information and local application version information of each single-page application in the first page under the condition that the current overall version information is inconsistent with the local application version information;
and controlling the first page to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page does not comprise a form interface.
In the embodiment of the application, in the case that the current overall version information is inconsistent with the local application version information, it is indicated that a version may exist in a component which may exist in the first page at this time and version update is needed.
The single-page application has a larger influence on the use experience of the user, so that the current application version information and the local application version information of each single-page application in the first page can be obtained for deep comparison.
When the current application version information and the local application version information of any single-page application are inconsistent, it is indicated that the single-page application needing version update exists, and when the first page does not comprise the form interface, it is indicated that refreshing the page at the moment does not greatly affect the use of a user, and therefore the first page can be controlled to execute refreshing operation at the moment.
In the embodiment of the application, when the current overall version information is inconsistent with the local application version information, and when any one of the current application version information and the local application version information of the single-page application is inconsistent, and the first page does not include a form interface, the first page is controlled to execute the refreshing operation, so that the first application can be controlled to update in time under the condition that the single-page application needs to update the version, single-page application faults caused by the inconsistent version are avoided, and the use experience of a user is ensured.
Optionally, after the step of obtaining the current application version information and the local application version information of each single-page application in the first page, the method further includes:
controlling the first page not to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page comprises a form interface;
or under the condition that the current application version information and the local application version information of all the single-page applications are consistent, controlling the first page not to execute the refreshing operation.
In this embodiment of the present application, when the current application version information and the local application version information of any one of the single-page applications are inconsistent, it is indicated that the single-page application needs to update the version in the first page, and when the first page includes the form interface, in order to avoid that the content of the form interface needs to be refilled by the user due to page refreshing, the first page is controlled not to execute the refreshing operation.
In an optional embodiment, in a case that the current application version information and the local application version information of all the single-page applications are consistent, it is indicated that no single-page application in the first page needs to perform version update at this time, and the first page may be controlled not to perform refresh operation.
In the embodiment of the application, when the current application version information and the local application version information of any single page application are inconsistent, and the first page comprises the form interface, the first page is not refreshed, so that the user can be effectively prevented from refilling the content in the expression interface due to page refreshing, and the user experience is improved.
Optionally, controlling the refresh operation of the first page according to the local application version information and the current application version information of the first page includes:
and under the condition that the current application version information comprises a preset character string and the first page does not comprise a form interface, controlling the first page to execute refreshing operation.
The preset strings described in the embodiments of the present application may be preset strings, for example, v1.0 and v2.0, where the preset strings represent special version information, and if the current application version information includes the preset strings, it is indicated that the current version is a special version, and the update needs to be performed immediately.
Therefore, in the embodiment of the present application, it may be further determined whether the first page includes a form interface, if the first page includes the form interface, the refresh operation is not performed, and if the first page does not include the form interface, the refresh operation is controlled to be performed on the first page.
In the embodiment of the application, when the current application version information includes the preset character string and the first page does not include the form interface, the first page is controlled to execute the refresh operation, so that the special version can be effectively updated, and the normal use of the page is ensured.
Optionally, after the step of sending the application version query request information of the first page to the server, the method further includes:
after N times of application version query request information are sent to the server, the current application version information sent by the server is not received in a first preset time period, and the application version query request information is stopped from being sent to the server in the current session period.
Specifically, in this embodiment of the present application, after N application version query request messages are sent to the server, in a first preset period, the failure of the latest version information at this time is indicated if the current application version information sent by the server is not received, and the failure times and the corresponding routing addresses may be further recorded, and when the failure times reach a threshold value, the version acquisition operation is not triggered in the current session period.
The first preset time period described in the embodiment of the present application may be a preset time period, and the current session period may be a current session period.
In the embodiment of the application version query request information is sent to the server in the current session period, and the server does not receive the current application version information sent by the server in the first preset time period, so that the useless information can be effectively prevented from being repeatedly sent for many times.
In an optional embodiment, version update detection is performed on a specific route in a single page application, the change condition of each component is recorded in the code writing process, all components on which the interface depends are found according to the interfaces corresponding to the routes in packaging, the version number of the current route is generated based on the update condition of all the dependent components, and if the version corresponding to the current route accessed by a client is changed, whether to trigger the refresh operation of the browser immediately is further determined according to the content displayed by the current interface.
FIG. 2 is a second flowchart of a page update method according to an embodiment of the present application, as shown in FIG. 2, including:
step 210, receiving application version query request information of a first page sent by a web page terminal, wherein the application version query request information comprises routing information of the first page, or routing information of each single-page application in the first page;
specifically, the server receives application version query request information of the first page sent by the webpage terminal, where the application version query request information may specifically be route information of the first page, and the application version query request information may further include route information of each component in the first page, for example, route information of each single-page application in the first page.
According to the embodiment of the application, the page information can be accurately retrieved and positioned through the page routing information.
Step 220, matching application version information corresponding to the routing information in a preset information base to obtain current application version information of the first page, and sending the current application version information of the first page to the webpage terminal;
the current application version information of the first page is used for indicating the webpage terminal to carry out refreshing control of the first page; the preset information base stores at least one page of routing information, and each piece of routing information is associated with and stores application version information of a page corresponding to the routing information.
After the server receives the application version query request information, the application version information corresponding to the routing information of the first page can be queried in a preset information base, and then the current application version information of the first page is determined.
In an optional embodiment, the preset information base may be updated route in the above embodiment, where routing information of at least one page may be stored in the preset information base, and the latest application version information of the page and the routing information are stored in association, so that the current application version information of the first page may be determined by matching corresponding application version information according to the routing information of the first page in the preset information base.
After determining the current application version information of the first page, the server sends the current application version information of the first page to the requested webpage terminal, and the webpage terminal compares the current application version information of the first page with the local application version information locally stored in the webpage terminal after receiving the current application version information of the first page, so that refreshing of the first page is controlled.
In the embodiment of the application, the webpage terminal actively transmits the application version query request information of the first page to the server, so that the latest current application version information is acquired from the server, whether the first page is refreshed or not is controlled according to the current application version information and the local application version information, the whole process does not need operation of a user, page refreshing can be automatically performed when version updating of single-page application in the page occurs automatically, new version content is acquired, the problem that the user needs to refresh manually is avoided, and the use experience of the user is improved.
Optionally, the method further comprises:
and under the condition that the page component corresponding to the target routing information in the preset information base is subjected to version change, updating the application version information corresponding to the target routing information in the preset information base.
In the embodiment of the application, in the process of constructing and packaging page contents, all the component dependencies of the pages corresponding to each routing information in the preset information base can be further obtained, whether the components of the pages corresponding to each routing information in each preset information base are changed or not is searched through the component change records, if any component is changed, the corresponding routing information is considered to be changed, version information update is needed, and if all the dependent components of the pages corresponding to the routing information are not changed, version information update is not needed, and the original version number is kept.
In an alternative embodiment, the monitoring of the corresponding component change may be performed for a specific route, if any component is changed, the corresponding route information is considered to be changed, version information update is required, if all the dependent components of the corresponding page of the route information are not changed, version information update is not required, and the original version number is maintained.
In the embodiment of the application, under the condition that the page component corresponding to the target routing information is subjected to version change, the application version information corresponding to the target routing information is updated in the preset information base in time, so that the application version information in the preset information base is always the latest version, and the condition that the version information is not updated in time is avoided.
The page updating device provided by the invention is described below, and the page updating device described below and the page updating method described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a page updating apparatus according to an embodiment of the present application, as shown in fig. 3, including:
the sending module 310 is configured to send, to a server, application version query request information of a first page if a first trigger condition is met, where the version query request information is used to instruct the server to query current application version information of the first page, and the first trigger condition includes at least one of: a sending condition triggered based on page operation and a sending condition triggered based on period;
the control module 320 is configured to receive the current application version information sent by the server, and control a refresh operation of the first page according to the local application version information and the current application version information of the first page.
Optionally, the device is further configured to:
acquiring current application version information and local application version information of each single-page application in the first page under the condition that the current overall version information is inconsistent with the local application version information;
and controlling the first page to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page does not comprise a form interface.
Optionally, the device is further configured to:
controlling the first page not to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page comprises a form interface;
or under the condition that the current application version information and the local application version information of all the single-page applications are consistent, controlling the first page not to execute the refreshing operation.
Optionally, the device is further configured to:
after N times of application version query request information are sent to the server, the current application version information sent by the server is not received in a first preset time period, and the application version query request information is stopped from being sent to the server in the current session period.
In the embodiment of the application, under the condition that the sending condition triggered by the page operation or the sending condition triggered by the period is met, the application version query request information of the first page is actively sent to the server, the latest current application version information is further obtained from the server, then whether the first page is refreshed or not is controlled according to the current application version information and the local application version information, the whole process does not need operation of a user, page refreshing can be automatically carried out when version updating of single-page application in the page occurs automatically, new version content is obtained, the problem that the user needs to manually refresh is solved, and the use experience of the user is improved.
Fig. 4 is a second schematic structural diagram of a page updating apparatus according to an embodiment of the present application, as shown in fig. 4, including:
the receiving module 410 is configured to receive application version query request information of a first page sent by a web page terminal, where the application version query request information includes routing information of the first page, or routing information of each single-page application in the first page;
the processing module 420 is configured to match application version information corresponding to the routing information in a preset information base, obtain current application version information of the first page, and send the current application version information of the first page to the web page terminal;
the current application version information of the first page is used for indicating the webpage terminal to carry out refreshing control of the first page; the preset information base stores at least one page of routing information, and each piece of routing information is associated with and stores application version information of a page corresponding to the routing information.
Optionally, the device is further configured to:
and under the condition that the page component corresponding to the target routing information in the preset information base is subjected to version change, updating the application version information corresponding to the target routing information in the preset information base.
In the embodiment of the application, under the condition that the page component corresponding to the target routing information is subjected to version change, the application version information corresponding to the target routing information is updated in the preset information base in time, so that the application version information in the preset information base is always the latest version, and the condition that the version information is not updated in time is avoided.
Fig. 5 is a schematic structural diagram of an electronic device according to the present invention, as shown in fig. 5, the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a page update method comprising: under the condition that a first trigger condition is met, application version query request information of a first page is sent to a server, wherein the version query request information is used for indicating the server to query current application version information of the first page, and the first trigger condition comprises at least one of the following: a sending condition triggered based on page operation and a sending condition triggered based on period;
and receiving the current application version information sent by the server, and controlling the refreshing operation of the first page according to the local application version information of the first page and the current application version information.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the page update method provided by the methods described above, the method comprising: under the condition that a first trigger condition is met, application version query request information of a first page is sent to a server, wherein the version query request information is used for indicating the server to query current application version information of the first page, and the first trigger condition comprises at least one of the following: a sending condition triggered based on page operation and a sending condition triggered based on period;
and receiving the current application version information sent by the server, and controlling the refreshing operation of the first page according to the local application version information of the first page and the current application version information.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a page update method provided by the above methods, the method comprising: under the condition that a first trigger condition is met, application version query request information of a first page is sent to a server, wherein the version query request information is used for indicating the server to query current application version information of the first page, and the first trigger condition comprises at least one of the following: a sending condition triggered based on page operation and a sending condition triggered based on period;
and receiving the current application version information sent by the server, and controlling the refreshing operation of the first page according to the local application version information of the first page and the current application version information.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for updating a page, comprising:
under the condition that a first trigger condition is met, application version query request information of a first page is sent to a server, wherein the version query request information is used for indicating the server to query current application version information of the first page, and the first trigger condition comprises at least one of the following: a sending condition triggered based on page operation and a sending condition triggered based on period;
and receiving the current application version information sent by the server, and controlling the refreshing operation of the first page according to the local application version information of the first page and the current application version information.
2. The page updating method according to claim 1, wherein the application version query request information includes routing information of the first page or routing information of each single-page application in the first page.
3. The page updating method according to claim 1, wherein the current application version information includes: the method comprises the steps of enabling current overall version information of a first page and current application version information of each single-page application in the first page; the local application version information includes: and the local overall version information of the first page and the local application version information of each single-page application are cached locally.
4. The page updating method according to claim 3, wherein controlling the refresh operation of the first page according to the local application version information and the current application version information of the first page comprises:
acquiring current application version information and local application version information of each single-page application in the first page under the condition that the current overall version information is inconsistent with the local application version information;
and controlling the first page to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page does not comprise a form interface.
5. The page updating method according to claim 4, further comprising, after the step of acquiring the current application version information and the local application version information of each single-page application in the first page:
controlling the first page not to execute refreshing operation under the condition that the current application version information and the local application version information of any single-page application are inconsistent and the first page comprises a form interface;
or under the condition that the current application version information and the local application version information of all the single-page applications are consistent, controlling the first page not to execute the refreshing operation.
6. The page updating method according to claim 3, wherein controlling the refresh operation of the first page according to the local application version information and the current application version information of the first page comprises:
and under the condition that the current application version information comprises a preset character string and the first page does not comprise a form interface, controlling the first page to execute refreshing operation.
7. The page updating method according to claim 1, further comprising, after the step of transmitting the application version query request information of the first page to the server:
after N times of application version query request information are sent to the server, the current application version information sent by the server is not received in a first preset time period, and the application version query request information is stopped from being sent to the server in the current session period.
8. A method for updating a page, comprising:
receiving application version query request information of a first page sent by a webpage terminal, wherein the application version query request information comprises routing information of the first page or routing information of each single-page application in the first page;
matching application version information corresponding to the routing information in a preset information base to obtain current application version information of the first page, and sending the current application version information of the first page to the webpage terminal;
the current application version information of the first page is used for indicating the webpage terminal to carry out refreshing control of the first page; the preset information base stores at least one page of routing information, and each piece of routing information is associated with and stores application version information of a page corresponding to the routing information.
9. The page update method of claim 8, wherein the method further comprises:
and under the condition that the page component corresponding to the target routing information in the preset information base is subjected to version change, updating the application version information corresponding to the target routing information in the preset information base.
10. A page updating apparatus, characterized by comprising:
the sending module is configured to send, to a server, application version query request information of a first page if a first trigger condition is satisfied, where the version query request information is used to instruct the server to query current application version information of the first page, and the first trigger condition includes at least one of: a sending condition triggered based on page operation and a sending condition triggered based on period;
and the control module is used for receiving the current application version information sent by the server and controlling the refreshing operation of the first page according to the local application version information of the first page and the current application version information.
CN202310342272.9A 2023-03-31 2023-03-31 Page updating method and device Pending CN116501344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310342272.9A CN116501344A (en) 2023-03-31 2023-03-31 Page updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310342272.9A CN116501344A (en) 2023-03-31 2023-03-31 Page updating method and device

Publications (1)

Publication Number Publication Date
CN116501344A true CN116501344A (en) 2023-07-28

Family

ID=87319324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310342272.9A Pending CN116501344A (en) 2023-03-31 2023-03-31 Page updating method and device

Country Status (1)

Country Link
CN (1) CN116501344A (en)

Similar Documents

Publication Publication Date Title
US11461267B2 (en) Method, device and computer readable medium for accessing files
CN107682361B (en) Website vulnerability scanning method and device, computer equipment and storage medium
CN107783770B (en) Page configuration updating method, device, server and medium
CN109542851A (en) File updating method, apparatus and system
US20110099607A1 (en) Method of authenticating and branding emails and other messages using information available in a message list
CN112417360B (en) Webpage rendering method and device
CN110727892A (en) Cache data updating method and device and electronic equipment
CN114598748A (en) Method, device and system for refreshing cache resources
US20230221952A1 (en) Disabling a script based on indications of unsuccessful execution of the script
CN113987393A (en) Web page operation recorder, system, device and method
CN108696562B (en) Method and device for acquiring website resources
US10827035B2 (en) Data uniqued by canonical URL for rest application
CN110119388B (en) File reading and writing method, device, system, equipment and computer readable storage medium
US20230205619A1 (en) Common platform for fulfilling different actions
CN116501344A (en) Page updating method and device
CN112565238A (en) Method for popping privacy policy, client and computer-readable storage medium
CN115858972A (en) Page display method and device of application program, storage medium and computer equipment
CN112532703B (en) Page configuration request method and device and electronic equipment
CN107203915B (en) Data storage method and device
CN110944037B (en) Method, computer device and storage medium for client cache change configuration
CN112052234B (en) Service data processing method and device, storage medium and electronic device
CN112783548B (en) Access method and device of network system
CN112328922A (en) Processing method and device
CN112948020A (en) Configuration file processing method and device
CN107291943B (en) Picture searching 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