The content of the invention
The technical problem to be solved is to provide a kind of data transmission method and device, by dynamically distributes band
Width, makes the different clients can be in same time simultaneous transmission data, it is to avoid a certain CU transmission channel overlong time, leads
Other clients are caused to take the problem of transmission channel data.
The technical scheme that the present invention solves above-mentioned technical problem is as follows:
In a first aspect, embodiments providing a kind of data transmission method, the method includes:By data transmission channel
It is divided into I sub-channels, wherein, the quantity of subchannel is identical with the quantity of input data source, each sub-channels in I sub-channels
The data that are input into according to input data source of bandwidth the setting of occupied bandwidth weighted value;
Each sub-channels in I sub-channels are respectively divided into into K Channel Elements;
To belong to the data of same input data source input according to the first predefined procedure add to the input data source pair
Cached in K Channel Elements of the subchannel answered;
And be sequentially output the data that different pieces of information input source is input into according to the second predefined procedure, wherein, K and I are greatly
In or positive integer equal to 1, the first predefined procedure and the second predefined procedure are mutually different clooating sequence.
The invention has the beneficial effects as follows:Data transmission channel is divided into into I sub-channels, different subchannel transmissions is different
The data of input data source input.And by the second predefined procedure, by the input and output of different pieces of information input source, so that data
Transmission channel can be taken simultaneously by multiple data input sides simultaneously.And not using the order of FIFO, it is to avoid data are passed
Defeated channel is only taken completely by a data input side, causes other data input sides to use data transfer in the same time
The problem of passage.And, according to the weight of data input side's occupied bandwidth, bandwidth of the setting per sub-channels, can facilitate excellent
The higher data input side of first level being capable of quick transmission data.
Further, it is according to different input data sources, the data for belonging to same input data source input are pre- according to first
It is fixed sequentially to add into K Channel Elements of subchannel corresponding with the input data source, specifically include:
Input data source according to belonging to h datas determines i-th subchannel corresponding with input data source, wherein, i
It is and the positive integer less than or equal to I more than or equal to 1, h is the positive integer more than or equal to 2;
When it is determined that i-th subchannel has created variables set corresponding with i-th subchannel, according to the h-1 article of storage
The currently stored data volume of k-th Channel Elements of data determines the whether more than total data storage amount of k-th Channel Elements
H datas add k-th Channel Elements, or h datas to add k+1 Channel Elements, wherein, variables set is data input
The parameter set that first data in source is created when adding to i-th subchannel, variables set includes:It is corresponding with k-th Channel Elements
Position indication information, the currently stored data volume of k-th Channel Elements, total data storage amount of k-th Channel Elements, and
Total data storage amount of i-th subchannel, k is and the positive integer less than or equal to K more than or equal to 1.
It is that subchannel is divided into into different Channel Elements using the Advantageous Effects of above-mentioned further scheme, will
The data of input data source input are sequentially added into Channel Elements according to the first predefined procedure.Before addition, first determine whether
Whether current Channel Elements have reached predetermined amount of storage, if the Channel Elements " full ", add to subsequent channels
Unit.Meanwhile, also need the total storage capacity for judging the subchannel, as far as possible avoid data input pin be input into data stacking to sub- letter
In road.
Further, whether kth is more than according to the currently stored data volume of k-th Channel Elements of storage h-1 datas
Total data storage amount of individual Channel Elements, determine h datas add k-th Channel Elements, or h datas add kth+
1 Channel Elements, specifically includes:
When k-th Channel Elements currently stored data volume less than k-th Channel Elements total data storage amount when, h
Data is added to k-th Channel Elements, and total data storage numerical quantity of i-th subchannel adds 1;
When the currently stored data volume of k-th Channel Elements is more than or equal to total data storage of k-th Channel Elements
During amount, h datas add+1 Channel Elements of kth, and total data storage numerical quantity of i-th subchannel adds 1.
It is using the Advantageous Effects of above-mentioned further technical scheme, by the way, can be by input source
The data of input are sequentially added to each Channel Elements, and only after previous Channel Elements have been filled with data, just meeting
Using next Channel Elements data storage.
Further, h datas are added before+1 Channel Elements of kth, method also includes:Determine+1 letter of kth
Whether total data storage amount of road unit is zero, wherein, total data storage amount son according to belonging to Channel Elements of Channel Elements is believed
The occupied bandwidth weighted value of the data of the corresponding input data source input in road is calculated and obtained;
When it is determined that total data storage amount of+1 Channel Elements of kth is not zero, h datas are added into+1 letter of kth
Road unit;
When total data storage amount of+1 Channel Elements of kth is zero, h datas are added to+1 channel list of kth
The Channel Elements that first total data storage amount after unit is not zero.
It is using the Advantageous Effects of above-mentioned further technical scheme:Because total storage number of each Channel Elements
The weighted value of the input data occupied bandwidth of the corresponding input data source of subchannel according to belonging to the Channel Elements is needed according to amount
Calculate and obtain.So, total data storage amount of the Channel Elements is probably 0, is also both that the Channel Elements are very possible not
Being capable of data storage, then then need the total data storage amount for continuing to calculate other Channel Elements after the Channel Elements, directly
To according to being calculated the Channel Elements that first total data storage amount after the Channel Elements is not zero, and by the h article number
According to the addition Channel Elements.
Further, according to different input data sources, the data of same input data source input will be belonged to according to first
Predefined procedure is added into K Channel Elements of subchannel corresponding with the input data source, is specifically included:
Input data source according to belonging to h datas determines i-th subchannel corresponding with input data source, wherein, i
It is and the positive integer less than or equal to I more than or equal to 1;
When it is determined that i-th subchannel does not create corresponding variables set, then variable corresponding with i-th subchannel is created
Collection;
Determine the Channel Elements that first total data storage amount is not zero in i-th subchannel;
And h datas are stored into into i-th subchannel the Channel Elements that first total data storage amount is not zero, its
In, total data storage amount accounting for according to the data of the corresponding input data source input of the affiliated subchannel of Channel Elements of Channel Elements
Calculated with bandwidth weighting value and obtained, wherein the value of h is 1.
It is using the Advantageous Effects of above-mentioned further technical scheme:When judging that i-th subchannel do not create
When crossing corresponding variables set, then need to create a variables set, for the data phase that storage is input into corresponding input data source
The parameter information of pass.Also, h datas are stored into into the i-th subchannel the channel that first total data storage amount is not zero
Unit, now the value of h is 1.That is to say, when the first data is added to i-th subchannel, need to create and the channel pair
The variables set answered.
Further, the data that different pieces of information input source is input into are sequentially output according to the second predefined procedure, are specifically included:
By the data in (n-1)th Channel Elements of each sub-channels in I sub-channels, according to the second predefined procedure according to
Secondary output;
And the data in I sub-channels in (n-1)th Channel Elements of each sub-channels are all exported after finishing, and are pressed
The data in n-th Channel Elements of each sub-channels in I sub-channels are sequentially output according to the second predefined procedure, wherein n is
Positive integer more than or equal to 2, and the initial value of n is 2.
It is using the Advantageous Effects of above-mentioned further technical scheme:In data output process, being not will be same
After all data outputs of one subchannel are finished, in the data for exporting other channels, but each channel is according to predetermined
Order data successively.Certainly, in output procedure, if the current fixed outgoing position of a certain channel does not have data output, that
Then ignore, export the data of the same position of subsequent channels.
Further, when the output of data whole is finished in arbitrary subchannel in I sub-channels, data have all been exported
All parameters are initialized in the corresponding variables set of complete subchannel.
It is using the Advantageous Effects of above-mentioned further technical scheme:When in the subchannel, current input source
Total data has been exported after finishing, then initialized all parameters of variables set.So as to follow-up other input data sources
Using the channel input data.Also, the weight of the occupied bandwidth according to input data, resets the bandwidth of the subchannel.
Second aspect, embodiments provides a kind of data transmission device, and the device includes:Processing unit, is used for
Data transmission channel is divided into into I sub-channels, wherein, the quantity of subchannel is identical with the quantity of input data source, I sub-channels
In each sub-channels the data that are input into according to input data source of bandwidth the setting of occupied bandwidth weighted value;
Each sub-channels in I sub-channels are respectively divided into into K Channel Elements;
Processing unit, for will belong to the data of same input data source input according to the first predefined procedure add to this
Cached in K Channel Elements of the corresponding subchannel of input data source;
The data that different pieces of information input source is input into are sequentially output according to the second predefined procedure, wherein, K and I is and is more than
Or the positive integer equal to 1, the first predefined procedure and the second predefined procedure are mutually different clooating sequence.
The Advantageous Effects of such scheme are that data transmission channel is divided into into I sub-channels, different subchannels
The data of transmission different pieces of information input source input.By the second predefined procedure, by the input and output of different pieces of information input source, so that
Data transmission channel can be taken simultaneously by multiple data input sides simultaneously.And not using the order of FIFO, it is to avoid number
Only taken completely by a data input side according to transmission channel, cause other data input sides to use data in the same time
The problem of transmission channel.And, according to the weight of data input side's occupied bandwidth, bandwidth of the setting per sub-channels, Ke Yifang
Just the higher data input side of priority being capable of quick transmission data.
Further, processing unit specifically for:Input data source according to belonging to h datas determines and data input
Corresponding i-th subchannel in source, wherein, i is and the positive integer less than or equal to I more than or equal to 1, h be more than or
Positive integer equal to 2;
When it is determined that i-th subchannel has created variables set corresponding with i-th subchannel, according to the h-1 article of storage
The currently stored data volume of k-th Channel Elements of data determines the whether more than total data storage amount of k-th Channel Elements
H datas add k-th Channel Elements, or h datas to add k+1 Channel Elements, wherein, variables set is data input
The parameter set that first data in source is created when adding to i-th subchannel, variables set includes:It is corresponding with k-th Channel Elements
Position indication information, the currently stored data volume of k-th Channel Elements, total data storage amount of k-th Channel Elements, and
Total data storage amount of i-th subchannel, k is and the positive integer less than or equal to K more than or equal to 1.
It is that subchannel is divided into into different Channel Elements using the Advantageous Effects of above-mentioned further scheme, will
The data of input data source input are sequentially added into Channel Elements according to the first predefined procedure.Before addition, first determine whether
Whether current Channel Elements have reached predetermined amount of storage, if the Channel Elements " full ", add to subsequent channels
Unit.Meanwhile, also need the total storage capacity for judging the subchannel, as far as possible avoid data input pin be input into data stacking to sub- letter
In road.
Further, processing unit specifically for:When the currently stored data volume of k-th Channel Elements is less than k-th letter
During total data storage amount of road unit, h datas are added to k-th Channel Elements, and total data storage of i-th subchannel
Numerical quantity adds 1;
When the currently stored data volume of k-th Channel Elements is more than or equal to total data storage of k-th Channel Elements
During amount, h datas add+1 Channel Elements of kth, and total data storage numerical quantity of i-th subchannel adds 1.
It is using the Advantageous Effects of above-mentioned further technical scheme, by the way, can be by input source
The data of input are sequentially added to each Channel Elements, and only after previous Channel Elements have been filled with data, just meeting
Using next Channel Elements data storage.
Further, processing unit is additionally operable to, and whether the total data storage amount for determining+1 Channel Elements of kth is zero, its
In, total data storage amount accounting for according to the data of the corresponding input data source input of the affiliated subchannel of Channel Elements of Channel Elements
Calculated with bandwidth weighting value and obtained;
When it is determined that total data storage amount of+1 Channel Elements of kth is not zero, h datas are added into+1 letter of kth
Road unit;
When total data storage amount of+1 Channel Elements of kth is zero, h datas are added to+1 channel list of kth
The Channel Elements that first total data storage amount after unit is not zero.
It is using the Advantageous Effects of above-mentioned further technical scheme, because total storage number of each Channel Elements
The weighted value of the input data occupied bandwidth of the corresponding input data source of subchannel according to belonging to the Channel Elements is needed according to amount
Calculate and obtain.So, total data storage amount of the Channel Elements is probably 0, is also both that the Channel Elements are very possible not
Being capable of data storage, then then need the total data storage amount for continuing to calculate other Channel Elements after the Channel Elements, directly
To according to being calculated the Channel Elements that first total data storage amount after the Channel Elements is not zero, and by the h article number
According to the addition Channel Elements.
Further, processing unit specifically for:Input data source according to belonging to h datas determines and data input
Corresponding i-th subchannel in source, wherein, i is and the positive integer less than or equal to I more than or equal to 1;
When it is determined that i-th subchannel does not create corresponding variables set, then variable corresponding with i-th subchannel is created
Collection;
Determine the Channel Elements that first total data storage amount is not zero in i-th subchannel;
And h datas are stored into into i-th subchannel the Channel Elements that first total data storage amount is not zero, its
In, total data storage amount accounting for according to the data of the corresponding input data source input of the affiliated subchannel of Channel Elements of Channel Elements
Calculated with bandwidth weighting value and obtained, wherein the value of h is 1.
It is using the Advantageous Effects of above-mentioned further technical scheme, when judging that i-th subchannel do not create
When crossing corresponding variables set, then need to create a variables set, for the data phase that storage is input into corresponding input data source
The parameter information of pass.Also, h datas are stored into into the i-th subchannel the channel that first total data storage amount is not zero
Unit, now the value of h is 1.That is to say, when the first data is added to i-th subchannel, need to create and the channel pair
The variables set answered.
Further, output unit specifically for:By (n-1)th Channel Elements of each sub-channels in I sub-channels
In data, be sequentially output according to the second predefined procedure;
And the data in I sub-channels in (n-1)th Channel Elements of each sub-channels are all exported after finishing, and are pressed
The data in n-th Channel Elements of each sub-channels in I sub-channels are sequentially output according to the second predefined procedure, wherein n is
Positive integer more than or equal to 1, and the initial value of n is 2.
It is that in data output process, being not will be same using the Advantageous Effects of above-mentioned further technical scheme
After all data outputs of one subchannel are finished, in the data for exporting other channels, but each channel is pre- according to second
It is fixed to be sequentially sequentially output data.Certainly, in output procedure, if not have data defeated for the current fixed outgoing position of a certain channel
Go out, then then ignore, export the data of the same position of subsequent channels.
Further, processing unit is additionally operable to, when the output of data whole is finished in arbitrary subchannel in I sub-channels,
Data are all exported all parameters in the corresponding variables set of subchannel for finishing to be initialized.
It is using the Advantageous Effects of above-mentioned further technical scheme:When in the subchannel, current input source
Total data has been exported after finishing, then initialized all parameters of variables set.So as to follow-up other input data sources
Using the channel input data.Also, the weight of the occupied bandwidth according to input data, resets the bandwidth of the subchannel.
Specific embodiment
In below describing, in order to illustrate rather than in order to limit, it is proposed that such as particular system structure, interface, technology it
The detail of class, to cut thoroughly the present invention is understood.However, it will be clear to one skilled in the art that concrete without these
The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known device, circuit and
The detailed description of method, in case unnecessary details hinders description of the invention.
Fig. 1 is a kind of schematic flow sheet of data transmission method provided in an embodiment of the present invention.
Specifically as shown in figure 1, the method includes:
Step 110, by data transmission channel I sub-channels are divided into.
Specifically, in order that oneself can be needed the data transfer of transmission by different data input sides when needing
Go out, and do not really want to rank, according to the mode of FIFO, when first to file takes the data input of data transmission channel
During square end of transmission, can transmit.So, data transmission channel can be divided into I sub-channels.Wherein, I sub-channels
Quantity is identical with the quantity of input data source, and the bandwidth of each sub-channels is input into according to input data source in I sub-channels
The occupied bandwidth weighted value q settings of data, wherein I is the positive integer more than or equal to 1.
Explanation is needed exist for, the quantity of subchannel is not changeless, and can be to send out as needed at any time
Raw change.For example, transmission data is finished now a data input side, then shared channel can also be released
Put, if now needing transmission data without data input side, then the subchannel that data transmission channel is divided is automatic
Subtract 1, then channel width then can be redistributed.Or, currently there is a new data input side to need to add, transmission data.
The occupied bandwidth weighted value q settings of the data that so bandwidth of subchannel is input into according further to input data source.
Each sub-channels in I sub-channels are respectively divided into K Channel Elements by step 120.
Specifically, each sub-channels in I sub-channels are divided into into K Channel Elements.Data are added to subchannel
When, can be unit according to Channel Elements, until when the data of each Channel Elements storage reach capacity, then change next letter
Road unit data storage.Wherein, K is the positive integer more than or equal to 1.
Step 130, will belong to the data of same input data source input according to the first predefined procedure add to the data
Cached in K Channel Elements of the corresponding subchannel of input source.
Specifically, the first predefined procedure here can be the order of FIFO.That is to say, successively according to data input
The order of source output data, data are added into subchannel corresponding with input data source.Different input data source correspondences
Be different subchannels.And each sub-channels, only store the number of currently input data source input corresponding with the subchannel
According to.Data are stored in K Channel Elements.
According to the input data source of the data that currently will be stored, corresponding subchannel is determined.For example, it is currently stored
Data are h datas, and the corresponding subchannel of the input data source belonging to h datas is i-th subchannel.So then will
H datas are input into into i-th subchannel.And be specifically input into into i-th subchannel which Channel Elements, then need into one
The determination of step.
Detailed process can include:
In oneainstance, when it is determined that i-th subchannel has created variables set corresponding with i-th subchannel, root
Whether it is more than total storage of k-th Channel Elements according to the currently stored data volume of k-th Channel Elements of storage h-1 datas
Data volume, determines that h datas add k-th Channel Elements, or h datas to add k+1 Channel Elements, wherein, become
The parameter set that quantity set is created when adding to i-th subchannel for the first data of input data source.And variables set can be at least
Including following parameter:The currently stored number of position indication information corresponding with k-th Channel Elements, k-th Channel Elements
According to amount, total data storage amount of k-th Channel Elements, and total data storage amount of i-th subchannel, wherein, wherein, i is
More than or equal to 1, and the positive integer less than or equal to I, h is the positive integer more than or equal to 2.K be more than or wait
In 1, and the positive integer less than or equal to K.
And whether k-th channel is more than according to the currently stored data volume of k-th Channel Elements of storage h-1 datas
Total data storage amount of unit, determines that h datas add k-th Channel Elements, or h datas to add+1 letter of kth
Road unit, specifically includes:
When k-th Channel Elements currently stored data volume less than k-th Channel Elements total data storage amount when, h
Data is added to k-th Channel Elements, and total data storage numerical quantity of i-th subchannel adds 1.
Or, when the currently stored data volume of k-th Channel Elements is more than or equal to total storage of k-th Channel Elements
During data volume, h datas add+1 Channel Elements of kth, and total data storage numerical quantity of i-th subchannel adds 1.
It is further preferred that because the weight of input side's input data occupied bandwidth is by being manually set.And in many feelings
It is under condition, such as different according to the data level of data input side's input, or, the input side of present input data is too many, before
The channel width that the allocated different pieces of information input side takes has set.But if readjust when can spend a large amount of
Between and energy.So, can also in a disguised form realize being accounted for during the low data input side's transmission data of priority level by another way
Reduced with bandwidth.The method is both the sub- letter when priority level is than channel transmission data shared by relatively low data input side
Local channel unit in road not data storage.The data total amount that is to say storage is zero.Therefore, at above-mentioned described k-th
Total data storage amount " full " of Channel Elements, and h datas are added before+1 Channel Elements of kth, it is necessary first to really
Whether the total data storage amount for determining+1 Channel Elements of kth is zero.Wherein, total data storage amount of Channel Elements is according to channel list
The occupied bandwidth weighted value of the data of the corresponding input data source input of subchannel belonging to first is calculated and obtained.Therefore, it is concrete to calculate
The formula of total data storage amount of+1 Channel Elements of kth is as follows:
wik+1=int (norm (qi))
Wherein, wik+1The data total amount of k-th Channel Elements storage of the sub-channels of kth+1;norm(qi) press equal to return
It is worth for qiThe random number being just distributed very much.
When it is determined that total data storage amount of+1 Channel Elements of kth is not zero, h datas are added into+1 letter of kth
Road unit.Or, when total data storage amount of+1 Channel Elements of kth is zero, h datas are added to+1 letter of kth
The Channel Elements that first total data storage amount after road unit is not zero.
In another scenario, the subchannel has for the first time input side to add data.It is possible to determine the subchannel also
Corresponding variables set is not created.That is to say that the input data source according to belonging to h datas determines and input data source
After corresponding i-th subchannel, it may be determined that i-th subchannel does not create corresponding variables set.So, it is necessary first to create
Variables set corresponding with i-th subchannel is built, then, it is determined that first total data storage amount is not zero in i-th subchannel
Channel Elements, and h datas are stored into into i-th subchannel the Channel Elements that first total data storage amount is not zero.
And h values now are in fact for 1.And i here is equally for more than or equal to 1 and just whole less than or equal to I
Number.The formula of the concrete total data storage amount for calculating Channel Elements is hereinbefore introduced, is repeated no more here.
Step 140, the data that different pieces of information input source is input into are sequentially output according to the second predefined procedure.
Specifically, the data that different pieces of information input source is input into are sequentially output according to the second predefined procedure specifically can wrap
Include:By the data in the k-th Channel Elements of each sub-channels in I sub-channels, it is sequentially output according to the second predefined procedure.
It is pre- according to second and the data in I sub-channels in (n-1)th Channel Elements of each sub-channels are all exported after finishing
The fixed data being sequentially sequentially output in n-th Channel Elements of each sub-channels in I sub-channels, wherein n be more than or
Positive integer equal to 2, and the initial value of n is 2.Specifically can be with as shown in Fig. 2 Fig. 2 be shown different pieces of information input source
Data are sequentially added to the schematic diagram of subchannel corresponding with input data source.Wherein, it is divided into multiple channel lists per sub-channels
First (such as 1~k in Fig. 2~k+1~n-1~n~K Channel Elements), because being predetermined according to second during by data output
Order is sequentially output the data of the same Channel Elements of different subchannels, that is to say the 1st column data in Fig. 2 preferentially according to second
Predefined procedure exports (column data output is finished, it is understood that finished for a wheel data output), followed by the 2nd column data is pressed
According to the output ... ... of the second predefined procedure, the (n-1)th column data is exported according to the second predefined procedure, and the n-th column data is predetermined according to second
Sequential output etc..And the second predefined procedure can be upper right falls down, or from down to up, do not limit here.It is then in Fig. 2
Sequential output from top to bottom.
And when the output of data whole is finished in arbitrary subchannel in above-mentioned I sub-channels, the method also includes:Step
150, data are all exported all parameters in the corresponding variables set of subchannel for finishing and is initialized.
Only upon initialization, the subchannel can then continue transport channel data input side needs the data of transmission.
And, initializing variable collection can also reduce the Installed System Memory shared by variables set.The live load of reduction system, further
Lift operating efficiency.
A kind of data transmission method that the present embodiment is provided, by data transmission channel I sub-channels, different sons are divided into
The data of transmission different pieces of information input source input.And by the second predefined procedure, by the input of different pieces of information input source
Output, so that data transmission channel can be taken by multiple data input sides simultaneously simultaneously.And not using the suitable of FIFO
Sequence, it is to avoid data transmission channel is only taken completely by a data input side, causes other data input sides cannot be with for the moment
Between using data transmission channel problem.And, according to the weight of data input side's occupied bandwidth, band of the setting per sub-channels
Width, can facilitate the higher data input side of priority being capable of quick transmission data.
Correspondingly, the embodiment of the present invention additionally provides a kind of data transmission device.Fig. 3 is provided in an embodiment of the present invention one
Plant data transmission device structural representation.Specifically as shown in figure 3, the device includes:Processing unit 301 and output unit 302.
Processing unit 301 is used for, and data transmission channel is divided into into I sub-channels, wherein, the quantity of subchannel is defeated with data
The quantity for entering source is identical, the occupancy band of the data that the bandwidth of each sub-channels is input into according to input data source in I sub-channels
Wide weighted value setting;Each sub-channels in I sub-channels are respectively divided into into K Channel Elements;And will belong to same data
The data of input source input are added to K Channel Elements of subchannel corresponding with the input data source according to the first predefined procedure
In cached.
Output unit 302, for the data that different pieces of information input source is input into be sequentially output according to the second predefined procedure, its
In, K and I is the positive integer more than or equal to 1, and the first predefined procedure and the second predefined procedure are suitable for mutually different sequence
Sequence.
In oneainstance, processing unit 301 specifically for, input data source according to belonging to h datas determine with
Corresponding i-th subchannel of input data source, wherein, i is and the positive integer less than or equal to I more than or equal to 1, and h is
Positive integer more than or equal to 2;
When it is determined that i-th subchannel has created variables set corresponding with i-th subchannel, according to the h-1 article of storage
The currently stored data volume of k-th Channel Elements of data determines the whether more than total data storage amount of k-th Channel Elements
H datas add k-th Channel Elements, or h datas to add k+1 Channel Elements, wherein, variables set is data input
The parameter set that first data in source is created when adding to i-th subchannel, variables set includes:It is corresponding with k-th Channel Elements
Position indication information, the currently stored data volume of k-th Channel Elements, total data storage amount of k-th Channel Elements, and
Total data storage amount of i-th subchannel, k is and the positive integer less than or equal to K more than or equal to 1.
Specifically, when the currently stored data volume of k-th Channel Elements is less than total data storage amount of k-th Channel Elements
When, h datas are added to k-th Channel Elements, and total data storage numerical quantity of i-th subchannel adds 1;
When the currently stored data volume of k-th Channel Elements is more than or equal to total data storage of k-th Channel Elements
During amount, h datas add+1 Channel Elements of kth, and total data storage numerical quantity of i-th subchannel adds 1.
It is further preferred that because the weight of input side's input data occupied bandwidth is by being manually set.And many feelings again
It is under condition, such as different according to the data level of data input side's input, or, the input side of present input data is too many, before
The channel width that the allocated different pieces of information input side takes has set.But if readjust when can spend a large amount of
Between and energy.So, processing unit 301 is additionally operable to, and whether the total data storage amount for determining+1 Channel Elements of kth is zero, its
In, total data storage amount accounting for according to the data of the corresponding input data source input of the affiliated subchannel of Channel Elements of Channel Elements
Calculated with bandwidth weighting value and obtained.
When it is determined that total data storage amount of+1 Channel Elements of kth is not zero, h datas are added into+1 letter of kth
Road unit;When total data storage amount of+1 Channel Elements of kth is zero, h datas are added to+1 Channel Elements of kth
The Channel Elements that the total data storage amount of first afterwards is not zero.
In another scenario, processing unit 301 specifically for:When it is determined that i-th subchannel does not create corresponding variable
During collection, then variables set corresponding with i-th subchannel is created;Determine that first total data storage amount is not in i-th subchannel
Zero Channel Elements;And h datas are stored into into i-th subchannel the channel list that first total data storage amount is not zero
Unit, now, the value of h is 1.
And output unit 302 is then specifically for by (n-1)th Channel Elements of each sub-channels in I sub-channels
Data, be sequentially output according to the second predefined procedure;And in I sub-channels each sub-channels (n-1)th Channel Elements
In data after all output is finished, be sequentially output n-th of each sub-channels in I sub-channels according to the second predefined procedure
Data in Channel Elements, wherein n are the positive integer more than or equal to 2, and the initial value of n is 2.
Function performed by each part of the device has been done in detail in a kind of data transmission method of above-described embodiment
Introduction, repeat no more here.
A kind of data transmission device provided in an embodiment of the present invention, by data transmission channel I sub-channels are divided into, different
Subchannel transmission different pieces of information input source input data.By the second predefined procedure, by the input of different pieces of information input source
Output, so that data transmission channel can be taken by multiple data input sides simultaneously simultaneously.And not using the suitable of FIFO
Sequence, it is to avoid data transmission channel is only taken completely by a data input side, causes other data input sides cannot be with for the moment
Between using data transmission channel problem.And, according to the weight of data input side's occupied bandwidth, band of the setting per sub-channels
Width, can facilitate the higher data input side of priority being capable of quick transmission data.
Reader should be understood that in the description of this specification, reference term " one embodiment ", " some embodiments ", " show
The description of example ", " specific example " or " some examples " etc. mean to combine the specific features of the embodiment or example description, structure,
Material or feature are contained at least one embodiment of the present invention or example.In this manual, above-mentioned term is shown
What the statement of meaning property was not necessarily referring to is identical embodiment or example.And, the specific features of description, structure, material or feature
Can in an appropriate manner combine in any one or more embodiments or example.Additionally, in the case of not conflicting, this
The technical staff in field can be by the different embodiments or example described in this specification and the spy of different embodiments or example
Levy and be combined and combine.
Although embodiments of the invention have been shown and described above, it is to be understood that above-described embodiment is example
Property, it is impossible to limitation of the present invention is interpreted as, one of ordinary skill in the art within the scope of the invention can be to above-mentioned
Embodiment is changed, changes, replacing and modification.