CN103338144B - A kind of session data synchronous method and device - Google Patents

A kind of session data synchronous method and device Download PDF

Info

Publication number
CN103338144B
CN103338144B CN201310210323.9A CN201310210323A CN103338144B CN 103338144 B CN103338144 B CN 103338144B CN 201310210323 A CN201310210323 A CN 201310210323A CN 103338144 B CN103338144 B CN 103338144B
Authority
CN
China
Prior art keywords
data
session
memory space
chronization
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310210323.9A
Other languages
Chinese (zh)
Other versions
CN103338144A (en
Inventor
卢剑锋
杨象禹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310210323.9A priority Critical patent/CN103338144B/en
Publication of CN103338144A publication Critical patent/CN103338144A/en
Application granted granted Critical
Publication of CN103338144B publication Critical patent/CN103338144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a kind of session data synchronous method and device, relate to the communications field, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience。The specific scheme is that and between server and client, set up session;Based on described session, described server receives the data synchronization request that described client sends;Wherein, described data synchronization request is for asking and the data of session described in described server sync;Described server determines that carrying data syn-chronization in described data synchronization request identifies, and adopts the mode of increment synchronization and described client to carry out data syn-chronization。The present invention is in the synchronizing process of session data。

Description

A kind of session data synchronous method and device
Technical field
The present invention relates to the communications field, particularly relate to a kind of session data synchronous method and device。
Background technology
Instant messaging (InstantMessenger, IM) is a kind of based on the Internet, it is allowed to communicating pair immediately transmits a kind of Communications service of the information such as word, voice, video。In instantaneous communication system, the detailed process that instant messaging realizes is: first set up communication link between client and server, then in this link channel, the session corresponding with this communication link is set up between client with server, the instant messaging service such as realize the instant chat between the user of client and other users eventually through the data syn-chronization of session, the state of linkman at client end presents。
State is presented to the data syn-chronization of this type instant messaging service, carrying out the synchronization of data initially with the mode that full dose is Tong Bu with after setting up session between server first in client, the data of this type instant messaging service follow-up can adopt the mode of increment synchronization to be synchronized by active push or the pulling of client of server。It is known that, often owing to some factors cause network connection interruption in mobile Internet, such as, user would be likely to occur signal interruption thus causing network connection interruption when passing in and out elevator, or the mobile equipment of user is from GPRS (general packet radio service) (GeneralPacketRadioService, GPRS) network is switched to Wireless Fidelity (WirelessFidelity, Wi-Fi) network connection interruption that network occurs, or the internet operating system (InternetWorkOperatingSystem for Fructus Mali pumilae, IOS) this single task system, when client is switched to backstage, task will be terminated hang-up, also result in network link interruption, and the interruption that network connects, will cause that communication link interrupts, and then there will be session abnormal end, effectiveness and the promptness of the data of this type instant messaging service is presented in order to ensure state, need between client and server re-establish communication link as early as possible and set up session, need timely session data to be synchronized after re-establishing session, the synchronization of the data of this type instant messaging service is presented including state, and the mode that the data acquisition full dose of this type instant messaging service synchronizes synchronizes。
Inventor have found that in prior art, at least there are the following problems: when network interrupts, re-establish between client and server after session, the data that state is presented this type instant messaging service by the mode that full dose synchronizes are adopted to synchronize, substantial amounts of resource consumption can be brought to client, including the consumption etc. of the consumption of flow, electricity, cause poor user experience。
Summary of the invention
Embodiments of the invention provide a kind of session data synchronous method and device, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience。
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
A first aspect of the present invention, it is provided that a kind of session data synchronous method, including:
Session is set up between server and client;
Based on described session, described server receives the data synchronization request that described client sends;Wherein, described data synchronization request is for asking and the data of session described in described server sync;
Described server determines that carrying data syn-chronization in described data synchronization request identifies, and adopts the mode of increment synchronization and described client to carry out data syn-chronization。
In conjunction with first aspect, in a kind of possible implementation, described data syn-chronization is designated memory space mark;
After setting up session between described server and client, also include:
Described server is described session distribution memory space, and is described memory allocation data syn-chronization mark;
Described data syn-chronization mark is sent to described client by described server;
When described session generation abnormal end, session data is stored in described memory space by described server;
Wherein, described session data is after described session generation abnormal end, and described server needs the data of the described session with described client synchronization, and described session data includes: for presenting the data of the linkman state of described session。
In conjunction with first aspect and above-mentioned possible implementation, in alternatively possible implementation, described data syn-chronization is designated ID;
After setting up session between described server and client, also include:
Described server is described session distribution memory space, and sets up the corresponding relation of described data syn-chronization mark and described memory space;
Described data syn-chronization mark is sent to described client by described server;
When described session generation abnormal end, session data is stored in described memory space by described server。
In conjunction with first aspect and above-mentioned possible implementation, in alternatively possible implementation, after session data is stored in described memory space by described server, also include:
Described server judges that in described memory space, whether the described session data of storage is overtime, however, it is determined that the described session data time-out of storage in described memory space, then delete described session data, and discharge described memory space;
And/or
Described server judges in described memory space, whether the size of the described session data of storage exceedes default capacity threshold, if it is determined that the size of the described session data of storage exceedes described capacity threshold in described memory space, then the part data in the described session data of storage in described memory space are abandoned。
In conjunction with first aspect and above-mentioned possible implementation, in alternatively possible implementation, described server determines that carrying data syn-chronization in described data synchronization request identifies, and adopts the mode of increment synchronization and described client to carry out data syn-chronization, including:
Described server determines that carrying data syn-chronization in described data synchronization request identifies, and identifies according to described data syn-chronization, and inquiring about storage in the described memory space corresponding with described data syn-chronization mark has described session data;
The described session data of storage in described memory space is sent to described client by described server。
A second aspect of the present invention, it is provided that a kind of session data synchronizer, including:
Set up unit, be used for and between client, set up session;
Receive unit, for setting up, based on described, the described session that unit is set up, receive the data synchronization request that described client sends;Wherein, described data synchronization request is for asking the data of described session Tong Bu with described device;
Determine lock unit, for determining, the described data synchronization request that described reception unit receives is carried data syn-chronization mark, adopt the mode of increment synchronization and described client to carry out data syn-chronization。
In conjunction with second aspect, in a kind of possible implementation, described data syn-chronization is designated memory space mark;
Described device also includes:
Allocation units, for described set up set up session between unit and client after, for described session distribute memory space, and be described memory allocation data syn-chronization identify;
Transmitting element, sends to described client for the described data syn-chronization mark obtained by described allocation units;
Memory element, for when described session generation abnormal end, it will words data are stored in described memory space;
Wherein, described session data is after described session generation abnormal end, it is necessary to the data of the described session with described client synchronization, and described session data includes: for presenting the data of the linkman state of described session。
In conjunction with second aspect and above-mentioned possible implementation, in alternatively possible implementation, described data syn-chronization is designated ID;
Described device also includes:
Unit is set up in distribution, for described set up set up session between unit and client after, distribute memory space for described session, and set up described data syn-chronization mark and the corresponding relation of described memory space;
Described transmitting element, is additionally operable to described distribution is set up the described data syn-chronization mark transmission extremely described client that unit obtains;
Described memory element, is additionally operable to when described session generation abnormal end, it will words data are stored in described memory space。
In conjunction with second aspect and above-mentioned possible implementation, in alternatively possible implementation, also include:
Judge performance element, after session data being stored in described memory space in described memory element, judge that in described memory space, whether the described session data of storage is overtime, if it is determined that the described session data time-out of storage in described memory space, then delete described session data, and discharge described memory space, and/or, judge in described memory space, whether the size of the described session data of storage exceedes default capacity threshold, if it is determined that the size of the described session data of storage exceedes described capacity threshold in described memory space, then the part data in the described session data of storage in described memory space are abandoned。
In conjunction with second aspect and above-mentioned possible implementation, in alternatively possible implementation, described determine lock unit, including:
Enquiry module, carries data syn-chronization mark for determining, identifies according to described data syn-chronization in the described data synchronization request that described reception unit receives, inquiring about storage in the described memory space corresponding with described data syn-chronization mark has described session data;
Sending module, for sending the described session data of storage in described memory space to described client。
The session data synchronous method of embodiment of the present invention offer and device, session is set up between server and client, based on described session, server receives the data synchronization request that client sends, and when determining that carrying data syn-chronization in this data synchronization request identifies, server adopts the mode of increment synchronization and client to carry out data syn-chronization, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience, and, decrease server and calculate the consumption of synchrodata。
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings。
A kind of session data synchronous method flow chart that Fig. 1 provides for one embodiment of the invention;
A kind of session data synchronous method flow chart that Fig. 2 provides for another embodiment of the present invention;
A kind of session data synchronizer composition schematic diagram that Fig. 3 provides for another embodiment of the present invention;
The another kind of session data synchronizer composition schematic diagram that Fig. 4 provides for another embodiment of the present invention;
Another session data synchronizer composition schematic diagram that Fig. 5 provides for another embodiment of the present invention;
A kind of session data synchro system composition schematic diagram that Fig. 6 provides for another embodiment of the present invention。
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments。Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention。
One embodiment of the invention provides a kind of session data synchronous method, as it is shown in figure 1, the method may include that
101, session is set up between server and client。
Concrete, to set up communication link between server and client, and set up session on this communication link, this session is for maintaining the communications status between server and client。
102, based on described session, server receives the data synchronization request that client sends。
Wherein, set up between server and client after session, based on this session, server receives the data synchronization request that client sends, so that server can according to the data of the data synchronization request received Yu this session of client synchronization, wherein, this data synchronization request is for asking and the data of session described in server sync。
103, server determines that carrying data syn-chronization in data synchronization request identifies, and adopts the mode of increment synchronization and client to carry out data syn-chronization。
Wherein, after server receives the data synchronization request that client sends, server may determine that whether carry data syn-chronization mark in the data synchronization request received, and when server is determined and carried data syn-chronization mark in data synchronization request, adopt the mode of increment synchronization and client to carry out data syn-chronization。
Optionally, when server is determined and do not carried data syn-chronization mark in the data synchronization request received, the mode that full dose synchronizes is adopted to carry out data syn-chronization with client。
The session data synchronous method that the embodiment of the present invention provides, session is set up between server and client, based on described session, server receives the data synchronization request that client sends, and when determining that carrying data syn-chronization in this data synchronization request identifies, server adopts the mode of increment synchronization and client to carry out data syn-chronization, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience, and, decrease server and calculate the consumption of synchrodata。
Another embodiment of the present invention provides a kind of session data synchronous method, as in figure 2 it is shown, the method may include that
201, session is set up between server and client。
Wherein, in client, server architecture, between server and client, communication programming detailed process is: set up communication link between server and client, this communication link is for the communication information between delivery server and client, then setting up session on this communication link between server and client, this session is used for the communications status maintaining between server and client。Therefore, when needing to carry out communication between server and client, communication link between server and client, can be set up, then on this logical communication link, set up session。
It should be noted that, between server from client, the foundation of communication link and session can according to different application scenarios in embodiments of the present invention, selecting different method for building up, the method for building up of communication link and session is not limited as by the embodiment of the present invention at this。
202, server is session distribution memory space, and identifies for memory allocation data syn-chronization, and wherein this data syn-chronization is designated memory space mark。
Wherein, after server sets up session with client, it is possible to distribute memory space for this session, and be this memory allocation data syn-chronization mark。Such as server can be one message queue of this conversation establishing in memory, to be used for storing the data of this session。Wherein this data syn-chronization is designated memory space mark, and this memory space needs the data of this Tong Bu session after being mainly used in the session generation abnormal end of storage server and client foundation between server with client。
Optionally, data syn-chronization mark can be ID, and now, step 202 could alternatively be: server is session distribution memory space, and sets up the corresponding relation of data syn-chronization mark and memory space。
Concrete, ID is the mark that can uniquely identify this session, and therefore server is after session distribution memory space, it is possible to be established as the memory space of this session distribution and the corresponding relation of ID。
203, data syn-chronization mark is sent to client by server。
Wherein, after server is session distribution memory space and the data syn-chronization mark that can uniquely identify this memory space, it is possible to this data syn-chronization mark is sent to client。
It should be noted that, the transmission of this data syn-chronization mark can be carry in the data sync response that server sends to client, can also being that this data syn-chronization mark is directly pushed to client by server, the transmission mode of data sync id be not limited as by the embodiment of the present invention at this。
Optionally, server according to the default detection cycle, can detect whether the session set up between server and client is interrupted。
Concrete, in mobile Internet, network connects and may interrupt due to a lot of reasons, therefore, server can according to the default detection cycle, whether the session set up between detection server and client there is aborted, and after session aborted being detected, performs following steps 204-step 206。
204, when session generation abnormal end, session data is stored in memory space by server。
Wherein, when session generation abnormal end, the session data needed with this session of client synchronization can be stored in the memory space distributed for this session by server。Such as, server can by after session abnormal end, it is necessary to be stored in the message queue that server is this conversation establishing in advance to the data of client synchronization。Session data is after session generation abnormal end, and server needs the data of this session with client synchronization, and this session data includes: for presenting the data of the linkman state of session。
205, server judges that in memory space, whether the session data of storage is overtime, if it is determined that the session data time-out of storage in memory space, then delete session data, and discharge memory space, and/or server judges in memory space, whether the size of the session data of storage exceedes default capacity threshold, if it is determined that the size of the session data of storage exceedes capacity threshold in memory space, then the part data in the session data stored in memory space are abandoned。
Wherein, in order to save the resource of server, at session generation abnormal end, after server storage of session data, server may determine that in memory space, whether the session data of storage is overtime, if it is determined that the session data time-out of storage in memory space, then delete session data, and discharge memory space。Concrete, judge in memory space whether the session data of storage has the method for time-out to be, after session generation abnormal end, server starts setting up the effect duration of the Article 1 session data needing storage, if the effect duration of subsequent session data has exceeded the time threshold preset, show that in this memory space, the session data of storage has timed out, now just can delete the session data of storage in this memory space, and discharge this memory space, wherein, the use scene that this time threshold can be server when distributing memory space for session according to session is arranged。Or, server can also judge in memory space, whether the size of the session data of storage exceedes default capacity threshold, if it is determined that the size of the session data of storage exceedes capacity threshold in memory space, then the part data in the session data stored in memory space are abandoned, can be wherein that the session data stored at first in memory space is abandoned, can also being abandoned by the session data of storage rear in memory space, this is not restricted for the embodiment of the present invention。
206, when client detects the session generation abnormal end set up with server, client again and sets up session between server。
Wherein, client can also according to the default detection cycle, and whether the session detecting and setting up between server abnormal end occurs, and after session generation abnormal end being detected, initiates connection establishment request to server, in order to server re-establishes session。
207, client is based on the session set up with server, sends data synchronization request to server。
Concrete, when client needs to carry out data syn-chronization with server, client based on the session set up with server, can send data synchronization request to server, and wherein this data synchronization request is used for asking and the data of this session of server sync。
Optionally, in client based on the session set up with server, before server transmission data synchronization request, can first judge whether client stores the data syn-chronization mark corresponding with this session, when determining that storage has the data syn-chronization mark corresponding with this session, this data syn-chronization mark is carried and sends in data synchronization request to server;If it is determined that when client does not store the data syn-chronization mark corresponding with this session, then only send data synchronization request to server。
208, based on the session set up with client, server receives the data synchronization request that client sends。
Wherein, when client is based on the session set up with server, after server sends data synchronization request, server just receives the data synchronization request that client sends。
209, server determines that carrying data syn-chronization in data synchronization request identifies, and identifies according to described data syn-chronization, and inquiring about storage in the memory space corresponding with data syn-chronization mark has session data。
Wherein, after server receives the data synchronization request that client sends, may determine that and whether this data synchronization request carries data syn-chronization mark, after determining that carrying data syn-chronization in data synchronization request identifies, identify according to this data syn-chronization, whether memory space corresponding with this data syn-chronization mark in querying server stores session data, and when storage has session data in inquiring the memory space corresponding with data syn-chronization mark, has performed following steps 210。
Optionally, if server is determined does not carry data syn-chronization mark in data synchronization request, the mode that full dose synchronizes then is adopted to carry out data syn-chronization with client, or, server determines that carrying data syn-chronization in data synchronization request identifies, but non-storage of session data in the memory space that inquiry is corresponding with this data syn-chronization mark, the mode being also adopted by full dose synchronization carries out data syn-chronization with client。
210, the session data stored in memory space is sent to client by server。
Wherein, determine when server and data synchronization request is carried data syn-chronization mark, and identify according to described data syn-chronization, when in the memory space that inquiry is corresponding with data syn-chronization mark, storage has session data, the session data stored in memory space is sent to client, to realize the increment synchronization of session data。
It should be noted that the process of the data syn-chronization described in the embodiment of the present invention can be through the realization of server active push, it is also possible to being pull realization by client, the process of data syn-chronization is not limited as by the embodiment of the present invention at this。
The session data synchronous method that the embodiment of the present invention provides, session is set up between server and client, based on described session, server receives the data synchronization request that client sends, and when determining that carrying data syn-chronization in this data synchronization request identifies, server adopts the mode of increment synchronization and client to carry out data syn-chronization, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience, and, decrease server and calculate the consumption of synchrodata。
Another embodiment of the present invention provides a kind of session data synchronizer, as it is shown on figure 3, include: sets up unit 31, receive unit 32, determine lock unit 33。
Set up unit 31, be used for and between client, set up session。
Receive unit 32, for setting up, based on described, the described session that unit 31 is set up, receive the data synchronization request that described client sends;Wherein, described data synchronization request is for asking the data of described session Tong Bu with described device。
Determine lock unit 33, for determining, the described data synchronization request that described reception unit 32 receives is carried data syn-chronization mark, adopt the mode of increment synchronization and described client to carry out data syn-chronization。
Further, described data syn-chronization is designated memory space mark。
As shown in Figure 4, described device can also include: allocation units 34, transmitting element 35, memory element 36。
Allocation units 34, for described set up set up session between unit 31 and client after, for described session distribute memory space, and be described memory allocation data syn-chronization identify。
Transmitting element 35, sends to described client for the described data syn-chronization mark obtained by described allocation units 34。
Memory element 36, for when described session generation abnormal end, it will words data are stored in described memory space。
Wherein, described session data is after described session generation abnormal end, it is necessary to the data of the described session with described client synchronization, and described session data includes: for presenting the data of the linkman state of described session。
Further, when described data syn-chronization is designated ID:
Described device can also include: unit 37 is set up in distribution。
Unit 37 is set up in distribution, for described set up set up session between unit 31 and client after, distribute memory space for described session, and set up described data syn-chronization mark and the corresponding relation of described memory space。
Described transmitting element 35, is additionally operable to described distribution is set up the described data syn-chronization mark transmission extremely described client that unit 37 obtains。
Described memory element 36, is additionally operable to when described session generation abnormal end, it will words data are stored in described memory space。
Further, described device can also include: judges performance element 38。
Judge performance element 38, after session data being stored in described memory space in described memory element 36, judge that in described memory space, whether the described session data of storage is overtime, if it is determined that the described session data time-out of storage in described memory space, then delete described session data, and discharge described memory space, and/or, judge in described memory space, whether the size of the described session data of storage exceedes default capacity threshold, if it is determined that the size of the described session data of storage exceedes described capacity threshold in described memory space, then the part data in the described session data of storage in described memory space are abandoned。
Further, described determine lock unit 33, including: enquiry module 331, sending module 332。
Enquiry module 331, carries data syn-chronization mark for determining, identifies according to described data syn-chronization in the described data synchronization request that described reception unit 32 receives, inquiring about storage in the described memory space corresponding with described data syn-chronization mark has described session data;
Sending module 332, for sending the described session data of storage in described memory space to described client。
Wherein, the session data synchronizer described in the embodiment of the present invention can apply to server。
A kind of session data synchronizer that the embodiment of the present invention provides, and set up session between client, based on described session, receive the data synchronization request that client sends, when determining that carrying data syn-chronization in this data synchronization request identifies, adopt the mode of increment synchronization and client to carry out data syn-chronization, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience, and, decrease server and calculate the consumption of synchrodata。
Another embodiment of the present invention provides a kind of session data synchronizer, as shown in Figure 5, including: at least one processor 41, memorizer 42, communication interface 43 and bus 44, this at least one processor 41, memorizer 42 are connected with communication interface 43 by bus 44 and are completed mutual communicating, wherein:
Described bus 44 can be industry standard architecture (IndustryStandardArchitecture, ISA) bus, external equipment interconnect (PeripheralComponentInterconnect, PCI) bus or extended industry-standard architecture (ExtendedIndustryStandardArchitecture, EISA) bus etc.。This bus 44 can be divided into address bus, data/address bus, control bus etc.。For ease of representing, Fig. 5 only represents with a thick line, it is not intended that only have a bus or a type of bus。
Described memorizer 42 is used for storing executable program code, and this program code includes computer-managed instruction。Memorizer 42 is likely to comprise high-speed RAM memorizer, it is also possible to also include nonvolatile memory (non-volatilememory), for instance at least one disk memory。
Described processor 41 is probably a central processing unit (CentralProcessingUnit, CPU), or specific integrated circuit (ApplicationSpecificIntegratedCircuit, ASIC), or be configured to implement the embodiment of the present invention one or more integrated circuits。
Described communication interface 43, is mainly used in the communication realizing between the equipment of the present embodiment。
Described processor 41, for performing in described memorizer 42 executable program code of storage, concrete being used for performs following operation:
Described processor 41, is used for and sets up session between client;Based on described session, receive the data synchronization request that described client sends;Wherein, described data synchronization request is for asking the data of described session Tong Bu with described device;Determine and described data synchronization request is carried data syn-chronization mark, adopt the mode of increment synchronization and described client to carry out data syn-chronization。
Further, described processor 41, after being additionally operable to set up session between described and client, distributes memory space for described session, and be that described memory allocation data syn-chronization identifies;Described data syn-chronization mark is sent to described client。
Described memorizer 42, is additionally operable to when described session generation abnormal end, it will words data are stored in described memory space;Wherein, described session data is after described session generation abnormal end, it is necessary to the data of the described session with described client synchronization, and described session data includes: for presenting the data of the linkman state of described session。
Further, described processor 41, after being additionally operable to set up session between described and client, distributes memory space for described session, and sets up the corresponding relation of described data syn-chronization mark and described memory space;Described data syn-chronization mark is sent to described client。
Described memorizer 42, is additionally operable to when described session generation abnormal end, it will words data are stored in described memory space。
Further, described processor 41, it is additionally operable to after session data is stored in described memory space by described memorizer 42, judge that in described memory space, whether the described session data of storage is overtime, if it is determined that the described session data time-out of storage in described memory space, then delete described session data, and discharge described memory space, and/or, judge in described memory space, whether the size of the described session data of storage exceedes default capacity threshold, if it is determined that the size of the described session data of storage exceedes described capacity threshold in described memory space, then the part data in the described session data of storage in described memory space are abandoned。
Further, described processor 41, it is additionally operable to determine in described data synchronization request and carries data syn-chronization mark, identify according to described data syn-chronization, inquiring about storage in the described memory space corresponding with described data syn-chronization mark has described session data;The described session data of storage in described memory space is sent to described client。
Wherein, the session data synchronizer described in the embodiment of the present invention can apply to server。
A kind of session data synchronizer that the embodiment of the present invention provides, and set up session between client, based on described session, receive the data synchronization request that client sends, when determining that carrying data syn-chronization in this data synchronization request identifies, adopt the mode of increment synchronization and client to carry out data syn-chronization, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience, and, decrease server and calculate the consumption of synchrodata。
Another embodiment of the present invention provides a kind of session data synchro system, as shown in Figure 6, including: session data synchronizer 51 and client 52。
Described session data synchronizer 51, is used for and sets up session between client 52;Based on described session, receive the data synchronization request that described client 52 sends;Wherein, described data synchronization request is for asking the data of described session Tong Bu with described device;Determine and described data synchronization request is carried data syn-chronization mark, adopt the mode of increment synchronization and described client 52 to carry out data syn-chronization。
Wherein, described session data synchronizer 51 can apply to server。
Described client 52, for sending data synchronization request to described session data synchronizer 51;Receive the data syn-chronization mark that described session data synchronizer 51 sends;Receive the session data that described session data synchronizer 51 sends。
A kind of session data synchro system that the embodiment of the present invention provides, session is set up between session data synchronizer and client, based on described session, receive the data synchronization request that client sends, when determining that carrying data syn-chronization in this data synchronization request identifies, adopt the mode of increment synchronization and client to carry out data syn-chronization, decrease client and carry out resource consumption during data syn-chronization with server, improve Consumer's Experience, and, decrease server and calculate the consumption of synchrodata。
Through the above description of the embodiments, those skilled in the art is it can be understood that can add the mode of required common hardware by software to the present invention and realize, naturally it is also possible to by hardware, but in a lot of situation, the former is embodiment more preferably。Based on such understanding, the part that prior art is contributed by technical scheme substantially in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk such as computer, hard disk or CD etc., including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) performs the method described in each embodiment of the present invention。
The above; being only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any those familiar with the art is in the technical scope that the invention discloses; the change that can readily occur in or replacement, all should be encompassed within protection scope of the present invention。Therefore, protection scope of the present invention should be as the criterion with described scope of the claims。

Claims (8)

1. a session data synchronous method, it is characterised in that including:
Session is set up between server and client;
Based on described session, described server receives the data synchronization request that described client sends;Wherein, described data synchronization request is for asking and the data of session described in described server sync;
Described server determines that carrying data syn-chronization in described data synchronization request identifies, and adopts the mode of increment synchronization and described client to carry out data syn-chronization;
Described data syn-chronization is designated memory space mark;
After setting up session between described server and client, also include:
Described server is described session distribution memory space, and is described memory allocation data syn-chronization mark;
Described data syn-chronization mark is sent to described client by described server;
When described session generation abnormal end, session data is stored in described memory space by described server;
Wherein, described session data is after described session generation abnormal end, and described server needs the data of the described session with described client synchronization, and described session data includes: for presenting the data of the linkman state of described session。
2. session data synchronous method according to claim 1, it is characterised in that described data syn-chronization is designated ID;
After setting up session between described server and client, also include:
Described server is described session distribution memory space, and sets up the corresponding relation of described data syn-chronization mark and described memory space;
Described data syn-chronization mark is sent to described client by described server;
When described session generation abnormal end, session data is stored in described memory space by described server。
3. session data synchronous method according to claim 1 and 2, it is characterised in that after session data is stored in described memory space by described server, also include:
Described server judges that in described memory space, whether the described session data of storage is overtime, however, it is determined that the described session data time-out of storage in described memory space, then delete described session data, and discharge described memory space;
And/or
Described server judges in described memory space, whether the size of the described session data of storage exceedes default capacity threshold, if it is determined that the size of the described session data of storage exceedes described capacity threshold in described memory space, then the part data in the described session data of storage in described memory space are abandoned。
4. session data synchronous method according to claim 3, described server determines that carrying data syn-chronization in described data synchronization request identifies, and adopts the mode of increment synchronization and described client to carry out data syn-chronization, including:
Described server determines that carrying data syn-chronization in described data synchronization request identifies, and identifies according to described data syn-chronization, and inquiring about storage in the described memory space corresponding with described data syn-chronization mark has described session data;
The described session data of storage in described memory space is sent to described client by described server。
5. a session data synchronizer, it is characterised in that including:
Set up unit, be used for and between client, set up session;
Receive unit, for setting up, based on described, the described session that unit is set up, receive the data synchronization request that described client sends;Wherein, described data synchronization request is for asking the data of described session Tong Bu with described device;
Determine lock unit, for determining, the described data synchronization request that described reception unit receives is carried data syn-chronization mark, adopt the mode of increment synchronization and described client to carry out data syn-chronization;
Described data syn-chronization is designated memory space mark;
Described device also includes:
Allocation units, for described set up set up session between unit and client after, for described session distribute memory space, and be described memory allocation data syn-chronization identify;
Transmitting element, sends to described client for the described data syn-chronization mark obtained by described allocation units;
Memory element, for when described session generation abnormal end, it will words data are stored in described memory space;
Wherein, described session data is after described session generation abnormal end, it is necessary to the data of the described session with described client synchronization, and described session data includes: for presenting the data of the linkman state of described session。
6. session data synchronizer according to claim 5, it is characterised in that described data syn-chronization is designated ID;
Described device also includes:
Unit is set up in distribution, for described set up set up session between unit and client after, distribute memory space for described session, and set up described data syn-chronization mark and the corresponding relation of described memory space;
Described transmitting element, is additionally operable to described distribution is set up the described data syn-chronization mark transmission extremely described client that unit obtains;
Described memory element, is additionally operable to when described session generation abnormal end, it will words data are stored in described memory space。
7. the session data synchronizer according to claim 5 or 6, it is characterised in that also include:
Judge performance element, after session data being stored in described memory space in described memory element, judge that in described memory space, whether the described session data of storage is overtime, if it is determined that the described session data time-out of storage in described memory space, then delete described session data, and discharge described memory space, and/or, judge in described memory space, whether the size of the described session data of storage exceedes default capacity threshold, if it is determined that the size of the described session data of storage exceedes described capacity threshold in described memory space, then the part data in the described session data of storage in described memory space are abandoned。
8. session data synchronizer according to claim 7, described determines lock unit, including:
Enquiry module, carries data syn-chronization mark for determining, identifies according to described data syn-chronization in the described data synchronization request that described reception unit receives, inquiring about storage in the described memory space corresponding with described data syn-chronization mark has described session data;
Sending module, for sending the described session data of storage in described memory space to described client。
CN201310210323.9A 2013-05-30 2013-05-30 A kind of session data synchronous method and device Active CN103338144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310210323.9A CN103338144B (en) 2013-05-30 2013-05-30 A kind of session data synchronous method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310210323.9A CN103338144B (en) 2013-05-30 2013-05-30 A kind of session data synchronous method and device

Publications (2)

Publication Number Publication Date
CN103338144A CN103338144A (en) 2013-10-02
CN103338144B true CN103338144B (en) 2016-06-22

Family

ID=49246245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310210323.9A Active CN103338144B (en) 2013-05-30 2013-05-30 A kind of session data synchronous method and device

Country Status (1)

Country Link
CN (1) CN103338144B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209948B (en) * 2015-05-07 2019-07-05 阿里巴巴集团控股有限公司 A kind of data push method and device
CN108632300B (en) * 2017-03-15 2021-12-10 阿里巴巴集团控股有限公司 Data synchronization system, method, server, client and electronic equipment
CN107454174A (en) * 2017-08-14 2017-12-08 安徽简道科技有限公司 The method for realizing network communication list data synchronization
CN110851526B (en) * 2018-08-02 2023-04-11 阿里巴巴集团控股有限公司 Data synchronization method, device and system
CN112347027A (en) * 2019-08-09 2021-02-09 安徽寒武纪信息科技有限公司 Data synchronization method and device and related product
CN111831337B (en) * 2019-04-19 2022-11-29 安徽寒武纪信息科技有限公司 Data synchronization method and device and related product
CN110493122B (en) * 2019-08-29 2022-01-28 北京拉勾网络技术有限公司 Session information synchronization method and device, computing equipment and storage medium
WO2022087811A1 (en) * 2020-10-27 2022-05-05 华为技术有限公司 Model inference abnormality processing method, and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1681248A (en) * 2004-04-06 2005-10-12 三星电子株式会社 Method and system for transmitting data for data synchronization between server and client
CN1852309A (en) * 2005-11-16 2006-10-25 华为技术有限公司 Data synchronizing processing method and its client end
CN101431401A (en) * 2008-09-08 2009-05-13 深圳华为通信技术有限公司 Synchronous fault processing method, client terminal, server and system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1681248A (en) * 2004-04-06 2005-10-12 三星电子株式会社 Method and system for transmitting data for data synchronization between server and client
CN1852309A (en) * 2005-11-16 2006-10-25 华为技术有限公司 Data synchronizing processing method and its client end
CN101431401A (en) * 2008-09-08 2009-05-13 深圳华为通信技术有限公司 Synchronous fault processing method, client terminal, server and system thereof

Also Published As

Publication number Publication date
CN103338144A (en) 2013-10-02

Similar Documents

Publication Publication Date Title
CN103338144B (en) A kind of session data synchronous method and device
US20210219041A1 (en) Voice data transmission method, wireless earphone and tws earphone
CN104812094B (en) The connection method for building up and device of equipment room
CN105657860B (en) A kind of method and device improving data service response speed
CN109120524B (en) Link aggregation method and related equipment
CN102571996B (en) IP (Internet Protocol) address assignment method, IP address assignment device and network system
EP3282734B1 (en) Data transmission method and terminal
WO2022161004A1 (en) Baud rate switching method and apparatus for uart communication, and initiator terminal
EP2945337A2 (en) Method, system and server for service switching
CN104320425A (en) Method and device for receiving and sending message
US10492245B2 (en) Call termination method, application processor, and modem
US10402280B2 (en) File transfer system and method, policy server, terminal and storage medium
EP3142442A1 (en) Method, device and system for controlling air interface resources
WO2018095175A1 (en) Communication message synchronization method, data backup method, device and storage medium
CN113840269B (en) Multimedia data transmission method and device, electronic equipment and storage medium
CN104991261A (en) Beidou multistage command control method and system
CN205283611U (en) End and server end news information will be moved and synchronous device will be carried out
CN110769019B (en) Session processing method, device, system, storage medium and computing equipment
WO2024078476A1 (en) Network switching method and apparatus
WO2024027745A1 (en) Network connection method, electronic device, readable storage medium, and chip
KR20160124518A (en) Method and apparatus for supporting communication of electronic device
CN104243473A (en) Data transmission method and device
CN112333849A (en) Equipment connection disconnection processing method and device, mobile terminal and storage medium
CN113132758B (en) Control method, device and computer program product of content distribution network
US20220405213A1 (en) Data processing method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200214

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee after: HUAWEI TECHNOLOGIES Co.,Ltd.

Address before: 210012 HUAWEI Nanjing base, 101 software Avenue, Yuhuatai District, Jiangsu, Nanjing

Patentee before: Huawei Technologies Co.,Ltd.