WO2017049488A1 - Cache management method and apparatus - Google Patents

Cache management method and apparatus Download PDF

Info

Publication number
WO2017049488A1
WO2017049488A1 PCT/CN2015/090416 CN2015090416W WO2017049488A1 WO 2017049488 A1 WO2017049488 A1 WO 2017049488A1 CN 2015090416 W CN2015090416 W CN 2015090416W WO 2017049488 A1 WO2017049488 A1 WO 2017049488A1
Authority
WO
WIPO (PCT)
Prior art keywords
space
record item
record
access
content data
Prior art date
Application number
PCT/CN2015/090416
Other languages
French (fr)
Chinese (zh)
Inventor
吴问付
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201580083252.8A priority Critical patent/CN108351873B/en
Priority to PCT/CN2015/090416 priority patent/WO2017049488A1/en
Publication of WO2017049488A1 publication Critical patent/WO2017049488A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a cache management method and apparatus.
  • some content data may be buffered in the base station, and when the base station locally caches the content data requested by the user, it is directly returned to the user.
  • the traditional cache management method generally divides the cache space of the base station into two parts when managing the content data buffered by the base station. As shown in FIG. 3, a part is a record item space for storing a record item, and the record item is used to describe access information of content data, such as the last access time, the total number of accesses, etc.; the other part is a data cache space, For storing cached content data.
  • the total size of the record item space and the data cache space is fixed, but the respective sizes are not fixed. When adding a new record item, it is necessary to enlarge the record item space, and accordingly, the data cache space needs to be reduced.
  • the base station After the access request for a certain content data arrives at the base station, the base station first determines whether the content data requested to be accessed has a corresponding record item in the record item space of the base station, and if so, updates its record item; otherwise, it records In the item space, a record entry is added for the content data requested to be accessed. Then, the base station determines whether the content data requested to be accessed exists in the data buffer space of the base station, and if so, directly returns the content data buffered in the data buffer space to the requester; otherwise, the content data is sent to the upper level of the base station.
  • the request such as the Public Data Network GateWay (English: Public Data Network GateWay, PGW for short), and the content data received from the upper level are sent to the requester.
  • the existing cache management method retains the record corresponding to the content data even when deleting the cached content data, which will This leads to the accumulation of many outdated entries, which wastes the limited storage resources of the base station.
  • the embodiment of the invention provides a cache management method and device, which are used to solve the problem that the obsolete record item wastes too much storage resources.
  • an embodiment of the present invention provides a cache management method, including:
  • the deleted at least one record item does not have corresponding content data in the data cache space.
  • determining that the entry is empty Before the first available space also includes:
  • the setting condition is that at least one record item can be created, and after the stored at least one record item is deleted in the record item space, the method further includes:
  • the method before determining the first available space of the record item space, the method further includes:
  • the setting condition is that at least one record item can be created.
  • a record entry corresponding to the content data requested by the access request is created Previously, it also included:
  • the deleted at least one record entry is The data cache space does not have a record item whose access probability is ranked in the last n bits in at least one record item of the corresponding content data.
  • the deleted at least one record entry is The entry with the least probability of access is found in at least one record item in which the corresponding content data does not exist in the data cache space.
  • the content data stored in the data cache space is fixed in length Audio and video segments of value
  • the method further includes:
  • the access Requesting, by the second device, the audio and video segment requested by the access request, and the use of the audio and video segment of the requested audio and video segment, and the access probability of the audio and video segment having the smallest access probability stored in the data buffer space The audio and video segments returned by the second device replace the audio and video segments stored in the data buffer space with the least probability of access.
  • the method further includes:
  • the record item corresponding to the content data requested by the access request is updated.
  • the record entry includes the following fields:
  • Updating a record corresponding to the content data requested by the access request including:
  • the forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request
  • the time variation of the device initiating the access request satisfies the following conditions:
  • ⁇ P represents the time variation of the device initiating the access request
  • P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t
  • P t - ⁇ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t- ⁇
  • M represents the record included in the record space
  • the total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
  • the updated forgetting factor satisfies the following conditions:
  • a' indicates the updated forgetting factor
  • a indicates the forgetting factor before the update
  • update rate indicates the preset parameter, 0 ⁇ update rate ⁇ 1.
  • the size of the recording item space is set according to Parameter RECORD LIMIT setting
  • the setting parameter RECORD LIMIT is used to characterize a ratio of a maximum number of entries stored in the record space to a maximum number of content data stored in the data cache space; the setting parameter RECORD LIMIT is greater than one.
  • the record item in the record item space Stored in a minimal heap structure is the record entry with the least probability of access in the record entry space.
  • an embodiment of the present invention provides a cache management apparatus, including:
  • a processing module configured to determine a first available space of the record item space; delete the stored at least one record item in the record item space when the determined first available space does not satisfy the set condition; The deleted at least one record item does not have corresponding content data in the data cache space.
  • the device further includes:
  • a receiving module configured to receive an access request of the first device before the processing module determines the first available space of the record item space
  • the processing module is further configured to: after determining that the content data requested by the access request does not have a corresponding record item in the record item space, after deleting the stored at least one record item in the record item space, Creating a record item corresponding to the content data requested by the access request in the record item space; the setting condition is that at least one record item can be created.
  • the device further includes:
  • a receiving module configured to receive an access request of the first device before the processing module determines the first available space of the record item space
  • the processing module is further configured to: if it is determined that the content data requested by the access request does not have a corresponding record item in the record item space, before determining the first available space of the record item space, in the record item space And creating a record item corresponding to the content data requested by the access request; the setting condition is that at least one record item can be created.
  • the processing module is further configured to:
  • the deleted at least one record item is The data cache space does not have a record item whose access probability is ranked in the last n bits in at least one record item of the corresponding content data.
  • the deleted at least one record item is a record item having the smallest access probability among the at least one record item in which the corresponding content data does not exist in the data cache space.
  • the content data stored in the data cache space is fixed in length Audio and video segments of value
  • the processing module is further configured to:
  • the access Requesting, by the second device, the audio and video segment requested by the access request, and the use of the audio and video segment of the requested audio and video segment, and the access probability of the audio and video segment having the smallest access probability stored in the data buffer space The audio and video segments returned by the second device replace the audio and video segments stored in the data buffer space with the least probability of access.
  • the processing module is further configured to:
  • the record item corresponding to the content data requested by the access request is updated.
  • the record entry includes the following fields:
  • the processing module updates the record corresponding to the content data requested by the access request
  • the processing module is specifically configured to:
  • the forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request
  • the time variation of the device initiating the access request satisfies the following conditions:
  • ⁇ P represents the time variation of the device initiating the access request
  • P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t
  • P t - ⁇ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t- ⁇
  • M represents the record included in the record space
  • the total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
  • the updated forgetting factor satisfies the following conditions:
  • a' indicates the updated forgetting factor
  • a indicates the forgetting factor before the update
  • update rate indicates the preset parameter, 0 ⁇ update rate ⁇ 1.
  • the size of the recording item space is set according to Parameter RECORD LIMIT setting
  • the setting parameter RECORD LIMIT is used to characterize a ratio of a maximum number of entries stored in the record space to a maximum number of content data stored in the data cache space; the setting parameter RECORD LIMIT is greater than one.
  • the record item in the record item space Stored in a minimal heap structure is the record entry with the least probability of access in the record entry space.
  • the embodiment of the present invention by maintaining a fixed-size record item space, the old record items are selectively eliminated, thereby solving the problem that the obsolete record items waste too much storage resources.
  • 1A is a schematic diagram of user response in a conventional network in the prior art
  • FIG. 1B is a schematic diagram of user response in a CDN in the prior art
  • FIG. 2 is a schematic diagram of user response in a CDN based on a mobile network in the prior art
  • FIG. 3 is a schematic diagram of allocation of a record item space and a data cache space in the prior art
  • FIG. 4 is a flowchart of a cache management method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an access probability distribution of content data according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a video segment identifier according to an embodiment of the present disclosure.
  • FIG. 7 is a detailed flowchart of a base station management video buffer according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a cache management apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a cache management device according to an embodiment of the present invention.
  • the embodiment of the invention provides a cache management method and device, which selectively eliminates stale entries by maintaining a fixed-size record item space, thereby solving the problem that the obsolete record items waste too much storage resources.
  • the technical solution of the embodiment of the present invention can be applied to a device with limited storage resources such as a base station and a PGW, and can also be applied to a device with rich storage resources such as a CDN cache server.
  • FIG. 4 is a flowchart of implementing a cache management method according to an embodiment of the present invention, including:
  • Step 401 Determine a first available space of the record item space.
  • the available space is the space remaining in the current record item space except for the space occupied by the stored record items.
  • the total size of the record item space in the embodiment of the present invention is fixed, that is, the total number of record items that can be stored in the record item space is fixed, and does not increase continuously with the increase of the content data that appears.
  • the size of the record item space may be set according to the setting parameter RECORD LIMIT , where the setting parameter RECORD LIMIT is used to represent the maximum number of records items stored in the record item space and the data cache space.
  • the ratio of the maximum number of stored content data; the set parameter RECORD LIMIT is greater than one.
  • the specification of a base station is to store a maximum of 10,000 videos. If the parameter RECORD LIMIT is set to 2, it is considered that the space occupied by each entry generally does not exceed 1 kilobyte (unit: KB), so the record can be recorded. The size of the space is set to 20000KB.
  • Step 402 Delete at least one stored item in the record item space when the determined first available space does not satisfy the set condition; wherein the deleted at least one record item does not have a corresponding content in the data cache space data.
  • the setting condition may be that at least one record item can be created; the so-called unsatisfied setting condition that the available space for characterizing the current record item space is insufficient to create at least one record item.
  • the deleted at least one record item may be a record item whose access probability is ranked in the last n bits in at least one record item in which the corresponding content data does not exist in the data cache space; or the deleted at least A record item may be a record item with the least probability of access in at least one record item in which the corresponding content data does not exist in the data cache space.
  • the embodiment of the present invention can achieve the effect of being almost the same as storing all the recorded items by storing only a part of the recorded items, which is due to the concentrated characteristics of the device behavior.
  • most of the device-initiated access requests are concentrated on a small amount of specific content data, while the rest of the content data has very few accesses.
  • For systems with limited storage resources generally only A portion of the content data with the highest probability of access is stored in the data cache space.
  • the embodiment of the present invention selects to discard the record items of the content data with low access probability, and selects the record items of the content data with high access probability, so that the storage resources can be saved, and the tracking content data can be obviously not affected. Access probability.
  • the method flow shown in FIG. 4 can have the following two trigger conditions:
  • Condition 1 According to the set period
  • Condition 2 Unscheduled, such as receiving an access request of the first device, and determining that the content data requested by the access request does not have a corresponding record item in the record item space.
  • Sequence one first receiving an access request of the first device, and when determining that the content data requested by the access request does not have a corresponding record item in the record item space, performing step 401 and step 402, and then performing the record item In the space, a record item corresponding to the content data requested by the access request is created.
  • Sequence 2 first receiving an access request of the first device, and when determining that the content data requested by the access request does not have a corresponding record item in the record item space, creating and accessing the record item space The record corresponding to the requested content data is requested, and then steps 401 and 402 are performed.
  • Sequence 3 first receiving an access request of the first device, and determining that the content data requested by the access request does not have a corresponding record item in the record item space, determining a second available space of the record item, determining When the second available space satisfies the set condition, a record corresponding to the content data requested by the access request is created in the record item space, and then steps 401 and 402 are performed.
  • the record item corresponding to the content data requested by the access request needs to be updated.
  • EWMA Exponentially Weighted Moving-Average
  • a record entry includes the following three fields: last access time, average access interval, and number of accesses; wherein the last access time and the average access interval are generally double-precision floating-point types (English: double)
  • the variable, the number of accesses is generally an integer (English: int) variable; the average access interval is used to characterize the access probability.
  • the access request When an access request is received, the access request generally carries an access time and an identifier of the requested content data, and the EWMA algorithm finds the record with the same identifier in the record item space according to the identifier of the content data requested by the access request. And then updating a field included in the record corresponding to the content data requested by the access request according to the access time included in the access request and the set forgetting factor;
  • the updated average access time interval meets the following conditions:
  • the updated last access time meets the following conditions:
  • T' denotes the updated average access interval
  • T denotes the average access interval before the update
  • a denotes the forgetting factor
  • t cur denotes the access time carried by the access request
  • t last denotes the last access time before the update
  • t Last ' indicates the last access time before the update
  • Count' indicates the number of accesses after the update
  • Count indicates the number of accesses before the update.
  • the forgetting factor in the existing EWMA algorithm is a value between 0 and 1.
  • the forgetting factors used by different systems should take different values. As the same system changes over time, the access behavior of the device group will also change, and the forgetting factor adopted should also change accordingly.
  • the existing EWMA algorithm cannot know in advance the time-varying size of the device-initiated access request, the setting of the forgetting factor becomes an important issue.
  • the embodiment of the present invention provides a method for adaptively adjusting the forgetting factor, which can dynamically adjust the forgetting factor by predicting the time variation of the access request initiated by the device. For example, when the time when the device initiates the access request is large, a larger forgetting factor is selected, and when the time when the device initiates the access request is small, a smaller forgetting factor is selected.
  • FIG. 5 it is a schematic diagram of an access probability distribution of content data, wherein the horizontal axis represents the ranking of the access probability of the content data corresponding to each record item in the record item space, for example, the access probability row in the record item space.
  • the value of the content data corresponding to the record of the first bit on the horizontal axis is 1; the vertical axis represents the access probability; and the curve P t represents the access probability distribution of the content data corresponding to each record item in the record entry space at time t.
  • the curve P t- ⁇ represents the access probability distribution of the content data corresponding to each record item in the record item space at the time t- ⁇ .
  • the amount of change in the device-initiated access request from the time t- ⁇ to the time t can be expressed by the phase difference between the curve P t and the curve P t- ⁇ , as shown by the dark portion in FIG. Assuming that the total number of entries included in the entry space is M, then the time variant of the device initiating the access request satisfies the following conditions:
  • P t (i) represents the probability that the content data corresponding to the record of the ith bit in the record item space is requested at time t
  • P t - ⁇ (i) indicates the probability that the content data corresponding to the record in which the popularity of the i-th bit ranks in the record item space is requested at time t- ⁇ .
  • the time-varying time when the device initiates the access request is mainly reflected in the change of the device requesting the access to the content data with high probability of access in different time periods, it is also possible not to accumulate the record.
  • the access probability of the content data corresponding to each record item in the record space changes, but the access probability change of the content data corresponding to the record item whose access probability is ranked in the top N bits in the accumulated record space.
  • the time-varying ⁇ P of the device initiating the access request satisfies the following conditions:
  • N is the total number of entries in the record item space whose access probability is ranked in the first N bits.
  • the forgetting factor is updated periodically or irregularly according to the time variation of the device initiated access request, and the updated forgetting factor satisfies the following conditions:
  • a' denotes the updated forgetting factor
  • a denotes the forgetting factor before the update
  • update rate denotes the preset parameter
  • 0 ⁇ update rate ⁇ 1 the value of ⁇ P can be referred to formula (4) or formula (5).
  • Equation (6) can be understood as smoothing the forgetting factor using a low pass filter, where update rate can be understood as a filter parameter.
  • update rate can be taken as 0.4.
  • the technical means for setting the forgetting factor does not depend on the technical solution of the present invention, and is not limited to the scenario of managing the cache.
  • the technical means may be implemented in cooperation with other technical means, or may be implemented separately.
  • the corresponding cache in the data cache space may be directly sent. Give the first device.
  • the corresponding content data may be requested from the second device, and the content data returned by the second device is sent to the first device.
  • the second device may be the same level device or a higher level device of the device that receives the access request, for example, the device that receives the access request is a base station, and the second device may be the same.
  • Other base stations of the level may also be PGW or CDN cache servers of the upper level.
  • the content data may be directly stored in the data cache space; if the available space of the data cache space is smaller than that returned by the second device For the occupied space of the content data, it is further determined whether the access probability of the content data is greater than the access probability of the content data having the smallest access probability in the data cache space. When it is determined that the access probability of the content data returned by the second device is not greater than the access probability of the content data with the smallest access probability, the content data returned by the second device may not be stored.
  • the access probability of the content data returned by the second device is greater than the access probability of the content data with the smallest access probability
  • the content data with the smallest access probability may be deleted, if the data cache space after the deletion is sufficient for storing
  • the content data returned by the second device is stored, and the content data returned by the second device is stored, otherwise the operation is repeated, and the content data with the lowest current access probability and the content returned by the second device are continuously compared.
  • the access probability of the data until a sufficient space is deleted in the data cache space for storing the content data returned by the second device, or access to the content data having the smallest current access probability in the data cache space is determined
  • the probability is greater than the content data returned by the second device, the content data returned by the second device is discarded.
  • the embodiment of the present invention proposes a method of performing equal length segmentation on audio and video.
  • the CDN cache server is responsible for equal length segmentation of each audio and video.
  • the length of each audio and video segment is a fixed value, and different audio and video will be divided into different portions of audio and video segments. For example, if the fixed length of each audio and video segment is set to 1 minute, then the 10-minute video will be divided into 10 copies, and the 14-minute video will be divided into 14 copies.
  • the CDN cache server is also responsible for marking the audio and video after these segments.
  • Each audio segment has a unique identifier.
  • the logo consists of two parts, one is the audio and video number, and the other is the segment number of the audio and video segment in the audio and video. For example, if the length of the video is 10 minutes and is divided into 10 video segments, the identifier of the fifth video segment is: ⁇ 1:5 ⁇ , as shown in FIG. 6.
  • the base station is responsible for converting the access request sent by the user equipment into a request for the audio and video segment. For example, When a user equipment requests the 5th to 6th minutes of the video No. 1, the predetermined length of each audio and video segment is 1 minute, the base station can convert the request of the user equipment into a pair of ⁇ 1:5 ⁇ . And the request for the audio and video segment identification of ⁇ 1:6 ⁇ .
  • the audio and video segment identifiers can communicate with each other to determine the audio and video segments that need to be processed.
  • the access probability of the audio and video segment requested by the access request is greater than the access probability of the audio and video segment having the smallest access probability stored in the data buffer space, and then the audio and video segment requested by the access request may be requested from the second device. And replacing the audio and video segments stored in the data buffer space with the least probability of access using the audio and video segments returned by the second device.
  • an audio and video segment can be cached to cache an audio and video segment, which is beneficial to reduce the calculation pressure.
  • the access probability of different parts of the same audio and video is different in practical applications, for example, the user fast forwards or rewinds a video, which may cause a certain time period within the video with a high probability of access. The access probability is relatively low. Obviously, this part of the video segment with a small probability of access is not necessary to be cached in the system. However, if the audio and video segmentation is not performed, the complete video needs to be cached. Therefore, the audio and video segmentation can avoid the access probability. Small audio and video segments occupy the system's storage resources.
  • the record item in the record item space may be stored in a minimum heap structure manner, and the root node of the minimum heap is the record item with the smallest access probability in the record item space.
  • the node when determining whether to create a record item of the content data requested by the access request, the node may be taken from the top to the bottom of the root node of the minimum heap, if a node satisfies the corresponding record item in the data cache space. If there is no corresponding content data and the access probability of the record item is less than the access probability of the audio and video segment requested by the access request, the record corresponding to the node is replaced with the content data requested by the access request. Record item.
  • the method for managing a video buffer by a base station is as follows:
  • Step 701 The base station receives an access request of the user equipment.
  • Step 702 The base station determines identifiers of all video segments requested by the access request, and performs the following processing segment by segment.
  • Step 703 The base station determines whether the video segment requested by the access request has a corresponding record item in the record item space. If yes, step 704 is performed; otherwise, step 705 is performed.
  • Step 704 The base station updates the record corresponding to the video segment requested by the access request, and proceeds to step 708;
  • Step 705 The base station determines whether the record item space is sufficient to create a record item. If yes, step 707 is performed; otherwise, step 706 is performed.
  • Step 706 The base station searches for and deletes a record item having the smallest access probability among the records of the video in which the corresponding video does not exist in the record item stored in the record item space.
  • Step 707 The base station creates a record corresponding to the video requested by the access request in the record item space, and initializes each field included in the record item.
  • Step 708 The base station determines whether the video segment requested by the access request is stored in the data cache space. If yes, go to step 714; otherwise, go to step 709.
  • Step 709 The base station requests the video segment requested by the access request from the PGW cache server of the upper layer.
  • Step 710 The base station determines whether the data cache space is sufficient to store the video segment requested by the access request returned by the PGW cache server. If yes, go to step 713; otherwise, go to step 711.
  • Step 711 The base station determines whether the access probability of the video segment requested by the access request is greater than the access probability of the video segment with the smallest access probability stored in the data cache space. If yes, go to step 712; otherwise, go to step 714.
  • Step 712 The base station deletes a video segment that has the smallest access probability stored in the data cache space.
  • Step 713 The base station stores a video segment requested by the access request returned by the PGW cache server.
  • Step 714 The base station returns the video segment requested by the access request to the user equipment.
  • the cache management device and the cache management device provided by the embodiment of the present invention are described in detail below with reference to FIG. 8 and FIG.
  • FIG. 8 is a schematic structural diagram of a cache management apparatus 80 according to an embodiment of the present invention. As shown in FIG. 8, the apparatus 80 includes:
  • the processing module 801 is configured to determine a first available space of the record item space; when the determined first available space does not satisfy the set condition, delete the stored at least one record item in the record item space; wherein, at least one of the deleted items is deleted A record item does not have corresponding content data in the data cache space.
  • the device 80 further includes:
  • the receiving module 802 is configured to receive an access request of the first device before the processing module 801 determines the first available space of the record item space.
  • the processing module 801 may be further configured to: if it is determined that the content data requested by the access request does not have a corresponding record item in the record item space, then After deleting the stored at least one record item in the record item space, creating a record item corresponding to the content data requested by the access request in the record item space; the setting condition is that at least one record item can be created .
  • the processing module 801 may be further configured to determine the record if it is determined that the content data requested by the access request does not have a corresponding record item in the record item space. Before the first available space of the item space, in the record item space, a record item corresponding to the content data requested by the access request is created; the setting condition is that at least one record item can be created.
  • the processing module 801 may be further configured to: if it is determined that the content data requested by the access request does not exist in the record item space An entry record, determining a second available space of the record item space before determining the first available space of the record item space; and determining the second available space when the set condition is determined In the item space, a record item corresponding to the content data requested by the access request is created; the setting condition is that at least one record item can be created.
  • the deleted at least one record item is a record item whose access probability is ranked in the last n bits in at least one record item in which the corresponding content data does not exist in the data cache space.
  • the deleted at least one record item is a record item having the smallest access probability among the at least one record item in which the corresponding content data does not exist in the data cache space.
  • the processing module 801 is further configured to: if the audio and video segment requested by the access request is not stored in The occupied space of the audio and video segments requested by the access request is larger than the available space of the data cache space, and the access probability of the audio and video segments requested by the access request is greater than that stored in the data cache space. And an access probability of the audio and video segment having the smallest access probability in the data buffer space, requesting, by the second device, the audio and video segment requested by the access request, and replacing the audio and video segment returned by using the second device with the data. The audio and video segment with the least probability of access in the cache space.
  • the processing module 801 is further configured to: if the content data requested by the access request has a corresponding record item in the record item space, update the record item corresponding to the content data requested by the access request .
  • the record item includes the following fields: last access time, average access interval, and number of accesses; the average access interval is used to represent an access probability;
  • the method is specifically configured to: update and request the access request according to the access time and the set forgetting factor included in the access request.
  • the forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request; the device initiates the time-varying access request, and satisfies the following conditions:
  • ⁇ P represents the time variation of the device initiating the access request
  • P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t
  • P t - ⁇ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t- ⁇
  • M represents the record included in the record space
  • the total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
  • the updated forgetting factor satisfies the following conditions:
  • a' indicates the updated forgetting factor
  • a indicates the forgetting factor before the update
  • update rate indicates the preset parameter, 0 ⁇ update rate ⁇ 1.
  • the size of the record item space is set according to a setting parameter RECORD LIMIT ;
  • the setting parameter RECORD LIMIT is used to represent the maximum number of records stored in the record item space and the content stored in the data cache space.
  • the ratio of the maximum number of data; the set parameter RECORD LIMIT is greater than one.
  • the record items in the record item space are stored in a minimum heap structure, and the root node of the minimum heap is a record item having the smallest access probability in the record item space.
  • FIG. 9 is a schematic structural diagram of a cache management device 90 according to an embodiment of the present invention. As shown in FIG. 9, the device 90 includes:
  • processor 902 connected to the bus
  • a transceiver 904 coupled to the bus.
  • the processor 902 by using the bus 901, invokes a program stored in the memory 903 for determining a first available space of a record item space; the first available space is determined to be dissatisfied When the condition is set, the stored at least one record item is deleted in the record item space; wherein the deleted at least one record item does not have corresponding content data in the data cache space.
  • the transceiver 904 is configured to complete the function of the receiving module 802 in the cache management device 80 under the control of the processor 902.
  • the processor 902 is further configured to complete the functions of the processing module 801 in the cache management device 80.
  • the bus 901 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus.
  • the various buses are labeled as buses in the figure.
  • the processor 902 can be a central processing unit (English: Central Processing Unit, CPU for short), and can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), and ready-to-use programmable circuits. Gate array (abbreviation: FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or may be any conventional processor or the like.
  • Memory 903 can include read only memory and random access memory and provides instructions and data to processor 902. A portion of the memory 903 may also include a non-volatile random access memory.
  • the transceiver 904 can include a transmit circuit, a receive circuit, a power controller, a decoder, and an antenna.
  • the technical solution provided by the embodiment of the present invention maintains a fixed-size record item space that does not grow with time for storing a record item, and selectively selects an old record item according to the access probability included in the record item. Solved the problem that too many obsolete records are wasting storage resources.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

A cache management method and apparatus. By maintaining a record entry space of a fixed size and selectively eliminating stale record entries, the problem of waste of storage resources due to too many obsolete record entries is resolved. The method comprises: determining a first available space of a record entry space; and when the determined first available space does not satisfy a preset condition, deleting at least one stored record entry in the record entry space, the deleted at least one record entry having no corresponding content data in a data cache space.

Description

一种缓存管理方法和装置Cache management method and device 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种缓存管理方法和装置。The present invention relates to the field of communications technologies, and in particular, to a cache management method and apparatus.
背景技术Background technique
随着智能手机、平板等移动设备性能的不断提高,越来越多的用户选择通过移动设备来随时随地的访问网络。其中,通过移动设备来观看在线视频的人数也在不断增加,视频数据已经成为了移动网络流量的主力。据估计,全球的移动数据量每年增长92%,其中2/3以上的数据为视频数据。With the continuous improvement of the performance of mobile devices such as smart phones and tablets, more and more users choose to access the network anytime and anywhere through mobile devices. Among them, the number of people watching online videos through mobile devices is also increasing, and video data has become the main force of mobile network traffic. It is estimated that the global mobile data volume increases by 92% annually, and more than two-thirds of the data is video data.
移动数据量的不断增长,给互联网带来了极大的数据传输压力,并导致了网络拥塞、服务器过载、用户请求响应时间过长和网络服务质量下降等一系列问题。为了应对这一挑战,内容分发网络(英文:Content Delivery Network,简称:CDN)技术应运而生。在传统网络当中,用户的请求需要到达OTT(英文:Over The Top)部署的中心服务器才可以得到响应,如图1A所示。而在CDN中,用户的请求可以在网络“边缘”的CDN缓存服务器处得到响应,如图1B所示。这样,用户的请求和用户请求的内容数据都可以不通过中心服务器,从而极大的缓解了中心服务器的压力。The ever-increasing amount of mobile data has brought tremendous data transmission pressure to the Internet, and has led to a series of problems such as network congestion, server overload, long response time of user requests, and degraded network service quality. In order to cope with this challenge, the content distribution network (English: Content Delivery Network, CDN) technology came into being. In a traditional network, a user's request needs to reach the central server deployed by OTT (Over The Top) to get a response, as shown in Figure 1A. In the CDN, the user's request can be responded to at the CDN cache server at the "edge" of the network, as shown in Figure 1B. In this way, the user's request and the content data requested by the user can not pass through the central server, thereby greatly alleviating the pressure on the central server.
但是在移动网络当中,因为用户请求的内容数据从CDN中的CDN缓存服务器获得后,仍然需要经过运营商的核心网络(英文:Core Network,简称:CN)和无线接入网(英文:Radio Access Network,简称:RAN),才能到达用户设备(英文:User Equipment,简称:UE),如图2所示。这样给运营商的CN和RAN带来了很大的流量压力,大量并发的请求在有限的网络容量下,极易导致网络拥塞,显著增加网络延迟。However, in the mobile network, after the content data requested by the user is obtained from the CDN cache server in the CDN, it still needs to pass through the core network of the operator (English: Core Network, referred to as CN) and the radio access network (English: Radio Access) Network, referred to as RAN, can reach the user equipment (English: User Equipment, referred to as UE), as shown in Figure 2. This brings a lot of traffic pressure to the operator's CN and RAN. A large number of concurrent requests can easily lead to network congestion and significantly increase network delay under limited network capacity.
为了减轻CN和RAN的流量压力,可以在基站中缓存一些内容数据,当基站本地缓存有用户请求的内容数据时,就直接返回给用户。传统的缓存管理方法在管理基站缓存的内容数据时,一般会将基站的缓存空间分成两部分, 如图3所示,一部分为记录项空间,用于存放记录项,记录项用于描述内容数据的访问信息,如最近一次的访问时间、总的访问次数等;另一部分为数据缓存空间,用于存放缓存的内容数据。记录项空间和数据缓存空间的总大小是固定的,但各自的大小却是不固定的,在增加新的记录项时,需要扩大记录项空间,相应的需要减小数据缓存空间。In order to reduce the traffic pressure of the CN and the RAN, some content data may be buffered in the base station, and when the base station locally caches the content data requested by the user, it is directly returned to the user. The traditional cache management method generally divides the cache space of the base station into two parts when managing the content data buffered by the base station. As shown in FIG. 3, a part is a record item space for storing a record item, and the record item is used to describe access information of content data, such as the last access time, the total number of accesses, etc.; the other part is a data cache space, For storing cached content data. The total size of the record item space and the data cache space is fixed, but the respective sizes are not fixed. When adding a new record item, it is necessary to enlarge the record item space, and accordingly, the data cache space needs to be reduced.
当针对某一内容数据的访问请求到达基站后,基站首先确定该被请求访问的内容数据在基站的记录项空间中是否存在对应的记录项,若是,则更新其记录项;否则,便在记录项空间中为该被请求访问的内容数据新增记录项。然后,基站确定该被请求访问的内容数据在基站的数据缓存空间是否存在,若是,则直接将数据缓存空间中缓存的内容数据返回给请求者;否则,便向基站的上一级发出内容数据请求,如图2中的公用数据网网关(英文:Public Data Network GateWay,简称:PGW),以及将从上一级接收的内容数据发送给请求者。After the access request for a certain content data arrives at the base station, the base station first determines whether the content data requested to be accessed has a corresponding record item in the record item space of the base station, and if so, updates its record item; otherwise, it records In the item space, a record entry is added for the content data requested to be accessed. Then, the base station determines whether the content data requested to be accessed exists in the data buffer space of the base station, and if so, directly returns the content data buffered in the data buffer space to the requester; otherwise, the content data is sent to the upper level of the base station. The request, such as the Public Data Network GateWay (English: Public Data Network GateWay, PGW for short), and the content data received from the upper level are sent to the requester.
由于记录项空间中的记录项可以用于追踪和记录内容数据的访问概率,因此现有的缓存管理方法即使在删除缓存的某个内容数据时仍会保留该内容数据对应的记录项,这会导致积累许多过时的记录项,从而浪费基站有限的存储资源。Since the record items in the record item space can be used to track and record the access probability of the content data, the existing cache management method retains the record corresponding to the content data even when deleting the cached content data, which will This leads to the accumulation of many outdated entries, which wastes the limited storage resources of the base station.
发明内容Summary of the invention
本发明实施例提供了一种缓存管理方法和装置,用以解决过时记录项过多浪费存储资源的问题。The embodiment of the invention provides a cache management method and device, which are used to solve the problem that the obsolete record item wastes too much storage resources.
第一方面,本发明实施例提供了一种缓存管理方法,包括:In a first aspect, an embodiment of the present invention provides a cache management method, including:
确定记录项空间的第一可用空间;Determining the first available space of the record item space;
在确定的第一可用空间不满足设定条件时,在所述记录项空间中删除存储的至少一条记录项;Deleting the stored at least one record item in the record item space when the determined first available space does not satisfy the set condition;
其中,删除的至少一条记录项在数据缓存空间中不存在对应的内容数据。The deleted at least one record item does not have corresponding content data in the data cache space.
结合第一方面,在第一方面的第一种可能的实现方式中,确定记录项空 间的第一可用空间之前,还包括:In conjunction with the first aspect, in a first possible implementation of the first aspect, determining that the entry is empty Before the first available space, it also includes:
接收第一设备的访问请求;Receiving an access request of the first device;
确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项;Determining that the content data requested by the access request does not have a corresponding record item in the record item space;
所述设定条件为能创建至少一条记录项,则在所述记录项空间中删除存储的至少一条记录项之后,还包括:The setting condition is that at least one record item can be created, and after the stored at least one record item is deleted in the record item space, the method further includes:
在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项。In the record item space, a record item corresponding to the content data requested by the access request is created.
结合第一方面,在第一方面的第二种可能的实现方式中,确定记录项空间的第一可用空间之前,还包括:In conjunction with the first aspect, in a second possible implementation manner of the first aspect, before determining the first available space of the record item space, the method further includes:
接收第一设备的访问请求;Receiving an access request of the first device;
确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项;Determining that the content data requested by the access request does not have a corresponding record item in the record item space;
在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项;In the record item space, creating a record item corresponding to the content data requested by the access request;
所述设定条件为能创建至少一条记录项。The setting condition is that at least one record item can be created.
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项之前,还包括:In conjunction with the second possible implementation of the first aspect, in a third possible implementation of the first aspect, in the record entry space, a record entry corresponding to the content data requested by the access request is created Previously, it also included:
确定所述记录项空间的第二可用空间;Determining a second available space of the record item space;
确定所述第二可用空间满足设定条件。It is determined that the second available space satisfies a set condition.
结合第一方面和第一方面的第一种至第三种可能的实现方式中的任意一种,在第一方面的第四种可能的实现方式中,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率排在后n位的记录项。In conjunction with the first aspect and any one of the first to third possible implementations of the first aspect, in the fourth possible implementation of the first aspect, the deleted at least one record entry is The data cache space does not have a record item whose access probability is ranked in the last n bits in at least one record item of the corresponding content data.
结合第一方面和第一方面的第一种至第三种可能的实现方式中的任意一种,在第一方面的第五种可能的实现方式中,所述删除的至少一条记录项为 在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率最小的记录项。With reference to the first aspect, and any one of the first to third possible implementation manners of the first aspect, in the fifth possible implementation manner of the first aspect, the deleted at least one record entry is The entry with the least probability of access is found in at least one record item in which the corresponding content data does not exist in the data cache space.
结合第一方面的第一种至第三种可能的实现方式中的任意一种,在第一方面的第六种可能的实现方式中,所述数据缓存空间中存储的内容数据是长度为固定值的音视频段;With reference to any one of the first to third possible implementation manners of the first aspect, in a sixth possible implementation manner of the first aspect, the content data stored in the data cache space is fixed in length Audio and video segments of value;
所述方法还包括:The method further includes:
如果所述访问请求所请求的音视频段未被存储在所述数据缓存空间中、且所述访问请求所请求的音视频段的占用空间大于所述数据缓存空间的可用空间、且所述访问请求所请求的音视频段的访问概率大于存储在所述数据缓存空间中访问概率最小的音视频段的访问概率,则向第二设备请求所述访问请求所请求的音视频段,以及使用所述第二设备返回的音视频段替换存储在所述数据缓存空间中访问概率最小的音视频段。If the audio and video segments requested by the access request are not stored in the data cache space, and the occupied space of the audio and video segments requested by the access request is larger than the available space of the data cache space, and the access Requesting, by the second device, the audio and video segment requested by the access request, and the use of the audio and video segment of the requested audio and video segment, and the access probability of the audio and video segment having the smallest access probability stored in the data buffer space The audio and video segments returned by the second device replace the audio and video segments stored in the data buffer space with the least probability of access.
结合第一方面的第一种至第三种可能的实现方式中的任意一种,在第一方面的第七种可能的实现方式中,所述方法还包括:With reference to any one of the first to third possible implementation manners of the first aspect, in a seventh possible implementation manner of the first aspect, the method further includes:
若所述访问请求所请求的内容数据在记录项空间中存在对应的记录项,则更新与所述访问请求所请求的内容数据对应的记录项。If the content data requested by the access request has a corresponding record item in the record item space, the record item corresponding to the content data requested by the access request is updated.
结合第一方面的第七种可能的实现方式,在第一方面的第八种可能的实现方式中,所述记录项包括以下字段:In conjunction with the seventh possible implementation of the first aspect, in an eighth possible implementation of the first aspect, the record entry includes the following fields:
上次访问时间,平均访问间隔和访问次数;所述平均访问间隔用于表征访问概率;Last access time, average access interval and number of visits; the average access interval is used to characterize the access probability;
更新与所述访问请求所请求的内容数据对应的记录项,包括:Updating a record corresponding to the content data requested by the access request, including:
根据所述访问请求包含的访问时间和设置的遗忘因子,更新与所述访问请求所请求的内容数据对应的记录项中包括的字段;Updating a field included in the record item corresponding to the content data requested by the access request according to the access time included in the access request and the set forgetting factor;
其中,所述遗忘因子根据设备发起访问请求的时变性定时或不定时地进行更新;The forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request;
所述设备发起访问请求的时变性,满足下述条件: The time variation of the device initiating the access request satisfies the following conditions:
Figure PCTCN2015090416-appb-000001
Figure PCTCN2015090416-appb-000001
Figure PCTCN2015090416-appb-000002
or
Figure PCTCN2015090416-appb-000002
其中,ΔP表示设备发起访问请求的时变性,Pt(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t时刻被请求的概率,Pt-δ(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t-δ时刻被请求的概率,M表示所述记录项空间中包括的记录项的总数量,N表示所述记录项空间中访问概率排在前N位的记录项的总数量。Where ΔP represents the time variation of the device initiating the access request, and P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t , P t - δ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t-δ, and M represents the record included in the record space The total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
结合第一方面的第八种可能的实现方式,在第一方面的第九种可能的实现方式中,更新后的遗忘因子满足下述条件:In conjunction with the eighth possible implementation of the first aspect, in a ninth possible implementation of the first aspect, the updated forgetting factor satisfies the following conditions:
a'=updaterate×a+(1-updaterate)×ΔP;a'=update rate ×a+(1-update rate )×ΔP;
其中,a'表示更新后的遗忘因子,a表示更新前的遗忘因子,updaterate表示预设参数,0<updaterate<1。Where a' indicates the updated forgetting factor, a indicates the forgetting factor before the update, and update rate indicates the preset parameter, 0 <update rate <1.
结合第一方面和第一方面的第一种至第九种可能的实现方式中的任意一种,在第一方面的第十种可能的实现方式中,所述记录项空间的大小根据设定参数RECORDLIMIT设置;With reference to the first aspect and any one of the first to the ninth possible implementation manners of the first aspect, in the tenth possible implementation manner of the first aspect, the size of the recording item space is set according to Parameter RECORD LIMIT setting;
所述设定参数RECORDLIMIT用于表征所述记录项空间存储的记录项的最大数量与所述数据缓存空间存储的内容数据的最大数量的比值;所述设定参数RECORDLIMIT大于1。The setting parameter RECORD LIMIT is used to characterize a ratio of a maximum number of entries stored in the record space to a maximum number of content data stored in the data cache space; the setting parameter RECORD LIMIT is greater than one.
结合第一方面和第一方面的第一种至第十种可能的实现方式中的任意一种,在第一方面的第十一种可能的实现方式中,所述记录项空间中的记录项以最小堆的结构方式存储,所述最小堆的根节点为所述记录项空间中访问概率最小的记录项。With reference to the first aspect and any one of the first to tenth possible implementation manners of the first aspect, in the eleventh possible implementation manner of the first aspect, the record item in the record item space Stored in a minimal heap structure, the root node of the minimum heap is the record entry with the least probability of access in the record entry space.
第二方面,本发明实施例提供了一种缓存管理装置,包括:In a second aspect, an embodiment of the present invention provides a cache management apparatus, including:
处理模块,用于确定记录项空间的第一可用空间;在确定的第一可用空间不满足设定条件时,在所述记录项空间中删除存储的至少一条记录项;其 中,删除的至少一条记录项在数据缓存空间中不存在对应的内容数据。a processing module, configured to determine a first available space of the record item space; delete the stored at least one record item in the record item space when the determined first available space does not satisfy the set condition; The deleted at least one record item does not have corresponding content data in the data cache space.
结合第二方面,在第二方面的第一种可能的实现方式中,所述装置还包括:In conjunction with the second aspect, in a first possible implementation of the second aspect, the device further includes:
接收模块,用于在所述处理模块确定记录项空间的第一可用空间之前,接收第一设备的访问请求;a receiving module, configured to receive an access request of the first device before the processing module determines the first available space of the record item space;
所述处理模块还用于,如果确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项,则在所述记录项空间中删除存储的至少一条记录项之后,在所述记录项空间中创建与所述访问请求所请求的内容数据对应的记录项;所述设定条件为能创建至少一条记录项。The processing module is further configured to: after determining that the content data requested by the access request does not have a corresponding record item in the record item space, after deleting the stored at least one record item in the record item space, Creating a record item corresponding to the content data requested by the access request in the record item space; the setting condition is that at least one record item can be created.
结合第二方面,在第二方面的第二种可能的实现方式中,所述装置还包括:In conjunction with the second aspect, in a second possible implementation of the second aspect, the device further includes:
接收模块,用于在所述处理模块确定记录项空间的第一可用空间之前,接收第一设备的访问请求;a receiving module, configured to receive an access request of the first device before the processing module determines the first available space of the record item space;
所述处理模块还用于,如果确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项,则在确定记录项空间的第一可用空间之前,在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项;所述设定条件为能创建至少一条记录项。The processing module is further configured to: if it is determined that the content data requested by the access request does not have a corresponding record item in the record item space, before determining the first available space of the record item space, in the record item space And creating a record item corresponding to the content data requested by the access request; the setting condition is that at least one record item can be created.
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述处理模块还用于:In conjunction with the second possible implementation of the second aspect, in a third possible implementation of the second aspect, the processing module is further configured to:
在所述记录项空间中创建与所述访问请求所请求的内容数据对应的记录项之前,确定所述记录项空间的第二可用空间;确定所述第二可用空间满足设定条件。Determining a second available space of the record item space before creating a record item corresponding to the content data requested by the access request in the record item space; determining that the second available space satisfies a set condition.
结合第二方面和第二方面的第一种至第三种可能的实现方式中的任意一种,在第二方面的第四种可能的实现方式中,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率排在后n位的记录项。With reference to the second aspect, and any one of the first to the third possible implementation manners of the second aspect, in the fourth possible implementation manner of the second aspect, the deleted at least one record item is The data cache space does not have a record item whose access probability is ranked in the last n bits in at least one record item of the corresponding content data.
结合第二方面和第二方面的第一种至第三种可能的实现方式中的任意一 种,在第二方面的第五种可能的实现方式中,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率最小的记录项。Combining the second aspect with any one of the first to third possible implementations of the second aspect In a fifth possible implementation manner of the second aspect, the deleted at least one record item is a record item having the smallest access probability among the at least one record item in which the corresponding content data does not exist in the data cache space.
结合第二方面的第一种至第三种可能的实现方式中的任意一种,在第二方面的第六种可能的实现方式中,所述数据缓存空间中存储的内容数据是长度为固定值的音视频段;With reference to any one of the first to third possible implementation manners of the second aspect, in a sixth possible implementation manner of the second aspect, the content data stored in the data cache space is fixed in length Audio and video segments of value;
所述处理模块还用于:The processing module is further configured to:
如果所述访问请求所请求的音视频段未被存储在所述数据缓存空间中、且所述访问请求所请求的音视频段的占用空间大于所述数据缓存空间的可用空间、且所述访问请求所请求的音视频段的访问概率大于存储在所述数据缓存空间中访问概率最小的音视频段的访问概率,则向第二设备请求所述访问请求所请求的音视频段,以及使用所述第二设备返回的音视频段替换存储在所述数据缓存空间中访问概率最小的音视频段。If the audio and video segments requested by the access request are not stored in the data cache space, and the occupied space of the audio and video segments requested by the access request is larger than the available space of the data cache space, and the access Requesting, by the second device, the audio and video segment requested by the access request, and the use of the audio and video segment of the requested audio and video segment, and the access probability of the audio and video segment having the smallest access probability stored in the data buffer space The audio and video segments returned by the second device replace the audio and video segments stored in the data buffer space with the least probability of access.
结合第二方面的第一种至第三种可能的实现方式中的任意一种,在第二方面的第七种可能的实现方式中,所述处理模块还用于:With reference to any one of the first to third possible implementations of the second aspect, in a seventh possible implementation of the second aspect, the processing module is further configured to:
若所述访问请求所请求的内容数据在记录项空间中存在对应的记录项,则更新与所述访问请求所请求的内容数据对应的记录项。If the content data requested by the access request has a corresponding record item in the record item space, the record item corresponding to the content data requested by the access request is updated.
结合第二方面的第七种可能的实现方式,在第二方面的第八种可能的实现方式中,所述记录项包括以下字段:In conjunction with the seventh possible implementation of the second aspect, in an eighth possible implementation of the second aspect, the record entry includes the following fields:
上次访问时间,平均访问间隔和访问次数;所述平均访问间隔用于表征访问概率;Last access time, average access interval and number of visits; the average access interval is used to characterize the access probability;
所述处理模块在更新与所述访问请求所请求的内容数据对应的记录项时,具体用于:When the processing module updates the record corresponding to the content data requested by the access request, the processing module is specifically configured to:
根据所述访问请求包含的访问时间和设置的遗忘因子,更新与所述访问请求所请求的内容数据对应的记录项中包括的字段;Updating a field included in the record item corresponding to the content data requested by the access request according to the access time included in the access request and the set forgetting factor;
其中,所述遗忘因子根据设备发起访问请求的时变性定时或不定时地进行更新; The forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request;
所述设备发起访问请求的时变性,满足下述条件:The time variation of the device initiating the access request satisfies the following conditions:
Figure PCTCN2015090416-appb-000003
Figure PCTCN2015090416-appb-000003
Figure PCTCN2015090416-appb-000004
or
Figure PCTCN2015090416-appb-000004
其中,ΔP表示设备发起访问请求的时变性,Pt(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t时刻被请求的概率,Pt-δ(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t-δ时刻被请求的概率,M表示所述记录项空间中包括的记录项的总数量,N表示所述记录项空间中访问概率排在前N位的记录项的总数量。Where ΔP represents the time variation of the device initiating the access request, and P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t , P t - δ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t-δ, and M represents the record included in the record space The total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
结合第二方面的第八种可能的实现方式,在第二方面的第九种可能的实现方式中,更新后的遗忘因子满足下述条件:In conjunction with the eighth possible implementation of the second aspect, in a ninth possible implementation of the second aspect, the updated forgetting factor satisfies the following conditions:
a'=updaterate×a+(1-updaterate)×ΔP;a'=update rate ×a+(1-update rate )×ΔP;
其中,a'表示更新后的遗忘因子,a表示更新前的遗忘因子,updaterate表示预设参数,0<updaterate<1。Where a' indicates the updated forgetting factor, a indicates the forgetting factor before the update, and update rate indicates the preset parameter, 0 <update rate <1.
结合第二方面和第二方面的第一种至第九种可能的实现方式中的任意一种,在第二方面的第十种可能的实现方式中,所述记录项空间的大小根据设定参数RECORDLIMIT设置;With reference to the second aspect, and any one of the first to the ninth possible implementation manners of the second aspect, in the tenth possible implementation manner of the second aspect, the size of the recording item space is set according to Parameter RECORD LIMIT setting;
所述设定参数RECORDLIMIT用于表征所述记录项空间存储的记录项的最大数量与所述数据缓存空间存储的内容数据的最大数量的比值;所述设定参数RECORDLIMIT大于1。The setting parameter RECORD LIMIT is used to characterize a ratio of a maximum number of entries stored in the record space to a maximum number of content data stored in the data cache space; the setting parameter RECORD LIMIT is greater than one.
结合第二方面和第二方面的第一种至第十种可能的实现方式中的任意一种,在第二方面的第十一种可能的实现方式中,所述记录项空间中的记录项以最小堆的结构方式存储,所述最小堆的根节点为所述记录项空间中访问概率最小的记录项。With reference to the second aspect, and any one of the first to the tenth possible implementation manners of the second aspect, in the eleventh possible implementation manner of the second aspect, the record item in the record item space Stored in a minimal heap structure, the root node of the minimum heap is the record entry with the least probability of access in the record entry space.
利用本发明实施例提供的方案,通过维护一个固定大小的记录项空间,选择性地淘汰陈旧的记录项,从而解决过时记录项过多浪费存储资源的问题。 With the solution provided by the embodiment of the present invention, by maintaining a fixed-size record item space, the old record items are selectively eliminated, thereby solving the problem that the obsolete record items waste too much storage resources.
附图说明DRAWINGS
图1A为现有技术下传统网络中的用户响应示意图;1A is a schematic diagram of user response in a conventional network in the prior art;
图1B为现有技术下CDN中的用户响应示意图;FIG. 1B is a schematic diagram of user response in a CDN in the prior art; FIG.
图2为现有技术下基于移动网络的CDN中的用户响应示意图;2 is a schematic diagram of user response in a CDN based on a mobile network in the prior art;
图3为现有技术下记录项空间和数据缓存空间的分配示意图;3 is a schematic diagram of allocation of a record item space and a data cache space in the prior art;
图4为本发明实施例提供的一种缓存管理方法的流程图;FIG. 4 is a flowchart of a cache management method according to an embodiment of the present invention;
图5为本发明实施例提供的一种内容数据的访问概率分布的示意图;FIG. 5 is a schematic diagram of an access probability distribution of content data according to an embodiment of the present invention;
图6为本发明实施例提供的一种视频段标识的示意图;FIG. 6 is a schematic diagram of a video segment identifier according to an embodiment of the present disclosure;
图7为本发明实施例提供的一种基站管理视频缓存的详细流程图;FIG. 7 is a detailed flowchart of a base station management video buffer according to an embodiment of the present invention;
图8为本发明实施例提供的一种缓存管理装置的结构示意图;FIG. 8 is a schematic structural diagram of a cache management apparatus according to an embodiment of the present disclosure;
图9为本发明实施例提供的一种缓存管理设备的结构示意图。FIG. 9 is a schematic structural diagram of a cache management device according to an embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The present invention will be further described in detail with reference to the accompanying drawings, in which FIG. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供了一种缓存管理方法和装置,通过维护一个固定大小的记录项空间,选择性地淘汰陈旧的记录项,从而解决过时记录项过多浪费存储资源的问题。The embodiment of the invention provides a cache management method and device, which selectively eliminates stale entries by maintaining a fixed-size record item space, thereby solving the problem that the obsolete record items waste too much storage resources.
应理解,本发明实施例的技术方案可以应用于基站、PGW等存储资源有限的设备,也可以应用于CDN缓存服务器等存储资源丰富的设备。It should be understood that the technical solution of the embodiment of the present invention can be applied to a device with limited storage resources such as a base station and a PGW, and can also be applied to a device with rich storage resources such as a CDN cache server.
还应理解,本发明实施例的技术方案可以用于管理各种类型的文件缓存,如音频文件、视频文件、图像文件等。It should also be understood that the technical solution of the embodiments of the present invention can be used to manage various types of file caches, such as audio files, video files, image files, and the like.
图4所示为本发明实施例提供的缓存管理方法的实现流程图,包括: FIG. 4 is a flowchart of implementing a cache management method according to an embodiment of the present invention, including:
步骤401:确定记录项空间的第一可用空间。Step 401: Determine a first available space of the record item space.
所述可用空间为当前记录项空间内除已被存储的记录项占用的空间之外剩余的空间。The available space is the space remaining in the current record item space except for the space occupied by the stored record items.
本发明实施例中所述记录项空间的总大小是固定的,即所述记录项空间能够存储的记录项的总数量是固定的,不会随着出现的内容数据的增加而不断增加。The total size of the record item space in the embodiment of the present invention is fixed, that is, the total number of record items that can be stored in the record item space is fixed, and does not increase continuously with the increase of the content data that appears.
可选的,在系统初始化阶段,可以根据设定参数RECORDLIMIT来设置记录项空间的大小,所述设定参数RECORDLIMIT用于表征所述记录项空间存储的记录项的最大数量与数据缓存空间存储的内容数据的最大数量的比值;所述设定参数RECORDLIMIT大于1。Optionally, in the system initialization phase, the size of the record item space may be set according to the setting parameter RECORD LIMIT , where the setting parameter RECORD LIMIT is used to represent the maximum number of records items stored in the record item space and the data cache space. The ratio of the maximum number of stored content data; the set parameter RECORD LIMIT is greater than one.
例如,某基站的规格为最多存储10000个视频,若设定参数RECORDLIMIT为2,考虑到每条记录项占用的空间大小一般不超过1千字节(单位:KB),因此可以将记录项空间的大小设置为20000KB。For example, the specification of a base station is to store a maximum of 10,000 videos. If the parameter RECORD LIMIT is set to 2, it is considered that the space occupied by each entry generally does not exceed 1 kilobyte (unit: KB), so the record can be recorded. The size of the space is set to 20000KB.
步骤402:在确定的第一可用空间不满足设定条件时,在所述记录项空间中删除存储的至少一条记录项;其中,删除的至少一条记录项在数据缓存空间中不存在对应的内容数据。Step 402: Delete at least one stored item in the record item space when the determined first available space does not satisfy the set condition; wherein the deleted at least one record item does not have a corresponding content in the data cache space data.
可选的,所述设定条件可以为能创建至少一条记录项;所谓不满足设定条件即表征当前记录项空间的可用空间不足以创建至少一条记录项。Optionally, the setting condition may be that at least one record item can be created; the so-called unsatisfied setting condition that the available space for characterizing the current record item space is insufficient to create at least one record item.
可选的,所述删除的至少一条记录项可以为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率排在后n位的记录项;或者,所述删除的至少一条记录项可以为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率最小的记录项。Optionally, the deleted at least one record item may be a record item whose access probability is ranked in the last n bits in at least one record item in which the corresponding content data does not exist in the data cache space; or the deleted at least A record item may be a record item with the least probability of access in at least one record item in which the corresponding content data does not exist in the data cache space.
本发明实施例可以通过仅存储一部分记录项,达到与存储了全部记录项相差无几的效果,其中的原因在于设备行为的集中特性。实际应用中,设备发起的访问请求中大部分都集中在一小部分特定的内容数据上,而其余大部分的内容数据的访问次数非常少。对于存储资源有限的系统而言,一般只能 在数据缓存空间中存储访问概率最高的一部分内容数据。对于那些访问概率较低的内容数据,即使系统存储了这些内容数据的记录项,这些内容数据也不太可能被缓存在系统中。因此,本发明实施例选择丢弃这部分访问概率较低的内容数据的记录项,选择保留访问概率较高的内容数据的记录项,这样既能节省存储资源,又能不明显影响追踪内容数据的访问概率。The embodiment of the present invention can achieve the effect of being almost the same as storing all the recorded items by storing only a part of the recorded items, which is due to the concentrated characteristics of the device behavior. In practical applications, most of the device-initiated access requests are concentrated on a small amount of specific content data, while the rest of the content data has very few accesses. For systems with limited storage resources, generally only A portion of the content data with the highest probability of access is stored in the data cache space. For content data with low access probability, even if the system stores the records of the content data, the content data is unlikely to be cached in the system. Therefore, the embodiment of the present invention selects to discard the record items of the content data with low access probability, and selects the record items of the content data with high access probability, so that the storage resources can be saved, and the tracking content data can be obviously not affected. Access probability.
本发明实施例中,图4所示的方法流程,可以有以下两种触发条件:In the embodiment of the present invention, the method flow shown in FIG. 4 can have the following two trigger conditions:
条件一:按照设定周期;Condition 1: According to the set period;
条件二:不定时,如接收到第一设备的访问请求,以及确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项时。Condition 2: Unscheduled, such as receiving an access request of the first device, and determining that the content data requested by the access request does not have a corresponding record item in the record item space.
在上述条件2的情况下,在删除至少一条记录项之前或之后,还需要在所述记录项空间中创建与所述访问请求所请求的内容数据对应的记录项,具体可以有但不限于以下三种执行顺序:In the case of the above condition 2, before or after deleting at least one record item, it is necessary to create a record item corresponding to the content data requested by the access request in the record item space, which may be, but not limited to, the following: Three execution sequences:
顺序一:首先接收第一设备的访问请求,并在确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项时,执行步骤401和步骤402,然后在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项。Sequence one: first receiving an access request of the first device, and when determining that the content data requested by the access request does not have a corresponding record item in the record item space, performing step 401 and step 402, and then performing the record item In the space, a record item corresponding to the content data requested by the access request is created.
顺序二:首先接收第一设备的访问请求,并在确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项时,在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项,然后执行步骤401和步骤402。Sequence 2: first receiving an access request of the first device, and when determining that the content data requested by the access request does not have a corresponding record item in the record item space, creating and accessing the record item space The record corresponding to the requested content data is requested, and then steps 401 and 402 are performed.
顺序三:首先接收第一设备的访问请求,并在确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项时,确定所述记录项的第二可用空间,在确定所述第二可用空间满足设定条件时,在所述记录项空间中创建与所述访问请求所请求的内容数据对应的记录项,然后执行步骤401和步骤402。Sequence 3: first receiving an access request of the first device, and determining that the content data requested by the access request does not have a corresponding record item in the record item space, determining a second available space of the record item, determining When the second available space satisfies the set condition, a record corresponding to the content data requested by the access request is created in the record item space, and then steps 401 and 402 are performed.
可选的,若所述访问请求所请求的内容数据在记录项空间中存在对应的记录项,则需要更新与所述访问请求所请求的内容数据对应的记录项。 Optionally, if the content data requested by the access request has a corresponding record item in the record item space, the record item corresponding to the content data requested by the access request needs to be updated.
指数加权移动平均值(英文:Exponentially Weighted Moving-Average,简称:EWMA)算法为现有的一种更新记录项的方法。The Exponentially Weighted Moving-Average (EWMA) algorithm is an existing method for updating records.
在EWMA算法中,一条记录项包括以下3个字段:上次访问时间,平均访问间隔和访问次数;其中,所述上次访问时间和平均访问间隔一般为双精度浮点型(英文:double)变量,所述访问次数一般为整型(英文:int)变量;所述平均访问间隔用于表征访问概率。In the EWMA algorithm, a record entry includes the following three fields: last access time, average access interval, and number of accesses; wherein the last access time and the average access interval are generally double-precision floating-point types (English: double) The variable, the number of accesses is generally an integer (English: int) variable; the average access interval is used to characterize the access probability.
当接收到一个访问请求时,该访问请求一般携带了访问时间和所请求的内容数据的标识,EWMA算法根据所述访问请求所请求的内容数据的标识在记录项空间中查找到相同标识的记录项,然后根据所述访问请求包含的访问时间和设置的遗忘因子,更新与所述访问请求所请求的内容数据对应的记录项中包括的字段;When an access request is received, the access request generally carries an access time and an identifier of the requested content data, and the EWMA algorithm finds the record with the same identifier in the record item space according to the identifier of the content data requested by the access request. And then updating a field included in the record corresponding to the content data requested by the access request according to the access time included in the access request and the set forgetting factor;
其中,更新后的平均访问时间间隔满足下述条件:Among them, the updated average access time interval meets the following conditions:
T'=(1-a)×T+a×(tcur-tlast)   公式(1)T'=(1-a)×T+a×(t cur -t last ) Formula (1)
更新后的上次访问时间满足下述条件:The updated last access time meets the following conditions:
tlast'=tcur       公式(2)t last '=t cur formula (2)
更新后的访问次数满足下述条件:The number of updated visits meets the following conditions:
Count'=Count+1     公式(3)Count'=Count+1 formula (3)
其中,T'表示更新后的平均访问间隔,T表示更新前的平均访问间隔,a表示遗忘因子,tcur表示所述访问请求携带的访问时间,tlast表示更新前的上次访问时间,tlast'表示更新前的上次访问时间,Count'表示更新后的访问次数,Count表示更新前的访问次数。Where T' denotes the updated average access interval, T denotes the average access interval before the update, a denotes the forgetting factor, t cur denotes the access time carried by the access request, t last denotes the last access time before the update, t Last ' indicates the last access time before the update, Count' indicates the number of accesses after the update, and Count indicates the number of accesses before the update.
现有EWMA算法中的遗忘因子是一个介于0到1之间的数值,通过使用遗忘因子,一方面可以降低新来的访问请求对“平均访问时间间隔”这个字段的影响;另一方面,可以以一定比率降低历史访问请求在“平均访问时间间隔”这个字段中的比重,这样可以避免很久以前的访问请求对当前的访问概率造成过多影响。 The forgetting factor in the existing EWMA algorithm is a value between 0 and 1. By using the forgetting factor, on the one hand, the impact of the new access request on the "average access time interval" field can be reduced; on the other hand, The proportion of historical access requests in the "Average Access Interval" field can be reduced at a certain rate, which avoids the long-standing access request having too much impact on the current access probability.
将EWMA算法应用于管理系统缓存时,由于不同的系统可能面对不同的设备群体,因此不同的系统使用的遗忘因子应该采取不同的数值。而同一系统随着时间的推移,面对的设备群体的访问行为也会发生变化,其采取的遗忘因子也应该相应的变化。但由于现有EWMA算法无法预先知道设备发起访问请求的时变性大小,因此遗忘因子的设置成为一个重要问题。When applying the EWMA algorithm to the management system cache, since different systems may face different device groups, the forgetting factors used by different systems should take different values. As the same system changes over time, the access behavior of the device group will also change, and the forgetting factor adopted should also change accordingly. However, since the existing EWMA algorithm cannot know in advance the time-varying size of the device-initiated access request, the setting of the forgetting factor becomes an important issue.
而本发明实施例提出了一种自适应调整遗忘因子的方法,可以通过预测设备发起访问请求的时变性,动态地调整遗忘因子。例如,当设备发起访问请求的时变性较大时,选择较大的遗忘因子,当设备发起访问请求的时变性较小时,选择较小的遗忘因子。However, the embodiment of the present invention provides a method for adaptively adjusting the forgetting factor, which can dynamically adjust the forgetting factor by predicting the time variation of the access request initiated by the device. For example, when the time when the device initiates the access request is large, a larger forgetting factor is selected, and when the time when the device initiates the access request is small, a smaller forgetting factor is selected.
如图5所示,为一种内容数据的访问概率分布的示意图,其中,横轴表示记录项空间中各记录项所对应的内容数据的访问概率的排名,例如,记录项空间中访问概率排在第1位的记录项对应的内容数据在横轴上的取值即为1;纵轴表示访问概率;曲线Pt表示t时刻记录项空间中各记录项所对应的内容数据的访问概率分布情况,曲线Pt-δ表示t-δ时刻记录项空间中各记录项所对应的内容数据的访问概率分布情况。那么从t-δ时刻到t时刻之间设备发起访问请求的变化量可以用曲线Pt和曲线Pt-δ之间的相差面积表示,如图5中的深色部分区域所示。假设记录项空间中包括的记录项的总数量为M,那么设备发起访问请求的时变性满足下述条件:As shown in FIG. 5, it is a schematic diagram of an access probability distribution of content data, wherein the horizontal axis represents the ranking of the access probability of the content data corresponding to each record item in the record item space, for example, the access probability row in the record item space. The value of the content data corresponding to the record of the first bit on the horizontal axis is 1; the vertical axis represents the access probability; and the curve P t represents the access probability distribution of the content data corresponding to each record item in the record entry space at time t. In the case, the curve P t-δ represents the access probability distribution of the content data corresponding to each record item in the record item space at the time t-δ. Then, the amount of change in the device-initiated access request from the time t-δ to the time t can be expressed by the phase difference between the curve P t and the curve P t-δ , as shown by the dark portion in FIG. Assuming that the total number of entries included in the entry space is M, then the time variant of the device initiating the access request satisfies the following conditions:
Figure PCTCN2015090416-appb-000005
      公式(4)
Figure PCTCN2015090416-appb-000005
Formula (4)
其中,ΔP表示设备发起访问请求的时变性,Pt(i)表示在所述记录项空间中流行度排在第i位的记录项所对应的内容数据在t时刻被请求的概率,Pt-δ(i)表示在所述记录项空间中流行度排在第i位的记录项所对应的内容数据在t-δ时刻被请求的概率。Where ΔP represents the time variation of the device initiating the access request, and P t (i) represents the probability that the content data corresponding to the record of the ith bit in the record item space is requested at time t , P t - δ (i) indicates the probability that the content data corresponding to the record in which the popularity of the i-th bit ranks in the record item space is requested at time t-δ.
此外,考虑到设备发起访问请求的时变性主要体现在不同时间段内设备对访问概率高的内容数据发起访问请求的变化情况,因此也可以不去累积记 录项空间中每个记录项对应的内容数据的访问概率变化,而是累积记录项空间中访问概率排在前N位的记录项对应的内容数据的访问概率变化。在这种情况下,设备发起访问请求的时变性ΔP满足下述条件:In addition, considering that the time-varying time when the device initiates the access request is mainly reflected in the change of the device requesting the access to the content data with high probability of access in different time periods, it is also possible not to accumulate the record. The access probability of the content data corresponding to each record item in the record space changes, but the access probability change of the content data corresponding to the record item whose access probability is ranked in the top N bits in the accumulated record space. In this case, the time-varying ΔP of the device initiating the access request satisfies the following conditions:
Figure PCTCN2015090416-appb-000006
    公式(5)
Figure PCTCN2015090416-appb-000006
Formula (5)
其中,N表示所述记录项空间中访问概率排在前N位的记录项的总数量,其余参数的定义可以参见公式(4)。Where N is the total number of entries in the record item space whose access probability is ranked in the first N bits. For the definition of the remaining parameters, refer to formula (4).
根据设备发起访问请求的时变性,定时或不定时地更新遗忘因子,更新后的遗忘因子满足下述条件:The forgetting factor is updated periodically or irregularly according to the time variation of the device initiated access request, and the updated forgetting factor satisfies the following conditions:
a'=updaterate×a+(1-updaterate)×ΔP    公式(6)a'=update rate ×a+(1-update rate )×ΔP Equation (6)
其中,a'表示更新后的遗忘因子,a表示更新前的遗忘因子,updaterate表示预设参数,0<updaterate<1,ΔP的取值可以参见公式(4)或公式(5)。Where a' denotes the updated forgetting factor, a denotes the forgetting factor before the update, update rate denotes the preset parameter, 0<update rate <1, and the value of ΔP can be referred to formula (4) or formula (5).
公式(6)可以理解为,使用一个低通滤波器对遗忘因子进行平滑,其中updaterate可以理解为滤波器参数。较佳的,updaterate可以取0.4。Equation (6) can be understood as smoothing the forgetting factor using a low pass filter, where update rate can be understood as a filter parameter. Preferably, the update rate can be taken as 0.4.
需要说明的是,上述设置遗忘因子的技术手段并不依赖于本发明的技术方案,也不限定于管理缓存的场景,该技术手段可以与其它技术手段配合实施,也可以单独实施。It should be noted that the technical means for setting the forgetting factor does not depend on the technical solution of the present invention, and is not limited to the scenario of managing the cache. The technical means may be implemented in cooperation with other technical means, or may be implemented separately.
可选的,在接收到所述第一设备的访问请求后,如果所述访问请求所请求的内容数据在数据缓存空间存在对应的缓存,则可以直接将所述数据缓存空间中对应的缓存发送给所述第一设备。Optionally, after receiving the access request of the first device, if the content data requested by the access request has a corresponding cache in the data cache space, the corresponding cache in the data cache space may be directly sent. Give the first device.
如果所述访问请求所请求的内容数据在数据缓存空间不存在对应的缓存,则可以向第二设备请求对应的内容数据,并将所述第二设备返回的内容数据发送给所述第一设备;其中,所述第二设备可以是接收到访问请求的设备的同一级设备或上一级设备,例如,以接收到访问请求的设备是基站为例,此时所述第二设备可以是同一级的其他基站,也可以是上一级的PGW或CDN缓存服务器。If the content data requested by the access request does not have a corresponding cache in the data cache space, the corresponding content data may be requested from the second device, and the content data returned by the second device is sent to the first device. The second device may be the same level device or a higher level device of the device that receives the access request, for example, the device that receives the access request is a base station, and the second device may be the same. Other base stations of the level may also be PGW or CDN cache servers of the upper level.
另外,在接收到所述第二设备返回的内容数据之后,如果所述数据缓存 空间的可用空间不大于所述第二设备返回的内容数据的占用空间,则可以直接在所述数据缓存空间中存储该内容数据;如果所述数据缓存空间的可用空间小于所述第二设备返回的内容数据的占用空间,则需进一步判断该内容数据的访问概率是否大于所述数据缓存空间中访问概率最小的内容数据的访问概率。在确定所述第二设备返回的内容数据的访问概率不大于所述访问概率最小的内容数据的访问概率时,可以不存储所述第二设备返回的内容数据。而在确定所述第二设备返回的内容数据的访问概率大于所述访问概率最小的内容数据的访问概率时,可以删除所述访问概率最小的内容数据,如果删除之后的数据缓存空间足以存储所述第二设备返回的内容数据,便存储所述第二设备返回的内容数据,否则便重复上述操作,继续比较所述数据缓存空间当前访问概率最小的内容数据与所述第二设备返回的内容数据的访问概率大小,直至在所述数据缓存空间中删除足够多的空间用于存储所述第二设备返回的内容数据,或在确定所述数据缓存空间内当前访问概率最小的内容数据的访问概率大于所述第二设备返回的内容数据时,放弃存储所述第二设备返回的内容数据。In addition, after receiving the content data returned by the second device, if the data cache If the available space of the space is not greater than the occupied space of the content data returned by the second device, the content data may be directly stored in the data cache space; if the available space of the data cache space is smaller than that returned by the second device For the occupied space of the content data, it is further determined whether the access probability of the content data is greater than the access probability of the content data having the smallest access probability in the data cache space. When it is determined that the access probability of the content data returned by the second device is not greater than the access probability of the content data with the smallest access probability, the content data returned by the second device may not be stored. When it is determined that the access probability of the content data returned by the second device is greater than the access probability of the content data with the smallest access probability, the content data with the smallest access probability may be deleted, if the data cache space after the deletion is sufficient for storing The content data returned by the second device is stored, and the content data returned by the second device is stored, otherwise the operation is repeated, and the content data with the lowest current access probability and the content returned by the second device are continuously compared. The access probability of the data, until a sufficient space is deleted in the data cache space for storing the content data returned by the second device, or access to the content data having the smallest current access probability in the data cache space is determined When the probability is greater than the content data returned by the second device, the content data returned by the second device is discarded.
显然,上述确定是否缓存所述第二设备返回的内容数据的过程有可能浪费较多的计算资源。为了解决这个问题,并且考虑到访问请求所请求的内容数据一般为音视频,本发明实施例提出了对音视频进行等长分段的方法。Obviously, the above process of determining whether to cache the content data returned by the second device may waste more computing resources. In order to solve this problem, and considering that the content data requested by the access request is generally audio and video, the embodiment of the present invention proposes a method of performing equal length segmentation on audio and video.
在本方法中,CDN缓存服务器负责对每个音视频进行等长分段。每个音视频段的长度为固定值,不同的音视频将被分成不同份数的音视频段。比如:设定每个音视频段的固定长度为1分钟,那么10分钟长度的视频就被分成10份,而14分钟长度的视频就会被分成14份。CDN缓存服务器还负责对这些分段之后的音视频进行标记。每个音视频段有一个唯一的标识。标识包括两部分,一部分为音视频号,另一部分为这个音视频段在音视频当中的分段号。比如:1号视频长度为10分钟,被分成10个视频段,那么第5个视频段的标识为:{1:5},如图6所示。In this method, the CDN cache server is responsible for equal length segmentation of each audio and video. The length of each audio and video segment is a fixed value, and different audio and video will be divided into different portions of audio and video segments. For example, if the fixed length of each audio and video segment is set to 1 minute, then the 10-minute video will be divided into 10 copies, and the 14-minute video will be divided into 14 copies. The CDN cache server is also responsible for marking the audio and video after these segments. Each audio segment has a unique identifier. The logo consists of two parts, one is the audio and video number, and the other is the segment number of the audio and video segment in the audio and video. For example, if the length of the video is 10 minutes and is divided into 10 video segments, the identifier of the fifth video segment is: {1:5}, as shown in FIG. 6.
基站负责将用户设备发送的访问请求转换为对音视频段的请求。比如, 某个用户设备请求1号视频的第5分钟至第6分钟,预先设定的每个音视频段的固定长度为1分钟,则基站可以将该用户设备的请求转换为对{1:5}和{1:6}的音视频段标识的请求。The base station is responsible for converting the access request sent by the user equipment into a request for the audio and video segment. For example, When a user equipment requests the 5th to 6th minutes of the video No. 1, the predetermined length of each audio and video segment is 1 minute, the base station can convert the request of the user equipment into a pair of {1:5}. And the request for the audio and video segment identification of {1:6}.
这样,基站之间,基站和PGW、CDN缓存服务器之间,可以通过音视频段标识相互交流,从而确定需要处理的音视频段。In this way, between the base stations and the PGW and the CDN cache server, the audio and video segment identifiers can communicate with each other to determine the audio and video segments that need to be processed.
这样,如果所述访问请求所请求的音视频段未被存储在所述数据缓存空间中、且所述访问请求所请求的音视频段的占用空间大于所述数据缓存空间的可用空间、且所述访问请求所请求的音视频段的访问概率大于存储在所述数据缓存空间中访问概率最小的音视频段的访问概率,那么可以向第二设备请求所述访问请求所请求的音视频段,以及使用所述第二设备返回的音视频段替换存储在所述数据缓存空间中访问概率最小的音视频段。In this way, if the audio and video segments requested by the access request are not stored in the data cache space, and the occupied space of the audio and video segments requested by the access request is larger than the available space of the data cache space, The access probability of the audio and video segment requested by the access request is greater than the access probability of the audio and video segment having the smallest access probability stored in the data buffer space, and then the audio and video segment requested by the access request may be requested from the second device. And replacing the audio and video segments stored in the data buffer space with the least probability of access using the audio and video segments returned by the second device.
由于所有的音视频段的长度都是相同的,因此在进行缓存替换时,可以一对一的替换,即剔除一个音视频段就可以缓存一个音视频段,这样有利于减轻计算压力。并且由于实际应用中同一个音视频内部不同部分的访问概率是不一样的,如用户对某个视频的快进或快退操作,可能造成一个访问概率较高的视频内部的某个时间段的访问概率却比较低,显然这部分访问概率较小的视频段没必要缓存在系统中,但如果不进行音视频分段则需要缓存完整的视频,因此采用音视频分段,可以避免访问概率较小的音视频段占用系统的存储资源。Since all the lengths of the audio and video segments are the same, when the cache is replaced, one-to-one replacement can be performed, that is, an audio and video segment can be cached to cache an audio and video segment, which is beneficial to reduce the calculation pressure. Moreover, since the access probability of different parts of the same audio and video is different in practical applications, for example, the user fast forwards or rewinds a video, which may cause a certain time period within the video with a high probability of access. The access probability is relatively low. Obviously, this part of the video segment with a small probability of access is not necessary to be cached in the system. However, if the audio and video segmentation is not performed, the complete video needs to be cached. Therefore, the audio and video segmentation can avoid the access probability. Small audio and video segments occupy the system's storage resources.
可选的,本发明实施例中所述记录项空间中的记录项可以以最小堆的结构方式来存储,且所述最小堆的根节点为所述记录项空间中访问概率最小的记录项。这样在确定是否创建所述访问请求所请求的内容数据的记录项时,可以从所述最小堆的根节点开始从上往下依次取节点,如果某个节点满足对应的记录项在数据缓存空间中不存在对应的内容数据且该记录项的访问概率小于所述访问请求所请求的音视频段的访问概率时,则将该节点对应的记录项替换为所述访问请求所请求的内容数据的记录项。Optionally, in the embodiment of the present invention, the record item in the record item space may be stored in a minimum heap structure manner, and the root node of the minimum heap is the record item with the smallest access probability in the record item space. In this way, when determining whether to create a record item of the content data requested by the access request, the node may be taken from the top to the bottom of the root node of the minimum heap, if a node satisfies the corresponding record item in the data cache space. If there is no corresponding content data and the access probability of the record item is less than the access probability of the audio and video segment requested by the access request, the record corresponding to the node is replaced with the content data requested by the access request. Record item.
为了更清楚地说明本发明的技术方案,下面通过一个实施例对上述过程做 进一步的说明,需要说明的是,以下实施例仅仅是本发明的一个实施例,不构成对本发明的限定。In order to more clearly illustrate the technical solution of the present invention, the following process is performed by an embodiment. It is to be understood that the following examples are merely one embodiment of the invention and are not intended to limit the invention.
如图7所示,基站管理视频缓存的方法流程如下:As shown in FIG. 7, the method for managing a video buffer by a base station is as follows:
步骤701:基站接收用户设备的访问请求。Step 701: The base station receives an access request of the user equipment.
步骤702:所述基站确定所述访问请求所请求的所有视频段的标识,并逐段进行如下处理。Step 702: The base station determines identifiers of all video segments requested by the access request, and performs the following processing segment by segment.
步骤703:所述基站判断所述访问请求所请求的视频段在记录项空间中是否存在对应的记录项,若是,执行步骤704;否则,执行步骤705。Step 703: The base station determines whether the video segment requested by the access request has a corresponding record item in the record item space. If yes, step 704 is performed; otherwise, step 705 is performed.
步骤704:所述基站更新所述访问请求所请求的视频段对应的记录项,并转到步骤708;Step 704: The base station updates the record corresponding to the video segment requested by the access request, and proceeds to step 708;
步骤705:所述基站判断记录项空间是否足以创建一条记录项,若是,执行步骤707,否则,执行步骤706。Step 705: The base station determines whether the record item space is sufficient to create a record item. If yes, step 707 is performed; otherwise, step 706 is performed.
步骤706:所述基站在记录项空间中存储的记录项中,查找并删除在数据缓存空间不存在对应的视频的记录项中访问概率最小的记录项。Step 706: The base station searches for and deletes a record item having the smallest access probability among the records of the video in which the corresponding video does not exist in the record item stored in the record item space.
步骤707:所述基站在记录项空间中创建与所述访问请求所请求的视频对应的记录项,并初始化该记录项包括的各个字段。Step 707: The base station creates a record corresponding to the video requested by the access request in the record item space, and initializes each field included in the record item.
步骤708:所述基站判断所述访问请求所请求的视频段是否被存储在数据缓存空间中,若是,执行步骤714;否则,执行步骤709。Step 708: The base station determines whether the video segment requested by the access request is stored in the data cache space. If yes, go to step 714; otherwise, go to step 709.
步骤709:所述基站向上层的PGW缓存服务器请求所述访问请求所请求的视频段。Step 709: The base station requests the video segment requested by the access request from the PGW cache server of the upper layer.
步骤710:所述基站判断数据缓存空间是否足以存储所述PGW缓存服务器返回的所述访问请求所请求的视频段,若是,执行步骤713;否则,执行步骤711。Step 710: The base station determines whether the data cache space is sufficient to store the video segment requested by the access request returned by the PGW cache server. If yes, go to step 713; otherwise, go to step 711.
步骤711:所述基站判断所述访问请求所请求的视频段的访问概率是否大于存储在数据缓存空间中访问概率最小的视频段的访问概率,若是,执行步骤712;否则,执行步骤714。Step 711: The base station determines whether the access probability of the video segment requested by the access request is greater than the access probability of the video segment with the smallest access probability stored in the data cache space. If yes, go to step 712; otherwise, go to step 714.
步骤712:所述基站删除存储在数据缓存空间中访问概率最小的视频段。 Step 712: The base station deletes a video segment that has the smallest access probability stored in the data cache space.
步骤713:所述基站存储所述PGW缓存服务器返回的所述访问请求所请求的视频段。Step 713: The base station stores a video segment requested by the access request returned by the PGW cache server.
步骤714:所述基站将所述访问请求所请求的视频段返回给所述用户设备。Step 714: The base station returns the video segment requested by the access request to the user equipment.
以上,结合图4至图7详细说明了根据本发明实施例提供的缓存管理的方法,下面,结合图8和图9分别说明本发明实施例提供的缓存管理装置和缓存管理设备。The cache management device and the cache management device provided by the embodiment of the present invention are described in detail below with reference to FIG. 8 and FIG.
图8示出了本发明实施例提供的缓存管理装置80的示意性结构图,如图8所示,所述装置80包括:FIG. 8 is a schematic structural diagram of a cache management apparatus 80 according to an embodiment of the present invention. As shown in FIG. 8, the apparatus 80 includes:
处理模块801,用于确定记录项空间的第一可用空间;在确定的第一可用空间不满足设定条件时,在所述记录项空间中删除存储的至少一条记录项;其中,删除的至少一条记录项在数据缓存空间中不存在对应的内容数据。The processing module 801 is configured to determine a first available space of the record item space; when the determined first available space does not satisfy the set condition, delete the stored at least one record item in the record item space; wherein, at least one of the deleted items is deleted A record item does not have corresponding content data in the data cache space.
所述装置80还包括:The device 80 further includes:
接收模块802,用于在所述处理模块801确定记录项空间的第一可用空间之前,接收第一设备的访问请求。The receiving module 802 is configured to receive an access request of the first device before the processing module 801 determines the first available space of the record item space.
可选的,基于所述接收模块802接收的访问请求,所述处理模块801还可以用于,如果确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项,则在所述记录项空间中删除存储的至少一条记录项之后,在所述记录项空间中创建与所述访问请求所请求的内容数据对应的记录项;所述设定条件为能创建至少一条记录项。Optionally, based on the access request received by the receiving module 802, the processing module 801 may be further configured to: if it is determined that the content data requested by the access request does not have a corresponding record item in the record item space, then After deleting the stored at least one record item in the record item space, creating a record item corresponding to the content data requested by the access request in the record item space; the setting condition is that at least one record item can be created .
或者,基于所述接收模块802接收的访问请求,所述处理模块801还可以用于:如果确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项,则在确定记录项空间的第一可用空间之前,在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项;所述设定条件为能创建至少一条记录项。Alternatively, based on the access request received by the receiving module 802, the processing module 801 may be further configured to determine the record if it is determined that the content data requested by the access request does not have a corresponding record item in the record item space. Before the first available space of the item space, in the record item space, a record item corresponding to the content data requested by the access request is created; the setting condition is that at least one record item can be created.
或者,基于所述接收模块802接收的访问请求,所述处理模块801还可以用于:如果确定所述访问请求所请求的内容数据在记录项空间中不存在对 应的记录项,则在所述确定记录项空间的第一可用空间之前,确定所述记录项空间的第二可用空间;在确定所述第二可用空间满足设定条件时,在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项;所述设定条件为能创建至少一条记录项。Alternatively, based on the access request received by the receiving module 802, the processing module 801 may be further configured to: if it is determined that the content data requested by the access request does not exist in the record item space An entry record, determining a second available space of the record item space before determining the first available space of the record item space; and determining the second available space when the set condition is determined In the item space, a record item corresponding to the content data requested by the access request is created; the setting condition is that at least one record item can be created.
可选的,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率排在后n位的记录项。Optionally, the deleted at least one record item is a record item whose access probability is ranked in the last n bits in at least one record item in which the corresponding content data does not exist in the data cache space.
可选的,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率最小的记录项。Optionally, the deleted at least one record item is a record item having the smallest access probability among the at least one record item in which the corresponding content data does not exist in the data cache space.
可选的,如果所述数据缓存空间中存储的内容数据是长度为固定值的音视频段;则所述处理模块801还用于:如果所述访问请求所请求的音视频段未被存储在所述数据缓存空间中、且所述访问请求所请求的音视频段的占用空间大于所述数据缓存空间的可用空间、且所述访问请求所请求的音视频段的访问概率大于存储在所述数据缓存空间中访问概率最小的音视频段的访问概率,则向第二设备请求所述访问请求所请求的音视频段,以及使用所述第二设备返回的音视频段替换存储在所述数据缓存空间中访问概率最小的音视频段。Optionally, if the content data stored in the data cache space is an audio/video segment with a fixed value, the processing module 801 is further configured to: if the audio and video segment requested by the access request is not stored in The occupied space of the audio and video segments requested by the access request is larger than the available space of the data cache space, and the access probability of the audio and video segments requested by the access request is greater than that stored in the data cache space. And an access probability of the audio and video segment having the smallest access probability in the data buffer space, requesting, by the second device, the audio and video segment requested by the access request, and replacing the audio and video segment returned by using the second device with the data. The audio and video segment with the least probability of access in the cache space.
可选的,所述处理模块801还用于:若所述访问请求所请求的内容数据在记录项空间中存在对应的记录项,则更新与所述访问请求所请求的内容数据对应的记录项。Optionally, the processing module 801 is further configured to: if the content data requested by the access request has a corresponding record item in the record item space, update the record item corresponding to the content data requested by the access request .
可选的,所述记录项包括以下字段:上次访问时间,平均访问间隔和访问次数;所述平均访问间隔用于表征访问概率;Optionally, the record item includes the following fields: last access time, average access interval, and number of accesses; the average access interval is used to represent an access probability;
所述处理模块801在更新与所述访问请求所请求的内容数据对应的记录项时,具体用于:根据所述访问请求包含的访问时间和设置的遗忘因子,更新与所述访问请求所请求的内容数据对应的记录项中包括的字段;When the processing module 801 updates the record corresponding to the content data requested by the access request, the method is specifically configured to: update and request the access request according to the access time and the set forgetting factor included in the access request. The field included in the record item corresponding to the content data;
其中,所述遗忘因子根据设备发起访问请求的时变性定时或不定时地进行更新;所述设备发起访问请求的时变性,满足下述条件: The forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request; the device initiates the time-varying access request, and satisfies the following conditions:
Figure PCTCN2015090416-appb-000007
Figure PCTCN2015090416-appb-000007
Figure PCTCN2015090416-appb-000008
or
Figure PCTCN2015090416-appb-000008
其中,ΔP表示设备发起访问请求的时变性,Pt(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t时刻被请求的概率,Pt-δ(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t-δ时刻被请求的概率,M表示所述记录项空间中包括的记录项的总数量,N表示所述记录项空间中访问概率排在前N位的记录项的总数量。Where ΔP represents the time variation of the device initiating the access request, and P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t , P t - δ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t-δ, and M represents the record included in the record space The total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
可选的,更新后的遗忘因子满足下述条件:Optionally, the updated forgetting factor satisfies the following conditions:
a'=updaterate×a+(1-updaterate)×ΔP;a'=update rate ×a+(1-update rate )×ΔP;
其中,a'表示更新后的遗忘因子,a表示更新前的遗忘因子,updaterate表示预设参数,0<updaterate<1。Where a' indicates the updated forgetting factor, a indicates the forgetting factor before the update, and update rate indicates the preset parameter, 0 <update rate <1.
可选的,所述记录项空间的大小根据设定参数RECORDLIMIT设置;所述设定参数RECORDLIMIT用于表征所述记录项空间存储的记录项的最大数量与所述数据缓存空间存储的内容数据的最大数量的比值;所述设定参数RECORDLIMIT大于1。Optionally, the size of the record item space is set according to a setting parameter RECORD LIMIT ; the setting parameter RECORD LIMIT is used to represent the maximum number of records stored in the record item space and the content stored in the data cache space. The ratio of the maximum number of data; the set parameter RECORD LIMIT is greater than one.
可选的,所述记录项空间中的记录项以最小堆的结构方式存储,所述最小堆的根节点为所述记录项空间中访问概率最小的记录项。Optionally, the record items in the record item space are stored in a minimum heap structure, and the root node of the minimum heap is a record item having the smallest access probability in the record item space.
图9示出了本发明实施例提供的缓存管理设备90的示意性结构图,如图9所示,所述设备90包括:FIG. 9 is a schematic structural diagram of a cache management device 90 according to an embodiment of the present invention. As shown in FIG. 9, the device 90 includes:
总线901;Bus 901;
与所述总线相连的处理器902;a processor 902 connected to the bus;
与所述总线相连的存储器903;a memory 903 connected to the bus;
与所述总线相连的收发器904。A transceiver 904 coupled to the bus.
其中,所述处理器902通过所述总线901,调用所述存储器903中存储的程序,以用于确定记录项空间的第一可用空间;在确定的第一可用空间不满 足设定条件时,在所述记录项空间中删除存储的至少一条记录项;其中,删除的至少一条记录项在数据缓存空间中不存在对应的内容数据。The processor 902, by using the bus 901, invokes a program stored in the memory 903 for determining a first available space of a record item space; the first available space is determined to be dissatisfied When the condition is set, the stored at least one record item is deleted in the record item space; wherein the deleted at least one record item does not have corresponding content data in the data cache space.
所述收发器904用于在所述处理器902的控制下,完成上述缓存管理装置80中接收模块802的功能。The transceiver 904 is configured to complete the function of the receiving module 802 in the cache management device 80 under the control of the processor 902.
所述处理器902还用于完成上述缓存管理装置80中处理模块801的功能。The processor 902 is further configured to complete the functions of the processing module 801 in the cache management device 80.
应理解,在本发明实施例中,总线901除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线。It should be understood that, in the embodiment of the present invention, the bus 901 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for the sake of clarity, the various buses are labeled as buses in the figure.
处理器902可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(简称:DSP)、专用集成电路(简称:ASIC)、现成可编程门阵列(简称:FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者也可以是任何常规的处理器等。The processor 902 can be a central processing unit (English: Central Processing Unit, CPU for short), and can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), and ready-to-use programmable circuits. Gate array (abbreviation: FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general purpose processor may be a microprocessor or may be any conventional processor or the like.
存储器903可以包括只读存储器和随机存取存储器,并向处理器902提供指令和数据。存储器903的一部分还可以包括非易失性随机存取存储器。 Memory 903 can include read only memory and random access memory and provides instructions and data to processor 902. A portion of the memory 903 may also include a non-volatile random access memory.
收发器904可以包括发射电路、接收电路、功率控制器、解码器及天线。The transceiver 904 can include a transmit circuit, a receive circuit, a power controller, a decoder, and an antenna.
综上所述,本发明实施例提供的技术方案,维持了一个不随时间增长的、固定大小的记录项空间用于存储记录项,根据记录项包含的访问概率选择性地哎陈旧的记录项,解决了过时记录项过多浪费存储资源的问题。In summary, the technical solution provided by the embodiment of the present invention maintains a fixed-size record item space that does not grow with time for storing a record item, and selectively selects an old record item according to the access probability included in the record item. Solved the problem that too many obsolete records are wasting storage resources.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程 和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each of the processes and/or blocks in the flowcharts and/or block diagrams, and the flows in the flowcharts and/or block diagrams can be implemented by computer program instructions. And/or a combination of boxes. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiment of the invention has been described, it will be apparent to those skilled in the < Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the embodiments of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the embodiments of the invention.

Claims (24)

  1. 一种缓存管理方法,其特征在于,包括:A cache management method, comprising:
    确定记录项空间的第一可用空间;Determining the first available space of the record item space;
    在确定的第一可用空间不满足设定条件时,在所述记录项空间中删除存储的至少一条记录项;Deleting the stored at least one record item in the record item space when the determined first available space does not satisfy the set condition;
    其中,删除的至少一条记录项在数据缓存空间中不存在对应的内容数据。The deleted at least one record item does not have corresponding content data in the data cache space.
  2. 如权利要求1所述的方法,其特征在于,确定记录项空间的第一可用空间之前,还包括:The method of claim 1, wherein before determining the first available space of the record item space, the method further comprises:
    接收第一设备的访问请求;Receiving an access request of the first device;
    确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项;Determining that the content data requested by the access request does not have a corresponding record item in the record item space;
    所述设定条件为能创建至少一条记录项,则在所述记录项空间中删除存储的至少一条记录项之后,还包括:The setting condition is that at least one record item can be created, and after the stored at least one record item is deleted in the record item space, the method further includes:
    在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项。In the record item space, a record item corresponding to the content data requested by the access request is created.
  3. 如权利要求1所述的方法,其特征在于,确定记录项空间的第一可用空间之前,还包括:The method of claim 1, wherein before determining the first available space of the record item space, the method further comprises:
    接收第一设备的访问请求;Receiving an access request of the first device;
    确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项;Determining that the content data requested by the access request does not have a corresponding record item in the record item space;
    在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项;In the record item space, creating a record item corresponding to the content data requested by the access request;
    所述设定条件为能创建至少一条记录项。The setting condition is that at least one record item can be created.
  4. 如权利要求3所述的方法,其特征在于,在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项之前,还包括:The method of claim 3, wherein before the creation of the entry corresponding to the content data requested by the access request in the record entry space, the method further comprises:
    确定所述记录项空间的第二可用空间; Determining a second available space of the record item space;
    确定所述第二可用空间满足设定条件。It is determined that the second available space satisfies a set condition.
  5. 如权利要求1-4中任一所述的方法,其特征在于,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率排在后n位的记录项。The method according to any one of claims 1 to 4, wherein the deleted at least one record item is after the access probability is ranked in at least one record item in which the corresponding content data does not exist in the data cache space. N-bit record entry.
  6. 如权利要求1-4中任一项所述的方法,其特征在于,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率最小的记录项。The method according to any one of claims 1 to 4, wherein the deleted at least one record item has a least probability of access in at least one record item in which the corresponding content data does not exist in the data buffer space. Record item.
  7. 如权利要求2-4中任一项所述的方法,其特征在于,所述数据缓存空间中存储的内容数据是长度为固定值的音视频段;The method according to any one of claims 2 to 4, wherein the content data stored in the data buffer space is an audio and video segment having a fixed length;
    所述方法还包括:The method further includes:
    如果所述访问请求所请求的音视频段未被存储在所述数据缓存空间中、且所述访问请求所请求的音视频段的占用空间大于所述数据缓存空间的可用空间、且所述访问请求所请求的音视频段的访问概率大于存储在所述数据缓存空间中访问概率最小的音视频段的访问概率,则向第二设备请求所述访问请求所请求的音视频段,以及使用所述第二设备返回的音视频段替换存储在所述数据缓存空间中访问概率最小的音视频段。If the audio and video segments requested by the access request are not stored in the data cache space, and the occupied space of the audio and video segments requested by the access request is larger than the available space of the data cache space, and the access Requesting, by the second device, the audio and video segment requested by the access request, and the use of the audio and video segment of the requested audio and video segment, and the access probability of the audio and video segment having the smallest access probability stored in the data buffer space The audio and video segments returned by the second device replace the audio and video segments stored in the data buffer space with the least probability of access.
  8. 如权利要求2-4中任一项所述的方法,其特征在于,所述方法还包括:The method of any of claims 2-4, wherein the method further comprises:
    若所述访问请求所请求的内容数据在记录项空间中存在对应的记录项,则更新与所述访问请求所请求的内容数据对应的记录项。If the content data requested by the access request has a corresponding record item in the record item space, the record item corresponding to the content data requested by the access request is updated.
  9. 如权利要求8所述的方法,其特征在于,所述记录项包括以下字段:The method of claim 8 wherein said record entry comprises the following fields:
    上次访问时间,平均访问间隔和访问次数;所述平均访问间隔用于表征访问概率;Last access time, average access interval and number of visits; the average access interval is used to characterize the access probability;
    更新与所述访问请求所请求的内容数据对应的记录项,包括:Updating a record corresponding to the content data requested by the access request, including:
    根据所述访问请求包含的访问时间和设置的遗忘因子,更新与所述访问请求所请求的内容数据对应的记录项中包括的字段;Updating a field included in the record item corresponding to the content data requested by the access request according to the access time included in the access request and the set forgetting factor;
    其中,所述遗忘因子根据设备发起访问请求的时变性定时或不定时地进行更新; The forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request;
    所述设备发起访问请求的时变性,满足下述条件:The time variation of the device initiating the access request satisfies the following conditions:
    Figure PCTCN2015090416-appb-100001
    Figure PCTCN2015090416-appb-100001
    Figure PCTCN2015090416-appb-100002
    or
    Figure PCTCN2015090416-appb-100002
    其中,ΔP表示设备发起访问请求的时变性,Pt(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t时刻被请求的概率,Pt-δ(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t-δ时刻被请求的概率,M表示所述记录项空间中包括的记录项的总数量,N表示所述记录项空间中访问概率排在前N位的记录项的总数量。Where ΔP represents the time variation of the device initiating the access request, and P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t , P t - δ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t-δ, and M represents the record included in the record space The total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
  10. 如权利要求9所述的方法,其特征在于,更新后的遗忘因子满足下述条件:The method of claim 9 wherein the updated forgetting factor satisfies the following conditions:
    a'=updaterate×a+(1-updaterate)×ΔP;a'=update rate ×a+(1-update rate )×ΔP;
    其中,a'表示更新后的遗忘因子,a表示更新前的遗忘因子,updaterate表示预设参数,0<updaterate<1。Where a' indicates the updated forgetting factor, a indicates the forgetting factor before the update, and update rate indicates the preset parameter, 0 <update rate <1.
  11. 如权利要求1-10中任一项所述的方法,其特征在于,所述记录项空间的大小根据设定参数RECORDLIMIT设置;The method according to any one of claims 1 to 10, wherein the size of the record item space is set according to a setting parameter RECORD LIMIT ;
    所述设定参数RECORDLIMIT用于表征所述记录项空间存储的记录项的最大数量与所述数据缓存空间存储的内容数据的最大数量的比值;所述设定参数RECORDLIMIT大于1。The setting parameter RECORD LIMIT is used to characterize a ratio of a maximum number of entries stored in the record space to a maximum number of content data stored in the data cache space; the setting parameter RECORD LIMIT is greater than one.
  12. 如权利要求1-11中任一项所述的方法,其特征在于,所述记录项空间中的记录项以最小堆的结构方式存储,所述最小堆的根节点为所述记录项空间中访问概率最小的记录项。The method according to any one of claims 1 to 11, wherein the record items in the record item space are stored in a minimum heap structure, and the root node of the minimum heap is in the record item space The entry with the least probability of access.
  13. 一种缓存管理装置,其特征在于,包括:A cache management device, comprising:
    处理模块,用于确定记录项空间的第一可用空间;在确定的第一可用空间不满足设定条件时,在所述记录项空间中删除存储的至少一条记录项;其中,删除的至少一条记录项在数据缓存空间中不存在对应的内容数据。 a processing module, configured to determine a first available space of the record item space; delete the stored at least one record item in the record item space when the determined first available space does not satisfy the set condition; wherein at least one of the deleted items The record item does not have corresponding content data in the data cache space.
  14. 如权利要求13所述的装置,其特征在于,所述装置还包括:The device of claim 13 wherein said device further comprises:
    接收模块,用于在所述处理模块确定记录项空间的第一可用空间之前,接收第一设备的访问请求;a receiving module, configured to receive an access request of the first device before the processing module determines the first available space of the record item space;
    所述处理模块还用于,如果确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项,则在所述记录项空间中删除存储的至少一条记录项之后,在所述记录项空间中创建与所述访问请求所请求的内容数据对应的记录项;所述设定条件为能创建至少一条记录项。The processing module is further configured to: after determining that the content data requested by the access request does not have a corresponding record item in the record item space, after deleting the stored at least one record item in the record item space, Creating a record item corresponding to the content data requested by the access request in the record item space; the setting condition is that at least one record item can be created.
  15. 如权利要求13所述的装置,其特征在于,所述装置还包括:The device of claim 13 wherein said device further comprises:
    接收模块,用于在所述处理模块确定记录项空间的第一可用空间之前,接收第一设备的访问请求;a receiving module, configured to receive an access request of the first device before the processing module determines the first available space of the record item space;
    所述处理模块还用于,如果确定所述访问请求所请求的内容数据在记录项空间中不存在对应的记录项,则在确定记录项空间的第一可用空间之前,在所述记录项空间中,创建与所述访问请求所请求的内容数据对应的记录项;所述设定条件为能创建至少一条记录项。The processing module is further configured to: if it is determined that the content data requested by the access request does not have a corresponding record item in the record item space, before determining the first available space of the record item space, in the record item space And creating a record item corresponding to the content data requested by the access request; the setting condition is that at least one record item can be created.
  16. 如权利要求15所述的装置,其特征在于,所述处理模块还用于:The device according to claim 15, wherein the processing module is further configured to:
    在所述记录项空间中创建与所述访问请求所请求的内容数据对应的记录项之前,确定所述记录项空间的第二可用空间;确定所述第二可用空间满足设定条件。Determining a second available space of the record item space before creating a record item corresponding to the content data requested by the access request in the record item space; determining that the second available space satisfies a set condition.
  17. 如权利要求13-16中任一所述的装置,其特征在于,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率排在后n位的记录项。The apparatus according to any one of claims 13-16, wherein the deleted at least one record item is in an access probability after at least one record item in which the corresponding content data does not exist in the data cache space N-bit record entry.
  18. 如权利要求13-16中任一项所述的装置,其特征在于,所述删除的至少一条记录项为在所述数据缓存空间不存在对应的内容数据的至少一条记录项中访问概率最小的记录项。The apparatus according to any one of claims 13 to 16, wherein the deleted at least one record item has a least probability of access in at least one record item in which the corresponding content data does not exist in the data buffer space. Record item.
  19. 如权利要求14-16中任一项所述的装置,其特征在于,所述数据缓存空间中存储的内容数据是长度为固定值的音视频段;The device according to any one of claims 14 to 16, wherein the content data stored in the data buffer space is an audio and video segment having a fixed length;
    所述处理模块还用于: The processing module is further configured to:
    如果所述访问请求所请求的音视频段未被存储在所述数据缓存空间中、且所述访问请求所请求的音视频段的占用空间大于所述数据缓存空间的可用空间、且所述访问请求所请求的音视频段的访问概率大于存储在所述数据缓存空间中访问概率最小的音视频段的访问概率,则向第二设备请求所述访问请求所请求的音视频段,以及使用所述第二设备返回的音视频段替换存储在所述数据缓存空间中访问概率最小的音视频段。If the audio and video segments requested by the access request are not stored in the data cache space, and the occupied space of the audio and video segments requested by the access request is larger than the available space of the data cache space, and the access Requesting, by the second device, the audio and video segment requested by the access request, and the use of the audio and video segment of the requested audio and video segment, and the access probability of the audio and video segment having the smallest access probability stored in the data buffer space The audio and video segments returned by the second device replace the audio and video segments stored in the data buffer space with the least probability of access.
  20. 如权利要求14-16中任一项所述的装置,其特征在于,所述处理模块还用于:The apparatus according to any one of claims 14-16, wherein the processing module is further configured to:
    若所述访问请求所请求的内容数据在记录项空间中存在对应的记录项,则更新与所述访问请求所请求的内容数据对应的记录项。If the content data requested by the access request has a corresponding record item in the record item space, the record item corresponding to the content data requested by the access request is updated.
  21. 如权利要求20所述的装置,其特征在于,所述记录项包括以下字段:The apparatus of claim 20 wherein said entry comprises the following fields:
    上次访问时间,平均访问间隔和访问次数;所述平均访问间隔用于表征访问概率;Last access time, average access interval and number of visits; the average access interval is used to characterize the access probability;
    所述处理模块在更新与所述访问请求所请求的内容数据对应的记录项时,具体用于:When the processing module updates the record corresponding to the content data requested by the access request, the processing module is specifically configured to:
    根据所述访问请求包含的访问时间和设置的遗忘因子,更新与所述访问请求所请求的内容数据对应的记录项中包括的字段;Updating a field included in the record item corresponding to the content data requested by the access request according to the access time included in the access request and the set forgetting factor;
    其中,所述遗忘因子根据设备发起访问请求的时变性定时或不定时地进行更新;The forgetting factor is updated periodically or irregularly according to the time-varying time when the device initiates the access request;
    所述设备发起访问请求的时变性,满足下述条件:The time variation of the device initiating the access request satisfies the following conditions:
    Figure PCTCN2015090416-appb-100003
    Figure PCTCN2015090416-appb-100003
    Figure PCTCN2015090416-appb-100004
    or
    Figure PCTCN2015090416-appb-100004
    其中,ΔP表示设备发起访问请求的时变性,Pt(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数据在t时刻被请求的概率,Pt-δ(i)表示在所述记录项空间中访问概率排在第i位的记录项所对应的内容数 据在t-δ时刻被请求的概率,M表示所述记录项空间中包括的记录项的总数量,N表示所述记录项空间中访问概率排在前N位的记录项的总数量。Where ΔP represents the time variation of the device initiating the access request, and P t (i) represents the probability that the content data corresponding to the record of the access probability ranked in the ith bit in the record item space is requested at time t , P t - δ (i) represents the probability that the content data corresponding to the entry of the i-th bit in the record item space is requested at time t-δ, and M represents the record included in the record space The total number of N, N represents the total number of entries in the record item space in which the access probability ranks in the first N bits.
  22. 如权利要求21所述的装置,其特征在于,更新后的遗忘因子满足下述条件:The apparatus according to claim 21, wherein the updated forgetting factor satisfies the following conditions:
    a'=updaterate×a+(1-updaterate)×ΔP;a'=update rate ×a+(1-update rate )×ΔP;
    其中,a'表示更新后的遗忘因子,a表示更新前的遗忘因子,updaterate表示预设参数,0<updaterate<1。Where a' indicates the updated forgetting factor, a indicates the forgetting factor before the update, and update rate indicates the preset parameter, 0 <update rate <1.
  23. 如权利要求13-22中任一项所述的装置,其特征在于,所述记录项空间的大小根据设定参数RECORDLIMIT设置;The apparatus according to any one of claims 13 to 22, wherein the size of the record item space is set according to a setting parameter RECORD LIMIT ;
    所述设定参数RECORDLIMIT用于表征所述记录项空间存储的记录项的最大数量与所述数据缓存空间存储的内容数据的最大数量的比值;所述设定参数RECORDLIMIT大于1。The setting parameter RECORD LIMIT is used to characterize a ratio of a maximum number of entries stored in the record space to a maximum number of content data stored in the data cache space; the setting parameter RECORD LIMIT is greater than one.
  24. 如权利要求13-23中任一项所述的装置,其特征在于,所述记录项空间中的记录项以最小堆的结构方式存储,所述最小堆的根节点为所述记录项空间中访问概率最小的记录项。 The apparatus according to any one of claims 13 to 23, wherein the record items in the record item space are stored in a minimum heap structure, and the root node of the minimum heap is in the record item space The entry with the least probability of access.
PCT/CN2015/090416 2015-09-23 2015-09-23 Cache management method and apparatus WO2017049488A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580083252.8A CN108351873B (en) 2015-09-23 2015-09-23 Cache management method and device
PCT/CN2015/090416 WO2017049488A1 (en) 2015-09-23 2015-09-23 Cache management method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/090416 WO2017049488A1 (en) 2015-09-23 2015-09-23 Cache management method and apparatus

Publications (1)

Publication Number Publication Date
WO2017049488A1 true WO2017049488A1 (en) 2017-03-30

Family

ID=58385578

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/090416 WO2017049488A1 (en) 2015-09-23 2015-09-23 Cache management method and apparatus

Country Status (2)

Country Link
CN (1) CN108351873B (en)
WO (1) WO2017049488A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112954383B (en) * 2021-03-02 2023-05-16 山东省计算中心(国家超级计算济南中心) Video on demand method, video on demand proxy server, base station and storage medium
CN114900732B (en) * 2022-04-25 2024-01-12 北京奇艺世纪科技有限公司 Video caching method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105800A (en) * 2007-07-04 2008-01-16 深圳市中兴移动技术有限公司 High capacity data record storage method for embedded system
CN101510332A (en) * 2008-12-25 2009-08-19 北京握奇数据系统有限公司 Method and apparatus for managing memory space of smart card
CN101795272A (en) * 2010-01-22 2010-08-04 联想网御科技(北京)有限公司 Illegal website filtering method and device
CN102006368A (en) * 2010-12-03 2011-04-06 重庆新媒农信科技有限公司 Streaming media audio file play method based on mobile terminal memory card cache technology
US8484097B1 (en) * 2011-03-31 2013-07-09 Amazon Technologies, Inc. Method, system, and computer readable medium for selection of catalog items for inclusion on a network page

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557331B (en) * 2008-04-07 2012-02-15 华为技术有限公司 Method and system for processing content index and content routing function and content distributing control entity
US20100161537A1 (en) * 2008-12-23 2010-06-24 At&T Intellectual Property I, L.P. System and Method for Detecting Email Spammers
CN101916302B (en) * 2010-09-01 2012-11-21 中国地质大学(武汉) Three-dimensional spatial data adaptive cache management method and system based on Hash table
CN102479159A (en) * 2010-11-25 2012-05-30 大唐移动通信设备有限公司 Caching method and equipment of multi-process HARQ (Hybrid Automatic Repeat Request) data
WO2011157120A2 (en) * 2011-05-31 2011-12-22 华为技术有限公司 Access control method, device and system for node b cache
CN104253855B (en) * 2014-08-07 2018-04-24 哈尔滨工程大学 Classification popularity buffer replacing method based on classifying content in a kind of content oriented central site network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105800A (en) * 2007-07-04 2008-01-16 深圳市中兴移动技术有限公司 High capacity data record storage method for embedded system
CN101510332A (en) * 2008-12-25 2009-08-19 北京握奇数据系统有限公司 Method and apparatus for managing memory space of smart card
CN101795272A (en) * 2010-01-22 2010-08-04 联想网御科技(北京)有限公司 Illegal website filtering method and device
CN102006368A (en) * 2010-12-03 2011-04-06 重庆新媒农信科技有限公司 Streaming media audio file play method based on mobile terminal memory card cache technology
US8484097B1 (en) * 2011-03-31 2013-07-09 Amazon Technologies, Inc. Method, system, and computer readable medium for selection of catalog items for inclusion on a network page

Also Published As

Publication number Publication date
CN108351873A (en) 2018-07-31
CN108351873B (en) 2021-05-11

Similar Documents

Publication Publication Date Title
US11665259B2 (en) System and method for improvements to a content delivery network
US20140258375A1 (en) System and method for large object cache management in a network
US10862992B2 (en) Resource cache management method and system and apparatus
US8812791B2 (en) System and method of selectively caching information based on the interarrival time of requests for the same information
CN107249035B (en) Shared repeated data storage and reading method with dynamically variable levels
CN106464669B (en) Intelligent file prefetching based on access patterns
WO2005045708A1 (en) Method for prioritizing segments of multimedia content in a proxy cache
WO2011143946A1 (en) Method and system for managing multilevel caches of edge server in cdn
CN102307234A (en) Resource retrieval method based on mobile terminal
CN114697683A (en) Intelligent scheduling method, equipment and computer program product for streaming media file
WO2017049488A1 (en) Cache management method and apparatus
CN112631504A (en) Method and device for realizing local cache by using off-heap memory
TW201445987A (en) Transmitting information based on reading speed
CN102609508A (en) High-speed access method of files in network storage
WO2023165543A1 (en) Shared cache management method and apparatus, and storage medium
EP3207457B1 (en) Hierarchical caching for online media
US9871732B2 (en) Dynamic flow control in multicast systems
KR101690944B1 (en) Method and apparatus for managing distributed cache in consideration of load distribution in heterogeneous computing environment
US20130176851A1 (en) Dynamic flow control in multicast systems
US10187488B2 (en) Methods for managing replacement in a distributed cache environment and devices thereof
CN114025019A (en) CDN cache implementation method and device based on ARC algorithm and computer equipment
CN110795461A (en) iOS application-based data caching method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15904375

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15904375

Country of ref document: EP

Kind code of ref document: A1