Embodiment
For making the object of the invention, technical scheme and advantage clearer, will combine accompanying drawing that the present invention is done to describe in detail further below.
In following each embodiment, number is the identification marking of transmit leg equipment, for example can be phone number, and telephone number etc. are used to distinguish different transmit legs.Transmit leg equipment can be terminal equipments such as mobile phone, phone, PC for sending the equipment of long SMS; Receiver equipment can be terminal equipments such as mobile phone, phone, PC for receiving the equipment of long SMS
Shown in accompanying drawing 1, the embodiment of the invention provides a kind of method of the affiliated long SMS of note that settles the standard.This method comprises:
Step 101 receives the standard short message that transmit leg equipment sends.
Receiver equipment receives the standard short message of being sent by transmit leg equipment.
Transmit leg equipment is split as n bar standard short message with long SMS, and every the standard short message of packing.Said packing standard short message comprises: the field assignment such as message identifier, message reference number, fragment number, total segments of giving every standard short message.
Wherein, fragment number is used for representing which section that this standard short message is a long SMS; Total segments is used to represent that this long SMS is split as several standard short message; Message reference number is used to distinguish different long SMSs.Long SMS of the every transmission of transmit leg equipment, message reference number can increase by 1, after message reference number increases to maximum, will be set to minimum value again.
Message identifier is the field in the existing protocol; Be used to distinguish different standard short message and (be not limited to belong to the standard short message of long SMS; Comprise all standard short message), i.e. standard short message of the every transmission of transmit leg equipment, message identifier increases 1; After reaching maximum, message identifier is re-set as 0.In the existing protocol, the scope of message identifier is 0 to 65535.
In assignment procedure, fragment number and message identifier all need continuously.The step-length that message reference number, fragment number and message identifier change all can be different from existing protocol, is that a fixed step size gets final product.
Step 102 is searched first the standard short message identical with the standard short message number of said reception.
In an embodiment of the present invention, the implication of first standard short message is: that receiver equipment receives, as to belong to same long SMS article one standard short message.Transmit leg equipment is when sending long SMS; Can long SMS be split as many standard short message; And receiver equipment is when receiving these standard short message; The order that receives maybe be different with the order of fragment number, so article one standard short message that belongs to same long SMS that receiver equipment receives is not necessarily the minimum note of fragment number.For example; Transmit leg equipment is split as 3 sections with a long SMS; The fragment number that splits the standard short message of gained is respectively 0,1,2; The fragment number of article one standard short message that belongs to this long SMS that receiver equipment receives is 1, and it is 1 standard short message that a then first standard short message is this fragment number, but not fragment number is 0 standard short message.Among the following embodiment, identical in the implication of first standard short message and the present embodiment below repeated no more.
Receiver equipment travels through first the standard short message of having deposited after receiving the standard short message A1 that belongs to long SMS A, searches whether to have first the standard short message identical with the number of standard short message A1.If do not find first the standard short message identical with standard short message A1 number, then execution in step 103.If find first the standard short message B1 identical with standard short message A1 number, then execution in step 105.
In the step 102, when searching first standard short message identical, can be that promptly execution in step 105 after finding a first standard short message B1 identical with standard short message A1 number with standard short message A1 number; Also can be after having searched first all standard short message, if there be first the standard short message identical with standard short message A1 number, execution in step 105 again.
Step 103 is confirmed bar standard short message headed by the standard short message of said reception.
Confirm bar standard short message headed by the standard short message of said reception, and first standard short message carried out mark, so as in other steps direct first standard short message of traversal.The method of mark is not limited to give first the mark that standard short message is special, also can adopt additive method and non-first standard short message to distinguish, and for example first standard short message is stored in other tabulations or the space.
Step 104 is calculated corresponding message identifier set and each message identifier in definite said message identifier set and the corresponding relation of fragment number of standard short message of said reception.
In step 103, bar standard short message headed by the standard short message A1 that confirms to receive.In the step 104, calculate the message identifier set C of this standard short message A1 correspondence according to fragment number, message identifier and the total segments of this standard short message A1.
Calculate message identifier set C method can for: according to fragment number, message identifier and the total segments of standard short message A1; According to fragment number and all continuous rule of message identifier, calculate the message identifier that belongs to other standard short message of same long SMS A with standard short message A1.The set of the message identifier of all standard short message of long SMS A constitutes described message identifier set C.
For example, according to step 101, long SMS A is split as 4 standard short message A1, A2, A3, A4.The fragment number of standard short message A1 is 0, and message identifier is 5; The fragment number of standard short message A2 is 1, and message identifier is 6; By that analogy, the fragment number of standard short message A4 is 3, and message identifier is 8.In step 103, bar standard short message headed by the validation criteria note A1.The fragment number of standard short message A1 is 0, and message identifier is 5, and total segments is 4.
Owing to the message identifier and the fragment number of the standard short message that belongs to a long SMS are all continuous; And step-length is 1; Therefore receiver equipment can calculate that the fragment number of the standard short message A2 in back of standard short message A1 is bigger by 1 than the fragment number of standard short message A1, and message identifier also big 1.The fragment number that reckoning draws standard short message A2 is 1, and message identifier is 6.By that analogy, the message identifier of the 3rd the standard short message A3 of the long SMS A under the standard short message A1 is 7, and fragment number is that the message identifier of 2, the four standard short message A4 is 8, and fragment number is 3.Thereby draw, the message identifier set C that standard short message A1 is corresponding is 5,6,7,8.
Utilize the method for aforementioned calculation message identifier set C, also can confirm each message identifier and the corresponding relation of fragment number in the said message identifier set C simultaneously.Corresponding relation is message identifier and the relation one to one of fragment number that belongs to the standard short message of same long SMS.For example for the message identifier of A1 is 5, fragment number is 0, and then the corresponding relation of message identifier and fragment number is message identifier 5 corresponding segments number 0.
Step 105 is searched first the standard short message identical respectively with total segments with the message reference number of the standard short message of said reception.
If in step 102; Be that to have found a first standard short message B1 identical with the standard short message A1 number of said reception be execution in step 105; Then in step 105, judge further whether the message reference number of said first standard short message B1 is identical with standard short message A1 with total segments.If identical then execution in step 106; If difference then return step 102 continues to search in first standard short message of traversal not.
If in step 102; Be to have searched first all standard short message; And exist a first standard short message B1 identical with the number of said standard short message A1; Ability execution in step 105, whether then step 105 is: in all first standard short message identical with standard short message A1 number, search, have the message reference number of a first standard short message and total segments identical respectively with total segments with the message reference number of standard short message A1.If have first standard short message that meets above-mentioned requirements then execution in step 106, if do not find first the standard short message that meets above-mentioned requirements, then execution in step 103.
Step 106 is searched first the standard short message that corresponding message identifier is gathered the message identifier of the standard short message that comprises said reception.
In step 105, find number, message reference number and total segments and distinguish first identical standard short message B1 with number, message reference number and the total segments of the standard short message A1 of said reception.
If in step 105, be to judge that first standard short message B1 meets the requirements the back with regard to execution in step 106, then in step 106, judge in the corresponding message identifier set of first standard short message B1 whether comprised the message identifier of standard short message A1.If comprise then execution in step 107,, in first standard short message of traversal not, continue to search first the standard short message identical with standard short message A1 number if do not comprise then return step 102.
If in step 105; Be after finding satisfactory first all standard short message; Just execution in step 106 then in step 106, is searched in all satisfactory first standard short message; Whether have a first standard short message, the corresponding message identifier set of this first standard short message has comprised the message identifier of standard short message A1.If find, then execution in step 107, if do not find then execution in step 103.
Step 107 is searched corresponding message identifier and is gathered the message identifier of the standard short message that comprises said reception in the corresponding relation of each interior message identifier and fragment number and first standard short message of fragment number corresponding relation.
In step 106, find first the standard short message B1 that corresponding message identifier set comprises standard short message A1.
If in step 106; Be to judge that the corresponding message identifier set of first standard short message B1 comprises the message identifier of standard short message A1; It is execution in step 107; Then in step 107, judge that the message identifier of first standard short message B1 correspondence is gathered in the corresponding relation of each interior message identifier and fragment number, whether comprise the message identifier of standard short message A1 and the corresponding relation of fragment number.If comprise, then execution in step 108, if do not comprise then return step 102, in first standard short message of traversal not, continue to search first the standard short message identical with standard short message A1 number.
If in step 106; Be after searching all satisfactory first standard short message; Exist the corresponding message identifier set of a first standard short message to comprise the message identifier of standard short message A1; Just execution in step 107 then in step 107, is searched first the standard short message that meets following requirement: the message identifier that comprises standard short message A1 in each message identifier of the message identifier set that this first standard short message is corresponding and the corresponding relation of fragment number.If find first standard short message meeting above-mentioned requirements then execution in step 108, if do not find, then execution in step 103.Because the corresponding relation of message identifier and fragment number is last requirement that need satisfy; As long as said find a first standard short message that meets above-mentioned requirements here just can execution in step 108, need not to find after satisfactory first all standard short message just execution in step 108.
Judge wherein the corresponding message identifier of first standard short message gathers in the corresponding relation of each interior message identifier and fragment number whether comprise the message identifier of standard short message A1 and the corresponding relation of fragment number; For example can for: the message identifier set F that first standard short message B1 is corresponding comprises message identifier 5; 6; 7,8.Each message identifier in the corresponding message identifier set F of first standard short message B1 and the corresponding relation of fragment number are: message identifier 5 corresponding segments number 0; Message identifier 6 corresponding segments number 1, message identifier 7 corresponding segments numbers 2 and message identifier 8 corresponding segments numbers 3.The message identifier of standard short message A1 is 5; Fragment number is 0; The corresponding relation of message identifier and fragment number is message identifier 5 corresponding segments number 0, is included in the corresponding relation of each message identifier and fragment number in the corresponding message identifier set of first standard short message B1.
Step 108 confirms that the standard short message of said reception and satisfactory first standard short message belong to same long SMS.
Receiver equipment confirms that the standard short message of satisfactory first standard short message and said reception belongs to same long SMS.Because passed through step 102,105,106 and 107 conditional filtering; So satisfactory first standard short message B1 is identical respectively with total segments with number, the message reference number of standard short message A1; And first the corresponding message identifier set of standard short message B1 comprises the message identifier of standard short message A1, and comprises the message identifier of standard short message A1 and the corresponding relation of fragment number in the corresponding relation of each message identifier in the message identifier set of first standard short message B1 correspondence and fragment number.
After confirming that A1 and B1 belong to a long SMS, just can the standard short message that belong to a long SMS be recombinated and shown.
In the above-described embodiments, have only first standard short message to have corresponding message identifier set, and each message identifier in the message identifier set and the corresponding relation of fragment number.For easier and convenient reorganization long SMS when traveling through, non-first standard short message also can have corresponding message identifier set, and each message identifier in the message identifier set and the corresponding relation of fragment number.Can in step 108, add; The message identifier set that satisfactory first standard short message is corresponding is gathered as the message identifier of the standard short message correspondence of said reception, and each message identifier in the message identifier set that satisfactory first standard short message is corresponding is gathered each the interior message identifier and the corresponding relation of fragment number with the corresponding relation of fragment number as the corresponding message identifier of the standard short message of said reception.Because non-first standard short message also has the corresponding message identifier set and the corresponding relation of message identifier and fragment number wherein; So do not needed to distinguish again first standard short message and non-first standard short message; When traversal, as long as find a standard short message of having deposited to meet above-mentioned requirements.
In the above-described embodiments, because the scope of message identifier is very big,, only utilize number and message identifier to confirm the described long SMS of standard short message of said reception so after step 102, can need not execution in step 105.Simultaneously, also can in step 105, only search first the standard short message identical, and need not to use simultaneously message reference number and total segments to distinguish with the identical or total segments of standard short message A1 message reference number.In order further to save step; Can omit step 107; Because the scope of message identifier is very big, so under the situation that the corresponding relation that does not use message identifier and fragment number is distinguished, also can realize the long SMS that correct validation criteria note is affiliated.
Confirmed the described long SMS of standard short message of said reception through the foregoing description after, receiver equipment can be recombinated all standard short message that belong to a long SMS, the correct long SMS that shows after recombinating.
Through the method in the foregoing description; Receive first standard short message of long SMS when receiver equipment after, can calculate the message identifier and the corresponding fragment number of all standard short message of the long SMS under this first standard short message according to this first standard short message.Therefore; If number, message reference number and total segments of first standard short message in the standard short message that after this receives and the long SMS that has existed are distinguished when identical; Whether the message identifier that then can judge this standard short message belongs to the corresponding message identifier set of said first standard short message; And whether the message identifier of this standard short message is included in the corresponding relation of each interior message identifier of the corresponding message identifier set of said first standard short message and fragment number with the corresponding relation of fragment number; Thereby confirm whether this standard short message belongs to same long SMS with said first standard short message, realize the correct reorganization and the demonstration of long SMS.Because the scope of message identifier is very big; And combine the fragment number field to judge together; Also utilized the combination of message reference number, number and total points hop count field to distinguish simultaneously, so thereby can avoid confirming or the misidentification standard short message under the reorganization that causes of long SMS unusual.And because message identifier is the protocol fields that has existed in the note, therefore, the method in the embodiment of the invention can not increase field, does not take the long SMS under the validation criteria note under the situation of more resources.
In the above-described embodiments, also can use other fields that are used for distinguishing the various criterion note to replace the message identifier of the foregoing description, said other field can be existing field or the field for increasing newly.The field of said replacement message identifier is after standard short message of every transmission; Need to increase or reduce a fixing step-length; This fixing step-length is not limited to 1, after increasing or reducing to a maximum or minimum value, is reset to a minimum value or a maximum.
Receiver equipment in the foregoing description comprises processing module and receiver module shown in accompanying drawing 2.Wherein, said receiver module is used to receive the standard short message that transmit leg equipment sends.
Said processing module is used to search first the standard short message identical with the standard short message A1 number of said reception.
Preferably, said processing module is further used for searching standard short message A1 number identical and message reference number and total first the also identical standard short message of segments with said reception.
In addition, also can be used to search standard short message A1 number with said reception identical and message reference number is identical, first the standard short message that perhaps number is identical and total segments is also identical for said processing module.
When finding and a first standard short message B1 that message reference number with fragment number also identical identical with standard short message A1 number; Said processing module is further used for, and judges the message identifier that whether comprises standard short message A1 in the corresponding message identifier set of first standard short message B1.
When in confirming the corresponding message identifier set of first standard short message B1, comprising the message identifier of standard short message A1; Said processing module is further used for, and judges the corresponding message identifier of first standard short message B1 gathers in the corresponding relation of each interior message identifier and fragment number whether comprise the message identifier of standard short message A1 and the corresponding relation of fragment number.
When comprising the corresponding relation of message identifier and fragment number of standard short message A1 in each message identifier in confirming the corresponding message identifier set of first standard short message B1 and the corresponding relation of fragment number; Said processing module is further used for, and validation criteria note A1 and first standard short message B1 belong to same long SMS.
When in confirming the corresponding message identifier set of first standard short message B1, not comprising the message identifier of standard short message A1; Or when not comprising the corresponding relation of message identifier and fragment number of standard short message A1 in the corresponding relation of each message identifier in confirming the corresponding message identifier set of first standard short message B1 and fragment number; Said processing module is further used for, and searches first the standard short message identical with standard short message A1 number.
When not finding first standard short message identical with standard short message A1 number; Said processing module is further used for bar standard short message headed by the validation criteria note A1, and each message identifier in the corresponding message identifier set of the corresponding message identifier set of basis of calculation note A1 and validation criteria note A1 and the corresponding relation of fragment number.
Said processing module is used for according to all continuous rule of the fragment number of the standard short message that belongs to a long SMS, message identifier, each message identifier in gathering according to message identifier, fragment number and the corresponding message identifier that message identifier is gathered and affirmation is corresponding of total segments reckoning standard short message A1 of standard short message A1 and the corresponding relation of fragment number.
In addition, said processing module can be used to search all first standard short message identical with standard short message A1 number, when not finding, and bar standard short message headed by the validation criteria note A1.
Said processing module is further used in all first standard short message identical with standard short message A1 number that find, searching identical with the message reference number of standard short message A1; Perhaps the total segments with standard short message A1 is identical; All perhaps identical respectively with total segments first standard short message with the message reference number of standard short message A1, bar standard short message headed by the validation criteria note A1 when not finding.
Said processing module is further used in first the standard short message that all are identical with standard short message A1 number and message reference number is also identical with total segments that finds; Perhaps in all first standard short message identical that find with standard short message A1 number; Perhaps in first the standard short message that all are identical with standard short message A1 number and message reference number is also identical that finds; Perhaps in first the standard short message that all are identical with standard short message A1 number and total segments is also identical that finds; Search all first standard short message that comprise the message identifier of standard short message A1 in the corresponding message identifier set, bar standard short message headed by the validation criteria note A1 when not finding.
Said processing module is further used in all the corresponding message identifiers set that finds, comprising in first the standard short message of message identifier of standard short message A1; Search first standard short message of the corresponding relation of the message identifier that comprises standard short message A1 in the corresponding relation of each message identifier and fragment number in the corresponding message identifier set and fragment number; When not finding, bar standard short message headed by the validation criteria note A1.
Said processing module can also be used for gathering as the corresponding message identifier of standard short message A1 belonging to the corresponding message identifier set of first standard short message B1 of same long SMS with standard short message A1.
Said processing module can also be used for gathering each the interior message identifier and the corresponding relation of fragment number with each message identifier in standard short message A1 belongs to the corresponding message identifier set of first standard short message B1 of same long SMS and the corresponding relation of fragment number as the corresponding message identifier of standard short message A1.
Receiver equipment in the above-described embodiments; Processing through processing module can be when receiving number, message reference number and always segments is identical respectively with the standard short message of having stored; Whether the message identifier of standard short message of judging this reception is in the corresponding message identifier set of the standard short message of having stored; And whether the corresponding relation of message identifier and fragment number of standard short message of judging this reception in the corresponding relation of each message identifier in the corresponding message identifier set of the standard short message of having stored and fragment number, thereby judges whether this standard short message and the standard short message of having stored belong to same long SMS.After the whole traversal of experience, can judge correctly which bar long SMS is the standard short message of reception belong to.
The system of calibrating the affiliated long SMS of accurate note in the foregoing description really comprises receiver equipment and transmit leg equipment shown in accompanying drawing 3.Wherein, transmit leg equipment is used for long SMS is split as standard short message, and the said standard short message of packing.Said packing standard short message comprises: the field assignment such as message reference number, message identifier, fragment number and total segments of giving standard short message.Transmit leg equipment also is used to send said standard short message.
Said receiver equipment is used for the acceptance criteria note, and searches first the standard short message identical with the standard short message A1 number of said reception.
Preferably, said receiver equipment is further used for searching standard short message A1 number identical and message reference number and total first the also identical standard short message of segments with said reception.
In addition, it is identical and message reference number is identical that said receiver equipment also can be used to search standard short message A1 number with said reception, perhaps is used to search first the standard short message that standard short message A1 number is identical and total segments is also identical with said reception.
When finding an and message reference number identical first standard short message B1 also identical with total segments with standard short message A1 number; Said receiver equipment is further used for, and judges the message identifier that whether comprises standard short message A1 in the corresponding message identifier set of first standard short message B1.
When in confirming the corresponding message identifier set of first standard short message B1, comprising the message identifier of standard short message A1; Said receiver equipment is further used for, and judges the corresponding message identifier of first standard short message B1 gathers in the corresponding relation of each interior message identifier and fragment number whether comprise the message identifier of standard short message A1 and the corresponding relation of fragment number.
When comprising the corresponding relation of message identifier and fragment number of standard short message A1 in each message identifier in confirming the corresponding message identifier set of first standard short message B1 and the corresponding relation of fragment number; Said receiver equipment is further used for, and validation criteria note A1 and first standard short message B1 belong to same long SMS.
When in confirming the corresponding message identifier set of first standard short message B1, not comprising the message identifier of standard short message A1; Or when not comprising the corresponding relation of message identifier and fragment number of standard short message A1 in the corresponding relation of each message identifier in confirming the corresponding message identifier set of first standard short message B1 and fragment number; Said receiver equipment is further used for, and searches first the standard short message identical with standard short message A1 number.
When not finding first standard short message identical with standard short message A1 number; Said receiver equipment is further used for bar standard short message headed by the validation criteria note A1, and each message identifier in the corresponding message identifier set of the corresponding message identifier set of basis of calculation note A1 and validation criteria note A1 and the corresponding relation of fragment number.
Said receiver equipment is used for according to all continuous rule of the fragment number of the standard short message that belongs to a long SMS, message identifier, each message identifier in gathering according to message identifier, fragment number and the corresponding message identifier that message identifier is gathered and affirmation is corresponding of total segments reckoning standard short message A1 of standard short message A1 and the corresponding relation of fragment number.
In addition, said receiver equipment can be used to search all first standard short message identical with standard short message A1 number, when not finding, and bar standard short message headed by the validation criteria note A1.
Said receiver equipment is further used in all first standard short message identical with standard short message A1 number that find, searching identical with the message reference number of standard short message A1; Perhaps the total segments with standard short message A1 is identical; All perhaps identical respectively with total segments first standard short message with the message reference number of standard short message A1, bar standard short message headed by the validation criteria note A1 when not finding.
Said receiver equipment is further used in first the standard short message that all are identical with standard short message A1 number and message reference number is also identical with total segments that finds; Perhaps in first the standard short message that all are identical with standard short message A1 number and message reference number is also identical that finds; Perhaps in first the standard short message that all are identical with standard short message A1 number and total segments is also identical that finds; Perhaps in all first standard short message identical that find with standard short message A1 number; Search all first standard short message that comprise the message identifier of standard short message A1 in the corresponding message identifier set, bar standard short message headed by the validation criteria note A1 when not finding.
Said receiver equipment is further used in all the corresponding message identifiers set that finds, comprising in first the standard short message of message identifier of standard short message A1; Search first standard short message of the corresponding relation of the message identifier that comprises standard short message A1 in the corresponding relation of each message identifier and fragment number in the corresponding message identifier set and fragment number; When not finding, bar standard short message headed by the validation criteria note A1; Validation criteria note A1 belongs to same long SMS with first the standard short message that finds when finding.
Said receiver equipment can also be used for gathering as the corresponding message identifier of standard short message A1 belonging to the corresponding message identifier set of first standard short message B1 of same long SMS with standard short message A1.
Said receiver equipment can also be used for gathering each the interior message identifier and the corresponding relation of fragment number with each message identifier in standard short message A1 belongs to the corresponding message identifier set of first standard short message B1 of same long SMS and the corresponding relation of fragment number as the corresponding message identifier of standard short message A1.
Receiver equipment in the said system can also specifically comprise receiver module and processing module shown in accompanying drawing 2 as shown in preceding, and the concrete realization of two modules is repeated no more at this with reference to the foregoing description.
Through calibrating the system of long SMS under the accurate note in the foregoing description really; Under the situation of the standard short message that receiver equipment can be identical at identical, the total segments of the standard short message number that receives and stored, message reference number is also identical, judge according to the message identifier and the corresponding fragment number of the standard short message that receives which bar long SMS is this standard short message belong to.
Though through reference some preferred implementation of the present invention; The present invention is illustrated and describes; But those of ordinary skill in the art should be understood that and can do various changes to it in form with on the details, and without departing from the spirit and scope of the present invention.