CN106357778A - Session information sharing method, device and system - Google Patents
Session information sharing method, device and system Download PDFInfo
- Publication number
- CN106357778A CN106357778A CN201610855023.XA CN201610855023A CN106357778A CN 106357778 A CN106357778 A CN 106357778A CN 201610855023 A CN201610855023 A CN 201610855023A CN 106357778 A CN106357778 A CN 106357778A
- Authority
- CN
- China
- Prior art keywords
- session information
- session
- identification
- server
- information
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a session information sharing method, a session information sharing device and a session information sharing system. The method comprises the following steps: receiving storage instructions sent by each application server in a distributed service cluster respectively, the storage instructions carrying session information and corresponding session identifiers; storing the session information and the corresponding session identifiers according to the storage instructions; when an acquisition request sent by a first application server is received, searching the stored session information for first session information corresponding to a first session identifier according to the first session identifier carried in the acquisition request; sending the first session information to the first application server. According to the scheme, the session information on each application server in the distributed service cluster can be shared.
Description
Technical field
The present invention relates to communication technical field, particularly to a kind of sharing method of session information, apparatus and system.
Background technology
Growing stronger day by day with the Internet, the number of visits of website and independent visitor be linear or the increase of index times,
Single server single database can not meet actual demand already.The server of most of large-scale websites is typically using distribution at present
The deployment way of formula service cluster, by using one group of server collaborative work, the bottleneck to solve concurrent greatly big data quantity is asked
Topic.But in Distributed Services cluster, client accessing wherein one server and when arranging session information, upper once
When accessing other servers, the session information of this setting cannot be realized sharing, thus affecting to access result.
Content of the invention
Embodiments provide a kind of sharing method of session information, apparatus and system, existed with realizing session information
Distributed Services cluster shared.
A kind of sharing method of session information, comprising:
Receive the store instruction that in Distributed Services cluster, each application server sends respectively, described store instruction carries
Session information and corresponding session identification;
Described session information and corresponding session identification are stored according to described store instruction;
When receiving the acquisition request that the first application server sends, according to described the first meeting obtaining and carrying in request
Words mark, searches first session information corresponding with described first session identification in the session information of storage;
Described first session information is sent to described first application server.
Preferably, further include: receive the more new command that the second application server sends, described more new command carries the
Two session identifications and the 3rd session information;Searched and described second in the session information of storage according to described second session identification
The second corresponding session information of session identification, described second session information is deleted, and stores described 3rd session information.
Preferably,
Described described session information and corresponding session identification are stored according to described store instruction, comprising: by described session
Information and corresponding session identification store in internal memory;
Further include: after determination itself is restarted, read each store instruction of record in log list, and press
Reload corresponding session information and corresponding session identification according to each store instruction, and by the session information reloading
And corresponding session identification stores in internal memory;
Or,
Described described session information and corresponding session identification are stored according to described store instruction, comprising: by described session
Information and corresponding session identification store in internal memory;
Further include: according to the time period of setting, snapshot is carried out to the data being stored in internal memory, and by snapshot data
And corresponding Snapshot time point stores in disk;
Further include: after determination itself is restarted, determine in disk apart from the target snapshot that current point in time is nearest
Time point, corresponding for described target snapshot time point snapshot data is returned in internal memory.
A kind of sharing method of session information, comprising:
Receive the session information that client sends, described session information is stored local;
Send store instruction to outside conversation server, described store instruction carries described session information and corresponding meeting
Words mark, so that described conversation server stores described session information and corresponding session identification;
Receive the conversation request that described client sends, described conversation request carries the first session identification;
When not locally being stored with corresponding first session information of described first session identification, obtain to described conversation server
Take first session information corresponding with described first session identification;
Using described first session information, described conversation request is processed.
Preferably, further include: receive the more new command that described client sends, described more new command carries the second meeting
Words mark and the 3rd session information;Locally stored have described second session identification when, by locally stored and described second meeting
Corresponding second session information of words mark is deleted, and described 3rd session information is stored in locally, and to described session clothes
More new command described in business device transmission;When not locally being stored with described second session identification, send institute to described conversation server
State more new command.
A kind of conversation server, comprising:
First receiving unit, for receiving the store instruction that in Distributed Services cluster, each server sends respectively, institute
State store instruction and carry session information and corresponding session identification;
Memory element, for storing described session information and corresponding session identification according to described store instruction;
First searching unit, in the acquisition request receiving first server transmission, obtaining request according to described
In the first session identification of carrying, the session information of storage is searched first session corresponding with described first session identification
Information;
Transmitting element, for being sent to described second server by described first session information.
Preferably,
Further include: the second receiving unit, the second searching unit and deletion unit;
Described second receiving unit, for receiving the more new command of second server transmission, described more new command carries the
Two session identifications and the 3rd session information;
Described second searching unit, for according to described second session identification storage session information in search with described
The second corresponding session information of second session identification;
Described deletion unit, for deleting described second session information;
Described memory element, is further used for storing described 3rd session information;
And/or,
Described memory element is internal memory;
Further include: reading unit and loading unit;
Described reading unit, after itself restarting in determination, each storage reading record in log list refers to
Order;
Described loading unit, for reloading corresponding session information and corresponding session according to each store instruction
Mark;
Described internal memory, for storing the session information reloading and corresponding session identification;
Or,
Described memory element is internal memory;
Further include: snapshot unit, disk and determining unit;
Described snapshot unit, for the time period according to setting, carries out snapshot to the data being stored in internal memory;
Described disk, for storing snapshot data and corresponding Snapshot time point;
Described determining unit, after itself restarting in determination, determines in disk apart from the mesh that current point in time is nearest
Mark Snapshot time point;
Described internal memory, for storing the corresponding snapshot data of described target snapshot time point.
A kind of application server, comprising:
First receiving unit, for receiving the session information of client transmission;
Memory element, for storing described session information;
Transmitting element, for sending store instruction to outside conversation server, described store instruction carries described session
Information and corresponding session identification, so that described conversation server stores described session information and corresponding session identification;
Second receiving unit, for receiving the conversation request that described client sends, described conversation request carries the first meeting
Words mark;
Acquiring unit, for when not locally being stored with corresponding first session information of described first session identification, to institute
State conversation server and obtain first session information corresponding with described first session identification;
Processing unit, for being processed to described conversation request using described first session information.
A kind of shared system of session information, comprising: client, Distributed Services cluster and session as described above clothes
Business device;
Described Distributed Services cluster includes at least two application servers as claimed in claim 8;
Described client, for sending session information to the arbitrary application server in described Distributed Services cluster, with
And for sending conversation request to the arbitrary application server in described Distributed Services cluster.
Preferably, described conversation server includes: redis memory database.
Embodiments provide a kind of sharing method of session information, apparatus and system, shared in session information
Increase conversation server, this conversation server is specifically used to store session information, when a certain application server receives in system
During the conversation request that client sends, if the session letter not locally being stored with corresponding with the session identification carrying in conversation request
Breath, then show that this session information is that client stores on other application server with during other application server interaction, that
The corresponding session information of this session identification can be obtained to the application server of the session information that is stored with, to realize to session
The process of request, it is achieved thereby that on each application server in Distributed Services cluster session information shared.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description are the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of method flow diagram that one embodiment of the invention provides;
Fig. 2 is another kind of method flow diagram that one embodiment of the invention provides;
Fig. 3 is a kind of conversation server structural representation that one embodiment of the invention provides;
Fig. 4 is another kind of conversation server structural representation that one embodiment of the invention provides;
Fig. 5 is another conversation server structural representation that one embodiment of the invention provides;
Fig. 6 is another conversation server structural representation that one embodiment of the invention provides;
Fig. 7 is a kind of application server structural representation that one embodiment of the invention provides;
Fig. 8 is a kind of system structure diagram that one embodiment of the invention provides;
Fig. 9 is another method flow diagram that one embodiment of the invention provides.
Specific embodiment
Purpose, technical scheme and advantage for making the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described it is clear that described embodiment is
The a part of embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment being obtained on the premise of not making creative work, broadly falls into the scope of protection of the invention.
As shown in figure 1, embodiments providing a kind of sharing method of session information, the method can include following
Step:
Step 101: receive the store instruction that in Distributed Services cluster, each application server sends respectively, described storage
Instruction carries session information and corresponding session identification;
Step 102: described session information and corresponding session identification are stored according to described store instruction;
Step 103: when receiving the acquisition request that the first application server sends, carried according to described acquisition in request
The first session identification, the session information of storage is searched first session information corresponding with described first session identification;
Step 104: described first session information is sent to described first application server.
According to above-described embodiment, it is specifically used to store session information using this conversation server, when a certain application server
When receiving the conversation request that client sends, if it is corresponding with the session identification carrying in conversation request not locally to be stored with
Session information, then show that this session information is that client stores on other application server with during other application server interaction
, then the corresponding session information of this session identification can be obtained to the application server of the session information that is stored with, to realize
Process to conversation request, it is achieved thereby that on each application server in Distributed Services cluster session information shared.
In an embodiment of the invention, this session information may include that the information such as account number cipher, mark, authority.Session
Information is created by client, and therefore, client can be modified to session information, when changing session information, due to
Client, in accessing Distributed Services cluster, is to be accessed according to load balancing, therefore, will more new command send out every time
When giving the application server being assigned to, this more new command can be transmitted to conversation server by this application server, and session takes
Business device can operate as follows according to this more new command:
Receive the more new command that the second application server sends, described more new command carries the second session identification and the 3rd meeting
Words information;Search corresponding with described second session identification the according to described second session identification in the session information of storage
Two session informations, described second session information are deleted, and store described 3rd session information.
According to above-described embodiment, after the application server in Distributed Services cluster receives more new command, in time
More new command is sent to conversation server so that conversation server is updated to the session information of storage, to ensure to be distributed
Between each application server in formula service cluster, shared session information, is all up-to-date, thereby may be ensured that distributed
Service cluster, in the process of the request that conversates, can be processed using correct session information.
In an embodiment of the invention, in order to realize session information shared when efficiency, conversation server can be by
Session information stores in internal memory, because the access rate of internal memory is fast with respect to the access rate of disk, therefore, in application service
When device is to session server requests session information, conversation server can feed back to phase by this session information of rapid extraction from internal memory
The application server answered.
In an embodiment of the invention, because the characteristic of internal memory is to restart rear data to disappear, therefore, in order to ensure to be distributed
In formula service cluster, session information is shared, can be obtained using log list and be stored in internal memory in conversation server
Session information, further includes: after determination itself is restarted, read each store instruction of record in log list, and
Reload corresponding session information and corresponding session identification according to each store instruction, and the session reloaded is believed
Breath and corresponding session identification store in internal memory.Using which, thereby may be ensured that session letter in Distributed Services cluster
Cease normally shares.
In an embodiment of the invention, due to the substantial amounts of instruction that is stored with log list, by log list
All instructions deposited are reloaded one time, need to take a substantial amount of time and can complete, therefore, in order to improve conversation server
After restarting, obtain session information and the efficiency of respective session mark, can be with using a kind of mode as follows: according to the time of setting
Section, carries out snapshot to the data being stored in internal memory, and snapshot data and corresponding Snapshot time point is stored in disk;
Further include: after determination itself is restarted, determine in disk apart from the target snapshot that current point in time is nearest
Time point, corresponding for described target snapshot time point snapshot data is returned in internal memory.
Wherein, can be arranged according to the time period of the cycle power of conversation server when arranging the time period, if this is fast
According to time period setting too short, it is understood that there may be adjacent several snapshot datas are identical, then can process to conversation server increase
Operation;If the time period setting of this snapshot is long, may lead to when conversation server is restarted to last snapshot operation
Between substantial amounts of loss of data.For example, the time period of this setting is 1h.
By snapshot data and corresponding Snapshot time point are stored in disk, due to the characteristic of disk be restart after
Data will not be lost, and therefore, after restarting, can be recovered the snapshot data in disk, thus realizing distributed clothes
In business cluster, session information is shared.
Refer to Fig. 2, one embodiment of the invention additionally provides a kind of sharing method of session information, the method can be wrapped
Include:
Step 201: receive the session information that client sends, described session information is stored local;
Step 202: send store instruction to outside conversation server, described store instruction carry described session information and
Corresponding session identification, so that described conversation server stores described session information and corresponding session identification;
Step 203: receive the conversation request that described client sends, described conversation request carries the first session identification;
Step 204: when not locally being stored with corresponding first session information of described first session identification, to described session
Server obtains first session information corresponding with described first session identification;
Step 205: described conversation request is processed using described first session information.
According to above-described embodiment, when current application server receives the session information of client transmission, in order to realize
This session information can be sent to the conversation server of outside, with using this conversational services by sharing of Distributed Services cluster
Device stores session information, when current application server receives the conversation request of client transmission, if be not locally stored with
The corresponding session information of the session identification that carries in conversation request, then show that this session information is that client is taken with other application
Store on other application server during business device interaction, then can obtain to the application server of the session information that is stored with
The corresponding session information of this session identification, to realize the process to conversation request, it is achieved thereby that each in Distributed Services cluster
On individual application server, session information is shared.
In an embodiment of the invention, this session information may include that the information such as account number cipher, mark, authority.Session
Information is created by client, and therefore, client can be modified to session information, when changing session information, due to
Client, in accessing Distributed Services cluster, is to be accessed according to load balancing, therefore, it can wrap further every time
Include:
Receive the more new command that described client sends, described more new command carries the second session identification and the 3rd session letter
Breath;Locally stored have described second session identification when, by corresponding for locally stored and described second session identification the second meeting
Words information deletion, and described 3rd session information is stored in locally, and refer to the described renewal of transmission of described conversation server
Order;When not locally being stored with described second session identification, to more new command described in the transmission of described conversation server.
According to above-described embodiment, after the application server in Distributed Services cluster receives more new command, if this
Second session identification that is stored with, then show that client is the second session arranging when interacting and present application server between
Information, then the second locally stored session information is deleted, stores the 3rd session information, and will more new command be sent in time
Conversation server is so that conversation server is updated to the session information of storage, each in Distributed Services cluster to ensure
Between individual application server, shared session information, is all up-to-date, thereby may be ensured that Distributed Services cluster is entering guild
During the process of words request, can be processed using correct session information.
Refer to Fig. 3, embodiments provide a kind of conversation server, may include that
First receiving unit 301, for receiving the store instruction that in Distributed Services cluster, each server sends respectively,
Described store instruction carries session information and corresponding session identification;
Memory element 302, for storing described session information and corresponding session identification according to described store instruction;
First searching unit 303, in the acquisition request receiving first server transmission, asking according to described acquisition
The first session identification carrying in asking, searches first meeting corresponding with described first session identification in the session information of storage
Words information;
Transmitting element 304, for being sent to described second server by described first session information.
In an embodiment of the invention, refer to Fig. 4, this conversation server may further include: second receives list
First 401, second searching unit 402 and deletion unit 403;
Described second receiving unit 401, for receiving the more new command of second server transmission, described more new command carries
Second session identification and the 3rd session information;
Described second searching unit 402, for according to described second session identification storage session information in search with
The second corresponding session information of described second session identification;
Described deletion unit 403, for deleting described second session information;
Described memory element 302, is further used for storing described 3rd session information;
In an embodiment of the invention, quickly provide session information to improve conversation server for application server,
This memory element can be internal memory;
Refer to Fig. 5, in an embodiment of the invention, this conversation server may further include: reading unit 501
With loading unit 502;
Described reading unit 501, after itself restarting, reads each storage of record in log list in determination
Instruction;
Described loading unit 502, for reloading corresponding session information and corresponding according to each store instruction
Session identification;
Described internal memory, for storing the session information reloading and corresponding session identification;
In an embodiment of the invention, because the characteristic of internal memory is to restart rear data to disappear, therefore, in order to ensure to be distributed
In formula service cluster, session information is shared, can be obtained using log list and be stored in internal memory in conversation server
Session information, refer to Fig. 6, and this conversation server may further include: snapshot unit 601, disk 602 and determining unit
603;
Described snapshot unit 601, for the time period according to setting, carries out snapshot to the data being stored in internal memory;
Described disk 602, for storing snapshot data and corresponding Snapshot time point;
Described determining unit 603, after itself restarting in determination, determines nearest apart from current point in time in disk
Target snapshot time point;
Described internal memory, for storing the corresponding snapshot data of described target snapshot time point.
Refer to Fig. 7, one embodiment of the invention additionally provides a kind of application server, comprising:
First receiving unit 701, for receiving the session information of client transmission;
Memory element 702, for storing described session information;
Transmitting element 703, for sending store instruction to outside conversation server, described store instruction carries described meeting
Words information and corresponding session identification, so that described conversation server stores described session information and corresponding session identification;
Second receiving unit 704, for receiving the conversation request that described client sends, described conversation request carries first
Session identification;
Acquiring unit 705, for when not locally being stored with corresponding first session information of described first session identification, to
Described conversation server obtains first session information corresponding with described first session identification;
Processing unit 706, for being processed to described conversation request using described first session information.
Refer to Fig. 8, additionally provide a kind of shared system of session information in one embodiment of the invention, comprising: client
End 1, Distributed Services cluster 2 and described conversation server 3 as arbitrary in above-described embodiment;
Described Distributed Services cluster 2 includes at least two such as any of the above-described described application server 20;
Described client 1, for sending session letter to the arbitrary application server 20 in described Distributed Services cluster 2
Breath, and for sending conversation request to the arbitrary application server 20 in described Distributed Services cluster 2.
In an embodiment of the invention, because the access rate of internal memory is very fast, therefore, carry to improve conversation server
For the speed of session information, this conversation server may include that redis memory database.
Include 3 application servers with distributed type assemblies below, conversation server with redis memory database is
Example, is further described to the sharing method of session information provided in an embodiment of the present invention.
Refer to Fig. 9, one embodiment of the invention provides a kind of sharing method of session information, the method can include
Following steps:
Step 901: each application server in Distributed Services cluster is carried out filter configuration.
This filtration configuration is mainly the process operation configuring application server after receiving session information.
In the present embodiment, this filtration configuration at least can be realized by a kind of code as follows:
Step 902: redis memory database is managed configure.
In order to realize the shared of session information in Distributed Services cluster using redis memory database, need to redis
The management of memory database is configured, and this configuration mode at least can be realized by a kind of mode as follows:
Step 903: the session information setting request that client is initiated to Distributed Services cluster, Distributed Services cluster root
According to load balancing, the setting of this session information is requested assignment to application server 1.
Step 904: session identification and session information that application server 1 carries in being asked according to the setting of this session information,
This session identification and session information are stored in locally, and send store instruction to redis memory database, in this store instruction
Carry this session information and corresponding session identification.
Step 905:redis memory database, according to this store instruction, this session information and corresponding session identification is deposited
Storage is in local memory database.
In the present embodiment, redis memory database realize session information share when, can be directly to store this session
Information and session identification, when the application server in Distributed Services cluster needs queued session information, by corresponding session
Information provides other side.Can also be often to receive new session information and session identification, can this new session information and session
Mark sends each of Distributed Services cluster application server, so that each application service in Distributed Services cluster
In device, the session information of storage is synchronous.
Because latter approach needs to take substantial amounts of memory space, therefore the present embodiment is said taking former as a example
Bright.
Step 906: client initiates a session request to Distributed Services cluster, Distributed Services cluster is according to load balancing
This conversation request is distributed to application server 2 by strategy.
Step 907: application server 2, according to the session identification a carrying in this conversation request, is locally searching whether to store
There is the corresponding session information a of this session identification a, if existing, execution step 908;Otherwise, execution step 909.
Step 908: using the corresponding session information a of this session identification a, this conversation request is processed, execution step
910.
Step 909: send to redis memory database and obtain request, carry this session identification a in this acquisition request;
Session information a corresponding with session identification a is searched in the session information of storage in redis memory database, and by session information a
It is sent to application server 2, and execution step 908.
Step 910: when client initiates to update request to Distributed Services cluster, Distributed Services cluster is according to load
Renewal is requested assignment to application server 3 by balance policy.
Step 911: application server 3 determines locally whether be stored with according to the session identification b carrying in this renewal request
Session identification b corresponding session information b, if exist, execution step 912;Otherwise, execution step 913.
Step 912: according to updating the session information b1 carrying in request, locally stored session information b is deleted, and deposits
Storage session information b1, execution step 913.
Step 913: application server 3 is transmitted to redis memory database, redis memory database root by updating request
According to the session identification b carrying in this renewal request, the session information of storage is searched session information corresponding with session identification b
B, and session information b is deleted, storage updates the session information b1 that request carries.
To sum up, each embodiment of present invention beneficial effect at least specific as follows:
1st, in embodiments of the present invention, it is specifically used to store session information using this conversation server, when a certain application clothes
When business device receives the conversation request of client transmission, if it is relative with the session identification carrying in conversation request not locally to be stored with
The session information answered, then show that this session information is that client stores other application service with during other application server interaction
On device, then the corresponding session information of this session identification can be obtained to the application server of the session information that is stored with, with
Realize process to conversation request, it is achieved thereby that being total to of session information on each application server in Distributed Services cluster
Enjoy.
2nd, in embodiments of the present invention, after the application server in Distributed Services cluster receives more new command,
In time more new command is sent to conversation server so that conversation server is updated to the session information of storage, to ensure
Between each application server in Distributed Services cluster, shared session information, is all up-to-date, thereby may be ensured that point
Cloth service cluster, in the process of the request that conversates, can be processed using correct session information.
3rd, in embodiments of the present invention, conversation server passes through by session information Store in internal memory, due to depositing of internal memory
Take speed fast with respect to the access rate of disk, therefore, when application server is to session server requests session information, session
Server can feed back to corresponding application server by this session information of rapid extraction from internal memory, improves being total to of session information
Efficiency when enjoying.
4th, in embodiments of the present invention, by storing snapshot data and corresponding Snapshot time point in disk, due to
The characteristic of disk be restart after data will not lose, therefore, after restarting, the snapshot data in disk can be carried out extensive
Multiple, thus realizing the shared of session information in Distributed Services cluster.
The contents such as the information exchange between each unit in said apparatus, implementation procedure, due to implementing with the inventive method
Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity
Or operation is made a distinction with another entity or operation, and not necessarily requires or imply exist between these entities or operation
Any this actual relation or order.And, term " inclusion ", "comprising" or its any other variant are intended to non-
The comprising of exclusiveness, so that including a series of process of key elements, method, article or equipment not only include those key elements,
But also include other key elements being not expressly set out, or also include being consolidated by this process, method, article or equipment
Some key elements.In the absence of more restrictions, the key element being limited by sentence " including ", does not arrange
Remove and also there is other same factor in the process including described key element, method, article or equipment.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can be passed through
Completing, aforesaid program can be stored in the storage medium of embodied on computer readable the related hardware of programmed instruction, this program
Upon execution, execute the step including said method embodiment;And aforesaid storage medium includes: rom, ram, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
Finally it should be understood that the foregoing is only presently preferred embodiments of the present invention, it is merely to illustrate the skill of the present invention
Art scheme, is not intended to limit protection scope of the present invention.All any modifications made within the spirit and principles in the present invention,
Equivalent, improvement etc., are all contained in protection scope of the present invention.
Claims (10)
1. a kind of sharing method of session information is it is characterised in that include:
Receive the store instruction that in Distributed Services cluster, each application server sends respectively, described store instruction carries session
Information and corresponding session identification;
Described session information and corresponding session identification are stored according to described store instruction;
When receiving the acquisition request that the first application server sends, according to described the first session mark obtaining and carrying in request
Know, the session information of storage is searched first session information corresponding with described first session identification;
Described first session information is sent to described first application server.
2. method according to claim 1 is it is characterised in that further include: receives what the second application server sent
More new command, described more new command carries the second session identification and the 3rd session information;Deposited according to described second session identification
Search second session information corresponding with described second session identification in the session information of storage, described second session information is deleted
Remove, and store described 3rd session information.
3. method according to claim 1 it is characterised in that
Described described session information and corresponding session identification are stored according to described store instruction, comprising: by described session information
And corresponding session identification stores in internal memory;
Further include: after determination itself is restarted, read each store instruction of record in log list, and according to every
Article one, store instruction reloads corresponding session information and corresponding session identification, and by the session information reloading and right
The session identification answered stores in internal memory;
Or,
Described described session information and corresponding session identification are stored according to described store instruction, comprising: by described session information
And corresponding session identification stores in internal memory;
Further include: according to the time period of setting, snapshot is carried out to the data being stored in internal memory, and by snapshot data and
Corresponding Snapshot time point stores in disk;
Further include: after determination itself is restarted, determine in disk apart from the target snapshot time that current point in time is nearest
Point, corresponding for described target snapshot time point snapshot data is returned in internal memory.
4. a kind of sharing method of session information is it is characterised in that include:
Receive the session information that client sends, described session information is stored local;
Send store instruction to outside conversation server, described store instruction carries described session information and corresponding session mark
Know, so that described conversation server stores described session information and corresponding session identification;
Receive the conversation request that described client sends, described conversation request carries the first session identification;
When not locally being stored with corresponding first session information of described first session identification, to described conversation server obtain with
Corresponding first session information of described first session identification;
Using described first session information, described conversation request is processed.
5. method according to claim 4 is it is characterised in that further include: receives the renewal that described client sends
Instruction, described more new command carries the second session identification and the 3rd session information;There is described second session identification locally stored
When, corresponding for locally stored and described second session identification the second session information is deleted, and by described 3rd session information
It is stored in local, and to more new command described in the transmission of described conversation server;In the described second session mark that is not locally stored with
During knowledge, to more new command described in the transmission of described conversation server.
6. a kind of conversation server is it is characterised in that include:
First receiving unit, for receiving the store instruction that in Distributed Services cluster, each server sends respectively, described deposits
Storage instruction carries session information and corresponding session identification;
Memory element, for storing described session information and corresponding session identification according to described store instruction;
First searching unit, in the acquisition request receiving first server transmission, taking according to described acquisition in request
First session identification of band, searches the first session letter corresponding with described first session identification in the session information of storage
Breath;
Transmitting element, for being sent to described second server by described first session information.
7. conversation server according to claim 6 it is characterised in that
Further include: the second receiving unit, the second searching unit and deletion unit;
Described second receiving unit, for receiving the more new command of second server transmission, described more new command carries the second meeting
Words mark and the 3rd session information;
Described second searching unit, for searching and described second in the session information of storage according to described second session identification
The second corresponding session information of session identification;
Described deletion unit, for deleting described second session information;
Described memory element, is further used for storing described 3rd session information;
And/or,
Described memory element is internal memory;
Further include: reading unit and loading unit;
Described reading unit, after itself restarting, reads each store instruction of record in log list in determination;
Described loading unit, for reloading corresponding session information and corresponding session mark according to each store instruction
Know;
Described internal memory, for storing the session information reloading and corresponding session identification;
Or,
Described memory element is internal memory;
Further include: snapshot unit, disk and determining unit;
Described snapshot unit, for the time period according to setting, carries out snapshot to the data being stored in internal memory;
Described disk, for storing snapshot data and corresponding Snapshot time point;
Described determining unit, after itself restarting in determination, determines fast apart from the nearest target of current point in time in disk
According to time point;
Described internal memory, for storing the corresponding snapshot data of described target snapshot time point.
8. a kind of application server is it is characterised in that include:
First receiving unit, for receiving the session information of client transmission;
Memory element, for storing described session information;
Transmitting element, for sending store instruction to outside conversation server, described store instruction carries described session information
And corresponding session identification, so that described conversation server stores described session information and corresponding session identification;
Second receiving unit, for receiving the conversation request that described client sends, described conversation request carries the first session mark
Know;
Acquiring unit, for when not locally being stored with corresponding first session information of described first session identification, to described meeting
Words server obtains first session information corresponding with described first session identification;
Processing unit, for being processed to described conversation request using described first session information.
9. a kind of shared system of session information is it is characterised in that include: client, Distributed Services cluster and such as right will
Seek the conversation server described in 6 or 7;
Described Distributed Services cluster includes at least two application servers as claimed in claim 8;
Described client, for sending session information, Yi Jiyong to the arbitrary application server in described Distributed Services cluster
In to the arbitrary application server transmission conversation request in described Distributed Services cluster.
10. the shared system of session information according to claim 9 is it is characterised in that described conversation server includes:
Redis memory database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610855023.XA CN106357778A (en) | 2016-09-27 | 2016-09-27 | Session information sharing method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610855023.XA CN106357778A (en) | 2016-09-27 | 2016-09-27 | Session information sharing method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106357778A true CN106357778A (en) | 2017-01-25 |
Family
ID=57865328
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610855023.XA Pending CN106357778A (en) | 2016-09-27 | 2016-09-27 | Session information sharing method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106357778A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107370818A (en) * | 2017-07-31 | 2017-11-21 | 郑州云海信息技术有限公司 | A kind of distributed conversation method for managing object and system |
CN107423131A (en) * | 2017-03-29 | 2017-12-01 | 努比亚技术有限公司 | A kind of sharing method and server |
CN108259616A (en) * | 2018-01-26 | 2018-07-06 | 中企动力科技股份有限公司 | Session sharing method, device, electronic equipment and readable storage medium storing program for executing |
CN108632307A (en) * | 2017-03-17 | 2018-10-09 | 电信科学技术研究院 | A kind of session connection method for building up and SMF |
CN108989359A (en) * | 2018-10-12 | 2018-12-11 | 苏州创旅天下信息技术有限公司 | Method for verifying login and system, the readable storage medium storing program for executing and terminal of server cluster |
CN109039992A (en) * | 2017-06-08 | 2018-12-18 | 普天信息技术有限公司 | A kind of broadband cluster system session identification distribution method and device |
CN109150936A (en) * | 2017-06-19 | 2019-01-04 | 北京宝兰德软件股份有限公司 | The sharing method and device of session object Session in a kind of distributed type assemblies |
CN109257448A (en) * | 2018-11-21 | 2019-01-22 | 网易(杭州)网络有限公司 | A kind of synchronous method and device of session information, electronic equipment, storage medium |
CN109617953A (en) * | 2018-11-28 | 2019-04-12 | 亚信科技(南京)有限公司 | A kind of conversation processing method and system |
CN109981739A (en) * | 2019-02-25 | 2019-07-05 | 平安科技(深圳)有限公司 | Session data processing method, device, equipment and medium based on block chain |
CN110427423A (en) * | 2019-06-28 | 2019-11-08 | 苏州浪潮智能科技有限公司 | A kind of method, equipment and readable medium for avoiding database session from interrupting |
CN111385358A (en) * | 2020-03-04 | 2020-07-07 | 海南金盘智能科技股份有限公司 | Synchronization method and device of session control object and server |
CN111586177A (en) * | 2017-06-28 | 2020-08-25 | 杭州云英网络科技有限公司 | Cluster session loss prevention method and system |
CN112929453A (en) * | 2021-03-26 | 2021-06-08 | 建信金融科技有限责任公司 | Method and device for sharing session data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101243413A (en) * | 2005-06-24 | 2008-08-13 | 信科索尔特公司 | System and method for virtualizing backup images |
CN201682522U (en) * | 2010-02-08 | 2010-12-22 | 阿里巴巴集团控股有限公司 | Conversation information storage system and application server |
CN103198122A (en) * | 2013-04-02 | 2013-07-10 | 华为技术有限公司 | Method and device for restarting in-memory database |
CN103209223A (en) * | 2013-04-27 | 2013-07-17 | 中国农业银行股份有限公司 | Distributed application conversation information sharing method and system and application server |
CN104735098A (en) * | 2013-12-18 | 2015-06-24 | 青岛海尔空调器有限总公司 | Session information control method and system |
-
2016
- 2016-09-27 CN CN201610855023.XA patent/CN106357778A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101243413A (en) * | 2005-06-24 | 2008-08-13 | 信科索尔特公司 | System and method for virtualizing backup images |
CN201682522U (en) * | 2010-02-08 | 2010-12-22 | 阿里巴巴集团控股有限公司 | Conversation information storage system and application server |
CN103198122A (en) * | 2013-04-02 | 2013-07-10 | 华为技术有限公司 | Method and device for restarting in-memory database |
CN103209223A (en) * | 2013-04-27 | 2013-07-17 | 中国农业银行股份有限公司 | Distributed application conversation information sharing method and system and application server |
CN104735098A (en) * | 2013-12-18 | 2015-06-24 | 青岛海尔空调器有限总公司 | Session information control method and system |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108632307B (en) * | 2017-03-17 | 2020-06-26 | 电信科学技术研究院 | Session connection establishing method and SMF entity |
CN108632307A (en) * | 2017-03-17 | 2018-10-09 | 电信科学技术研究院 | A kind of session connection method for building up and SMF |
CN107423131A (en) * | 2017-03-29 | 2017-12-01 | 努比亚技术有限公司 | A kind of sharing method and server |
CN109039992A (en) * | 2017-06-08 | 2018-12-18 | 普天信息技术有限公司 | A kind of broadband cluster system session identification distribution method and device |
CN109039992B (en) * | 2017-06-08 | 2021-05-25 | 普天信息技术有限公司 | Method and device for allocating session identifier of broadband cluster system |
CN109150936A (en) * | 2017-06-19 | 2019-01-04 | 北京宝兰德软件股份有限公司 | The sharing method and device of session object Session in a kind of distributed type assemblies |
CN111586177A (en) * | 2017-06-28 | 2020-08-25 | 杭州云英网络科技有限公司 | Cluster session loss prevention method and system |
CN111586177B (en) * | 2017-06-28 | 2022-11-08 | 杭州云毅网络科技有限公司 | Cluster session loss prevention method and system |
CN107370818A (en) * | 2017-07-31 | 2017-11-21 | 郑州云海信息技术有限公司 | A kind of distributed conversation method for managing object and system |
CN108259616A (en) * | 2018-01-26 | 2018-07-06 | 中企动力科技股份有限公司 | Session sharing method, device, electronic equipment and readable storage medium storing program for executing |
CN108259616B (en) * | 2018-01-26 | 2021-06-15 | 中企动力科技股份有限公司 | Session sharing method and device, electronic equipment and readable storage medium |
CN108989359A (en) * | 2018-10-12 | 2018-12-11 | 苏州创旅天下信息技术有限公司 | Method for verifying login and system, the readable storage medium storing program for executing and terminal of server cluster |
CN109257448A (en) * | 2018-11-21 | 2019-01-22 | 网易(杭州)网络有限公司 | A kind of synchronous method and device of session information, electronic equipment, storage medium |
CN109257448B (en) * | 2018-11-21 | 2021-07-09 | 网易(杭州)网络有限公司 | Session information synchronization method and device, electronic equipment and storage medium |
CN109617953A (en) * | 2018-11-28 | 2019-04-12 | 亚信科技(南京)有限公司 | A kind of conversation processing method and system |
CN109617953B (en) * | 2018-11-28 | 2021-08-31 | 亚信科技(南京)有限公司 | Session processing method and system |
CN109981739A (en) * | 2019-02-25 | 2019-07-05 | 平安科技(深圳)有限公司 | Session data processing method, device, equipment and medium based on block chain |
CN110427423A (en) * | 2019-06-28 | 2019-11-08 | 苏州浪潮智能科技有限公司 | A kind of method, equipment and readable medium for avoiding database session from interrupting |
CN111385358A (en) * | 2020-03-04 | 2020-07-07 | 海南金盘智能科技股份有限公司 | Synchronization method and device of session control object and server |
CN112929453A (en) * | 2021-03-26 | 2021-06-08 | 建信金融科技有限责任公司 | Method and device for sharing session data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106357778A (en) | Session information sharing method, device and system | |
US10785322B2 (en) | Server side data cache system | |
US10776212B2 (en) | Backup of partitioned database tables | |
CN104731516B (en) | A kind of method, apparatus and distributed memory system of accessing file | |
US9632878B1 (en) | Verification of database table partitions during backup | |
US8190561B1 (en) | LDAP replication priority queuing mechanism | |
DE69938077T2 (en) | A client method and apparatus and program storage device and an adaptive synchronization and transformation server | |
CN106776783B (en) | Unstructured data memory management method and system | |
CN101442558B (en) | Method and system for providing index service for P2SP network | |
CN101771723A (en) | Data synchronization method | |
CN114756519A (en) | Managed file synchronization with stateless synchronization nodes | |
CN110245145A (en) | Structure synchronization method and apparatus of the relevant database to Hadoop database | |
CN104035925B (en) | Date storage method, device and storage system | |
WO2016169237A1 (en) | Data processing method and device | |
CN106372266A (en) | Cache and accessing method of cloud operation system based on aspects and configuration documents | |
CN103607424A (en) | Server connection method and server system | |
CN111258978A (en) | Data storage method | |
CN105956491B (en) | The data of publicly-owned cloud storage system are carried out with the method and system of more account backups | |
CN110019200A (en) | A kind of foundation of index, application method and device | |
CN108228322A (en) | A kind of distributed link tracking, analysis method and server, global scheduler | |
CN103701653B (en) | The processing method of a kind of interface hot plug configuration data and network configuration server | |
CN105320676A (en) | Customer data query service method and device | |
CN101778131A (en) | Data synchronization system | |
CN110602232A (en) | Terminal system version downloading method, device and system based on peer-to-peer network idea | |
CN101789963A (en) | Data synchronization system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170125 |