CN112395322B - List data display method and device based on hierarchical cache and terminal equipment - Google Patents

List data display method and device based on hierarchical cache and terminal equipment Download PDF

Info

Publication number
CN112395322B
CN112395322B CN202011416738.8A CN202011416738A CN112395322B CN 112395322 B CN112395322 B CN 112395322B CN 202011416738 A CN202011416738 A CN 202011416738A CN 112395322 B CN112395322 B CN 112395322B
Authority
CN
China
Prior art keywords
data
level cache
cache layer
target page
page
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
CN202011416738.8A
Other languages
Chinese (zh)
Other versions
CN112395322A (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.)
Hunan Zhishengyun Technology Co ltd
Original Assignee
Hunan New Cloudnet 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 Hunan New Cloudnet Technology Co ltd filed Critical Hunan New Cloudnet Technology Co ltd
Priority to CN202011416738.8A priority Critical patent/CN112395322B/en
Publication of CN112395322A publication Critical patent/CN112395322A/en
Application granted granted Critical
Publication of CN112395322B publication Critical patent/CN112395322B/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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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/24Querying
    • G06F16/248Presentation of query results
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/282Hierarchical databases, e.g. IMS, LDAP data stores or Lotus Notes

Abstract

The application is applicable to the technical field of data processing, and provides a method, a device and a terminal device for displaying list data based on hierarchical cache, wherein the method comprises the following steps: receiving a target page loading request; the target page loading request carries the data capacity of the target page, the target page corresponds to a first-level cache layer, whether the data capacity exists in a second-level cache layer which meets a preset relation with the first-level cache layer or not is judged, when the data capacity exists in the second-level cache layer, data corresponding to the data capacity are loaded from the second-level cache layer and displayed on the target page, and when the data capacity does not exist in the second-level cache layer, data corresponding to the data capacity are loaded from the third-level cache layer and displayed on the target page. By storing the data in a grading way in advance and analyzing and searching the loaded data in different cache layers according to the data capacity of the target page carried by the target page loading request, the internal storage space required during data caching is reduced, and the data processing efficiency is improved.

Description

List data display method and device based on hierarchical cache and terminal equipment
Technical Field
The application belongs to the technical field of data processing, and particularly relates to a list data display method and device based on hierarchical cache, a terminal device and a readable storage medium.
Background
At present, a common network display platform generally displays a page by a method of loading list data.
When loading list data, all list data are usually loaded directly and cached, which consumes a long time, occupies a large amount of memory, and reduces the processing efficiency of data.
Disclosure of Invention
The embodiment of the application provides a list data display method and device based on hierarchical cache, a terminal device and a readable storage medium, and can solve the problems that the operation of the existing list data loading method consumes longer time, occupies a large amount of memory and reduces the data processing efficiency.
In a first aspect, an embodiment of the present application provides a method for displaying list data based on a hierarchical cache, including:
receiving a target page loading request; the target page loading request carries the data capacity of a target page, and the target page corresponds to a first-level cache layer;
judging whether the data capacity exists in a first-level cache layer;
when the data capacity does not exist in the first-level cache layer, judging whether the data capacity exists in a second-level cache layer which meets a preset relation with the first-level cache layer;
when the data capacity exists in a second-level cache layer which meets the preset relation with the first-level cache layer, loading data corresponding to the data capacity from the second-level cache layer, and displaying the data on a target page;
and when the data capacity does not exist in the second-level cache layer which meets the preset relation with the first-level cache layer, loading data corresponding to the data capacity from the third-level cache layer, and displaying the data on a target page.
In a second aspect, an embodiment of the present application provides a hierarchical cache-based list data display apparatus, including:
the receiving module is used for receiving a target page loading request; the target page loading request carries the data capacity of a target page, and the target page corresponds to a first-level cache layer;
the first judgment module is used for judging whether the data capacity exists in a first-level cache layer or not;
the second judgment module is used for judging whether the data capacity exists in a second-level cache layer which meets a preset relation with the first-level cache layer or not when the data capacity does not exist in the first-level cache layer;
the first loading module is used for loading data corresponding to the data capacity from the second-level cache layer when the data capacity exists in the second-level cache layer meeting the preset relation with the first-level cache layer, and displaying the data on a target page;
and the second loading module is used for loading the data corresponding to the data capacity from the third-level cache layer and displaying the data on the target page when the data capacity does not exist in the second-level cache layer which meets the preset relation with the first-level cache layer.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the hierarchical cache-based list data display method according to the first aspect is implemented.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when being executed by a processor, the computer program implements the hierarchical cache-based list data display method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the hierarchical cache based list data display method of the first aspect.
By storing data in a grading way in advance, when a target page loading request is received, the loaded data is analyzed and searched in different cache layers according to the data capacity of the target page carried by the target page loading request, so that the internal storage space required during data caching is reduced, the occupancy rate of the internal storage space is reduced, and the data processing efficiency is improved.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a hierarchical cache-based list data display method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of step S201 of a hierarchical cache-based list data display method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a hierarchical cache-based list data display device according to an embodiment of the present application;
fig. 4 is another schematic structural diagram of a hierarchical cache-based list data display device according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a hierarchical storage module according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The list data display method based on the hierarchical cache can be applied to terminal devices such as mobile phones, tablet computers, vehicle-mounted devices and notebook computers, and the specific types of the terminal devices are not limited in any way in the embodiment of the present application.
Fig. 1 is a schematic flow chart illustrating a hierarchical cache-based list data display method provided in the present application, which may be applied to the above-mentioned notebook computer by way of example and not limitation.
S101, receiving a target page loading request; the target page loading request carries the data capacity of the target page, and the target page corresponds to a first-level cache layer.
In a specific application, when a target page loading request is received, the target page loading request can be analyzed to obtain the data capacity of a target page carried by the target page loading request, so as to read the data of the target page according to the data capacity. And the data displayed by the target page at the current moment is correspondingly stored in the first-level cache layer. The target page loading request carries the data volume of the target page, and the data volume of the target page refers to the data volume of page data required to be displayed on the target page. The type of the list data includes, but is not limited to, at least one of a number, a character string, and a letter. The first-level Cache layer includes but is not limited to session and cookie, Cache memory and other storage spaces.
For example, the data capacity of the target page carried by the target page loading request is 100 pieces of page data of the 1 st page, and the 100 pieces of page data of the 1 st page are stored in the first-level cache layer and displayed in the target page.
S102, judging whether the data capacity exists in a first-level cache layer.
In specific application, corresponding page data is searched in a first-level cache layer according to data capacity.
For example, at the current time, the target page displays page data of 100 2 nd pages (which are stored in the first level cache layer). When a target page loading request is received, if the data capacity of a target page carried by the target page loading request is analyzed to be page data of 100 pages 6, the page data of the 100 pages 6 cannot be searched in a first-level cache layer according to the data capacity, and it can be determined that the data capacity does not exist in the first-level cache layer.
S103, when the data capacity does not exist in the first-level cache layer, judging whether the data capacity exists in a second-level cache layer which meets the preset relation with the first-level cache layer.
In a specific application, when the corresponding page data is not found in the first-level cache layer according to the data capacity, the corresponding page data is found in the second-level cache layer which meets the preset relation with the first-level cache layer according to the data capacity, and when the page data corresponding to the data capacity is found, the page data corresponding to the data capacity is displayed in a target page. The preset relationship can be specifically set according to actual conditions.
In one embodiment, step S102 includes:
searching corresponding data in the second-level cache layer according to the data capacity;
when the corresponding data is found in the second-level cache layer, judging that the data capacity exists in the second-level cache layer;
when the corresponding data is not found in the second-level cache layer, judging that the data capacity does not exist in the second-level cache layer; the second-level cache layer is used for storing data with a preset numerical value as the difference value of the page number of the data in the first-level cache layer.
In a specific application, the preset relationship is that a difference of page numbers between page data stored in the first-level cache layer and page data stored in the second-level cache layer is a preset value, that is, page data having a difference of page numbers between the page data stored in the first-level cache layer and page data stored in the second-level cache layer and the first-level cache layer is a preset value is cached in the second-level cache layer satisfying the preset relationship with the first-level cache layer. The page number difference is a difference between the page number of the page data in the first-level cache layer and the page number of the page data in the second-level cache layer.
In specific application, searching corresponding page data in a second-level cache layer according to the data capacity, and judging that the data capacity exists in the second-level cache layer when the corresponding page data is searched in the second-level cache layer; and when the corresponding page data is not found in the second-level cache layer, judging that the data capacity does not exist in the second-level cache layer.
For example, a preset value is set to be 1, and the corresponding preset relationship is that the difference of the page numbers of the page data is 1; that is, in the second level cache layer, page data having a difference of 1 from the page number of the page data in the first level cache layer is stored, that is, page data of a previous page and page data of a next page of the page data in the first level cache layer are stored in the second level cache layer.
For example, at the current time, the target page displays page data of 100 2 nd pages (which are stored in the first-level cache layer), and page data of 100 1 st pages and page data of 100 3 rd pages are cached in the second-level cache layer which meets the preset relationship with the first-level cache layer correspondingly; when a target page loading request is received, if the page data of the target page carried by the target page loading request and having the data capacity of 100 pages 6 is analyzed, the page data of the 100 pages 6 needs to be searched in the second-level cache layer according to the data capacity, so as to judge whether the data capacity exists in the second-level cache layer which meets the preset relation with the first-level cache layer.
And S104, when the data capacity exists in a second-level cache layer which meets the preset relation with the first-level cache layer, loading data corresponding to the data capacity from the second-level cache layer, and displaying the data on a target page.
In a specific application, if the corresponding page data is found in the second level cache layer which meets the preset relation with the first level cache layer according to the data capacity, the page data corresponding to the data capacity is loaded from the second level cache layer and is displayed on a target page. The second level cache layer may be an internal storage space of the CPU or a memory.
For example, at the current time, the target page displays page data of 100 2 nd pages (which are stored in the first-level cache layer), and page data of 100 1 st pages and page data of 100 3 rd pages are cached in the second-level cache layer which meets the preset relationship with the first-level cache layer correspondingly; when a target page loading request is received, if the data capacity of a target page carried by the target page loading request is analyzed to be page data of 100 1 st pages, the page data of the 100 1 st pages can be found in a second-level cache layer which meets a preset relation with a first-level cache layer according to the data capacity, and the page data loaded with the 100 1 st pages is stored in the first-level cache layer and is displayed on the target page.
In one embodiment, the preset value is set to be 2, and the corresponding preset relationship is that the difference between the page numbers of the page data is 2, that is, the page data of the upper 2 pages and the page data of the lower 2 pages of the page data in the first-level cache layer are stored in the second-level cache layer.
For example, the page data in the first-level cache layer is 100 pieces of data of the 5 th page, and correspondingly, 200 pieces of page data of the upper 2 pages of the page data in the first-level cache layer (that is, 100 pieces of page data of the 3 rd page and 100 pieces of page data of the 4 th page) and 200 pieces of page data of the lower 2 pages of the page data in the first-level cache layer (that is, 100 pieces of page data of the 6 th page and 100 pieces of page data of the 7 th page) may be obtained and stored in the second-level cache layer.
And S105, when the data capacity does not exist in the second-level cache layer which meets the preset relation with the first-level cache layer, loading data corresponding to the data capacity from the third-level cache layer, and displaying the data on a target page.
In a specific application, if the page data corresponding to the data capacity is not found in the second level cache layer satisfying the preset relationship with the first level cache layer, the page data corresponding to the data capacity is loaded in the third level cache layer and displayed on the target page.
The third level cache layer is used for storing the database data of the list, which may include but is not limited to a database or a hard disk.
For example, the page data in the first-level cache layer is 100 pieces of 5 th page data, and the corresponding second-level cache layer satisfying the preset relationship with the first-level cache layer includes 100 pieces of 3 rd page data and 100 pieces of 4 th page data; when the page data of the target page carried by the target page loading request is analyzed, the data capacity of the target page is 100 page data of the 1 st page, the data capacity is judged not to exist in the second-level cache layer which meets the preset relation with the first-level cache layer, the 100 page data of the 5 th page are loaded from the third-level cache layer, and are stored in the first-level cache layer and displayed on the target page.
In one embodiment, the method for displaying list data based on hierarchical cache further includes:
when data corresponding to the data capacity is loaded, storing the loaded data in a first-level cache layer;
and updating the data in the second-level cache layer.
In a specific application, if the corresponding page data is found in the first-level cache layer according to the data capacity, it can be understood that at the current time, the target page is displaying the page data corresponding to the data capacity of the target page carried in the target page loading request, and the second-level cache layer satisfying the preset relationship with the first-level cache layer is storing the page data satisfying the preset relationship with the page data corresponding to the data capacity.
For example, at the present time, the target page displays page data of 100 pages 6 (which are stored in the first-level cache layer), and the preset relationship is that the difference between the page numbers of the page data is 1. When a target page loading request is received, analyzing page data of a target page, which has a data capacity of 100 pages 6 and is carried by the target page loading request, and correspondingly finding the page data of the 100 pages 6 in a first-level cache layer according to the data capacity, that is, at the current time, the target page is displaying the page data of the 100 pages 6 corresponding to the target page loading request, so that the target page loading request can be understood to obtain: at the current moment, page data meeting the preset relation with the page data of the 6 th page of 100 pieces is stored in the second-level cache layer.
In a specific application, the second-level cache layer satisfying the preset relationship with the first-level cache layer is used for caching page data with the page number difference value of the page data in the first-level cache layer as a preset numerical value. Therefore, after loading the page data corresponding to the data capacity, storing the loaded page data corresponding to the data capacity in the first-level cache layer, and updating the data in the second-level cache layer, including:
if the data capacity is detected to exist in a second-level cache layer which meets a preset relation with a first-level cache layer, page data corresponding to the data capacity is loaded from the second-level cache layer, the loaded page data is stored in the first-level cache layer, and the page data is displayed on a target page; and acquiring corresponding data (namely the data meeting a preset relation with the data in the primary cache layer) from the third-level cache layer so as to update the data in the second-level cache layer.
If the data capacity is detected to exist in the third-level cache layer, page data corresponding to the data capacity is loaded from the third-level cache layer, and the loaded page data is stored in the first-level cache layer and displayed on a target page; and acquiring corresponding data from the third-level cache layer to update the data in the second-level cache layer.
For example, at the present time, the target page displays page data of 100 2 nd pages (which are stored in the first-level cache layer), page data of 100 1 st pages and page data of 100 3 rd pages are cached in the second-level cache layer that satisfies the preset relationship with the first-level cache layer, and the preset relationship is that the difference between the page numbers of the page data is 1. When a target page loading request is received, if the data capacity of a target page carried by the target page loading request is analyzed to be page data of 100 pages 3, judging that the data capacity exists in a second-level cache layer which meets a preset relation with a first-level cache layer, loading the page data of the 100 pages 3 from the second-level cache layer, storing the page data in the first-level cache layer, displaying the page data on the target page, acquiring the page data of the 100 pages 2 and the page data of the 100 pages 4 from the third-level cache layer, and updating the data in the second-level cache layer. When a target page loading request is received, if the data capacity of a target page carried by the target page loading request is analyzed to be page data of 100 8 th pages, the data capacity is judged to be in a third-level cache layer, the page data of the 100 8 th pages are loaded from the third-level cache layer, stored in a first-level cache layer and displayed on the target page, the page data of the 100 7 th pages and the page data of the 100 9 th pages are obtained from the third-level cache layer, and the data in the second-level cache layer are updated.
In one embodiment, before step S101, the method includes:
s201, the list data are classified, and the list data are stored in the corresponding cache layer according to the data grades.
In specific application, all the list data are acquired in advance, the list data are classified, and the corresponding list data are stored in the corresponding cache layer according to each data grade.
For example, when page data of page 1 in the list is classified as first-level data, the page data of page 1 is stored in a first-level cache layer.
As shown in fig. 2, in one embodiment, step S201 includes:
s2011, acquiring data meeting preset conditions in the list data, serving as first-level data, storing the first-level data in a first-level cache layer, and displaying the first-level data on a target page;
s2012, acquiring data meeting a preset relation with the first-level data, taking the data as second-level data and storing the data in a second-level cache layer;
and S2013, taking the database data of the list as third-level data and storing the third-level data in a third-level cache layer.
In specific application, all list data are obtained in advance, data meeting preset conditions in the list data are stored in a first-level cache layer as first-level data, and the first-level data are displayed on a target page. The preset condition may be a page with the maximum use frequency;
for example, in general, the page with the highest frequency of use is the 1 st page, and the corresponding page data of the 1 st page of 100 pieces of data meeting the preset condition is stored in the first-level cache layer as the first-level data and displayed on the target page.
In specific application, determining page data which meets a preset relation with the primary data in the list data, taking the page data as secondary data and storing the page data in a secondary cache layer; for example, if the preset relationship is that the difference between the page numbers of the page data is 1, when the primary data is page data of 100 1 st pages, the page data of 100 2 nd pages that satisfy the preset relationship with the primary data is correspondingly stored in the secondary cache layer as secondary data.
In a specific application, all data in the database of the list is used as three-level data, and the three-level data is stored in the internal storage space. The database may be a relational database (e.g., MySQL, SqlServer), or a non-relational database (e.g., Redis).
It can be understood that, when storing the third-level data and the second-level data, in order to ensure the stability and the order of the data, the third-level data and the second-level data are respectively stored in different internal storage spaces.
The method has the advantages that the list data are stored in a grading mode in advance, the first-grade data are stored in the non-internal storage space, the internal storage space occupied by the list data in the storage process is reduced, a Central Processing Unit (CPU) and the memory occupancy rate are reduced, the data of the page corresponding to the target page loading request can be acquired quickly when the target page loading request is received, and the display performance and the system response speed are improved.
By storing data in a grading way in advance, when a target page loading request is received, the loaded data is analyzed and searched in different cache layers according to the data capacity of the target page carried by the target page loading request, so that the internal storage space required during data caching is reduced, the occupancy rate of the internal storage space is reduced, and the data processing efficiency is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 shows a block diagram of a hierarchical cache-based list data display apparatus according to an embodiment of the present application, which corresponds to the hierarchical cache-based list data display method according to the foregoing embodiment, and only shows portions related to the embodiment of the present application for convenience of description.
Referring to fig. 3, the hierarchical cache-based list data display apparatus 100 includes:
a receiving module 101, configured to receive a target page loading request; the target page loading request carries the data capacity of a target page, and the target page corresponds to a first-level cache layer;
a first judging module 102, configured to judge whether a data capacity exists in a first-level cache layer;
the second judging module 103 is configured to, when the data capacity does not exist in the first-level cache layer, judge whether the data capacity exists in a second-level cache layer that satisfies a preset relationship with the first-level cache layer;
the first loading module 104 is configured to, when the data capacity exists in a second level cache layer that satisfies a preset relationship with the first level cache layer, load data corresponding to the data capacity from the second level cache layer, and display the data on a target page;
and the second loading module 105 is configured to, when the data capacity does not exist in the second level cache layer that satisfies the preset relationship with the first level cache layer, load data corresponding to the data capacity from the third level cache layer, and display the data on the target page.
As shown in fig. 4, in one embodiment, the apparatus 100 for displaying list data based on hierarchical caching further includes:
a third loading module 106, configured to, when loading data corresponding to the data capacity, store the loaded data in the first-level cache layer;
and the updating module 107 is used for updating the data in the second-level cache layer.
In one embodiment, the determining module 101 includes:
the searching unit is used for searching corresponding data in the second-level cache layer according to the data capacity;
the first judging unit is used for judging that the data capacity exists in the second-level cache layer when the corresponding data is found in the second-level cache layer;
the second judging unit is used for judging that the data capacity does not exist in the second-level cache layer when the corresponding data is not found in the second-level cache layer; the second-level cache layer is used for storing data with a preset numerical value as the difference value of the page number of the data in the first-level cache layer.
In one embodiment, the apparatus 100 for displaying list data based on hierarchical caching further comprises:
and the hierarchical storage module 201 is configured to hierarchy the list data and store the list data in a corresponding cache layer according to the data hierarchy.
As shown in FIG. 5, in one embodiment, the hierarchical storage module 201 includes:
a first obtaining unit 2011, configured to obtain data meeting a preset condition in the list data, store the data as first-level data in a first-level cache layer, and display the data on a target page;
a second obtaining unit 2012, configured to obtain data that satisfies a preset relationship with the first-level data, as second-level data, and store the second-level data in a second-level cache layer;
and the storage unit 2013 is used for taking the database data of the list as third-level data and storing the third-level data in a third-level cache layer.
By storing data in a grading way in advance, when a target page loading request is received, the loaded data is analyzed and searched in different cache layers according to the data capacity of the target page carried by the target page loading request, so that the internal storage space required during data caching is reduced, the occupancy rate of the internal storage space is reduced, and the data processing efficiency is improved.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device 6 of this embodiment includes: at least one processor 60 (only one is shown in fig. 6), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, wherein the processor 60 executes the computer program 62 to implement the steps of any of the various hierarchical cache-based listing data display method embodiments described above.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is only an example of the terminal device 6, and does not constitute a limitation to the terminal device 6, and may include more or less components than those shown, or combine some components, or different components, such as an input/output device, a network access device, and the like.
The Processor 60 may be a Central Processing Unit (CPU), and the Processor 60 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. In other embodiments, the memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer programs. The above-mentioned memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should 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; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A list data display method based on hierarchical cache is characterized by comprising the following steps:
receiving a target page loading request; the target page loading request carries the data capacity of a target page, and the target page corresponds to a first-level cache layer;
judging whether the data capacity exists in the first-level cache layer;
when the data capacity does not exist in the first-level cache layer, judging whether the data capacity exists in a second-level cache layer which meets a preset relation with the first-level cache layer; the second-level cache layer is used for storing data with a preset numerical value of difference of page numbers of the data in the first-level cache layer;
when the data capacity exists in a second-level cache layer which meets a preset relation with the first-level cache layer, loading data corresponding to the data capacity from the second-level cache layer, and displaying the data capacity on a target page;
and when the data capacity does not exist in the second-level cache layer which meets the preset relation with the first-level cache layer, loading data corresponding to the data capacity from the third-level cache layer, and displaying the data on a target page.
2. The method for displaying hierarchical cache-based tabular data as claimed in claim 1, wherein said determining whether said data capacity exists in a second level cache layer satisfying a predetermined relationship with said first level cache layer comprises:
searching corresponding data in the second-level cache layer according to the data capacity;
when the corresponding data is found in the second-level cache layer, judging that the data capacity exists in the second-level cache layer;
and when the corresponding data is not found in the second-level cache layer, judging that the data capacity does not exist in the second-level cache layer.
3. The method for displaying data in a list based on a hierarchical cache according to claim 1, wherein before receiving a target page load request, the method comprises:
and classifying the list data, and storing the list data in a corresponding cache layer according to the data grade.
4. The method for displaying listing data based on hierarchical caching according to claim 3, wherein said step of ranking the listing data and storing the listing data in a corresponding caching layer according to data rank comprises:
acquiring data meeting preset conditions in the list data, taking the data as first-level data, storing the data in the first-level cache layer, and displaying the data on the target page;
acquiring data meeting the preset relation with the first-level data, taking the data as second-level data and storing the data in the second-level cache layer;
and taking the database data of the list as third-level data and storing the data in the third-level cache layer.
5. The hierarchical cache-based tabular data display method of claim 1, said method further comprising:
when the data corresponding to the data capacity is loaded, storing the loaded data in the first-level cache layer;
and updating the data in the second-level cache layer.
6. A list data display apparatus based on a hierarchical cache, comprising:
the receiving module is used for receiving a target page loading request; the target page loading request carries the data capacity of a target page, and the target page corresponds to a first-level cache layer;
the first judging module is used for judging whether the data capacity exists in the first-level cache layer or not;
the second judging module is used for judging whether the data capacity exists in a second-level cache layer which meets a preset relation with the first-level cache layer or not when the data capacity does not exist in the first-level cache layer; the second-level cache layer is used for storing data with a preset numerical value of difference of page numbers of the data in the first-level cache layer;
the first loading module is used for loading data corresponding to the data capacity from the second-level cache layer when the data capacity exists in the second-level cache layer which meets the preset relation with the first-level cache layer, and displaying the data on a target page;
and the second loading module is used for loading the data corresponding to the data capacity from the third-level cache layer and displaying the data on a target page when the data capacity does not exist in the second-level cache layer which meets the preset relation with the first-level cache layer.
7. The apparatus for displaying data on a hierarchical cache-based list according to claim 6, wherein said judging module comprises:
the searching unit is used for searching corresponding data in the second-level cache layer according to the data capacity;
the first judging unit is used for judging that the data capacity exists in the second-level cache layer when the corresponding data is found in the second-level cache layer;
a second determining unit, configured to determine that the data volume does not exist in the second level cache layer when the corresponding data is not found in the second level cache layer.
8. The hierarchical cache-based tabular data display apparatus of claim 6, said apparatus further comprising:
and the hierarchical storage module is used for classifying the list data and storing the list data in the corresponding cache layer according to the data grade.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN202011416738.8A 2020-12-07 2020-12-07 List data display method and device based on hierarchical cache and terminal equipment Active CN112395322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011416738.8A CN112395322B (en) 2020-12-07 2020-12-07 List data display method and device based on hierarchical cache and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011416738.8A CN112395322B (en) 2020-12-07 2020-12-07 List data display method and device based on hierarchical cache and terminal equipment

Publications (2)

Publication Number Publication Date
CN112395322A CN112395322A (en) 2021-02-23
CN112395322B true CN112395322B (en) 2021-06-01

Family

ID=74605114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011416738.8A Active CN112395322B (en) 2020-12-07 2020-12-07 List data display method and device based on hierarchical cache and terminal equipment

Country Status (1)

Country Link
CN (1) CN112395322B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699154B (en) * 2021-03-25 2021-06-18 上海洋漪信息技术有限公司 Multi-level caching method for large-flow data
CN114489551A (en) * 2022-02-09 2022-05-13 广东乐心医疗电子股份有限公司 Data display method and device and electronic equipment
CN115033608B (en) * 2022-08-12 2022-11-04 广东采日能源科技有限公司 Energy storage system information grading processing method and system
CN115858408A (en) * 2022-12-29 2023-03-28 南京维拓科技股份有限公司 Method for transmitting design parameters in industrial design process

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6564302B1 (en) * 2000-04-11 2003-05-13 Hitachi, Ltd. Information processing apparatus with cache coherency
CN1934544A (en) * 2004-06-17 2007-03-21 国际商业机器公司 System and method for maintaining objects in a lookup cache
CN102541924A (en) * 2010-12-21 2012-07-04 中国移动通信集团公司 Retrieval information caching method and search engine system
CN102955786A (en) * 2011-08-22 2013-03-06 北大方正集团有限公司 Method and system for caching and distributing dynamic webpage data
CN103077125A (en) * 2012-12-13 2013-05-01 北京锐安科技有限公司 Self-adaption self-organizing tower type caching method for efficiently utilizing storage space
US8549230B1 (en) * 2005-06-10 2013-10-01 American Megatrends, Inc. Method, system, apparatus, and computer-readable medium for implementing caching in a storage system
CN103702208A (en) * 2013-11-29 2014-04-02 康佳集团股份有限公司 Data broadcasting system based on user action prediction and data acceleration method thereof
CN103778071A (en) * 2014-01-20 2014-05-07 华为技术有限公司 Cache space distribution method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202492B (en) * 2016-07-19 2020-05-29 浪潮(北京)电子信息产业有限公司 Metadata service optimization method and system for network file system
KR102036419B1 (en) * 2017-12-27 2019-10-24 충북대학교 산학협력단 Multi-level caching method for improving graph processing performance, and multi-level caching system
CN111917882B (en) * 2020-08-07 2023-04-07 湖南快乐阳光互动娱乐传媒有限公司 File caching method and device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6564302B1 (en) * 2000-04-11 2003-05-13 Hitachi, Ltd. Information processing apparatus with cache coherency
CN1934544A (en) * 2004-06-17 2007-03-21 国际商业机器公司 System and method for maintaining objects in a lookup cache
US8549230B1 (en) * 2005-06-10 2013-10-01 American Megatrends, Inc. Method, system, apparatus, and computer-readable medium for implementing caching in a storage system
CN102541924A (en) * 2010-12-21 2012-07-04 中国移动通信集团公司 Retrieval information caching method and search engine system
CN102955786A (en) * 2011-08-22 2013-03-06 北大方正集团有限公司 Method and system for caching and distributing dynamic webpage data
CN103077125A (en) * 2012-12-13 2013-05-01 北京锐安科技有限公司 Self-adaption self-organizing tower type caching method for efficiently utilizing storage space
CN103702208A (en) * 2013-11-29 2014-04-02 康佳集团股份有限公司 Data broadcasting system based on user action prediction and data acceleration method thereof
CN103778071A (en) * 2014-01-20 2014-05-07 华为技术有限公司 Cache space distribution method and device

Also Published As

Publication number Publication date
CN112395322A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
CN112395322B (en) List data display method and device based on hierarchical cache and terminal equipment
CN111352902A (en) Log processing method and device, terminal equipment and storage medium
CN109076021B (en) Data processing method and device
US10223286B2 (en) Balanced cache for recently frequently used data
CN110597865A (en) Method and device for processing user label, computing equipment and storage medium
CN112580315A (en) Webpage table display method and device, terminal equipment and medium
CN113010116A (en) Data processing method and device, terminal equipment and readable storage medium
CN110598993B (en) Data processing method and device
CN115858467A (en) File processing method and device for key value database, electronic equipment and medium
CN111209257A (en) Method and device for fragmenting file system
CN107391627B (en) Data memory occupation analysis method and device and server
CN104166649A (en) Caching method and device for search engine
CN111858612B (en) Data accelerated access method and device based on graph database and storage medium
CN107169115A (en) Add the method and device of self-defined participle
CN115190010B (en) Distributed recommendation method and device based on software service dependency relationship
CN116842012A (en) Method, device, equipment and storage medium for storing Redis cluster in fragments
CN111831691A (en) Data reading and writing method and device, electronic equipment and storage medium
CN113760237A (en) Compiling address updating method and device, terminal equipment and readable storage medium
CN114374392A (en) Data compression storage method and device, terminal equipment and readable storage medium
CN112052330B (en) Application keyword distribution method and device
CN113419792A (en) Event processing method and device, terminal equipment and storage medium
CN112527276A (en) Data updating method and device in visual programming tool and terminal equipment
CN105468603A (en) Data selection method and apparatus
CN111104426B (en) Data query method and system
CN116561374B (en) Resource determination method, device, equipment and medium based on semi-structured storage

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220808

Address after: 410000 room 206, building A10, phase II, CEC Software Park, No. 18 Jianshan Road, Changsha high tech Development Zone, Changsha, Hunan Province

Patentee after: Hunan zhishengyun Technology Co.,Ltd.

Address before: 410000 Yuelu District Yuelu street, Changsha, Hunan Province, 5 left 101 rooms of R & D headquarters of Central South University Science Park.

Patentee before: HUNAN NEW CLOUDNET TECHNOLOGY Co.,Ltd.