Summary of the invention
Processing method, device and the storage for being designed to provide session in a kind of instant messaging application of the embodiment of the present applicationMedium, with solve user after more exchange device or multiple equipment in turn use in the case where need it is right in the equipment after replacementSession re-starts the problem of top set setting.
In a first aspect, the embodiment of the present application provides the processing method of session in a kind of instant messaging application, the processing sideMethod includes: the first top set session identification that server receives the instant messaging application that the first client is sent, wherein the first top setSession identification is used to identify the first top set session information of the instant messaging application in the first client;Server is set according to firstThe second top set session identification in top session identification and server determines top set different information, wherein the second top set session identificationFor the newest top set session information of the instant messaging application in identification server, top set different information is for indicating the first clientThe difference of the top set session of instant messaging application in end and server;Server sends top set difference letter to the first clientBreath, in order to which the first client updates the top set session that the instant messaging in the first client is applied using top set different information.
Therefore, the server in the embodiment of the present application determines that top set is poor by the first session identification and the second session identificationDifferent information, thus the first client can in such a way that increment pulls by top set different information from server pull to firstIn client.To which the embodiment of the present application is compared to currently existing scheme, the embodiment of the present application at least can be realized mitigation serverPressure, and the top set session setting that the instant messaging in the first client and server is applied reach consistent, Yi JitiThe effect of high user experience, thus solve user after more exchange device or multiple equipment in turn use in the case where needThe problem of top set setting is carried out in new equipment again.
In a possible embodiment, the first top set session identification is the first top set session version that the first client is sentThis number, the second top set session identification is the second top set session version number, and server is according to the first top set session identification and serverIn the second top set session identification determine top set different information, comprising: the first top set meeting that server sends the first clientWords version number and the second top set session version number are compared, to obtain top set different information, wherein top set different information includesThe the first top set session version number stored in server each version into all differences version number of the second top set session version numberThis number corresponding top set session information.
Therefore, the embodiment of the present application can be come by comparing the first top set session version number and the second top set session version numberTop set different information is obtained, is kept so that the top set session setting in the first client and the top set session in server are arrangedUnanimously.
In a possible embodiment, server to the first client send top set different information, comprising: server toFirst client sends top set different information and the second top set session identification, in order to which the first client utilizes top set different informationUpdate the top set session of the instant messaging application in the first client, and by the of the instant messaging application in the first clientOne top set session identification is updated to the second top set session identification.
Therefore, the embodiment of the present application in the first client by only saving a top set session identification, to saveFirst client searches the time of a top set session identification from multiple top set session identifications, quickly steps on so as to realizeRecord.
In a possible embodiment, processing method further include: server receives the first client is sent second and setsPush up session information, wherein the second top set session information indicates that the session increased newly in the first client setting or the session cancelled are setIt sets;The top set session that server updates the instant messaging application in server according to the second top set session information is arranged, Yi JiweiSecond top set session information distributes third top set session identification, wherein third top set session identification is for identifying the second top set meetingTalk about information;Server sends third top set session identification to the first client, in order to which the first client will be in the first clientInstant messaging application the first top set session identification be updated to third top set session identification.
Therefore, the embodiment of the present application by way of storing top set session identification in the server, Lai Shixian different clientsIt is consistent with the top set session setting in server that the instant messaging application at end is able to maintain it.
In a possible embodiment, the first client and the second client log in Instant Messenger using same account simultaneouslyNews application, processing method further include: server sends third top set session identification and the second top set session letter to the second clientBreath, in order to which the second client updates the top set meeting that the instant messaging in the second client is applied using the second top set session informationWords, and the 4th top set session identification of the instant messaging application in the second client is updated to third top set session identification,In, the 4th top set session identification is used to identify the 4th top set session information of the instant messaging application in the second client.
Therefore, the embodiment of the present application enables to second client online simultaneously with the first client to realize online updatingSession setting.
In a possible embodiment, the first client and the second client log in Instant Messenger using same account simultaneouslyNews application, processing method further include: server sends the 5th top set session identification and third top set session letter to the first clientBreath, in order to which the first client updates the top set meeting that the instant messaging in the first client is applied using third top set session informationWords, and the first top set session identification of the instant messaging application in the first client is updated to the 5th top set session identification,Wherein, the session setting that third top set session information indicates the session increased newly in the second client setting or cancels, the 5th top setSession identification is that server distributes for third top set session information, for identifying third top set session information.
Therefore, the embodiment of the present application enables to first client online simultaneously with the second client to realize online updatingSession setting.
Second aspect, the embodiment of the present application provide the processing method of session in a kind of instant messaging application, the processing sideMethod includes: the first top set session identification that the first user end to server sends instant messaging application, wherein the first top set sessionMark is for identifying the first top set session information of the application of the instant messaging in the first client;First client receives serverThe top set different information of transmission, wherein top set different information is server based in the first top set session identification and serverSecond top set session identification is come what is determined, and top set different information is for indicating that the instant messaging in the first client and server is answeredThe difference of top set session, newest top set meeting of the second top set session identification for the instant messaging application in identification serverTalk about information;First client updates the top set session of the instant messaging application in the first client using top set different information.
In a possible embodiment, the first top set session identification is the first top set session version number, the second top set meetingWords are identified as the second top set session version number, top set different information include the first top set session version number for being stored in server extremelyThe corresponding top set session information of each version number in all differences version number of second top set session version number.
In a possible embodiment, the first client receives the top set different information that server is sent, comprising: firstClient receives the top set different information and the second top set session identification that server is sent;Wherein, the first client utilizes top setDifferent information updates the top set session of the instant messaging application in the first client, comprising: the first client utilizes top set differenceThe top set session of instant messaging application in the first client of information update, and the instant messaging in the first client is appliedFirst top set session identification is updated to the second top set session identification.
In a possible embodiment, processing method further include: the first user end to server sends the second top set meetingTalk about information, wherein the session setting that the second top set session information indicates the session increased newly in the first client setting or cancels;TheOne client receives the third top set session identification that server is sent, wherein third top set session identification is that server is secondThe distribution of top set session information, third top set session identification is for identifying the second top set session information;First client is by firstFirst top set session identification of the instant messaging application in client is updated to third top set session identification.
In a possible embodiment, the first client and the second client log in Instant Messenger using same account simultaneouslyNews application, processing method further include: the first client receives the 5th top set session identification and third top set meeting that server is sentTalk about information;First client updates the top set meeting of the instant messaging application in the first client using third top set session informationWords, and the first top set session identification of the instant messaging application in the first client is updated to the 5th top set session identification,Wherein, the session setting that third top set session information indicates the session increased newly in the second client setting or cancels, the 5th top setSession identification is that server distributes for third top set session information, for identifying third top set session information.
The third aspect, the embodiment of the present application provide the processing method of session in a kind of instant messaging application, the first clientUsing the log-in instant communication application simultaneously of same account, which includes: that the second client receives for end and the second clientThe third top set session identification and the second top set session information that server is sent, wherein third top set session identification is serverFor the distribution of the second top set session information, third top set session identification is for identifying the second top set session information, the second top set meetingTalk about the session setting that information indicates the session increased newly in the first client setting or cancels;Second client utilizes the second top set meetingThe top set session of the instant messaging application in the second client of information update is talked about, and by the instant messaging application in the second clientThe 4th top set session identification be updated to third top set session identification.
Fourth aspect, the embodiment of the present application provide the processing unit of session in a kind of instant messaging application, processing dressIt sets and is applied to server, which includes: receiving module, what the instant messaging for receiving the transmission of the first client was appliedFirst top set session identification, wherein the first top set session identification is used to identify that instant messaging in the first client to apply theOne top set session information;Determining module, for according to the second top set session identification in the first top set session identification and serverDetermine top set different information, wherein newest setting of the second top set session identification for the instant messaging application in identification serverSession information is pushed up, top set different information is used to indicate the top set session of the instant messaging application in the first client and serverDifference;Sending module, for sending top set different information to the first client, in order to which the first client is believed using top set differenceBreath updates the top set session of the instant messaging application in the first client.
5th aspect, the embodiment of the present application provide the processing unit of session in a kind of instant messaging application, processing dressIt sets and is applied to the first client, which includes: sending module, for sending the first of instant messaging application to serverTop set session identification, wherein the first top set session identification is set for identifying the first of the application of the instant messaging in the first clientPush up session information;Receiving module, for receiving the top set different information of server transmission, wherein top set different information is serviceWhat device was determined based on the second top set session identification in the first top set session identification and server, top set different information is used for tableShow the difference of the top set session of the instant messaging application in the first client and server, the second top set session identification is for identifyingThe newest top set session information of instant messaging application in server;Update module, for updating the using top set different informationThe top set session of instant messaging application in one client.
6th aspect, the embodiment of the present application provide the processing unit of session in a kind of instant messaging application, processing dressIt sets and is applied to the second client, which includes: receiving module, for receiving the third top set session mark of server transmissionTo know and the second top set session information, wherein third top set session identification is that server distributes for the second top set session information, theThree top set session identifications increase newly in the second top set session information the first client of expression for identifying the second top set session informationSession setting or the session setting cancelled;Update module, for being updated in the second client using the second top set session informationThe top set session of instant messaging application, and the 4th top set session identification of the instant messaging application in the second client is updated toThird top set session identification.
7th aspect, the application provide a kind of storage medium, are stored with computer program on the storage medium, the computerMethod described in any optional implementation of first aspect or first aspect is executed when program is run by processor.
Eighth aspect, the application provide a kind of storage medium, are stored with computer program on the storage medium, the computerMethod described in any optional implementation of second aspect or second aspect is executed when program is run by processor.
9th aspect, the application provide a kind of storage medium, are stored with computer program on the storage medium, the computerMethod described in the implementation of the third aspect is executed when program is run by processor.
Above objects, features, and advantages to enable the embodiment of the present application to be realized are clearer and more comprehensible, be cited below particularly compared withGood embodiment, and cooperate appended attached drawing, it is described in detail below.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application is described.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang YiIt is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile the application'sIn description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Instant messaging (Instant Messaging) application is widely used in people's lives.Generally,For user after using using account or Account Logon instant messaging application, user can be according to itself demand by itself and someThe session of (or group) user is arranged to top set state or cancels top set state.
Currently, the storage of the existing top set session setting about instant messaging application has following two mode:
One way in which is that setting for instant messaging application is only kept records of in the local data base of the first clientPush up session setting.However, after user replaces the second client, since the first client does not support top set session setting to be synchronized toSecond client, so user needs the instant messaging in the second client to carry out top set setting to session again using inner,It is very inconvenient that this scheme causes user to use, to affect user experience.
It should be noted that the second client can be the equipment that user newly replaces, can also be used in turn for user moreAny one in other clients in a equipment in addition to the first client.
Another mode is the top set session setting saved in instant messaging application in the database of server, userLog on the first client perhaps log in the second client instant messaging application during the first client orSecond client can pull the whole top set session settings stored in server to local.Wherein, top set session setting packetInclude the setting information of all sessions (including top set session and non-top set session).First client or the second client can be byIt already existing top set session setting and is pulled from server in the local data base of one client or the second clientWhole top set session settings are compared, and are then updated according to comparison result in the first client or the second clientThe top set session of instant messaging application.
This currently existing scheme can make user step on every time by the first client or the second client above butDuring recording instant messaging application, the first client or the second client require the top set meeting from server pull wholeWords setting is very big so as to cause the pressure of server since the data volume of whole top set session settings is bigger.In addition, byAlready existing top set session is arranged and draws from server in the local data base of the first client or the second clientTime used in the comparison of the whole top set session settings taken is also long, to also affect the experience of user.
Therefore, the embodiment of the present application dexterously provide the processing method of session in a kind of instant messaging application, device andStorage medium, the top set session by storing instant messaging application in the server are arranged, and server can be according to the first visitorThe second top set session identification in the first top set session identification and server that family end is sent determines top set different information, thusTop set different information is sent to the first client by server, in order to which the first client updates according to top set different informationThe top set session of instant messaging application in one client.
It is set that is, being stored in server in the embodiment of the present application comprising all sessions in instant messaging applicationSession setting is pushed up, subsequent server determines that the top set session in server is set according to the first session identification and the second session identificationSet and the first client in top set session setting between have differences data (or top set different information), the first client can be withTop set different information is pulled into the first client in such a way that increment pulls, is set so that the first client can utilizeTop different information is arranged to update local top set session, to realize top set session setting and the service in the first clientTop set session in device is consistent, that is, realizes and be updated to the session of the instant messaging application in the first client, Jin ErcongAnd solve user after more exchange device or multiple equipment in turn use in the case where need to set again in new equipmentThe problem of top setting.
Therefore, the embodiment of the present application is not the top set sessions for being the whole that will be stored in server as in the state of the artSetting is all sent in the first client, but sends the first client for top set different information in such a way that increment pullsIn, so that the embodiment of the present application, compared to currently existing scheme, the embodiment of the present application at least can be realized mitigation server stress, withAnd the top set session setting that the instant messaging in the first client and server is applied reaches consistent, and improves user's bodyThe effect tested.
The embodiment of the present application in order to facilitate understanding, first at this to some terms in the embodiment of the present application explain asUnder:
Noun " session " can indicate the set of all instant communication informations of user and (or group) user.
Noun " top set session " can indicate the session in top set state in instant messaging application., for example, user willSome session is arranged to top, then the session is top set session.
Noun " the first top set session identification " indicates that first of the instant messaging application in (or mark) first client setsPush up session information.That is, there is the relationship mapped one by one between the first top set session identification and the first top set session information.
For example, the first top set session identification can be the first top set session version number, the first top set session information be can beTop set setting is carried out to some session in instant messaging application or cancels top set, and the first top set session identification and firstThere is the relationship mapped one by one between top set conversation message.That is, some session in being applied to instant messaging intoWhen the setting of row top set or cancellation top set setting, all there is a corresponding top set session identification, i.e. the first top set sessionMark is considered as the mark of the first top set conversation message.
For another example the first top set session identification can also be that at the first time, the first top set session information can be firstTime carries out top set setting to some session in instant messaging application or cancels top set.That is, to Instant MessengerWhen some session in news application carries out top set setting or cancels top set setting, it can use and a certain session is carried outThe setting time of setting comes as the first top set session identification.
Although it should be understood that coming with the first top set session version number and at the first time to carry out the first top set session identification aboveFor example, it is understood by those skilled in the art that can also be by other information as the first top set session markKnow, as long as guaranteeing that the first top set session identification can be identified for that the first top set session information, the embodiment of the present application does not do thisIt limits.
It should be noted that the others top set session identification such as the second top set session identification, third top set session identification is equalIt is similar with the first top set session identification, it no longer describes one by one herein, specifically refers to the description content of the first top set session identification.
Noun " the first top set session information " can indicate that some session in instant messaging application is arranged from top set stateAt not top set state, never top set state is arranged to top set state for some session that can also indicate in instant messaging application.That is the first top set session information can indicate the change of the state of some session in instant messaging application.
For example, the first top set session information can include but is not limited to: the mark ID of session meeting corresponding with mark IDThe state of words, instant messaging application in each session there is a unique ID, the mark ID of the session is exactly sessionUnique ID, can determine it is that session in instant messaging by unique ID.Such as, the mark ID of session can be withFor cell-phone number, or account name, or apply account.In addition, the state of the corresponding session of mark ID includes: top setState and non-top set state.
The first top set session is believed with the state of the mark ID of session session corresponding with mark ID above although should be understood thatBreath is illustrated, it is understood by those skilled in the art that the first top set session information may also include other information,As long as guaranteeing that the first top set session information can indicate the state change of some session in instant messaging application, the applicationEmbodiment does not limit this.
It should be noted that the others top set session information such as the second top set session information, third top set session information is equalIt is similar with the first top set session information, it no longer describes one by one herein, specifically refers to the description content of the first top set session information.
Noun " top set session setting " can indicate certain equipment (for example, the first client, the second client or serviceDevice) in store instant messaging application whole sessions setting information.
For example, top set session setting may include stored in the first client instant messaging application whole sessions (such asFirst session to the 5th session) setting information, which includes: the unique ID of the first session, the second sessionUnique ID, the unique ID of third session, the unique ID of the unique ID of the 4th session and the 5th session, withAnd first session top set state, the top set state of the second session, the top set state of third session, the top set state of the 4th sessionWith the top set state of the 5th session.
Referring to Figure 1, Fig. 1 shows a kind of applicable schematic diagram of processing system 100 of the embodiment of the present application.SpecificallyGround, the processing system 100 include one of server 110, network 120, the first client 130 and second client 140 orIt is a variety of.
In some embodiments, server 110 can be individual server, be also possible to server group.Server group canBe it is centralized, be also possible to distributed (for example, server 110 can be distributed system).In some embodiments,Server 110 relative to terminal, can be it is local, be also possible to it is long-range.For example, server 110 can be via network 120Access be stored in the first client 130, the second client 140, or any combination thereof in information and/or data.As anotherExample, server 110 can be directly connected at least one in the first client 130 and the second client 140, to access storageInformation and/or data.In some embodiments, server 110 can be realized in cloud platform.
In some embodiments, server 110 may include processor.Processor can handle related with service requestInformation and/or data, to execute one or more functions described in this application.For example, processor can be based on objective from firstThe first top set session identification that family end 130 obtains determines top set different information.In some embodiments, processor may includeOne or more processing core (for example, single core processor (S) or multi-core processor (S)).
Network 120 can be used for the exchange of information and/or data.In some embodiments, a group of processing system 100Part or multiple components (for example, the first client 130, second client 140) can send information or data to other assemblies.For example, server 110 can obtain the first session identification from the first client 130 via network 120.In some embodiments,Network 120 can be any kind of wired or wireless network or their combination.For example, network 120 may includeWired or wireless network access point, such as base station and/or network switching node, a component or multiple of processing system 100Component can be connected to network 120 by the access point to exchange data and/or information.
In some embodiments, the first client 130 or the second client 140 may include mobile device, plate electricityBrain or computer etc..
It should be noted that the processing method of session is suitable in a kind of instant messaging application provided by the embodiments of the present applicationVarious instant messaging applications.For example, the instant messaging application can be wechat, it is also possible to QQ, the embodiment of the present application not officeIt is limited to this.
The technical solution of the application in order to facilitate understanding, below to be retouched under the usage scenario of instant messaging applicationIt states.
Fig. 2 shows the flow chart of the processing method of session in a kind of instant messaging application provided by the embodiments of the present application,Method as shown in Figure 2 includes:
Step S210, the first user end to server send the first top set session of instant messaging application in the first clientMark, wherein the first top set session identification is used to identify the first top set session letter of the instant messaging application in the first clientBreath.
It should be understood that the first client can be the equipment that user uses always, it is also possible to the equipment that user newly replaces, thisApplication embodiment is not limited thereto.
Specifically, in the case where user is applied by the first client log-in instant communication, the first client can be fromThe first top set session identification of instant messaging application is searched in local data base.If finding the first top set session identification, theOne user end to server sends the first top set session identification.If searching less than the first top set session identification, the first clientAbout definite value is sent to server.
Wherein, the first top set session identification can for the only one that stores in the local data base of the first client withCorresponding top set session identification is applied in current instant messaging.That is, one of each instant messaging in the first clientAccount can only preserve a first top set session identification.And the new of server transmission is received in the first client and is setIn the case where pushing up session identification, the first client can update the first top set session identification by way of update.Here originallyApply for that embodiment by way of carrying out the update of top set session identification in the first client, can be avoided client and set from multipleThe selection course of newest top set session identification is selected in the session identification of top, so as to reduce when logging in of instant messaging applicationBetween.
For example, a session of the user in applying every time to instant messaging carries out the setting that top set is shown or cancellation is setWhen pushing up the setting of display, server all can send a top set session mark based on being arranged every time to the first client for userKnow, therefore, top set session identification can be regarded as incremental.It is the first top set session version number in the first top set session identificationIn the case where V1.0, subsequent the case where the second top set session version V2.0 that server is sent is received in the first clientUnder, the first client updates the first top set session version V1.0 using the second top set session version V2.0, that is, is updatingAfterwards, the first top set session identification is the second top set session version V2.0.
It should be understood that the second client is similar with the first client, i.e. one of each instant messaging in the second clientAccount can only preserve a 4th top set session identification, subsequent to be not repeated to retouch for details, reference can be made to above-mentioned related contentIt states.
Wherein, the 4th top set session identification is used to identify the 4th top set session of the instant messaging application in the second clientInformation.Since the first client and the second client are all in the state of online, the first client and the second client are all neededThe synchronizing process logged in, therefore, the 4th top set session identification in the second client being online can beThe 4th top set session in second client identical as the second top set session identification in the first client, being onlineInformation is also possible to the newest top set session information of instant messaging application.
In addition, if finding the first top set session identification, the first user end to server sends the first top set sessionIn the case where mark, in order to distinguish the top set session identification using account in different instant messaging applications, the first top set meetingWords mark can also include the information such as application identities and the application account of instant messaging application.
In addition, if the first user end to server sends the feelings of about definite value searching less than the first top set session identificationUnder condition, about definite value can be the value that the first client and server is appointed for this, so that about definite value is sent to by the first clientAfter server, server can determine that the first client is the new equipment for being not logged in instant messaging application.Wherein, the new equipmentIt can be original equipment after factory, can also be the equipment of the current account of first time log-in instant communication application.
To which server can be based on the about definite value, by whole top sets of the instant messaging stored in server applicationConversation message and the top set session identification of whole are all sent to the first client, in order to which the first client updates the first clientIn local data base in top set session setting, thus solve user re-started in new equipment top set session settingProblem.
Step S220, server receive the first top set session identification of the instant messaging application that the first client is sent.
Specifically, since the first client is when sending the first top set session identification to server, the first client can be rightFirst top set session identification such as is serialized, is encrypted at the preprocessing process, so server is sent receiving the first clientData after, server is also required to the relevant treatments such as to be decrypted to the data that the first client is sent just can be by the first top set meetingWords marker extraction comes out.
Step S230, server are set according to the second top set session identification determination in the first top set session identification and serverPush up different information, wherein newest top set session of the second top set session identification for the instant messaging application in identification serverInformation, top set different information are used to indicate the difference of the top set session of the instant messaging application in the first client and server.
It should be noted that being stored with multiple top set session identifications of instant messaging application in server and each settingPush up the corresponding top set session information of session identification.That is, the top set session of instant messaging application is arranged and every time to oneSession carries out top set or cancels the top set session information generated when top set setting and its corresponding top set session identification allIt is storable in the database of server.
Specifically, for server after getting the first top set session identification, server can be according to the first top set session markThe second top set session identification is searched in knowledge from the database of server, server can by comparing the first top set session identification andThe second top set session identification determines top set different information jointly.
Wherein, what the second top set session identification and the first top set session identification identified is the same of same instant messaging applicationThe top set session information of one account.
The detailed process of step S230 in order to facilitate understanding below retouches step S230 with specific two waysIt states.
It optionally, is the first top set session version number and second that the first client is sent in the first top set session identificationIn the case that top set session identification is the second top set session version number in server, passed since top set session version number can beThe session top set for the instant messaging application added and set, and store in server is set as the newest session of instant messaging applicationSetting, so, the first top set session version number in the first client is less than equal to the second top set session version in serverThis number.Server can be by comparing the size of the first top set session version number and the second top set session version number, to determineWith the presence or absence of top set different information.
If the first top set session version number is less than the second top set session version number, server determines that top set difference is believedBreath, the top set different information are the first top set session version number to the second top set session version for storing in database in serverThe corresponding top set session information of each version number in this number all differences version number.
It should be understood that server to the first client send top set different information when, can also by top set different information withAnd corresponding each version number (including second top set session version number) is all sent to the first client, it certainly can also be poor by top setDifferent information and the second top set session version number are sent to the first client, and the embodiment of the present application is not limited thereto.
For example, then being taken in the case where the first top set session version number that the first user end to server is sent is V1.0Business device compares the second top set session version number in the first top set session version V1.0 and server of the first client transmissionThe size of V2.0.The second top set session version V2.0 in the server is greater than the first top set session that the first client is sentIn the case where version number V1.0, server determines that the version number greater than the first top set session version V1.0 has version number V1.5In the case where this 2 version numbers of version number V2.0.Server is by the corresponding top set session information of version number V1.5 and versionNumber corresponding top set session information of V2.0 is sent to the first client as top set different information.
It should be noted that server is for a session in the same account that instant messaging is applied, the meetingWords are it is possible that be arranged multiple situation, for example, whithin a period of time, which being repeatedly arranged and is repeatedly cancelledTop set.But for the session, only one top set session version number in server.For example, being deposited in the database of serverThe version number of storage might have stored version V1.0, version number V4.0, there is no storage version V2.0 and version number V3.0 this twoA version number, because version number V2.0 and version number V3.0 likely correspond to the same session, the two versions are updated.
If the first top set session version number is equal to the second top set session version number, server is determined in the first clientThe setting of session top set it is consistent with the session top set setting in server, then top set different information is not present, in other words, top set is poorDifferent information is zero.
Optionally, the first top set session identification be at the first time and two top set session identifications be the second time feelingsThe session for the instant messaging application under condition, due to the time and being considered as an incremental mode, and storing in server is setTop is set as the newest session setting of user, so, the first time in the first client can be earlier than in serverSecond time, it is also possible to identical time point.Server can by comparing at the first time and the second time, be to determineIt is no that there are top set different informations.
If server searches the top set meeting of instant messaging application update after first time at the first time earlier than the second timeInformation is talked about, and using the top set session information found as top set different information.
It should be understood that server to the first client send top set different information when, can also by top set different information withAnd corresponding various time points (including second time) are all sent to the first client, certainly can also by top set different information andSecond time was sent to the first client, and the embodiment of the present application is not limited thereto.
For example, being 2018.6.10 8 a.m. in the first time that the first user end to server is sent, in serverSecond time was 2018.6.10 2 pm, then server determine 2018.6.10 8 a.m. and 2018.6.10 2 pm itBetween (do not include the corresponding top set session information of 2018.6.10 8 a.m.), instant messaging application has carried out the top set of 2 sessionsThe top set session information that this 2 times update and point of corresponding renewal time are all sent to the first visitor by the update of state, serverFamily end.
It should be noted that server is for a session in the same account that instant messaging is applied, the meetingWords are it is possible that be arranged multiple situation, for example, whithin a period of time, which being repeatedly arranged and is repeatedly cancelledTop set.But for the session, only correspondence is stored with a time in server.
If first time and the second time consistency, server determines the setting of the session top set in the first client and serviceSession top set setting in device is consistent, then top set different information is not present, in other words, top set different information is zero.
Step S240, server send top set different information to the first client.
Specifically, the transmission process of step S240 can be similar with the transmission process of step S220, is not repeated to describe herein,For details, reference can be made to the associated descriptions of step S220.
In addition, can also be with step subsequently with respect to data sender's formula between server and the first client or the second clientThe transmission process of rapid S220 is similar, subsequent to be also not repeated to describe.
Step S250, the first client update setting for the instant messaging application in the first client using top set different informationPush up session.
Specifically, the first client has session since top set different information includes at least after obtaining top set different informationMark ID and identify the state of the corresponding session of ID, so that can to update first using top set different information objective for the first clientThe top set session setting stored in the local data base at family end, so as to the boundary to the instant messaging application in the first clientThe display mode of session in face is updated.For example, a certain session in the interface that instant messaging is applied in the first clientBecome not top set state from top set state.
In addition, server is also sent out to the first client when server sends top set different information to the first clientThe second top set session identification is sent, then the first top set session identification in the first client can be also updated to second by the first clientTop set session identification, thus subsequent when the first user end to server sends top set session identification, server can basisTop set session identification is directly determined with the presence or absence of top set different information.
Connected it should be noted that the method for Fig. 2 can be with the application account that a client logs in an instant messagingThe scene using account connection server that multiple client logs in an instant messaging can also be applied in the scene for connecing server(i.e. in addition to the first client further includes other clients), the embodiment of the present application and in being confined to this.
To sum up, the server in the embodiment of the present application determines that top set is poor by the first session identification and the second session identificationDifferent information, thus the first client can in such a way that increment pulls by top set different information from server pull to firstIn client, so that the embodiment of the present application, compared to currently existing scheme, the embodiment of the present application at least can be realized mitigation serverPressure, and the top set session setting that the instant messaging in the first client and server is applied reach consistent, Yi JitiThe effect of high user experience, thus solve user after more exchange device or multiple equipment in turn use in the case where needThe problem of top set setting is carried out in new equipment again.
In the first client, the instant messaging in the first client is may be implemented in S210 to step S250 through the above stepsThe login process of application, during user carries out information exchange using the instant messaging application in the first client, userSession in can also instant messaging being applied carries out top set setting or cancels top set setting.
It should be noted that, although Fig. 3 illustrates only the case where only logging in same account there are two client, but this fieldIt will be appreciated by the skilled person that the application is also applicable to the scene that multiple client is logged in same account, work as multiple clientIn have a client session occur top set state change, other clients can also according to the first client change secondThe mode of client synchronization realizes the variations of various top set session settings.
Therefore, Fig. 3 shows the tool of the processing method of session in a kind of instant messaging application provided by the embodiments of the present applicationBody flow chart, the processing method of the embodiment of the present application further include:
Step S260, the first user end to server send the second top set session information, wherein the second top set session informationThe session setting for indicating the session increased newly in the first client setting or cancelling.
It should be understood that newly-increased session setting is considered as the mistake for using instant messaging to apply by the first client in userCheng Zhong, the top set that user carries out a certain session of the instant messaging application in the first client are arranged.Accordingly, to sessionCancelling set-top device can also be during user be applied by the first client using instant messaging, and user is to the first clientThe cancellation top set setting that a certain session of instant messaging application in end carries out.
Step S270, server receive the second top set session information that the first client is sent.
Step S280, server update the top set meeting that the instant messaging in server is applied according to the second top set session informationWords setting, and third top set session identification is distributed for the second top set session information, wherein third top set session identification is for markingKnow the second top set session information.
Specifically, after server receives the second top set session information, server is according in the second top set session informationThe mark ID of session whether there is top set session identification come the mark ID for searching corresponding session from the lane database of server.That is, server can determine whether the corresponding session of mark ID of session in the second top set session identification has been set beforeIt crosses.
If server determines mark ID, corresponding session has had top set session identification, the second top set of server by utilizingThe session information more state of the corresponding session of new logo ID and the top set session identification for updating the session, can guarantee server hereOnly one top set session identification of the corresponding session of mark ID of middle storage.
For example, the top set session identification of the corresponding session of mark ID is that version number V5.0 and second is set in the serverIn the case where session identification is pushed up as version number V7.0, it is corresponding that server by utilizing the second top set session information carrys out more new version number V5.0Session state, and the version number of the session is updated to version number V8.0 by version number V5.0.
If server determines mark ID, corresponding session does not have top set session identification, and server is according to the second top set sessionThe top set session setting of instant messaging application in information update server, and distribute third for the second top set session information and setPush up session identification.
For example, the corresponding session of mark ID does not have the maximum version in top set session identification and server in the serverIn the case that this number is V7.0, server identifies the top set state of the corresponding session of ID according to the second top set session information, andV8.0 is set by the version number of the session.
Step S290, server send third top set session identification to the first client.
Step S300, the first top set session identification that the first client applies the instant messaging in the first client updateFor third top set session identification, so as to be updated to the top set session identification in the first client.
Step S310, server determine that the first client and the second client use unified account while log-in instant communicationUsing.
Specifically: in the case where the top set session for determining itself is arranged and changes, server judges is serverIt is no to have the second client logged in using the account with the instant messaging application in the first client.Second client if it existsIt holds, then step S320;If it does not exist, then user, can be by upper after logging in the instant messaging application in the second clientState step S210 and realize to step S250 the synchronizing process of the second client, wherein synchronous the result is that making in serverTop set conversational equipment and the first client in top set session setting it is consistent.
Step S320, server send third top set session identification and the second top set session information to the second client.
Step S330, the second client update the instant messaging application in the second client using the second top set session informationTop set session, and by the second client instant messaging application the 4th top set session identification be updated to third top set sessionMark.
It should be understood that step S330 is similar with the process of above-mentioned steps S250, it is not repeated to describe herein.
In addition, Fig. 3, which shows user, carries out top set session setting and the second client online in fact by the first clientThe mode that existing top set session setting updates.It is understood by those skilled in the art that user can also by the second client comeTop set session setting is carried out, corresponding, the first client can also canbe used on line top set session setting update, realization process and figure3 is similar, is not described in detail herein.
Therefore, in a possible embodiment, the first client and the second client are logged in simultaneously using same accountInstant messaging application, server send the 5th top set session identification and third top set session information to the first client, wherein theThe session setting that three top set session informations indicate the session increased newly in the second client setting or cancel, the 5th top set session identificationIt is that server distributes for third top set session information, for identifying third top set session information;First client receives serviceThe 5th top set session identification and third top set session information that device is sent;First client is updated using third top set session informationThe top set session of instant messaging application in first client, and first of the instant messaging application in the first client is setTop session identification is updated to the 5th top set session identification.
It should be understood that the processing method of session is merely exemplary in above-mentioned instant messaging application, those skilled in the art's rootVarious modifications can be carried out according to above-mentioned method.
Fig. 4 is referred to, Fig. 4 shows the processing unit of session in a kind of instant messaging application provided by the embodiments of the present application400 structural schematic diagram, it should be appreciated that the device 400 is corresponding with the server side in above-mentioned Fig. 2 or Fig. 3 embodiment of the method, canEach step that above method embodiment server side is related to is executed, which may refer to aboveDescription, it is appropriate herein to omit detailed description to avoid repeating.Device 400 includes at least one can be with software or firmware(firmware) form is stored in memory or is solidificated in the operating system (operating system, OS) of device 400In software function module.Specifically, which includes: receiving module 410, is for receive the transmission of the first clientWhen communication applications the first top set session identification, wherein the first top set session identification for identify it is instant in the first clientFirst top set session information of communication applications;Determining module 420, for according in the first top set session identification and serverTwo top set session identifications determine top set different information, wherein the second top set session identification is for the Instant Messenger in identification serverThe newest top set session information of application is interrogated, top set different information is for indicating that the instant messaging in the first client and server is answeredThe difference of top set session;Sending module 430, for sending top set different information to the first client, in order to the first visitorFamily end updates the top set session of the instant messaging application in the first client using top set different information.
In a possible embodiment, the first top set session identification is the first top set session version number, the second top set meetingWords are identified as the second top set session version number, and determining module 420 includes: comparison module, are used for the first top set session version numberIt is compared with the second top set session version number, to obtain top set different information, wherein top set different information includes in serverEach version number is corresponding in all differences version number of the first top set session version number to the second top set session version number of storageTop set session information.
In a possible embodiment, sending module 430, be also used to the first client send top set different information andSecond top set session identification is answered in order to which the first client updates the instant messaging in the first client using top set different informationTop set session, and the first top set session identification of the instant messaging application in the first client is updated to the second top setSession identification.
In a possible embodiment, receiving module 410 are also used to receive the second top set meeting of the first client transmissionTalk about information, wherein the session setting that the second top set session information indicates the session increased newly in the first client setting or cancels;MoreNew module, the top set session for updating the instant messaging application in server according to the second top set session information are arranged, andThird top set session identification is distributed for the second top set session information, wherein third top set session identification is for identifying the second top setSession information;Sending module 430 is also used to send third top set session identification to the first client, in order to the first clientFirst top set session identification of the instant messaging application in the first client is updated to third top set session identification.
It should be understood that all having of indicating of update module 530 involved in update module and Fig. 5 in the embodiment of the present applicationThe module of more new function, difference are that the update module in the embodiment of the present application is arranged in the server, and the setting of update module 530 existsIn first client.
In a possible embodiment, the first client and the second client log in Instant Messenger using same account simultaneouslyNews application, sending module 430 are also used to send third top set session identification and the second top set session information to the second client,In order to which the second client updates the top set session that the instant messaging in the second client is applied using the second top set session information,And the 4th top set session identification of the instant messaging application in the second client is updated to third top set session identification.
In a possible embodiment, the first client and the second client log in Instant Messenger using same account simultaneouslyNews application, sending module 430 are also used to send the 5th top set session identification and third top set session information to the first client,In order to which the first client updates the top set session that the instant messaging in the first client is applied using third top set session information,And the first top set session identification of the instant messaging application in the first client is updated to the 5th top set session identification,In, the session setting that third top set session information indicates the session increased newly in the second client setting or cancels, the 5th top set meetingWords mark is that server is that third top set session information distributes, for identifying third top set session information.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing descriptionSpecific work process, no longer can excessively be repeated herein with reference to the corresponding process in preceding method.
Fig. 5 is referred to, Fig. 5 shows the processing dress of session in another instant messaging application provided by the embodiments of the present applicationSet 500 structural schematic diagram, it should be appreciated that the first client-side pair in the device 500 and above-mentioned Fig. 2 or Fig. 3 embodiment of the methodIt answers, is able to carry out each step that the first client-side of above method embodiment is related to, which can joinDescription in seeing above, it is appropriate herein to omit detailed description to avoid repeating.Device 500 include at least one can with software orThe form of firmware (firmware) be stored in memory or be solidificated in device 500 operating system (operating system,OS the software function module in).Specifically, which includes: sending module 510, for sending instant messaging to serverFirst top set session identification of application, wherein the instant messaging that the first top set session identification is used to identify in the first client is answeredFirst top set session information;Receiving module 520, for receiving the top set different information of server transmission, wherein top set is poorDifferent information is that server determines that top set is poor based on the second top set session identification in the first top set session identification and serverDifferent information is used to indicate the difference of the top set session of the instant messaging application in the first client and server, the second top set sessionNewest top set session information of the mark for the instant messaging application in identification server;Update module 530, for utilizing top setDifferent information updates the top set session of the instant messaging application in the first client.
In a possible embodiment, the first top set session identification is the first top set session version number, the second top set meetingWords are identified as the second top set session version number, top set different information include the first top set session version number for being stored in server extremelyThe corresponding top set session information of each version number in all differences version number of second top set session version number.
In a possible embodiment, receiving module 520, be also used to receive server transmission top set different information andSecond top set session identification;Update module 530 is also used to update the instant messaging in the first client using top set different informationThe top set session of application, and the first top set session identification of the instant messaging application in the first client is updated to the second top setSession identification.
In a possible embodiment, sending module 510 are also used to send the second top set session information to server,Wherein, the session setting that the second top set session information indicates the session increased newly in the first client setting or cancels;Receiving module520, it is also used to receive the third top set session identification of server transmission, wherein third top set session identification is that server is theThe distribution of two top set session informations, third top set session identification is for identifying the second top set session information;Update module 530, alsoFor the first top set session identification of the instant messaging application in the first client to be updated to third top set session identification.
In a possible embodiment, the first client and the second client log in Instant Messenger using same account simultaneouslyNews application, receiving module 520 are also used to receive the 5th top set session identification and third top set session information of server transmission;Update module 530 is also used to update the top set meeting of the instant messaging application in the first client using third top set session informationWords, and the first top set session identification of the instant messaging application in the first client is updated to the 5th top set session identification,Wherein, the session setting that third top set session information indicates the session increased newly in the second client setting or cancels, the 5th top setSession identification is that server distributes for third top set session information, for identifying third top set session information.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing descriptionSpecific work process, no longer can excessively be repeated herein with reference to the corresponding process in preceding method.
Fig. 6 is referred to, Fig. 6 shows the processing dress of session in another instant messaging application provided by the embodiments of the present applicationSet 600 structural schematic diagram, it should be appreciated that the second client-side pair in the device 600 and above-mentioned Fig. 2 or Fig. 3 embodiment of the methodIt answers, is able to carry out each step that the second client-side of above method embodiment is related to, which can joinDescription in seeing above, it is appropriate herein to omit detailed description to avoid repeating.Device 600 include at least one can with software orThe form of firmware (firmware) be stored in memory or be solidificated in device 600 operating system (operating system,OS the software function module in).Specifically, described in the first client and second client are logged in simultaneously using same accountInstant messaging application, the device 600 include: receiving module 610, for receive server transmission third top set session identification andSecond top set session information, wherein third top set session identification is server for the distribution of the second top set session information, and third is setPushing up session identification indicates the session increased newly in the first client for identifying the second top set session information, the second top set session informationThe session setting for being arranged or cancelling;Update module 620, for being using in the second top set session information the second client of updateWhen communication applications top set session, and the 4th top set session identification of the instant messaging application in the second client is updated to theThree top set session identifications.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing descriptionSpecific work process, no longer can excessively be repeated herein with reference to the corresponding process in preceding method.
The application also provides a kind of device, which may be provided in server, the first client or the second client.
Fig. 7 is a kind of structural block diagram of device 700 provided by the embodiments of the present application, as shown in Figure 7.Device 700 can wrapInclude processor 710, communication interface 720, memory 730 and at least one communication bus 740.Wherein, communication bus 740 is for realThe existing direct connection communication of these components.Wherein, the communication interface 720 of equipment is used to set with other nodes in the embodiment of the present applicationThe standby communication for carrying out signaling or data.Processor 710 can be a kind of IC chip, the processing capacity with signal.OnThe processor 710 stated can be general processor, including central processing unit (Central Processing Unit, abbreviationCPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), dedicatedIntegrated circuit (ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistorLogical device, discrete hardware components.It may be implemented or execute disclosed each method, step and the logic in the embodiment of the present applicationBlock diagram.General processor can be microprocessor or the processor 710 is also possible to any conventional processor etc..
Memory 730 may be, but not limited to, random access memory (Random Access Memory, RAM), onlyIt reads memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-OnlyMemory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM),Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..Computer-readable instruction fetch is stored in memory 730, when the computer-readable instruction fetch is executed by the processor 710When, device 700 can execute each step of the corresponding intrument side into Fig. 3 embodiment of the method above-mentioned Fig. 2.For example, in device 700In the case where setting in the server, computer-readable instruction fetch is stored in memory 730, when the computer-readable fetchingEnable by the processor 710 execute when, device 700 can execute above-mentioned Fig. 2 into Fig. 3 embodiment of the method server side it is eachStep.
Device 700 can also include storage control, input-output unit, audio unit, display unit.
The memory 730, processor 710, Peripheral Interface, input-output unit, audio unit, is shown storage controlShow that each element of unit is directly or indirectly electrically connected between each other, to realize the transmission or interaction of data.For example, these elementsIt can be realized and be electrically connected by one or more communication bus 740 between each other.The processor 710 is for executing memoryThe executable module stored in 730, such as software function module or computer program that device 700 includes.
Input-output unit is used to be supplied to user input data and realizes user and the server (or local terminal)Interaction.The input-output unit may be, but not limited to, mouse and keyboard etc..
Audio unit provides a user audio interface, may include one or more microphones, one or more loudspeakingDevice and voicefrequency circuit.
Display unit provided between the electronic equipment and user an interactive interface (such as user interface) orIt is referred to for display image data to user.In the present embodiment, the display unit can be liquid crystal display or touch-control is aobviousShow device.It can be the capacitance type touch control screen or resistance type touch control screen of support single-point and multi-point touch operation if touch control displayDeng.Single-point and multi-point touch operation is supported to refer to that touch control display can sense one or more positions on the touch control displayThe touch control operation setting place while generating, and the touch control operation that this is sensed transfers to processor to be calculated and handled.
Input-output unit is used to be supplied to the interaction that user input data realizes user and processing terminal.The input is defeatedUnit may be, but not limited to, out, mouse and keyboard etc..
It is appreciated that structure shown in Fig. 7 is only to illustrate, described device 700 may also include it is more than shown in Fig. 7 orLess component, or with the configuration different from shown in Fig. 7.Each component shown in fig. 7 can using hardware, software or itsCombination is realized.
The application provides a kind of storage medium, is stored with computer program on the storage medium, which is locatedMethod described in any optional implementation of the server side in Fig. 2 or Fig. 3 is executed when reason device operation.
The application provides a kind of storage medium, is stored with computer program on the storage medium, which is locatedMethod described in any optional implementation of the first client-side in Fig. 2 or Fig. 3 is executed when reason device operation.
The application provides a kind of storage medium, is stored with computer program on the storage medium, which is locatedMethod described in any optional implementation of the second client-side in Fig. 2 or Fig. 3 is executed when reason device operation.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing descriptionSpecific work process, no longer can excessively be repeated herein with reference to the corresponding process in preceding method.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weightPoint explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.For device class embodiment, since it is basically similar to the method embodiment, so being described relatively simple, related place ginsengSee the part explanation of embodiment of the method.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through itIts mode is realized.The apparatus embodiments described above are merely exemplary, for example, the flow chart and block diagram in attached drawing are aobviousThe device of multiple embodiments according to the application, architectural framework in the cards, the function of method and computer program product are shownIt can and operate.In this regard, each box in flowchart or block diagram can represent one of a module, section or codePoint, a part of the module, section or code includes one or more for implementing the specified logical function executableInstruction.It should also be noted that function marked in the box can also be attached to be different from some implementations as replacementThe sequence marked in figure occurs.For example, two continuous boxes can actually be basically executed in parallel, they sometimes may be usedTo execute in the opposite order, this depends on the function involved.It is also noted that each of block diagram and or flow chartThe combination of box in box and block diagram and or flow chart can be based on the defined function of execution or the dedicated of movementThe system of hardware is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation togetherPoint, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function moduleIt is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other wordsThe part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meterCalculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be aPeople's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps.And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are depositedThe various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.It needsIllustrate, herein, relational terms such as first and second and the like be used merely to by an entity or operation withAnother entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this realitiesThe relationship or sequence on border.Moreover, the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludabilityContain, so that the process, method, article or equipment for including a series of elements not only includes those elements, but also includingOther elements that are not explicitly listed, or further include for elements inherent to such a process, method, article, or device.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the elementProcess, method, article or equipment in there is also other identical elements.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this fieldFor art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repairChange, equivalent replacement, improvement etc., should be included within the scope of protection of this application.It should also be noted that similar label and letter existSimilar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawingIt is further defined and explained.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is anyThose familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all containLid is within the scope of protection of this application.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.