CN104580371B - File is fixed and variable-size fragment, transmission, copy control methods in opportunistic network - Google Patents
File is fixed and variable-size fragment, transmission, copy control methods in opportunistic network Download PDFInfo
- Publication number
- CN104580371B CN104580371B CN201410759132.2A CN201410759132A CN104580371B CN 104580371 B CN104580371 B CN 104580371B CN 201410759132 A CN201410759132 A CN 201410759132A CN 104580371 B CN104580371 B CN 104580371B
- Authority
- CN
- China
- Prior art keywords
- fragment
- output stage
- node
- data
- index level
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/18—Automatic repetition systems, e.g. Van Duuren systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/18—Automatic repetition systems, e.g. Van Duuren systems
- H04L1/1867—Arrangements specially adapted for the transmitter end
- H04L1/188—Time-out mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses files in a kind of opportunistic network to fix and variable-size fragment, transmission, copy control methods, big file is divided into the fragment of fixed size or variable-size according to the message transmission rate and connection duration of opportunistic network by the present invention, and propose transmission method for fixed size fragment, fragment is carried out by the sharding method of the present invention, and individual transmission, under the premise of transmission success rate is ensured, it can be connected to greatest extent using current network, reduce the transport overhead that fragment control information is brought, while reduce propagation delay time;The copy control method of the present invention, by the way that the number of transmissions is carried out priority ranking, realize the rationalization of copy control, avoid occur in transfer copies certain a part of fragment copy it is excessive, and the situation that the copy of other parts fragment is very few, be conducive to improve the success rate of big file transmission and reduce propagation delay time.
Description
Technical field
The present invention relates to file transfer technology field, it is more particularly to file in a kind of opportunistic network and fixes and variable-size
Fragment, transmission, copy control methods.
Background technology
Opportunistic network is as the means communicated under non-full-mesh network environment, from delay-tolerant network.
Opportunistic network does not need to safeguard full link end to end, can not have to be laid with the communications infrastructure in advance, and node is utilized to move
Dynamic property establishes the link progress efficient communication for interrupting tolerance.The typical case scene of opportunistic network predominantly can not establish full-mesh
The environment of network, such as planetary networks communication, network transmission from far-off regions, wild animal tracking, portable equipment networking, vehicle-carrying communication
Net, military self-organizing network etc..Meanwhile with the extensive rise of Internet of Things, need non-full-mesh network can under certain scenes
Offer cost is relatively low, deployment efficiently communication service.Therefore, the communication pattern of opportunistic network is a kind of efficient in many scenes
Feasible network structure.
The usual moving range of node of this type network is larger, and network is in most cases in the shape that cannot be connected
State, the route pattern which results in traditional mobile ad hoc network can not be applied effectively.The application of network mainly according to
Rely the mobility of node and meet chance to assist data multi-hop transmission, the routing that mobile node communicates with one another with other nodes
It is entirely what dynamic was established, while node and does not know about whole network topology information.
Data transmission in opportunistic network has the characteristics that its own, mainly by " storage-carrying-forwarding " mechanism,
Utilize meeting chance and realize the data transmission under non-full unicom between node.On the one hand, due to mobile node point in network
Cloth is sparse, and movement speed is fast, occurs to the connection opportunistic between node, may not there is always ends between source node and destination node
To connection breaking network between the path of end.So when big file is transmitted in opportunistic network, due to node meet not really
Qualitative and data transmission period after meeting uncertainty often causes big file not transmit complete and transmission is caused to be lost
It loses so that destination node needs to wait for source node to be communicated, then All Files are all transmitted again next time, so not only
The success rate of file transmission is reduced, while also increases the time delay of network.
Existing opportunistic network research for the transmission of big file without proposing effective slicing scheme, and due to opportunistic network
Following several characteristics:Link is intermittently connected, communication delay is high, Internet resources are limited, the isomerism of opportunistic network, causes big
Often there are following several problems in the transmission of file:
(1) transmission process is interrupted
Such case big file is easiest to a kind of scene encountered when being transmitted in opportunistic network, opportunistic network is inherently
By node motion, meet, establish connection.The connection duration is uncontrollable between this results in node, in such as vehicle-mounted net, two rows
The vehicle sailed meets and detaches and completed within a very of short duration time, it is more likely that does not exceed 1 minute, so of short duration
The data volume that can transmit of time be very limited, interruption is generated in transmission process to a little bigger file, after interruption,
When reencountering, it is still desirable to transmit from the beginning, connecting the limitation of duration causes transmission success rate very low.
(2) there is mistake in transmission process
Opportunistic network is mainly to rely on what wireless communication module was transmitted, such as bluetooth, wifi, and be likely to be
It communicates in the case where there is certain movement speed, signal is in itself it is possible that weaker;In addition because frequency range used is public affairs
With frequency range, and transmission environment is more complicated, therefore is probably interfered by other communication equipments.More than 2 points data is caused to pass
Will appear packet loss and mistake very in maximum probability during defeated, find mistake occur after data transmission finishes, then need by
Entire file retransmits, this can bring the waste of resource, lowers transmission success rate.
(3) spatial cache is inadequate
The transmission mechanism of opportunistic network is " carrying-Store and forword ", thus each node in addition to store the data of oneself it
Outside, the effect of relaying is also served as, caches the required data of other nodes.This mechanism easilys lead to nodal cache pressure
Power, the data if necessary to relaying are larger, it may appear that and inadequate situation is cached, other nodes can only be found and relayed, this meeting
Propagation delay time is caused to become larger.
Invention content
(1) technical problems to be solved
The success rate transmitted in opportunistic network the technical problem to be solved by the present invention is to how improve big file, drops simultaneously
Low transmission time delay.
(2) technical solution
In order to solve the above technical problem, the present invention provides file fixed size sharding method in a kind of opportunistic network,
Include the following steps:
S11, file are divided into the fragment of two or more fixed sizes;
S12, data object is generated for each fragment, wherein the data object includes corresponding control information sum number
It is believed that breath.
Preferably, in the step S11, the calculation formula of fragment size is
lenfrag=v*T
Wherein, lenfragFor the fragment size, v is the message transmission rate of equipment, and T is the connection duration.
Preferably, the control information includes destination address, source file number, source file size, source file title, source document
Part title verification information, data integrity degree verification information, retrieval match information, digital signature and fragment number;
Wherein, the source file title verification information is used to verify the correctness of source file title;
The data integrity degree verification information is used to verify the integrality of the data information of corresponding fragment;
The retrieval match information is used for the retrieval and matching of the fragment;
The fragment numbers to characterize position of the fragment in source file;
The digital signature is used to characterize the data source of the fragment.
A kind of copy control method of fixed size fragment, including:
The fragment of same source file is ranked up from less to more according to the number of transmissions, wherein the number of transmissions is few
The fragment priority it is high, the priority of the fragment more than the number of transmissions is low;
When meeting with new relay node, the fragment is transmitted, and transmit institute according to the sequence of priority from high to low
When stating fragment, whether before first determining whether to the probability of the destination address to be more than from new relay node relay node is to described
The maximum probability of destination address, if more than the fragment to be then transmitted to new relay node, otherwise without transmitting.
File variable-size sharding method, includes the following steps in a kind of opportunistic network:
S31, file are divided into the index level fragment of two or more fixed sizes;
S32, index level data object is generated for each index level fragment, wherein the index level data object includes
Corresponding index level control information and index level data information;
S33, each index level fragment is divided into two or more output stage fragments;
S34, output stage data object is generated for each output stage fragment, wherein the output stage data object includes
Output stage controls information and output stage data information.
Preferably, in the step S33, the calculation formula of output stage fragment size is
lentrans=Tava*Vava*λ
Wherein, lentransFor the size of the output stage fragment, TavaFor average connection duration, VavaFor average transmission
Rate, λ are the inverse for the number that the output stage fragment is transmitted within the connection duration of prediction.
Preferably, the calculation formula of the averagely connection duration is:
Tava=Told*α*γk+Tcurrent*(1-α*γk)
Wherein, ToldDuration, T are averagely connected for historycurrentCurrently to connect duration, α ∈ [0,1], characterization
The history averagely connects duration proportion for accounting in the average connection duration, γ ∈ [0,1) for time decay factor,
K is the number that the source file reaches the destination address elapsed time unit.
Preferably, the calculation formula of the average transmission rate is:
Vava=Vold*α*γk+Vcurrent*(1-α*γk)
Wherein, VoldFor history average transmission rate, VcurrentFor current transmission rate, α ∈ [0,1] characterize the history
The proportion that average transmission rate accounts in average transmission rate, and γ ∈ [0,1) it is time decay factor, k is arrived for the source file
Up to the number of the destination address elapsed time unit.
A kind of transmission method of variable-size fragment, includes the following steps:
S41, it is matched by the index level fragment and with the node that it meets, if successful match, by the index
Grade fragment is divided into two or more output stage fragments, and is each output stage fragment generation output level data pair
As;
Whether S42, the node are to having possessed the data object of the output stage fragment and having judged, if having gathered around
Have, then return to the information of rejection, otherwise, whether the data source of the output stage fragment is judged safely, if peace
Entirely, then reception information is returned, otherwise, returns to rejection information;
S43, the output stage fragment send data information to the node;
After S44, the node have received the data information, the integrity degree of the data information of reception is judged, if
The data information of reception is complete, then stores the data information into database;Otherwise, the data information of reception is abandoned;
If S45, the output stage fragment are the initial fragment of the source file, foundation can interrupt data object, by institute
The data information for stating output stage fragment is read into the file that the destination address is directed toward;
S46, the node are according to initial position of the output stage fragment in the index level fragment and described defeated
Go out end position of grade fragment in the index level fragment, into the recombination of horizontal output stage fragment data information, obtain the index
Grade fragment;
S47, the node recombinate the data information of index level fragment, obtain source file.
Preferably, in the step S45, interruption is encountered during data transmission, then can interrupt data pair described in setting
The interrupt flag bit of elephant;When the node encounters other nodes, the data object that interrupts is passed into the new node that meets;
The new node searches data object corresponding with the index level fragment, if finding, at the end byte of the reception
It resumes.
(3) advantageous effect
The present invention provides file fixation and variable-size fragment, transmission, copy control methods in a kind of opportunistic network, wherein
File fixed size sharding method in opportunistic network, between the opportunistic network node of present communications state it is unrelated also with entire chance
Nodes collision probability is unrelated, has stronger robustness, adapts to the poor scene of reliability, and because fragment size
Identical, controllability is stronger, is very suitable for copy control.File variable-size sharding method is that basis works as the first two in opportunistic network
Network status between communication node connects the duration with history to determine fragment size, because close with current network conditions relationship
It cuts, therefore is suitable for the relatively reliable situation of network environment;The present invention is ensureing transmission success by the way that big file is carried out fragment
It under the premise of rate, can be connected to greatest extent using current network, reduce the transport overhead that fragment control information is brought, together
When reduce propagation delay time;
The present invention copy control method, realize copy control rationalization, avoid occur in transfer copies it is a certain
The copy of part fragment is excessive, and the situation that the copy of other parts fragment is very few, is conducive to improve the success of big file transmission
Rate and reduction propagation delay time.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with
Other attached drawings are obtained according to these attached drawings.
Figure 1A is the flow chart of file fixed size sharding method in opportunistic network of the invention;
Flow charts of the Figure 1B for file fixed size sharding method in the opportunistic network of the preferred embodiment of the present invention;
Fig. 2 is the transmission method flow chart of file fixed size fragment in opportunistic network in the present invention;
Fig. 3 is the transmission method flow chart of file variable-size fragment in opportunistic network of the invention.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.Following embodiment is used to illustrate this hair
It is bright, but cannot be used for limiting the scope of the invention.
Figure 1A is the flow chart of file fixed size sharding method in opportunistic network of the invention;The opportunistic network Chinese
Part fixed size sharding method, includes the following steps:
S11, file are divided into the fragment of two or more fixed sizes;
S12, data object is generated for each fragment, wherein the data object includes corresponding control information sum number
It is believed that breath.
Flow charts of the Figure 1B for file fixed size sharding method in the opportunistic network of the preferred embodiment of the present invention.
Preferably, in the step S11, the calculation formula of fragment size is
lenfrag=v*T
Wherein, lenfragFor the fragment size, v is the message transmission rate of equipment, and T is the connection duration.
In the step S11, before file fragmentation first using file size more than given threshold as condition sentenced
It is disconnected, if so, the file is carried out fragment, otherwise, without fragment, directly transmit.
The control information includes destination address, source file number, source file size, source file title, source file title
Verification information, data integrity degree verification information, retrieval match information, digital signature and fragment number;Wherein, the source file
Title verification information is used to verify the correctness of source file title;The data integrity degree verification information is used to verify corresponding fragment
Data information integrality;The retrieval match information is used for the retrieval and matching of fragment;The fragment numbers to characterize
Position of the fragment in source file;The digital signature is used to characterize the data source of the fragment.
File fixed size sharding method is fixed due to the size of fragment in opportunistic network, so for fixed size fragment side
Method.Opportunistic network has open and transmission process uncontrollability, therefore relative to other reliable networks, it is ensured that data are just
Really transmission needs to transmit more control information while data transmission, and receiving terminal judges to receive by these control information
Whether the data information arrived is safe, complete.These control information are subjected to tissue with xml forms, integrates and is transmitted, such as
Under:
Above, it is described control information with all with<Haggle/>For root node, node<Haggle/>There are one attributes for tool
Persistent, when the property value is yes, the data object will be stored in database, when being no, then not enter data
Library.Data object is divided into two classes by the setting of the attribute:One kind is associated with database, in the same of storage data information
When the data object is put into database, the index of data is established, subsequently to be retrieved;It is another kind of be with database without
It closes, only plays the function of data object transmission.
Node<Attr/>It is the description to data, for opportunistic network when based on content transmission, the content of the node is retrieval
Keyword, for being matched with destination node (destination address corresponding node), to retrieve match information.The attribute
It for a key-value pair, is made of name and value, attributes of the name as the node, value is then as the value of the node.It should
Part is added by user according to data characteristics, and a data object can have multiple<Attr/>.
Node<Data/>There is 4 partial contents composition:1st, the data_len of source file size, the value conduct are characterized<Data/>
The attribute of node.2nd, the file storage path FilePath of characterization destination address.3rd, the FileName of source file title is characterized.4、
The source file title verification information FileHash added to verify source file title.Pass through<Data/>Content can be square
Just the length of data object deposit position and data information is accurately taken.
Last part is node<Signature/>It is digital signature, which is the value of sha-1, for characterize data
Source, for determining Information Security.
Other than xml above, control information also has two very important information:DataHash and Sourceid.
DataHash is the sha-1 value calculated according to source file content, can be with verification of data integrity by the value.
Sourcid is by described<Attr/>What key-value pair, source filename, creation time, source file size and DataHash were calculated
Sha-1, the calculating process ensure that the uniqueness of the value, therefore can be as the mark of source file.
By it is described above it is found that in control information during correct, reliable, complete for the data transmission of each field it is indispensable
, when carrying out fragment, in order to ensure the reliability of fragment, those above field still can not lack.In addition to this, in order to
The characteristic of fragment is characterized, other fields can be added on original field basis, so that control information further increases.In order to
Characterization fragment is taken as in the position of source file, one new field of definition, FragmentId, i.e. fragment number, the value of the field
The fragment is which fragment of source file, this information merges fragment and the copy control based on fragment has key
Meaning.
In the case where network reliability is poor, in order to reduce dependence of the fragment to network environment, we are by fragment
Size determines to be set as unrelated with current network, while fragment size can ensure to complete in more severe network environment as possible
Transmission.Fixed size sharding method has another advantage, i.e., each fragment is the determining of independent equality, this causes me
Each fragment individual independent as one can be treated, based on fragment copy control in have great significance.
The factor for influencing fragment size is poor medium transmission rate and the worst average Connection Time, i.e., common primary
At least ensure that a fragment being capable of transmission success in connection.
Wifi, the rating blocks rate of bluetooth are all higher, and nominal rated speed, and different model are not achieved in the actual environment
Facility information rate it is also different.In the test of opportunistic network experiment porch, the average speed that finding wifi can realize is
300KB/s, the rate that bluetooth can reach is in 100KB/s.By studying related data, reliable test result.
Using formula
lenfrag=v*T
In view of the general duration once connected is more than 10s, value 10s here.It is so as to obtain fragment size
1000KB。
Information overhead is controlled after fragment cost and fragment so that if to carrying out fragment compared with small documents, effect is instead
It is deteriorated, therefore, is ensureing that big file as possible can be on the basis of transmitting, in order to not influence small documents in opportunistic network as possible
In transmission, set in the slicing scheme fragment and given threshold lenthr, it is not when file size is less than the value
Fragment is carried out, is directly transmitted, which is set as 10MB.
After carrying out fragment to file, each fragment can serve as an independent individual and be transmitted, in order to reduce
The expense that fragment and Merging zone method come, in the node as relaying without merging, only can just carry out fragment in destination node
Merge, it is identical with source file to merge the data object generated later.
Transmission method flow charts of the Fig. 2 for file fixed size fragment in opportunistic network in the present invention, the fixed size
Fragment is using the fragment that file fixed size sharding method obtains in above-mentioned opportunistic network, is included the following steps:
S21, matched by the fragment and with the node that it meets, if the retrieval match information of the fragment with it is described
The information matches success of node, then pass to the node, otherwise by the fragment and other by the control information of the fragment
The node to meet is matched;
S22, the node are numbered according to the source file of the fragment and whether fragment number is to having possessed the fragment
Data object judged, if having been used to, return to the information of rejection, otherwise, according to the fragment number sign
Whether name judges safely the data source of the fragment, if safety, returns to reception information, otherwise, returns to refusal and connects
It collects mail and ceases;
S23, the fragment send data information to the node;
After S24, the node have received the data information, docked according to the data integrity degree verification information of the fragment
The integrity degree of the data information of receipts is judged, if the data information received is complete, the data information is stored into data
Library;Otherwise, the data information of reception is abandoned;
S25, the node number obtained all fragments according to the fragment, carry out the recombination of data information.
It, will if occurring mistake in transmission process during transmitting the control information or transmitting the data information
The burst information for generating mistake retransfers;If encountering interruption in transmission process, the information transmitted is stored to described
In the caching of node, until reconnecting, continue to transmit.
The copy control method of the fragment obtained according to above-mentioned fixed size sharding method is specially:
Store a table in each node, the content in table is the transmission situation of all fragments, as shown in table 2 below:
Table 2
The fragment of same source file is ranked up from less to more according to the number of transmissions, wherein the few institute of the number of transmissions
The priority for stating fragment is high, and the priority of the fragment more than the number of transmissions is low;When meeting with new relay node, according to preferential
The sequence of grade from high to low transmits the fragment, in upper table, belongs to 1,2,3 fragments in 6 fragments of source file 2 and has transmitted
After twice, in order to make 4,5,6 copy amounts existing in a network as possible with 1 in current network, 2,3 fragment quantity phases
Together, therefore preferentially 4,5,6 are transmitted, if having transmitted 4,5,6, connect still continue just to consider transmission 1,2,3.
If a file is larger, and it is shorter to connect the duration, transmits generate interruption after fragment 1,2,3 for the first time,
If not doing above-mentioned strategy, later, when meeting every time, always since the 1st fragment, then there may be a large amount of in network
Fragment smaller id, and bigger id fragment and can not be transferred in network, therefore cause big file that can not transmit success.
After above-mentioned strategy, it can preferably evade the above problem, realize the validity of sliced transmission.The above method mainly for
Fixed size sharding method.
When transmitting the fragment, first determine whether the probability from the new relay node to the destination address is more than
Before relay node to the destination address maximum probability (in table 2, the probability of relay node to destination node), if more than,
The fragment is then transmitted to the new relay node, and updates relay node described in table 2 to the probability value of destination node,
Otherwise without transmitting.
Fixed size sharding method can improve the transmission success rate of big file, but the strategy does not fully consider communication
The concrete condition of node, and in order to ensure data transmission, the fragment size of setting also as possible small, causes so not control
The redundancy that information introduces is preferably minimized;In order to reduce the redundancy that control information is brought as far as possible, it is proposed that fragment size is variable
Sharding method, which takes full advantage of historical data and transmits information, according to historical information so that fragment is big as possible, with this
Fragment quantity is reduced, so as to reducing control informational capacity.
File variable-size sharding method in the opportunistic network of the present invention, includes the following steps:
S31, file are divided into the index level fragment of two or more fixed sizes;
S32, index level data object is generated for each index level fragment, wherein the index level data object includes
Corresponding index level control information and index level data information;
S33, each index level fragment is divided into two or more output stage fragments;
S34, output stage data object is generated for each output stage fragment, wherein the output stage data object includes
Output stage controls information and output stage data information.
In order under the premise of the redundancy that control information introduces is reduced to the greatest extent, facilitate the retrieval and conjunction of fragment in opportunistic network
And big file is first divided into the fragment of appropriate fixed size herein, such fragment is the base unit of retrieval and merging, claims such
Fragment is index level fragment.Then it carries out the fragment of variable-size again to index level fragment, is determined according to the situation of communication node
Determine fragment size so that fragment is big as possible, reduces fragment quantity with this, so as to reduce control informational capacity, claims such fragment
For output stage fragment.
The effect of index level fragment is mainly used to be retrieved, and the size of such fragment is mainly determined by two aspects:It is convenient
The redundancy that control information is brought is retrieved and cannot be increased to fragment.Only complete index level fragment can be retrieved, if
Index level fragment is excessive, then is likely to occur relay node and has received certain data, but because do not index fraction completely
Piece so can not be relayed, can increase propagation delay time, therefore index level fragment should not be too large in this way.If index level fragment
It is too small, multiple index level fragments can be transmitted in the connection of a normal chance, then index level fragment will increase control letter
The redundancy introduced is ceased, the advantage of this sharding method can not be played.Therefore index level fragment is unsuitable too small.
Based on above-mentioned analysis, index level fragment size will be determined according to the characteristic of opportunistic network.Here it can use for reference solid
Determine the determining method of size fragment, the transmission rate that duration and equipment are connected according to chance network determines index fraction
The size of piece, the i.e. calculation formula of index level fragment size are
lenfrag=v*T
Wherein, lenfragFor the index level fragment size, v is the message transmission rate of equipment, when T continues for connection
Between.
If whole index fragment can be transferred within the duration, index level fragment is directly transmitted, is not needed to again
A grade fragment is transmitted, therefore in the step S31, it is more than before index level fragmentation threshold first with file size to carry out fragment
Judged for condition, if so, fragment is carried out, otherwise, without fragment.Each file will be indexed a grade fragment, such as
Fruit file is less than index level fragment size in itself, then only generates an index level fragment.
In the step S33, carry out fragment before, first using index level fragment be more than output stage fragmentation threshold as condition into
Row judges, if so, carrying out fragment, otherwise without fragment, directly transmits.
The index level control information includes destination address, source file number, source file size, source file title, source document
Part title verification information, data integrity degree verification information, retrieval match information, digital signature and fragment number;Wherein, it is described
Source file title verification information is used to verify the correctness of source file title;The data integrity degree verification information is for verification pair
Answer the integrality of the data information of index level fragment;The retrieval match information is used for the retrieval and matching of index level fragment;Institute
Fragment number is stated for characterizing position of the index level fragment in source file;The digital signature is used to characterize the index
The data source of grade fragment.
In the step S33, the calculation formula of output stage fragment size is
lentrans=Tava*Vava*λ
Wherein, lentransFor the size of the transmitting stage fragment, TavaFor average connection duration, VavaFor average transmission
Rate, λ are the inverse for the number that the output stage fragment is transmitted within the connection duration of prediction, our values 1/2.2, i.e.,
2.2 fragments, this value can be transmitted within the connection duration of prediction, it is ensured that can within the connection duration
One or two fragments are transmitted, neither influence sliced transmission success rate, and control information can be minimized.
The historical information of node collision probability and data transmission in order to obtain, this paper presents a kind of improved Prophet
Routing algorithm TV_Prophet, T represent the historical information that the routing algorithm includes the connection duration, and V represents the routing algorithm
Include the historical information of internodal data transmission rate.
TV_Prophet algorithms store routing iinformation into a chained list, and list structure is as follows:
The storage organization of 1 TV_Prophet of table
The corresponding collision probability value of two nodes, average connection can be found by two values of Sourceid and Destid
Duration and average transmission rate.The value of P is collision probability, and computational methods are not gone to live in the household of one's in-laws on getting married here as Prophet methods
It states.
Wherein, the calculation formula of the averagely connection duration is:
Tava=Told*α*γk+Tcurrent*(1-α*γk)
Wherein, ToldDuration, T are averagely connected for historycurrentCurrently to connect duration, α ∈ [0,1], characterization
The history averagely connects duration proportion for accounting in the average connection duration, γ ∈ [0,1) for time decay factor,
K is the number that the source file reaches the destination address elapsed time unit.
The calculation formula of the average transmission rate is:
Vava=Vold*α*γk+Vcurrent*(1-α*γk)
Wherein, VoldFor history average transmission rate, VcurrentFor current transmission rate, α ∈ [0,1] characterize the history
The proportion that average transmission rate accounts in average transmission rate, and γ ∈ [0,1) it is time decay factor, k is arrived for the source file
Up to the number of the destination address elapsed time unit.
Output stage control information include the destination address, source file number, source file size, source file title,
Source file title verification information, data integrity degree verification information, digital signature, fragment number, the output stage fragment are described
Initial position and the output stage fragment in index level fragment are in the end position of the index level fragment;Wherein, it is described
Source file title verification information is used to verify the correctness of source file title;The data integrity degree verification information is for verification pair
Answer the integrality of the data information of output stage fragment;The fragment numbers to characterize the index level fragment in source file
Position;The digital signature is used to characterize the data source of the index level fragment.
Transmission method flow charts of the Fig. 3 for file variable-size fragment in the opportunistic network of the present invention, the variable-size
Fragment is utilizes the fragment that file variable-size sharding method obtains in above-mentioned opportunistic network;It the described method comprises the following steps:
S41, it is matched by the index level fragment and with the node that it meets, if the retrieval of the index level fragment
Information matches success with information and the node, then be divided into two or more output fractions by the index level fragment
Piece, and generate output stage data object for each described output stage fragment;Otherwise by the index level fragment with other and its
The node to meet is matched;
S42, the node are numbered according to the source file of the output stage fragment, fragment number, the output stage fragment exist
Initial position and the output stage fragment in the index level fragment the index level fragment end position to whether
The data object for having possessed the output stage fragment is judged, if having possessed, returns to the information of rejection, no
Then, whether the data source of the output stage fragment is pacified according to the digital signature of the corresponding index level fragment of the output stage fragment
Judged entirely, if safety, returns to reception information, otherwise, return to rejection information;
S43, the output stage fragment send data information to the node;
After S44, the node have received the data information, verified and believed according to the data integrity degree of the output stage fragment
Breath judges the integrity degree of the data information of reception, if the data information received is complete, the data information is stored
Enter database;Otherwise, the data information of reception is abandoned;
If S45, the output stage fragment are the initial fragment of the source file, foundation can interrupt data object, by institute
The data information for stating output stage fragment is read into the file that the destination address is directed toward;Otherwise, it is determined whether in the presence of that can interrupt
Data object, if in the presence of, directly the data information of the output stage fragment is read into the file that the destination address is directed toward,
Otherwise, the information of output stage fragment is stored in and cached, data object can be interrupted until establishing, then fragment write-in can be interrupted into data
In object specified file;
S46, the data object being successfully received write data into the file that can interrupt data object direction successively in order
In, if entire file has smoothly received, starting of the node according to the output stage fragment in the index level fragment
Position and the output stage fragment the index level fragment end position, into the weight of horizontal output stage fragment data information
Group, obtains the index level fragment, and deletion can interrupt data object;
S47, the node are numbered according to the fragment, and the data information of index level fragment is recombinated.
It is described interrupt data object include interrupt flag bit, receive end byte, the source file total bytes,
The fragment number and the destination address.
In the step S45, interruption is encountered during data transmission, then the interruption of data object can be interrupted described in setting
Flag bit is 1, and is inserted into interrupt to wait in data-object index table and resume;It, will when the node encounters other nodes
The data object that interrupts passes to the new node to meet;The new node searches data corresponding with the index level fragment
If finding, interrupt flag bit is set to 0 for object, is resumed at the end byte of the reception, otherwise, from the output fraction
The initial position of piece retransfers.
The copy control method of above-mentioned index level fragment, stores a table in each node, and the content in table is all points
The transmission situation of piece, it is as shown in table 3 below:
Table 3
The index level fragment of same source file is ranked up from less to more according to the number of transmissions, wherein the number of transmissions
The priority of few index level fragment is high, and the priority of the index level fragment more than the number of transmissions is low;With new relaying
When node meets, the index level fragment is transmitted according to the sequence of priority from high to low, in upper table, belongs to the 6 of source file 2
In a fragment 1,2,3 fragments transmitted twice, in order to make 4,5,6 copy amounts existing in a network as possible with currently
1 in network, 2,3 fragment quantity it is identical, therefore preferentially transmit 4,5,6, if having transmitted 4,5,6, connect it is still lasting
Can just consider transmission 1,2,3.
If a file is larger, and it is shorter to connect the duration, transmits generate interruption after fragment 1,2,3 for the first time,
If not doing above-mentioned strategy, later, when meeting every time, always since the 1st fragment, then there may be a large amount of in network
Fragment smaller id, and bigger id fragment and can not be transferred in network, therefore cause big file that can not transmit success.
After above-mentioned strategy, it can preferably evade the above problem, realize the validity of sliced transmission.
When transmitting the index level fragment, first determine whether that the probability from new relay node to the destination address is
It is no be more than before relay node to the destination address the maximum probability (relay node recorded in table 3 to the general of destination node
Rate), if more than the index level fragment then being transmitted to the new relay node, and update relay node described in table 3 and arrive
The probability value of destination node, otherwise without transmitting.
Big file division can be transmitted by the sharding method of application layer proposed by the present invention into independent small fragment,
When interrupting generation, the fragment of transmission success can cache, and when connection is established again, continue what transmission did not received also
Fragment so as to realize the transmission of big file using the scrappy Connection Time, that is, realizes the breakpoint transmission function of application layer.When
In transmission process, if encountering mistake, only need to be retransmitted the fragment for generating mistake, greatly reduce resource
Waste.After fragment, if encountering the inadequate situation of spatial cache, fragments more as possible can be transmitted, is passed with fragment is closed
Transmission method can greatly improve transmission success rate and congestion control ability in this case.
The sharding method of application layer proposed by the present invention is all to carry out fragment in application layer, each fragment, which includes control, to be believed
Breath and data object, each can be independently transmitted, this fragment in application layer can be useful in different with fragment
In transport protocol such as UDP, TCP and different transmission mechanisms, such as wifi, bluetooth, Ethernet etc..
Connection duration, communication quality etc. are very unreliable between randomness that opportunistic network node meets, node, these are special
Property give big file conveyor come many problems.In order to improve big file transmission success rate in opportunistic network, the present invention will big text
Part is transmitted after carrying out fragment, can realize the functions such as breakpoint transmission, error detection re-transmission.Opportunistic network isomerism, i.e. communication are set
Standby may be the distinct devices such as bluetooth, wifi, and fragment needs to consider not if carrying out in physical layer or data link layer
Same transmission device, needs to define different agreement and field for different equipment.In order to avoid such case, carried in invention
The sharding method gone out is realized in application layer, and this sharding method can not have to be concerned about data link layer and physical layer using assorted
Agreement has very strong transplantability.
Embodiment of above is merely to illustrate the present invention rather than limitation of the present invention.Although with reference to embodiment to this hair
It is bright to be described in detail, it will be understood by those of ordinary skill in the art that, to technical scheme of the present invention carry out it is various combination,
Modification or equivalent replacement, without departure from the spirit and scope of technical solution of the present invention, the right that should all cover in the present invention is wanted
It asks in range.
Claims (8)
1. a kind of copy control method of fixed size fragment in opportunistic network, which is characterized in that including:
Same source file is divided into the fragment of two or more fixed sizes, and data pair are generated for each fragment
As wherein the data object includes corresponding control information and data information;
The fragment is ranked up from less to more according to the number of transmissions, wherein the few fragment of the number of transmissions is preferential
Grade is high, and the priority of the fragment more than the number of transmissions is low;
When meeting with new relay node, the fragment is transmitted according to the sequence of priority from high to low, and transmit described point
During piece, first determine whether the probability from new relay node to destination address whether more than relay node before to the destination address
Maximum probability, if more than, then the fragment is transmitted to new relay node, otherwise without transmit.
2. file variable-size sharding method in a kind of opportunistic network, which is characterized in that include the following steps:
S31, file are divided into the index level fragment of two or more fixed sizes;
S32, index level data object is generated for each index level fragment, wherein the index level data object includes corresponding to
Index level control information and index level data information;
S33, each index level fragment is divided into two or more output stage fragments;
S34, output stage data object is generated for each output stage fragment, wherein the output stage data object includes output
Grade control information and output stage data information.
3. according to the method described in claim 2, it is characterized in that, the calculation formula of the index level fragment size is:
lenfrag=v*T
Wherein, lenfragFor the index level fragment size, v is the message transmission rate of equipment, and T is the connection duration.
4. according to the method described in claim 3, it is characterized in that, in the step S33, the calculating of output stage fragment size is public
Formula is:
lentrans=Tava*Vava*λ
Wherein, lentransFor the size of the output stage fragment, TavaFor average connection duration, VavaFor average transmission speed
Rate, λ are the inverse for the number that the output stage fragment is transmitted within the connection duration of prediction.
5. according to the method described in claim 4, it is characterized in that, the calculation formula of the averagely connection duration is:
Tava=Told*α*γk+Tcurrent*(1-α*γk)
Wherein, ToldDuration, T are averagely connected for historycurrentCurrently to connect the duration, α ∈ [0,1], described in characterization
History averagely connects duration proportion for accounting in the average connection duration, and γ ∈ [0,1) for time decay factor, k is
Source file arrives at the number of location elapsed time unit.
6. method according to claim 4 or 5, which is characterized in that the calculation formula of the average transmission rate is:
Vava=Vold*α*γk+Vcurrent*(1-α*γk)
Wherein, VoldFor history average transmission rate, VcurrentFor current transmission rate, α ∈ [0,1] characterize the history and are averaged
The proportion that transmission rate accounts in average transmission rate, and γ ∈ [0,1) it is time decay factor, k is arrived at for source file
The number of location elapsed time unit.
7. the transmission method of variable-size fragment in a kind of opportunistic network, is obtained using the method as described in claim 2 to 5 is any
Obtain variable-size fragment, which is characterized in that include the following steps:
S41, it is matched by the index level fragment and with the node that it meets, if successful match, by the index fraction
Piece is divided into two or more output stage fragments, and generates output stage data object for each described output stage fragment;
Whether S42, the node are to having possessed the data object of the output stage fragment and having judged, if having possessed,
The information of rejection is returned, otherwise, whether the data source of the output stage fragment is judged safely, if safety,
It returns and receives information, otherwise, return to rejection information;
S43, the output stage fragment send data information to the node;
After S44, the node have received the data information, the integrity degree of the data information of reception is judged, if receiving
Data information it is complete, then the data information is stored into database;Otherwise, the data information of reception is abandoned;
If S45, the output stage fragment are the initial fragment of source file, foundation can interrupt data object, by the output stage
The data information of fragment is read into the file of destination address direction;
S46, the node are according to initial position of the output stage fragment in the index level fragment and the output stage
Fragment into the recombination of horizontal output stage fragment data information, obtains the index fraction in the end position of the index level fragment
Piece;
S47, the node recombinate the data information of index level fragment, obtain source file.
8. the method according to the description of claim 7 is characterized in that in the step S45, in being encountered during data transmission
It is disconnected, then the interrupt flag bit of data object can be interrupted described in setting;When the node encounters other nodes, number can be interrupted by described in
The new node to meet is passed to according to object;The new node searches data object corresponding with the index level fragment, if finding,
Then resumed at the end byte of the reception.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410759132.2A CN104580371B (en) | 2014-12-10 | 2014-12-10 | File is fixed and variable-size fragment, transmission, copy control methods in opportunistic network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410759132.2A CN104580371B (en) | 2014-12-10 | 2014-12-10 | File is fixed and variable-size fragment, transmission, copy control methods in opportunistic network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104580371A CN104580371A (en) | 2015-04-29 |
CN104580371B true CN104580371B (en) | 2018-06-15 |
Family
ID=53095529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410759132.2A Active CN104580371B (en) | 2014-12-10 | 2014-12-10 | File is fixed and variable-size fragment, transmission, copy control methods in opportunistic network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104580371B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105025106B (en) * | 2015-07-28 | 2016-03-30 | 焦点科技股份有限公司 | A kind of method of the breakpoint transmission based on piecemeal and metamessage |
CN107436876A (en) * | 2016-05-25 | 2017-12-05 | 富泰华工业(深圳)有限公司 | File division system and method |
CN106487671B (en) * | 2016-10-14 | 2019-11-01 | 哈尔滨工程大学 | A kind of optimal control information generating method towards delay-tolerant network routing |
CN107729505A (en) * | 2017-10-23 | 2018-02-23 | 郑州云海信息技术有限公司 | Acquisition methods, device and the readable storage medium storing program for executing of a kind of small documents in caching |
CN109246185B (en) * | 2018-07-31 | 2021-03-12 | Oppo广东移动通信有限公司 | File downloading method and related product |
CN109587222A (en) * | 2018-11-12 | 2019-04-05 | 厦门安胜网络科技有限公司 | A kind of method, apparatus and storage medium of file fragmentationization transmission |
CN110677354A (en) * | 2019-12-04 | 2020-01-10 | 武汉慧联无限科技有限公司 | Message transmission method, terminal and server |
CN111416781B (en) * | 2020-03-13 | 2023-05-19 | 腾讯科技(深圳)有限公司 | Information processing method and related equipment |
CN113934553A (en) * | 2021-10-14 | 2022-01-14 | 西安万像电子科技有限公司 | Shear plate redirection transmission method and device, storage medium and electronic equipment |
CN114978555B (en) * | 2022-08-01 | 2022-10-21 | 北京惠朗时代科技有限公司 | Remote online electronic signature system based on WEB script data stream operation |
CN115941675B (en) * | 2023-03-14 | 2023-05-05 | 成都数联云算科技有限公司 | UDP large file message sending method, system and device and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101436919A (en) * | 2008-12-11 | 2009-05-20 | 浙江大学 | Method for breakpoint continuous transmission of reliable file acceptance (receiving) system based on unidirectional broadcasting network |
CN103269358A (en) * | 2013-04-24 | 2013-08-28 | 陕西师范大学 | Video streaming sharing method in opportunistic network |
CN103402229A (en) * | 2013-07-25 | 2013-11-20 | 中国科学院信息工程研究所 | Data downloading method and data downloading system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8422469B2 (en) * | 2008-08-29 | 2013-04-16 | Ntt Docomo, Inc. | Method for interference-minimizing resource block-size selection at a macrocell, a microcell and a femtocell |
-
2014
- 2014-12-10 CN CN201410759132.2A patent/CN104580371B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101436919A (en) * | 2008-12-11 | 2009-05-20 | 浙江大学 | Method for breakpoint continuous transmission of reliable file acceptance (receiving) system based on unidirectional broadcasting network |
CN103269358A (en) * | 2013-04-24 | 2013-08-28 | 陕西师范大学 | Video streaming sharing method in opportunistic network |
CN103402229A (en) * | 2013-07-25 | 2013-11-20 | 中国科学院信息工程研究所 | Data downloading method and data downloading system |
Non-Patent Citations (1)
Title |
---|
"Part-Whole Dissemination of Large Multimedia Contents in Opportunistic Networks";Nadjet Belblidia等;<Computer Communications>;20120213;第35卷(第15期);正文第4节,图2 * |
Also Published As
Publication number | Publication date |
---|---|
CN104580371A (en) | 2015-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104580371B (en) | File is fixed and variable-size fragment, transmission, copy control methods in opportunistic network | |
CN107317842B (en) | Block chain synchronous method and device based on NDN | |
CN103841056B (en) | A kind of open storage management and dispatching method based on software defined network and system | |
CN109412677B (en) | Communication broadcast self-adaptive fusion method in satellite-ground cooperative block chain system | |
CN106331117B (en) | A kind of data transmission method | |
CN103338207B (en) | Real-time video multi-hop relay method in wireless self-organization network | |
CN103634842B (en) | Method for routing between a kind of distributed satellite network group | |
CN110149274A (en) | Based on location information and the comprehensive method for routing of the name data network of content push | |
CN102594714A (en) | BGP (Border Gateway Protocol) routing processing method and BGP routing equipment | |
CN114374647B (en) | Planning method and device for time-sensitive service flow and route combined scheduling | |
CN109451080A (en) | NDN interest packet method for reliable transmission under a kind of wireless scene | |
Bylykbashi et al. | Routing in a many-to-one communication scenario in a realistic VDTN | |
CN106326308A (en) | Intranet duplicated data deletion method and system based on SDN (Software Defined Network) | |
CN105634964B (en) | A kind of mobile ad-hoc network and its multicast route method | |
CN106533503B (en) | A kind of method and device of powerline network communication | |
CN104469874A (en) | Message forwarding method of opportunistic network based on probability centrality | |
CN106790638B (en) | Name data transmission method and system based on active cache in data network | |
CN106792971A (en) | Network node system of selection based on ant group algorithm | |
CN104185241B (en) | Suitable for the method for routing of tethered satellite network | |
CN101835195B (en) | Byzantine failure tolerance method for improving reliability of wireless Mesh backbone network | |
CN104994464A (en) | Mobile social network data forwarding method based on hierarchical community structure | |
Jiang et al. | Loss-aware adaptive scalable transmission in wireless high-speed railway networks | |
CN103338490A (en) | Network data routing method and network node | |
CN103138873A (en) | Obtaining method and device for two-layer data package time delay | |
CN107124361A (en) | Router and its system, the synchronous method and its device of database |
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 |