Summary of the invention:
The present invention provides a kind of method of handling off-line data in JICQ for addressing the above problem weak point.
In order to address the above problem, the invention provides following technical scheme: a kind of method of handling off-line data in JICQ comprises the steps
A kind of method of handling off-line data in JICQ is characterized in that: comprises the steps,
A. after the sender sent data to server, state was " not receiving ";
B. after the recipient reaches the standard grade, be the off-line data of " not receiving " for state then, server sends a notification message to the recipient;
C. after the recipient received the notice of server, if received this off-line data, then client can send an acknowledge message to server;
D1. after server is received acknowledge message, the state of this off-line data is changed to " receiving ";
D2. server is not received the affirmation message that the recipient sends, and thinks that then the recipient does not receive this off-line data, and when so next recipient reached the standard grade, server sent notice to it once more.
Also comprise when the recipient does not receive these data all the time,, can inquire the receiving record of these data then by the server lookup data record.
Described data comprise message or file.
Described message comprises conversation message, broadcast, incident, note.
Advantage of the present invention:
All data that client sends are all supported the off-line transmission; Off-line data all is a reliable transmission, has guaranteed that the recipient can not omit any data; Obtain the mode of off-line data by optional 2 times (head+contents), the user can select to obtain earlier important off-line data.
Embodiment:
As shown in Figure 1, a kind of method of handling off-line data in JICQ comprises the steps:
S0. when the sender when the recipient sends data, if recipient's off-line, these data of server stores then, and be labeled as the off-line data of " receiving ".
S1. recipient's logging on client;
S2. server check whether this user the has off-line data of " receive ";
Be somebody's turn to do " off-line data ", be meant when the sender sends that the recipient is not online, the data that can't receive.
Off-line data comprises 2 classes from data type:
Message or file.
Message comprises conversation message, broadcast, incident, note again.
Off-line data comprises 2 classes from sender's type:
The data that the user sends by client, user are by the event message of server triggers.
Off-line data no matter be what type, all is divided into 2 parts from the data structure angle:
Data head, the attribute of expression data; Data volume, the expression data content.
When the recipient receives data, can receive data head earlier, the recipient can understand the attribute of these data like this, comprises transmitting time, sender, data type, content summary etc., and whether decision receives then.Client sends and receives order, and then server sends the content of the off-line data of client-requested.
If S3. the off-line data of " not receiving " is arranged, then server sends a notification message to recipient's client.
S4. after the notified message of client, judge whether that according to the number of off-line data needs obtain in batches.The foundation of judging is that client is predetermined, if number>50 for example then obtain in batches, gets 50 at every turn.
S5. when needs obtain in batches, obtain the off-line data head in batches according to the number of subscribing; For example: 200 of off-line datas, then client meeting and server negotiate, client is obtained in batches, is set to get 1~50 for the first time, gets 51~100 etc. for the second time, can avoid like this causing that client, server and network are busy.
S6. when not needing to obtain, obtain all off-line data heads in batches;
S7. after client obtains the off-line data head,, notify the user that off-line data is arranged, and show the number and the attribute of off-line data by client end interface prompting user.Whether the user can obtain this off-line data according to the attribute decision;
If S8. this off-line data is obtained in user's decision, then click the content that this deferred information is checked at the interface, user end to server sends request, obtains the off-line data body.After server is received request, send the off-line data body of being asked to client.
S9. after client is received data volume, in user interface, show the content of this off-line data, and client sends acknowledge message from the trend server.
S10. after server is received acknowledge message, the state of this off-line data is changed to " receiving ", for the off-line data of " receiving ", server no longer sends notice to the recipient.Reach the standard grade otherwise work as the recipient at every turn, server all can notify it that deferred information of " receiving " is arranged.
When such mechanism has guaranteed that the sender sends data,, think then to send successfully that server is bound to give the recipient this data forwarding as long as server successfully receives.If the recipient does not receive these data all the time, for example: it is not reached the standard grade for a long time, then by the server lookup data record, can inquire the Download History of these data.