Mobile equipment, base station and content sharing method
Technical Field
The invention belongs To the field of wireless communication, relates To a Device-To-Device (D2D) communication technology of a mobile cellular network, and particularly relates To a mobile Device, a base station and a content sharing method.
Background
With the explosive increase of data traffic and content diversity in mobile communication networks. Content caching is a popular content distribution technology that is widely used in the internet to reduce cellular traffic load. In order to cope with the massive data demand in future mobile networks, the prior art introduces content caching technology into cellular networks. In the next generation of cellular networks, Device-to-Device (D2D) has received much attention as an effective technique for offloading cellular network traffic and improving system performance. In a D2D cellular network, the prospect of cellular communication applications can be expanded by using direct inter-mobile device (MT) communication capabilities, e.g., if the same content is owned on neighboring mobile devices, content sharing can be achieved by content forwarding through D2D communication between MTs.
The content sharing between MTs with buffering capability can be mainly divided into two phases, a buffering phase and a transmission phase. The transmission phase can be implemented by using D2D communication, and the buffering phase is to take advantage of D2D transmission by using the buffering resource of MT. The cache hit probability in the cache stage is an important index for evaluating the cache performance, and when the cache hit probability is high, the D2D cellular network can fully utilize cache resources and exert the advantages of D2D transmission; when the cache hit probability is small, the number of times that the MT acquires the request file from the macro base station is large, and at this time, the cache resource is not fully utilized.
Among the existing Caching policies, an Equal Probability random Caching policy (EPRC) and a Most Popular file Caching policy (MPC) are the Most Popular application schemes. In the EPRC scheme, all files are randomly cached by the MT with the same probability, and the cache hit probability is low. Whereas in the MPC strategy all mobile devices cache the same top ranked file. When file requests are concentrated on top-ranked files, a higher cache hit probability can be achieved. However, all MTs buffer the same file with a large amount of redundancy, and the transmission advantage of D2D cannot be fully utilized.
Therefore, how to fully utilize the transmission advantages of D2D and improve the cache hit rate is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application provides a mobile device, a base station and a content sharing method, so that the transmission advantage of D2D is fully utilized, and the cache hit rate is also improved.
In order to solve the technical problem, the application provides the following technical scheme:
a content sharing method, comprising the steps of: calculating the optimal number of files in a file library according to the storage capacity of the mobile equipment; determining a cache file library according to the local popularity of the files and the optimal file number; determining the caching probability of the files in the caching file library according to the local popularity of the files, and sending the caching probability to the mobile equipment; and sending the files in the cache file library so that the mobile equipment caches the files in the cache file library through the received cache probability.
The content sharing method as described above, wherein preferably, the local popularity of the file is calculated by the formula: l isi=ρTWherein L isiIs the local popularity of file i, ρTThe number of times the file i is accessed in the period T is counted.
The content sharing method as described above, wherein preferably, the caching probability calculation formula for caching the ith file in the file library is:
wherein,
for caching file libraries
The caching probability of the ith file, M' files are a caching file library
The optimal number of files in (1).
The content sharing method as described above, wherein preferably, the number of accesses of the file i is recorded in the node table.
The content sharing method as described above, wherein, preferably, before recording the number of times of access of the file in the node table, further comprising the steps of: by passing
Calculating the weight of the words in the document, wherein W
aIs the weight of the word a, theta is a coordination factor of statistics and semantics, the value of theta is taken as 0.45, f
baIs the word frequency of the word a in the file b, e is a natural constant, n
aRepresentation cache file library
The number of files containing the word a, M' represents a cache file library
The optimal number of files of the medium file; determining keywords in the file according to the weights of the words; according to the similarity of keywords in the fileStore the cache files
The file classification in (1) and the access times of the file are recorded in the node table according to the classification.
The content sharing method as described above, wherein preferably, the cache file pool and the cache probability are re-determined according to the local popularity of the file within a new statistical period.
A base station, which executes any one of the above-mentioned content sharing methods applied to the base station side.
A content sharing method is applied to a mobile device side and comprises the following steps: receiving the caching probability of files in a caching file library sent by a base station; and receiving files in a cache file library sent by the base station, and caching according to the cache probability.
The content sharing method as described above, wherein preferably, caching the file in the file library by the mobile device specifically includes: the mobile equipment generates a random number, and when the random number is smaller than the caching probability of the ith file
When the file is cached; otherwise, the file is not cached until the cache space of the mobile equipment is full.
A mobile device, wherein it is preferable that the mobile device executes any one of the above-described content sharing methods applied to a mobile terminal side.
Compared with the background art, the content sharing method, the base station and the mobile device mainly provide a cache strategy in a cache stage, namely, a plurality of content files are placed on different mobile devices (MT) under the condition that the cache space of the mobile devices (MT) is limited, so that the cache hit rate is improved as much as possible, and the average energy consumption of a system is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a flowchart of a content sharing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a centralized network system provided in an embodiment of the present application;
fig. 3 is a schematic table entry diagram of a node table according to an embodiment of the present application;
fig. 4 is a flowchart of a content sharing method provided in the third embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
Example one
The embodiment provides a content sharing method, which is applied to a base station side, and as shown in fig. 1, includes the following steps:
step S110, calculating the optimal number of files in a file library according to the storage capacity of the mobile equipment;
in the centralized network system, as shown in fig. 2, there is one Base Station (BS) and N D2D devices, and the mobile devices (MT) are uniformly distributed in a coverage area with a certain distance as a radius around the Base Station (BS). Each mobile device (MT) has a certain storage capacity, and in the centralized network system, all mobile terminals have a specific storage capacity, and assuming that the size of the files to be stored is the same, in the centralized network system, the mobile devices can cache at most a specific number of files, which is the optimal number of files M' in the file library.
Step S120, determining a cache file library according to the local popularity of the files and the optimal file number;
the local popularity of a file is the file repository MlibThe popularity of the file in (1) in the statistical period T, that is, the local popularity of the file is the file library MlibThe number of times that the file in (1) is accessed in the statistical period T can be recorded as Li=ρTWherein L isiIs the local popularity of file i, ρTThe number of times the file i is accessed in the period T is counted.
Specifically, the number of times of access to the file i is recorded in the node table, and as shown in fig. 3, each node of the node table includes: file identification, file access times identification and time interval identification of each access.
After receiving a request for accessing a file, querying a node table according to an accessed file identifier, if a node linked list has an entry for recording the file identifier, recording access time of accessing the file this time and an access time interval of last time in a time interval mark of the node table, if all access requests of the file recorded in the time interval mark are in a statistical period, adding 1 to a file accessed frequency mark of the entry, and then rearranging entries in the node table by the added file accessed frequency mark, namely, arranging entries with high accessed frequency marks to the head of the node table.
If the node table does not record the entry of the file identifier, a new entry is created in the node table, the file identifier is recorded in the file identifier of the entry, the time of the current access is recorded in the time interval mark of each access, 1 is recorded in the mark of the number of times the file is accessed, and the entry is arranged at the end of the node table.
On the basis of the embodiment, the statistical period can be set or adjusted at any time according to needs, the duration of the statistical period can be set, and the starting time and the ending time of the statistical period can also be set. The time interval mark accessed every time is searched according to the statistical period, so that the number of times that the file is accessed in the statistical period can be determined, namely the local popularity of the file can be dynamically determined according to the change of the statistical period according to the node table.
From the repository M in the order of high to low local popularity
libSequentially intercepting the files with the optimal file number M' to form a cache file library
By means of a file repository M
libThe ranked files are cut off, namely a part of files with lower request probability are cut off to form a cache file library
Thereby increasing the cache hit probability.
To reduce the number of entries of the node table, before the number of accesses of a file is recorded in the node table, cluster analysis may be performed on the accessed file to classify the file into different categories.
Specifically, keyword screening may be performed on the accessed files. For example: can pass through
Calculating the weight of the words in the document, wherein W
aIs the weight of the word a, theta is a coordination factor of statistics and semantics, the value of theta is taken as 0.45, f
baIs the word frequency of the word a in the file b, e is a natural constant, n
aRepresentation cache file library
The number of files containing the word a, M' represents a cache file library
The optimal number of files in the file. And determining the keywords in the file according to the weights of the words in the file.
Caching the file library according to the similarity of the keywords
The accessed files are recorded in the node table according to the categories so as to reduce the number of entries of the node table.
Step S130, determining the caching probability of the files in the caching file library according to the local popularity of the files, and sending the caching probability to the mobile equipment;
the local popularity of a file can be represented by the formula L
i=ρ
TPerforming a calculation wherein L
iIs the local popularity of file i, ρ
TThe number of times the file i is accessed in the period T is counted. In the cache file library with the number of files M
The cache probability of the file with the rank i is
The obtained cache file library
The local popularity of the ith file is substituted into a formula of the cache probability to obtain a cache file library
Caching probability of ith file
By analogy, a cache file library can be obtainedThe caching probability of M' files. And transmits the caching probability of the file to all mobile devices (MT) within the coverage of the base station in a broadcasting manner.
Step S140, sending the files in the cache file library, so that the mobile device caches the files in the cache file library according to the received cache probability.
When the service load is low, the Base Station (BS) transmits the buffer file library M in a broadcasting modelibFor the mobile device (MT) to cache.
Example two
The present embodiment provides a base station, which executes the content sharing method provided in the first embodiment.
EXAMPLE III
The embodiment provides a content sharing method, which is applied to a mobile device side, and as shown in fig. 4, the method includes the following steps:
step Y410, receiving the caching probability of the files in the caching file library;
mobile equipment (MT) receives a cache file library sent by a Base Station (BS)
The caching probability of M' files.
And step Y420, receiving the files in the cache file library, and caching according to the cache probability.
When the traffic load is low, the Base Station (BS) sends a cache file library
M' files, taking the ith file as an example, the mobile device (MT) generates a random number, and when the random number is smaller than the caching probability of the ith file
And if not, not caching the ith file until the cache space of the mobile device (MT) is full.
Example four
The present embodiment provides a mobile device, and the mobile device executes the content sharing method provided in the third embodiment.
The content sharing method, the base station and the mobile device provided by the embodiment of the application mainly provide a cache strategy in a cache stage, namely, a plurality of content files are placed on different mobile devices (MT) under the condition that the cache space of the mobile devices (MT) is limited, so that the cache hit rate is improved as much as possible, and the average energy consumption of a system is reduced.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.