CN105704694A - Method and device for computing expense allocation value in cooperative downloading - Google Patents

Method and device for computing expense allocation value in cooperative downloading Download PDF

Info

Publication number
CN105704694A
CN105704694A CN201610032572.7A CN201610032572A CN105704694A CN 105704694 A CN105704694 A CN 105704694A CN 201610032572 A CN201610032572 A CN 201610032572A CN 105704694 A CN105704694 A CN 105704694A
Authority
CN
China
Prior art keywords
terminal
download
cost
expense
accept
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201610032572.7A
Other languages
Chinese (zh)
Other versions
CN105704694B (en
Inventor
杨杨
邱雪松
芮兰兰
李贺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201610032572.7A priority Critical patent/CN105704694B/en
Publication of CN105704694A publication Critical patent/CN105704694A/en
Application granted granted Critical
Publication of CN105704694B publication Critical patent/CN105704694B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/24Accounting or billing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/14Payment architectures specially adapted for billing systems
    • G06Q20/145Payments according to the detected use or quantity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1485Tariff-related aspects
    • H04L12/1492Tariff-related aspects negotiation of tariff

Abstract

The embodiment of the invention discloses a method and device for computing an expense allocation value in cooperative downloading. The method comprises steps of: acquiring file information of a target file required to be downloaded and cooperative downloading request information, wherein the file information and the cooperative downloading request information are sent by an active terminal, determining the total expense for downloading the target file and sending inquiry information to multiple adjacent terminals corresponding to the active terminal, receiving agreed download information or refused download information returned by the adjacent terminals, and selecting an adjacent terminal from the adjacent terminals returning the agreed download information to establish a Ad-Hoc network with the active terminal; and computing the final expense allocation value of each terminal on the basis of the size of the target file, the acceptable maximum expense value corresponding to each terminal, the maximum time for completing downloading corresponding to each terminal, the completeness of download task corresponding to each terminal, and actual downloading time of each terminal. The method and device determine the expense allocation value in cooperative downloading according to a user demand and achieve a reasonable allocation scheme.

Description

Work in coordination with computational methods and the device of expense allocation value when downloading
Technical field
The present invention relates to the collaborative downloading field of file, particularly to a kind of collaborative download time the computational methods of expense allocation value and device。
Background technology
Along with the constantly progressive of development of Mobile Internet technology and development, mobile phone users uses that 4G technology is seen a film, foradownloaded video is easy to, but downloads big file and video still can consume substantial amounts of flow, thus producing higher rate。For a Generic End-User, the expense downloading a video is often difficult to alone bear, and collaborative download is the effective technology solving this problem, and collaborative download can allow multiple user interested in identical file jointly share mail downloading charge and use。
In prior art, collaborative download can be: to need download identical file each user terminal set up Ad-Hoc network (a kind of multi-hop, acentric, ad hoc deployed wireless networks, the infrastructure that whole network is not fixed, each node and terminal are mobile, and can dynamically keep in any way and the contacting of other node), each terminal use shares a part of downloading task, after all having downloaded, the content that dispersion is downloaded is converged, then share in Ad-Hoc network, so, download the expense of this document just by such as determining that the mode of its distribution expense is distributed to multiple user according to the download of user, the problem avoiding the whole mail downloading charge of user's alone bear。Meanwhile, collaborative download can introduce the problem of expense allocation, and ensures that in Ad-Hoc network, the reasonability of the expense of each terminal use distribution is highly important。
In above-mentioned Ad-Hoc network, the demand of file destination is different by each user, the terminal use such as having is very interested in this document, and this document is not extremely crave for by some terminal uses, namely the desirability of this document is different by terminal use, but expense allocation scheme of the prior art does not all consider the demand of user。
Summary of the invention
The embodiment of the invention discloses a kind of collaborative computational methods of expense allocation value and device when downloading, during for solving based on Ad-Hoc network, identical file collaborative to be downloaded, the problem that expense allocation scheme is determined not according to the demand of user。Technical scheme is as follows:
First aspect, embodiments provides the computational methods of expense allocation value during a kind of collaborative download, including step:
The fileinfo obtaining the file destination that the need that actively terminal sends are downloaded downloads solicited message with collaborative, described fileinfo includes file size and the file description information of described file destination, and described collaborative download solicited message includes the expense maximum that described active terminal can accept and the maximum time completing to download that can accept;
File size based on described file destination, determine the total cost downloading described file destination, and send inquiry message to the multiple adjacent terminals corresponding to described active terminal, so that information or refusal download information are downloaded in the agreement that described adjacent terminals is directed to described file destination based on described inquiry message feedback;Wherein, multiple adjacent terminals corresponding to described active terminal are: be positioned at the terminal of the preset range of position centered by described active terminal, described inquiry message includes the file size of described file destination, file description information and described total cost, and described agreement is downloaded information and included the expense maximum that corresponding adjacent terminals can accept and the maximum time completing to download that can accept;
Information or refusal download information are downloaded in the agreement receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select adjacent terminals and described active terminal jointly to set up Ad-Hoc network;
It is downloaded the downloading task uniform distribution of described file destination to each terminal in described Ad-Hoc network;
After the downloading process of each terminal in described Ad-Hoc network terminates, file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network。
Preferably, described selection adjacent terminals and described active terminal set up Ad-Hoc network jointly, including:
All adjacent terminals and described active terminal is selected jointly to set up Ad-Hoc network;
Or, select to meet the expense maximum that can accept and jointly set up Ad-Hoc network more than the adjacent terminals of default cost threshold and described active terminal。
Preferably, the described file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network, including:
Based on the expense maximum that can accept corresponding to the file size of described file destination, terminal, the maximum time completing to download that can accept, build Lagrangian, and obtain expense allocation computing formula based on its KKT condition (Karush-Kuhn-TuckerConditions, Caro need-Kuhn-Tucker condition);
For each terminal, based on the expense allocation computing formula obtained, gradient descent method is used to adjust parameter μ and the λ of described Lagrangian, it is determined that the initial cost apportioning cost of each terminal;
Based on completeness to each downloading task of distribution of the initial cost apportioning cost of each terminal and described terminal and actual download time, calculate the ultimate cost apportioning cost of each terminal。
Preferably, described structure Lagrangian, and obtain expense allocation computing formula based on its KKT condition, including:
Determine that the utility function that each terminal is concrete is:
u i ( p i ) = C / p i T d , i ;
Expense optimal assignment problem in Ad-Hoc network system is converted into:
S Y S T E M = m a x p i ≥ 0 Σ i = 1 m u i ( p i ) ,
s . t . Σ i = 1 m p i = P d ,
pi≤Pi,max, i=1,2 ... m;
Structure Lagrangian:
L ( P , λ , μ ) = Σ i = 1 m u i ( p i ) - λ ( Σ i = 1 m p i - P d ) - Σ i = 1 m μ i ( P i , m a x - p i ) ;
Then KKT condition is:
p i ∂ L ∂ p i = p i ( - C / 4 T d , i p i - 3 2 - λ + μ i ) = 0 ;
Expense allocation computing formula is determined based on KKT formula:
p i = C 4 ( μ i - λ ) 2 T d , i 3 ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;Ui(pi) for the resource value of utility of terminal i, C is the downloading task amount that terminal i is assigned with, piFor the expense allocation value of terminal i, Td,iFor terminal i can accept complete download maximum time, Pd is the total cost downloading described file destination, μiFor the LaGrange parameter μ corresponding to terminal i。
Preferably, described based on the expense allocation computing formula obtained, use gradient descent method to adjust parameter μ and the λ of described Lagrangian, it is determined that the initial cost apportioning cost of each terminal, including:
S11: initial assignment λ(0)The μ corresponding with each terminal ii (0)
S12: based on current each terminal i expense allocation valueGradient descent method is used to adjust λ and μi, adjust λ and μiThe formula adopted is:
λ ( t + 1 ) = | λ ( t ) + Δ t ( Σ i = 1 m p i ( t ) - P d ) | ,
μ i ( t + 1 ) = μ i ( t ) + Δ t ( p i , m a x - p i ( t ) ) ;
S13: based on λ(t+1)With described expense allocation computing formula, calculateWhen all terminal i are correspondingDuring less than default maximum error value ε, it is determined that the initial cost apportioning cost of each terminal isOtherwise, update t=t+1 and return step S12;
Wherein, t represents the iterations using gradient descent method, λ(t)It is the value after the t time iteration,For corresponding to terminal i value after the t time iteration,For the expense allocation value that terminal i calculates when the t time iteration,For the terminal i expense allocation value when non-iteration, pi,maxFor the expense maximum that terminal i can accept, ΔtFor the iteration step length that default gradient declines,The expense allocation value summation of all terminal i during for iteration the t time。
Preferably, described initial assignment λ(0)The μ corresponding with each terminal ii (0)Including:
Initial assignment λ(0)The μ corresponding with each terminal ii (0), make λ(0)The μ corresponding with each terminal ii (0)Meet p i , m a x = p i ( 0 ) = C 4 ( μ i ( 0 ) - λ ( 0 ) ) 2 T d , i 3 .
Preferably, the formula that the ultimate cost apportioning cost of each terminal of described calculating utilizes includes:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task is completed for terminal i。
Preferably, described collaborative download solicited message and described agreement are downloaded information and are all also included the penalty rate that terminal self is preset,
The completeness of the described initial cost apportioning cost based on each terminal and the described terminal downloading task to each distributing and actual download time, calculate the ultimate cost apportioning cost of each terminal, including:
The penalty rate preset based on the initial cost apportioning cost of each terminal, terminal self and described terminal, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal。
Further, the formula that the ultimate cost apportioning cost of each terminal of described calculating utilizes includes:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) ( 1 - pr i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task, pr is completed for terminal iiFor the penalty rate that terminal i is preset。
Second aspect, the embodiment of the present invention additionally provides the calculation element of expense allocation value during a kind of collaborative download, including:
Data obtaining module, fileinfo for obtaining the file destination that the need that actively terminal sends are downloaded downloads solicited message with collaborative, described fileinfo includes file size and the file description information of described file destination, and described collaborative download solicited message includes the expense maximum that described active terminal can accept and the maximum time completing to download that can accept;
Inquiry message sending module, for the file size based on described file destination, determine the total cost downloading described file destination, and send inquiry message to the multiple adjacent terminals corresponding to described active terminal, so that information or refusal download information are downloaded in the agreement that described adjacent terminals is directed to described file destination based on described inquiry message feedback;Wherein, multiple adjacent terminals corresponding to described active terminal are: be positioned at the terminal of the preset range of position centered by described active terminal, described inquiry message includes the file size of described file destination, file description information and described total cost, and described agreement is downloaded information and included the expense maximum that corresponding adjacent terminals can accept and the maximum time completing to download that can accept;
Network construction module, information or refusal download information are downloaded in the agreement for receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select adjacent terminals and described active terminal jointly to set up Ad-Hoc network;
Downloading task distribution module, for giving each terminal in described Ad-Hoc network to be downloaded the downloading task uniform distribution of described file destination;
Expense allocation value computing module, after terminating for the downloading process of each terminal in described Ad-Hoc network, file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network。
Preferably, described network construction module specifically for:
Information or refusal download information are downloaded in the agreement receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select all adjacent terminals and described active terminal jointly to set up Ad-Hoc network;
Or, information or refusal download information are downloaded in the agreement receiving described adjacent terminals feedback, and agree to the described adjacent terminals of download information from feedback, select to meet the expense maximum that can accept and jointly set up Ad-Hoc network more than the adjacent terminals of default cost threshold and described active terminal。
Preferably, described expense allocation value computing module specifically includes:
Expense allocation computing formula obtains submodule, for after the downloading process of each terminal in described Ad-Hoc network terminates, based on the expense maximum that can accept corresponding to the file size of described file destination, terminal, the maximum time completing to download that can accept, build Lagrangian, and obtain expense allocation computing formula based on its KKT condition;
Initial cost apportioning cost determines submodule, for for each terminal, based on the expense allocation computing formula obtained, uses gradient descent method to adjust parameter μ and the λ of described Lagrangian, it is determined that the initial cost apportioning cost of each terminal;
Ultimate cost apportioning cost calculating sub module, is used for completeness and the actual download time of the initial cost apportioning cost based on each terminal and the described terminal downloading task to each distributing, calculates the ultimate cost apportioning cost of each terminal。
Preferably, described expense allocation computing formula obtain submodule specifically for:
After the downloading process of each terminal in described Ad-Hoc network terminates, based on the expense maximum that can accept corresponding to the file size of described file destination, terminal, the maximum time completing to download that can accept,
Determine that the utility function that each terminal is concrete is:
u i ( p i ) = C / p i T d , i ;
Expense optimal assignment problem in Ad-Hoc network system is converted into:
S Y S T E M = m a x p i &GreaterEqual; 0 &Sigma; i = 1 m u i ( p i ) ,
s . t . &Sigma; i = 1 m p i = P d ,
pi≤Pi,max, i=1,2 ... m;
Structure Lagrangian:
L ( P , &lambda; , &mu; ) = &Sigma; i = 1 m u i ( p i ) - &lambda; ( &Sigma; i = 1 m p i - P d ) - &Sigma; i = 1 m &mu; i ( P i , m a x - p i ) ;
Then KKT condition is:
p i &part; L &part; p i = p i ( - C / 4 T d , i p i - 3 2 - &lambda; + &mu; i ) = 0 ;
Expense allocation computing formula is determined based on KKT formula:
p i = C 4 ( &mu; i - &lambda; ) 2 T d , i 3 ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;Ui(pi) for the resource value of utility of terminal i, C is the downloading task amount that terminal i is assigned with, piFor the expense allocation value of terminal i, Td,iFor terminal i can accept complete download maximum time, Pd is the total cost downloading described file destination, μiFor the LaGrange parameter μ corresponding to terminal i。
Preferably, described initial cost apportioning cost determines that submodule includes:
Initial assignment unit, for initial assignment λ(0)The μ corresponding with each terminal ii (0)
Parameter adjustment unit, for based on current each terminal i expense allocation valueGradient descent method is used to adjust λ and μi, adjust λ and μiThe formula adopted is:
&lambda; ( t + 1 ) = | &lambda; ( t ) + &Delta; t ( &Sigma; i = 1 m p i ( t ) - P d ) | ,
&mu; i ( t + 1 ) = &mu; i ( t ) + &Delta; t ( p i , m a x - p i ( t ) ) ;
Initial cost apportioning cost computing unit, for based on λ(t+1)With described expense allocation computing formula, calculateWhen all terminal i are correspondingDuring less than default maximum error value ε, it is determined that the initial cost apportioning cost of each terminal isOtherwise, update t=t+1 to bring in parameter adjustment unit;
Wherein, t represents the iterations using gradient descent method, λ(t)It is the value after the t time iteration,For corresponding to terminal i value after the t time iteration,For the expense allocation value that terminal i calculates when the t time iteration,For the terminal i expense allocation value when non-iteration, pi,maxFor the expense maximum that terminal i can accept, ΔtFor the iteration step length that default gradient declines,The expense allocation value summation of all terminal i during for iteration the t time。
Preferably, described initial assignment unit specifically for:
Initial assignment λ(0)The μ corresponding with each terminal ii (0), make λ(0)The μ corresponding with each terminal ii (0)Meet p i , m a x = p i ( 0 ) = C 4 ( &mu; i ( 0 ) - &lambda; ( 0 ) ) 2 T d , i 3 .
Preferably, described ultimate cost apportioning cost calculating sub module calculates the formula that the ultimate cost apportioning cost of each terminal utilizes include:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task is completed for terminal i。
Preferably, described collaborative download solicited message and described agreement are downloaded information and are all also included the penalty rate that terminal self is preset,
Ultimate cost apportioning cost calculating sub module specifically for:
The penalty rate preset based on the initial cost apportioning cost of each terminal, terminal self and described terminal, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal。
Further, described ultimate cost apportioning cost calculating sub module calculates the formula that the ultimate cost apportioning cost of each terminal utilizes include:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) ( 1 - pr i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task, pr is completed for terminal iiFor the penalty rate that terminal i is preset。
A kind of collaborative computational methods of expense allocation value and device when downloading that the embodiment of the present invention provides, for collaborative download problem to identical file in Ad-Hoc network, agreement according to the collaborative download solicited message and passive terminal that include actively mobile terminal is downloaded information and is determined expense allocation scheme, above-mentioned collaborative download solicited message and agreement download information all include counterpart terminal the expense maximum that can accept and the maximum time completing to download that can accept of user's input, the expense maximum that terminal can accept and the maximum time completing to download represent the demand of user, therefore the embodiment of the present invention is the demand according to user determines expense allocation value, make allocative decision more reasonable。
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings。
The system scenarios schematic diagram that during a kind of collaborative download that Fig. 1 provides for the embodiment of the present invention, the computational methods of expense allocation value are applicable to;
The flow chart of the computational methods of expense allocation value during a kind of collaborative download that Fig. 2 provides for the embodiment of the present invention;
The structural representation of the calculation element of expense allocation value during a kind of collaborative download that Fig. 3 provides for the embodiment of the present invention;
Fig. 4 is the broken line graph of the iterative process of server computational costs allocative decision in the embodiment of the present invention;
Fig. 5 is in the embodiment of the present invention when terminal 4 is for selfish node, the broken line graph of the iterative process of server computational costs allocative decision。
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments。Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention。
During a kind of collaborative the download first below embodiment of the present invention provided, the computational methods of expense allocation value are introduced。
It should be noted that a kind of collaborative computational methods of expense allocation value when downloading that the present embodiment provides, it is possible to be applied to server, server and following each terminal communication。
Such as, in the present invention, it is believed that each terminal and same server communication, as it is shown in figure 1,4 terminal RN1, RN2, RN3 and RN4 all with server S erver4G data cube computation。
As in figure 2 it is shown, embodiments provide the computational methods of expense allocation value during a kind of collaborative download, it is possible to comprise the steps:
S101, the fileinfo obtaining the file destination that the need that actively terminal sends are downloaded downloads solicited message with collaborative, described fileinfo includes file size and the file description information of described file destination, and described collaborative download solicited message includes the expense maximum that described active terminal can accept and the maximum time completing to download that can accept。
Should be noted that active terminal herein is expressed as actively setting up the collaborative download network terminal with downloading object file, the terminal RN1 in Fig. 1 to server request。
It addition, file description information described herein is for making following adjacent terminals understand the general contents of file destination by file description information, thus being judged whether to need jointly to download this file destination by terminal use self;Further, under ensureing the premise that file description information provides a user with the substance of file destination, the particular content of file description information is not defined by the present embodiment, for example: this document describes title and the video profile that information can be video file。
Supposing in the present embodiment: the file size of file destination is 400M, the expense maximum that actively terminal can accept is 2 yuan, it is possible to the maximum time completing to download of acceptance is 3600s。
S102, file size based on described file destination, determine the total cost downloading described file destination, and send inquiry message to the multiple adjacent terminals corresponding to described active terminal, so that information or refusal download information are downloaded in the agreement that described adjacent terminals is directed to described file destination based on described inquiry message feedback;
Wherein, multiple adjacent terminals corresponding to described active terminal are: be positioned at the terminal of the preset range of position centered by described active terminal, described inquiry message includes the file size of described file destination, file description information and described total cost, the user holding adjacent terminals judges self to download this file destination as it has been described above, can pass through file description information;Described agreement download information includes the expense maximum that corresponding adjacent terminals can accept and the maximum time completing to download that can accept。
Should be noted that, in embodiments of the present invention, send the operation of inquiry message to the multiple adjacent terminals corresponding to described active terminal for realizing server, can a supporting application program accordingly, terminal is after installing this application program, authority can be set, to allow server to push this inquiry message to terminal。
Such as, inquiry message is sent to the application program of terminal by server, application program demonstrates pushed information and inquires whether this terminal use is ready to work in coordination with downloading object file, terminal use clicks " agreement " or " refusal " button that application program median surface is arranged, agree to download information or refusal download information to server feedback, be certainly also not limited to this type of implementation based on application program。
Additionally, server can pass through GPS (GlobalPositioningSystem, global positioning system) obtain the position of all terminals, reselection goes out the adjacent terminals centered by described active terminal in the preset range of position, such as, inquiry message is sent to the adjacent terminals within the scope of 50 meters of position centered by described active terminal。
S103, information or refusal download information are downloaded in the agreement receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select adjacent terminals and described active terminal jointly to set up Ad-Hoc network;
Concrete, in the first implementation, described selection adjacent terminals and described active terminal are jointly set up Ad-Hoc network and are: select all feedbacks to agree to that the described adjacent terminals of download information and described active terminal set up Ad-Hoc network jointly。
In embodiments of the present invention, as shown in Figure 1, server sends inquiry message to 4 adjacent terminals RN2 around active terminal RN1, RN3, RN4 and RN5, based on inquiry message, adjacent terminals RN2, RN3, RN4 reply and agree to download information, and adjacent terminals RN5 replys refusal download information, then server selects all feedbacks to agree to the described adjacent terminals of download information, i.e. adjacent terminals RN2, RN3 and RN4, sets up Ad-Hoc network jointly with described active terminal RN1;
Assume that the expense maximum that adjacent terminals RN2, RN3 and RN4 can accept corresponds to 3 yuan, 4 yuan and 5 yuan respectively, it is possible to the maximum time completing to download of acceptance corresponds to 2400s, 1800s and 1200s respectively。
In the second implementation, the expense of this terminal self is reduced by arranging the minimum expense maximum that can accept, it is preferable that described selection adjacent terminals and described active terminal are jointly set up Ad-Hoc network and be: select to meet the expense maximum that can accept and jointly set up Ad-Hoc network more than the adjacent terminals of default cost threshold and described active terminal in order to prevent from there is terminal。
Above-mentioned cost threshold can limit this type of by arranging the selfish node (i.e. terminal) that the minimum expense maximum that can accept reduces the expense of this terminal self, such as, when the cost threshold arranged is 1.5 yuan, there is an adjacent terminals, the expense maximum that can accept agreed in download information of its feedback is 1 yuan, the maximum time completing to download that can accept is 7200s, obviously, owing to 1 less than 1.5, server refuses this adjacent terminals and actively terminal establishment Ad-Hoc network。
Should be noted that following when downloading about a kind of collaborative in the embodiment of the present invention flow process of computational methods of expense allocation value be and be illustrated based on the first implementation above-mentioned。
S104, is downloaded the downloading task uniform distribution of described file destination to each terminal in described Ad-Hoc network;
Namely the downloading task amount that each terminal is corresponding is identical, in embodiments of the present invention, file destination be sized to 400M, therefore the downloading task that 4 terminals are assigned with is 100M。
S105, after the downloading process of each terminal in described Ad-Hoc network terminates, file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network。
The above-mentioned file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network, including step:
The first step: based on the expense maximum that can accept corresponding to the file size of described file destination, terminal, the maximum time completing to download that can accept, build Lagrangian, and obtain expense allocation computing formula based on its KKT condition。
Structure Lagrangian described herein, and obtain expense allocation computing formula based on its KKT condition, it is possible to for:
Determine that the utility function that each terminal is concrete is:
u i ( p i ) = C / p i T d , i ;
Expense optimal assignment problem in Ad-Hoc network system is converted into:
S Y S T E M = m a x p i &GreaterEqual; 0 &Sigma; i = 1 m u i ( p i ) ,
s . t . &Sigma; i = 1 m p r = P d ,
pi≤Pi,max, i=1,2 ... m;
Structure Lagrangian:
L ( P , &lambda; , &mu; ) = &Sigma; i = 1 m u i ( p i ) - &lambda; ( &Sigma; i = 1 m p i - P d ) - &Sigma; i = 1 m &mu; i ( P i , m a x - p i ) ;
Then KKT condition is:
p i &part; L &part; p i = p i ( - C / 4 T d , i p i - 3 2 - &lambda; + &mu; i ) = 0 ;
Determine that expense allocation computing formula is based on KKT formula:
p i = C 4 ( &mu; i - &lambda; ) 2 T d , i 3 ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;Ui(pi) for the resource value of utility of terminal i, C is the downloading task amount that terminal i is assigned with, piFor the expense allocation value of terminal i, Td,iFor terminal i can accept complete download maximum time, Pd is the total cost downloading described file destination, μiFor the LaGrange parameter μ corresponding to terminal i。
Certainly, in embodiments of the present invention, the active terminal RN1 in Ad-Hoc network, adjacent terminals RN2, RN3 and RN4 are numbered as terminal 1,2,3 and 4 respectively。
Second step: for each terminal, based on the expense allocation computing formula obtained, uses gradient descent method to adjust parameter μ and the λ of described Lagrangian, it is determined that the initial cost apportioning cost of each terminal。
Further, this step for each terminal, can particularly as follows:
S11: initial assignment λ(0)The μ corresponding with each terminal ii (0)
The parameter μ that parameter lambda is corresponding with each terminal iiInitial value λ corresponding respectively(0)And μi (0)Can randomly select, it can be mentioned that in this step, following for μ in order to makeiAdopt solving of gradient descent method to restrain as early as possible with λ, λ should be made(0)The μ corresponding with each terminal ii (0)Meet p i , m a x = p i ( 0 ) = C 4 ( &mu; i ( 0 ) - &lambda; ( 0 ) ) 2 T d , i 3 .
Such as, in the embodiment of the present invention, the expense maximum p that terminal i can be acceptedi,max, the maximum time T completing to download that can accept of the downloading task amount C that is assigned with of terminal i and terminal id,iBring expense allocation computing formula into and determine (μi (0)(0)) approximate 2, therefore can the corresponding λ of initial all of terminal(0)=5, μi (0)=3。
S12: based on current each terminal i expense allocation valueGradient descent method is used to adjust λ and μi, adjust λ and μiThe formula adopted is:
&lambda; ( t + 1 ) = | &lambda; ( t ) + &Delta; t ( &Sigma; i = 1 m p i ( t ) - P d ) | ,
&mu; i ( t + 1 ) = &mu; i ( t ) + &Delta; t ( p i , m a x - p i ( t ) ) ;
In embodiments of the present invention, the terminal i expense allocation value when non-iterationEqual to the expense maximum p that terminal i can accepti,max, then adjust λ and μ based on above-mentioned twoiThe formula adopted, tries to achieve λ(1)=4.925, μ1 (1)=3.009, μ2 (1)=3.082, μ3 (1)=3.160, μ4 (1)=2.875。
S13: based on seeking the λ calculated(t+1)With described expense allocation computing formula, calculateWhen all terminal i are correspondingDuring less than default maximum error value ε, it is determined that the initial cost apportioning cost of each terminal isOtherwise, update t=t+1 and return step S12;
Wherein, t represents the iterations using gradient descent method, λ(t)It is the value after the t time iteration,For corresponding to terminal i value after the t time iteration,For the expense allocation value that terminal i calculates when the t time iteration,For the terminal i expense allocation value when non-iteration, pi,maxFor the expense maximum that terminal i can accept, ΔtFor the iteration step length that default gradient declines, in the embodiment of the present invention, the value of the iteration step length that gradient declines is: during t > 0, ΔtWhen=0.1/t, t=0, Δt=0;The expense allocation value summation of all terminal i during for iteration the t time。
In the present embodiment, preset error value ε is 0.1, calculates p according to expense allocation computing formula1 (1)=1.908, p2 (1)=2.184, p3 (1)=2.404, p4 (1)=2.752, nowIt is clearly more than ε, so returning step S12 to readjust calculating;After iteration the 5th time, expense allocation value corresponding to each terminal is followed successively by p1 (5)=1.953, p2 (5)=2.363, p3 (5)=2.773, p4 (5)=3.362, nowLess than ε, so the expense allocation value that after the 5th iteration, each terminal is corresponding is its initial cost apportioning cost。
Should be noted that herein, server can after initial cost apportioning cost be determined, namely each terminal use being collected the charges according to the initial cost apportioning cost of its correspondence, certainly, server can also rethink terminal after following ultimate cost apportioning cost is determined and collect the charges。
3rd step: based on completeness to each downloading task of distribution of the initial cost apportioning cost of each terminal and described terminal and actual download time, calculate the ultimate cost apportioning cost of each terminal。
The first formula utilized for the ultimate cost apportioning cost of each terminal of described calculating is:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) T i > T d , i ;
Wherein,For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task is completed for terminal i。
When terminal i complete actual download time of its downloading task more than terminal i can accept when completing the maximum time downloaded, in view of the compensation to this terminal i, the ultimate cost apportioning cost of terminal i isCertainly less than the preliminary expense allocation value that server before is collected, the ultimate cost apportioning cost of terminal i, therefore, if namely each terminal use is collected the charges after determining by server initial cost apportioning cost according to the initial cost apportioning cost of its correspondence, now server also should return the expense having more to this terminal i。
Additionally, described collaborative download solicited message and described agreement in the embodiment of the present invention are downloaded information and are all also included the penalty rate that terminal self is preset, therefore the completeness of the described initial cost apportioning cost based on each terminal and the described terminal downloading task to each distributing and actual download time, calculate the ultimate cost apportioning cost of each terminal, including:
The penalty rate preset based on the initial cost apportioning cost of each terminal, terminal self and described terminal, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal。
Now, the second formula utilized for the ultimate cost apportioning cost of each terminal of described calculating is:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) ( 1 - pr i ) T i > T d , i ;
Wherein, priFor the penalty rate that terminal i is preset。
Assume in the embodiment of the present invention, 4 terminals actual download time respectively T to each downloading task of distribution1=3000, T2=2000, T3=2000, T4=1000, the completeness d to each downloading task of distribution1=d2=d3=d4=1, the penalty rate that each terminal is preset is pr1=pr2=pr3=pr4=0.2;Then calculate according to above-mentioned the second formula p &OverBar; 1 = 1.952 , p &OverBar; 2 = 2.363 , p &OverBar; 3 = 1.997 , p &OverBar; 4 = 3.362 .
In the present invention, the broken line graph of the iterative process of server computational costs allocative decision is as shown in Figure 4;If terminal 4 is set to selfish node, other condition is constant, as its expense maximum p that can accept of user setup of terminal 44,maxWhen=1.5 yuan, the iterative process of server computational costs allocative decision is such as shown in broken line graph Fig. 5, can be seen that the ultimate cost apportioning cost of terminal 4 does not decline more compared to the ultimate cost apportioning cost of terminal in Fig. 44 in the drawings, at about 2.7 yuan, illustrate that the algorithm of the embodiment of the present invention can suppress the behavior of selfish node。In Fig. 4 and Fig. 5, abscissa is iterations, and vertical coordinate is expense allocation value, RN1, RN2, RN3 and RN4 counterpart terminal 1,2,3 and 4 respectively in above-mentioned two figure。
In the embodiment of the present invention, the reason that can limit selfish node is in that: the embodiment of the present invention is improve the cost performance that user task is downloaded, using cost performance as the utility function of terminal use, here cost performance use terminal use the expense that pays on receptible speed ratio obtained;In order to avoid selfish node is by increasing its maximum time T completing to download that can acceptd,iAnd/or reduce its expense maximum p that can accepti,maxObtain less expense allocation, in utility function, cost performance is carried out evolution, thus the gap reduced between terminal utility function。Concrete utility function is as follows:
u i ( p i ) = C / p i T d , i ;
Above-mentioned selfish node is by increasing its maximum time T completing to download that can acceptd,iAnd/or reduce its expense maximum p that can accepti,maxObtain any terminal of less expense allocation。
The computational methods of expense allocation value during a kind of collaborative download that the embodiment of the present invention provides, for collaborative download problem to identical file in Ad-Hoc network, agreement according to the collaborative download solicited message and passive terminal that include actively mobile terminal is downloaded information and is determined expense allocation scheme, above-mentioned collaborative download solicited message and agreement download information all include counterpart terminal the expense maximum that can accept and the maximum time completing to download that can accept of user's input, the expense maximum that terminal can accept and the maximum time completing to download represent the demand of user, therefore the embodiment of the present invention is the demand according to user determines expense allocation value, make allocative decision more reasonable。
Corresponding to said method embodiment, the embodiment of the present invention additionally provides the calculation element of expense allocation value during a kind of collaborative download, as it is shown on figure 3, include:
Data obtaining module 210, fileinfo for obtaining the file destination that the need that actively terminal sends are downloaded downloads solicited message with collaborative, described fileinfo includes file size and the file description information of described file destination, and described collaborative download solicited message includes the expense maximum that described active terminal can accept and the maximum time completing to download that can accept。
Inquiry message sending module 220, for the file size based on described file destination, determine the total cost downloading described file destination, and send inquiry message to the multiple adjacent terminals corresponding to described active terminal, so that information or refusal download information are downloaded in the agreement that described adjacent terminals is directed to described file destination based on described inquiry message feedback;Wherein, multiple adjacent terminals corresponding to described active terminal are: be positioned at the terminal of the preset range of position centered by described active terminal, described inquiry message includes the file size of described file destination, file description information and described total cost, and described agreement is downloaded information and included the expense maximum that corresponding adjacent terminals can accept and the maximum time completing to download that can accept。
Network construction module 230, information or refusal download information are downloaded in the agreement for receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select adjacent terminals and described active terminal jointly to set up Ad-Hoc network。
Downloading task distribution module 240, for giving each terminal in described Ad-Hoc network to be downloaded the downloading task uniform distribution of described file destination。
Expense allocation value computing module 250, after terminating for the downloading process of each terminal in described Ad-Hoc network, file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network。
The calculation element of expense allocation value during a kind of collaborative download that the embodiment of the present invention provides, for collaborative download problem to identical file in Ad-Hoc network, agreement according to the collaborative download solicited message and passive terminal that include actively mobile terminal is downloaded information and is determined expense allocation scheme, above-mentioned collaborative download solicited message and agreement download information all include counterpart terminal the expense maximum that can accept and the maximum time completing to download that can accept of user's input, the expense maximum that terminal can accept and the maximum time completing to download represent the demand of user, therefore the embodiment of the present invention is the demand according to user determines expense allocation value, make allocative decision more reasonable。
Concrete, described network construction module 230 specifically for:
Information or refusal download information are downloaded in the agreement receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select all adjacent terminals and described active terminal jointly to set up Ad-Hoc network;
Or, information or refusal download information are downloaded in the agreement receiving described adjacent terminals feedback, and agree to the described adjacent terminals of download information from feedback, select to meet the expense maximum that can accept and jointly set up Ad-Hoc network more than the adjacent terminals of default cost threshold and described active terminal。
Concrete, described expense allocation value computing module 250 specifically includes:
Expense allocation computing formula obtains submodule, for after the downloading process of each terminal in described Ad-Hoc network terminates, based on the expense maximum that can accept corresponding to the file size of described file destination, terminal, the maximum time completing to download that can accept, build Lagrangian, and obtain expense allocation computing formula based on its KKT condition。
Described expense allocation computing formula obtain submodule specifically for:
After the downloading process of each terminal in described Ad-Hoc network terminates, based on the expense maximum that can accept corresponding to the file size of described file destination, terminal, the maximum time completing to download that can accept,
Determine that the utility function that each terminal is concrete is:
u i ( p i ) = C / p i T d , i ;
Expense optimal assignment problem in Ad-Hoc network system is converted into:
S Y S T E M = m a x p i &GreaterEqual; 0 &Sigma; i = 1 m u i ( p i ) ,
s . t . &Sigma; i = 1 m p i = P d ,
pi≤Pi,max, i=1,2 ... m;
Structure Lagrangian:
L ( P , &lambda; , &mu; ) = &Sigma; i = 1 m u i ( p i ) - &lambda; ( &Sigma; i = 1 m p i - P d ) - &Sigma; i = 1 m &mu; i ( P i , m a x - p i ) ;
Then KKT condition is:
p i &part; L &part; p i = p i ( - C / 4 T d , i p i - 3 2 - &lambda; + &mu; i ) = 0 ;
Determine that expense allocation computing formula is based on KKT formula:
p i = C 4 ( &mu; i - &lambda; ) 2 T d , i 3 ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;Ui(pi) for the resource value of utility of terminal i, C is the downloading task amount that terminal i is assigned with, piFor the expense allocation value of terminal i, Td,iFor terminal i can accept complete download maximum time, Pd is the total cost downloading described file destination, μiFor the LaGrange parameter μ corresponding to terminal i。
Initial cost apportioning cost determines submodule, for for each terminal, based on the expense allocation computing formula obtained, uses gradient descent method to adjust parameter μ and the λ of described Lagrangian, it is determined that the initial cost apportioning cost of each terminal。
Initial cost apportioning cost described herein determines that submodule includes:
Initial assignment unit, for initial assignment λ(0)The μ corresponding with each terminal ii (0);Further, initial assignment λ(0)The μ corresponding with each terminal ii (0), λ should be made(0)The μ corresponding with each terminal ii (0)Meet p i , m a x = p i ( 0 ) = C 4 ( &mu; i ( 0 ) - &lambda; ( 0 ) ) 2 T d , i 3
Parameter adjustment unit, for based on current each terminal i expense allocation valueGradient descent method is used to adjust λ and μi, adjust λ and μiThe formula adopted is:
&lambda; ( t + 1 ) = | &lambda; ( t ) + &Delta; t ( &Sigma; i = 1 m p i ( t ) - P d ) | ,
&mu; i ( t + 1 ) = &mu; i ( t ) + &Delta; t ( p i , m a x - p i ( t ) ) ;
Initial cost apportioning cost computing unit, for based on λ(t+1)With described expense allocation computing formula, calculateWhen all terminal i are correspondingDuring less than default maximum error value ε, it is determined that the initial cost apportioning cost of each terminal isOtherwise, update t=t+1 to bring in parameter adjustment unit;
Wherein, t represents the iterations using gradient descent method, λ(t)It is the value after the t time iteration,For corresponding to terminal i value after the t time iteration,For the expense allocation value that terminal i calculates when the t time iteration,For the terminal i expense allocation value when non-iteration, pi,maxFor the expense maximum that terminal i can accept, ΔtFor the iteration step length that default gradient declines,The expense allocation value summation of all terminal i during for iteration the t time。
Ultimate cost apportioning cost calculating sub module, is used for completeness and the actual download time of the initial cost apportioning cost based on each terminal and the described terminal downloading task to each distributing, calculates the ultimate cost apportioning cost of each terminal。
Ultimate cost apportioning cost calculating sub module described herein calculates the first formula that the ultimate cost apportioning cost of each terminal utilizes include:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task is completed for terminal i。
On the other hand, described collaborative download solicited message and described agreement are downloaded information and are all also included the penalty rate that terminal self is preset,
Then ultimate cost apportioning cost calculating sub module now specifically for:
The penalty rate preset based on the initial cost apportioning cost of each terminal, terminal self and described terminal, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal。
And the second formula that the ultimate cost apportioning cost now calculating each terminal in described ultimate cost apportioning cost calculating sub module utilizes includes:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) ( 1 - pr i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task, pr is completed for terminal iiFor the penalty rate that terminal i is preset。
It should be noted that in this article, terminal i represents the terminal being numbered i, and its practical significance is identical with terminal, is for only for ease of the explanation of formula。It addition, the relational terms of such as first and second or the like is used merely to separate an entity or operation with another entity or operating space, and not necessarily require or imply the relation that there is any this reality between these entities or operation or sequentially。And, term " includes ", " comprising " or its any other variant are intended to comprising of nonexcludability, so that include the process of a series of key element, method, article or equipment not only include those key elements, but also include other key elements being not expressly set out, or also include the key element intrinsic for this process, method, article or equipment。When there is no more restriction, statement " including ... " key element limited, it is not excluded that there is also other identical element in including the process of described key element, method, article or equipment。
Each embodiment in this specification all adopts relevant mode to describe, between each embodiment identical similar part mutually referring to, what each embodiment stressed is the difference with other embodiments。Especially for device embodiment, owing to it is substantially similar to embodiment of the method, so what describe is fairly simple, relevant part illustrates referring to the part of embodiment of the method。
One of ordinary skill in the art will appreciate that all or part of step realizing in said method embodiment can be by the hardware that program carrys out instruction relevant and completes, described program can be stored in computer read/write memory medium, the storage medium obtained designated herein, as: ROM/RAM, magnetic disc, CD etc.。
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention。All make within the spirit and principles in the present invention any amendment, equivalent replacement, improvement etc., be all contained in protection scope of the present invention。

Claims (10)

1. the computational methods of expense allocation value during a collaborative download, it is characterised in that described method includes step:
The fileinfo obtaining the file destination that the need that actively terminal sends are downloaded downloads solicited message with collaborative, described fileinfo includes file size and the file description information of described file destination, and described collaborative download solicited message includes the expense maximum that described active terminal can accept and the maximum time completing to download that can accept;
File size based on described file destination, determine the total cost downloading described file destination, and send inquiry message to the multiple adjacent terminals corresponding to described active terminal, so that information or refusal download information are downloaded in the agreement that described adjacent terminals is directed to described file destination based on described inquiry message feedback;Wherein, multiple adjacent terminals corresponding to described active terminal are: be positioned at the terminal of the preset range of position centered by described active terminal, described inquiry message includes the file size of described file destination, file description information and described total cost, and described agreement is downloaded information and included the expense maximum that corresponding adjacent terminals can accept and the maximum time completing to download that can accept;
Information or refusal download information are downloaded in the agreement receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select adjacent terminals and described active terminal jointly to set up Ad-Hoc network;
It is downloaded the downloading task uniform distribution of described file destination to each terminal in described Ad-Hoc network;
After the downloading process of each terminal in described Ad-Hoc network terminates, file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network。
2. method according to claim 1, it is characterised in that described selection adjacent terminals and described active terminal set up Ad-Hoc network jointly, including:
All adjacent terminals and described active terminal is selected jointly to set up Ad-Hoc network;
Or, select to meet the expense maximum that can accept and jointly set up Ad-Hoc network more than the adjacent terminals of default cost threshold and described active terminal。
3. method according to claim 1, it is characterized in that, the described file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network, including:
Based on the expense maximum that can accept corresponding to the file size of described file destination, terminal, the maximum time completing to download that can accept, build Lagrangian, and obtain expense allocation computing formula based on its KKT condition;
For each terminal, based on the expense allocation computing formula obtained, gradient descent method is used to adjust parameter μ and the λ of described Lagrangian, it is determined that the initial cost apportioning cost of each terminal;
Based on completeness to each downloading task of distribution of the initial cost apportioning cost of each terminal and described terminal and actual download time, calculate the ultimate cost apportioning cost of each terminal。
4. method according to claim 3, it is characterised in that described structure Lagrangian, and obtain expense allocation computing formula based on its KKT condition, including:
Determine that the utility function that each terminal is concrete is:
u i ( p i ) = C / p i T d , i ;
Expense optimal assignment problem in Ad-Hoc network system is converted into:
S Y S T E M = m a x p i &GreaterEqual; 0 &Sigma; i = 1 m u i ( p i ) ,
s . t . &Sigma; i = 1 m p i = P d ,
pi≤Pi,max, i=1,2 ... m;
Structure Lagrangian:
L ( P , &lambda; , &mu; ) = &Sigma; i = 1 m u i ( p i ) - &lambda; ( &Sigma; i = 1 m p i - P d ) - &Sigma; i = 1 m &mu; i ( P i , m a x - p i ) ;
Then KKT condition is:
p i &part; L &part; p i = p i ( - C / 4 T d , i p i - 3 2 - &lambda; + &mu; i ) = 0 ;
Expense allocation computing formula is determined based on KKT formula:
p i = C 4 ( &mu; i - &lambda; ) 2 T d , i 3 ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;Ui(pi) for the resource value of utility of terminal i, C is the downloading task amount that terminal i is assigned with, piFor the expense allocation value of terminal i, Td,iFor terminal i can accept complete download maximum time, Pd is the total cost downloading described file destination, μiFor the LaGrange parameter μ corresponding to terminal i。
5. method according to claim 4, it is characterised in that described based on the expense allocation computing formula obtained, uses gradient descent method to adjust parameter μ and the λ of described Lagrangian, it is determined that the initial cost apportioning cost of each terminal, including:
S11: initial assignment λ(0)The μ corresponding with each terminal ii (0)
S12: based on current each terminal i expense allocation valueGradient descent method is used to adjust λ and μi, adjust λ and μiThe formula adopted is:
&lambda; ( t + 1 ) = | &lambda; ( t ) + &Delta; t ( &Sigma; i = 1 m p i ( t ) - P d ) | ,
&mu; i ( t + 1 ) = &mu; i ( t ) + &Delta; t ( p i , m a x - p i ( t ) ) ;
S13: based on λ(t+1)With described expense allocation computing formula, calculateWhen all terminal i are correspondingDuring less than default maximum error value ε, it is determined that the initial cost apportioning cost of each terminal isOtherwise, update t=t+1 and return step S12;
Wherein, t represents the iterations using gradient descent method, λ(t)It is the value after the t time iteration,For corresponding to terminal i value after the t time iteration,For the expense allocation value that terminal i calculates when the t time iteration, For the terminal i expense allocation value when non-iteration, pi,maxFor the expense maximum that terminal i can accept, ΔtFor the iteration step length that default gradient declines,The expense allocation value summation of all terminal i during for iteration the t time。
6. method according to claim 5, it is characterised in that described initial assignment λ(0)The μ corresponding with each terminal ii (0)Including:
Initial assignment λ(0)The μ corresponding with each terminal ii (0), make λ(0)The μ corresponding with each terminal ii (0)Meet p i , m a x = p i ( 0 ) = C 4 ( &mu; i ( 0 ) - &lambda; ( 0 ) ) 2 T d , i 3 .
7. method according to claim 3, it is characterised in that the formula that the ultimate cost apportioning cost of each terminal of described calculating utilizes includes:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task is completed for terminal i。
8. method according to claim 3, it is characterised in that described collaborative download solicited message and described agreement are downloaded information and all also included the penalty rate that terminal self is preset,
The completeness of the described initial cost apportioning cost based on each terminal and the described terminal downloading task to each distributing and actual download time, calculate the ultimate cost apportioning cost of each terminal, including:
The penalty rate preset based on the initial cost apportioning cost of each terminal, terminal self and described terminal, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal。
9. method according to claim 8, it is characterised in that the formula that the ultimate cost apportioning cost of each terminal of described calculating utilizes includes:
p &OverBar; i = p i 1 d i T i < = T d , i p i 1 d i ( T d , i / T i ) ( 1 - pr i ) T i > T d , i ;
Wherein, the terminal number in Ad-Hoc network is 1,2,3 ... i ..., m;For the ultimate cost apportioning cost of terminal i,For the initial cost apportioning cost of terminal i, diFor the terminal i completeness to its downloading task, Td,iWhat terminal i can accept completes the maximum time of download, TiThe actual download time of its downloading task, pr is completed for terminal iiFor the penalty rate that terminal i is preset。
10. the calculation element of expense allocation value during a collaborative download, it is characterised in that described device includes:
Data obtaining module, fileinfo for obtaining the file destination that the need that actively terminal sends are downloaded downloads solicited message with collaborative, described fileinfo includes file size and the file description information of described file destination, and described collaborative download solicited message includes the expense maximum that described active terminal can accept and the maximum time completing to download that can accept;
Inquiry message sending module, for the file size based on described file destination, determine the total cost downloading described file destination, and send inquiry message to the multiple adjacent terminals corresponding to described active terminal, so that information or refusal download information are downloaded in the agreement that described adjacent terminals is directed to described file destination based on described inquiry message feedback;Wherein, multiple adjacent terminals corresponding to described active terminal are: be positioned at the terminal of the preset range of position centered by described active terminal, described inquiry message includes the file size of described file destination, file description information and described total cost, and described agreement is downloaded information and included the expense maximum that corresponding adjacent terminals can accept and the maximum time completing to download that can accept;
Network construction module, information or refusal download information are downloaded in the agreement for receiving described adjacent terminals feedback, and agree to from feedback, the described adjacent terminals of download information, select adjacent terminals and described active terminal jointly to set up Ad-Hoc network;
Downloading task distribution module, for giving each terminal in described Ad-Hoc network to be downloaded the downloading task uniform distribution of described file destination;
Expense allocation value computing module, after terminating for the downloading process of each terminal in described Ad-Hoc network, file size based on described file destination, and the expense maximum that can accept corresponding to each terminal in described Ad-Hoc network, the maximum time completing to download that can accept, to the completeness of each downloading task of distribution and actual download time, calculate the ultimate cost apportioning cost of each terminal in described Ad-hoc network。
CN201610032572.7A 2016-01-18 2016-01-18 The calculation method and device of expense allocation value when collaboration downloading Active CN105704694B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610032572.7A CN105704694B (en) 2016-01-18 2016-01-18 The calculation method and device of expense allocation value when collaboration downloading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610032572.7A CN105704694B (en) 2016-01-18 2016-01-18 The calculation method and device of expense allocation value when collaboration downloading

Publications (2)

Publication Number Publication Date
CN105704694A true CN105704694A (en) 2016-06-22
CN105704694B CN105704694B (en) 2019-02-19

Family

ID=56226459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610032572.7A Active CN105704694B (en) 2016-01-18 2016-01-18 The calculation method and device of expense allocation value when collaboration downloading

Country Status (1)

Country Link
CN (1) CN105704694B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108683515A (en) * 2018-05-11 2018-10-19 深圳市网心科技有限公司 Cost accounting method, client terminal, service server, network system and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102917054A (en) * 2012-10-18 2013-02-06 北京邮电大学 Vehicle-mounted network stream media prefetching method and device
US20130332621A1 (en) * 2012-06-08 2013-12-12 Ecole Polytechnique Federale De Lausanne (Epfl) System and method for cooperative data streaming
CN103475710A (en) * 2013-09-10 2013-12-25 镇江青思网络科技有限公司 Inter-vehicle cooperation downloading scheme based on feedback method
CN104539643A (en) * 2014-10-31 2015-04-22 哈尔滨工业大学深圳研究生院 Vehicular ad-hoc network (VANET) file transfer method based on traffic flow characteristics and network coding
CN104618447A (en) * 2014-12-31 2015-05-13 北京邮电大学 File cooperation downloading method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130332621A1 (en) * 2012-06-08 2013-12-12 Ecole Polytechnique Federale De Lausanne (Epfl) System and method for cooperative data streaming
CN102917054A (en) * 2012-10-18 2013-02-06 北京邮电大学 Vehicle-mounted network stream media prefetching method and device
CN103475710A (en) * 2013-09-10 2013-12-25 镇江青思网络科技有限公司 Inter-vehicle cooperation downloading scheme based on feedback method
CN104539643A (en) * 2014-10-31 2015-04-22 哈尔滨工业大学深圳研究生院 Vehicular ad-hoc network (VANET) file transfer method based on traffic flow characteristics and network coding
CN104618447A (en) * 2014-12-31 2015-05-13 北京邮电大学 File cooperation downloading method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CLAUDIA CAMPOLO等: "Scenario-adaptive and gain-aware content sharing policies for cooperative wireless environments", 《COMPUTER COMMUNICATIONS》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108683515A (en) * 2018-05-11 2018-10-19 深圳市网心科技有限公司 Cost accounting method, client terminal, service server, network system and medium
CN108683515B (en) * 2018-05-11 2021-12-03 深圳市网心科技有限公司 Fee accounting method, client terminal, service server, network system and medium

Also Published As

Publication number Publication date
CN105704694B (en) 2019-02-19

Similar Documents

Publication Publication Date Title
Zhang et al. A deep reinforcement learning based approach for cost-and energy-aware multi-flow mobile data offloading
Li et al. On social-aware content caching for D2D-enabled cellular networks with matching theory
Zhang et al. Optimal delay constrained offloading for vehicular edge computing networks
Mohapatra et al. A fault tolerant routing scheme for advanced metering infrastructure: an approach towards smart grid
Saad et al. Hedonic coalition formation for distributed task allocation among wireless agents
Nuggehalli et al. Energy-efficient caching strategies in ad hoc wireless networks
CN105050130B (en) A kind of construction method of multidimensional interference space model
CN102572736B (en) Inquiring and sending methods, device and system for hot information
Zarifzadeh et al. Energy-efficient topology control in wireless ad hoc networks with selfish nodes
Hui et al. A game theoretic scheme for optimal access control in heterogeneous vehicular networks
Cheng et al. Vehicle-assisted device-to-device data delivery for smart grid
Wang et al. Market-driven bandwidth allocation in selfish overlay networks
Zhang et al. Cost-and energy-aware multi-flow mobile data offloading using Markov decision process
Hagenauer et al. Parked cars as virtual network infrastructure: Enabling stable V2I access for long-lasting data flows
Lyu et al. A stackelberg game model for overlay D2D transmission with heterogeneous rate requirements
CN104010329A (en) Distributed load balancing method based on quantified unbiased broadcast Gossip algorithm
Mavromoustakis Mitigating file‐sharing misbehavior with movement synchronization to increase end‐to‐end availability for delay sensitive streams in vehicular P2P devices
Bhandari et al. Resource oriented topology construction to ensure high reliability in IoT based smart city networks
Lee et al. Transfer time, energy, and quota-aware multi-RAT operation scheme in smartphone
Yao et al. Encounter probability aware task assignment in mobile crowdsensing
Dua et al. Game theoretic approach for real-time data dissemination and offloading in vehicular ad hoc networks
CN105704694A (en) Method and device for computing expense allocation value in cooperative downloading
Korcak et al. Competition and regulation in a wireless operator market: An evolutionary game perspective
Sharma Energy efficient target set selection and buffer management for D2D mobile data offloading
CN102238089A (en) Service interaction method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant