Cache data processing method, device, electronic device and computer readable medium

By classifying and processing cached data based on user access information and popularity values, the problem of cache space is solved and the efficiency of cache utilization is improved.

CN113760178BActive Publication Date: 2024-11-15BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110130487.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-29
Publication Date
2024-11-15
Estimated Expiration
2041-01-29

AI Technical Summary

Technical Problem

In the cache data processing, the prior art, since the user data contains data with a low usage rate, the cache storage space is wasted, reducing the cache utilization efficiency.

Method used

By generating a candidate cache information set based on user access information and classifying it according to the popularity value, a first-level cache information set, a second-level cache information set and a third-level cache information set are generated, which are loaded into the cache in turn, and the cache release time is set. To optimize the loading and release of cached data.

Benefits of technology

Improve the efficiency of cache utilization, and effectively utilize the cache space through filtering and classification processing, avoiding the data footprint with low usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760178B_ABST
    Figure CN113760178B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a cache data processing method, device, electronic device and computer-readable medium. A specific implementation of the method includes: generating first candidate cache information according to user access information in the user access information cache queue that matches each to-be-cached function information in the to-be-cached function information list, and obtaining a first candidate cache information set; determining the heat value corresponding to each first candidate cache information in the first candidate cache information set, and obtaining a heat value set; based on the heat value set and the first candidate cache information set, generating a first-level cache information set, a second-level cache information set and a third-level cache information set; in response to receiving the target request information of the target user, sequentially loading the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set into the cache. This implementation improves the utilization efficiency of the cache.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a cache data processing method, device, electronic device, and computer-readable medium. Background Art

[0002] With the increasing network traffic, in order to reduce the time consumption caused by frequently obtaining data from an external memory, the prior art often loads all user data into a cache.

[0003] However, when the above method is adopted, the following technical problems often occur:

[0004] Since user data often contains some data with low usage rate, cache storage space is wasted, thereby reducing the utilization efficiency of the cache. Summary of the invention

[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present disclosure propose a cache data processing method, device, electronic device, and computer-readable medium to solve one of the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide a cache data processing method, the method comprising: generating first candidate cache information based on user access information that matches each to-be-cached function information in a to-be-cached function information list in a user access information cache queue, and obtaining a first candidate cache information set; determining a heat value corresponding to each first candidate cache information in the above-mentioned first candidate cache information set, and obtaining a heat value set; generating a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the above-mentioned heat value set and the above-mentioned first candidate cache information set; in response to receiving a target request information of a target user, sequentially loading into the cache the user cache data corresponding to each cache information in the above-mentioned first-level cache information set, the above-mentioned second-level cache information set, and the above-mentioned third-level cache information set.

[0008] Optionally, the method further includes: setting cache release time for user cache data corresponding to the cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set, respectively, to generate a first cache release time, a second cache release time and a third cache release time.

[0009] Optionally, the above method also includes: in response to determining that the target user cache data is not stored in the above cache, determining a cache information set including cache information corresponding to the above target user cache data as a second candidate cache information set; and loading user data corresponding to each second candidate cache information in the above second candidate cache information set into the above cache.

[0010] Optionally, before generating the first candidate cache information based on the user access information in the user access information cache queue that matches each function information to be cached in the function information list to be cached, and obtaining the first candidate cache information set, the method further includes: taking the historical access data of the target user as the user access information, and adding it to the user access information cache queue.

[0011] Optionally, the above-mentioned first-level cache information set, second-level cache information set and third-level cache information set are generated based on the above-mentioned heat value set and the above-mentioned first candidate cache information set, including: filtering out the first candidate cache information whose corresponding heat value meets the first filtering condition from the above-mentioned first candidate cache information set as the first-level cache information, to obtain the above-mentioned first-level cache information set.

[0012] Optionally, the above-mentioned generation of a first-level cache information set, a second-level cache information set and a third-level cache information set based on the above-mentioned heat value set and the above-mentioned first candidate cache information set also includes: filtering out the first candidate cache information whose corresponding heat value satisfies the second filtering condition from the above-mentioned first candidate cache information set as the second-level cache information, to obtain the above-mentioned second-level cache information set.

[0013] Optionally, the above-mentioned generation of a first-level cache information set, a second-level cache information set and a third-level cache information set based on the above-mentioned heat value set and the above-mentioned first candidate cache information set also includes: filtering out the first candidate cache information whose corresponding heat value satisfies the third filtering condition from the above-mentioned first candidate cache information set as the third-level cache information, to obtain the above-mentioned third-level cache information set.

[0014] Optionally, the method further includes: in response to reaching the first cache release time, clearing the user cache data corresponding to each first-level cache information in the first-level cache information set from the cache.

[0015] Optionally, the method further includes: in response to reaching the second cache release time, clearing the user cache data corresponding to each level 2 cache information in the level 2 cache information set from the cache.

[0016] Optionally, the method further includes: in response to reaching the third cache release time, clearing the user cache data corresponding to each level 3 cache information in the level 3 cache information set from the cache.

[0017] Optionally, the user access information includes: a user identity, an access interface address and a number of user accesses; and the historical access data of the target user is taken as user access information and added to the user access information cache queue, including: in response to determining that the user access information cache queue contains user access information that satisfies an adding condition, an accumulation operation is performed on the number of user accesses included in the user access information that satisfies the adding condition, wherein the adding condition is: the user identity and access interface address included in the user access information are respectively the same as the user identity and access interface address included in the user access information corresponding to the historical access data.

[0018] Optionally, the above-mentioned taking the historical access data of the above-mentioned target user as user access information and adding it to the above-mentioned user access information cache queue also includes: in response to determining that the above-mentioned user access information cache queue does not contain user access information that meets the adding condition, taking the historical access data of the above-mentioned target user as user access information and adding it to the above-mentioned user access information cache queue, and setting the number of user accesses included in the user access information corresponding to the above-mentioned historical access data to a preset value.

[0019] In a second aspect, some embodiments of the present disclosure provide a cache data processing device, the device comprising: a first generating unit, configured to generate first candidate cache information according to user access information that matches each to-be-cached function information in a to-be-cached function information list in a user access information cache queue, and obtain a first candidate cache information set; a determining unit, configured to determine a heat value corresponding to each first candidate cache information in the above-mentioned first candidate cache information set, and obtain a heat value set; a second generating unit, configured to generate a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the above-mentioned heat value set and the above-mentioned first candidate cache information set; a loading unit, configured to, in response to receiving target request information of a target user, load into the cache in sequence the user cache data corresponding to each cache information in the above-mentioned first-level cache information set, the above-mentioned second-level cache information set, and the above-mentioned third-level cache information set.

[0020] Optionally, the device also includes: setting cache release time for user cache data corresponding to the cache information in the above-mentioned first-level cache information set, the above-mentioned second-level cache information set and the above-mentioned third-level cache information set, so as to generate a first cache release time, a second cache release time and a third cache release time.

[0021] Optionally, the device also includes: in response to determining that the target user cache data is not stored in the above-mentioned cache, determining a cache information set including cache information corresponding to the above-mentioned target user cache data as a second candidate cache information set; and loading user data corresponding to each second candidate cache information in the above-mentioned second candidate cache information set into the above-mentioned cache.

[0022] Optionally, before the first generating unit, the device further comprises: taking the historical access data of the target user as the user access information, and adding the historical access data into the user access information cache queue.

[0023] Optionally, the second generating unit is further configured to: filter out first candidate cache information whose corresponding heat value meets the first filtering condition from the first candidate cache information set as first-level cache information to obtain the first-level cache information set.

[0024] Optionally, the second generating unit is further configured to: filter out first candidate cache information whose corresponding heat value meets a second filtering condition from the first candidate cache information set as secondary cache information to obtain the secondary cache information set.

[0025] Optionally, the second generating unit is further configured to: filter out first candidate cache information whose corresponding heat value meets a third filtering condition from the first candidate cache information set as third-level cache information to obtain the third-level cache information set.

[0026] Optionally, the apparatus further comprises: in response to reaching the first cache release time, clearing the user cache data corresponding to each first-level cache information in the first-level cache information set from the cache.

[0027] Optionally, the apparatus further comprises: in response to reaching the second cache release time, clearing the user cache data corresponding to each level 2 cache information in the level 2 cache information set from the cache.

[0028] Optionally, the apparatus further comprises: in response to reaching the third cache release time, clearing the user cache data corresponding to each level 3 cache information in the level 3 cache information set from the cache.

[0029] Optionally, the user access information includes: a user identity, an access interface address and a number of user accesses; and the device also includes: in response to determining that the user access information cache queue contains user access information that meets an adding condition, performing an accumulation operation on the number of user accesses included in the user access information that meets the adding condition, wherein the adding condition is: the user identity and access interface address included in the user access information are respectively the same as the user identity and access interface address included in the user access information corresponding to the historical access data.

[0030] Optionally, the device also includes: in response to determining that the above-mentioned user access information cache queue does not contain user access information that meets the adding conditions, taking the historical access data of the above-mentioned target user as user access information, adding it to the above-mentioned user access information cache queue, and setting the number of user accesses included in the user access information corresponding to the above-mentioned historical access data to a preset value.

[0031] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0032] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0033] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the cache data processing method of some embodiments of the present disclosure, the cache utilization efficiency is improved. Specifically, the reason for the low cache utilization efficiency is that the existing technology often loads all user data into the cache. Based on this, the cache data processing method of some embodiments of the present disclosure, first, through the list of function information to be cached, the user access information is filtered out from the user access information cache queue to obtain a first candidate cache information set. In actual situations, user data often contains a part of data with low usage efficiency. Through the list of function information to be cached, the filtering of data with low usage efficiency is achieved. Secondly, the heat value corresponding to each first candidate cache information in the first candidate cache information set is determined to obtain a heat value set. Because the user's access frequency to the first candidate cache information in the filtered first candidate cache information set is often different. The first candidate cache information in the first candidate cache information set is classified by heat value to obtain a first-level cache information set, a second-level cache information set and a third-level cache information set. Through classification processing, subsequent batch processing of cache information is convenient. Finally, in response to receiving the target request information of the target user, the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set are loaded into the cache in sequence. By loading the user cache data into the cache after receiving the target request information of the target user, the utilization efficiency of the cache is ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0035] Figure 1 is a schematic diagram of an application scenario of the cache data processing method of some embodiments of the present disclosure;

[0036] Figure 2 is a flow chart of some embodiments of the cache data processing method according to the present disclosure;

[0037] Figure 3 It is an authorization prompt box in some embodiments of the cache data processing method according to the present disclosure;

[0038] Figure 4 are flow charts of other embodiments of the cache data processing method according to the present disclosure;

[0039] Figure 5 is a schematic diagram of the structure of some embodiments of the cache data processing device according to the present disclosure;

[0040] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0041] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0042] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0043] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0044] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0045] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0046] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0047] Figure 1 It is a schematic diagram of an application scenario of the cache data processing method of some embodiments of the present disclosure.

[0048] exist Figure 1In the application scenario, first, the computing device 101 can generate first candidate cache information based on the user access information in the user access information cache queue 102 (for example, [("Function1", 11), ("Function2", 21), ("Function3", 12), ("Function4", 22), ("Function5", 20)]) that matches each to-be-cached function information in the to-be-cached function information list 103 (for example, ["Function1", "Function2", "Function3", "Function4"]), and obtain a first candidate cache information set 104 (for example, [("Function1", 11), ("Function2", 21), ("Function3", 12), ("Function4", 22)]). Then, the computing device 101 can determine the heat value corresponding to each first candidate cache information in the above-mentioned first candidate cache information set 104, and obtain a heat value set 105 (for example, [16.77%, 31.82%, 18.18%, 33.33%]). Secondly, the computing device 101 can generate a first-level cache information set 106 (for example, [("Function1", 11)]), a second-level cache information set 107 (for example, [("Function3", 12)]) and a third-level cache information set 108 (for example, [("Function2", 21)]) based on the above-mentioned heat value set 105 and the above-mentioned first candidate cache information set 104. Furthermore, the computing device 101 can, in response to receiving the target request information 109 of the target user, load the user cache data corresponding to each cache information in the above-mentioned first-level cache information set 106, the above-mentioned second-level cache information set 107 and the above-mentioned third-level cache information set 108 into the cache 110 in sequence.

[0049] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.

[0050] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.

[0051] Continue to refer Figure 2, shows a process 200 of some embodiments of the cache data processing method according to the present disclosure. The cache data processing method comprises the following steps:

[0052] Step 201 : Generate first candidate cache information according to user access information in the user access information cache queue that matches each to-be-cached function information in the to-be-cached function information list, and obtain a first candidate cache information set.

[0053] In some embodiments, the execution body of the cache data processing method (for example Figure 1 The computing device 101 shown in the figure can generate first candidate cache information according to the user access information in the user access information cache queue that matches each to-be-cached function information in the to-be-cached function information list, and obtain a first candidate cache information set. Among them, the user access information in the above-mentioned user access information cache queue can represent the interface information of the interface accessed by the user. The user access information in the above-mentioned user access information cache queue can include: user access interface identifier and interface call times. The above-mentioned user access interface identifier can be used to represent the identification information of the interface called by the user. The above-mentioned user access interface identifier can be the interface name of the interface called by the user. The above-mentioned user access interface identifier can also be the interface number of the interface called by the user. The above-mentioned interface call times can be used to represent the number of times the user calls the interface. The to-be-cached function information in the above-mentioned to-be-cached function information list can represent the interface information corresponding to the interface that needs to be cached. The to-be-cached function information in the above-mentioned to-be-cached function information list can include: interface identifier. The above-mentioned interface identifier can represent the identification information corresponding to the interface that needs to be cached. The above-mentioned execution subject can select the target user access information from the above-mentioned user access information cache queue for each to-be-cached function information in the above-mentioned to-be-cached function information list to generate the first candidate cache information. The target user access information may be user access information including an interface identifier that is the same as the user access interface identifier included in the function information to be cached.

[0054] As an example, the user access information cache queue may be [("Function1", 11), ("Function2", 21), ("Function3", 12), ("Function4", 22), ("Function5", 20)]. The to-be-cached function information list may be ["Function1", "Function2", "Function3", "Function4"]. The first candidate cache information set may be [("Function1", 11), ("Function2", 21), ("Function3", 12), ("Function4", 22)].

[0055] Step 202: determine the heat value corresponding to each first candidate cache information in the first candidate cache information set to obtain a heat value set.

[0056] In some embodiments, the execution subject determines the heat value corresponding to each first candidate cache information in the first candidate cache information set, which may include the following steps:

[0057] In the first step, the sum of the numbers of interface calls included in each of the first candidate cache information in the first candidate cache information set is determined as the total number of interface calls.

[0058] As an example, the first candidate cache information set may be [("Function1", 11), ("Function2", 21), ("Function3", 12), ("Function4", 22)]. The total number of interface calls may be 66.

[0059] In the second step, the heat value corresponding to the first candidate cache information is determined by the following formula:

[0060]

[0061] Wherein, H represents the above heat value, F represents the number of interface calls included in the above first candidate cache information, and S represents the total number of interface calls.

[0062] As an example, the first candidate cache information may be ("Function2", 21). The heat value corresponding to the first candidate cache information may be 31.82% (wherein the heat value may retain two decimal places).

[0063] Step 203: Generate a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the heat value set and the first candidate cache information set.

[0064] In some embodiments, the execution subject generates a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the heat value set and the first candidate cache information set, which may include the following steps:

[0065] In the first step, based on the heat value set, the first candidate cache information in the first candidate cache information set is sorted to generate a sorted first candidate cache information set.

[0066] The execution subject may sort the first candidate cache information in the first candidate cache information set based on the heat value set by bubble sort or quick sort.

[0067] As an example, the first candidate cache information set may be [("Function1", 11), ("Function2", 21), ("Function3", 12), ("Function4", 22)]. The heat value set may be [16.77%, 31.82%, 18.18%, 33.33%]. The sorted first candidate cache information set may be [("Function1", 11), ("Function3", 12), ("Function2", 21), ("Function4", 22)].

[0068] The second step is to determine the split value using the following formula:

[0069]

[0070] Wherein, C represents the above segmentation value. T represents the number of first candidate cache information in the above first candidate cache information set. Indicates rounding down.

[0071] As an example, the number of first candidate cache information in the first candidate cache information set may be 4. The segmentation value may be 1.

[0072] The third step is to select a target number of sorted first candidate cache information from the sorted first candidate cache information set in turn to generate the first-level cache information set, the second-level cache information set and the candidate third-level cache information set.

[0073] The target number may be the same as the segmentation value.

[0074] As an example, the sorted first candidate cache information set may be [("Function1", 11), ("Function3", 12), ("Function2", 21), ("Function4", 22)]. The first-level cache information set may be [("Function1", 11)]. The second-level cache information set may be [("Function3", 12)]. The candidate third-level cache information set may be [("Function2", 21)].

[0075] In the fourth step, the sorted first candidate cache information that has not been selected in the sorted first candidate cache information set is added to the candidate third-level cache information set to generate the third-level cache information set.

[0076] As an example, the unselected sorted first candidate cache information in the sorted first candidate cache information set may be ("Function4", 22). The third-level cache information set may be [("Function2", 21), ("Function4", 22)].

[0077] Step 204 , in response to receiving the target request information of the target user, sequentially load the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set into the cache.

[0078] In some embodiments, the execution subject may, in response to receiving the target request information of the target user, sequentially load the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set into the cache. Among them, the target request information may be the request information used to characterize the target user calling the target interface. The target request information may include: a target user identifier and an interface identifier. The target user identifier may be the unique identity identifier of the target user. The target interface may be an interface corresponding to the login function. The target interface may also be an interface corresponding to the function of displaying the homepage of the website. The target interface may also be an interface corresponding to the function of displaying the product details page. The execution subject may, in response to receiving the target authorization signal, sequentially call the user access interface identifier included in each cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set using the target user identifier included in the target request information as a keyword. To obtain the user cache data corresponding to the cache information. And load the cache data corresponding to the cache information into the cache. The target authorization signal may be a signal generated by the target user performing a target operation on the target control. The target control may be included in the authorization prompt box. The authorization prompt box may be displayed on the target terminal device. The target terminal device may be a terminal device that has logged in the corresponding account of the target user. The terminal device may be a "mobile phone" or a "computer". The target operation may be a "click operation" or a "slide operation". The target control may be a "confirmation button".

[0079] As an example, the authorization prompt box above can be as follows Figure 3 As shown. The authorization prompt box may include: a prompt information display part 301 and a control 302. The prompt information display part 301 may be used to display prompt information. The prompt information may be "whether to allow obtaining user cache data". The control 302 may be a "confirm button" or a "cancel button".

[0080] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the cache data processing method of some embodiments of the present disclosure, the cache utilization efficiency is improved. Specifically, the reason for the low cache utilization efficiency is that the existing technology often loads all user data into the cache. Based on this, the cache data processing method of some embodiments of the present disclosure, first, through the list of function information to be cached, the user access information is filtered out from the user access information cache queue to obtain a first candidate cache information set. In actual situations, user data often contains a part of data with low usage efficiency. Through the list of function information to be cached, the filtering of data with low usage efficiency is achieved. Secondly, the heat value corresponding to each first candidate cache information in the first candidate cache information set is determined to obtain a heat value set. Because the user's access frequency to the first candidate cache information in the filtered first candidate cache information set is often different. The first candidate cache information in the first candidate cache information set is classified by heat value to obtain a first-level cache information set, a second-level cache information set and a third-level cache information set. Through classification processing, subsequent batch processing of cache information is convenient. Finally, in response to receiving the target request information of the target user, the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set are loaded into the cache in sequence. By loading the user cache data into the cache after receiving the target request information of the target user, the utilization efficiency of the cache is ensured.

[0081] Further references Figure 4 , which shows a process 400 of another embodiment of a cache data processing method. The process 400 of the cache data processing method includes the following steps:

[0082] Step 401: historical access data of a target user is used as user access information and added to a user access information cache queue.

[0083] In some embodiments, the execution body of the cache data processing method (for example Figure 1 The computing device 101 shown in the figure can add the historical access data of the target user as the user access information to the user access information cache queue. Optionally, the user access information in the user access information cache queue can include: user identity, access interface address and user access times. The user identity can be the unique identity of the target user. The access interface address can be the address corresponding to the interface called by the target user. The user access times can be the number of times the target user calls the interface.

[0084] Optionally, the execution subject takes the historical access data of the target user as the user access information and adds it to the user access information cache queue, which may include the following steps:

[0085] In the first step, in response to determining that the user access information cache queue contains user access information that meets the adding condition, the number of user accesses included in the user access information that meets the adding condition is accumulated.

[0086] The above-mentioned adding condition may be: the user identity identifier and the access interface address included in the user access information are respectively the same as the user identity identifier and the access interface address included in the user access information corresponding to the above-mentioned historical access data.

[0087] In the second step, in response to determining that the user access information cache queue does not contain user access information that meets the adding conditions, the historical access data of the target user is used as the user access information and added to the user access information cache queue, and the number of user accesses included in the user access information corresponding to the historical access data is set to a preset value.

[0088] Among them, the above preset value can be 1.

[0089] Step 402 : Generate first candidate cache information according to the user access information in the user access information cache queue that matches each to-be-cached function information in the to-be-cached function information list, and obtain a first candidate cache information set.

[0090] Step 403: determine the heat value corresponding to each first candidate cache information in the first candidate cache information set to obtain a heat value set.

[0091] In some embodiments, the specific implementation of steps 402-403 and the technical effects thereof can be referred to in Figure 2 The corresponding steps 201-202 in the embodiments are not described in detail here.

[0092] Step 404 , first candidate cache information whose corresponding heat value meets the first screening condition is screened out from the first candidate cache information set as first-level cache information, to obtain a first-level cache information set.

[0093] In some embodiments, the execution subject may select first candidate cache information whose corresponding heat value satisfies a first screening condition from the first candidate cache information set as the first-level cache information to obtain the first-level cache information set. The first screening condition may be that the heat value is not less than 0% and not more than 5%.

[0094] Step 405 , first candidate cache information whose corresponding heat value meets the second screening condition is screened out from the first candidate cache information set as the second-level cache information, to obtain the second-level cache information set.

[0095] In some embodiments, the execution subject may select the first candidate cache information whose corresponding heat value meets the second screening condition from the first candidate cache information set as the second-level cache information to obtain the second-level cache information set. The second screening condition may be that the heat value is greater than 5% and not greater than 10%.

[0096] Step 406 , first candidate cache information whose corresponding heat value meets the third screening condition is screened out from the first candidate cache information set as the third-level cache information, to obtain the third-level cache information set.

[0097] In some embodiments, the execution subject may select first candidate cache information whose corresponding heat value satisfies a third screening condition from the first candidate cache information set as the third-level cache information to obtain the third-level cache information set. The third screening condition may be that the heat value is greater than 10% and not greater than 100%.

[0098] Step 407 , in response to receiving the target request information of the target user, sequentially load the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set into the cache.

[0099] In some embodiments, the specific implementation of step 407 and the technical effects thereof can be referred to in Figure 2 The corresponding step 204 in the embodiments will not be described in detail here.

[0100] Step 408, respectively set cache release time for the user cache data corresponding to the cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set to generate a first cache release time, a second cache release time, and a third cache release time.

[0101] In some embodiments, the above-mentioned execution subject may set cache release time for user cache data corresponding to cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set, respectively, to generate a first cache release time, a second cache release time, and a third cache release time. Among them, the above-mentioned execution subject may generate the above-mentioned first cache release time based on the time when the first-level cache information in the above-mentioned first-level cache information set is loaded into the above-mentioned cache and the first preset time length. The above-mentioned execution subject may generate the above-mentioned second cache release time based on the time when the second-level cache information in the above-mentioned second-level cache information set is loaded into the above-mentioned cache and the second preset time length. The above-mentioned execution subject may generate the above-mentioned third cache release time based on the time when the third-level cache information in the above-mentioned third-level cache information set is loaded into the above-mentioned cache and the third preset time length.

[0102] As an example, the time when the first-level cache information in the first-level cache information set is loaded into the cache may be "2021-01-25-17:59:48". The first preset duration may be 1 hour. The first cache release time may be "2021-01-25-18:59:48".

[0103] As another example, the time when the secondary cache information in the secondary cache information set is loaded into the cache may be "2021-01-25-17:59:48". The second preset duration may be 2 hours. The second cache release time may be "2021-01-25-19:59:48".

[0104] As another example, the time when the third-level cache information in the third-level cache information set is loaded into the cache may be "2021-01-25-17:59:48". The third preset duration may be 3 hours. The third cache release time may be "2021-01-25-20:59:48".

[0105] Optionally, the execution subject may clear the user cache data corresponding to each first-level cache information in the first-level cache information set from the cache in response to reaching the first cache release time.

[0106] In which, in response to determining that the current time is the same as the second cache release time, the execution subject may clear the user cache data corresponding to each level 2 cache information in the level 2 cache information set from the cache.

[0107] Optionally, the execution subject may clear the user cache data corresponding to each level 2 cache information in the level 2 cache information set from the cache in response to reaching the second cache release time.

[0108] In which, in response to determining that the current time is the same as the second cache release time, the execution subject may clear the user cache data corresponding to each level 2 cache information in the level 2 cache information set from the cache.

[0109] Optionally, the execution subject may clear the user cache data corresponding to each level 3 cache information in the level 3 cache information set from the cache in response to reaching the third cache release time.

[0110] In which, in response to determining that the current time is the same as the third cache release time, the execution subject may clear the user cache data corresponding to each level 2 cache information in the level 2 cache information set from the cache.

[0111] Step 409 , in response to determining that the target user cache data is not stored in the cache, a cache information set including cache information corresponding to the target user cache data is determined as a second candidate cache information set.

[0112] In some embodiments, in response to determining that the target user cache data is not stored in the cache, the execution subject may determine the cache information set including the cache information corresponding to the target user cache data as the second candidate cache information set. The target user cache data may be user cache data corresponding to the cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set.

[0113] Step 410: Load the user data corresponding to each second candidate cache information in the second candidate cache information set into the cache.

[0114] In some embodiments, the execution subject may load the user data corresponding to each second candidate cache information in the second candidate cache information set into the cache. The execution subject may use the user identity included in the target request information as a keyword to call the interface corresponding to the access interface address included in each second candidate cache information in the second candidate cache information set, thereby obtaining the user data corresponding to the second candidate cache information. Then, the user data is loaded into the cache.

[0115] from Figure 4 It can be seen that Figure 2Compared with the description of some corresponding embodiments, first, the cache release time is set for the user cache data corresponding to the cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set, so as to generate the first cache release time, the second cache release time and the third cache release time. In actual situations, users will not use all the user cache data corresponding to the cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set. In order to further improve the efficiency of cache usage. By setting the cache release time, it is ensured that the user cache data can be released from the cache regularly. In addition, for different user cache data, the user's usage frequency is often different. Therefore, different cache release times are set for the user cache data corresponding to the cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set. It is ensured that the user cache data used frequently can be stored in the cache for a long time. Secondly, considering the situation that the user uses the user cache data when the cache release time is reached and the user cache data is cleared. The present disclosure judges whether the user cache data used by the user is stored in the cache. When the user cache data used by the user is not in the cache, a cache information set including cache information corresponding to the user cache data used by the user is determined as a second candidate cache information set, and then the user data corresponding to each second candidate cache information in the second candidate cache information set is loaded into the cache, thereby avoiding cache penetration.

[0116] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a cache data processing device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0117] like Figure 5 As shown, the cache data processing device 500 of some embodiments includes: a first generation unit, configured to generate first candidate cache information according to user access information matching each to-be-cached function information in the to-be-cached function information list in the user access information cache queue, and obtain a first candidate cache information set. A determination unit, configured to determine the heat value corresponding to each first candidate cache information in the above-mentioned first candidate cache information set, and obtain a heat value set. A second generation unit, configured to generate a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the above-mentioned heat value set and the above-mentioned first candidate cache information set. A loading unit, configured to, in response to receiving the target request information of the target user, sequentially load the user cache data corresponding to each cache information in the above-mentioned first-level cache information set, the above-mentioned second-level cache information set, and the above-mentioned third-level cache information set into the cache.

[0118] In some optional implementations of some embodiments, the device 500 also includes: setting cache release time for user cache data corresponding to the cache information in the above-mentioned first-level cache information set, the above-mentioned second-level cache information set and the above-mentioned third-level cache information set, respectively, to generate a first cache release time, a second cache release time and a third cache release time.

[0119] In some optional implementations of some embodiments, the device 500 also includes: in response to determining that the target user cache data is not stored in the above-mentioned cache, determining a cache information set including cache information corresponding to the above-mentioned target user cache data as a second candidate cache information set; and loading the user data corresponding to each second candidate cache information in the above-mentioned second candidate cache information set into the above-mentioned cache.

[0120] In some optional implementations of some embodiments, before the first generating unit 501, the device 500 further includes: taking the historical access data of the target user as the user access information, and adding it into the user access information cache queue.

[0121] In some optional implementations of some embodiments, the above-mentioned second generation unit 503 is further configured to: filter out the first candidate cache information whose corresponding heat value meets the first filtering condition from the above-mentioned first candidate cache information set as the first-level cache information, and obtain the above-mentioned first-level cache information set.

[0122] In some optional implementations of some embodiments, the above-mentioned second generation unit 503 is further configured to: filter out the first candidate cache information whose corresponding heat value meets the second filtering condition from the above-mentioned first candidate cache information set as the second-level cache information, and obtain the above-mentioned second-level cache information set.

[0123] In some optional implementations of some embodiments, the above-mentioned second generation unit 503 is further configured to: filter out the first candidate cache information whose corresponding heat value meets the third filtering condition from the above-mentioned first candidate cache information set as the third-level cache information, and obtain the above-mentioned third-level cache information set.

[0124] In some optional implementations of some embodiments, the apparatus 500 further includes: in response to reaching the first cache release time, clearing the user cache data corresponding to each first-level cache information in the first-level cache information set from the cache.

[0125] In some optional implementations of some embodiments, the apparatus 500 further includes: in response to reaching the second cache release time, clearing the user cache data corresponding to each L2 cache information in the L2 cache information set from the cache.

[0126] In some optional implementations of some embodiments, the apparatus 500 further includes: in response to reaching the third cache release time, clearing the user cache data corresponding to each level 3 cache information in the level 3 cache information set from the cache.

[0127] In some optional implementations of some embodiments, the above-mentioned user access information includes: a user identity, an access interface address and a number of user access times; and the device 500 also includes: in response to determining that the above-mentioned user access information cache queue contains user access information that meets the addition condition, an accumulation operation is performed on the number of user accesses included in the above-mentioned user access information that meets the addition condition, wherein the above-mentioned addition condition is: the user identity and access interface address included in the user access information are respectively the same as the user identity and access interface address included in the user access information corresponding to the above-mentioned historical access data.

[0128] In some optional implementations of some embodiments, the device 500 also includes: in response to determining that the above-mentioned user access information cache queue does not contain user access information that meets the adding condition, taking the historical access data of the above-mentioned target user as user access information, adding it to the above-mentioned user access information cache queue, and setting the number of user accesses included in the user access information corresponding to the above-mentioned historical access data to a preset value.

[0129] Reference below Figure 6 , which shows an electronic device (such as Figure 1 A schematic diagram of the structure of the computing device 101)600 is shown. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0130] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0131] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0132] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0133] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0134] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0135] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device generates first candidate cache information according to the user access information in the user access information cache queue that matches each function information to be cached in the function information list to be cached, and obtains a first candidate cache information set. Determine the heat value corresponding to each first candidate cache information in the first candidate cache information set, and obtain a heat value set. Based on the heat value set and the first candidate cache information set, generate a first-level cache information set, a second-level cache information set, and a third-level cache information set. In response to receiving the target request information of the target user, the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set are sequentially loaded into the cache.

[0136] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0137] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0138] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising a first generation unit, a determination unit, a second generation unit and a loading unit. Among them, the names of these units do not constitute a limitation on the unit itself in certain cases, for example, the determination unit may also be described as "a unit for determining the heat value corresponding to each first candidate cache information in the above-mentioned first candidate cache information set, and obtaining a heat value set".

[0139] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0140] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A cache data processing method, comprising: In response to determining that the user access information cache queue does not contain user access information that meets the adding condition, historical access data of the target user is used as user access information and added to the user access information cache queue, and the number of user accesses included in the user access information corresponding to the historical access data is set to a preset value; Generate first candidate cache information according to the user access information in the user access information cache queue that matches each to-be-cached function information in the to-be-cached function information list, and obtain a first candidate cache information set; Determine a heat value corresponding to each first candidate cache information in the first candidate cache information set to obtain a heat value set; Generate a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the heat value set and the first candidate cache information set; In response to receiving the target request information of the target user, the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set are sequentially loaded into the cache.

2. The method according to claim 1, wherein: The method further comprises: Cache release time is set for user cache data corresponding to cache information in the first-level cache information set, the second-level cache information set, and the third-level cache information set, respectively, to generate a first cache release time, a second cache release time, and a third cache release time.

3. The method according to claim 1, wherein: The method further comprises: In response to determining that the target user cache data is not stored in the cache, determining the cache information set including the cache information corresponding to the target user cache data as the second candidate cache information set; The user data corresponding to each second candidate cache information in the second candidate cache information set is loaded into the cache.

4. The method according to claim 1, wherein: Before generating the first candidate cache information according to the user access information matching each to-be-cached function information in the to-be-cached function information list in the user access information cache queue and obtaining the first candidate cache information set, the method further includes: The historical access data of the target user is used as user access information and added to the user access information cache queue.

5. The method according to claim 1, wherein: The generating, based on the heat value set and the first candidate cache information set, a first-level cache information set, a second-level cache information set, and a third-level cache information set comprises: First candidate cache information whose corresponding heat value meets a first screening condition is screened out from the first candidate cache information set as first-level cache information to obtain the first-level cache information set.

6. The method according to claim 5, wherein: The generating a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the heat value set and the first candidate cache information set also includes: The first candidate cache information whose corresponding heat value meets the second screening condition is screened out from the first candidate cache information set as the second-level cache information to obtain the second-level cache information set.

7. The method according to claim 6, wherein: The generating a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the heat value set and the first candidate cache information set also includes: First candidate cache information whose corresponding heat value meets the third screening condition is screened out from the first candidate cache information set as the third-level cache information to obtain the third-level cache information set.

8. The method according to claim 2, wherein: The method further comprises: In response to reaching the first cache release time, the user cache data corresponding to each first-level cache information in the first-level cache information set is cleared from the cache.

9. The method according to claim 8, wherein: The method further comprises: In response to reaching the second cache release time, the user cache data corresponding to each level 2 cache information in the level 2 cache information set is cleared from the cache.

10. The method according to claim 9, wherein: The method further comprises: In response to reaching the third cache release time, the user cache data corresponding to each level 3 cache information in the level 3 cache information set is cleared from the cache.

11. The method according to claim 4, wherein: The user access information includes: user identity, access interface address and user access times; and The step of taking the historical access data of the target user as the user access information and adding the historical access data to the user access information cache queue includes: In response to determining that the user access information cache queue contains user access information that meets the adding condition, an accumulation operation is performed on the number of user accesses included in the user access information that meets the adding condition, wherein the adding condition is: the user identity identifier and the access interface address included in the user access information are respectively the same as the user identity identifier and the access interface address included in the user access information corresponding to the historical access data.

12. A cache data processing device, comprising: an adding and setting unit, configured to, in response to determining that the user access information cache queue does not contain user access information that meets the adding condition, add the historical access data of the target user as the user access information to the user access information cache queue, and set the number of user accesses included in the user access information corresponding to the historical access data to a preset value; A first generating unit is configured to generate first candidate cache information according to user access information in the user access information cache queue that matches each to-be-cached function information in the to-be-cached function information list, and obtain a first candidate cache information set; a determining unit configured to determine a heat value corresponding to each first candidate cache information in the first candidate cache information set to obtain a heat value set; A second generating unit is configured to generate a first-level cache information set, a second-level cache information set, and a third-level cache information set based on the heat value set and the first candidate cache information set; The loading unit is configured to load the user cache data corresponding to each cache information in the first-level cache information set, the second-level cache information set and the third-level cache information set into the cache in response to receiving the target request information of the target user.

13. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.

14. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.