A cache optimization method based on file freshness and content recommendation
By introducing file freshness and content recommendation mechanisms in cellular D2D communication networks and optimizing cache decisions, the problems of high system energy consumption and low cache hit rate in traditional caching strategies are solved, and efficient file cache management is achieved.
Patent Information
- Application Number
- CN202411450905.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-10-17
AI Technical Summary
Base stations in traditional cellular networks are under tremendous pressure, cached files become outdated and affect user experience, and existing caching strategies cannot effectively reduce system energy consumption and improve cache hit rates.
A file freshness and content recommendation mechanism is introduced into the cellular D2D communication network. By constructing a user interest matrix and information age threshold, the caching decision is optimized, and D2D communication and BS collaboratively cache files to recommend content that users are interested in and has high freshness.
While maintaining file freshness, it improves cache hit rate and reduces system energy consumption, thereby improving system performance.
Smart Images

Figure CN119420808B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a cache optimization method based on file freshness and content recommendation. Background Art
[0002] The explosive growth of mobile data traffic in wireless networks, coupled with users' demand for quality of service (QoS), has put enormous pressure on base stations (BSs) in traditional cellular networks. Compared to storing files directly in the BS, caching content objects on edge devices allows some user requests to be served locally, reducing transmission latency and lowering system energy consumption.
[0003] Although content caching at the network edge can reduce the cost of network traffic transmission and communication energy consumption, there is also the problem of cached files becoming outdated, which affects the user experience. Summary of the Invention
[0004] On the basis of maintaining file freshness, the present invention introduces content recommendation mechanism into cache decision, with the goal of reducing system energy consumption and improving cache hit rate, and proposes a cache optimization method based on file freshness and content recommendation.
[0005] The present invention adopts the following technical solutions:
[0006] A cache optimization method based on file freshness and content recommendation, comprising:
[0007] Construct a cellular D2D communication network model with U users and a BS. The BS is equipped with a file library of size F, and the size of each file is x. j ,The cache capacity of each user device is M, and there are T time slots of equal length in each transmission frame. The user can obtain the requested file within one time slot, and the BS file library always caches the latest file;
[0008] The BS collects file requests initiated by users before each time slot and randomly responds to the requests of R users. When user i requests file j and is responded to by the BS, it first confirms whether there is file j that meets the information age threshold among the users within the D2D communication range of user i. If so, file j is obtained from the users within the D2D communication range of user i for caching. If not, the recommendation algorithm is executed to select a suitable file from the files cached by users within the D2D communication range of user i and recommend it to user i. If user i refuses to accept the recommended file, the requested file j is obtained from the BS for caching.
[0009] A further improvement is that if there are multiple files j that meet the information age threshold requirement among users within the D2D communication range of user i, the file j with the smallest information age is selected for caching.
[0010] A further improvement is that the recommendation algorithm includes:
[0011] Calculate the user interest matrix I based on the file topic according to the user's historical request records U×F Then, the cosine similarity between users is calculated based on the user interest matrix. Among the users within the D2D communication range of user i, user k with the highest interest similarity to user i is found. At most N files that user k is most interested in and meet the information age threshold requirements are found in the files cached by user k and recommended to user i. If user k does not have files that meet the requirements, the user with the second highest interest similarity to user i is found. At most N files that user k is most interested in and meet the information age threshold requirements are found in the files cached by the second highest user and recommended to user i, and so on.
[0012] A further improvement is to calculate the user interest matrix I based on the file topic according to the user's historical request records U×F The methods include:
[0013] Assume that all the documents in the document library cover Y topics in total, and use the set Ω={ω1,ω2,...ω k ,...ω Y} indicates that the subject ω k The attribute function between and file f is defined as:
[0014]
[0015] use Represents user u's response to the document topic ω k The preference of , which is formulated using the concept of mutual information, is expressed as:
[0016]
[0017] Among them, Z(ω k ) represents the subject ω k The collection of all files, Φ U represents the historical request records of user u, P(Z(ω k )|Φ U ) represents the theme ω k The probability of appearing in the historical request records of user u, and P(Z(ω k )) represents the theme ω k The probability of appearing in the entire document library, therefore, user u’s interest in document f is defined as:
[0018]
[0019] Among them, user u’s interest in file f is η u,f ∈[-1,1],η u,f The closer the value is to -1, the less interested the user is, and the closer it is to 1, the more interested the user is.
[0020] Finally, according to user u's interest in file f, u,f , get the user interest matrix I based on the file topic U×F .
[0021] A further improvement is that the information age of the file at the BS is set to 0, and the information age is gradually increased as the file spreads in the network, using δ ij (t) represents the information age of file j cached by user i in time slot t, and assuming that all requested content is delivered within one time slot, if file j cached at user i is not updated, then when the time slot increases by 1, the age of file j cached at user i will increase by 1; when user i caches a new version of file j, if file j is obtained from the BS, the information age of file j cached at user i will drop to 1; if file j is obtained from user k within the D2D communication range, the information age of file j cached at user i will drop to the information age of file j cached at user k; if file j is recommended by user k within the D2D communication range, the information age of file j cached at user i will drop to the information age of file j recommended by user k. The information age function of file j cached by user i is:
[0022]
[0023] Assume binary array and Indicates the source of cached file j at user i in time slot t. If the file j requested by user i is obtained from a user within the D2D communication range, then If the file j requested by user i is obtained from BS, then If the file j requested by user i is recommended by a user within the D2D communication range, then
[0024] A further improvement is to use the binary variable a ij (t) is used to record whether the request of user i to cache file j in time slot t is served. If it is successfully served, then a ij (t)=1, otherwise, a ij (t) = 0; using binary variable b ij (t) to record whether user i has cached file j in time slot t. If it has, then bij (t)=1, otherwise, b ij (t) = 0, when the cached file j at user i is unloaded at time slot t, b ij (t) = 0, the total size of the user's cached files cannot exceed the user's maximum cache capacity M, then:
[0025]
[0026] in,
[0027]
[0028] in,
[0029] A further improvement is that, assuming that the user set within the D2D communication range of user i is represented by D i To express it, the minimum age of file j cached by user i among the users in the D2D communication range at time slot t is The minimum age of file j obtained by user i through recommendation within the D2D communication range at time slot t is According to formula (4), we can get:
[0030]
[0031] Assume that the age of the file information obtained by the user cannot exceed an information age threshold δ th ,Right now:
[0032]
[0033] This ensures that the files obtained by users are not outdated and meet the information age threshold requirements.
[0034] A further improvement is to assume that the binary variable c ij (t) indicates whether there is a file j that meets the cache request in the D2D communication range of user i in time slot t. If yes, c ij (t)=1, otherwise c ij (t) = 0, c ij (t) is expressed as:
[0035]
[0036] in,
[0037] When user i’s request for cached file j is served in time slot t, i.e., a ij (t) = 1, then the file can be obtained from users or BSs within the D2D communication range or by accepting recommended files, so:
[0038]
[0039] in,
[0040] A further improvement is that the method further includes: when user i receives file j, if there is an old version of file j in the cache of user i, the old version of file j is directly replaced with the new version of file j; if the cache space of user i is sufficient, when caching the new file j, it is directly cached; if the cache space of user i is full, a content uninstallation operation is performed, following the principle of uninstalling outdated old files first.
[0041] A further improvement is that the method further includes analyzing the system energy consumption: assuming that the BS and the user each have a fixed power P B and P D To transfer files, the user recommends that the transmission power of the file be P R , assuming that large-scale fading is considered in the communication process, SNR represents the signal-to-noise ratio, then the energy consumption of file j transmission is expressed as:
[0042]
[0043] Among them, P x is the transmission power, x j is the size of file j, B is the system bandwidth, SNR = P x ψ -α / σ 2 ,ψ represents the communication distance, α is the path loss index, σ 2 is the power average of Gaussian white noise;
[0044] Assume that the energy consumption from BS, users within D2D communication range and files transmitted through recommendation are E B ,E D and E R , then the energy consumption of the system in a single time slot is expressed as:
[0045]
[0046] Among them, 1≤t≤T.
[0047] The beneficial effects of the present invention are:
[0048] The present invention proposes a cache optimization method based on file freshness and content recommendation, which can improve the cache hit rate and reduce system energy consumption while maintaining file freshness. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Schematic diagram of the cellular D2D communication network model system in the present invention;
[0050] Figure 2 This is a schematic diagram of the information age evolution process of the user cache file of the present invention;
[0051] Figure 3 Flowchart of the algorithm implementation method for the cache decision process;
[0052] Figure 4 Flowchart of algorithm implementation method for file recommendation strategy;
[0053] Figure 5 is the relationship between the average information age and the number of documents;
[0054] Figure 6 This is a graph showing the relationship between cache hit rate and information age threshold;
[0055] Figure 7 This is a graph showing the relationship between cache hit rate and the number of files;
[0056] Figure 8 A graph showing the relationship between system energy consumption and user cache capacity;
[0057] Figure 9 is the relationship diagram between system energy consumption and information age threshold;
[0058] Figure 10 Figure 2 is a graph showing the relationship between system energy consumption and the number of files. DETAILED DESCRIPTION
[0059] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0060] Please refer to the attached Figure 1 -Attached Figure 10 , an embodiment of the present invention proposes a cache optimization method based on file freshness and content recommendation, comprising:
[0061] like Figure 1 As shown, a cellular D2D communication network model with U users and a BS is constructed. The BS is equipped with a file library of size F, and the size of each file is x jThe cache capacity of each user device is M. Assuming that users in the cell are uniformly distributed, each transmission frame has T time slots of equal length, and slot-based scheduling is implemented. Users can obtain the requested file within a time slot, and the BS file library always caches the latest file.
[0062] It can be understood that, assuming that OFDMA (Orthogonal Frequency Division Multiple Access) is used in each time slot in the network, before the start of each time slot, the BS collects file requests from all users and can serve R user requests at the same time. Based on the user location and the unique identifier and file freshness of the file cached in each user device, the BS determines the access route of the file requester, allocates orthogonal channel resources to them, and returns a request failure signal to the unserved users. The user requests are divided into new files that are not currently cached and new versions of currently cached files.
[0063] In the existing caching strategy research, most of the studied user file request models are Zipf distribution models, which cannot accurately reflect the user's actual request content needs. Therefore, the present invention predicts user content preferences by analyzing real data sets, thereby establishing a user request model to more realistically simulate the caching network scenario.
[0064] To this end, the present invention constructs a file request model based on user preference prediction. Specifically, in order to obtain the probability of a user requesting a file, the present invention obtains the user's ratings of movies as the user's historical request records for files by analyzing the MovieLens1M dataset, and forms a rating matrix S with the user's ratings of movies. The value of the rating matrix S is s u,f ∈{0,1,2,3,4,5} represents the degree of user u’s preference for file f. u,f The larger the value, the more user u likes file f, s u,f =0 means user u has not rated file f.
[0065] In real life, the number of files in the database is extremely large, and it is impossible for users to rate all of them, which means that it is relatively sparse and cannot accurately reflect user preferences.
[0066] Therefore, the present invention adopts a collaborative filtering algorithm to predict the user's preference for unrated files: First, the correlation coefficient μ between the scores of user i and user j on file f is calculated based on the Pearson correlation coefficient. i,j :
[0067]
[0068] Among them, s i,frepresents the score of user i on file f, s j,f represents the rating of user j on file f, represents the average rating of all files by user i, represents the average rating of user j for all documents.
[0069] Since formula (14) does not take into account the number of rated files, when the number of files rated together is small, the similarity between the two users calculated will be very high, resulting in a low reliability of the obtained user similarity. Therefore, it is necessary to perform maximum and minimum normalization correction on the obtained correlation coefficient, which is expressed as follows:
[0070]
[0071] μ i,j =θμ i,j (16)
[0072] where Q i,j represents the number of files that user i and user j have rated together, and They represent the minimum and maximum number of files rated by user i and other users respectively.
[0073] Set a threshold μ th Used to filter users who meet the threshold requirements. i,j >μ th When user i and user j have similar rating behaviors, they are put into user set U is , that is, j∈U is , according to the obtained user set U is Predictions for files that user i has not rated are expressed as:
[0074]
[0075] Then, the file score matrix obtained by predicting the supplementary score is used to construct the request probability p of user u for file f. u,f :
[0076] First, the value of the scoring matrix is normalized to the maximum and minimum to obtain To represent the difference in user ratings for different files, it is defined as:
[0077]
[0078] in, and Represent the lowest and highest scores of the user in the file library respectively, then the probability of user u requesting file f is expressed as:
[0079]
[0080] Finally, the popularity of the file is obtained based on the user's preferences for the file:
[0081]
[0082] The method of the present invention is described in more detail below:
[0083] The BS collects file requests initiated by users before each time slot and randomly responds to the requests of R users. When user i requests file j and is responded to by the BS, it first confirms whether there is file j that meets the information age threshold among the users within the D2D communication range of user i. If so, file j is obtained from the users within the D2D communication range of user i for caching. If not, the recommendation algorithm is executed to select a suitable file from the files cached by users within the D2D communication range of user i and recommend it to user i. If user i refuses to accept the recommended file, the requested file j is obtained from the BS for caching.
[0084] In this embodiment, further, if there are multiple files j meeting the information age threshold requirement among users within the D2D communication range of user i, the file j with the smallest information age is selected for caching to meet the information age requirement to the greatest extent.
[0085] Furthermore, the recommendation algorithm includes:
[0086] Calculate the user interest matrix I based on the file topic according to the user's historical request records U×F Then, the cosine similarity between users is calculated based on the user interest matrix. Among the users in the D2D communication range of user i, find user k with the highest degree of similarity to user i. Find at most N files in the files cached by user k that user k is most interested in and that meet the information age threshold requirement and recommend them to user i. If user k does not have files that meet the requirements, find the user with the second highest degree of similarity to user i. Find at most N files in the files cached by the second highest user that user k is most interested in and that meet the information age threshold requirement and recommend them to user i. And so on. User i selects a file based on the degree of interest and recommends it with probability p. r Accept the file.
[0087] Specifically, the user interest matrix I based on the file topic is calculated according to the user's historical request records U×F The methods include:
[0088] Assume that all the documents in the document library cover Y topics in total, and use the set Ω={ω1,ω2,...ω k ,...ω Y} indicates that when content is recommended to users, users are more likely to accept content related to topics that interest them.
[0089] For example, if the user is most interested in content related to sports or games, then when the user searches for content, the probability of him clicking on the recommended content related to the topic is very high, while the probability of recommending travel or opera content to the user being clicked is very small.
[0090] Theme k The attribute function between and file f is defined as:
[0091]
[0092] use Represents user u's response to the document topic ω k The preference of , which is formulated using the concept of mutual information, is expressed as:
[0093]
[0094] Among them, Z(ω k ) represents the subject ω k The collection of all files, Φ U represents the historical request records of user u, P(Z(ω k )|Φ U ) represents the theme ω k The probability of appearing in the historical request records of user u, and P(Z(ω k )) represents the theme ω k The probability of appearing in the entire document library, therefore, user u’s interest in document f is defined as:
[0095]
[0096] Among them, user u’s interest in file f is η u,f ∈[-1,1],η u,f The closer the value is to -1, the less interested the user is, and the closer it is to 1, the more interested the user is.
[0097] When users accept recommended files, priority is given to files that are of greatest interest and meet the information age threshold requirements.
[0098] Finally, according to user u's interest in file f, u,f , get the user interest matrix I based on the file topic U×F .
[0099] In the embodiment of the present invention, the age of information (AoI) of a file is used as an indicator for evaluating the freshness of a file. Figure 2As shown in , it is defined as the time from the latest file generation to the present, that is, the information age of the file at the BS is set to 0, and the information age gradually increases as the file spreads in the network.
[0100] Use δ ij (t) represents the information age of file j cached by user i in time slot t, and assuming that all requested content is delivered within one time slot, if file j cached at user i is not updated, then when the time slot increases by 1, the age of file j cached at user i will increase by 1; when user i caches a new version of file j, the file information age will drop to a smaller value. If file j is obtained from the BS, the information age of file j cached at user i will drop to 1. If file j is obtained from user k within the D2D communication range, the information age of file j cached at user i will drop to the information age of file j cached at user k. If file j is recommended by user k within the D2D communication range, the information age of file j cached at user i will drop to the information age of file j recommended by user k. The information age function of file j cached by user i is:
[0101]
[0102] Assume binary array and Indicates the source of cached file j at user i in time slot t. If the file j requested by user i is obtained from a user within the D2D communication range, then If the file j requested by user i is obtained from BS, then If the file j requested by user i is recommended by a user within the D2D communication range, then
[0103] If user k does not have cached file j at time slot t, then δ kj (t)=0.
[0104] In the present invention, the cache decision process is constrained, including:
[0105] (1) Cache capacity constraints:
[0106] Using binary variable a ij (t) is used to record whether the request of user i to cache file j in time slot t is served. If it is successfully served, then a ij (t)=1, otherwise, a ij (t) = 0; using binary variable b ij (t) to record whether user i has cached file j in time slot t. If it has, then b ij (t)=1, otherwise, b ij(t) = 0, when the cached file j at user i is unloaded at time slot t, b ij (t) = 0, the total size of the user's cached files cannot exceed the user's maximum cache capacity M, then:
[0107]
[0108] in,
[0109]
[0110] in,
[0111] (2) Age of Information (AoI) Constraints:
[0112] Assume that the user set within the D2D communication range of user i is represented by D i To express it, the minimum age of file j cached by user i among the users in the D2D communication range at time slot t is The minimum age of file j obtained by user i through recommendation within the D2D communication range at time slot t is According to formula (4), we can get:
[0113]
[0114] Assume that the age of the file information obtained by the user cannot exceed an information age threshold δ th ,Right now:
[0115]
[0116] This ensures that the files obtained by users are not outdated and meet the information age threshold requirements.
[0117] (3) File access constraints:
[0118] Assume that the binary variable c ij (t) indicates whether there is a file j that meets the cache request in the D2D communication range of user i in time slot t. If yes, c ij (t)=1, otherwise c ij (t)=0.
[0119] Whether the users within the D2D communication range can provide the requested file depends on the type of file requested. When a user requests a new file, it depends on whether the users within the D2D communication range contain the requested file. When a user requests a new version, it depends on whether the users within the D2D communication range contain the updated version of the requester's cached file. ij (t) is expressed as:
[0120]
[0121] in,
[0122] When user i’s request for cached file j is served in time slot t, i.e., a ij (t) = 1, then the file can be obtained from users or BSs within the D2D communication range or by accepting recommended files, so:
[0123]
[0124] in,
[0125] In this embodiment, the method further includes: when user i receives file j, if there is an old version of file j in the cache of user i, the old version of file j is directly replaced with the new version of file j; if the cache space of user i is sufficient, when caching the new file j, it is directly cached; if the cache space of user i is full, a content uninstallation operation is performed, following the principle of uninstalling outdated old files first.
[0126] In this embodiment, the method further includes analyzing the system energy consumption: assuming that the BS and the user each use a fixed power P B and P D To transfer files, the user recommends that the transmission power of the file be P R , assuming that large-scale fading is considered in the communication process, SNR represents the signal-to-noise ratio, then the energy consumption of file j transmission is expressed as:
[0127]
[0128] Among them, P x is the transmission power, x j is the size of file j, B is the system bandwidth, SNR = P x ψ -α / σ 2 ,ψ represents the communication distance, α is the path loss index, σ 2 is the average power of Gaussian white noise.
[0129] Assume that the energy consumption from BS, users within D2D communication range and files transmitted through recommendation are E B ,E D and E R , then the energy consumption of the system in a single time slot is expressed as:
[0130]
[0131] Among them, 1≤t≤T.
[0132] The following simulation and analysis are performed on a cache optimization method based on file freshness and content recommendation proposed in an embodiment of the present invention:
[0133] The present invention simulates the relationship between average information age, system energy consumption, cache hit rate and the number of files, cache capacity and age threshold to evaluate the cache optimization method based on file freshness and content recommendation proposed in the present invention.
[0134] This paper compares the proposed cache optimization method (Our Proposed Strategy) with the following two file access strategies:
[0135] Content-oriented strategy: When a user sends a request to the BS and the BS responds, the requested content, whether it is a new file or a new version of the file, can be obtained from neighboring users or BSs.
[0136] Version-oriented strategy: After a user sends a request and receives a response, if the request is for a new version of a file, it is only obtained from the BS. If the request is for a new file, it can be obtained from neighboring users or BSs.
[0137] The data used to calculate user preferences in the present invention comes from the MovieLens1M dataset, and the specific parameter settings of the simulation are shown in Table 1.
[0138] Parameters Value BS radius:RB 500m D2D coverage radius:RD 150m Total number of time slots:T 500 The maximum number of orthogonal subcarriers:R 80 <![CDATA[The transmission power of BS:P b ]]> 10w <![CDATA[The transmission power of D2D User:P d ]]> 0.5w <![CDATA[The transmission power of Recommendation:P r ]]> 1w The number of files:F 200 The number of users: 100 Size of cache on a user:M 20 <![CDATA[File size:x j ]]> 1Mbits <![CDATA[AoI threshold:δ th ]]> 15 System bandwidth:B 10MHz Path loss exponent:α 2 <![CDATA[Average Gaussian white noise power:σ 2 ]]> 0.0001
[0139] Table 1
[0140] like Figure 5 As shown in the figure, as the number of files increases, the average information age of files for the three strategies shows a downward trend. This is because the repetition rate of files requested by users in each time slot decreases as the number of files increases, and the proportion of new file requests increases. Therefore, users will obtain new files with high freshness more frequently and continuously discard unpopular and outdated files in the cache device.
[0141] like Figure 6 As shown, the cache hit rates of all three strategies increase as the information age threshold increases. This is because as the information age threshold increases, the number of files in the system that meet the information age requirement of the user's requested files increases, and the system's rate of obtaining the requested files within the D2D communication range increases, leading to a continuous increase in the cache hit rate. The strategy of the present invention performs best because when the user cannot find the requested file within the D2D communication range, the recommendation algorithm recommends content similar to the requested file and of interest to the user, further improving the cache hit rate.
[0142] like Figure 7 As shown, the cache hit rates of all three strategies decrease as the number of files increases. This is because as the number of files in the network increases, the repetition rate of files requested by users decreases, and the probability that users within the D2D communication range have the same file cached decreases, resulting in a decrease in the cache hit rate. The strategy of the present invention stabilizes this downward trend as the number of files increases. This is because if a user's requested file is not within the D2D communication range, content is first recommended to the user. As the number of files increases, the recommendation algorithm works harder, and the cache hit rate stabilizes, preventing it from continuing to decline.
[0143] like Figure 8 As shown in the figure, as cache capacity increases, the system energy consumption of content-based and version-based strategies increases. This is because higher cache capacity leaves more outdated files in the user's memory, and to meet the age constraint, more files are sourced from the BS. The system energy consumption of the strategy of the present invention tends to be stable and much lower than that of the other two strategies. This is because the recommendation algorithm recommends similar files that meet the information age requirement to the user, eliminating the need for frequent file updates from the BS, thus significantly reducing system energy consumption.
[0144] like Figure 9 As shown in the figure, as the information age threshold increases, the system energy consumption of the three strategies all show a downward trend. This is because the increase in the information age threshold indicates that the user's requirements for file freshness are reduced, and the probability that the file requested by the user can be obtained nearby becomes greater, thereby reducing the system energy consumption. Among them, the strategy of the present invention performs best. The application of the recommendation algorithm makes it unnecessary for users to frequently obtain files from the BS even if they cannot obtain files nearby.
[0145] like Figure 10 As shown, as the number of files increases, the system energy consumption of the content-based and version-based strategies increases. This is because as the number of files increases, the repetition rate of user requests decreases, the proportion of user-requested files retrieved from the BS increases, and system energy consumption increases. The system energy consumption of the strategy of the present invention does not change with the number of files and is much lower than that of the other two strategies. This is because the recommendation algorithm allows users to obtain files similar to the requested file and of their interest from surrounding users, eliminating the need for frequent BS access, significantly reducing system energy consumption.
[0146] The cache optimization method based on file freshness and content recommendation proposed in the present invention can improve the cache hit rate and reduce system energy consumption while maintaining file freshness. Simulation experiments show that in terms of file freshness, the strategy of the present invention improves the performance of the content-based strategy by 29.5% and the version-based strategy by 29.8%. In terms of cache hit rate, the strategy of the present invention improves the performance of the content-based strategy by 17.4% and the version-based strategy by 58.1%. In terms of system energy consumption, the strategy of the present invention improves the performance of the content-based strategy by 67.6% and the version-based strategy by 74.3%. It can be seen that the cache strategy proposed by the present invention, which comprehensively considers cache decisions, content recommendations, user preferences and file freshness, significantly improves the performance of the system.
[0147] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.
Claims
1. A cache optimization method based on file freshness and content recommendation, characterized in that: include: Construct a cellular D2D communication network model with U users and a BS. The BS is equipped with a file library of size F, and the size of each file is x. j ,The cache capacity of each user device is M, and there are T time slots of equal length in each transmission frame. The user can obtain the requested file within one time slot, and the BS file library always caches the latest file; Before each time slot, the BS collects file requests initiated by users and randomly responds to R user requests. When user i requests file j and is responded to by the BS, it first confirms whether there is file j that meets the information age threshold among the users within the D2D communication range of user i. If so, file j is obtained from the users within the D2D communication range of user i and cached. If not, a recommendation algorithm is executed to select a suitable file from the cached files of users within the D2D communication range of user i and recommend it to user i. If user i refuses to accept the recommended file, the requested file j is obtained from the BS and cached. The recommendation algorithm includes: calculating the user interest matrix I based on the file theme according to the user's historical request records. U×F Then, the cosine similarity between users is calculated based on the user interest matrix. Among the users within the D2D communication range of user i, user k with the highest interest similarity to user i is found. At most N files that user k is most interested in and meet the information age threshold requirements are found in the files cached by user k and recommended to user i. If user k does not have files that meet the requirements, the user with the second highest interest similarity to user i is found. At most N files that user k is most interested in and meet the information age threshold requirements are found in the files cached by the second highest user and recommended to user i, and so on.
2. A cache optimization method based on file freshness and content recommendation according to claim 1, characterized in that: If there are multiple files j that meet the information age threshold requirement among users within the D2D communication range of user i, the file j with the smallest information age is selected for caching.
3. The cache optimization method based on file freshness and content recommendation according to claim 1, characterized in that: Calculate the user interest matrix I based on the file topic according to the user's historical request records U×F The methods include: Assume that all the documents in the document library cover Y topics in total, and use the set Ω={ω1,ω2,...ω k ,...ω Y } indicates that the subject ω k The attribute function between and file f is defined as: use Represents user u's response to the document topic ω k The preference of , which is formulated using the concept of mutual information, is expressed as: Among them, Z(ω k ) represents the subject ω k The collection of all files, Φ U represents the historical request records of user u, P(Z(ω k )|Φ U ) represents the theme ω k The probability of appearing in the historical request records of user u, and P(Z(ω k )) represents the theme ω k The probability of appearing in the entire document library, therefore, user u’s interest in document f is defined as: Among them, user u’s interest in file f is η u,f ∈[-1,1],η u,f The closer the value is to -1, the less interested the user is, and the closer it is to 1, the more interested the user is. Finally, according to user u's interest in file f, u,f , get the user interest matrix I based on the file topic U×F .
4. A cache optimization method based on file freshness and content recommendation according to any one of claims 1 to 3, characterized in that: The information age of the file at the BS is set to 0, and the information age gradually increases as the file spreads in the network, using δ ij (t) represents the information age of file j cached by user i in time slot t, and assuming that all requested content is delivered within one time slot, if file j cached at user i is not updated, then when the time slot increases by 1, the age of file j cached at user i will increase by 1; when user i caches a new version of file j, if file j is obtained from the BS, the information age of file j cached at user i will drop to 1; if file j is obtained from user k within the D2D communication range, the information age of file j cached at user i will drop to the information age of file j cached at user k; if file j is recommended by user k within the D2D communication range, the information age of file j cached at user i will drop to the information age of file j recommended by user k. The information age function of file j cached by user i is: Assume binary array and Indicates the source of cached file j at user i in time slot t. If the file j requested by user i is obtained from a user within the D2D communication range, then If the file j requested by user i is obtained from BS, then If the file j requested by user i is recommended by a user within the D2D communication range, then 5. The cache optimization method based on file freshness and content recommendation according to claim 4, characterized in that: Using binary variable a ij (t) is used to record whether the request of user i to cache file j in time slot t is served. If it is successfully served, then a ij (t)=1, otherwise, a ij (t) = 0; Using binary variable b ij (t) to record whether user i has cached file j in time slot t. If it has, then b ij (t)=1, otherwise, b ij (t) = 0, when the cached file j at user i is unloaded at time slot t, b ij (t) = 0, the total size of the user's cached files cannot exceed the user's maximum cache capacity M, then: in, in, 6. A cache optimization method based on file freshness and content recommendation according to claim 5, characterized in that: Assume that the user set within the D2D communication range of user i is represented by D i To express it, the minimum age of file j cached by user i among the users in the D2D communication range at time slot t is The minimum age of file j obtained by user i through recommendation within the D2D communication range at time slot t is According to formula (4), we can get: Assume that the age of the file information obtained by the user cannot exceed an information age threshold δ th ,Right now: This ensures that the files obtained by users are not outdated and meet the information age threshold requirements.
7. The cache optimization method based on file freshness and content recommendation according to claim 6, characterized in that: Assume that the binary variable c ij (t) indicates whether there is a file j that meets the cache request in the D2D communication range of user i in time slot t. If yes, c ij (t)=1, otherwise c ij (t) = 0, c ij (t) is expressed as: in, When user i’s request for cached file j is served in time slot t, i.e., a ij (t) = 1, then the file can be obtained from users or BSs within the D2D communication range or by accepting recommended files, so: in, 8. The cache optimization method based on file freshness and content recommendation according to claim 1, characterized in that: The method further includes: when user i receives file j, if there is an old version of file j in the cache of user i, the old version of file j is directly replaced with the new version of file j; if the cache space of user i is sufficient, when caching the new file j, it is directly cached; if the cache space of user i is full, a content uninstallation operation is performed, following the principle of uninstalling outdated old files first.
9. The cache optimization method based on file freshness and content recommendation according to claim 7, characterized in that: The method further includes analyzing the system energy consumption: assuming that the BS and the user each use a fixed power P B and P D To transfer files, the user recommends that the transmission power of the file be P R , assuming that large-scale fading is considered in the communication process, SNR represents the signal-to-noise ratio, then the energy consumption of file j transmission is expressed as: Among them, P x is the transmission power, x j is the size of file j, B is the system bandwidth, SNR = P x ψ -α / σ 2 ,ψ represents the communication distance, α is the path loss index, σ 2 is the power average of Gaussian white noise; Assume that the energy consumption from BS, users within D2D communication range and files transmitted through recommendation are E B ,E D and E R , then the energy consumption of the system in a single time slot is expressed as: Among them, 1≤t≤T.