Summary of the invention
The purpose of the present invention is in the environment that D2D is communicated, propose it is a kind of Cellular Networks assistance under based on social networks
File Sharing Technique, which is effectively reducing system overall delay, negative mitigating base station while improving file transmission efficiency
Carrying aspect also has very big advantage.
To solve this technical problem, the technical solution adopted by the present invention is that proposing that a kind of file based on social networks is total
Method is enjoyed, is specifically comprised the following steps:
Step 1: user grouping, server establish user and collect u={ U1,U2,U3,···,UNAnd user's demand file collection
F={ F1,F2,F3,···,FM};
Step 2: establishing social network diagram, base station is divided into several interim groups according to user interest, by user, and feeds back to
Group member establishes regular network;
Step 3: determining central user;
Step 4: judging whether D2D link can be established between user;
Step 5: link selection.
Further, in step 2, adjacency matrix A is first generated according to the regular network, then regular network is connected
It connects, generates small-world network, analyze adjacency matrix A, to judge whether to have between node i and node j connection, and generate a nothing
Weigh undirected social network diagram G and social networks matrix TM×N。
Particularly, above-mentioned be attached to regular network is referred to and is weighed at random with random reconnection probability to regular network
Even.
In step 3, determine that central user is the communication degree D that each user in interim group is calculated by communication degree algorithm
(Ui), then choose wherein central user of the maximum user of communication degree as this group.
Above-mentioned communication degree algorithm is preferably Dul.
Judge that the process that D2D link whether can be established between user is first determined whether in the group with the presence or absence of demand in step 4
File, and if so, file is transferred to central user by cellular communications channel by base station first, organize in other users again with
It is shared, and the average degree of belief of the user node in social networks is then calculated by degree of belief algorithm, if being less than secure threshold,
It then can establish D2D link between user, otherwise can only select cellular communication link.
In step 5, utility function value when link selection between elder generation's computing terminal user node or base station is carried out, is then divided
The social network diagram that user is constituted is analysed, the company side for meeting certain restrictions condition is formed into set ψ, is then marked in set ψ
Company side with maximum utility functional value, according to the node at side both ends to selecting communication pattern.
Further, above-mentioned restrictive condition is that OIOO (One In One Out) is single-entry single-out.
Compared with prior art, the invention has the following beneficial effects:
1. the present invention can effectively improve the efficiency of file-sharing between user, the time delay of file-sharing is effectively reduced;
2. the present invention can mitigate the downloading burden of base station, have while guaranteeing file-sharing safety and transmission quality
Effect saves frequency spectrum resource, optimizes the overall performance of cellular communication system.
3. solving the problems, such as that D2D user is only capable of request of processing (receiving or sending) in the same time.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings of the specification.
The present invention is adopted the technical scheme that solve this technical problem: emulating user's structure using small-world network model
At social networks.Then, user is divided into several interim groups by the demand according to user to file, in each group,
The social maximum central user of degree receives file destination first.Finally according to social networks situation between user, with the D2D communication technology
It is shared with other users.Including user node degree of belief algorithm Suc, group member's social activity degree algorithm Dul and time delay are calculated
Method Del.Be introduced into file-sharing Mechanism Study simultaneously commonly for the colored side labeling algorithm of the greediness of time-delay calculation to
It is proposed that time delay algorithm be compared.
User node degree of belief algorithm Suc: assuming that user node UjTrust user node Ui, work as UjIn a network credible
When spending higher, then UiConfidence level in a network will not be poor.So degree of belief of the user node in social networks
The weighted average that value can trust by other nodes it angle value obtains, specific formula is as follows:
Group member's social activity degree algorithm Dul: user UiSocial degree indicate the summation of its in-degree and out-degree, it may be assumed that
Wherein N is total user node number, works as UiWith node UkBetween when there is social link, a (Ui,Uk)=1, anyway
It is then 0.
Greedy colour side labeling algorithm: base station to the propagation delay time between user is considered as being set as t for a constant0,
Propagation delay time in same group between D2D user is also considered as being set as t for constant1.Assuming that all cellular link numbers are
Lcj, all D2D number of links are Ldj, therefore the available time delay for transmitting file in greedy colored side labeling algorithm are as follows:
The overall delay for the D2D file-sharing mechanism based on social networks that the present invention is studied are as follows:
Wherein LcjAnd LdjThere is no the cellular link number and D2D chain of the other users of social networks with central user respectively
Number.
Based on the above theory, we can provide file distribution based on social relations and secret sharing, and to file
Propagation delay time is calculated.The present invention is divided into following steps:
Step 1: establishing grouping
(1) server establishes user's collection u={ U1,U2,U3,···,UNAnd user demand file collection F={ F1,F2,
F3,···,FM, wherein N indicates the number of user, and M indicates the number of file;
(2) server sends information to base station, and base station is broadcast to all users after receiving information.N number of user asks respectively
Respective interested content in M file is sought, and solicited message is sent back to base station;
(3) several interim groups are established according to the interest of user in base station, and group's relationship of formation are fed back to each small
All members in group.
Step 2: establishing small-world network model
(1) regular network is established, adjacency matrix A is obtained;
(2) random reconnection is carried out to regular network with random reconnection probability, generates small-world network;
(3) adjacency matrix A is analyzed, to judge whether there is connection between node i and node j;
(4) it generates one and haves no right undirected social network diagram G and social networks matrix TM×N。
Step 3: determine central user:
(1) social activity degree algorithm Dul is used, the social degree of each user in calculating group;
(2) central user of the highest user of social activity degree as group is selected;
(3) file is transferred to central user by cellular communication by base station first;
(4) small group member is based on social networks again and communicates shared this document by D2D.
Step 4: terminal node link selection:
(1) to the degree of belief S (U of each user node in social networksi) initial value is assigned, it is worth range between [0,1];
(2) degree of belief is averaging to each node according to degree of belief algorithm Suc;
(3) judge whether degree of belief difference total in group is more than accuracy value;
(4) the convergence result of degree of belief is acquired;
(5) judge whether there can be D2D link between user by degree of belief and threshold value comparison;
(6) the utility function value between computing terminal user node (including base station);
(7) social network diagram that analysis user is constituted, will meet the company side of OIOO (One In One Out) restrictive condition
Set ψ is formed, the company side in set ψ with maximum utility functional value is then marked, according to the node at even side both ends to next
Select communication pattern.
Now implementation method is shared to file distributing to be further described.
As depicted in figs. 1 and 2, server initially sets up user's collection u={ U1,U2,U3,···,UNAnd user's request text
Part collection F={ F1,F2,F3,···,FM, then, user is divided into several interim groups according to user interest by base station (eNB)
And feed back to personnel in group.Pass through the social central user U being worth in selected groupi, demand file is sent to center by subsequent base station
User.Group member passes through the acquisition modes of utility function select file again.
As shown in figure 3, specific step is as follows for file-sharing implementation method:
1. user grouping
(1) server establishes user's collection u={ U1,U2,U3,···,UNAnd user demand file collection F={ F1,F2,
F3,···,FM, wherein N indicates the number of user, and M indicates the number of file;
(2) server sends information to base station, and base station is broadcast to all users after receiving information.N number of user asks respectively
Respective interested content in M file is sought, and solicited message is sent back to base station.Assuming that solicited status matrix RN×M=
(rn,m) user defines r to the interest of file in expression systemn,m=1 indicates user UNTo file FMIt is interested, conversely, rn,m=
0;
(3) several interim groups are established according to the interest of user in base station, and group's relationship of formation are fed back to each small
All members in group.If group's collection is combined into g={ g1,g2,g3,···,gj, gjIt indicates to file FjThere is demand
User set.Obvious small set meet relationship g≤| M |, and the number of users in each group meets gj≤N.Due to every
A user can request multiple files, so allowing to be overlapped between group, i.e. gi∩gj≠ o is set up.
2. establishing social network diagram
(1) regular network is established, adjacency matrix A is obtained;
(2) random reconnection is carried out to regular network with random reconnection probability, generates small-world network;
(3) adjacency matrix A is analyzed, to judge whether there is connection between node i and node j;
(4) it generates one and haves no right undirected social network diagram G and social networks matrix TM×N。
3. determining central user
(1) after being grouped, base station needs to determine central user in grouping;
(2) since the social status of each user is different, select which user as the central user of group to entire nothing
Gauze network has a major impact.Here user in social highest group of value is chosen, can achieve highest sharing efficiency;
(3) user U is calculatediSocial degree, it indicate user's in-degree and out-degree summation, it may be assumed that
Wherein N is total user node number, works as UiWith node UkBetween when there is social link, a (Ui,Uk)=1.In order to
Ensure the consistency and comparability of result, present invention assumes that social networks are not present with oneself in user.Definition makes CD(Ui) value is most
Big node UiFor central user.
In each group, if the file of demand is not present in the group, base station first transmits file by cellular communication
To central user, each group is based on social networks again and communicates shared this document by D2D.
4. whether between judging user D2D link can be established
(1) to the degree of belief s (U of each user node in social networksi) initial value is assigned, it is worth range between [0,1];
(2) each user node is asked according to the following formula
(3) it setsFor low precision, judgementValue withSize, ifStep 4) is then gone to, is otherwise enabledStep (2) is gone to continue to calculate;
(4) convergence result is acquired;
(5) there are D2D links must satisfy two conditions between user: firstly, there are social networks;Secondly, degree of belief
It must be in the range of safety.Assuming that the threshold value of degree of belief is S0, then the social link metric S being made of 0-1 element can be obtainedM×N
Meet condition s (Ui) > S0.When meeting two above condition, D2D link can establish between user, otherwise can only use Cellular Networks
Middle traditional communication link.
5. link selection
(1) the utility function value between computing terminal user node (including base station):
Wherein:
Indicate that user i has been received that file m,And if only if Γi,m=1 and user j is or just
Receiving file m.When user i is base station or its transmitter free time, haveEqually, when the receiver of user j is not occupied
Used time,
(2) social network diagram that analysis user is constituted, will meet the company side of OIOO (One In One Out) restrictive condition
Set ψ is formed, the company side in set ψ with maximum utility functional value is then marked, according to the node at even side both ends to next
Selection communication pattern (if two nodes are user, selects D2D communication pattern;If selecting cellular communication mould containing base station
Formula), the process is recycled until set ψ is sky.
6. time-delay analysis
Assuming that all cellular link numbers are Lcj, all D2D number of links are Ldj, therefore calculated in greedy colored side label
The time delay of available transmission file in method are as follows:
By previously described it is found that there is the maximum central user of social activity degree in a social groups, it is of the invention in assume
The social degree of central user is Dj, then having the user of social networks and degree of belief in threshold range can be with central user
Directly by central user by D2D link sharing file with meet demand, therefore the present invention studied based on social networks
The overall delay of D2D file-sharing mechanism are as follows:
Wherein LcjAnd LdjThere is no the cellular link number and D2D chain of the other users of social networks with central user respectively
The join algorithm of number, link is established by greedy colored side labeling algorithm.Assuming that central user is first of file in the group
A recipient, due to social networks and trusting angle value user in the reasonable scope with it and can directly be obtained from central user
File is obtained, then theoretically, overall delay is reduced, i.e. tsum,D2DLess than tgre。
The following are simulation results
Fig. 4 illustrates that under given D2D communication environment, 20 users are in the border circular areas that radius is 1000 meters, threshold value
S0Influence to user's average degree.As seen from the figure, work as S0=0 i.e. trust threshold is when being zero, and corresponding maximum user average degree is about etc.
In 5.25, with the increase of threshold value, the average degree of user is reduced.As can be seen from Figure, curve has downward trend, i.e. S0Value
Bigger, trust requirement is harsher, and user's average degree is smaller.
Fig. 5 illustrates under the file-sharing mechanism and greedy colored side labeling algorithm based on social networks, overall delay with
File number m variation and the case where change, m is the file total number that user requests in file set F here.By can be in figure
Find out, the overall delay of the mentioned method of the present invention is smaller than the time delay in greedy colored side labeling algorithm, is consistent with theory analysis.This
Outside, increasing with quantity of documents, the difference of the numerical value of two curves is also increasing in figure.
Fig. 6 illustrates respectively under the file-sharing mechanism algorithm and greedy colored side labeling algorithm based on social networks,
The case where load of base station, that is, when meeting request of all users to file, the number of files of base station in response.It can be seen from the figure that
It is not identical by the quantity of documents of base station in response when meeting the identical demand condition of user.As m=20, greedy colour side mark
The number of files for remembering base station in response in algorithm is about 560, and is only about 210 in algorithm proposed by the present invention.This can illustrate, select
User with maximum social activity degree can effectively mitigate the load of base station as central user.
The foregoing is merely a specific embodiments of the invention, are not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.