CN109981715B - Session management method and device - Google Patents

Session management method and device Download PDF

Info

Publication number
CN109981715B
CN109981715B CN201711461169.7A CN201711461169A CN109981715B CN 109981715 B CN109981715 B CN 109981715B CN 201711461169 A CN201711461169 A CN 201711461169A CN 109981715 B CN109981715 B CN 109981715B
Authority
CN
China
Prior art keywords
session
key value
record table
updating
record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711461169.7A
Other languages
Chinese (zh)
Other versions
CN109981715A (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.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile 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 China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201711461169.7A priority Critical patent/CN109981715B/en
Publication of CN109981715A publication Critical patent/CN109981715A/en
Application granted granted Critical
Publication of CN109981715B publication Critical patent/CN109981715B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Abstract

The invention provides a method and a device for session management, which are used for solving the problems of poor real-time performance of business transaction, low efficiency of system resource utilization and the like in the prior art. The method comprises the following steps: scanning the session updating record table according to the session scanning rule, determining first session updating time meeting first set conditions, and determining a corresponding first session key value according to the first session updating time; searching a first session detailed record corresponding to the first session key value in a session detailed record table according to the first session key value, wherein the session detailed record table comprises session detailed information and the corresponding session key value; performing exception analysis on the first session detailed record according to an exception session rule to determine exception session information; and writing the abnormal session information into an abnormal session information table, and clearing the first session detailed record in the session detailed record table.

Description

Session management method and device
Technical Field
The present invention relates to the field of wireless communications technologies, and in particular, to a method and an apparatus for session management.
Background
With the development of wireless communication technology, the real-time requirement on the session service transaction is higher and higher, so that the difficulty of session management is increased. The session management method based on the physical library adopted in the prior art is only suitable for services with small traffic and low real-time requirements, and cannot meet the requirements of services with large traffic and obvious fault location requirements. Specifically, the method in the prior art cannot timely discover and process abnormal sessions in real-time sessions, so that services cannot be used; the invalid session data can not be effectively eliminated, a large amount of system resources are occupied, the real-time performance of business transaction is influenced, and the utilization efficiency of the system resources is influenced.
In summary, how to manage abnormal session and invalid session data, maintain continuity of service usage, improve real-time performance of service transaction, and improve utilization rate of system resources is a problem to be solved at present.
Disclosure of Invention
The invention provides a method and a device for session management, which are used for solving the problems of poor real-time performance of business transaction, low efficiency of system resource utilization and the like in the prior art.
In a first aspect, an embodiment of the present invention provides a session management method, including: scanning a session updating record table according to a session scanning rule, wherein the session updating record table comprises session updating time and a corresponding session key value; determining first session updating time meeting a first set condition, and determining a corresponding first session key value according to the first session updating time; searching a first session detailed record corresponding to the first session key value in a session detailed record table according to the first session key value, wherein the session detailed record table comprises session detailed information and the corresponding session key value; performing exception analysis on the first session detailed record according to an exception session rule to determine exception session information; and writing the abnormal session information into an abnormal session information table, and clearing the first session detailed record in the session detailed record table.
Optionally, after determining a first session update time meeting a first set condition and determining a corresponding first session key value according to the first session update time, the method further includes: and clearing the session update record corresponding to the first session update time in the session update record table.
Optionally, before scanning the session update record table according to the session scanning rule, the method further includes: and receiving a scanning triggering instruction.
Optionally, the session key is a session unique code ID.
Optionally, the updating process of the session detail record table is as follows: receiving an interface message sent by a session service initiator, wherein the interface message comprises a session initial request message or a session updating request; analyzing the interface message according to a multi-layer protocol; extracting messages related to session management in the analyzed interface messages, wherein the messages related to session management comprise second session detailed information and second session key values; according to a first set algorithm, the second session key value is quickly searched in the session detailed record table stored in the distributed memory bank; if the second session key value is not found in the session detailed record table, inserting the second session key value, second session detailed information corresponding to the second session key value and the current time of the inserting operation into the session detailed record table; and if the second session key value is found in the session detailed record table, replacing the session detailed information corresponding to the second session key value in the session detailed record with the second session detailed information corresponding to the second session key value, and reading the timestamp of the last updating operation and the time of the current updating operation.
Optionally, if the second session key value is found in the session detail record table, replacing the session detail information corresponding to the second session key value in the session detail record with the second session detail information corresponding to the second session key value, and reading the timestamp of the last update operation and the time of the current update operation, where the update process of the session update record table is as follows: searching a session updating record corresponding to the second session key value in the session updating record table according to the second session key value and the last updating operation timestamp and according to a second algorithm, and deleting the session updating record; and inserting the time of the current updating operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
Optionally, if the second session key value is not found in the session detail record table, the second session key value, second session detail information corresponding to the second session key value, and the current time of the inserting operation are inserted into the session detail record table, and the updating process of the session update record table is as follows: and inserting the current time of the inserting operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
In a second aspect, an embodiment of the present invention provides an apparatus for session management, including: the scanning module is used for scanning a session updating record table according to a session scanning rule, wherein the session updating record table comprises session updating time and a corresponding session key value; the determining module is used for determining first session updating time meeting a first set condition and determining a corresponding first session key value according to the first session updating time; the searching module is used for searching a first session detailed record corresponding to the first session key value in a session detailed record table according to the first session key value, wherein the session detailed record table comprises session detailed information and the corresponding session key value; the analysis module is used for carrying out abnormal analysis on the first session detailed record according to an abnormal session rule to determine abnormal session information; and the processing module is used for writing the abnormal session information into an abnormal session information table and clearing the first session detailed record in the session detailed record table.
Optionally, after determining a first session update time meeting a first set condition and determining a corresponding first session key value according to the first session update time, the apparatus further includes a clearing module: and the session update record corresponding to the first session update time is cleared from the session update record table.
Optionally, before scanning the session update record table according to the session scanning rule, the apparatus further includes a receiving module: for receiving a scan trigger instruction.
Optionally, the session key is a session unique code ID.
Optionally, the update process of the session detail record table is processed by the following modules included in the apparatus: the receiving module is used for receiving an interface message sent by a session service initiator, wherein the interface message comprises a session initial request message or a session updating request; the analysis module is used for analyzing the interface message according to a multi-layer protocol; the extracting module is used for extracting the analyzed messages related to session management in the interface messages, wherein the messages related to session management comprise second session detailed information and second session key values; the searching module is configured to perform fast searching on the second session key value in the session detail record table stored in the distributed memory bank according to a first setting algorithm; the processing module is further configured to insert the second session key value, second session detail information corresponding to the second session key value, and current insertion operation time into the session detail record table if the second session key value is not found in the session detail record table; the processing module is further configured to, if the second session key value is found in the session detail record table, replace the session detail information corresponding to the second session key value in the session detail record with the second session detail information corresponding to the second session key value, and read the timestamp of the last update operation and the time of the current update operation.
Optionally, if the second session key value is found in the session detail record table, replacing the session detail information corresponding to the second session key value in the session detail record with the second session detail information corresponding to the second session key value, and reading the timestamp of the last update operation and the time of the current update operation, where the update process of the session update record table is processed by the processing module included in the apparatus: searching a session updating record corresponding to the second session key value in the session updating record table according to the second session key value and the last updating operation timestamp and according to a second algorithm, and deleting the session updating record; and inserting the time of the current updating operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
Optionally, if the second session key is not found in the session detail record table, the second session key, second session detail information corresponding to the second session key, and time of a current insertion operation are inserted into the session detail record table, and an update process of the session update record table is processed by the processing module included in the apparatus: and inserting the current time of the inserting operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
In a third aspect, an embodiment of the present invention provides a non-volatile computer storage medium, where the computer storage medium stores an executable program, and the executable program is executed by a processor to implement any of the steps of the session management method.
In a fourth aspect, an embodiment of the present invention provides a computing device, including a memory, a processor, and a computer program stored on the memory, where the processor implements any of the above-mentioned steps of the session management method when executing the program.
The method and the device for session management provided by the embodiment of the invention have the following beneficial effects: determining a first session update time meeting a first set condition and a corresponding session key value according to the session scanning rule, the corresponding first session detailed record can be quickly searched in the session detailed record table according to the first session key value, the real-time performance of the business transaction is improved, according to abnormal conversation rule, determining abnormal conversation information, writing said abnormal conversation information into abnormal conversation information table, determining and recording abnormal conversation, namely, the service which can not be used is determined, the abnormal session information is cleared when the detailed record of the first session is cleared subsequently, so that the session is normally used, and the recorded abnormal session information can be analyzed to cause the abnormal session, and the first session detailed record is cleared in the session detailed record table, so that the invalid session data is effectively cleared, the system resources are saved, and the resource utilization efficiency is improved.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
fig. 1 is a flowchart of a session management method according to an embodiment of the present invention;
fig. 2 is a flowchart of another session management method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a session management apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a computing device according to an embodiment of the present invention.
Detailed Description
The following describes the session management method and apparatus provided in the embodiments of the present invention in detail with reference to specific embodiments.
In the embodiments of the present invention, the references to "first" and "second" are merely for distinguishing and are not limited to the order.
Detailed description of the preferred embodiment
As shown in fig. 1, a method for session management according to a first embodiment of the present invention includes the following steps:
step 101, scanning a session update record table according to a session scanning rule, wherein the session update record table includes session update time and a corresponding session key value.
Specifically, the session scanning rule includes, but is not limited to, a trigger condition, a scanning object, a scanning start position, and a scanning end condition.
The session key value is a unique field in the session, preferably, the unique code (ID) of the session is selected as the session key value, the session update record table is a skip (skip) table, and the skip table is a hash (HASHMAP) memory table.
And 102, determining first session updating time meeting a first set condition, and determining a corresponding first session key value according to the first session updating time.
Specifically, the sessions in the session update record table are sorted according to the update time, the sessions are scanned forward in sequence from the tail of the session update record table, the scanning is stopped when the records meeting the end condition are scanned, and the first session update time meeting the first set condition is determined in the scanning process, where the tail of the session update record table is a position corresponding to the record of the session with the longest interval between the update time and the current time, and the end condition may be that the time interval between the update time and the current time is less than T, and T is expiration time.
Step 103, finding a first session detailed record corresponding to the first session key value in a session detailed record table according to the first session key value, where the session detailed record table includes session detailed information and the corresponding session key value.
Specifically, the session detail information includes, but is not limited to, a session unique code ID, a session sequence number, a session request type, a client ID, a type of a segment service carried in a session, and the like, the session detail list is a HASH map memory table, and the session unique code ID is used as a session key value, which may also be referred to as a HASH key value.
And 104, performing exception analysis on the first session detailed record according to an exception session rule to determine exception session information.
The exception rule includes response timeout, update timeout, end timeout, response exception, request sequence number disorder, and the like, and the exception rule is not limited in the present application.
And 105, writing the abnormal session information into an abnormal session information table, and clearing the first session detailed record in the session detailed record table.
Specifically, the abnormal session information is written into the abnormal session information table, the session record corresponding to the abnormal session information in the session detailed record table is cleared, and for a normal session, the session record corresponding to the clearer is directly cleared in the session detailed record table, that is, the first session detailed record is finally cleared in the session detailed record table.
The session management method provided by the embodiment of the invention has the following beneficial effects: determining a first session update time meeting a first set condition and a corresponding session key value according to the session scanning rule, the corresponding first session detailed record can be quickly searched in the session detailed record table according to the first session key value, the real-time performance of the business transaction is improved, according to abnormal conversation rule, determining abnormal conversation information, writing said abnormal conversation information into abnormal conversation information table, determining and recording abnormal conversation, namely, the service which can not be used is determined, the abnormal session information is cleared when the detailed record of the first session is cleared subsequently, so that the session is normally used, and the recorded abnormal session information can be analyzed to cause the abnormal session, and the first session detailed record is cleared in the session detailed record table, so that the invalid session data is effectively cleared, the system resources are saved, and the resource utilization efficiency is improved.
As a possible implementation manner, after step 102, the session update record corresponding to the first session update time is cleared in the session update record table.
As a possible implementation, before step 101, a scan trigger instruction is received.
Specifically, the trigger condition corresponding to the scan trigger instruction may be to perform scanning every 10 minutes.
Detailed description of the invention
As shown in fig. 2, another session management method according to a second embodiment of the present invention is described, which includes the following steps:
step 201, receiving an interface message sent by a session service initiator, where the interface message includes a session initiation request message or a session update request message.
And temporarily storing all contents of the interface message in a cache according to a tree structure.
Step 202, analyzing the interface message according to a multi-layer protocol.
Specifically, the interface message is analyzed layer by layer according to a multi-layer Protocol, where the Protocol includes, but is not limited to, an ethernet frame Protocol, a Transmission Control Protocol (TCP)/Internet Protocol (Internet Protocol, IP), a Data Communication (DCC) Protocol, and the like.
Step 203, extracting the analyzed messages related to session management from the interface messages, where the messages related to session management include second session detailed information and a second session key value.
And 204, quickly searching the second session key value in the session detail record table stored in the distributed memory bank according to a first setting algorithm.
Wherein, the first setting algorithm may be a HASHMAP algorithm.
The method adopts the distributed memory banks for data storage, and can improve the real-time performance of business transaction.
Step 2041, if the second session key value is not found in the session detail record table, inserting the second session key value, second session detail information corresponding to the second session key value, and current time of the inserting operation into the session detail record table.
Step 2042, if the second session key value is found in the session detail record table, replacing the session detail information corresponding to the second session key value in the session detail record with the second session detail information corresponding to the second session key value, and reading the timestamp of the last update operation and the time of the current update operation.
Step 2051, after step 2041, insert the time of the current insert operation corresponding to the second session detail information into a new session update record according to the current timestamp and the second algorithm.
Wherein the second algorithm may be a skiplist technique.
Step 2052, after the step 2042, finding a session update record corresponding to the second session key value in the session update record table according to the second session key value and the last update operation timestamp and according to a second algorithm, and deleting the session update record.
Step 2053, after the step 2052, inserting the time of the current update operation corresponding to the second session detail information into a new session update record according to the current timestamp and the second algorithm.
In the embodiment of the application, when a single process is applied, the tail part of the session update record table can be directly positioned, and the latest session update record is inserted; when the application is multi-process concurrent processing, a session update record table is searched by using a skip technology and the current timestamp, and when the position corresponding to the current timestamp is searched, the latest session update record is inserted.
Detailed description of the preferred embodiment
A third embodiment of the present invention provides a session management apparatus, as shown in fig. 3, including:
the scanning module 301 is configured to scan a session update record table according to a session scanning rule, where the session update record table includes session update time and a corresponding session key value.
The determining module 302 is configured to determine a first session update time meeting a first set condition, and determine a corresponding first session key value according to the first session update time.
The searching module 303 is configured to search, according to the first session key value, a first session detail record corresponding to the first session key value in a session detail record table, where the session detail record table includes session detail information and the corresponding session key value.
And the analysis module 304 is configured to perform anomaly analysis on the first session detail record according to an anomaly session rule, and determine anomaly session information.
The processing module 305 is configured to write the abnormal session information into an abnormal session information table, and clear the first session detail record in the session detail record table.
As a possible implementation, the apparatus further includes a clearing module: and the session update record corresponding to the first session update time is cleared from the session update record table.
As a possible implementation, the apparatus further includes a receiving module: for receiving a scan trigger instruction.
As a possible implementation, the session key is a session unique code ID.
As a possible implementation manner, the update process of the session detail record table is processed by the following modules included in the apparatus: the receiving module is used for receiving an interface message sent by a session service initiator, wherein the interface message comprises a session initial request message or a session updating request; the analysis module is used for analyzing the interface message according to a multi-layer protocol; the extracting module is used for extracting the analyzed messages related to session management in the interface messages, wherein the messages related to session management comprise second session detailed information and second session key values; the searching module is configured to perform fast searching on the second session key value in the session detail record table stored in the distributed memory bank according to a first setting algorithm; finding; the processing module is further configured to insert the second session key value, second session detail information corresponding to the second session key value, and current insertion operation time into the session detail record table if the second session key value is not found in the session detail record table; the processing module is further configured to, if the second session key value is found in the session detail record table, replace the session detail information corresponding to the second session key value in the session detail record with the second session detail information corresponding to the second session key value, and read the timestamp of the last update operation and the time of the current update operation.
As a possible implementation manner, the update process of the session update record table is processed by the processing module included in the apparatus: searching a session updating record corresponding to the second session key value in the session updating record table according to the second session key value and the last updating operation timestamp and according to a second algorithm, and deleting the session updating record; and inserting the time of the current updating operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
As a possible implementation manner, the update process of the session update record table is processed by the processing module included in the apparatus: and inserting the current time of the inserting operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
The session management device provided by the embodiment of the invention has the following beneficial effects: determining a first session update time meeting a first set condition and a corresponding session key value according to the session scanning rule, the corresponding first session detailed record can be quickly searched in the session detailed record table according to the first session key value, the real-time performance of the business transaction is improved, according to abnormal conversation rule, determining abnormal conversation information, writing said abnormal conversation information into abnormal conversation information table, determining and recording abnormal conversation, namely, the service which can not be used is determined, the abnormal session information is cleared when the detailed record of the first session is cleared subsequently, so that the session is normally used, and the recorded abnormal session information can be analyzed to cause the abnormal session, and the first session detailed record is cleared in the session detailed record table, so that the invalid session data is effectively cleared, the system resources are saved, and the resource utilization efficiency is improved.
The embodiment of the present invention further provides a nonvolatile computer storage medium, where an executable program is stored in the computer storage medium, and the executable program is executed by a processor to implement any of the steps of the method provided in the first embodiment.
An embodiment of the present invention further provides a computing device, configured to execute the session management method according to any one of the first and second embodiments, as shown in fig. 4, which is a schematic diagram of a hardware structure of the computing device according to the third embodiment of the present invention, where the computing device may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, and the like. The computing device may comprise a memory 401, a processor 402, and a computer program stored on the memory, which when executed by the processor, performs the steps of the method of the first embodiment. Memory 401 may include, among other things, Read Only Memory (ROM) and Random Access Memory (RAM), and provides the processor 402 with program instructions and data stored in the memory 401.
Further, the computing device may further include an input device 403, an output device 404, and the like. The input device 403 may include a keyboard, mouse, touch screen, etc.; the output device 404 may include a Display device such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), or the like. The memory 401, the processor 402, the input device 403 and the output device 404 may be connected by a bus or other means, and fig. 4 illustrates an example of a connection by a bus.
The processor 402 calls the program instructions stored in the memory 401 and executes the method of session management provided in the first and second embodiments according to the obtained program instructions.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A method of session management, comprising:
scanning a session updating record table according to a session scanning rule, wherein the session updating record table comprises session updating time and a corresponding session key value;
determining first session updating time meeting a first set condition, and determining a corresponding first session key value according to the first session updating time;
searching a first session detailed record corresponding to the first session key value in a session detailed record table according to the first session key value, wherein the session detailed record table comprises session detailed information and the corresponding session key value;
performing exception analysis on the first session detailed record according to an exception session rule to determine exception session information;
writing the abnormal session information into an abnormal session information table, and clearing the first session detailed record in the session detailed record table;
wherein, the updating process of the session detail record table is as follows:
receiving an interface message sent by a session service initiator, wherein the interface message comprises a session initial request message or a session updating request;
analyzing the interface message according to a multi-layer protocol;
extracting messages related to session management in the analyzed interface messages, wherein the messages related to session management comprise second session detailed information and second session key values;
according to a first set algorithm, the second session key value is quickly searched in the session detailed record table stored in the distributed memory bank;
if the second session key value is not found in the session detailed record table, inserting the second session key value, second session detailed information corresponding to the second session key value and the current time of the inserting operation into the session detailed record table;
and if the second session key value is found in the session detailed record table, replacing the session detailed information corresponding to the second session key value in the session detailed record with the second session detailed information corresponding to the second session key value, and reading the timestamp of the last updating operation and the time of the current updating operation.
2. The method of claim 1, wherein a first session update time meeting a first set condition is determined, and after a corresponding first session key value is determined according to the first session update time, the method further comprises:
and clearing the session update record corresponding to the first session update time in the session update record table.
3. The method of claim 1, wherein prior to scanning the session update record table according to the session scanning rules, the method further comprises:
and receiving a scanning triggering instruction.
4. A method according to any one of claims 1-3, wherein the session key is a session unique code ID.
5. The method according to claim 1, wherein if the second session key is found in the session detail record table, replacing the session detail information corresponding to the second session key in the session detail record with the second session detail information corresponding to the second session key, and reading a timestamp of a last update operation and a time of a current update operation, and an update process of the session update record table is:
searching a session updating record corresponding to the second session key value in the session updating record table according to the second session key value and the last updating operation timestamp and according to a second algorithm, and deleting the session updating record;
and inserting the time of the current updating operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
6. The method according to claim 5, wherein if the second session key is not found in the session detail record table, the second session key, the second session detail information corresponding to the second session key, and the current time of the inserting operation are inserted into the session detail record table, and an updating process of the session update record table is as follows:
and inserting the current time of the inserting operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
7. An apparatus for session management, comprising:
the scanning module is used for scanning a session updating record table according to a session scanning rule, wherein the session updating record table comprises session updating time and a corresponding session key value;
the determining module is used for determining first session updating time meeting a first set condition and determining a corresponding first session key value according to the first session updating time;
the searching module is used for searching a first session detailed record corresponding to the first session key value in a session detailed record table according to the first session key value, wherein the session detailed record table comprises session detailed information and the corresponding session key value;
the analysis module is used for carrying out abnormal analysis on the first session detailed record according to an abnormal session rule to determine abnormal session information;
the processing module is used for writing the abnormal session information into an abnormal session information table and clearing the first session detailed record in the session detailed record table;
wherein, the device also comprises a receiving module; the updating process of the session detail record table is processed by the following modules contained in the device:
the receiving module is used for receiving an interface message sent by a session service initiator, wherein the interface message comprises a session initial request message or a session updating request;
the analysis module is used for analyzing the interface message according to a multi-layer protocol;
the extracting module is used for extracting the analyzed messages related to session management in the interface messages, wherein the messages related to session management comprise second session detailed information and second session key values;
the searching module is configured to perform fast searching on the second session key value in the session detail record table stored in the distributed memory bank according to a first setting algorithm;
the processing module is further configured to insert the second session key value, second session detail information corresponding to the second session key value, and current insertion operation time into the session detail record table if the second session key value is not found in the session detail record table;
the processing module is further configured to, if the second session key value is found in the session detail record table, replace the session detail information corresponding to the second session key value in the session detail record with the second session detail information corresponding to the second session key value, and read the timestamp of the last update operation and the time of the current update operation.
8. The apparatus of claim 7, wherein a first session update time meeting a first set condition is determined, and after a corresponding first session key value is determined according to the first session update time, the apparatus further comprises a clearing module:
and the session update record corresponding to the first session update time is cleared from the session update record table.
9. The apparatus of claim 7, wherein prior to scanning a session update record table according to session scanning rules, the receiving module:
for receiving a scan trigger instruction.
10. The apparatus of any one of claims 7-9, wherein the session key is a session unique code ID.
11. The apparatus according to claim 7, wherein if the second session key is found in the session detail record table, replacing the session detail information corresponding to the second session key in the session detail record with the second session detail information corresponding to the second session key, and reading a timestamp of a last update operation and a time of a current update operation, an update process of the session update record table is processed by the processing module included in the apparatus:
searching a session updating record corresponding to the second session key value in the session updating record table according to the second session key value and the last updating operation timestamp and according to a second algorithm, and deleting the session updating record;
and inserting the time of the current updating operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
12. The apparatus according to claim 11, wherein if the second session key is not found in the session detail record table, the second session key, the second session detail information corresponding to the second session key, and the current time of the inserting operation are inserted into the session detail record table, and an updating process of the session update record table is processed by the processing module included in the apparatus:
and inserting the current time of the inserting operation corresponding to the second session detailed information into a new session updating record according to the current timestamp and the second algorithm.
13. A non-transitory computer storage medium storing an executable program for execution by a processor to perform the steps of the method of any one of claims 1 to 6.
14. A computing device comprising a memory, a processor and a computer program stored on the memory, the processor implementing the steps of the method of any of claims 1 to 6 when executing the program.
CN201711461169.7A 2017-12-28 2017-12-28 Session management method and device Active CN109981715B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711461169.7A CN109981715B (en) 2017-12-28 2017-12-28 Session management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711461169.7A CN109981715B (en) 2017-12-28 2017-12-28 Session management method and device

Publications (2)

Publication Number Publication Date
CN109981715A CN109981715A (en) 2019-07-05
CN109981715B true CN109981715B (en) 2021-11-16

Family

ID=67074802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711461169.7A Active CN109981715B (en) 2017-12-28 2017-12-28 Session management method and device

Country Status (1)

Country Link
CN (1) CN109981715B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761056A (en) * 2021-04-07 2021-12-07 西安京迅递供应链科技有限公司 Distributed service processing method, device and system
CN114363395A (en) * 2021-12-31 2022-04-15 深圳金蝶账无忧网络科技有限公司 Session processing method, device and computer readable storage medium
CN114422576B (en) * 2022-01-24 2024-02-06 深圳壹账通智能科技有限公司 Session cleaning method and device, computer equipment and readable storage medium
CN115361433A (en) * 2022-07-27 2022-11-18 北京仁科互动网络技术有限公司 Session ending method and device based on blocking queue and electronic equipment
CN115633076B (en) * 2022-12-19 2023-03-14 亿海蓝(北京)数据技术股份公司 Session management method and system, readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034056A (en) * 2015-03-18 2016-10-19 北京启明星辰信息安全技术有限公司 Service safety analysis method and system thereof
CN106919844A (en) * 2017-02-14 2017-07-04 暨南大学 A kind of android system vulnerability of application program detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9167082B2 (en) * 2013-09-22 2015-10-20 Steven Wayne Goldstein Methods and systems for voice augmented caller ID / ring tone alias

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034056A (en) * 2015-03-18 2016-10-19 北京启明星辰信息安全技术有限公司 Service safety analysis method and system thereof
CN106919844A (en) * 2017-02-14 2017-07-04 暨南大学 A kind of android system vulnerability of application program detection method

Also Published As

Publication number Publication date
CN109981715A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN109981715B (en) Session management method and device
CN109873904B (en) User message state reporting processing method, device and storage medium for message pushing
CN107832406B (en) Method, device, equipment and storage medium for removing duplicate entries of mass log data
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
US20180027061A1 (en) Method and apparatus for elastically scaling virtual machine cluster
CN111414389B (en) Data processing method and device, electronic equipment and storage medium
US10084637B2 (en) Automatic task tracking
CN110019873B (en) Face data processing method, device and equipment
CN110445828B (en) Data distributed processing method based on Redis and related equipment thereof
US10031948B1 (en) Idempotence service
CN106034113A (en) Data processing method and data processing device
CN106528866A (en) Method, device and system for updating metadata
US20160124783A1 (en) Tracking asynchronous entry points for an application
CN104503983A (en) Method and device for providing website certification data for search engine
CN110955390A (en) Data processing method and device and electronic equipment
CN114285838A (en) File uploading method, device, system, storage medium and electronic equipment
CN108241616B (en) Message pushing method and device
CN110222046B (en) List data processing method, device, server and storage medium
CN111294377B (en) Dependency network request sending method, terminal device and storage medium
CN106557262B (en) Data processing method and device
US11216352B2 (en) Method for automatically analyzing bottleneck in real time and an apparatus for performing the method
CN109389271B (en) Application performance management method and system
CN112818204B (en) Service processing method, device, equipment and storage medium
CN111913996B (en) Data processing method, device, equipment and storage medium
CN114138786A (en) Method, device, medium, product and equipment for duplicate removal of online transaction message

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
CB02 Change of applicant information

Address after: 518048, 10 floor, Guo Tong Building, 9023 Binhe Road, Futian District, Shenzhen, Guangdong.

Applicant after: CHINA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant after: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

Address before: 518048, 10 floor, Guo Tong Building, 9023 Binhe Road, Futian District, Shenzhen, Guangdong.

Applicant before: CHINA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: China Mobile Communications Corp.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200330

Address after: Room 1006, building 16, yard 16, Yingcai North Third Street, future science city, Changping District, Beijing 102209

Applicant after: China Mobile Information Technology Co.,Ltd.

Applicant after: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

Address before: 518048, 10 floor, Guo Tong Building, 9023 Binhe Road, Futian District, Shenzhen, Guangdong.

Applicant before: CHINA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: CHINA MOBILE COMMUNICATIONS GROUP Co.,Ltd.

GR01 Patent grant
GR01 Patent grant