CN108737541A - A kind of WEB conversation management systems and management method - Google Patents

A kind of WEB conversation management systems and management method Download PDF

Info

Publication number
CN108737541A
CN108737541A CN201810480282.8A CN201810480282A CN108737541A CN 108737541 A CN108737541 A CN 108737541A CN 201810480282 A CN201810480282 A CN 201810480282A CN 108737541 A CN108737541 A CN 108737541A
Authority
CN
China
Prior art keywords
user
redis
session
web
module
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
Application number
CN201810480282.8A
Other languages
Chinese (zh)
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.)
Dfine Technology Co Ltd
Original Assignee
Dfine 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 Dfine Technology Co Ltd filed Critical Dfine Technology Co Ltd
Priority to CN201810480282.8A priority Critical patent/CN108737541A/en
Publication of CN108737541A publication Critical patent/CN108737541A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

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

Abstract

The invention discloses a kind of WEB conversation management systems and management methods, it includes the following steps:When user's first login system, system generates the ID for identifying the user and preserves into cache module, and then the ID of the user is added in http response;When the user accesses system, system reads the ID of the user from http response, reads the log-on message of the user from caching according to the ID of user marks;When the user log off, control module deletes corresponding session information from cache module.The WEB conversation management systems and management method of the present invention, pass through self-built WEB session managements component, the session management for being coupling in WEB server is independent from WEB server, cluster is freely changed, cuts and made to realization to session management module, the stability of system is improved, there is very strong applicability and scalability.

Description

A kind of WEB conversation management systems and management method
Technical field
The invention belongs to WEB session management technical fields, and in particular to a kind of WEB conversation management systems and management method.
Background technology
Session (SESSION) management is considerable component part in current WEB service program.WEB service at present Session management is generated by WEB server, and developer oneself can not manage, so server delay machine can cause session information to be lost, All logged-in users are also forced to log in again after Server Restart, on the other hand, due to that oneself can not manage session, so being System session information back-up and can not will make cluster, and the reliability of system and scalability is made to substantially reduce.In order to solve these Problem, there is an urgent need to redesign session management module to solve these problems.
Invention content
It is an object of the invention to:Above-mentioned deficiency in the prior art is solved, a kind of WEB conversation management systems and pipe are provided Reason method is independently gone out the session management for being coupling in WEB server by self-built WEB session managements component from WEB server Come, cluster is freely changed, cuts and made to realization to session management module.
To achieve the goals above, the technical scheme is that:
A kind of WEB conversation management systems, it includes control module, control module respectively with client, conversation module and match Module connection is set, conversation module is connect with cache module, and for generating user unique identification, conversation module is used for control module Session timeout information is managed, cache module is for preserving user unique identification, and configuration module is for configuring the cache module IP address and port information.
Further, above-mentioned cache module is REDIS, and the REDIS is somebody's turn to do for accessing user unique identification and being arranged The time-out time of mark.
A kind of WEB conversation managing methods, using above-mentioned WEB conversation management systems, it includes the following steps:
Step 1:When user's first login system, system generates the ID for identifying the user and preserves into cache module, so The ID of the user is added in http response afterwards;
Step 2:When the user accesses system, system reads the ID of the user from http response, according to the user's ID identifies the log-on message that the user is read from caching;
Step 3:When the user log off, control module deletes corresponding session information from cache module.
Further, the format of the ID of the above-mentioned user is that+12 byte user of 2 byte company ID+4 bytes User ID steps on The character string of time character string+random 16 byte is recorded, the 12 byte user login time character string includes when user logs in The character string of year, month, day, hour, minute and second, random 16 byte only include random digit and random letters.
Further, above-mentioned steps one include the following steps:
Step 101:When user's first login system, control module generates the ID for identifying the user;
Step 102:The command string is stored in REDIS by the access command of REDIS;
Step 103:The ID of the user is added in http response.
Further, above-mentioned steps 103 are specially and are added to the ID of the user in http response in the form of COOKIE.
Further, above-mentioned steps 102 further include that the time-out time of the User ID is arranged using the order of REDIS, described In step 2, system, which is automatically deleted in caching, to be more than the session of time-out time and retains time-out information.
Further, in above-mentioned steps two, when user access system when session have timed out, system show automatically time-out believe Breath.
Further, above-mentioned steps one are further comprising the steps of:
Step 201:It plans several REDIS servers, the IP address of each REDIS servers and relative is set Business information;
Step 202:Wherein two REDIS servers are chosen to store the relevant information of session list, described two REDIS servers are respectively configured as master server and standby server, and other REDIS servers are configured to child servers;
Step 203:When user's first login system, system generate the ID for identifying the user and simultaneously by the ID of the user and The relevant information write-in master server and standby server of session list, then press the corresponding child servers of access time write-in;
Step 204:In the step 2, when multiple users access REDIS servers simultaneously, each user accesses alone There are the child servers of oneself ID, and take out the relevant information of session list from child servers.
Further, in above-mentioned steps 204, when the child servers delay machine that user accesses, it is distributed for the user automatically It has the user ID and session list relevant information REDIS servers.
By adopting the above-described technical solution, the beneficial effects of the invention are as follows:
The WEB conversation management systems and management method of the present invention will be coupling in WEB by self-built WEB session managements component The session management of server is independent from WEB server, realizes freely changing, cut and making to session management module Cluster improves the stability of system, has very strong applicability and scalability;
User unique identification is stored in caching by the present invention, and not easy to lose, the ability to ward off risks is strong;
The system of the present invention is equipped with active/standby server and multiple child servers, when one of server delay machine It waits, may have access to others servers and obtain information, to will not there is a situation where user informations to lose.The stabilization of raising system Property and reliability;
In the conversation managing method of the present invention, when user accesses server simultaneously, can alone it access belonging to oneself Child servers, and be taken out relevant information.The clogging that will not cause server in this way, alleviates the pressure of master server Power, while also improving user experience;
Text file can be used in the configuration module of the present invention, and the multiple formats such as XML, JSON are with configuring REDIS server ips Location and port information, configuration is easy to use, is readily integrated into existing system;
Description of the drawings
Fig. 1 is the WEB session management component diagrams of the present invention.
Fig. 2 is that the user of the present invention accesses system flow schematic diagram.
Specific implementation mode
With reference to attached drawing 1-2, specific description is done to embodiments of the present invention.
A kind of WEB conversation management systems, it includes control module, control module respectively with client, conversation module and match Module connection is set, conversation module is connect with cache module, and for generating user unique identification, conversation module is used for control module Session timeout information is managed, cache module is for preserving user unique identification, and configuration module is for configuring the cache module IP address and port information.
Further, above-mentioned cache module is REDIS, and the REDIS is somebody's turn to do for accessing user unique identification and being arranged The time-out time of mark.
A kind of WEB conversation managing methods, using above-mentioned WEB conversation management systems, it includes the following steps:
Step 1:When user's first login system, system generates the ID for identifying the user and preserves into cache module, so The ID of the user is added in http response afterwards;
Step 2:When the user accesses system, system reads the ID of the user from http response, according to the user's ID identifies the log-on message that the user is read from caching;
Step 3:When the user log off, control module deletes corresponding session information from cache module.
Further, the format of the ID of the above-mentioned user is that+12 byte user of 2 byte company ID+4 bytes User ID steps on The character string of time character string+random 16 byte is recorded, the 12 byte user login time character string includes when user logs in The character string of year, month, day, hour, minute and second, random 16 byte only include random digit and random letters.
Further, above-mentioned steps one include the following steps:
Step 101:When user's first login system, control module generates the ID for identifying the user;
Step 102:The command string is stored in REDIS by the access command of REDIS;
Step 103:The ID of the user is added in http response.
Further, above-mentioned steps 103 are specially and are added to the ID of the user in http response in the form of COOKIE.
Further, above-mentioned steps 102 further include that the time-out time of the User ID is arranged using the order of REDIS, described In step 2, system, which is automatically deleted in caching, to be more than the session of time-out time and retains time-out information.
Further, in above-mentioned steps two, when user access system when session have timed out, system show automatically time-out believe Breath.
Further, above-mentioned steps one are further comprising the steps of:
Step 201:It plans several REDIS servers, the IP address of each REDIS servers and relative is set Business information;
Step 202:Wherein two REDIS servers are chosen to store the relevant information of session list, described two REDIS servers are respectively configured as master server and standby server, and other REDIS servers are configured to child servers;
Step 203:When user's first login system, system generate the ID for identifying the user and simultaneously by the ID of the user and The relevant information write-in master server and standby server of session list, then press the corresponding child servers of access time write-in;
Step 204:In the step 2, when multiple users access REDIS servers simultaneously, each user accesses alone There are the child servers of oneself ID, and take out the relevant information of session list from child servers.
Further, in above-mentioned steps 204, when the child servers delay machine that user accesses, it is distributed for the user automatically It has the user ID and session list relevant information REDIS servers.
In one embodiment of the invention, when logging in system by user, control module generates the ID for identifying the user and guarantor It is stored in REDIS, is then added to the ID of the user in http response in the form of COOKIE.When the user accesses system When, control module is saved in the id information in COOKIE from taking-up in HTTP request.And it is read and is somebody's turn to do from caching with ID marks The log-on message of user, then detects whether the user logs in and whether have timed out, if being not logged in, repeats the above steps, if super When, then prompt session information to delete.When user log off, control module is removed from the cache corresponding session information. The time-out information of session is controlled by conversation module, and after corresponding session timeout, log-on message will be automatically deleted from caching, When user asks service again, control module can detect time-out information.
The WEB conversation management systems and management method of the present invention will be coupling in WEB by self-built WEB session managements component The session management of server is independent from WEB server, realizes freely changing, cut and making to session management module Cluster improves the stability of system, has very strong applicability and scalability;
User unique identification is stored in caching by the present invention, and not easy to lose, the ability to ward off risks is strong;
The system of the present invention is equipped with active/standby server and multiple child servers, when one of server delay machine It waits, may have access to others servers and obtain information, to will not there is a situation where user informations to lose.The stabilization of raising system Property and reliability;
In the conversation managing method of the present invention, when user accesses server simultaneously, can alone it access belonging to oneself Child servers, and be taken out relevant information.The clogging that will not cause server in this way, alleviates the pressure of master server Power, while also improving user experience;
Text file can be used in the configuration module of the present invention, and the multiple formats such as XML, JSON are with configuring REDIS server ips Location and port information, configuration is easy to use, is readily integrated into existing system.

Claims (10)

1. a kind of WEB conversation management systems, which is characterized in that it includes control module, the control module respectively with client End, conversation module are connected with configuration module, and the conversation module is connect with cache module, and the control module is for generating user Unique identification, the conversation module is for managing session timeout information, and the cache module is for preserving user's uniqueness mark Know, the configuration module is used to configure the IP address and port information of the cache module.
2. a kind of WEB conversation management systems according to claim 1, it is characterised in that the cache module is REDIS, institute REDIS is stated to be used to access user unique identification and the time-out time of the mark is arranged.
3. a kind of WEB conversation managing methods, using WEB conversation management systems described in claim 1, it is characterised in that including with Lower step:
Step 1:When user's first login system, system generates the ID for identifying the user and preserves into cache module, then will The ID of the user is added in http response;
Step 2:When the user accesses system, system reads the ID of the user from http response, is marked according to the ID of the user Know the log-on message that the user is read from caching;
Step 3:When the user log off, control module deletes corresponding session information from cache module.
4. a kind of WEB conversation managing methods according to claim 3, it is characterised in that:The lattice of the ID of the user Formula is the character string of+12 byte user's login time character string of 2 byte company ID+4 bytes User ID+random 16 byte, described 12 byte user's login time character strings include year, month, day, hour, minute and the second when user logs in, random 16 byte Character string only include random digit and random letters.
5. a kind of WEB conversation managing methods according to claim 4, it is characterised in that:The step 1 includes following step Suddenly:
Step 101:When user's first login system, control module generates the ID for identifying the user;
Step 102:The command string is stored in REDIS by the access command of REDIS;
Step 103:The ID of the user is added in http response.
6. a kind of WEB conversation managing methods according to claim 5, it is characterised in that:The step 103 is specially should The ID of user is added in the form of COOKIE in http response.
7. a kind of WEB conversation managing methods according to claim 5, it is characterised in that:The step 102 further includes utilizing The time-out time of the User ID is arranged in the order of REDIS, and in the step 2, it is more than time-out time that system, which is automatically deleted in caching, Session and retain time-out information.
8. a kind of WEB conversation managing methods according to claim 7, it is characterised in that:In the step 2, when user visits Session has timed out when asking system, and system shows time-out information automatically.
9. a kind of WEB conversation managing methods according to claim 3 or 5, it is characterised in that:The step 1 further include with Lower step:
Step 201:It plans several REDIS servers, the IP address of each REDIS servers and relative business is set Information;
Step 202:Wherein two REDIS servers are chosen to store the relevant information of session list, described two REDIS Server is respectively configured as master server and standby server, and other REDIS servers are configured to child servers;
Step 203:When user's first login system, system generates the ID for identifying the user and simultaneously by the ID of the user and session The relevant information write-in master server and standby server of list, then press the corresponding child servers of access time write-in;
Step 204:In the step 2, when multiple users access REDIS servers simultaneously, each user, which accesses alone, to be had The child servers of oneself ID, and from child servers take out session list relevant information.
10. a kind of WEB conversation managing methods according to claim 9, it is characterised in that:In the step 204, work as user When the child servers delay machine of access, the relevant information of other ID for having the user and session list is distributed for the user automatically REDIS servers.
CN201810480282.8A 2018-05-18 2018-05-18 A kind of WEB conversation management systems and management method Pending CN108737541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810480282.8A CN108737541A (en) 2018-05-18 2018-05-18 A kind of WEB conversation management systems and management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810480282.8A CN108737541A (en) 2018-05-18 2018-05-18 A kind of WEB conversation management systems and management method

Publications (1)

Publication Number Publication Date
CN108737541A true CN108737541A (en) 2018-11-02

Family

ID=63937484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810480282.8A Pending CN108737541A (en) 2018-05-18 2018-05-18 A kind of WEB conversation management systems and management method

Country Status (1)

Country Link
CN (1) CN108737541A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109348269A (en) * 2018-12-02 2019-02-15 甘肃万维信息技术有限责任公司 A kind of inter-network throws screen system and its application method
WO2020215211A1 (en) * 2019-04-23 2020-10-29 深圳开源互联网安全技术有限公司 Site session termination method and apparatus, terminal device and medium
WO2021027600A1 (en) * 2019-08-09 2021-02-18 深圳前海微众银行股份有限公司 Single log-in method, apparatus and device, and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103841117A (en) * 2014-03-21 2014-06-04 北京京东尚科信息技术有限公司 JAAS login method and server based on Cookie mechanism
US9083770B1 (en) * 2013-11-26 2015-07-14 Snapchat, Inc. Method and system for integrating real time communication features in applications
CN106453661A (en) * 2016-12-09 2017-02-22 北京酷我科技有限公司 Session management method for HTTP server cluster

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9083770B1 (en) * 2013-11-26 2015-07-14 Snapchat, Inc. Method and system for integrating real time communication features in applications
CN103841117A (en) * 2014-03-21 2014-06-04 北京京东尚科信息技术有限公司 JAAS login method and server based on Cookie mechanism
CN106453661A (en) * 2016-12-09 2017-02-22 北京酷我科技有限公司 Session management method for HTTP server cluster

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109348269A (en) * 2018-12-02 2019-02-15 甘肃万维信息技术有限责任公司 A kind of inter-network throws screen system and its application method
WO2020215211A1 (en) * 2019-04-23 2020-10-29 深圳开源互联网安全技术有限公司 Site session termination method and apparatus, terminal device and medium
CN113966590A (en) * 2019-04-23 2022-01-21 深圳开源互联网安全技术有限公司 Site session termination method, device, terminal equipment and medium
CN113966590B (en) * 2019-04-23 2023-04-14 深圳市九州安域科技有限公司 Site session termination method, device, terminal equipment and medium
WO2021027600A1 (en) * 2019-08-09 2021-02-18 深圳前海微众银行股份有限公司 Single log-in method, apparatus and device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
US11544288B2 (en) Systems and methods for managing distributed database deployments
US11615115B2 (en) Systems and methods for managing distributed database deployments
CN102982141B (en) A kind of method and device realizing distributed data base agency
US20170286517A1 (en) Systems and methods for managing distributed database deployments
US20170344618A1 (en) Systems and methods for managing distributed database deployments
DE202014010930U1 (en) Access to objects in paged stores
CN108737541A (en) A kind of WEB conversation management systems and management method
CN106874424A (en) A kind of collecting webpage data processing method and system based on MongoDB and Redis
CN104834582B (en) A kind of monitor event methods of exhibiting
US20120036208A1 (en) Polling-based secure network message notification system and method with performance enhancing features
CN103281408B (en) A kind of method that reverse registration penetrates network
US20060020671A1 (en) E-mail caching system and method
CN104410674A (en) A WEB session synchronization method of a single sign on system
CN104601666B (en) Log services method and cloud platform
CN113852673B (en) Signaling tracking method and device of core network element and storage medium
CN104680303A (en) Construction method for SNMP (simple network management protocol)-based business index monitoring system
EP2521307A1 (en) Device management method, system and device
CN113839966A (en) Security management system based on micro-service
CN104468232B (en) The method and system of network equipments configuration are completed using xml document and mib
EP2798820B1 (en) Methods for identifying network traffic characteristics to correlate and manage one or more subsequent flows and devices thereof
KR101368500B1 (en) Method for providing database history management and the database management system thereof
Cisco Logging
Cisco Logging
US20140181281A1 (en) Connecting network management systems
CN111913732B (en) Service updating method and device, management server and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181102

RJ01 Rejection of invention patent application after publication