CN103338144A - Session data synchronization method and session data synchronization device - Google Patents

Session data synchronization method and session data synchronization device Download PDF

Info

Publication number
CN103338144A
CN103338144A CN2013102103239A CN201310210323A CN103338144A CN 103338144 A CN103338144 A CN 103338144A CN 2013102103239 A CN2013102103239 A CN 2013102103239A CN 201310210323 A CN201310210323 A CN 201310210323A CN 103338144 A CN103338144 A CN 103338144A
Authority
CN
China
Prior art keywords
data
session
client
server
memory space
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.)
Granted
Application number
CN2013102103239A
Other languages
Chinese (zh)
Other versions
CN103338144B (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

Images

Abstract

The invention discloses a session data synchronization method and a session data synchronization device, belongs to the communication field, reduces resource consumption during data synchronization between a client end and a server and improves user experience. According to a specific scheme, session between the server and the client end is established; the server receives a data synchronization request sent by the client end based on the session, the data synchronization request is used for requesting synchronization session data of the server; and the server determines that data synchronization identification is carried in the data synchronization request, data synchronization with the client end is realized through an increment synchronization mode. The session data synchronization method is used in a session data synchronization process.

Description

A kind of session data method for synchronous and device
Technical field
The present invention relates to the communications field, relate in particular to a kind of session data method for synchronous and device.
Background technology
(Instant Messenger is a kind of based on the Internet IM) to instant messaging, a kind of Communications service that allows communicating pair immediately to transmit information such as literal, voice, video.In instantaneous communication system, the detailed process that instant messaging is realized is: at first set up communication link between client and the server, set up the session corresponding with this communication link in this link channel between client and the server then, finally the user of the data sync realization client by session and the instant chat between other users, the state of linkman at client end such as present at instant messaging service.
The data sync that presents this type instant messaging service for state, client first and at first adopt after setting up session between the server the synchronous mode of full dose carry out data synchronously, the data of follow-up this type instant messaging service can adopt the synchronous mode of increment to be undertaken synchronously by active push or the pulling of client of server.As everyone knows, in mobile Internet, tend to because some factors cause network connection to be interrupted, for example, thereby the user may exist signal interruption to cause network connection to be interrupted when the turnover elevator, perhaps user's mobile device is from GPRS (General Packet Radio Service, GPRS) network switches to Wireless Fidelity (Wireless Fidelity, Wi-Fi) network connection of network appearance is interrupted, perhaps for internet operating system (the Internet Work Operating System of apple, IOS) this single task system, task will be terminated hang-up when client switches to the backstage, also can cause network link to interrupt, and the interruption of network connection, will cause communication link to interrupt, and then session abnormal end can appear, the validity and the promptness that present the data of this type instant messaging service in order to ensure state, need to rebulid as early as possible communication link between the client and server and set up session, after rebuliding session, need timely session data to be carried out synchronously, present comprising state this type instant messaging service data synchronously, and the synchronous mode of the The data full dose of this type instant messaging service is carried out synchronously.
The inventor finds that there are the following problems at least in the prior art: when network interrupts, rebulid after the session between client and the server, adopt the synchronous mode of full dose that the data that state presents this type instant messaging service are carried out synchronously, can bring a large amount of resource consumptions to client, comprising the consumption of flow, consumption of electric etc., cause poor user experience.
Summary of the invention
Embodiments of the invention provide a kind of session data method for synchronous and device, and the resource consumption when having reduced client and server and carrying out data sync has improved user's experience.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A first aspect of the present invention provides a kind of session data method for synchronous, comprising:
Set up session between server and the client;
Based on described session, described server receives the data synchronization request that described client sends; Wherein, described data synchronization request is used for the data of request and the described session of described server sync;
Described server determines to carry in the described data synchronization request data sync sign, adopts synchronous mode and the described client of increment to carry out data sync.
In conjunction with first aspect, in a kind of possible implementation, described data sync is designated the memory space sign;
After between described server and client, setting up session, also comprise:
Described server is described session memory allocated space, and is described memory allocation data sync sign;
Described server is sent to described client with described data sync sign;
When described session generation abnormal end, described server is stored in the session data in the described memory space;
Wherein, after described session data is described session generation abnormal end, described server need with the data of the synchronous described session of described client, described session data comprises: the data that are used for presenting the linkman state of described session.
In conjunction with first aspect and above-mentioned possible implementation, in the possible implementation of another kind, described data sync is designated user ID;
After between described server and client, setting up session, also comprise:
Described server is described session memory allocated space, and sets up the corresponding relation of described data sync sign and described memory space;
Described server is sent to described client with described data sync sign;
When described session generation abnormal end, described server is stored in the session data in the described memory space.
In conjunction with first aspect and above-mentioned possible implementation, in the possible implementation of another kind, after described server is stored in the session data in the described memory space, also comprise:
Described server judges whether the described session data of storing in the described memory space is overtime, if determine that the described session data of storing in the described memory space is overtime, then deletes described session data, and discharges described memory space;
And/or
Described server judges whether the size of the described session data of storing in the described memory space surpasses default capacity threshold, if the size of the described session data of storing in definite described memory space surpasses described capacity threshold, then the partial data in the described session data of storing in the described memory space is abandoned.
In conjunction with first aspect and above-mentioned possible implementation, in the possible implementation of another kind, described server determines to carry in the described data synchronization request data sync sign, adopts synchronous mode and the described client of increment to carry out data sync, comprising:
Described server determines to carry in the described data synchronization request data sync sign, and according to described data sync sign, inquiry identifies in the corresponding described memory space with described data sync and stores described session data;
Described server is sent to described client with the described session data of storing in the described memory space.
A second aspect of the present invention provides a kind of session data synchronizer, comprising:
Set up the unit, be used for and client between set up session;
Receiving element for based on described described session of setting up unit foundation, receives the data synchronization request that described client sends; Wherein, described data synchronization request is used for the data of request and the synchronous described session of described device;
Determine lock unit, the described data synchronization request that is used for definite described receiving element reception is carried the data sync sign, adopts synchronous mode and the described client of increment to carry out data sync.
In conjunction with second aspect, in a kind of possible implementation, described data sync is designated the memory space sign;
Described device also comprises:
Allocation units, be used for described set up set up session between unit and the client after, be described session memory allocated space, and be that described memory allocation data sync identifies;
Transmitting element is used for the described data sync sign that described allocation units obtain is sent to described client;
Memory cell is used for when described session generation abnormal end the session data being stored in the described memory space;
Wherein, after described session data is described session generation abnormal end, need with the data of the synchronous described session of described client, described session data comprises: the data that are used for presenting the linkman state of described session.
In conjunction with second aspect and above-mentioned possible implementation, in the possible implementation of another kind, described data sync is designated user ID;
Described device also comprises:
Distribute and to set up the unit, be used for described set up set up session between unit and the client after, be described session memory allocated space, and set up the corresponding relation of described data sync sign and described memory space;
Described transmitting element is used for that also the described data sync sign that the unit obtains is set up in described distribution and is sent to described client;
Described memory cell also is used for when described session generation abnormal end the session data being stored in the described memory space.
In conjunction with second aspect and above-mentioned possible implementation, in the possible implementation of another kind, also comprise:
Judge performance element, be used for after described memory cell is stored in described memory space with the session data, judge whether the described session data of storing in the described memory space is overtime, if determine that the described session data of storing in the described memory space is overtime, then delete described session data, and discharge described memory space, and/or, whether the size of judging the described session data of storing in the described memory space surpasses default capacity threshold, if the size of the described session data of storing in definite described memory space surpasses described capacity threshold, then the partial data in the described session data of storing in the described memory space is abandoned.
In conjunction with second aspect and above-mentioned possible implementation, in the possible implementation of another kind, described definite lock unit comprises:
Enquiry module, the described data synchronization request that is used for definite described receiving element reception is carried the data sync sign, and according to described data sync sign, inquiry identifies in the corresponding described memory space with described data sync and stores described session data;
Sending module, the described session data that is used for described memory space is stored is sent to described client.
Session data method for synchronous and device that the embodiment of the invention provides, set up session between server and the client, based on described session, server receives the data synchronization request that client sends, and when carrying the data sync sign in determining this data synchronization request, server adopts synchronous mode and the client of increment to carry out data sync, resource consumption when having reduced client and server and carrying out data sync, improved user's experience, and, the consumption that server calculates synchrodata reduced.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
A kind of session data method for synchronous flow chart that Fig. 1 provides for one embodiment of the invention;
A kind of session data method for synchronous flow chart that Fig. 2 provides for another embodiment of the present invention;
Fig. 3 forms schematic diagram for a kind of session data synchronizer that another embodiment of the present invention provides;
Fig. 4 forms schematic diagram for the another kind of session data synchronizer that another embodiment of the present invention provides;
Fig. 5 forms schematic diagram for another session data synchronizer that another embodiment of the present invention provides;
Fig. 6 forms schematic diagram for a kind of session data synchro system that another embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
One embodiment of the invention provides a kind of session data method for synchronous, and as shown in Figure 1, this method can comprise:
101, set up session between server and the client.
Concrete, to set up communication link between server and the client, and set up session at this communication link, this session is used for keeping the communications status between server and the client.
102, based on described session, server receives the data synchronization request that client sends.
Wherein, after setting up session between server and the client, based on this session, server receives the data synchronization request that client sends, so that server can be according to the data of the data synchronization request that receives and client this session synchronously, wherein, this data synchronization request is used for the data of request and the described session of server sync.
103, carry the data sync sign in the server specified data synchronization request, adopt synchronous mode and the client of increment to carry out data sync.
Wherein, after server receives the data synchronization request of client transmission, server can judge whether carry the data sync sign in the data synchronization request that receives, and when carrying the data sync sign in the server specified data synchronization request, adopt synchronous mode and the client of increment to carry out data sync.
Optionally, when not carrying the data sync sign in the data synchronization request that server is determined to receive, adopt synchronous mode and the client of full dose to carry out data sync.
The session data method for synchronous that the embodiment of the invention provides, set up session between server and the client, based on described session, server receives the data synchronization request that client sends, and when carrying the data sync sign in determining this data synchronization request, server adopts synchronous mode and the client of increment to carry out data sync, resource consumption when having reduced client and server and carrying out data sync, improved user's experience, and, the consumption that server calculates synchrodata reduced.
Another embodiment of the present invention provides a kind of session data method for synchronous, and as shown in Figure 2, this method can comprise:
201, set up session between server and the client.
Wherein, in client, server architecture, the realization detailed process of communication between server and the client is: set up communication link between server and the client, this communication link is used for the communication information between delivery server and the client, set up session at this communication link between server and the client then, this session is used for keeping the communications status between server and the client.Therefore, when needing to carry out communication between server and the client, can set up communication link between server and the client, set up session at this communicate via communication link then.
Need to prove, the foundation of communication link and session can be according to different application scenarioss between server and the client in embodiments of the present invention, select different method for building up, the embodiment of the invention is not restricted at this method for building up to communication link and session.
202, server is session memory allocated space, and is memory allocation data sync sign, and wherein this data sync is designated the memory space sign.
Wherein, after server and client are set up session, can be this session memory allocated space, and be this memory allocation data sync sign.For example server can be message queue of this conversation establishing in memory, to be used for storing the data of this session.Wherein this data sync is designated the memory space sign, and this memory space is mainly used in needing the data of this synchronous session between server and the client after the session generation abnormal end of storage server and client foundation.
Optionally, the data sync sign can be user ID, and at this moment, step 202 can replace with: server is session memory allocated space, and sets up the corresponding relation of data sync sign and memory space.
Concrete, user ID be can this session of unique identification sign, so server is after the session memory allocated space, can be established as memory space that this session distributes and the corresponding relation of user ID.
203, server is sent to client with the data sync sign.
Wherein, after server is session memory allocated space and data sync sign that can this memory space of unique identification, this data sync sign can be sent to client.
Need to prove, the transmission of this data sync sign can be to be carried at server in the data sync response of client transmission, can be that server directly pushes to client with this data sync sign, the embodiment of the invention be restricted at this send mode to the data sync id yet.
Optionally, whether server can detect the session of setting up between server and the client and interrupt according to default sense cycle.
Concrete, in mobile Internet, network connection may be interrupted owing to a lot of reasons, therefore, server can be according to default sense cycle, detect the session of setting up between server and the client whether unusual interruption takes place, and after detecting the unusual interruption of session, carry out following steps 204-step 206.
204, when session generation abnormal end, server is stored in the session data in the memory space.
Wherein, when session generation abnormal end, server can will need be stored in the memory space that distributes into this session with the session data of synchronous this session of client.For example, server can need be stored in server in advance in the message queue of this conversation establishing to the client data in synchronization with after the session abnormal end.After session data is session generation abnormal end, server need with the data of synchronous this session of client, this session data comprises: the data that are used for presenting the linkman state of session.
205, server judges whether the session data of storing in the memory space is overtime, if determine that the session data of storing in the memory space is overtime, then delete session data, and release memory space, and/or server judges whether the size of the session data of storing in the memory space surpasses default capacity threshold, if the big or small exceed capacity threshold value of the session data of storing in definite memory space then abandons the partial data in the session data of storing in the memory space.
Wherein, in order to save the resource of server, in session generation abnormal end, after the server stores session data, server can judge whether the session data of storing in the memory space is overtime, if determine that the session data of storing in the memory space is overtime, then delete session data, and discharge memory space.Concrete, judge whether the session data of storing in the memory space has overtime method to be, after session generation abnormal end, server begins to arrange the term of validity of article one session data that needs storage, when if the term of validity of subsequent session data has surpassed default time threshold, show that the session data of storing in this memory space is overtime, just can delete the session data of storing in this memory space this moment, and discharge this memory space, wherein, this time threshold can be that server use scene according to session for session memory allocated space the time arranges.Perhaps, server can judge also whether the size of the session data of storing in the memory space surpasses default capacity threshold, if the big or small exceed capacity threshold value of the session data of storing in definite memory space, then the partial data in the session data of storing in the memory space is abandoned, wherein can be that the session data that will store at first in the memory space abandons, can be that the session data that store back in the memory space is abandoned, the embodiment of the invention be restricted at this yet.
206, detect the session generation abnormal end of setting up with server when client, client again and set up session between the server.
Wherein, client also can be according to default sense cycle, and whether the session of setting up between detection and the server abnormal end takes place, and after detecting session generation abnormal end, initiate to connect the request of foundation to server, so that server rebulids session.
207, client sends data synchronization request based on the session of setting up with server to server.
Concrete, when client need be carried out data sync with server, client can send data synchronization request to server based on the session of setting up with server, and wherein this data synchronization request is used for the data of request and this session of server sync.
Optionally, in client based on the session of setting up with server, before server transmission data synchronization request, can judge earlier and whether store the data sync sign corresponding with this session in the client, when determining to store the data sync sign corresponding with this session, this data sync sign is carried at is sent to server in the data synchronization request; If when determining that the storage data sync corresponding with this session do not identify in the client, then only send data synchronization request to server and get final product.
208, based on the session of setting up with client, server receives the data synchronization request that client sends.
Wherein, when client based on the session of setting up with server, after server sent data synchronization request, server just received the data synchronization request that client sends.
209, carry the data sync sign in the server specified data synchronization request, according to described data sync sign, inquiry identifies in the corresponding memory space with data sync and stores session data.
Wherein, after server receives the data synchronization request of client transmission, can judge and whether carry the data sync sign in this data synchronization request, after carrying the data sync sign in the specified data synchronization request, according to this data sync sign, whether store session data in the querying server with in this data sync sign corresponding memory space, and inquire with data sync sign corresponding memory space in when storing session data, carry out following steps 210.
Optionally, if do not carry the data sync sign in the server specified data synchronization request, then adopt the synchronous mode of full dose and client to carry out data sync, perhaps, carry the data sync sign in the server specified data synchronization request, but storage of session data not in inquiry and this data sync sign corresponding memory space also adopts the synchronous mode of full dose and client to carry out data sync.
210, server is sent to client with the session data of storing in the memory space.
Wherein, in server specified data synchronization request, carry the data sync sign, and according to described data sync sign, when storing session data in inquiry and the data sync sign corresponding memory space, the session data of storing in the memory space is sent to client, synchronous with the increment of realizing session data.
Need to prove that the process of the data sync described in the embodiment of the invention can be the realization by the server active push, also can be to pull realization by client, and the embodiment of the invention is not restricted the synchronous process of data at this.
The session data method for synchronous that the embodiment of the invention provides, set up session between server and the client, based on described session, server receives the data synchronization request that client sends, and when carrying the data sync sign in determining this data synchronization request, server adopts synchronous mode and the client of increment to carry out data sync, resource consumption when having reduced client and server and carrying out data sync, improved user's experience, and, the consumption that server calculates synchrodata reduced.
Another embodiment of the present invention provides a kind of session data synchronizer, as shown in Figure 3, comprising: set up unit 31, receiving element 32, determine lock unit 33.
Set up unit 31, be used for and client between set up session.
Receiving element 32 for based on described described session of setting up unit 31 foundation, receives the data synchronization request that described client sends; Wherein, described data synchronization request is used for the data of request and the synchronous described session of described device.
Determine lock unit 33, the described data synchronization request that is used for definite described receiving element 32 receptions is carried the data sync sign, adopts synchronous mode and the described client of increment to carry out data sync.
Further, described data sync is designated the memory space sign.
As shown in Figure 4, described device can also comprise: allocation units 34, transmitting element 35, memory cell 36.
Allocation units 34, be used for described set up set up session between unit 31 and the client after, be described session memory allocated space, and be that described memory allocation data sync identifies.
Transmitting element 35 is used for the described data sync sign that described allocation units 34 obtain is sent to described client.
Memory cell 36 is used for when described session generation abnormal end the session data being stored in the described memory space.
Wherein, after described session data is described session generation abnormal end, need with the data of the synchronous described session of described client, described session data comprises: the data that are used for presenting the linkman state of described session.
When further, described data sync is designated user ID:
Described device can also comprise: distribute and set up unit 37.
Distribute and to set up unit 37, be used for described set up set up session between unit 31 and the client after, be described session memory allocated space, and set up the corresponding relation of described data sync sign and described memory space.
Described transmitting element 35 is used for that also the described data sync sign that unit 37 obtains is set up in described distribution and is sent to described client.
Described memory cell 36 also is used for when described session generation abnormal end the session data being stored in the described memory space.
Further, described device can also comprise: judge performance element 38.
Judge performance element 38, be used for after described memory cell 36 is stored in described memory space with the session data, judge whether the described session data of storing in the described memory space is overtime, if determine that the described session data of storing in the described memory space is overtime, then delete described session data, and discharge described memory space, and/or, whether the size of judging the described session data of storing in the described memory space surpasses default capacity threshold, if the size of the described session data of storing in definite described memory space surpasses described capacity threshold, then the partial data in the described session data of storing in the described memory space is abandoned.
Further, described definite lock unit 33 comprises: enquiry module 331, sending module 332.
Enquiry module 331, the described data synchronization request that is used for definite described receiving element 32 receptions is carried the data sync sign, and according to described data sync sign, inquiry identifies in the corresponding described memory space with described data sync and stores described session data;
Sending module 332, the described session data that is used for described memory space is stored is sent to described client.
Wherein, the session data synchronizer described in the embodiment of the invention can be applied to server.
A kind of session data synchronizer that the embodiment of the invention provides, and set up session between the client, based on described session, receive the data synchronization request that client sends, when in determining this data synchronization request, carrying the data sync sign, adopt synchronous mode and the client of increment to carry out data sync, resource consumption when having reduced client and server and carrying out data sync, improved user's experience, and, the consumption that server calculates synchrodata reduced.
Another embodiment of the present invention provides a kind of session data synchronizer, as shown in Figure 5, comprise: at least one processor 41, memory 42, communication interface 43 and bus 44, this at least one processor 41, memory 42 and communication interface 43 are connected by bus 44 and finish mutual communication, wherein:
Described bus 44 can be industry standard architecture (Industry Standard Architecture, ISA) bus, peripheral component interconnect (Peripheral Component Interconnect, PCI) bus or extended industry-standard architecture (Extended Industry Standard Architecture, EISA) bus etc.This bus 44 can be divided into address bus, data/address bus, control bus etc.For ease of expression, only represent with a thick line among Fig. 5, but do not represent only to have the bus of a bus or a type.
Described memory 42 is used for the stores executable programs code, and this program code comprises computer-managed instruction.Memory 42 may comprise the high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.
Described processor 41 may be a central processing unit (Central Processing Unit, CPU), or specific integrated circuit (Application Specific Integrated Circuit, or be configured to implement one or more integrated circuits of the embodiment of the invention ASIC).
Described communication interface 43 is mainly used in realizing the communication between the equipment of present embodiment.
Described processor 41 is used for carrying out the executable program code that described memory 42 is stored, and following operation is carried out in concrete being used for:
Described processor 41, be used for and client between set up session; Based on described session, receive the data synchronization request that described client sends; Wherein, described data synchronization request is used for the data of request and the synchronous described session of described device; Determine to carry in the described data synchronization request data sync sign, adopt synchronous mode and the described client of increment to carry out data sync.
Further, described processor 41 after also being used for setting up session between described and client, is described session memory allocated space, and is described memory allocation data sync sign; Described data sync sign is sent to described client.
Described memory 42 also is used for when described session generation abnormal end the session data being stored in the described memory space; Wherein, after described session data is described session generation abnormal end, need with the data of the synchronous described session of described client, described session data comprises: the data that are used for presenting the linkman state of described session.
Further, described processor 41 after also being used for setting up session between described and client, is described session memory allocated space, and sets up the corresponding relation of described data sync sign and described memory space; Described data sync sign is sent to described client.
Described memory 42 also is used for when described session generation abnormal end the session data being stored in the described memory space.
Further, described processor 41, also be used for after described memory 42 is stored in described memory space with the session data, judge whether the described session data of storing in the described memory space is overtime, if determine that the described session data of storing in the described memory space is overtime, then delete described session data, and discharge described memory space, and/or, whether the size of judging the described session data of storing in the described memory space surpasses default capacity threshold, if the size of the described session data of storing in definite described memory space surpasses described capacity threshold, then the partial data in the described session data of storing in the described memory space is abandoned.
Further, described processor 41 also is used for definite described data synchronization request and carries the data sync sign, according to described data sync sign, inquires about in the described memory space corresponding with described data sync sign and stores described session data; The described session data of storing in the described memory space is sent to described client.
Wherein, the session data synchronizer described in the embodiment of the invention can be applied to server.
A kind of session data synchronizer that the embodiment of the invention provides, and set up session between the client, based on described session, receive the data synchronization request that client sends, when in determining this data synchronization request, carrying the data sync sign, adopt synchronous mode and the client of increment to carry out data sync, resource consumption when having reduced client and server and carrying out data sync, improved user's experience, and, the consumption that server calculates synchrodata reduced.
Another embodiment of the present invention provides a kind of session data synchro system, as shown in Figure 6, comprising: session data synchronizer 51 and client 52.
Described session data synchronizer 51, be used for and client 52 between set up session; Based on described session, receive the data synchronization request that described client 52 sends; Wherein, described data synchronization request is used for the data of request and the synchronous described session of described device; Determine to carry in the described data synchronization request data sync sign, adopt synchronous mode and the described client 52 of increment to carry out data sync.
Wherein, described session data synchronizer 51 can be applied to server.
Described client 52 is used for sending data synchronization request to described session data synchronizer 51; Receive the data sync sign 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 invention provides, set up session between session data synchronizer and the client, based on described session, receive the data synchronization request that client sends, when in determining this data synchronization request, carrying the data sync sign, adopt synchronous mode and the client of increment to carry out data sync, resource consumption when having reduced client and server and carrying out data sync, improved user's experience, and, the consumption that server calculates synchrodata reduced.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential common hardware, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence 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 as computer, hard disk or CD etc., comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily 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 the protection range of described claim.

Claims (10)

1. a session data method for synchronous is characterized in that, comprising:
Set up session between server and the client;
Based on described session, described server receives the data synchronization request that described client sends; Wherein, described data synchronization request is used for the data of request and the described session of described server sync;
Described server determines to carry in the described data synchronization request data sync sign, adopts synchronous mode and the described client of increment to carry out data sync.
2. session data method for synchronous according to claim 1 is characterized in that, described data sync is designated the memory space sign;
After between described server and client, setting up session, also comprise:
Described server is described session memory allocated space, and is described memory allocation data sync sign;
Described server is sent to described client with described data sync sign;
When described session generation abnormal end, described server is stored in the session data in the described memory space;
Wherein, after described session data is described session generation abnormal end, described server need with the data of the synchronous described session of described client, described session data comprises: the data that are used for presenting the linkman state of described session.
3. session data method for synchronous according to claim 1 is characterized in that, described data sync is designated user ID;
After between described server and client, setting up session, also comprise:
Described server is described session memory allocated space, and sets up the corresponding relation of described data sync sign and described memory space;
Described server is sent to described client with described data sync sign;
When described session generation abnormal end, described server is stored in the session data in the described memory space.
4. according to claim 2 or 3 described session data method for synchronous, it is characterized in that, after described server is stored in the session data in the described memory space, also comprise:
Described server judges whether the described session data of storing in the described memory space is overtime, if determine that the described session data of storing in the described memory space is overtime, then deletes described session data, and discharges described memory space;
And/or
Described server judges whether the size of the described session data of storing in the described memory space surpasses default capacity threshold, if the size of the described session data of storing in definite described memory space surpasses described capacity threshold, then the partial data in the described session data of storing in the described memory space is abandoned.
5. session data method for synchronous according to claim 4, described server determine to carry in the described data synchronization request data sync sign, adopt synchronous mode and the described client of increment to carry out data sync, comprising:
Described server determines to carry in the described data synchronization request data sync sign, and according to described data sync sign, inquiry identifies in the corresponding described memory space with described data sync and stores described session data;
Described server is sent to described client with the described session data of storing in the described memory space.
6. a session data synchronizer is characterized in that, comprising:
Set up the unit, be used for and client between set up session;
Receiving element for based on described described session of setting up unit foundation, receives the data synchronization request that described client sends; Wherein, described data synchronization request is used for the data of request and the synchronous described session of described device;
Determine lock unit, the described data synchronization request that is used for definite described receiving element reception is carried the data sync sign, adopts synchronous mode and the described client of increment to carry out data sync.
7. session data synchronizer according to claim 6 is characterized in that, described data sync is designated the memory space sign;
Described device also comprises:
Allocation units, be used for described set up set up session between unit and the client after, be described session memory allocated space, and be that described memory allocation data sync identifies;
Transmitting element is used for the described data sync sign that described allocation units obtain is sent to described client;
Memory cell is used for when described session generation abnormal end the session data being stored in the described memory space;
Wherein, after described session data is described session generation abnormal end, need with the data of the synchronous described session of described client, described session data comprises: the data that are used for presenting the linkman state of described session.
8. session data synchronizer according to claim 6 is characterized in that, described data sync is designated user ID;
Described device also comprises:
Distribute and to set up the unit, be used for described set up set up session between unit and the client after, be described session memory allocated space, and set up the corresponding relation of described data sync sign and described memory space;
Described transmitting element is used for that also the described data sync sign that the unit obtains is set up in described distribution and is sent to described client;
Described memory cell also is used for when described session generation abnormal end the session data being stored in the described memory space.
9. according to claim 7 or 8 described session data synchronizers, it is characterized in that, also comprise:
Judge performance element, be used for after described memory cell is stored in described memory space with the session data, judge whether the described session data of storing in the described memory space is overtime, if determine that the described session data of storing in the described memory space is overtime, then delete described session data, and discharge described memory space, and/or, whether the size of judging the described session data of storing in the described memory space surpasses default capacity threshold, if the size of the described session data of storing in definite described memory space surpasses described capacity threshold, then the partial data in the described session data of storing in the described memory space is abandoned.
10. session data synchronizer according to claim 9, described definite lock unit comprises:
Enquiry module, the described data synchronization request that is used for definite described receiving element reception is carried the data sync sign, and according to described data sync sign, inquiry identifies in the corresponding described memory space with described data sync and stores described session data;
Sending module, the described session data that is used for described memory space is stored is sent 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 true CN103338144A (en) 2013-10-02
CN103338144B 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)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209948A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 A kind of data push method and device
CN107454174A (en) * 2017-08-14 2017-12-08 安徽简道科技有限公司 The method for realizing network communication list data synchronization
CN108632300A (en) * 2017-03-15 2018-10-09 阿里巴巴集团控股有限公司 Data synchronous system, method, server, client and electronic equipment
CN110493122A (en) * 2019-08-29 2019-11-22 北京拉勾网络技术有限公司 A kind of synchronous method of session information, calculates equipment and storage medium at device
CN110851526A (en) * 2018-08-02 2020-02-28 阿里巴巴集团控股有限公司 Data synchronization method, device and system
CN111831337A (en) * 2019-04-19 2020-10-27 安徽寒武纪信息科技有限公司 Data synchronization method and device and related product
WO2021027973A1 (en) * 2019-08-09 2021-02-18 中科寒武纪科技股份有限公司 Data synchronization method and device, and related products
CN112689827A (en) * 2020-10-27 2021-04-20 华为技术有限公司 Model reasoning exception handling method and device

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

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209948A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 A kind of data push method and device
CN106209948B (en) * 2015-05-07 2019-07-05 阿里巴巴集团控股有限公司 A kind of data push method and device
CN108632300A (en) * 2017-03-15 2018-10-09 阿里巴巴集团控股有限公司 Data synchronous system, method, server, client and electronic equipment
CN107454174A (en) * 2017-08-14 2017-12-08 安徽简道科技有限公司 The method for realizing network communication list data synchronization
CN110851526A (en) * 2018-08-02 2020-02-28 阿里巴巴集团控股有限公司 Data synchronization method, device and system
CN110851526B (en) * 2018-08-02 2023-04-11 阿里巴巴集团控股有限公司 Data synchronization method, device and system
CN111831337A (en) * 2019-04-19 2020-10-27 安徽寒武纪信息科技有限公司 Data synchronization method and device and related product
WO2021027973A1 (en) * 2019-08-09 2021-02-18 中科寒武纪科技股份有限公司 Data synchronization method and device, and related products
CN110493122A (en) * 2019-08-29 2019-11-22 北京拉勾网络技术有限公司 A kind of synchronous method of session information, calculates equipment and storage medium at device
CN110493122B (en) * 2019-08-29 2022-01-28 北京拉勾网络技术有限公司 Session information synchronization method and device, computing equipment and storage medium
CN112689827A (en) * 2020-10-27 2021-04-20 华为技术有限公司 Model reasoning exception handling method and device

Also Published As

Publication number Publication date
CN103338144B (en) 2016-06-22

Similar Documents

Publication Publication Date Title
CN103338144A (en) Session data synchronization method and session data synchronization device
WO2015149471A1 (en) Information pushing method, system and device and computer storage medium
CN104991850A (en) Heartbeat package control method and apparatus for application program
CN102571996B (en) IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN102638417A (en) Information communication method, device and system
CN109246815B (en) Communication method, paging method and device, storage medium, terminal, and base station
WO2021238404A1 (en) Data card switching method and apparatus, and terminal, and storage medium
CN105515937B (en) Instant messaging method, terminal, server and system
CN111065171B (en) Method for terminating call, application processor and modem
CN104936211A (en) Wireless resource distribution method
EP3588993B1 (en) Broadcast sending method and terminal
CN111541555A (en) Group chat optimization method and related product
CN111064552A (en) Intelligent device control method and device, electronic device and storage medium
EP3591528A1 (en) Broadcast queue adjustment method and apparatus, and terminal device
CN110581976B (en) Teleconferencing method, apparatus, computer system and readable storage medium
CN106060280B (en) Data service management method, device and terminal
CN205283611U (en) End and server end news information will be moved and synchronous device will be carried out
EP3373137B1 (en) Method, apparatus and terminal device for sending broadcast
CN109756464B (en) Communication method, server and client
EP3057377B1 (en) Network device, terminal device and voice service control method
CN108712494A (en) Handle the method, apparatus and equipment of asynchronous message
US10536393B2 (en) Mail obtaining method, terminal, and system
CN102088747B (en) Service processing method in multi-mode terminal and multi-mode terminal
CN105407452A (en) Method and system for controlling data flow in Bluetooth sharing network
CN106657172A (en) Method and device for realizing information push

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.