CN115633076A - Session management method and system, readable storage medium - Google Patents
Session management method and system, readable storage medium Download PDFInfo
- Publication number
- CN115633076A CN115633076A CN202211629237.7A CN202211629237A CN115633076A CN 115633076 A CN115633076 A CN 115633076A CN 202211629237 A CN202211629237 A CN 202211629237A CN 115633076 A CN115633076 A CN 115633076A
- Authority
- CN
- China
- Prior art keywords
- session
- user
- records
- record
- newly generated
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M3/00—Automatic or semi-automatic exchanges
- H04M3/22—Arrangements for supervision, monitoring or testing
- H04M3/2218—Call detail recording
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a session management method, a system and a readable storage medium, which belong to the technical field of session management, wherein the session management method comprises the following steps: acquiring a session history record; dividing users into a plurality of conversation groups according to the activeness of the conversation history record; monitoring whether the session state of the session group changes in real time; if the change occurs, recording a new generated session record of each user of the session group; acquiring a newly generated session record and a session drop record complementary to the newly generated session record within a defined time, wherein the defined time comprises a plurality of time periods; recording is performed according to the number of newly generated session records and the number of session drop records, and overlapping portions of the newly generated session records are merged. Through the technical scheme, the on-line statistical efficiency of the sessions can be improved, the storage resources are saved, and the mapping efficiency is improved.
Description
Technical Field
The present application relates to the field of session management technologies, and in particular, to a session management method and system, and a readable storage medium.
Background
In the session management in the prior art, a discrete recording mode is adopted for an individual session, and related information such as the starting time and the ending time of an ID session of each session is recorded, and all sessions need to be traversed when statistical query is carried out on online user information at a certain moment in the using process, so that a large amount of computing resources are wasted, a large amount of time is spent, and the session management efficiency is low.
Disclosure of Invention
The present application aims to solve or improve the above technical problems.
To this end, a first object of the present application is to provide a session management method.
A second object of the present application is to provide a session management system.
A third object of the present application is to provide a session management system.
A fourth object of the present application is to provide a readable storage medium.
To achieve the first object of the present application, a technical solution of a first aspect of the present application provides a session management method, including: acquiring a session history record; dividing users into a plurality of conversation groups according to the activeness of the conversation history record; monitoring whether the session state of the session group changes in real time; if the change occurs, recording a new generated session record of each user of the session group; acquiring a newly generated session record and a session drop record complementary to the newly generated session record within a defined time, wherein the defined time comprises a plurality of time periods; recording according to the number of the newly generated session records and the number of the session drop records, and combining the overlapped parts of the newly generated session records; the recording according to the number of the newly generated session records and the number of the session drop records, and combining the overlapping portions of the newly generated session records specifically includes: judging whether the number of newly generated session records in a time period is greater than the number of session drop records; if so, recording a session drop record in the time period; if not, recording a new generation session record in the time period; judging whether the newly generated session records are overlapped; if yes, merging and recording the overlapped part of the newly generated session record.
According to the session management method provided by the application, the session history record is obtained firstly, the users are divided into a plurality of session groups according to the activity of the session history record, and thus the sessions obtained by the users are converted from the sessions with the corresponding mapping relationship obtained from the whole session into the sessions with the mapping relationship obtained from the single group. And monitoring whether the session state of the session group changes in real time, and if so, recording a newly generated session record of each user of the session group. That is, each session will not be recorded separately within the same group, but rather the duration of time that all session states persist until any session state within the group changes, generating a new record. The sessions in the group are fixed within a defined time, a complementary relation exists among the sessions, only session records with a few states are recorded, and data storage is optimized. By grouping according to the activity and recording only the session records with a few states in the group in a mode of complementary session records in the group, the overlapped parts of the session records are merged and recorded, and the storage resources are greatly saved. And the efficiency of online statistics of the sessions at the same time is improved, and the statistical result can be quickly output only by inquiring the completed online statistics of the sessions in the packets and performing simple accumulation calculation. The original mapping relation of matching users and sessions one by one is converted into the mapping matching of the session groups which are matched first, so that the mapping efficiency is greatly improved.
The method includes recording according to the number of newly generated session records and the number of session drop records, and combining overlapping portions of the newly generated session records, specifically, judging whether the number of the newly generated session records in a time period is greater than the number of the session drop records, if so, recording the session drop records in the time period, and if not, recording the newly generated session records in the time period. And only the session records with few states in the group are recorded in a mode of complementary session records in the group, so that the storage resource is saved.
Further, recording according to the number of the newly generated session records and the number of the session drop records, and merging the overlapped parts of the newly generated session records, and judging whether the newly generated session records are overlapped, if so, merging and recording the overlapped parts of the newly generated session records. By merging records for the overlapping portions of the newly generated session records, storage resources are conserved.
In addition, the technical scheme provided by the application can also have the following additional technical characteristics:
in the above technical scheme, the meeting is generated according to the new meetingRecording the number of the session records and the number of the session drop records, and combining the overlapping parts of the newly generated session records, specifically comprising: assume that a conversation group includes a conversation groupConversation groupConversation groupConversation group,Conversation groupConversation groupIncluding the userUser, userUser, userUser, userUser, userDefining time includes time pointsTime pointTime pointTime point,Time point of(ii) a In a period of timeUser' sTime period when newly generated session record is generatedUserUser, userUser, userUser, userGenerating a session drop record for a period of timeUserFor use inHouseUser, userTime period when newly generated session record is generatedUserUser, userGenerating a session drop record for a period of timeUserTime period when newly generated session record is generatedUser' sUser, userUser, userUser, userGenerating a session drop record for a period of timeUser' sUser, userUser, userUser, userTime period when newly generated session record is generatedUserGenerating a session drop record; are compared in time periodsTime periodTime period ofAnd time periodNewly generating the number of session records and session drop records, and recording the party with the smaller number in the session records and the session drop records; then the conversation groupIs recorded as,,、(ii) a Wherein the content of the first and second substances,a group of sessions is represented and,which represents the point in time of the presentation of,representing the user.
In the technical scheme, the intra-group sessions are fixed within the defined time, the sessions have complementary relation, only session records with few states are recorded, and data storage is optimizedWill generate,,、Thus, when a conversation is ongoing while the system is online, e.g. when the system is onlineThe records can be directly derivedInternal removing deviceIn addition, the air conditioner is provided with a fan,、、、in thatToThe session is online at the same time in a time period, and so on if the statistics of online sessions at a certain time does not need to traverse all session recordsOnly different packets need to be queriedEfficient acquisition is possible.
In the above technical solution, the session management method further includes: and acquiring the session ID, matching the session ID with the session group, and acquiring the corresponding mapping relationship session from the session group.
In the technical solution, the session management method further includes obtaining a session ID, matching the session ID with a session group, and obtaining a corresponding mapping relationship session from the session group. The original mapping relationship of matching users and sessions one by one is converted into the mapping relationship, and the session groups are firstly matched for mapping and matching, so that the mapping efficiency is greatly improved.
In the above technical solution, dividing users into a plurality of session groups according to the liveness of the session history record specifically includes: grouping users into conversation groups based on liveness of conversation history recordsConversation groupConversation groupConversation group,Conversation group。
In the technical scheme, users are divided into conversation groups according to the liveness of the conversation history recordConversation groupConversation groupConversation group,Conversation groupThe original mapping relation between the users and the sessions which are matched one by one can be converted into the mapping relation, the session groups are matched firstly, and the mapping matching is carried out, so that the mapping efficiency is improved.
In the above technical solution, the session management method further includes: and outputting a recording result through accumulation calculation.
According to the technical scheme, recording is carried out according to the number of newly generated session records and the number of session drop records, and a statistical result can be rapidly output by carrying out simple accumulation calculation.
To achieve the second object of the present application, a technical solution of a second aspect of the present application provides a session management system, including: the first acquisition module is used for acquiring a session history record; the conversation group dividing module is used for dividing the users into a plurality of conversation groups according to the activity of the conversation history record; the monitoring module is used for monitoring whether the session state of the session group changes in real time; a new session recording module for recording a new generated session record for each user of the session group; the second acquisition module is used for acquiring a newly generated session record and a session drop record which is complementary to the newly generated session record within a defined time, wherein the defined time comprises a plurality of time periods; the complementary merging recording module is configured to record according to the number of newly generated session records and the number of dropped session records, and merge an overlapping portion of the newly generated session records, where recording is performed according to the number of newly generated session records and the number of dropped session records, and merge an overlapping portion of the newly generated session records, and specifically includes: judging whether the number of newly generated session records in a time period is greater than the number of session drop records; if so, recording a session drop record in the time period; if not, recording a new generated session record in the time period; judging whether the newly generated session records are overlapped; if yes, merging and recording the overlapped part of the newly generated session record.
The session management system provided by the application comprises a first acquisition module, a session group division module, a monitoring module, a new session recording module, a second acquisition module and a complementary merging recording module. The first obtaining module is used for obtaining the session history record. The conversation group dividing module is used for dividing the users into a plurality of conversation groups according to the activeness of the conversation history record. The monitoring module is used for monitoring whether the session state of the session group changes in real time. The new session recording module is used to record a newly generated session record for each user of the session group. The second acquisition module is used for acquiring a newly generated session record and a session drop record complementary to the newly generated session record within a defined time, wherein the defined time comprises a plurality of time periods. The complementary merging recording module is used for recording according to the number of the newly generated session records and the number of the session drop records, and merging the overlapped parts of the newly generated session records, wherein the recording is performed according to the number of the newly generated session records and the number of the session drop records, and the merging of the overlapped parts of the newly generated session records specifically comprises judging whether the number of the newly generated session records in the time period is greater than the number of the session drop records, if so, recording the session drop records in the time period, if not, recording the newly generated session records in the time period, judging whether the newly generated session records are overlapped, and if so, merging and recording the overlapped parts of the newly generated session records. By grouping according to the activity and recording only the session records with few states in the group in a mode of complementary session records in the group, the overlapped parts of the session records are merged and recorded, and the storage resources are greatly saved. And the efficiency of session on-line statistics is improved, and the statistical result can be quickly output only by inquiring the completed session on-line statistics in the packet and performing simple accumulation calculation. The original mapping relation of matching users and sessions one by one is converted into the mapping matching of the session groups which are matched first, so that the mapping efficiency is greatly improved.
In the above technical solution, the session management system further includes: and the matching module is used for acquiring the session ID, matching the session ID with the session group and acquiring the corresponding mapping relation session from the session group.
In the technical scheme, the session management system further comprises a matching module, wherein the matching module is used for acquiring the session ID, matching the session ID with the session group, and acquiring the corresponding mapping relationship session from the session group.
In the above technical solution, the session management system further includes: and the calculating module is used for outputting a recording result through accumulation calculation.
In the technical scheme, the session management system further comprises a calculation module, and the calculation module is used for outputting the recording result through accumulation calculation.
To achieve the third object of the present application, a technical solution of the third aspect of the present application provides a session management system, including: the session management method according to any one of the first aspect of the present invention is implemented when the processor executes the program or the instruction, so that the session management method has the technical effects of any one of the first aspect of the present invention, and details are not described herein.
To achieve the fourth object of the present application, in a fourth aspect of the present application, a readable storage medium is provided, where a program or an instruction is stored, and the program or the instruction, when executed by a processor, implements the steps of the session management method in any one of the first aspect of the present application, so that the method has the technical effects of any one of the first aspect of the present application, and details are not described herein again.
Additional aspects and advantages of the present application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flowchart illustrating steps of a session management method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of a session management method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating steps of a session management method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating steps of a session management method according to an embodiment of the present application;
FIG. 5 is a block diagram illustrating a session management system according to an embodiment of the present application;
FIG. 6 is a block diagram illustrating a complementary merge recording module according to an embodiment of the present application;
FIG. 7 is a block diagram illustrating the structure of a session management system according to another embodiment of the present application;
FIG. 8 is a block diagram schematically illustrating a session management system according to another embodiment of the present application;
fig. 9 is a schematic view of a session record of a session management method according to an embodiment of the present application;
fig. 10 is a schematic view of a session record of a session management method according to an embodiment of the present application.
Wherein, the correspondence between the reference numbers and the part names in fig. 5 to 8 is:
10: a session management system; 110: a first acquisition module; 120: a conversation group division module; 130: a monitoring module; 140: a new session recording module; 150: a second acquisition module; 160: a complementary merging recording module; 170: a first judgment module; 180: a second judgment module; 190: a matching module; 200: a calculation module; 20: a session management system; 300: a memory; 400: a processor.
Detailed Description
In order that the above objects, features and advantages of the present application can be more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and detailed description. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, however, the present application may be practiced in other ways than those described herein, and therefore the scope of the present application is not limited by the specific embodiments disclosed below.
Session management methods and systems, and readable storage media, of some embodiments of the present application are described below with reference to fig. 1-10.
As shown in fig. 1, an embodiment of a first aspect of the present application provides a session management method, including the following steps:
step S102: acquiring a session history record;
step S104: dividing users into a plurality of conversation groups according to the liveness of the conversation history record; monitoring whether the session state of the session group changes in real time;
step S106: monitoring whether the session state of the session group changes in real time;
step S108: if the change occurs, recording a newly generated session record of each user of the session group;
step S110: acquiring a newly generated session record and a session drop record complementary to the newly generated session record within a defined time, wherein the defined time comprises a plurality of time periods;
step S112: and recording according to the number of the newly generated session records and the number of the call drop records, and combining the overlapped parts of the newly generated session records.
According to the session management method provided by the embodiment, the session history record is obtained firstly, and the users are divided into a plurality of session groups according to the activity of the session history record, so that the user obtaining sessions are converted from the sessions obtaining corresponding mapping relations from the whole session to the sessions obtaining mapping relations from the single group. And monitoring whether the session state of the session group changes or not in real time, and if so, recording a newly generated session record of each user of the session group. That is, each session will not be recorded separately within the same group, but rather the duration of time that all session states persist until any session state within the group changes, generating a new record. The sessions in the group are fixed within a defined time, the sessions have complementary relation, only session records with few states are recorded, and data storage is optimized. By grouping according to the activity and recording only the session records with a few states in the group in a mode of complementary session records in the group, the overlapped parts of the session records are merged and recorded, and the storage resources are greatly saved. And the efficiency of session on-line statistics is improved, and the statistical result can be quickly output only by inquiring the completed session on-line statistics in the packet and performing simple accumulation calculation. The original mapping relation of matching users and sessions one by one is converted into the mapping matching of the session groups which are matched first, so that the mapping efficiency is greatly improved.
As shown in fig. 2, the session management method according to an embodiment of the present application records according to the number of newly generated session records and the number of session drop records, and merges the overlapping portions of the newly generated session records, and specifically includes the following steps:
step S202: judging whether the number of newly generated session records in a time period is greater than the number of session drop records;
step S204: if so, recording a session drop record in the time period;
step S206: if not, recording a new generation session record in the time period.
In this embodiment, recording is performed according to the number of newly generated session records and the number of session drop records, and an overlapping portion of the newly generated session records is merged, specifically, it is determined whether the number of the newly generated session records in a time period is greater than the number of the session drop records, if so, the session drop records in the time period are recorded, and if not, the session records in the time period are newly generated. And only session records with a few states in the group are recorded by adopting a mode of complementary session records in the group, so that the storage resource is saved.
As shown in fig. 3, a session management method according to an embodiment of the present application, which performs recording according to the number of newly generated session records and the number of session drop records, and combines overlapping portions of the newly generated session records, further includes the following steps:
step S302: judging whether the newly generated session records are overlapped;
step S304: if yes, merging and recording the overlapped part of the newly generated session record.
In this embodiment, recording according to the number of newly generated session records and the number of session drop records, and merging overlapping portions of the newly generated session records, further includes determining whether the newly generated session records overlap, and if so, merging and recording the overlapping portions of the newly generated session records. By merging records for the overlapping portions of the newly generated session records, storage resources are conserved.
As shown in fig. 4, according to the session management method of an embodiment provided by the present application, the session management method further includes the following steps:
step S402: and acquiring the session ID, matching the session ID with the session group, and acquiring the corresponding mapping relationship session from the session group.
In this embodiment, the session management method further includes obtaining a session ID, matching the session ID with a session group, and obtaining a corresponding mapping relationship session from the session group. The original mapping relationship of matching users and sessions one by one is converted into the mapping relationship, and the session groups are firstly matched for mapping and matching, so that the mapping efficiency is greatly improved.
In some embodiments, it is assumed that the conversation group includes a conversation groupConversation groupConversation groupConversation group,Conversation groupConversation groupIncluding the userUser, userUser, userUser, userUser, userDefining time includes time pointsTime point ofTime point ofTime point,Time point of;
In a period of timeUser' sTime period when newly generated session record is generatedUser' sUser, userUser, userUser, userGenerating a session drop record for a period of timeUser' sUser, userUser, userTime period when newly generated session record is generatedUser' sUser, userGenerating a session drop record for a period of timeUser' sTime period when newly generated session record is generatedUser' sUser, userUser, userUser, userGenerating a session drop record for a period of timeUserUser, userUser, userUser, userTime period when newly generated session record is generatedUser' sGenerating a session drop record;
are compared in time periodsTime period ofTime period ofAnd time periodNewly generating the number of session records and session drop records, and recording the party with the smaller number in the session records and the session drop records;
Wherein the content of the first and second substances,a group of sessions is represented and,which represents the point in time of the display,representing the user.
It can be understood that the group session is fixed in the defined time, the complementary relation exists between the sessions, only the session record with the state of a few is recorded, and the data storage is optimizedWill generate,,、Thus, when a conversation is ongoing while the system is online, e.g. when the system is onlineThe records can be directly derivedInternal removing deviceBesides, the air conditioner is provided with a fan,、、、in thatTo is thatThe session is online at the same time in a time period, and so on if the statistics of online sessions at a certain time does not need to traverse all session recordsOnly different packets need to be queriedEfficient acquisition is possible.
As shown in fig. 5, an embodiment of the second aspect of the present application provides a session management system 10, including: a first obtaining module 110, configured to obtain a session history record; a conversation group division module 120 for dividing the users into a plurality of conversation groups according to the liveness of the conversation history record; a monitoring module 130, configured to monitor whether a session state of the session group changes in real time; a new session recording module 140 for recording a new generated session record for each user of the session group; a second obtaining module 150, configured to obtain a new generated session record and a session drop record complementary to the new generated session record within a defined time, where the defined time includes multiple time periods; the complementary merging record module 160 is configured to record according to the number of the newly generated session records and the number of the dropped session records, and merge the overlapping portions of the newly generated session records, where recording according to the number of the newly generated session records and the number of the dropped session records, and merging the overlapping portions of the newly generated session records specifically includes: judging whether the number of newly generated session records in a time period is greater than the number of session drop records; if yes, recording a session drop record in the time period; if not, recording a new generated session record in the time period; judging whether the newly generated session records are overlapped; if yes, merging and recording the overlapped part of the newly generated session record.
The session management system 10 provided in this embodiment includes a first obtaining module 110, a session group dividing module 120, a monitoring module 130, a new session recording module 140, a second obtaining module 150, and a complementary merge recording module 160. The first obtaining module 110 is configured to obtain a session history. The conversation group division module 120 is used to divide the users into a plurality of conversation groups according to the liveness of the conversation history records. The monitoring module 130 is configured to monitor whether a session state of the session group changes in real time. The new session recording module 140 is used to record a newly generated session record for each user of the talkgroup. The second obtaining module 150 is configured to obtain a newly generated session record and a session drop record complementary to the newly generated session record within a defined time, where the defined time includes a plurality of time periods. The complementary merging recording module 160 is configured to record according to the number of the newly generated session records and the number of the session drop records, and merge an overlapped portion of the newly generated session records, where recording is performed according to the number of the newly generated session records and the number of the session drop records, and merging the overlapped portion of the newly generated session records, specifically includes determining whether the number of the newly generated session records in the time period is greater than the number of the session drop records, if so, recording the session drop records in the time period, if not, recording the newly generated session records in the time period, determining whether the newly generated session records are overlapped, and if so, merging and recording the overlapped portion of the newly generated session records. By grouping according to the activity and recording only the session records with a few states in the group in a mode of complementary session records in the group, the overlapped parts of the session records are merged and recorded, and the storage resources are greatly saved. And the efficiency of session on-line statistics is improved, and the statistical result can be quickly output only by inquiring the completed session on-line statistics in the packet and performing simple accumulation calculation. The original mapping relation of matching users and sessions one by one is converted into the mapping matching of the session groups which are matched first, so that the mapping efficiency is greatly improved.
As shown in fig. 6, in the above embodiment, the complementary merge recording module 160 includes a first judging module 170 and a second judging module 180. The first determining module 170 is configured to determine whether the number of newly generated session records in a time period is greater than the number of session drop records, if yes, record the session drop records in the time period, and if not, record the newly generated session records in the time period. The second judging module 180 is configured to judge whether the newly generated session records overlap, and if so, merge and record overlapping portions of the newly generated session records.
As shown in fig. 7, in some embodiments, the session management system 10 further includes a matching module 190, where the matching module 190 is configured to obtain a session ID, match the session ID with a session group, and obtain a corresponding mapping relationship session from the session group.
In some embodiments, the session management system 10 further includes a calculation module 200, and the calculation module 200 is configured to output the recording result through an accumulation calculation.
As shown in fig. 8, an embodiment of the third aspect of the present application provides a session management system 20, including: a memory 300 and a processor 400, where the memory 300 stores a program or an instruction that can be executed on the processor 400, and the processor 400 implements the steps of the session management method in any of the embodiments of the first aspect when executing the program or the instruction, so that the technical effects of any of the embodiments of the first aspect are achieved, and are not described herein again.
An embodiment of the fourth aspect of the present application provides a readable storage medium, on which a program or an instruction is stored, where the program or the instruction is executed by a processor to implement the steps of the session management method in any one of the embodiments of the first aspect, so that the technical effects of any one of the embodiments of the first aspect are achieved, and details are not repeated here.
As shown in fig. 9 and fig. 10, according to the session management method of an embodiment provided by the present application, sessions are divided into different session groups according to activity, so that a user acquires sessions to convert from acquiring a corresponding mapping relationship session from a full set of sessions to acquiring a mapping session from a single set, and in the same set, each session is not recorded separately, but all session states are recorded for a duration until any session state in the set changes to generate a new record, sessions in the set are fixed within a defined time, complementary relationships exist between sessions, and only session optimized storage with a few states is recorded.
As shown in fig. 9, sessions are specifically divided into different session groups (G1, G2, G3, g4.. Gz) according to historical liveness.
Instead of recording each session separately within the same group, recording the duration of time that all session states persist until a change in any session state within the group generates a new record G1 will result in G1 (S3 [ T0, T1 ]), G1 (S2, S3, S4[ T1, T2 ]), G1 (S4 [ T2, T3 ]), G1 (S0, S1, S2, S3[ T3, tm ]).
As shown in fig. 10, sessions are fixed within a defined time period, there is a complementary relationship between sessions, only session records with a few states are recorded, and it is optimized that the data storage G1 will generate G1 (S3 [ T0, T1 ]), G1 (Sx 0, sx1[ T1, T2 ]), G1 (S4 [ T2, T3 ]), G1 (Sx 4[ T3, tm ]), so that when a session is performed and online statistics is performed, such as G1 (Sx 4[ T3, tm ]) records, S0, S1, S2, S3 are online in the time period from T3 to Tm, except for S4, in G1, and so on, if statistics of all session records S1.
To sum up, the beneficial effect of this application embodiment is:
1. the efficiency of session on-line statistics is high, and in the traditional scheme, if all session records need to be traversed to count the simultaneous on-line sessions, the session on-line statistics is finished in the query packet, and the statistical result can be quickly output only by simple accumulation calculation.
2. The method has the advantages that the occupied storage resources are small, the conversation records with few states in the group are only recorded in a mode of complementary conversation records in the group according to the activity, the overlapped parts of the conversation records are merged and recorded, and the storage resources are greatly saved.
3. The session mapping relation is high in creating efficiency, the original mapping relation of matching users and sessions one by one is converted into the mapping relation, and the session groups are matched firstly to carry out mapping matching, so that the mapping efficiency is greatly improved.
In this application, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance; the term "plurality" means two or more unless expressly limited otherwise. The terms "mounted," "connected," "fixed," and the like are to be construed broadly, and for example, "connected" may be a fixed connection, a removable connection, or an integral connection; "connected" may be directly connected or indirectly connected through an intermediate. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
In the description of the present application, it is to be understood that the terms "upper", "lower", "front", "rear", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the referred device or module must have a specific direction, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present application.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A session management method, comprising:
acquiring a session history record;
dividing users into a plurality of conversation groups according to the activeness of the conversation history record;
monitoring whether the session state of the session group changes in real time;
if the change occurs, recording a newly generated conversation record of each user of the conversation group;
acquiring the new generation session record and a session drop record complementary to the new generation session record within a defined time, wherein the defined time comprises a plurality of time periods;
recording according to the number of the newly generated session records and the number of the session drop records, and merging the overlapped parts of the newly generated session records;
wherein, the recording according to the number of the newly generated session records and the number of the session drop records, and merging the overlapping portions of the newly generated session records specifically includes:
judging whether the number of the newly generated session records in the time period is greater than the number of the session drop records;
if yes, recording the session disconnection record in the time period;
if not, recording the newly generated session record in the time period;
judging whether the new generation session records are overlapped;
if so, merging and recording the overlapped part of the new generation session record.
2. The session management method according to claim 1, wherein the recording according to the number of the newly generated session records and the number of the session drop records, and merging the overlapping portions of the newly generated session records specifically comprises:
assuming that the conversation group includes a conversation groupConversation groupConversation groupConversation group,Conversation groupThe conversation groupIncluding the userUser, userUser, userUser, userUser, userSaid is fixedMeaning time includes time pointsTime pointTime point ofTime point,Time point of day;
In a period of timeUser' sTime period when newly generated session record is generatedUserUser, userUser, userUser, userGenerating a session drop record for a period of timeUserUser, userUser, userTime period when newly generated session record is generatedUserUser, userGenerating a session drop record for a period of timeUser' sTime period when newly generated session record is generatedUserUser, userUser, userUser, userGenerating a session drop record for a period of timeUserUser, userUser, userUser, userTime period when newly generated session record is generatedUserGenerating a session drop record;
respectively compare in time periodsTime periodTime periodAnd time periodNewly generating the number of session records and session drop records, and recording the party with the smaller number in the session records and the session drop records;
3. The session management method according to claim 1 or 2, wherein the session management method further comprises:
and acquiring a session ID, matching the session ID with the session group, and acquiring a corresponding mapping relationship session from the session group.
4. The session management method according to claim 1 or 2, wherein dividing users into a plurality of session groups according to the liveness of the session history record specifically comprises:
5. The session management method according to claim 1 or 2, wherein the session management method further comprises:
and outputting a recording result through accumulation calculation.
6. A session management system, comprising:
a first obtaining module (110) for obtaining a session history record;
a conversation group division module (120) for dividing users into a plurality of conversation groups according to the liveness of the conversation history record;
a monitoring module (130) for monitoring in real time whether a session state of the session group has changed;
a new session recording module (140) for recording a new generated session record for each user of the session group;
a second obtaining module (150) for obtaining the new generated session record and a session drop record complementary to the new generated session record within a defined time, the defined time comprising a plurality of time periods;
a complementary merging recording module (160) configured to record according to the number of the newly generated session records and the number of the session drop records, and merge an overlapping portion of the newly generated session records, where the recording according to the number of the newly generated session records and the number of the session drop records, and merging the overlapping portion of the newly generated session records specifically includes:
judging whether the number of the newly generated session records in the time period is greater than the number of the session drop records;
if so, recording the session drop record in the time period;
if not, recording the newly generated session record in the time period;
judging whether the new generation session records are overlapped;
if so, merging and recording the overlapped part of the new generation session record.
7. The session management system according to claim 6, further comprising:
and the matching module (190) is used for acquiring the session ID, matching the session ID with the session group and acquiring the corresponding mapping relationship session from the session group.
8. The session management system according to claim 6, further comprising:
and the calculating module (200) is used for outputting a recording result through accumulation calculation.
9. A session management system, comprising:
a memory (300) and a processor (400), wherein the memory (300) has stored thereon a program or instructions executable on the processor (400), the processor (400) when executing the program or instructions implementing the steps of the session management method according to any one of claims 1 to 5.
10. A readable storage medium on which a program or instructions are stored, which program or instructions, when executed by a processor, carry out the steps of the session management method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211629237.7A CN115633076B (en) | 2022-12-19 | 2022-12-19 | Session management method and system, readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211629237.7A CN115633076B (en) | 2022-12-19 | 2022-12-19 | Session management method and system, readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115633076A true CN115633076A (en) | 2023-01-20 |
CN115633076B CN115633076B (en) | 2023-03-14 |
Family
ID=84910230
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211629237.7A Active CN115633076B (en) | 2022-12-19 | 2022-12-19 | Session management method and system, readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115633076B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001074028A1 (en) * | 2000-03-29 | 2001-10-04 | British Telecommunications Public Limited Company | System for processing log data |
CN106027326A (en) * | 2016-05-10 | 2016-10-12 | 杭州迪普科技有限公司 | Link health detection method and link health detection apparatus |
CN107634971A (en) * | 2017-10-26 | 2018-01-26 | 杭州迪普科技股份有限公司 | A kind of method and device for detecting flood attack |
CN109981715A (en) * | 2017-12-28 | 2019-07-05 | 中移信息技术有限公司 | A kind of method and device of session management |
CN112069377A (en) * | 2019-06-10 | 2020-12-11 | 重庆理工大学 | Session information data processing method and device, computer equipment and storage medium |
-
2022
- 2022-12-19 CN CN202211629237.7A patent/CN115633076B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001074028A1 (en) * | 2000-03-29 | 2001-10-04 | British Telecommunications Public Limited Company | System for processing log data |
CN106027326A (en) * | 2016-05-10 | 2016-10-12 | 杭州迪普科技有限公司 | Link health detection method and link health detection apparatus |
CN107634971A (en) * | 2017-10-26 | 2018-01-26 | 杭州迪普科技股份有限公司 | A kind of method and device for detecting flood attack |
CN109981715A (en) * | 2017-12-28 | 2019-07-05 | 中移信息技术有限公司 | A kind of method and device of session management |
CN112069377A (en) * | 2019-06-10 | 2020-12-11 | 重庆理工大学 | Session information data processing method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115633076B (en) | 2023-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110502494A (en) | Log processing method, device, computer equipment and storage medium | |
US6442615B1 (en) | System for traffic data evaluation of real network with dynamic routing utilizing virtual network modelling | |
US10033614B2 (en) | Bandwidth utilization monitoring for a communication system | |
EP0921656B1 (en) | Generating reports using distributed workstations | |
US8730819B2 (en) | Flexible network measurement | |
Korkmaz et al. | An efficient algorithm for finding a path subject to two additive constraints | |
CN107341033A (en) | A kind of data statistical approach, device, electronic equipment and storage medium | |
JPWO2020219203A5 (en) | ||
CN111224940A (en) | Anonymous service traffic correlation identification method and system nested in encrypted tunnel | |
CN110149377A (en) | A kind of video service node resource allocation methods, system, device and storage medium | |
Håstad et al. | An efficient parallel repetition theorem | |
CN113660209A (en) | DDoS attack detection system based on sketch and federal learning and application | |
CN109861869B (en) | Configuration file generation method and device | |
CN115633076B (en) | Session management method and system, readable storage medium | |
US20140181174A1 (en) | Distributed processing of stream data on an event protocol | |
CN111404815A (en) | Constrained routing method based on deep learning | |
KR100567320B1 (en) | Flow generation method for Internet traffic measurement | |
CN101860454A (en) | Network performance data processing method and device thereof | |
CN115328855B (en) | Method and device for evaluating file reduction degree, storage medium and equipment | |
CN105659642B (en) | Charge processing method concentrates network control node, functional node and system | |
CN103729461B (en) | Releasing and subscribing method based on history recorded data mining | |
US20090003357A1 (en) | Information communication system, information collection method, node device, and recording medium | |
US20220182718A1 (en) | Measuring the performance of a peer-managed content distribution network | |
CN112003900B (en) | Method and system for realizing high service availability under high-load scene in distributed system | |
CN114546645A (en) | Data processing method and device based on secret sharing |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |