[go: up one dir, main page]

CN107911443A - A kind of session information processing method, device, server and readable storage medium storing program for executing - Google Patents

A kind of session information processing method, device, server and readable storage medium storing program for executing Download PDF

Info

Publication number
CN107911443A
CN107911443A CN201711122192.3A CN201711122192A CN107911443A CN 107911443 A CN107911443 A CN 107911443A CN 201711122192 A CN201711122192 A CN 201711122192A CN 107911443 A CN107911443 A CN 107911443A
Authority
CN
China
Prior art keywords
session
information
user
tree
information processing
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
CN201711122192.3A
Other languages
Chinese (zh)
Other versions
CN107911443B (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.)
Beijing Xiaodu Information Technology Co Ltd
Original Assignee
Beijing Xiaodu Information Technology 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 Beijing Xiaodu Information Technology Co Ltd filed Critical Beijing Xiaodu Information Technology Co Ltd
Priority to CN201711122192.3A priority Critical patent/CN107911443B/en
Publication of CN107911443A publication Critical patent/CN107911443A/en
Application granted granted Critical
Publication of CN107911443B publication Critical patent/CN107911443B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of session information processing method, device, server and computer-readable recording medium.Session information is stored by using tree structure, the relevant information of user is preserved in the root node of session tree, the information of each session is preserved respectively in child node.Thus, it is possible to ensure that user logs in the independence between the controllability of behavior and the more sessions of user, the inquiry velocity and the efficiency of management of session information are improved.

Description

A kind of session information processing method, device, server and readable storage medium storing program for executing
Technical field
This application involves internet arena, more particularly, to a kind of session information processing method, device, server and Computer-readable recording medium.
Background technology
Session (Session) in internet specifically refers to, and user browses the time of some websites by browser, and During this period of time, user can write and read information into server buffer, and these information are only default effective Time memory exists, and failure will delete.That is a session is needed to include specific client, specific server and not interrupted Operating time.Such as user A and server W establishes session residing during connection and establishes connection when institute with user B and server W The session at place is two different sessions.
With the development of the communication technology, more scene multiple terminals, which log in same user account number, increasingly has generality and reality The property used.In order to avoid not interfere with each other mutually between each session of same user account number, each session information management is most important.Mesh Before, using the storage organization of flattening, it cannot preferably adapt to the multi-platform demand efficiently managed for session information storage.
The content of the invention
In view of this, the application provides a kind of session information processing method, device, server and computer-readable storage medium Matter, to ensure the independence logged between behavior controllability and the more sessions of user of user.
According to the application first aspect, there is provided a kind of session information processing method, including:
Session establishment request is received, detects whether to exist session tree corresponding with initiating the user of session establishment request;
There is no during session tree corresponding with the user, session tree corresponding with the user is established, in the meeting The root node storage user information of words tree, and child node is established to store the first information of the session under the root node;
When there is session tree corresponding with the user, son is established under the root node of the corresponding session tree of the user Node is to store the first information of the session;
Wherein, the user information includes at least user identifier;The first information of the session includes at least session identification With the expired time of the session.
According to the application second aspect, there is provided a kind of session information processing unit, including:
Session creates unit, is configured as receiving session establishment request, detects whether exist with initiating session establishment request The corresponding session tree of user;
Session tree creates unit, is configured as establishing session tree corresponding with the user, in the root section of the session tree Point storage user information, and child node is established to store the first information of the session under the root node;
Child node creates unit, is configured as establishing child node under the root node of the corresponding session tree of the user to deposit Store up the first information of the session;
Wherein, the user information includes at least user identifier;The first information of the session includes at least session identification With the expired time of the session.
According to the application third aspect, there is provided a kind of electronic equipment, including memory and processor, wherein, the storage Device is used to store one or more computer instruction, wherein, one or more computer instruction is performed by the processor To realize above-mentioned method.
According to the application fourth aspect, there is provided a kind of computer-readable recording medium, is stored thereon with computer program, should Program is executed by processor to realize above-mentioned method.
In this application, the method stores session information by using tree structure, is preserved in the root node of session tree The relevant information of user, the information of each session is preserved in child node respectively.Thus, it is possible to ensure that user log in behavior can Independence between control property and the more sessions of user, improves the inquiry velocity and the efficiency of management of session information.
Brief description of the drawings
By the description to the embodiment of the present application referring to the drawings, the above-mentioned and other purpose of the application, feature and Advantage will be apparent from, in the accompanying drawings:
Fig. 1 is the exemplary system architecture figure of the embodiment of the present application;
Fig. 2 is the flow chart of the session information processing method of the embodiment of the present application;
Fig. 3 is the structure diagram of the session information storage of the embodiment of the present application;
Fig. 4 is the flow chart of the session querying method of the embodiment of the present application;
Fig. 5 is the structure diagram of the session information processing unit of the embodiment of the present application;
Fig. 6 is the structure diagram of the electronic equipment of the embodiment of the present application.
Embodiment
The application is described below based on embodiment, but the application is not restricted to these embodiments.Under Text is detailed to describe some specific detail sections in the detailed description of the application.Do not have for a person skilled in the art The description of these detail sections can also understand the application completely.In order to avoid obscuring the essence of the application, known method, mistake The not narration in detail of journey, flow, element and circuit.
In addition, it should be understood by one skilled in the art that provided herein attached drawing be provided to explanation purpose, and What attached drawing was not necessarily drawn to scale.
Unless the context clearly requires otherwise, otherwise entire disclosure is similar with the " comprising " in claims, "comprising" etc. Word should be construed to the implication included rather than exclusive or exhaustive implication;That is, it is containing for " including but not limited to " Justice.
In the description of the present application, it is to be understood that term " first ", " second " etc. are only used for description purpose, without It is understood that to indicate or implying relative importance.In addition, in the description of the present application, unless otherwise indicated, the implication of " multiple " It is two or more.
Fig. 1 is the exemplary system architecture figure of the embodiment of the present application.As shown in Figure 1, system architecture includes user 11, client End 12 and server 13.
User 11 has the user account for login service device 13.The user account can use user identifier conduct Its unique mark.In some cases, the user account can also have the user name easy to user's memory.User 11 can be with By the user account in multiple client 12 while login service device 13.
Client 12 is used for according to user information login service device 13, and creates new session.Client 12 can be each Kind is suitable for the electronic equipment for accessing internet, for example, smart mobile phone, tablet computer, laptop and desktop computer etc..
Server 13 is used to establish session with client 12 and stores the information produced in session, by logical with client 12 Letter realizes the interaction of information, carries out every business (for example, takeout service) based on internet.Server 13 is put down including business Platform 131, account system SDK (Software Development Kit, Software Development Kit) 132,133 sum number of account number system According to storehouse 134 (such as Redis clusters).Account system SDK132 is the lower layer interface of account number system 133.
Database 134 is used to provide support for the read-write operation of Accounting system, and stores all visitors of account system write-in The session information at family end 12.Business platform 131 is used for the request for receiving client 12 and by account system SDK132 to account 133 queued session information of system.
Redis is typical NoSQL database servers, can conduct using KEY-VALUE (key-value) storage organization Service routine independent operating is used as memory database in the server host of oneself, can without I O read hard disc data Quick response is asked.Redis has the characteristics that persistence, supports plurality of data structures and efficient.Redis clusters refer to by Several database server centereds are together to realize same business.Redis clusters have load balancing, read and write abruption, failure Transfer, the easily function such as extension and data safety, are adapted to the substantial amounts of session information of storage.
It is to be understood that the number of the client and server in Fig. 1 is only schematical.According to demand of realizing, Ke Yishe Put any number of server entity establishment server cluster and the business platform 131, account are carried in a manner of concentrating or be distributed Number system 133 and database 134.
Fig. 2 is the flow chart of the session information processing method of the embodiment of the present application.As shown in Figure 1, in step S100, receive Session establishment is asked.The session request includes user information.User information includes user identifier, can also include easy to use The information such as the user name of family memory.
In step S200, detect whether to exist session tree corresponding with initiating the user of session establishment request.If it is not present Session tree corresponding with the user, performs step S300.If in the presence of session tree corresponding with the user, step is performed S400。
Specifically, the user information carried in session request is established according to user and searches whether there is correspondence in the database Storage the user's information root node.The application stores the different sessions of same user using tree structure, in order to The independence kept between each session.The root node of session tree is used to store user information, its child node stores each respectively The first information of session.It ensure that the first information of each session is associated with user information but only with other sessions holding It is vertical.The first information of session includes session identification, the settling time of session and expired time, the mark of source systems and source terminal Etc. information.Wherein, the expired time of session refers to user after an operation is carried out, to not having any behaviour between expired time Make, this session will fail.Database will be automatically deleted to be carried on the relevant information of this session with saving memory space High system effectiveness.Such as set the expired time of a session as 20 minutes, customer end A login service device B searched for C commodity it Afterwards, in 20 minutes in server B without any operation, then the session will be expired, and customer end A needs login service again Device B, which re-establishes session, could continue to operate.The mark of source systems refers to the source systems for calling account number system, such as pays the bill System etc..Source terminal refers to the classification of client, such as PC, ios and android etc..
The session identification of session is the encryption information of the expired time comprising corresponding user identifier and the session.For When infrastructure service interaction failure situations such as (such as server being not responding to) or network jitter, it is impossible to session is obtained from database In the case of relevant information, the essential information that session can be maintained not go offline is obtained according to session identification, to ensure the stabilization of system Property.
It is to be understood that the content included in session identification is not limited only to user identifier and expired time, can be according to actual feelings Condition, sets and maintains the required information of session.
The exclusive information of session in information associated with the session except user information in addition to this shared information can be with Included in the first information of session.The first information of the session stored by session tree child nodes, it is possible to effectively obtain Take the state of session.
In step S300, session tree corresponding with the user is established, in root node storage user's letter of the session tree Breath, and child node is established to store the first information of the session under the root node.
When not client logs in the user account number of the user, namely there is no store by the user in database User information.The corresponding session tree of the user is established in the database, and the user information of the user is stored in the session The root node of tree.Then the first information that a child node stores this session is established under this root node.
In step S400, child node is established to store the session under the root node of the corresponding session tree of the user The first information.
That is, when the client logs in the user account number of the user, there are the session of other clients. After the client logs in, child node stores the client session first is established under the root node of the session tree of the user Information.
For example, in Fig. 1, the 122 login service device 13 of client of user 11, and ask newly-built session to server 13. The user information for the user 11 that server 13 is provided according to client 122, retrieves in database 134 and is stored with use The root node of the user information at family 11.Inquire about other clients of user 11 do not have login service device 13, then in database It is middle to create new session tree, in the user information of the root node storage user 11 of the session tree, and son is created under the root node The first information of the session of node storage client 122.Then, the client 121 of user 11 has also logged in server 13, and to The newly-built session of the request of server 13.The user information for the user 11 that server 13 is provided according to client 121, in database 134 It is middle to retrieve the root node for being stored with the user information of user 11.Inquire about user 11 there are session tree (at this time The session of client 122 is also not out of date offline), then child node is created under the root node of this session tree to store client 121 Session the first information.
Fig. 3 is the structure diagram of the session information storage of the embodiment of the present application.As shown in figure 3, it is the session letter of user A Cease the session tree of storage, including session A1, session A2, session A3 and session A4.Wherein the root node of session tree is used to store and uses The user information of family A, child node are respectively used to the first information of storage session A1, session A2, session A3 and session A4.
In conclusion the method stores session information by using tree structure, preserve and use in the root node of session tree The relevant information at family, the information of each session is preserved in child node respectively.Thus, it is possible to it ensure that user logs in the controllable of behavior Independence between property and the more sessions of user.
Meanwhile by tree structure store session relevant information, can also improve session information inquiry velocity and The efficiency of management.Such as session upper offline, control of the number of sessions of same user etc..
Preferably, in an embodiment of the embodiment of the present application, the session information processing method further includes:In step Rapid S500, compares the expired time of all child nodes in the session tree, and maximum expired time is set to root node.
When this can to reach maximum expired time, database is automatically deleted the corresponding session tree of the user.Meanwhile by Special field need not be set in root node to store expired time information, it is possible to reduce the memory space of occupancy.
Preferably, in an embodiment of the embodiment of the present application, the session information processing method further includes:In step Rapid S600, it is expired offline or because violation operation is when being kicked offline in session, delete corresponding child node.For example, in figure 3, If occurring violation operation in session A4, server directly can delete the corresponding child nodes of session A4 to force session A4 to correspond to Client it is offline.
It is offline in the corresponding all sessions of user in step S700, or because when violation operation user closed And when causing the corresponding session to be kicked offline, delete corresponding session tree.For example, in figure 3, if the user account number of user A There is critical violation, server will close user A, and the root node of the corresponding session trees of user A, which is deleted, can force user A's The corresponding client of all sessions is offline.
Session information is stored by using tree structure, improves the convenience and high efficiency of management session information.
Preferably, in an embodiment of the embodiment of the present application, the session information processing method further includes:In step Rapid S800, the quantity for the child node being limited in same session tree are no more than what first threshold was abused and was stolen to avoid account number Risk.For example, the son node number in corresponding session tree is judged before new child node being established in accessing server by customer end Whether amount reaches first threshold.If reaching first threshold, the client login failure.If not up to first threshold, the visitor Family end logs in successfully and establishes new child node to store the first information of the session.It is to be understood that the number of session tree child nodes Amount can also judge after new child node is established.
Preferably, in an embodiment of the embodiment of the present application, the session information processing method further includes:In step Rapid S900, in same session tree, the number for limiting the child node from predetermined source systems is no more than second threshold.Example Such as, when the source systems of new session are certain payment platform, detect in same session tree, there are another session Source systems are also the payment platform, then new session will replace another session, avoid the risk of repetition payment.
The embodiment of the present application stores the relevant information of all sessions of user by using the tree structure of session tree, While ensure that user logs in the independence between the controllability of behavior and the more sessions of user, also cause the management of session information more It is efficiently and convenient.
Further, in order to avoid because database connection failure and network jitter client when abnormal conditions occur are big Situation about going offline is measured, using the degrade service of processing session information and differentiation processing account system and the service of business platform Method.
In conversation procedure, if there is database connection failure so that read from database takes abnormal increase or reads Failure, can directly result in client and go offline and jump to log-in interface.Also, database connection failure, which also results in, calls account system System is time-consuming to be increased considerably, and then causes to call the business platform service response of account system to slow, so as to cause system Overall slack-off or even collapse.Meanwhile network jitter also result in business platform access account system request arriving rate decline into And client is caused largely to go offline.
Therefore, in order to ensure the stability of whole system, when the above situation occurs, account system remain a need for Second information of each business platform session, the second information of the session include user identifier and the expired time of session.Session The second information be the essential information online for ensureing client.Therefore, go wrong, can go out in data exchange process Subordinate's interface of existing problem obtains the second information of session according to session identification.Session identification is to include user identifier and session Expired time encryption information.
If for example, as shown in Figure 1, between database 134 and account system 133 information interactive process occur it is abnormal, Decrypted session mark obtains the lower layer interface account system that the second information of session passes through account number system in account number system 133 SDK132 is supplied to business platform 131.If information between account number system and the lower layer interface account system SDK132 of account number system There is exception in interaction, then the second information of decrypted session mark acquisition session is supplied to business in account system SDK132 Platform 131.So degradation processing covering comprehensively of session information, when abnormal conditions occur, avoids client and largely goes offline Situation.
Further, cause to call account system service to service mutual shadow with business platform in order to avoid time-out retries etc. Ring, server is to calling account system service to carry out differentiation adjustment with business platform service.This causes when account number system can not During access, the consumption of business platform platform will not be increased considerably, while the flow of account number system will not be because of business platform Retry and be multiplied.
Below by taking Redis databases as an example, the overtime influence produced with read-write time-out to server of assessment connection. For Redis databases in initial occupation mode, all service logics all remain same configuration, and concrete configuration is:
Connect time-out time:1s connection failures retry:2 times
Read and write time-out time:1s read-writes unsuccessfully retry:2 times
When being handled without differentiation, processing logic of the account number system in connection time-out or read-write time-out is:
(1)+2 connection time-out of connection time-out retry+degrade processing return first.
(2) processing that degrades returns for successful connection+reading overtime+2 readings first to retry+.
(3) overtime+1 connection of connection first retries time-out++ 2 readings of reading time-out first and retries time-out+degradation processing and return Return.
Most long the taking as 1s+1s*2=3s of (1) (2) situation.The most long of situation is taken as 1s+1s+1s+ in (3) 1s*2=5s.Therefore, when connecting or read-write time-out retries processing, request every time is probably completed in 3-5s, this can cause In several seconds account number system into number of passes on foot increase, also result in business platform access account system time-out, start to retry.If business Still such as the above method is set the time-out of platform access account system interface with retrying, then can drag the response speed of slow upper business platform Degree, so that the process of business platform is rammed, whole system will snowslide.
So in session information degradation processing procedure, it is poor that the service of account system and the service of business platform are carried out Alienation adjusts.That is, the service of account system is called to eliminate retry mechanism.Specifically, when database is in the first time-out time It is interior when being not responding to session inquiry request, without reading again but being immediately performed the operation of decrypted session mark by account system to obtain Take the second information of session.Similarly, when account number system is not responding to session inquiry request in the second time-out time, without Read again and the operation of decrypted session mark is immediately performed by the lower layer interface of account system to obtain the second information of session.In network Shake or infrastructure service interaction carry out degradation processing unsuccessfully when abnormal conditions occur at once, avoid increasing considerably business and put down The risk that the consumption of platform and server itself are crushed by the flow of high concurrent, ensure that the stability of whole system.
Specifically, Fig. 4 is the flow chart of the session querying method of the embodiment of the present application.As shown in figure 4, in step S1000, Receive the request of session inquiry.That is, client is when business platform is operated, business platform is to account system queued session Information inquiry, to determine whether the client is also online.
In step S2000, judge whether database in response to session inquiry request is transferred to account system by query result. If the second information of the session is not transferred to account number system in the first time-out time, step S3000 is performed.If the first surpassing When the time in the second information of the session is transferred to account number system, perform step S4000.
In step S3000, the second information of the session is obtained according to session identification in account system.Namely in account system Decrypted session mark obtains the second information of the session in system.
In step S4000, judge whether account number system in response to session inquiry request is transferred to account system by query result Unite SDK (namely lower layer interface of account number system).If the second information of the session account is not transferred in the second time-out time Number system SDK, performs step S5000.If the second information of the session is transferred to account system in the second time-out time SDK, performs step S6000.
In step S5000, the second information of the session is obtained according to session identification in account system SDK.Namely in account Decrypted session mark obtains the second information of the session in number system SDK.
In step S6000, the second information of the session of acquisition is transferred to business platform, to judge the client whether also Online.If client is online, if feed back to client its operation as a result, client is not online, jump page is to logging in The page.
By when information exchange fails, handling session information using comprehensive degradation and differentiation handling account system Service and the service of business platform, avoid when Network Abnormal, session largely go offline with server itself by it is high simultaneously The risk that the flow of hair crushes, it is ensured that the stability of whole system service.
Fig. 5 is the structure diagram of the session information processing unit of the embodiment of the present application.As shown in figure 5, at session information Reason device 5 creates unit 51 including session, session tree creates unit 52, child node creates unit 53.
Session creates unit 51 and is configured as receiving session establishment request, detects whether exist with initiating session establishment request The corresponding session tree of user.The session request includes user information.User information includes user identifier, can also include The information such as the user name easy to user's memory.
Session tree creates unit 52 and is configured as establishing session tree corresponding with the user, in the root section of the session tree Point storage user information, and child node is established to store the first information of the session under the root node.
Child node create unit 53 be configured as establishing under the root node of the corresponding session tree of the user child node with Store the first information of the session.
The first information of session include session identification, the settling time of session and expired time, the mark of source systems and The information such as source terminal.Wherein, the expired time of session refers to that client after an operation is carried out, does not have between expired time There is any operation, this session will fail, and database will be automatically deleted to be deposited on the relevant information of this session to save Store up space and improve system effectiveness.The mark of source systems refers to the source systems for calling account number system, such as payment system etc..Come Source refers to the classification of client, such as PC, ios and android etc..
The session identification of session is the encryption information of the expired time comprising corresponding user identifier and the session.For When infrastructure service interaction failure situations such as (such as server being not responding to) or network jitter, it is impossible to session is obtained from database In the case of relevant information, the essential information that session can be maintained not go offline is obtained according to session identification, to ensure the stabilization of system Property.
Session information is stored by using tree structure in the session information processing system of the embodiment of the present application, in session tree Root node preserve user relevant information, preserve the information of each session respectively in child node.Thus, it is possible to it ensure that user Independence between the controllability of login behavior and the more sessions of user.
Meanwhile by tree structure store session relevant information, can also improve session information inquiry velocity and The efficiency of management.Such as session upper offline, control of the number of sessions of same user etc..
Preferably, session information processing unit 5 further includes expired time administrative unit 56.56 quilt of expired time administrative unit The expired time of all child nodes under root node described in comparison is configured to, and maximum expired time is set to the root node. When this can to reach maximum expired time, database is automatically deleted the corresponding session tree of the user.Simultaneously as root node Special field need not be set to store expired time information, it is possible to reduce the memory space of occupancy.
Preferably, session information processing unit 5 further includes the offline administrative unit 57 of session.Offline 57 quilt of administrative unit of session It is configured to, when session is actively or passively offline, corresponding child node be deleted.Session actively it is offline published including client or Session reaches expired time etc..Session it is passive it is offline including carried out violation operation behavior kicked it is offline etc..
Preferably, session information processing unit 5 further includes user offline administrative unit 58.58 quilt of user offline administrative unit It is configured to, when the corresponding all sessions of user are actively or passively offline, corresponding root node be deleted.Wherein, user corresponds to The passive offline finger of all sessions when violation operation user caused by being closed all sessions kicked it is offline.
The offline of session is controlled by the method for deletion of node information, embodies the facility that session information uses tree structure Property, high efficiency and controllability.
Preferably, session information processing unit 5 further includes child node quantity control unit 59.Child node quantity control unit 59 quantity for being configured as limiting the child node in same session tree are no more than first threshold, with to avoid account number abuse and by The risk of robber.
Preferably, session information processing unit 5 further includes source systems limiting unit 54.54 quilt of source systems limiting unit It is configured in same session tree, the number for limiting the child node from identical predetermined source systems is no more than the second threshold Value.For example, when the source systems of new session are certain payment platform, detect in same session tree, there are another The source systems of session are also the payment platform, then new session will replace another session, avoid the wind of repetition payment Danger.
Preferably, in an embodiment of the embodiment of the present application, in order to avoid because database connection failure and net Network shake when abnormal conditions there is a situation where when client largely go offline, session information processing unit 5 further includes session information and obtains Take unit 55.Session information acquiring unit 55 is configured to respond to session inquiry request, returns to the second information of the session, Second information of the session includes the user identifier and the expired time of the session.Session information acquiring unit 55 includes Account number system services subelement 551 and lower floor's interface service subelement 552 of account system.
Account number system service subelement 551 is configured as when being not responding to for storing the database of session tree, in account number The second information of the session is obtained in system according to the session identification.Wherein, the database is not responding to refer to first The account number system does not receive the session information that the database returns in time-out time.
Lower floor's interface service subelement 552 of account system is configured to when account number system is not responding to, The second information of the session is obtained in the lower layer interface of account number system according to the session identification.Wherein, the account number system It is not responding to refer to that in the second time-out time the lower layer interface of the account number system does not receive the account system to the meeting returned Talk about information.
Session information acquiring unit 55 is when network or infrastructure service interaction unsuccessfully occur when abnormal conditions, at degradation The method for managing the service of session information and differentiation processing account system and the service of business platform.It is so that abnormal in information exchange When, carry out degradation processing at once, avoid increasing considerably upper-layer service platform consumption and server itself by the stream of high concurrent The risk crushed is measured, ensure that the stability of whole system.
Fig. 6 is the structure diagram of the electronic equipment of the embodiment of the present application.Electronic equipment shown in Fig. 6 is at conventional data Device is managed, it includes general computer hardware structure, it includes at least processor 61 and memory 62.Processor 61 and storage Device 62 is connected by bus 63.Memory 62 is suitable for the executable instruction of storage processor 61 or program.Processor 61 can be Independent microprocessor or one or more microprocessor set.Thus, processor 61 is by performing memory 62 The instruction stored, thus the method flow for performing embodiment present invention as described above realize processing for data and for The control of other devices.Bus 63 links together above-mentioned multiple components, while said modules are connected to display controller 64 and display device and input/output (I/O) device 65.Input/output (I/O) device 65 can be mouse, keyboard, modulation Demodulator, network interface, touch-control input device, body-sensing input unit, printer and other devices well known in the art.Typical case Ground, input/output device 65 are connected by input/output (I/O) controller 66 with system.
It will be understood by those skilled in the art that embodiments herein can be provided as method, apparatus (equipment) or computer Program product.Therefore, in terms of the application can use complete hardware embodiment, complete software embodiment or combine software and hardware The form of embodiment.Moreover, the application can use the calculating for wherein including computer usable program code in one or more The computer program that machine readable storage medium storing program for executing is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Product.
The application is the flow chart with reference to method, apparatus (equipment) and computer program product according to the embodiment of the present application Come what is described.It should be understood that each flow in flow chart can be realized by computer program instructions.
These computer program instructions, which can be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to The manufacture of device is made, which realizes the function of being specified in one flow of flow chart or multiple flows.
Also can provide these computer program instructions to all-purpose computer, special purpose computer, Embedded Processor or other The processor of programmable data processing device is to produce a machine so that is set by computer or the processing of other programmable datas The instruction that standby processor performs produces the device for being used for realization the function of being specified in one flow of flow chart or multiple flows.
The foregoing is merely the preferred embodiment of the application, the application is not limited to, for those skilled in the art For, the application can have various modifications and changes.All any modifications made within spirit herein and principle, be equal Replace, improve etc., it should be included within the protection domain of the application.
The embodiment of the present application discloses A1, a kind of session information processing method, wherein, the described method includes:
Session establishment request is received, detects whether to exist session tree corresponding with initiating the user of session establishment request;
There is no during session tree corresponding with the user, session tree corresponding with the user is established, in the meeting The root node storage user information of words tree, and child node is established to store the first information of the session under the root node;
When there is session tree corresponding with the user, son is established under the root node of the corresponding session tree of the user Node is to store the first information of the session;
Wherein, the user information includes at least user identifier;The first information of the session includes at least session identification With the expired time of the session.
A2, the session information processing method according to A1, wherein, the session identification be comprising the user identifier and The encryption information of the expired time of the session.
A3, the session information processing method according to A2, wherein, the method further includes:
In response to session inquiry request, the second information of the session is returned to, the second information of the session is including described User identifier and the expired time of the session.
A4, the session information processing method according to A3, wherein, in response to session inquiry request, return to the session The second information include:
When being not responding to for storing the database of session tree, in account number system according to obtaining the session identification Second information of session;And
When account number system is not responding to, the session is obtained according to the session identification in the lower layer interface of account number system The second information.
A5, the session information processing method according to A4, wherein, the database is not responding to refer in the first time-out The interior account number system does not receive the second information of the session that the database returns;And
The account number system is not responding to refer to that in the second time-out time the lower layer interface of the account number system does not receive Second information of the session that the account system returns.
A6, the session information processing method according to A1, wherein, the method further includes:
After the child node is increased newly, the expired time of all child nodes under the root node, and will most serious offense Time phase is set to the root node.
A7, the session information processing method according to A1, wherein, the method further includes:
When the session is actively or passively offline, corresponding child node is deleted;And
When the corresponding all sessions of user are actively or passively offline, corresponding session tree is deleted.
A8, the session information processing method according to A1, wherein, the method further includes:
The quantity for the child node being limited in same session tree is no more than first threshold.
A9, the session information processing method according to A1, wherein, the first information of the session, which further includes, calls account system The mark of the source systems of system;
The method further includes:
In same session tree, the number for limiting the child node from predetermined source systems is no more than second threshold.
The embodiment of the invention also discloses B1, a kind of session information processing unit, wherein, including:
Session creates unit, is configured as receiving session establishment request, detects whether exist with initiating session establishment request The corresponding session tree of user;
Session tree creates unit, is configured as establishing session tree corresponding with the user, in the root section of the session tree Point storage user information, and child node is established to store the first information of the session under the root node;
Child node creates unit, is configured as establishing child node under the root node of the corresponding session tree of the user to deposit Store up the first information of the session;
Wherein, the user information includes at least user identifier;The first information of the session includes at least session identification With the expired time of the session.
B2, the session information processing unit according to B1, wherein, the session identification be comprising the user identifier and The encryption information of the expired time of the session.
B3, the session information processing unit according to B1, wherein, described device further includes:
Session information acquiring unit, is configured to respond to session inquiry request, returns to the second information of the session, institute Stating the second information of session includes the user identifier and the expired time of the session.
B4, the session information processing unit according to B3, wherein, the session information acquiring unit includes:
Account number system services subelement, is configured as when being not responding to for storing the database of session tree, in account number system The second information of the session is obtained in system according to the session identification;
Lower floor's interface service subelement of account number system, is configured as when account number system is not responding to, in account number system The second information of the session is obtained in lower layer interface according to the session identification.
B5, the session information processing unit according to B4, wherein, the database is not responding to refer in the first time-out The interior account number system does not receive the second information of the session that the database returns;And
The account number system is not responding to refer to that in the second time-out time the lower layer interface of the account number system does not receive Second information of the session that the account system returns.
B6, the session information processing unit according to B1, wherein, described device further includes:
Expired time administrative unit, is configured as the expired time of all child nodes under root node described in comparison, and will most Big expired time is set to the root node.
B7, the session information processing unit according to B1, wherein, described device further includes:
The offline administrative unit of session, is configured as, when the session is actively or passively offline, corresponding child node being deleted Remove;And
User offline administrative unit, is configured as, when the corresponding all sessions of user are actively or passively offline, deleting Corresponding session tree.
B8, the session information processing unit according to B1, wherein, described device further includes:
Child node quantity control unit, the quantity for being configured as limiting the child node in same session tree are no more than first Threshold value.
B9, the session information processing unit according to B1, wherein, the first information of the session further includes calling account The mark of the source systems of system;Described device further includes:
Source systems limiting unit, is configured as in same session tree, limits from identical predetermined source system The number of the child node of system is no more than second threshold.
The embodiment of the invention also discloses C1, a kind of electronic equipment, wherein, the electronic equipment includes memory and processing Device, wherein,
The memory is used to store one or more computer instruction, wherein, one or more computer instruction Performed by the processor to realize the method any one of A1-A9.
The embodiment of the invention also discloses D1, a kind of computer-readable recording medium, computer program is stored thereon with, its In, which is executed by processor to realize the method any one of A1-A9.

Claims (10)

  1. A kind of 1. session information processing method, it is characterised in that including:
    Session establishment request is received, detects whether to exist session tree corresponding with initiating the user of session establishment request;
    There is no during session tree corresponding with the user, session tree corresponding with the user is established, in the session tree Root node storage user information, and establish child node under the root node to store the first information of the session;
    When there is session tree corresponding with the user, child node is established under the root node of the corresponding session tree of the user To store the first information of the session;
    Wherein, the user information includes at least user identifier;The first information of the session includes at least session identification and institute State the expired time of session.
  2. 2. session information processing method according to claim 1, it is characterised in that the session identification is to include the use Family identifies and the encryption information of the expired time of the session.
  3. 3. session information processing method according to claim 2, it is characterised in that the method further includes:
    In response to session inquiry request, the second information of the session is returned to, the second information of the session includes the user Mark and the expired time of the session.
  4. 4. session information processing method according to claim 3, it is characterised in that in response to session inquiry request, return Second information of the session includes:
    When being not responding to for storing the database of session tree, the session is obtained according to the session identification in account number system The second information;And
    When account number system is not responding to, the of the session is obtained according to the session identification in the lower layer interface of account number system Two information.
  5. 5. session information processing method according to claim 4, it is characterised in that the database is not responding to refer to The account number system does not receive the second information of the session that the database returns in one time-out time;And
    The account number system is not responding to refer to that in the second time-out time the lower layer interface of the account number system does not receive described Second information of the session that account system returns.
  6. 6. session information processing method according to claim 1, it is characterised in that the method further includes:
    After the child node is increased newly, the expired time of all child nodes under the root node, and will be maximum expired when Between set to the root node.
  7. 7. session information processing method according to claim 1, it is characterised in that the method further includes:
    When the session is actively or passively offline, corresponding child node is deleted;And
    When the corresponding all sessions of user are actively or passively offline, corresponding session tree is deleted.
  8. A kind of 8. session information processing unit, it is characterised in that including:
    Session creates unit, is configured as receiving session establishment request, detects whether the use for having with initiating session establishment request The corresponding session tree in family;
    Session tree creates unit, is configured as establishing session tree corresponding with the user, is deposited in the root node of the session tree User information is stored up, and child node is established to store the first information of the session under the root node;
    Child node creates unit, is configured as establishing child node under the root node of the corresponding session tree of the user to store State the first information of session;
    Wherein, the user information includes at least user identifier;The first information of the session includes at least session identification and institute State the expired time of session.
  9. 9. a kind of electronic equipment, it is characterised in that including memory and processor, wherein,
    The memory is used to store one or more computer instruction, wherein, one or more computer instruction is by institute Processor is stated to perform to realize the method any one of claim 1-7.
  10. 10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor Perform to realize the method any one of claim 1-7.
CN201711122192.3A 2017-11-14 2017-11-14 Session information processing method, device, server and readable storage medium Expired - Fee Related CN107911443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711122192.3A CN107911443B (en) 2017-11-14 2017-11-14 Session information processing method, device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711122192.3A CN107911443B (en) 2017-11-14 2017-11-14 Session information processing method, device, server and readable storage medium

Publications (2)

Publication Number Publication Date
CN107911443A true CN107911443A (en) 2018-04-13
CN107911443B CN107911443B (en) 2021-01-26

Family

ID=61844024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711122192.3A Expired - Fee Related CN107911443B (en) 2017-11-14 2017-11-14 Session information processing method, device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN107911443B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617955A (en) * 2018-12-04 2019-04-12 山东浪潮通软信息科技有限公司 A kind of stateless session multi-zone supervision implementation method based on distributed caching
CN111756784A (en) * 2019-04-30 2020-10-09 北京京东尚科信息技术有限公司 Session method, session device, computer equipment and medium
CN112506955A (en) * 2020-12-10 2021-03-16 星环信息科技(上海)股份有限公司 Query processing method, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7051029B1 (en) * 2001-01-05 2006-05-23 Revenue Science, Inc. Identifying and reporting on frequent sequences of events in usage data
CN103685357A (en) * 2012-09-06 2014-03-26 深圳市快播科技有限公司 Account multi-open message processing method and system
CN103856462A (en) * 2012-12-05 2014-06-11 深圳市快播科技有限公司 Method and system for managing sessions
CN104038407A (en) * 2014-05-27 2014-09-10 小米科技有限责任公司 Instant message management method and device
CN104821908A (en) * 2015-04-08 2015-08-05 北京北信源软件股份有限公司 Exclusive service-supporting instant messaging method and system
WO2016062255A1 (en) * 2014-10-22 2016-04-28 百度在线网络技术(北京)有限公司 Multi-round session interaction method and system, and computer device
CN105978947A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Same account number login equipment number control method and mobile terminal
CN106790171A (en) * 2016-12-29 2017-05-31 杭州朗和科技有限公司 The method of session control, device and computer-readable recording medium
CN106973062A (en) * 2017-04-27 2017-07-21 努比亚技术有限公司 A kind of conversation managing method and server

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7051029B1 (en) * 2001-01-05 2006-05-23 Revenue Science, Inc. Identifying and reporting on frequent sequences of events in usage data
CN103685357A (en) * 2012-09-06 2014-03-26 深圳市快播科技有限公司 Account multi-open message processing method and system
CN103856462A (en) * 2012-12-05 2014-06-11 深圳市快播科技有限公司 Method and system for managing sessions
CN104038407A (en) * 2014-05-27 2014-09-10 小米科技有限责任公司 Instant message management method and device
WO2016062255A1 (en) * 2014-10-22 2016-04-28 百度在线网络技术(北京)有限公司 Multi-round session interaction method and system, and computer device
CN104821908A (en) * 2015-04-08 2015-08-05 北京北信源软件股份有限公司 Exclusive service-supporting instant messaging method and system
CN105978947A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Same account number login equipment number control method and mobile terminal
CN106790171A (en) * 2016-12-29 2017-05-31 杭州朗和科技有限公司 The method of session control, device and computer-readable recording medium
CN106973062A (en) * 2017-04-27 2017-07-21 努比亚技术有限公司 A kind of conversation managing method and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
田霖: "云架构的Web服务器集群的探索与研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617955A (en) * 2018-12-04 2019-04-12 山东浪潮通软信息科技有限公司 A kind of stateless session multi-zone supervision implementation method based on distributed caching
CN111756784A (en) * 2019-04-30 2020-10-09 北京京东尚科信息技术有限公司 Session method, session device, computer equipment and medium
CN111756784B (en) * 2019-04-30 2023-05-12 北京京东尚科信息技术有限公司 Session method, session device, computer equipment and medium
CN112506955A (en) * 2020-12-10 2021-03-16 星环信息科技(上海)股份有限公司 Query processing method, computer equipment and storage medium
CN112506955B (en) * 2020-12-10 2021-09-21 星环信息科技(上海)股份有限公司 Query processing method, computer equipment and storage medium

Also Published As

Publication number Publication date
CN107911443B (en) 2021-01-26

Similar Documents

Publication Publication Date Title
US8572023B2 (en) Data services framework workflow processing
US11138300B2 (en) Multi-factor profile and security fingerprint analysis
US11537741B2 (en) Unified multi-platform system for data privacy
CN103198090B (en) For optimizing the method and system of the storage distribution in virtual desktop environment
US9805209B2 (en) Systems and methodologies for managing document access permissions
CN105531977B (en) The method and system of control is connected with the mobile device of remote data access for synchronization
JP5852340B2 (en) Dynamic management of role membership
CN102947797A (en) Online service access controls using scale out directory features
EP2203841A2 (en) Service-oriented pipeline based architecture
CN106462423A (en) System and method for integrating web and native applications from web-based contexts
CN109600349A (en) A kind of shared implementation method, device, equipment and the medium of business datum
CN109587233A (en) Cloudy Container Management method, equipment and computer readable storage medium
CN111125746B (en) Multi-tenant intelligent data protection platform
JP2013029994A (en) Server apparatus, information processing method, and program
CN110457629A (en) Permission processing, authority control method and device
US10691640B1 (en) Storing an asset update record
CN111652685A (en) Information processing method, apparatus, computer equipment, and computer-readable storage medium
US10721236B1 (en) Method, apparatus and computer program product for providing security via user clustering
CN107911443A (en) A kind of session information processing method, device, server and readable storage medium storing program for executing
US20100185451A1 (en) Business-responsibility-centric identity management
US12229308B1 (en) Systems and methods for sharing user data
EP2896005A1 (en) Multi-factor profile and security fingerprint analysis
CN107895044A (en) A kind of database data processing method, device and system
CN108462745B (en) Novel cloud platform resource management and delivery method and device
CN105844171B (en) Method and device for file synchronization control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100084 Room 202, 2 / F, 1-3 / F, No. 11, Shangdi Information Road, Haidian District, Beijing

Applicant after: Beijing Xingxuan Technology Co.,Ltd.

Address before: 100085 Haidian District, Beijing Haidian District, Beijing

Applicant before: Beijing Xiaodu Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210126

CF01 Termination of patent right due to non-payment of annual fee