CN100534178C - Sending method for asymmetric data - Google Patents

Sending method for asymmetric data Download PDF

Info

Publication number
CN100534178C
CN100534178C CNB2005101119413A CN200510111941A CN100534178C CN 100534178 C CN100534178 C CN 100534178C CN B2005101119413 A CNB2005101119413 A CN B2005101119413A CN 200510111941 A CN200510111941 A CN 200510111941A CN 100534178 C CN100534178 C CN 100534178C
Authority
CN
China
Prior art keywords
weighted value
packet
transmit weight
current transmit
default
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.)
Expired - Fee Related
Application number
CNB2005101119413A
Other languages
Chinese (zh)
Other versions
CN1988657A (en
Inventor
顾亚平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANGHAI DIGIVISION TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI DIGIVISION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI DIGIVISION TECHNOLOGY Co Ltd filed Critical SHANGHAI DIGIVISION TECHNOLOGY Co Ltd
Priority to CNB2005101119413A priority Critical patent/CN100534178C/en
Publication of CN1988657A publication Critical patent/CN1988657A/en
Application granted granted Critical
Publication of CN100534178C publication Critical patent/CN100534178C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for sending asymmetrical data, which makes the data of high usage to be analyzed more quickly at the decoder and optimizes the data access speed about Round Robin business. Its technology program includes: a) it presets each preset weighted value according to the default frequency of the above data packet. b) it reviews all data packets, and sets each judging weighted value according to the preset weighted value, meanwhile, it sends the data packet with the largest weighted value and decreases the weighted value of corresponding data packet. c) it repeats steps b till all the data packets described are sent out.

Description

The sending method of asymmetric data
Technical field
The present invention relates to a kind of method that sends asymmetric data, relate in particular to and a kind ofly in digital television software exploitation, set in advance the method that Transmit weight sends asymmetric data.
Background technology
In the digital television software exploitation, in order to improve the efficient that sends data, the packet of different Transmit weight is set according to the frequency of utilization of data usually, increase the high data chartered steamer of Transmit weight and broadcast frequency, lower the low data chartered steamer of Transmit weight and broadcast frequency.
Such a load-balancing technique is applicable to generally at present on the computer network that it provides a kind of cheap effective method expansion servers bandwidth and has increased throughput, strengthens the network data-handling capacity, improves network flexibility and availability.
But in digital TV field, also do not have this type of technology that the different data of frequency of utilization are separately handled, caused program response speed slow, visit of poor quality, problem such as resource utilization is not high.
Summary of the invention
The objective of the invention is to solve the problems referred to above, a kind of sending method of asymmetric data is provided, it can improve the response speed that digital television receiving terminal extracts programme content, for the user improves better visit quality, improves the utilization ratio of limited resources.
Technical scheme of the present invention is: a kind of sending method of asymmetric data, be used for preferentially sending the high packet of frequency of utilization, and may further comprise the steps: (a) set separately default weighted value according to the frequency of utilization of described packet; (b) travel through all packets, default weighted value setting judgment standard weighted value separately according to each described packet, select the packet of judgment standard weighted value maximum to send simultaneously, and the corresponding judgment standard weighted value that reduces described transmission packet, wherein the information of each described packet also comprises current Transmit weight multiplying power and default weight multiplying power, described current Transmit weight multiplying power is the current Transmit weight value summation of all packets that participate in transmission and the ratio of the current Transmit weight value of single described packet, described default weight multiplying power is the default weighted value summation of all packets and the ratio of the default weighted value of single described packet, and described judgment standard weighted value is default weight multiplying power and the difference of current Transmit weight multiplying power and the ratio of current Transmit weight multiplying power of single described packet; (c) repeating step (b) finishes up to whole transmission of described packet.
The sending method of above-mentioned asymmetric data, wherein, in the preceding process that also comprises an error correction of described step (b), the current Transmit weight value of described all packets of process initialization.
The sending method of above-mentioned asymmetric data, wherein, described packet is stored with linked list data structure, and wherein each described packet is a node in the described chained list with the form encapsulation of object.
The sending method of above-mentioned asymmetric data wherein, in the described step (b), is provided with an intermediate variable, is used for preserving the judgment standard weighted value of the current maximum of comparison procedure and the chained list node of corresponding data bag.
The sending method of above-mentioned asymmetric data, wherein, the default weighted value in the described step (a) is kept in first recording domain of chained list node data field, and described default weighted value remains unchanged in overall process; Described current Transmit weight value is kept in second recording domain of described chained list node data field, reduces corresponding current Transmit weight value when described packet is selected.
The invention also discloses a kind of sending method of asymmetric data, be used for preferentially sending the high packet of frequency of utilization, wherein, may further comprise the steps: (a) frequency of utilization of described packet is set default weighted value separately; (b) travel through all packets, default weighted value setting judgment standard weighted value separately according to each described packet, select the packet of judgment standard weighted value maximum to send simultaneously, and the corresponding judgment standard weighted value that reduces to send packet, wherein the information of each packet also comprises current Transmit weight value, and wherein said judgment standard weighted value is described current Transmit weight value; (c) repeating step (b) finishes up to whole transmission of described packet.
The sending method of above-mentioned asymmetric data, wherein, in the preceding process that also comprises an error correction of described step (b), the current Transmit weight value of described all packets of process initialization.
The sending method of above-mentioned asymmetric data, wherein, described packet is stored with linked list data structure, and wherein said each packet is a node in the described chained list with the form encapsulation of object.
The sending method of above-mentioned asymmetric data wherein, in the described step (b), is provided with an intermediate variable, is used for preserving the judgment standard weighted value of the current maximum of comparison procedure and the chained list node of corresponding data bag.
The sending method of above-mentioned asymmetric data, wherein, the default weighted value in the described step (a) is kept in first recording domain of chained list node data field, and described default weighted value remains unchanged in overall process; Described current Transmit weight value is kept in second recording domain of described chained list node data field, reduces corresponding current Transmit weight value when described packet is selected.
The present invention contrasts prior art, following beneficial effect is arranged: sending method of the present invention is by setting in advance the weight of different pieces of information bag, the packet of the different weights of separate processes when sending packet, the packet that weight is high has precedence over the low packet of weight and sends, and realizes the visit to asymmetric data.The invention solves under fixed-bandwidth, for the repeating query business, the data that frequency of utilization is many can obtain sooner resolving in decoding end, have optimized the acquisition speed of data.
Description of drawings
Fig. 1 shows the flow chart of one embodiment of the invention.
Fig. 2 shows the flow chart of another embodiment of the present invention.
Embodiment
The invention will be further described below in conjunction with drawings and Examples.
Fig. 1 shows the flow process of a sending method embodiment of the present invention.As shown in Figure 1, at first carry out initialization 101.Packet encapsulation is become object, all objects are arranged to linked list data structure, wherein each object is exactly a node of chained list.Set the default weighted value of object according to the frequency of utilization of packet, obtain all Transmit weight value summations of moving object and the default weighted value summation of all objects.Then program is carried out preliminary treatment, comprise checking whether chained list is empty, initialization object Transmit weight etc.After initialization 101 is finished, begin to travel through chained list node 102, judge at first whether current processing node is tail node 103, when handling tail node, withdraws from searching loop, returns and hits node, otherwise continue circulation.Calculate the encapsulation weight 104 of current object then, the Transmit weight summation of all moving objects and the ratio of current object Transmit weight are current Transmit weight multiplying powers, the ratio of the default weighted value of the default weight summation of all objects and current object is default weight multiplying power, object encapsulation weight=(default weight multiplying power one current Transmit weight multiplying power)/current Transmit weight multiplying power.Judge then whether the object encapsulation weight is maximum 105, the method of judging is a temporary variable to be set preserve current encapsulation weight maximum, a temporary pointer is set preserves the Object node address of current encapsulation weight maximum correspondence, then relatively with the value of preserving in the encapsulation weighted value of current Object node and this temporary variable, if the encapsulation weighted value of present node is greater than temporary variable, so temporary variable will preserve present node the encapsulation weighted value to replace initial value, temporary pointer also will be preserved current Object node address with the replacement origin node; If the encapsulation weighted value of present node smaller or equal to temporary variable, is not then done to replace and is handled.After current Object node disposes, enter the next Object node of next circular treatment, after having traveled through all nodes, temporary variable is preserved the maximum of all node object encapsulation weights, temporary pointer is preserved corresponding Object node address, this node hits node exactly, and method is finally returned and hit node 107.
Further describe flow chart shown in Figure 1 below in conjunction with false code.Whether the chained list that on behalf of all objects, object, the ModuleList that the Module representative data is sealed dress form, the function return value by judging ModuleList.size () are zero to check whether chained list is sky.Two variablees of dwNumber and dwTotalNumber are set preserve the Transmit weight summation of Module in the process of transmitting and the default weight summation of all Module respectively, check simultaneously whether dwNumber and dwTotalNumber have initialization, if dwNumber does not do initialization, then handle with following false code:
If (0==dwNumber) //the dwNumber value is 0. no initializtion
{
List<pair<DCModule*, DWORD 〉:: iteratoriter=m_ModuleList.begin (); // from the beginning read list
While (iter!=m_ModuleList.end ()) // exit condition is for traversing list ending
{
(*iterr).second=(*iter).first->GetModuleWeight();
// read the Weight value of Module, be saved in the second clauses and subclauses.
Iter++; Next bar record of // processing
}
DwNumber=dwTotalNumber; // initial value dwNumber equates with dwTotalNumber.
}
An iterator iter is set to travel through to the chained list tail node from chain heading node, each node is all led to default weighted value among first recording domain (* iter) .first that GetModuleWeight () function reads the node data territory, be written among second recording domain (* iter) .second in node data territory.When initial, it is movable that all packets all are arranged to, so dwNumber and dwTotalNumber equate.
After the initialization, just enter the major part of algorithm.Before traversal, chained list node and a temporary variable dwMaxWeight that a default earlier interim iteratorIterRet pointer variable is preserved current maximum encapsulation weight correspondence preserve the encapsulation weighted value of current maximum.The initial value of IterRet and dwMaxWeight is respectively chained list tail node address and 0.With another iterator iter as the traversal pointer, the gauge outfit node of initial directional chained list.The false code of aforesaid operations is as follows:
List<pair<DCModule*, DWORD 〉:: iterator IterRet=m_ModuleList.end (); // initialization is hit
//Module is the end node (end is empty node) of list.
double?dbMaxWeight=0;
List<pair<DCModule*, DWORD 〉:: iteratoriter=m_ModuleList.begin (); // from the beginning read list
To travel through pointer iter whether in the chained list tail node as cycling condition, promptly while (iter!=m_ModuleList.end ()).There is current Transmit weight value among (* iter) .second, do not finish as yet if this value sends more than or equal to zero explanation.(* iter) .first-〉IsActive () function judges that whether Module is in active state.If Module does not finish as yet in active state and transmission, then calculating object encapsulates weight.In concrete calculating, the Weight variable is preserved the ratio of current object Transmit weight value in all movable object encapsulation, the Gate variable is preserved the default ratio of weight in all object encapsulation of current object, the interim encapsulation weight of preserving current object of TempWeight variable, according to above-mentioned formula is object encapsulation weight=(default weight multiplying power-current Transmit weight multiplying power)/current Transmit weight multiplying power, can calculate current object encapsulation weight.If calculate first object, then the address with this object is kept in the IterRet pointer variable, and the encapsulation weighted value of this object exists in the dbMaxWeight variable as current maximum encapsulation weight, and last iter points to next object, continues circulation.If not calculating first object, then more current maximum encapsulation weight dbMaxWeight and current encapsulation weight TempWeight.If TempWeight greater than dbMaxWeight, then is kept at current object address in the IterRet pointer variable, current object encapsulation weighted value is existed in the dbMaxWeight variable, iter points to next object; Otherwise do not make any operation iter and directly point to next object.The false code of specific implementation is as follows:
if(((*iter).first->IsActive())&&((*iter).second>0))
//Module is an active state, and this takes turns transmission and does not finish (second=-0 is for finishing)
{
// realization computing formula
double?Weight=(double)dwNumber/(double)(*iter).second;
double?Gate=(double)dwTotalNumber/(double)(*iter).first->GetModuleWeight();
double?TempWeight=0;
if(Gate>Weight)
TempWeight=(Gate-Weight)/Weight; // formula is found the solution
if(IterRet==mModuleList.end())
//IterRet is that the end node of list is represented to begin for the first time, then unconditionally iter node, TempWeight is preserved
{
IterRet=iter++; // preserve
DbMaxWeight=TempWeight; // preserve
continue;
}
if(Gate>Weight)
{
If (dbMaxWeight<TempWeight) // the current Weight value maximum of preservation, as current hit
{
IterRet=iter++; // preserve
DbMaxWeight=TempWeight; // preserve
continue;
}
}
}
Iter++; Next list node of // traversal
Loop ends, what preserve in the IterRet pointer is the address of the object of encapsulation weight maximum, node is finally hit in representative.Transmit weight value with this object before returning the Module object that finally hits node subtracts 1, and expression was handled once.Concrete false code is as follows:
If (m_ModuleList.end ()==IterRet) //IterRet still illustrates mistake for the end node table of list, returns NULL
return NULL;
(* IterRet) .second--; // Weight the value of finally hitting node subtracts " 1 ", represents once processed
Return (* IterRet) .first; // return the Module object that finally hits node
Fig. 2 shows the flow process of an alternative embodiment of the invention method.As shown in Figure 2, comparison diagram 1 has saved calculating object encapsulation 104 these steps of weight, and will " judge object encapsulation weight whether maximum 105 " be modified as " judge the current Transmit weight of object whether maximum 204 ".That is to say that the benchmark weight of judgement has become current Transmit weight from the object encapsulation weight, other steps all embodiment with Fig. 1 are identical, therefore no longer are repeated in this description.Now describe the implementation procedure of this embodiment algorithm for an example, packet A, B, C are arranged, have default weight 1,2,3 respectively, and all be in active state, just the Transmit weight initial value also is respectively 1,2,3.After the loop ends for the first time, because the Transmit weight of C is the highest, so select C to send, the current Transmit weight that is sent completely back C becomes 2; After the loop ends for the second time, select B to send, the current Transmit weight that is sent completely back B becomes 1; After the loop ends, select C to send for the third time, the Transmit weight that is sent completely back C becomes 1; The rest may be inferred, sends A, B, C successively after fourth, fifth, six circulation, sends overall process and finish.In the whole process of transmitting, be to send according to the order of CBCABC.
The foregoing description provides to those of ordinary skills and realizes or use of the present invention; those of ordinary skills can be under the situation that does not break away from invention thought of the present invention; the foregoing description is made various modifications or variation; thereby protection scope of the present invention do not limit by the foregoing description, and should be the maximum magnitude that meets the inventive features that claims mention.

Claims (10)

  1. The sending method of 1 one kinds of asymmetric data is used for preferentially sending the high packet of frequency of utilization, it is characterized in that, may further comprise the steps:
    (a) set separately default weighted value according to the frequency of utilization of described packet;
    (b) travel through all packets, default weighted value setting judgment standard weighted value separately according to each described packet, select the packet of judgment standard weighted value maximum to send simultaneously, and the corresponding judgment standard weighted value that reduces to send packet, wherein the information of each described packet also comprises current Transmit weight multiplying power and default weight multiplying power, described current Transmit weight multiplying power is the current Transmit weight value summation of all packets that participate in transmission and the ratio of the current Transmit weight value of single described packet, described default weight multiplying power is the default weighted value summation of all packets and the ratio of the default weighted value of single described packet, and described judgment standard weighted value is default weight multiplying power and the difference of current Transmit weight multiplying power and the ratio of current Transmit weight multiplying power of single described packet;
    (c) repeating step (b) finishes up to whole transmission of described packet.
  2. The sending method of 2 asymmetric data according to claim 1 is characterized in that, in the preceding process that also comprises an error correction of described step (b), and the current Transmit weight value of described all packets of process initialization.
  3. The sending method of 3 asymmetric data according to claim 2 is characterized in that, described packet is stored with linked list data structure, and wherein each described packet is a node in the described chained list with the form encapsulation of object.
  4. The sending method of 4 asymmetric data according to claim 3 is characterized in that, in the described step (b), an intermediate variable is set, and is used for preserving the judgment standard weighted value of the current maximum of comparison procedure and the chained list node of corresponding data bag.
  5. The sending method of 5 asymmetric data according to claim 4 is characterized in that, the default weighted value in the described step (a) is kept in first recording domain of chained list node data field, and described default weighted value remains unchanged in overall process; Described current Transmit weight value is kept in second recording domain of described chained list node data field, reduces corresponding current Transmit weight value when described packet is selected.
  6. The sending method of 6 one kinds of asymmetric data is used for preferentially sending the high packet of frequency of utilization, it is characterized in that, may further comprise the steps:
    (a) set separately default weighted value according to the frequency of utilization of described packet;
    (b) travel through all packets, default weighted value setting judgment standard weighted value separately according to each described packet, select the packet of judgment standard weighted value maximum to send simultaneously, and the corresponding judgment standard weighted value that reduces to send packet, wherein the information of each packet also comprises current Transmit weight value, and wherein said judgment standard weighted value is described current Transmit weight value;
    (c) repeating step (b) finishes up to whole transmission of described packet.
  7. The sending method of 7 asymmetric data according to claim 6 is characterized in that, in the preceding process that also comprises an error correction of described step (b), and the current Transmit weight value of described all packets of process initialization.
  8. The sending method of 8 asymmetric data according to claim 7 is characterized in that, described packet is stored with linked list data structure, and wherein said each packet is a node in the described chained list with the form encapsulation of object.
  9. The sending method of 9 asymmetric data according to claim 8 is characterized in that, in the described step (b), an intermediate variable is set, and is used for preserving the judgment standard weighted value of the current maximum of comparison procedure and the chained list node of corresponding data bag.
  10. The sending method of 10 asymmetric data according to claim 9 is characterized in that, the default weighted value in the described step (a) is kept in first recording domain of chained list node data field, and described default weighted value remains unchanged in overall process; Described current Transmit weight value is kept in second recording domain of described chained list node data field, reduces corresponding current Transmit weight value when described packet is selected.
CNB2005101119413A 2005-12-23 2005-12-23 Sending method for asymmetric data Expired - Fee Related CN100534178C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101119413A CN100534178C (en) 2005-12-23 2005-12-23 Sending method for asymmetric data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101119413A CN100534178C (en) 2005-12-23 2005-12-23 Sending method for asymmetric data

Publications (2)

Publication Number Publication Date
CN1988657A CN1988657A (en) 2007-06-27
CN100534178C true CN100534178C (en) 2009-08-26

Family

ID=38185259

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101119413A Expired - Fee Related CN100534178C (en) 2005-12-23 2005-12-23 Sending method for asymmetric data

Country Status (1)

Country Link
CN (1) CN100534178C (en)

Also Published As

Publication number Publication date
CN1988657A (en) 2007-06-27

Similar Documents

Publication Publication Date Title
CN107832343B (en) Bitmap-based method for quickly retrieving data by MBF data index structure
CN101828372B (en) Parallelizing the TCP behavior of a network connection
CN109756536B (en) Data transmission method, device and system
CN108696449B (en) Data scheduling method and device
CN103838552A (en) System and method for processing multi-core parallel assembly line signals of 4G broadband communication system
US9871893B2 (en) Method for making 32-bit addressing of SV data by utilizing FPGA
CN107404530A (en) Social networks cooperation caching method and device based on user interest similarity
CN104040995B (en) Multimedia redirection method, multimedia server, and computer system
CN113891396B (en) Data packet processing method and device, computer equipment and storage medium
CN103746768B (en) A kind of recognition methods of packet and equipment
CN101635831B (en) Method, device and agent system for sharing node data of P2P live video
CN109257244A (en) Transfer control method, the apparatus and system of user behavior data
CN100534178C (en) Sending method for asymmetric data
CN106294191B (en) The method for handling table, the method and apparatus for accessing table
CN109348513A (en) A kind of data pack transmission method, terminal and computer storage medium
CN110225352A (en) A kind of cloud game coding and decoding video selection method based on capability negotiation
CN103297474B (en) A kind of batch processing subpackage method and system
CN116264492A (en) SCMA decoding method, device, equipment and computer storage medium
CN107579804A (en) A kind of method and system for filtering duplicate data
CN114423043A (en) Method and equipment for mobile terminal to distribute link
CN105681112A (en) Method of realizing multi-level committed access rate control and related device
CN102916977B (en) Method and device for processing TCP (Transmission Control Protocol) request
US9621964B2 (en) Aborting data stream using a location value
CN109495931A (en) The data transmission method and relevant apparatus of link aggregation
CN105068949B (en) A kind of data transmission method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090826

Termination date: 20171223