CN105912689B - Website display method, device and system - Google Patents

Website display method, device and system Download PDF

Info

Publication number
CN105912689B
CN105912689B CN201610246495.5A CN201610246495A CN105912689B CN 105912689 B CN105912689 B CN 105912689B CN 201610246495 A CN201610246495 A CN 201610246495A CN 105912689 B CN105912689 B CN 105912689B
Authority
CN
China
Prior art keywords
website
url
thread
website data
access request
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.)
Active
Application number
CN201610246495.5A
Other languages
Chinese (zh)
Other versions
CN105912689A (en
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.)
Zhengzhou Xizhi Information Technology Co ltd
Original Assignee
Zhengzhou Xizhi Information 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 Zhengzhou Xizhi Information Technology Co ltd filed Critical Zhengzhou Xizhi Information Technology Co ltd
Priority to CN201610246495.5A priority Critical patent/CN105912689B/en
Publication of CN105912689A publication Critical patent/CN105912689A/en
Application granted granted Critical
Publication of CN105912689B publication Critical patent/CN105912689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • 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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

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

Abstract

The application discloses a website display method, a device and a system, wherein the method comprises the following steps: the method comprises the steps that a first thread receives a first website access request sent by a client, the first website access request comprises a Uniform Resource Locator (URL) of a website and a set updating identifier, when the first website access request is confirmed to comprise the updating identifier, the first thread calls a preset script file, the script file inquires the latest website data corresponding to the URL in a database, the searched latest website data are returned to the first thread, and the first thread returns the searched latest website data to the client. According to the method, the update identifier is added in the first website access request, the first thread is informed to call the preset script file so as to search the latest website data corresponding to the URL, and then the latest website data is returned to the client, so that website maintenance personnel at the client side can timely see the latest website data.

Description

Website display method, device and system
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, and a system for displaying a website.
Background
With the development of the internet, various websites appear like bamboo shoots in the spring after rain, and great convenience is brought to the life and work of users.
In order to respond to a website access request of a client more quickly, a website data caching mechanism is generally set in the prior art, namely website data corresponding to a website URL accessed by a historical client are cached, and subsequently, if the client accesses the same URL again, the corresponding website data are directly called in the cache and returned to the client, so that the website data corresponding to the URL are prevented from being called in a database again, and the waiting time of the client is shortened.
Since the website data is updated sometimes, the prior art periodically updates the cached website data. However, while it is sometimes necessary for a website maintainer to intuitively know the current and latest website data, when a website is accessed according to the conventional technique, the cached website data may be updated and the set update time is not reached, and the latest website data may not be displayed.
Disclosure of Invention
In view of this, the present application provides a website display method, device and system, which are used to solve the problem that the prior art cannot display the latest website data for website maintainers in time.
In order to achieve the above object, the following solutions are proposed:
a website display method comprises the following steps:
a first thread receives a first website access request sent by a client, wherein the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, and the update identifier is used for informing the first thread of acquiring the latest website data corresponding to the URL;
when the first thread determines that the first website access request contains the update identifier, calling a preset script file, inquiring the latest website data corresponding to the URL in the database by the script file, and returning the found latest website data to the first thread;
and the first thread returns the searched latest website data to the client.
Preferably, the method further comprises the following steps:
and replacing the website data corresponding to the URL in the cache by the searched latest website data by the first thread.
Preferably, the method further comprises the following steps:
a first thread receives a second website access request sent by a client, wherein the second website access request only contains the URL of a website;
when the first thread determines that the second website access request does not contain the updating identification, judging whether website data corresponding to the URL in the cache is invalid or not;
if yes, returning the website data corresponding to the URL in the cache to the client, and adding the URL into an update queue, wherein the URL in the update queue is the URL needing website data update.
Preferably, the method further comprises the following steps:
and the second thread reads the URL from the updating queue, simulates a first website access request by using the read URL and the updating identifier, and sends the simulated first website access request to the first thread, so that the first thread calls the script file to search the latest website data corresponding to the read URL, and replaces the searched latest website data with the website data corresponding to the read URL in the cache.
Preferably, the determining, by the first thread, whether the website data corresponding to the URL in the cache is invalid includes:
a first thread searches website data corresponding to the URL in a cache, wherein the website data are marked with a timestamp, and the timestamp records the failure time of the website data;
the first thread judges whether the website data reaches the failure time or not according to the timestamp of the website data;
if yes, determining that the website data is invalid, and if not, determining that the website data is not invalid.
A website display device applied to a first thread comprises:
the first website request receiving unit is used for receiving a first website access request sent by a client, wherein the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, and the update identifier is used for notifying the acquisition of latest website data corresponding to the URL;
a script file calling unit, configured to call a preset script file when it is determined that the first website access request includes the update identifier, query, by the script file, the latest website data corresponding to the URL in the database, and return the found latest website data to the script file calling unit;
and the client feedback unit is used for returning the searched latest website data to the client.
Preferably, the method further comprises the following steps:
and the cache replacing unit is used for replacing the searched latest website data with the website data corresponding to the URL in the cache.
Preferably, the method further comprises the following steps:
a second website access request receiving unit, configured to receive a second website access request sent by a client, where the second website access request only includes a URL of a website;
a failure judgment unit, configured to judge whether website data corresponding to the URL in the cache is failed when it is determined that the second website access request does not include the update identifier;
the client feedback unit is further used for returning the website data corresponding to the URL in the cache to the client when the judgment result of the failure judgment unit is yes;
and the updating queue adding unit is used for adding the URL into the updating queue when the judgment result of the failure judging unit is yes, and the URL in the updating queue is the URL needing to update the website data.
Preferably, the failure determination unit includes:
the first failure judgment subunit is used for searching website data corresponding to the URL in a cache, wherein the website data are marked with time stamps, and the time stamps record failure time of the website data;
the second failure judgment subunit is used for judging whether the website data reaches the failure time or not according to the timestamp of the website data; if yes, determining that the website data is invalid, and if not, determining that the website data is not invalid.
A website display system comprising a first thread, a second thread, and a script file, wherein:
a first thread receives a first website access request sent by a client, wherein the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, and the update identifier is used for informing the first thread of acquiring the latest website data corresponding to the URL;
when the first thread determines that the first website access request contains the update identifier, calling a preset script file, inquiring the latest website data corresponding to the URL in the database by the script file, and returning the found latest website data to the first thread;
the first thread returns the searched latest website data to the client;
replacing the website data corresponding to the URL in the cache with the found latest website data by the first thread;
the first thread is also used for receiving a second website access request sent by the client, and the second website access request only contains the URL of the website;
when the first thread determines that the second website access request does not contain the updating identification, judging whether website data corresponding to the URL in the cache is invalid or not; if yes, returning website data corresponding to the URL in the cache to the client, and adding the URL to an update queue;
and the second thread reads the URL from the updating queue, simulates a first website access request by using the read URL and the updating identifier, and sends the simulated first website access request to the first thread, so that the first thread calls the script file to search the latest website data corresponding to the read URL, and replaces the searched latest website data with the website data corresponding to the read URL in the cache.
According to the website display method provided by the embodiment of the application, the first thread receives a first website access request sent by the client, the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, the update identifier is used for informing the first thread to acquire the latest website data corresponding to the URL, when the first thread determines that the first website access request comprises the update identifier, the first thread calls a preset script file, the script file queries the latest website data corresponding to the URL in a database, the searched latest website data is returned to the first thread, and the first thread returns the searched latest website data to the client. According to the method, the update identifier is added in the first website access request, the first thread is informed to call the preset script file so as to search the latest website data corresponding to the URL, and then the latest website data is returned to the client, so that website maintenance personnel at the client side can timely see the latest website data.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a website display method disclosed in an embodiment of the present application;
FIG. 2 is a flowchart of another website display method disclosed in the embodiments of the present application;
FIG. 3 is a flowchart of another website display method disclosed in the embodiments of the present application;
FIG. 4 is a flowchart of another website display method disclosed in the embodiments of the present application;
fig. 5 is a schematic structural diagram of a website display device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application provides a website display scheme, which is applied to a background server, wherein the background server can comprise a plurality of threads, the scheme is introduced at the angle of one thread in a plurality of threads contained in the server, and the thread is set as a first thread.
Referring to fig. 1, fig. 1 is a flowchart of a website display method disclosed in the embodiment of the present application.
As shown in fig. 1, the method includes:
step S100, a first thread receives a first website access request sent by a client;
the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier.
The URL is the URL that the client is to access.
And the updating identification is used for informing the first thread to acquire the latest website data corresponding to the URL. The update flag is flag information preset by website maintainers, which may be a string of characters or numbers. The update identifier is opaque to the ordinary website browsing user, that is, the update identifier is not disclosed to the ordinary website browsing user.
Step S110, when the first thread determines that the first website access request contains the update identifier, calling a preset script file;
specifically, a script file is developed in advance, and after the script file receives the call of the first thread, the script file receives the URL sent by the first thread, queries the latest website data corresponding to the URL in the database, and returns the found latest website data to the first thread.
The database stores the latest website data corresponding to each URL.
And step S120, the first thread returns the latest website data found by the script file to the client.
Specifically, the first thread receives the latest website data returned by the script file, and returns the website data to the client, so that the client can display the website data conveniently.
According to the website display method provided by the embodiment of the application, a first thread receives a first website access request sent by a client, the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, the update identifier is used for informing the first thread to acquire latest website data corresponding to the URL, when the first website access request is determined to comprise the update identifier, the first thread calls a preset script file, the script file inquires the latest website data corresponding to the URL in a database, the searched latest website data is returned to the first thread, and the first thread returns the searched latest website data to the client. According to the method, the update identifier is added in the first website access request, the first thread is informed to call the preset script file so as to search the latest website data corresponding to the URL, and then the latest website data is returned to the client, so that website maintenance personnel at the client side can timely see the latest website data.
Referring to fig. 2, fig. 2 is a flowchart of another website display method disclosed in the embodiment of the present application.
As shown in fig. 2, the method includes:
step S200, a first thread receives a first website access request sent by a client;
the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier.
The URL is the URL that the client is to access.
And the updating identification is used for informing the first thread to acquire the latest website data corresponding to the URL. The update identifier is identification information preset by the user, and may be a string of characters or numbers.
Step S210, when the first thread determines that the first website access request contains the update identifier, calling a preset script file;
specifically, a script file is developed in advance, and after the script file receives the call of the first thread, the script file receives the URL sent by the first thread, queries the latest website data corresponding to the URL in the database, and returns the found latest website data to the first thread.
The database stores the latest website data corresponding to each URL.
Step S220, the first thread returns the latest website data searched by the script file to the client;
specifically, the first thread receives the latest website data returned by the script file, and returns the website data to the client, so that the client can display the website data conveniently.
Step S230, the first thread replaces the website data corresponding to the URL in the cache with the latest website data found by the script file.
Specifically, after receiving the latest website data returned by the script file, the first thread further replaces the website data corresponding to the URL in the cache with the latest website data, so as to update the website data in the cache.
Optionally, the execution sequence of step S220 and step S230 is not limited strictly, and both steps may be executed simultaneously or may be executed sequentially in any order, and fig. 2 only illustrates an optional manner.
Compared with the previous embodiment, the present embodiment further adds a process of updating, by the first thread, the website data corresponding to the URL in the cache with the latest website data.
The above embodiment describes a process in which a website maintainer sends a first website access request to a server through a client and a response process of a first thread in the server, and then further describes a process in which a general browser sends a second website access request to the server through the client and a response process of the first thread in the server.
Referring to fig. 3, fig. 3 is a flowchart of another website display method disclosed in the embodiment of the present application.
As shown in fig. 3, the method includes:
step S300, a first thread receives a first website access request sent by a client;
the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier.
Step S310, when the first thread determines that the first website access request contains the update identifier, calling a preset script file;
specifically, a script file is developed in advance, and after the script file receives the call of the first thread, the script file receives the URL sent by the first thread, queries the latest website data corresponding to the URL in the database, and returns the found latest website data to the first thread.
The database stores the latest website data corresponding to each URL.
Step S320, the first thread returns the latest website data found by the script file to the client;
specifically, the first thread receives the latest website data returned by the script file, and returns the website data to the client, so that the client can display the website data conveniently.
Step S330, the first thread replaces the website data corresponding to the URL in the cache with the latest website data found by the script file;
step S340, a first thread receives a second website access request sent by a client, wherein the second website access request only contains the URL of a website;
specifically, since the ordinary browsing user of the website does not know the update identifier, the second website access request initiated by the client only contains the URL of the website and does not contain the update identifier.
Step S350, when the first thread determines that the second website access request does not contain the updating identification, judging whether website data corresponding to the URL in the cache is invalid or not; if yes, go to step S360;
specifically, after receiving the second website access request, the first thread determines that the second website access request does not include the update identifier, searches corresponding website data in a cache according to a URL included in the second website access request, and performs timeliness determination on the found website data, if it is determined that the website data is invalid, the following steps are performed, otherwise, the found website data can be directly returned to the client.
Step S360, returning the website data corresponding to the URL in the cache to the client;
and step S370, adding the URL to an updating queue.
And the URL in the updating queue is the URL needing to update the website data.
Optionally, the execution sequence of step S360 and step S370 is not limited, and both steps may be executed simultaneously, or may be executed sequentially in any order.
And when the first thread determines that the website data searched in the cache is invalid, the website data searched in the cache is returned to the client in order to ensure that the client responds timely. At the same time, the first thread further adds the URL to an update queue. And the URL in the updating queue is the URL needing to update the website data.
According to the method and the device, other threads or a first thread in the server can be set, website data corresponding to the URLs in the updating queue in the cache are updated, and therefore the latest website data can be returned to the client when the subsequent client accesses the URLs.
Optionally, the process of determining whether the website data corresponding to the URL in the cache is invalid by the first thread may include:
a first thread searches website data corresponding to the URL in a cache, wherein the website data are marked with a timestamp, and the timestamp records the failure time of the website data;
the first thread judges whether the website data reaches the failure time or not according to the timestamp of the website data;
if yes, determining that the website data is invalid, and if not, determining that the website data is not invalid.
And each time the website data is stored in the cache from the database, the stored website data can be marked with a timestamp, and the timestamp comprises the time for storing the website data into the cache and the validity period of the website data. And further, according to the time for storing the website data in the timestamp into the cache and the validity period of the website data, the failure time of the website data can be calculated.
Next, the present embodiment provides a process for updating, by a server, website data corresponding to a URL in an update queue in a cache.
Referring to fig. 4, fig. 4 is a flowchart of another website display method disclosed in the embodiment of the present application.
As shown in fig. 4, the method includes:
step S400, a first thread receives a first website access request sent by a client;
the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier.
Step S410, when the first thread determines that the first website access request contains the update identifier, calling a preset script file;
specifically, a script file is developed in advance, and after the script file receives the call of the first thread, the script file receives the URL sent by the first thread, queries the latest website data corresponding to the URL in the database, and returns the found latest website data to the first thread.
The database stores the latest website data corresponding to each URL.
Step S420, the first thread returns the latest website data found by the script file to the client;
specifically, the first thread receives the latest website data returned by the script file, and returns the website data to the client, so that the client can display the website data conveniently.
Step S430, the first thread replaces the website data corresponding to the URL in the cache with the latest website data found by the script file;
step S440, a first thread receives a second website access request sent by a client, wherein the second website access request only contains the URL of a website;
specifically, since the ordinary browsing user of the website does not know the update identifier, the second website access request initiated by the client only contains the URL of the website and does not contain the update identifier.
Step S450, when the first thread determines that the second website access request does not contain the update identifier, judging whether website data corresponding to the URL in the cache is invalid or not; if yes, go to step S460;
specifically, after receiving the second website access request, the first thread determines that the second website access request does not include the update identifier, searches corresponding website data in a cache according to a URL included in the second website access request, and performs timeliness determination on the found website data, if it is determined that the website data is invalid, the following steps are performed, otherwise, the found website data can be directly returned to the client.
Step S460, returning the website data corresponding to the URL in the cache to the client;
step S470, adding the URL to an updating queue;
step S480, the second thread reads the URL from the updating queue and simulates a first website access request by using the read URL and the updating identifier;
specifically, the second thread reads the URLs from the update queue one by one, and generates a first website access request by using the read URLs and the update identifier simulation, wherein the first website access request comprises the read URLs and the update identifier.
Step S490, the second thread sends the simulated first website access request to the first thread.
Specifically, the second thread sends the simulated first website access request to the first thread, so that the first thread calls the script file to search for the latest website data corresponding to the read URL, and replaces the website data corresponding to the read URL in the cache with the searched latest website data.
In this embodiment, the second thread in the server reads the URL from the update queue, and generates a first website access request by using the read URL and the update identifier in a simulation manner, and sends the first website access request to the first thread, so that the first thread performs processing according to the set logic.
The processing logic of the first thread is reused, the website data updating code does not need to be newly developed for the second thread, and development resources are saved.
In the following, the website display apparatus provided in the embodiments of the present application is described, and the website display apparatus described below and the website display method described above may be referred to correspondingly.
The website display device provided by the present application is applied to the first thread, and referring to fig. 5, fig. 5 is a schematic structural diagram of a website display device disclosed in the present application.
As shown in fig. 5, the apparatus includes:
a first website request receiving unit 51, configured to receive a first website access request sent by a client, where the first website access request includes a uniform resource locator URL of a website and a set update identifier, and the update identifier is used to notify that latest website data corresponding to the URL is obtained;
a script file calling unit 52, configured to, when it is determined that the first website access request includes the update identifier, call a preset script file, query, by the script file, the latest website data corresponding to the URL in the database, and return the found latest website data to the script file calling unit;
and the client feedback unit 53 is configured to return the found latest website data to the client.
The website display device provided by the embodiment of the application receives a first website access request sent by a client, the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, when the first website access request is determined to comprise the update identifier, a preset script file is called, latest website data corresponding to the URL is inquired in a database by the script file, the searched latest website data is returned, and the searched latest website data is returned to the client. According to the method, the update identifier is added in the first website access request to inform the website display device to call the preset script file so as to search the latest website data corresponding to the URL, and then the latest website data is returned to the client, so that website maintenance personnel at the client side can timely see the latest website data.
Optionally, the website display apparatus of the present application may further include:
and the cache replacing unit is used for replacing the searched latest website data with the website data corresponding to the URL in the cache.
Optionally, the website display apparatus of the present application may further include:
a second website access request receiving unit, configured to receive a second website access request sent by a client, where the second website access request only includes a URL of a website;
a failure judgment unit, configured to judge whether website data corresponding to the URL in the cache is failed when it is determined that the second website access request does not include the update identifier;
the client feedback unit is further used for returning the website data corresponding to the URL in the cache to the client when the judgment result of the failure judgment unit is yes;
and the updating queue adding unit is used for adding the URL into the updating queue when the judgment result of the failure judging unit is yes, and the URL in the updating queue is the URL needing to update the website data.
Optionally, the failure determining unit may include:
the first failure judgment subunit is used for searching website data corresponding to the URL in a cache, wherein the website data are marked with time stamps, and the time stamps record failure time of the website data;
the second failure judgment subunit is used for judging whether the website data reaches the failure time or not according to the timestamp of the website data; if yes, determining that the website data is invalid, and if not, determining that the website data is not invalid.
Further, an embodiment of the present application further provides a website display system, where the system includes a first thread, a second thread, and a script file, where:
the access process of the maintenance personnel at the website comprises the following steps:
a first thread receives a first website access request sent by a client, wherein the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, and the update identifier is used for informing the first thread of acquiring the latest website data corresponding to the URL;
when the first thread determines that the first website access request contains the update identifier, calling a preset script file, inquiring the latest website data corresponding to the URL in the database by the script file, and returning the found latest website data to the first thread;
the first thread returns the searched latest website data to the client;
and replacing the website data corresponding to the URL in the cache by the searched latest website data by the first thread.
And (3) the access process of browsing users on a common website:
a first thread receives a second website access request sent by a client, wherein the second website access request only contains the URL of a website;
when the first thread determines that the second website access request does not contain the updating identification, judging whether website data corresponding to the URL in the cache is invalid or not; if yes, returning website data corresponding to the URL in the cache to the client, and adding the URL to an update queue;
and the second thread reads the URL from the updating queue, simulates a first website access request by using the read URL and the updating identifier, and sends the simulated first website access request to the first thread, so that the first thread calls the script file to search the latest website data corresponding to the read URL, and replaces the searched latest website data with the website data corresponding to the read URL in the cache.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for displaying a website, comprising:
a first thread receives a first website access request sent by a client, wherein the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, and the update identifier is identifier information preset by website maintainers and is used for informing the first thread of acquiring the latest website data corresponding to the URL;
when the first thread determines that the first website access request contains the update identifier, calling a preset script file, inquiring the latest website data corresponding to the URL in a database by the script file, and returning the found latest website data to the first thread; the database stores the latest website data corresponding to each URL;
the first thread returns the searched latest website data to the client;
and replacing the website data corresponding to the URL in the cache by the searched latest website data by the first thread.
2. The method of claim 1, further comprising:
a first thread receives a second website access request sent by a client, wherein the second website access request only contains the URL of a website;
when the first thread determines that the second website access request does not contain the updating identification, judging whether website data corresponding to the URL in the cache is invalid or not;
if yes, returning the website data corresponding to the URL in the cache to the client, and adding the URL into an update queue, wherein the URL in the update queue is the URL needing website data update.
3. The method of claim 2, further comprising:
and the second thread reads the URL from the updating queue, simulates a first website access request by using the read URL and the updating identifier, and sends the simulated first website access request to the first thread, so that the first thread calls the script file to search the latest website data corresponding to the read URL, and replaces the searched latest website data with the website data corresponding to the read URL in the cache.
4. The method of claim 2, wherein the first thread determining whether the website data corresponding to the URL in the cache is invalid comprises:
a first thread searches website data corresponding to the URL in a cache, wherein the website data are marked with a timestamp, and the timestamp records the failure time of the website data;
the first thread judges whether the website data reaches the failure time or not according to the timestamp of the website data;
if yes, determining that the website data is invalid, and if not, determining that the website data is not invalid.
5. A website display apparatus, applied to a first thread, the apparatus comprising:
the first website request receiving unit is used for receiving a first website access request sent by a client, wherein the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, and the update identifier is identifier information preset by website maintainers and is used for notifying the acquisition of latest website data corresponding to the URL;
a script file calling unit, configured to call a preset script file when it is determined that the first website access request includes the update identifier, query, by the script file, latest website data corresponding to the URL in a database, and return the found latest website data to the script file calling unit; the database stores the latest website data corresponding to each URL;
the client feedback unit is used for returning the searched latest website data to the client;
and the cache replacing unit is used for replacing the searched latest website data with the website data corresponding to the URL in the cache.
6. The apparatus of claim 5, further comprising:
a second website access request receiving unit, configured to receive a second website access request sent by a client, where the second website access request only includes a URL of a website;
a failure judgment unit, configured to judge whether website data corresponding to the URL in the cache is failed when it is determined that the second website access request does not include the update identifier;
the client feedback unit is further used for returning the website data corresponding to the URL in the cache to the client when the judgment result of the failure judgment unit is yes;
and the updating queue adding unit is used for adding the URL into the updating queue when the judgment result of the failure judging unit is yes, and the URL in the updating queue is the URL needing to update the website data.
7. The apparatus according to claim 6, wherein the failure determination unit includes:
the first failure judgment subunit is used for searching website data corresponding to the URL in a cache, wherein the website data are marked with time stamps, and the time stamps record failure time of the website data;
the second failure judgment subunit is used for judging whether the website data reaches the failure time or not according to the timestamp of the website data; if yes, determining that the website data is invalid, and if not, determining that the website data is not invalid.
8. A website display system comprising a first thread, a second thread, and a script file, wherein:
a first thread receives a first website access request sent by a client, wherein the first website access request comprises a Uniform Resource Locator (URL) of a website and a set update identifier, and the update identifier is identifier information preset by website maintainers and is used for informing the first thread of acquiring the latest website data corresponding to the URL;
when the first thread determines that the first website access request contains the update identifier, calling a preset script file, inquiring the latest website data corresponding to the URL in the database by the script file, and returning the found latest website data to the first thread;
the first thread returns the searched latest website data to the client;
replacing the website data corresponding to the URL in the cache with the found latest website data by the first thread;
the first thread is also used for receiving a second website access request sent by the client, and the second website access request only contains the URL of the website;
when the first thread determines that the second website access request does not contain the updating identification, judging whether website data corresponding to the URL in the cache is invalid or not; if yes, returning website data corresponding to the URL in the cache to the client, and adding the URL to an update queue;
and the second thread reads the URL from the updating queue, simulates a first website access request by using the read URL and the updating identifier, and sends the simulated first website access request to the first thread, so that the first thread calls the script file to search the latest website data corresponding to the read URL, and replaces the searched latest website data with the website data corresponding to the read URL in the cache.
CN201610246495.5A 2016-04-20 2016-04-20 Website display method, device and system Active CN105912689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610246495.5A CN105912689B (en) 2016-04-20 2016-04-20 Website display method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610246495.5A CN105912689B (en) 2016-04-20 2016-04-20 Website display method, device and system

Publications (2)

Publication Number Publication Date
CN105912689A CN105912689A (en) 2016-08-31
CN105912689B true CN105912689B (en) 2020-04-21

Family

ID=56746482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610246495.5A Active CN105912689B (en) 2016-04-20 2016-04-20 Website display method, device and system

Country Status (1)

Country Link
CN (1) CN105912689B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287836B (en) * 2017-01-09 2022-09-13 腾讯科技(深圳)有限公司 Resource caching method and device
CN108572965B (en) * 2017-03-08 2020-03-31 阿里巴巴集团控股有限公司 Resource loading method and device
CN107332843A (en) * 2017-07-01 2017-11-07 华泰证券股份有限公司 IOS network requests intercept forwarding cache method and system
CN108629039B (en) * 2018-05-11 2021-02-19 北京汉能光伏投资有限公司 Data processing method and device
CN109582851B (en) * 2018-12-04 2020-07-03 北京搜狗科技发展有限公司 Search result processing method and device
CN110555178B (en) * 2019-08-28 2020-07-21 贝壳找房(北京)科技有限公司 Data proxy method and device
CN112632159B (en) * 2020-12-01 2021-09-28 腾讯科技(深圳)有限公司 Database access control method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997927A (en) * 2010-11-18 2011-03-30 厦门市美亚柏科信息股份有限公司 Method and system for caching data of WEB platform
US8171161B2 (en) * 2009-06-30 2012-05-01 Go Daddy Operating Company, LLC Static and dynamic content delivery
CN104133852A (en) * 2014-07-04 2014-11-05 小米科技有限责任公司 Webpage access method, webpage access device, server and terminal
CN105069011A (en) * 2015-07-07 2015-11-18 安一恒通(北京)科技有限公司 Webpage favorite management method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102456035A (en) * 2010-10-28 2012-05-16 金蝶软件(中国)有限公司 Webpage resource cache control method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8171161B2 (en) * 2009-06-30 2012-05-01 Go Daddy Operating Company, LLC Static and dynamic content delivery
CN101997927A (en) * 2010-11-18 2011-03-30 厦门市美亚柏科信息股份有限公司 Method and system for caching data of WEB platform
CN104133852A (en) * 2014-07-04 2014-11-05 小米科技有限责任公司 Webpage access method, webpage access device, server and terminal
CN105069011A (en) * 2015-07-07 2015-11-18 安一恒通(北京)科技有限公司 Webpage favorite management method, device and system

Also Published As

Publication number Publication date
CN105912689A (en) 2016-08-31

Similar Documents

Publication Publication Date Title
CN105912689B (en) Website display method, device and system
US8688534B2 (en) System and method for gathering ecommerce data
JP5613951B2 (en) Method for aggressive information push notification and server therefor
US20030158953A1 (en) Protocol to fix broken links on the world wide web
US20120290922A1 (en) Method And Apparatus For Subscribing To Information From A Webpage
WO2012009191A1 (en) Method and apparatus of processing nested fragment caching of a web page
CN105069011A (en) Webpage favorite management method, device and system
CN110866204A (en) Page processing method and device
CN102867266A (en) Inquiry method and device
CN101739433B (en) System and method for correcting webpage download error
JP2002140224A (en) Content change managing method
CN108021409B (en) APP service scenario restoration method and system
US9201960B2 (en) Virtual agent response to customer inquiries
CN113868238A (en) Cache refreshing method, related device and readable storage medium
JP5232054B2 (en) Information provision device
US10095791B2 (en) Information search method and apparatus
CN103718179A (en) Information processing apparatus, information processing method, information processing program, and storage medium having information processing program stored therein
CN106991117B (en) Snapshot processing method, snapshot display method, server, browser and system
CN101917418A (en) Method for accessing cloud server by using wireless application protocol (WAP) and WAP server
US8630992B1 (en) URL rank variability determination
US11640438B1 (en) Method and system for automated smart linking within web code
CN104679786B (en) Form processing method and device
CN110830537B (en) Page processing method and device
US8880992B2 (en) Method and apparatus for animating transitions between search results
JP5968967B2 (en) Information processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant