CN113221041A - Page display method, device, equipment and storage medium based on cache mechanism - Google Patents

Page display method, device, equipment and storage medium based on cache mechanism Download PDF

Info

Publication number
CN113221041A
CN113221041A CN202110599534.0A CN202110599534A CN113221041A CN 113221041 A CN113221041 A CN 113221041A CN 202110599534 A CN202110599534 A CN 202110599534A CN 113221041 A CN113221041 A CN 113221041A
Authority
CN
China
Prior art keywords
display
data
homepage
request
display 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.)
Pending
Application number
CN202110599534.0A
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.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen 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 Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202110599534.0A priority Critical patent/CN113221041A/en
Publication of CN113221041A publication Critical patent/CN113221041A/en
Pending legal-status Critical Current

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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • 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
    • 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
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Landscapes

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

Abstract

The invention relates to the field of research and development management and discloses a page display method, a page display device, page display equipment and a page display storage medium based on a cache mechanism. The method comprises the following steps: detecting whether a homepage display request exists at present, and if the homepage display request exists at present, acquiring first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request; if the time interval between the last homepage display request and the current homepage display request exceeds the preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism; if the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request; and refreshing the homepage based on the display data. The invention improves the response speed of the homepage display request.

Description

Page display method, device, equipment and storage medium based on cache mechanism
Technical Field
The invention relates to the field of research and development management, in particular to a page display method, a page display device, page display equipment and a page display storage medium based on a cache mechanism.
Background
At present, the data volume of a page of a client or a page of a webpage is large, when a user operates a certain page, the page has a specific response, and the content of the page is updated due to the response. When a page needs to be displayed, in a conventional scheme, a client needs to send an explicit page display request to a server, wherein the local page display request indicates a current page position to be displayed, and then a server returns updated page data of a corresponding position of the page to the client.
In order to adapt to the changing business requirements, the push messages of the server to the client frequently change, the client needs to frequently release version updates to deal with the changes, and old version messages need to be compatible. In the conventional page display scheme, after the version of the client is upgraded, in order to avoid a display error of a page, the client needs to update the page display logic in time along with the upgrade of the version of the client, that is, the current page display method is slow in response.
Disclosure of Invention
The invention mainly aims to solve the problem of slow response of the current page display.
The invention provides a page display method based on a cache mechanism in a first aspect, which comprises the following steps:
detecting whether a homepage display request exists at present, and if the homepage display request exists at present, acquiring first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request;
if the time interval between the last homepage display request and the current homepage display request exceeds preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism;
if the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request;
and generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information.
Optionally, in a first implementation manner of the first aspect of the present invention, if a time interval between a previous homepage display request and a current homepage display request exceeds a preset duration, determining, according to the display request, a plurality of data interfaces corresponding to the display request, and acquiring display data through each of the data interfaces and a preset data waiting mechanism includes:
if the time interval between the last homepage display request and the homepage display request exceeds the preset time length, generating data request configuration information according to the display request;
matching a plurality of data interfaces corresponding to the display request according to the data request configuration information;
returning new data by responding to the display request through each data interface to obtain new data corresponding to each data interface;
and generating display data from the new data corresponding to each data interface in the preset waiting time based on the preset waiting time.
Optionally, in a second implementation manner of the first aspect of the present invention, after the generating, based on a preset waiting duration, display data for new data corresponding to each data interface within the preset waiting duration, the method further includes:
and updating and storing data of the preset sandbox according to the display data.
Optionally, in a third implementation manner of the first aspect of the present invention, if the time interval between the last homepage display request and the current homepage display request is less than the preset time length, extracting, according to the display request, display data from local cache data includes:
if the time interval between the last homepage display request and the homepage display request is less than the preset time length, acquiring a data extraction parameter corresponding to the display request;
and extracting display data corresponding to the data extraction parameters in the local cache data.
Optionally, in a fourth implementation manner of the first aspect of the present invention, before extracting, according to the display request, display data from local cache data if a time interval between a last homepage display request and a current homepage display request is less than the preset time length, the method further includes:
when the display request is detected to be a first request, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the generating dynamic display information according to the display data, and performing page refreshing on a corresponding exhibition stall in the homepage through the dynamic display information includes:
generating dynamic display information according to the display data, and acquiring the exhibition position in the homepage;
and updating the information of the exhibition position according to the dynamic exhibition information.
Optionally, in a sixth implementation manner of the first aspect of the present invention, after the generating dynamic display information according to the display data and performing page refreshing on a corresponding exhibition stall in the homepage through the dynamic display information, the method further includes:
and recording the refreshing times of the homepage, and generating an abnormal monitoring result of the homepage according to the refreshing times.
The second aspect of the present invention provides a page display apparatus based on a cache mechanism, where the page display apparatus based on the cache mechanism includes:
the device comprises a detection module, a display module and a display module, wherein the detection module is used for detecting whether a homepage display request exists currently or not, and if the homepage display request exists currently, first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request are acquired;
the data acquisition module is used for determining a plurality of data interfaces corresponding to the display request according to the display request and acquiring display data through each data interface and a preset data waiting mechanism if the time interval between the last homepage display request and the current homepage display request exceeds preset time length;
the extraction module is used for extracting display data from local cache data according to the display request if the time interval between the last homepage display request and the homepage display request is less than the preset time length;
and the page refreshing module is used for generating dynamic display information according to the display data and refreshing the corresponding exhibition position in the homepage through the dynamic display information.
Optionally, in a first implementation manner of the second aspect of the present invention, the data obtaining module is specifically configured to:
if the time interval between the last homepage display request and the homepage display request exceeds the preset time length, generating data request configuration information according to the display request;
matching a plurality of data interfaces corresponding to the display request according to the data request configuration information;
returning new data by responding to the display request through each data interface to obtain new data corresponding to each data interface;
and generating display data from the new data corresponding to each data interface in the preset waiting time based on the preset waiting time.
Optionally, in a second implementation manner of the second aspect of the present invention, the page display apparatus based on a cache mechanism further includes:
and the data processing module is used for updating and storing data of the preset sandbox according to the display data.
Optionally, in a third implementation manner of the second aspect of the present invention, the extraction module is specifically configured to:
if the time interval between the last homepage display request and the homepage display request is less than the preset time length, acquiring a data extraction parameter corresponding to the display request;
and extracting display data corresponding to the data extraction parameters in the local cache data.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the page displaying apparatus based on a cache mechanism further includes:
and the processing module is used for determining a plurality of data interfaces corresponding to the display request according to the display request when the display request is detected to be a first request, and acquiring display data through each data interface and a preset data waiting mechanism.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the page refreshing module is specifically configured to:
generating dynamic display information according to the display data, and acquiring the exhibition position in the homepage;
and updating the information of the exhibition position according to the dynamic exhibition information.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the page displaying apparatus based on a cache mechanism further includes:
and the abnormity monitoring module is used for recording the refreshing times of the homepage and generating an abnormity monitoring result of the homepage according to the refreshing times.
The third aspect of the present invention provides a page display device based on a cache mechanism, including: a memory and at least one processor, the memory having instructions stored therein; the at least one processor calls the instruction in the memory to enable the page display device based on the cache mechanism to execute the page display method based on the cache mechanism.
A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the above-mentioned page display method based on a cache mechanism.
According to the technical scheme, whether a homepage display request exists at present is detected, and if the homepage display request exists at present, first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request are obtained; if the time interval between the last homepage display request and the current homepage display request exceeds preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism; if the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request; and generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information. The invention improves the response speed of the homepage display request.
Drawings
FIG. 1 is a schematic diagram of a first embodiment of a page display method based on a cache mechanism according to an embodiment of the present invention;
FIG. 2 is a diagram of a page display method based on a cache mechanism according to a second embodiment of the present invention;
FIG. 3 is a diagram of a third embodiment of a page display method based on a cache mechanism according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embodiment of a page displaying apparatus based on a caching mechanism according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a page display device based on a caching mechanism in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a page display method, a page display device, page display equipment and a storage medium based on a cache mechanism. The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, a first embodiment of a page display method based on a cache mechanism in the embodiment of the present invention includes:
101. detecting whether a homepage display request exists at present, and if the homepage display request exists at present, acquiring first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request;
it is to be understood that the execution subject of the present invention may be a page display apparatus based on a cache mechanism, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
In this embodiment, the homepage display request is a request for displaying a plurality of user information included in a page of the homepage, where the plurality of user information includes, for example: membership information, wealth information, shopping cart information, order information, unread messages, request for corner-mark messages, request for red points, RC dynamic configuration, and the like.
In this embodiment, each time the request time of the main page display request is recorded, the first request time of the last main page display request closest to the main page display request of this time and the second request time of the main page display request of this time may be directly obtained.
102. If the time interval between the last homepage display request and the current homepage display request exceeds preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism;
in this embodiment, the time interval between two display requests is obtained by subtracting the second request time from the first request time, for example: when the first reception time is (2021.3.8, 14: 14: 36) and the second reception time is (2021.3.8, 14: 14: 42), the time interval is 6 s. And then judging whether the time interval between the first request time and the second request time exceeds a preset time length.
In this embodiment, the time interval between the last homepage display request and the current homepage display request exceeds the preset duration, for example: and when the preset time length is set to be 10s and the time interval is 11s, determining that the time interval between the last homepage display request and the current homepage display request exceeds the preset time length.
In this embodiment, sequentially requesting interfaces according to the display request, finally determining that the display request corresponds to obtain a plurality of data interfaces, and obtaining different data of a user through different interfaces, where the data interfaces are, for example: the method comprises the steps of obtaining a member information interface, a wealth information inquiry interface, a shopping cart information inquiry interface, an order inquiry interface, an unread message acquisition interface, a corner mark information request interface, a physical red check point request interface, an RC dynamic configuration interface and the like.
103. If the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request;
in this embodiment, a time interval between the last homepage display request and the current homepage display request is less than the preset duration, for example: and when the preset time length is set to 10s and the time interval is 6s, determining that the time between the last homepage display request and the current homepage display request is rainy for the preset time length, and then directly extracting display data from the local cache data.
104. And generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information.
In this embodiment, the dynamic display information is generated according to the display data, and then the homepage is refreshed according to the dynamic display information. Whether the exhibition position corresponds to a question and a physical examination or not is judged, then a corresponding corner mark is requested, and since the advertisement exhibition position is also available, after the dynamic exhibition position interface request comes back, the advertisement interface is requested after the advertisement exhibition position is judged, so that exhibition position information and advertisement information are obtained, and finally the obtained exhibition position information and the obtained advertisement information are used for carrying out information updating on a homepage.
Optionally, in an embodiment, the step 104 includes:
generating dynamic display information according to the display data, and acquiring the exhibition position in the homepage;
and updating the information of the exhibition position according to the dynamic exhibition information.
In this embodiment, the data to be displayed is generated into corresponding dynamic display information, then the exhibition position to be refreshed in the homepage corresponding to the display data is acquired, and the exhibition position is updated by the dynamic display information, so as to complete the refreshing of the homepage.
For example: and if the display data is wealth information, generating dynamic display information according to the gift card, health money, coupon and card coupon quantity information in the acquired wealth data, and then updating data of the positions of the corresponding gift card, health money, coupon and card coupon on the homepage to obtain the refreshed homepage.
Optionally, in an embodiment, after the step 104, the method further includes:
and recording the refreshing times of the homepage, and generating an abnormal monitoring result of the homepage according to the refreshing times.
In the embodiment, the refreshing frequency of the homepage is recorded in real time, a time period is preset, and in the time period, if the refreshing frequency reaches an abnormal value, the refreshing of the homepage is determined to be abnormal; if the number of refreshes is below the abnormal value within this time period, it is determined that the refresh of the homepage is normal.
In the embodiment of the invention, whether a homepage display request exists at present is detected, and if the homepage display request exists at present, first request time corresponding to the last homepage display request and second request time corresponding to the current homepage display request are obtained; if the time interval between the last homepage display request and the current homepage display request exceeds preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism; if the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request; and generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information. The invention improves the response speed of the homepage display request.
Referring to fig. 2, a second embodiment of the page display method based on the caching mechanism in the embodiment of the present invention includes:
201. detecting whether a homepage display request exists at present, and if the homepage display request exists at present, acquiring first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request;
in this embodiment, if the time interval between the last homepage display request and the current homepage display request exceeds the preset time length, data request configuration information is generated according to the display request, for example: when the time interval threshold is set to 10s, when the time interval between the last homepage display request and the current homepage display request exceeds 10s, determining that the response mode is to display the homepage by requesting to update data through the server, generating corresponding data request configuration information according to the display request, wherein the data request configuration information is composed of a directory name and a directory name position matched with the display request in a configuration file, and acquiring corresponding real path information and a homepage interface request list.
202. If the time interval between the last homepage display request and the homepage display request exceeds the preset time length, generating data request configuration information according to the display request;
203. matching a plurality of data interfaces corresponding to the display request according to the data request configuration information;
in this embodiment, according to the data request configuration information, each time a display request is detected, a plurality of data interfaces in the homepage interface list are requested, and the corresponding data interfaces are matched according to the real path information.
204. Returning new data by responding to the display request through each data interface to obtain new data corresponding to each data interface;
in this embodiment, each data interface returns corresponding new data, for example: the new data returned in the shopping cart information inquiry interface is: b2c number of shopping carts, o2o number of shopping carts, etc.
205. Generating display data for new data corresponding to each data interface in a preset waiting time length based on the preset waiting time length;
in this embodiment, if the number of interfaces is too large, each interface will be refreshed back, which results in too frequent refreshing and affects performance, and therefore, the waiting duration is set, for example: when the waiting time of 100ms is set, when each interface requests to return new data, the interfaces wait for 100ms, display data is obtained by combination, and then page refreshing is carried out, so that the interface which returns the data within 100ms can finish refreshing once.
Optionally, in an embodiment, after the step 204, the method further includes:
and updating and storing data of the preset sandbox according to the display data.
In the embodiment, the display data is stored in the preset sand river in three stages, the corresponding data in the sandbox is updated, any redundant modification is not needed when the data is changed and newly added, and the development efficiency and the iteration speed are improved. The sandbox is a security mechanism, provides an isolation environment for the running program, and can strictly control the resources that the program can access, for example, the sandbox can provide a disk and a memory space that can be recycled after use. In sandboxes, network access, access to real systems, reading of input devices are typically prohibited or severely limited.
206. If the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request;
207. and generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information.
In the embodiment of the invention, by extracting the configuration information of the homepage display data, if the time interval between the last homepage display request and the current homepage display request exceeds the preset time length, generating data request configuration information according to the display request, matching a plurality of data interfaces corresponding to the display request according to the data request configuration information, responding to the display request through each data interface and returning new data to obtain the new data corresponding to each data interface, and generating the display data of the new data corresponding to each data interface within the preset waiting time length based on the preset waiting time length, the acquisition of the data can be effectively accelerated, so that the response speed of the page display is accelerated.
Referring to fig. 3, a third embodiment of a page display method based on a cache mechanism according to the embodiment of the present invention includes:
301. detecting whether a homepage display request exists at present, and if the homepage display request exists at present, acquiring first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request;
302. if the time interval between the last homepage display request and the current homepage display request exceeds preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism;
303. if the time interval between the last homepage display request and the homepage display request is less than the preset time length, acquiring a data extraction parameter corresponding to the display request;
in this embodiment, when the time interval between the last homepage display request and the homepage display request of this time is less than the preset time length, a data extraction parameter corresponding to the display request is obtained, where the parameter includes a Key value corresponding to data extraction in local cache data, then display data corresponding to the homepage in the local cache data is obtained, and data is asynchronously requested from a server to update part of information in the local data, so as to obtain corresponding display data.
Optionally, in an embodiment, before the step 303, the method further includes:
when the display request is detected to be a first request, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism.
In this embodiment, when it is detected that the display request is the first request, that is, there is no data corresponding to the display request in the local cache database, a plurality of data interfaces corresponding to the display request are determined according to the display request, and display data is acquired through each data interface and a preset data waiting mechanism, so that display data corresponding to the first display request is obtained.
304. Extracting display data corresponding to the data extraction parameters in local cache data;
305. and generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information.
In the embodiment of the invention, by introducing a cache mechanism, if the time interval between the last homepage display request and the current homepage display request is less than the preset time length, the data extraction parameter corresponding to the display request is obtained, the display data corresponding to the data extraction parameter in the local cache data is extracted, and the response speed of page display is accelerated by directly extracting the data from the local.
The above description of the page display method based on the cache mechanism in the embodiment of the present invention, and the following description of the page display device based on the cache mechanism in the embodiment of the present invention refer to fig. 4, where an embodiment of the page display device based on the cache mechanism in the embodiment of the present invention includes:
the detecting module 401 is configured to detect whether a homepage display request currently exists, and if the homepage display request currently exists, obtain first request time corresponding to a last homepage display request and second request time corresponding to the current homepage display request;
a data obtaining module 402, configured to determine, according to the display request, a plurality of data interfaces corresponding to the display request if a time interval between a last homepage display request and a current homepage display request exceeds a preset time length, and obtain display data through each data interface and a preset data waiting mechanism;
an extracting module 403, configured to extract display data from local cache data according to the display request if a time interval between a last homepage display request and a current homepage display request is less than the preset time length;
and a page refreshing module 404, configured to generate dynamic display information according to the display data, and perform page refreshing on a corresponding exhibition position in the homepage through the dynamic display information.
Optionally, in an embodiment, the data obtaining module 402 is specifically configured to:
if the time interval between the last homepage display request and the homepage display request exceeds the preset time length, generating data request configuration information according to the display request;
matching a plurality of data interfaces corresponding to the display request according to the data request configuration information;
returning new data by responding to the display request through each data interface to obtain new data corresponding to each data interface;
and generating display data from the new data corresponding to each data interface in the preset waiting time based on the preset waiting time.
Optionally, in an embodiment, the page display apparatus based on a cache mechanism further includes:
and the data processing module is used for updating and storing data of the preset sandbox according to the display data.
Optionally, in an embodiment, the extracting module 403 is specifically configured to:
if the time interval between the last homepage display request and the homepage display request is less than the preset time length, acquiring a data extraction parameter corresponding to the display request;
and extracting display data corresponding to the data extraction parameters in the local cache data.
Optionally, in an embodiment, the page display apparatus based on a cache mechanism further includes:
and the processing module is used for determining a plurality of data interfaces corresponding to the display request according to the display request when the display request is detected to be a first request, and acquiring display data through each data interface and a preset data waiting mechanism.
Optionally, in an embodiment, the page refreshing module 404 is specifically configured to:
generating dynamic display information according to the display data, and acquiring the exhibition position in the homepage;
and updating the information of the exhibition position according to the dynamic exhibition information.
Optionally, in an embodiment, the page display apparatus based on a cache mechanism further includes:
and the abnormity monitoring module is used for recording the refreshing times of the homepage and generating an abnormity monitoring result of the homepage according to the refreshing times.
In the embodiment of the invention, whether a homepage display request exists at present is detected, and if the homepage display request exists at present, first request time corresponding to the last homepage display request and second request time corresponding to the current homepage display request are obtained; if the time interval between the last homepage display request and the current homepage display request exceeds preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism; if the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request; and generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information. The invention improves the response speed of the homepage display request.
Fig. 4 describes the page display apparatus based on the cache mechanism in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the page display apparatus based on the cache mechanism in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 5 is a schematic structural diagram of a cache mechanism-based page rendering apparatus 500 according to an embodiment of the present invention, where the cache mechanism-based page rendering apparatus 500 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a sequence of instructions operating on the page presentation device 500 based on a caching mechanism. Still further, the processor 510 may be configured to communicate with the storage medium 530, and execute a series of instruction operations in the storage medium 530 on the page presentation device 500 based on the caching mechanism.
The caching mechanism based page presentation device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like. It will be understood by those skilled in the art that the structure of the page presentation device based on the caching mechanism shown in fig. 5 does not constitute a limitation of the page presentation device based on the caching mechanism, and may include more or less components than those shown, or combine some components, or arrange different components.
The invention further provides a page display device based on the cache mechanism, which comprises a memory and a processor, wherein computer readable instructions are stored in the memory, and when the computer readable instructions are executed by the processor, the processor executes the steps of the page display method based on the cache mechanism in the embodiments.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and may also be a volatile computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the steps of the page presentation method based on the cache mechanism.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A page display method based on a cache mechanism is characterized in that the page display method based on the cache mechanism comprises the following steps:
detecting whether a homepage display request exists at present, and if the homepage display request exists at present, acquiring first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request;
if the time interval between the last homepage display request and the current homepage display request exceeds preset time length, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism;
if the time interval between the last homepage display request and the homepage display request is less than the preset time length, extracting display data from local cache data according to the display request;
and generating dynamic display information according to the display data, and refreshing the corresponding exhibition position in the homepage through the dynamic display information.
2. The cache mechanism-based page display method according to claim 1, wherein if a time interval between a last homepage display request and a current homepage display request exceeds a preset duration, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each of the data interfaces and a preset data waiting mechanism comprises:
if the time interval between the last homepage display request and the homepage display request exceeds the preset time length, generating data request configuration information according to the display request;
matching a plurality of data interfaces corresponding to the display request according to the data request configuration information;
returning new data by responding to the display request through each data interface to obtain new data corresponding to each data interface;
and generating display data from the new data corresponding to each data interface in the preset waiting time based on the preset waiting time.
3. The page display method based on the cache mechanism according to claim 2, wherein after generating the display data from the new data corresponding to each data interface within the preset waiting duration based on the preset waiting duration, the method further comprises:
and updating and storing data of the preset sandbox according to the display data.
4. The cache mechanism-based page display method according to claim 2, wherein if the time interval between the last homepage display request and the current homepage display request is less than the preset duration, extracting display data from local cache data according to the display request comprises:
if the time interval between the last homepage display request and the homepage display request is less than the preset time length, acquiring a data extraction parameter corresponding to the display request;
and extracting display data corresponding to the data extraction parameters in the local cache data.
5. The method according to claim 4, wherein before extracting the display data from the local cache data according to the display request if the time interval between the last main page display request and the current main page display request is less than the preset time length, the method further comprises:
when the display request is detected to be a first request, determining a plurality of data interfaces corresponding to the display request according to the display request, and acquiring display data through each data interface and a preset data waiting mechanism.
6. The page display method based on the cache mechanism according to claim 1, wherein the generating of dynamic display information according to the display data and the page refreshing of the corresponding exhibition position in the homepage through the dynamic display information comprises:
generating dynamic display information according to the display data, and acquiring the exhibition position in the homepage;
and updating the information of the exhibition position according to the dynamic exhibition information.
7. The page display method based on the cache mechanism according to any one of claims 1 to 6, wherein after the generating of the dynamic display information according to the display data and the page refreshing of the corresponding exhibition position in the homepage by the dynamic display information, the method further comprises:
and recording the refreshing times of the homepage, and generating an abnormal monitoring result of the homepage according to the refreshing times.
8. A page display device based on a cache mechanism is characterized in that the page display device based on the cache mechanism comprises:
the device comprises a detection module, a display module and a display module, wherein the detection module is used for detecting whether a homepage display request exists currently or not, and if the homepage display request exists currently, first request time corresponding to the last homepage display request and second request time corresponding to the homepage display request are acquired;
the data acquisition module is used for determining a plurality of data interfaces corresponding to the display request according to the display request and acquiring display data through each data interface and a preset data waiting mechanism if the time interval between the last homepage display request and the current homepage display request exceeds preset time length;
the extraction module is used for extracting display data from local cache data according to the display request if the time interval between the last homepage display request and the homepage display request is less than the preset time length;
and the page refreshing module is used for generating dynamic display information according to the display data and refreshing the corresponding exhibition position in the homepage through the dynamic display information.
9. A page display device based on a cache mechanism is characterized in that the page display device based on the cache mechanism comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor calls the instructions in the memory to cause the caching mechanism-based page presentation apparatus to perform the caching mechanism-based page presentation method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon instructions which, when executed by a processor, implement the page presentation method based on a caching mechanism according to any one of claims 1 to 7.
CN202110599534.0A 2021-05-31 2021-05-31 Page display method, device, equipment and storage medium based on cache mechanism Pending CN113221041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110599534.0A CN113221041A (en) 2021-05-31 2021-05-31 Page display method, device, equipment and storage medium based on cache mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110599534.0A CN113221041A (en) 2021-05-31 2021-05-31 Page display method, device, equipment and storage medium based on cache mechanism

Publications (1)

Publication Number Publication Date
CN113221041A true CN113221041A (en) 2021-08-06

Family

ID=77081644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110599534.0A Pending CN113221041A (en) 2021-05-31 2021-05-31 Page display method, device, equipment and storage medium based on cache mechanism

Country Status (1)

Country Link
CN (1) CN113221041A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116910106A (en) * 2023-09-13 2023-10-20 重庆华悦生态环境工程研究院有限公司深圳分公司 Water quality data sharing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108008806A (en) * 2017-11-23 2018-05-08 努比亚技术有限公司 A kind of data processing method, terminal and computer-readable recording medium
CN109471695A (en) * 2018-10-31 2019-03-15 北京字节跳动网络技术有限公司 Method and apparatus for more new data
CN110377361A (en) * 2019-07-15 2019-10-25 北京奇艺世纪科技有限公司 Data load method, device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108008806A (en) * 2017-11-23 2018-05-08 努比亚技术有限公司 A kind of data processing method, terminal and computer-readable recording medium
CN109471695A (en) * 2018-10-31 2019-03-15 北京字节跳动网络技术有限公司 Method and apparatus for more new data
CN110377361A (en) * 2019-07-15 2019-10-25 北京奇艺世纪科技有限公司 Data load method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116910106A (en) * 2023-09-13 2023-10-20 重庆华悦生态环境工程研究院有限公司深圳分公司 Water quality data sharing method and device

Similar Documents

Publication Publication Date Title
US10402817B1 (en) Relaxed fraud detection for transactions using virtual transaction cards
CN108665297B (en) Method and device for detecting abnormal access behavior, electronic equipment and storage medium
US7032229B1 (en) Automatic tracking of user progress in a software application
CN104462455A (en) Method and device for displaying and processing network data
CN106943747B (en) Virtual role name recommendation method and device, electronic equipment and storage medium
US9767465B2 (en) Methods and systems for facilitating caching of advertisements
US20120209997A1 (en) Providing Page Navigation in Multirole-Enabled Network Application
US11757622B2 (en) Determining a change to product information or user information via hashing
CN107357794B (en) Method and device for optimizing data storage structure of key value database
EP2561438A1 (en) Updating a user interface
CN113221041A (en) Page display method, device, equipment and storage medium based on cache mechanism
CN111054070A (en) Game-based commodity display method and device, terminal and storage medium
CN113706249A (en) Data recommendation method and device, electronic equipment and storage medium
CN109101310B (en) Page refreshing method and device
CN110782310A (en) Method, device and system for asynchronously acquiring user attribute information from third-party platform
TW202333098A (en) System, method, and computer program for automatic coupon code fill in a mobile application
CN103049525A (en) Method and device for providing object relevant information
CN114662005A (en) Message pushing method, device, equipment and storage medium for user behavior track
CN114518993A (en) System performance monitoring method, device, equipment and medium based on business characteristics
CN113127574A (en) Service data display method, system, equipment and medium based on knowledge graph
CN107679143B (en) Baidu map based dynamic step-by-step loading device and method and readable storage medium
CN112596725A (en) Grading method and grading device for programming works, terminal equipment and storage medium
CN115309870B (en) Knowledge acquisition method and device
CN114860600B (en) Visual data embedded point method, device, equipment and storage medium
CN113065066B (en) Prediction method, prediction device, server and storage medium

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