CN115633076A - Session management method and system, readable storage medium - Google Patents

Session management method and system, readable storage medium Download PDF

Info

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
Application number
CN202211629237.7A
Other languages
Chinese (zh)
Other versions
CN115633076B (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.)
Elane Inc
Original Assignee
Elane Inc
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 Elane Inc filed Critical Elane Inc
Priority to CN202211629237.7A priority Critical patent/CN115633076B/en
Publication of CN115633076A publication Critical patent/CN115633076A/en
Application granted granted Critical
Publication of CN115633076B publication Critical patent/CN115633076B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M3/00Automatic or semi-automatic exchanges
    • H04M3/22Arrangements for supervision, monitoring or testing
    • H04M3/2218Call 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

Session management method and system, readable storage medium
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 group
Figure 100002_DEST_PATH_IMAGE001
Conversation group
Figure 835354DEST_PATH_IMAGE002
Conversation group
Figure 100002_DEST_PATH_IMAGE003
Conversation group
Figure 283653DEST_PATH_IMAGE004
Figure 100002_DEST_PATH_IMAGE005
Conversation group
Figure 797811DEST_PATH_IMAGE006
Conversation group
Figure 989758DEST_PATH_IMAGE001
Including the user
Figure 100002_DEST_PATH_IMAGE007
User, user
Figure 335288DEST_PATH_IMAGE008
User, user
Figure 100002_DEST_PATH_IMAGE009
User, user
Figure 688909DEST_PATH_IMAGE010
User, user
Figure 100002_DEST_PATH_IMAGE011
Defining time includes time points
Figure 690363DEST_PATH_IMAGE012
Time point
Figure 100002_DEST_PATH_IMAGE013
Time point
Figure 420422DEST_PATH_IMAGE014
Time point
Figure 100002_DEST_PATH_IMAGE015
Figure 620459DEST_PATH_IMAGE005
Time point of
Figure 613823DEST_PATH_IMAGE016
(ii) a In a period of time
Figure 100002_DEST_PATH_IMAGE017
User' s
Figure 899311DEST_PATH_IMAGE010
Time period when newly generated session record is generated
Figure 433060DEST_PATH_IMAGE017
User
Figure 690866DEST_PATH_IMAGE007
User, user
Figure 917448DEST_PATH_IMAGE008
User, user
Figure 893495DEST_PATH_IMAGE009
User, user
Figure 168618DEST_PATH_IMAGE011
Generating a session drop record for a period of time
Figure 608827DEST_PATH_IMAGE018
User
Figure 678414DEST_PATH_IMAGE009
For use inHouse
Figure 204073DEST_PATH_IMAGE010
User, user
Figure 814046DEST_PATH_IMAGE011
Time period when newly generated session record is generated
Figure 46444DEST_PATH_IMAGE018
User
Figure 818091DEST_PATH_IMAGE007
User, user
Figure 299888DEST_PATH_IMAGE008
Generating a session drop record for a period of time
Figure 100002_DEST_PATH_IMAGE019
User
Figure 979131DEST_PATH_IMAGE011
Time period when newly generated session record is generated
Figure 66036DEST_PATH_IMAGE019
User' s
Figure 805322DEST_PATH_IMAGE007
User, user
Figure 977677DEST_PATH_IMAGE008
User, user
Figure 195032DEST_PATH_IMAGE009
User, user
Figure 402022DEST_PATH_IMAGE010
Generating a session drop record for a period of time
Figure 515472DEST_PATH_IMAGE020
User' s
Figure 237440DEST_PATH_IMAGE007
User, user
Figure 196169DEST_PATH_IMAGE008
User, user
Figure 54403DEST_PATH_IMAGE009
User, user
Figure 73175DEST_PATH_IMAGE010
Time period when newly generated session record is generated
Figure 282440DEST_PATH_IMAGE020
User
Figure 44859DEST_PATH_IMAGE011
Generating a session drop record; are compared in time periods
Figure 226442DEST_PATH_IMAGE017
Time period
Figure 212852DEST_PATH_IMAGE019
Time period of
Figure 847096DEST_PATH_IMAGE019
And time period
Figure 209944DEST_PATH_IMAGE020
Newly 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 group
Figure 246033DEST_PATH_IMAGE001
Is recorded as
Figure 100002_DEST_PATH_IMAGE021
Figure 403345DEST_PATH_IMAGE022
Figure 100002_DEST_PATH_IMAGE023
Figure 321623DEST_PATH_IMAGE024
(ii) a Wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE025
a group of sessions is represented and,
Figure 222583DEST_PATH_IMAGE026
which represents the point in time of the presentation of,
Figure 100002_DEST_PATH_IMAGE027
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 optimized
Figure 847599DEST_PATH_IMAGE001
Will generate
Figure 441391DEST_PATH_IMAGE028
Figure DEST_PATH_IMAGE029
Figure 581386DEST_PATH_IMAGE030
Figure DEST_PATH_IMAGE031
Thus, when a conversation is ongoing while the system is online, e.g. when the system is online
Figure 489299DEST_PATH_IMAGE031
The records can be directly derived
Figure 296718DEST_PATH_IMAGE001
Internal removing device
Figure 999095DEST_PATH_IMAGE011
In addition, the air conditioner is provided with a fan,
Figure 891964DEST_PATH_IMAGE007
Figure 337989DEST_PATH_IMAGE008
Figure 203177DEST_PATH_IMAGE009
Figure 138772DEST_PATH_IMAGE010
in that
Figure 456621DEST_PATH_IMAGE015
To
Figure 503074DEST_PATH_IMAGE016
The 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 records
Figure 222768DEST_PATH_IMAGE032
Only different packets need to be queried
Figure DEST_PATH_IMAGE033
Efficient 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 records
Figure 329265DEST_PATH_IMAGE001
Conversation group
Figure 134410DEST_PATH_IMAGE002
Conversation group
Figure 984554DEST_PATH_IMAGE003
Conversation group
Figure 558755DEST_PATH_IMAGE004
Figure 836152DEST_PATH_IMAGE005
Conversation group
Figure 863014DEST_PATH_IMAGE006
In the technical scheme, users are divided into conversation groups according to the liveness of the conversation history record
Figure 516850DEST_PATH_IMAGE001
Conversation group
Figure 211136DEST_PATH_IMAGE002
Conversation group
Figure 597118DEST_PATH_IMAGE003
Conversation group
Figure 439172DEST_PATH_IMAGE004
Figure 568802DEST_PATH_IMAGE005
Conversation group
Figure 914333DEST_PATH_IMAGE006
The 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 group
Figure 736795DEST_PATH_IMAGE001
Conversation group
Figure 3829DEST_PATH_IMAGE002
Conversation group
Figure 999466DEST_PATH_IMAGE003
Conversation group
Figure 137187DEST_PATH_IMAGE004
Figure 192867DEST_PATH_IMAGE005
Conversation group
Figure 681618DEST_PATH_IMAGE006
Conversation group
Figure 215367DEST_PATH_IMAGE001
Including the user
Figure 738752DEST_PATH_IMAGE007
User, user
Figure 903017DEST_PATH_IMAGE008
User, user
Figure 675801DEST_PATH_IMAGE009
User, user
Figure 950925DEST_PATH_IMAGE010
User, user
Figure 391133DEST_PATH_IMAGE011
Defining time includes time points
Figure 460721DEST_PATH_IMAGE012
Time point of
Figure 189642DEST_PATH_IMAGE013
Time point of
Figure 65194DEST_PATH_IMAGE014
Time point
Figure 297593DEST_PATH_IMAGE015
Figure 600398DEST_PATH_IMAGE005
Time point of
Figure 551036DEST_PATH_IMAGE016
In a period of time
Figure 230279DEST_PATH_IMAGE017
User' s
Figure 582763DEST_PATH_IMAGE010
Time period when newly generated session record is generated
Figure 259732DEST_PATH_IMAGE017
User' s
Figure 494405DEST_PATH_IMAGE007
User, user
Figure 649442DEST_PATH_IMAGE008
User, user
Figure 918750DEST_PATH_IMAGE009
User, user
Figure 766620DEST_PATH_IMAGE011
Generating a session drop record for a period of time
Figure 426271DEST_PATH_IMAGE018
User' s
Figure 447317DEST_PATH_IMAGE009
User, user
Figure 508814DEST_PATH_IMAGE010
User, user
Figure 589903DEST_PATH_IMAGE011
Time period when newly generated session record is generated
Figure 736850DEST_PATH_IMAGE018
User' s
Figure 499270DEST_PATH_IMAGE007
User, user
Figure 477590DEST_PATH_IMAGE008
Generating a session drop record for a period of time
Figure 667263DEST_PATH_IMAGE019
User' s
Figure 363823DEST_PATH_IMAGE011
Time period when newly generated session record is generated
Figure 664355DEST_PATH_IMAGE019
User' s
Figure 497182DEST_PATH_IMAGE007
User, user
Figure 123335DEST_PATH_IMAGE008
User, user
Figure 244875DEST_PATH_IMAGE009
User, user
Figure 145835DEST_PATH_IMAGE010
Generating a session drop record for a period of time
Figure 36430DEST_PATH_IMAGE020
User
Figure 641941DEST_PATH_IMAGE007
User, user
Figure 985198DEST_PATH_IMAGE008
User, user
Figure 158690DEST_PATH_IMAGE009
User, user
Figure 966109DEST_PATH_IMAGE010
Time period when newly generated session record is generated
Figure 668486DEST_PATH_IMAGE020
User' s
Figure 561356DEST_PATH_IMAGE011
Generating a session drop record;
are compared in time periods
Figure 7381DEST_PATH_IMAGE017
Time period of
Figure 872569DEST_PATH_IMAGE019
Time period of
Figure 808164DEST_PATH_IMAGE019
And time period
Figure 126012DEST_PATH_IMAGE020
Newly 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 group
Figure 172466DEST_PATH_IMAGE001
Is recorded as
Figure 892160DEST_PATH_IMAGE021
Figure 201919DEST_PATH_IMAGE022
Figure 69381DEST_PATH_IMAGE023
Figure 857208DEST_PATH_IMAGE024
Wherein the content of the first and second substances,
Figure 493726DEST_PATH_IMAGE025
a group of sessions is represented and,
Figure 708806DEST_PATH_IMAGE026
which represents the point in time of the display,
Figure 1247DEST_PATH_IMAGE027
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 optimized
Figure 655083DEST_PATH_IMAGE001
Will generate
Figure 83790DEST_PATH_IMAGE028
Figure 532089DEST_PATH_IMAGE029
Figure 311826DEST_PATH_IMAGE030
Figure 503773DEST_PATH_IMAGE031
Thus, when a conversation is ongoing while the system is online, e.g. when the system is online
Figure 52566DEST_PATH_IMAGE031
The records can be directly derived
Figure 875028DEST_PATH_IMAGE001
Internal removing device
Figure 938799DEST_PATH_IMAGE011
Besides, the air conditioner is provided with a fan,
Figure 606541DEST_PATH_IMAGE007
Figure 72158DEST_PATH_IMAGE008
Figure 65521DEST_PATH_IMAGE009
Figure 554272DEST_PATH_IMAGE010
in that
Figure 353600DEST_PATH_IMAGE015
To is that
Figure 611406DEST_PATH_IMAGE016
The 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 records
Figure 572409DEST_PATH_IMAGE032
Only different packets need to be queried
Figure 548455DEST_PATH_IMAGE033
Efficient 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 group
Figure DEST_PATH_IMAGE001
Conversation group
Figure 422630DEST_PATH_IMAGE002
Conversation group
Figure DEST_PATH_IMAGE003
Conversation group
Figure 271855DEST_PATH_IMAGE004
Figure DEST_PATH_IMAGE005
Conversation group
Figure 510069DEST_PATH_IMAGE006
The conversation group
Figure 77317DEST_PATH_IMAGE001
Including the user
Figure DEST_PATH_IMAGE007
User, user
Figure 375574DEST_PATH_IMAGE008
User, user
Figure DEST_PATH_IMAGE009
User, user
Figure 434797DEST_PATH_IMAGE010
User, user
Figure DEST_PATH_IMAGE011
Said is fixedMeaning time includes time points
Figure 539019DEST_PATH_IMAGE012
Time point
Figure DEST_PATH_IMAGE013
Time point of
Figure 367298DEST_PATH_IMAGE014
Time point
Figure DEST_PATH_IMAGE015
Figure 836457DEST_PATH_IMAGE005
Time point of day
Figure 914134DEST_PATH_IMAGE016
In a period of time
Figure DEST_PATH_IMAGE017
User' s
Figure 822047DEST_PATH_IMAGE010
Time period when newly generated session record is generated
Figure 301570DEST_PATH_IMAGE017
User
Figure 738368DEST_PATH_IMAGE007
User, user
Figure 37762DEST_PATH_IMAGE008
User, user
Figure 218208DEST_PATH_IMAGE009
User, user
Figure 552237DEST_PATH_IMAGE011
Generating a session drop record for a period of time
Figure 159936DEST_PATH_IMAGE018
User
Figure 212205DEST_PATH_IMAGE009
User, user
Figure 196342DEST_PATH_IMAGE010
User, user
Figure 650457DEST_PATH_IMAGE011
Time period when newly generated session record is generated
Figure 429057DEST_PATH_IMAGE018
User
Figure 968623DEST_PATH_IMAGE007
User, user
Figure 225292DEST_PATH_IMAGE008
Generating a session drop record for a period of time
Figure DEST_PATH_IMAGE019
User' s
Figure 2755DEST_PATH_IMAGE011
Time period when newly generated session record is generated
Figure 748994DEST_PATH_IMAGE019
User
Figure 510277DEST_PATH_IMAGE007
User, user
Figure 570637DEST_PATH_IMAGE008
User, user
Figure 733765DEST_PATH_IMAGE009
User, user
Figure 854168DEST_PATH_IMAGE010
Generating a session drop record for a period of time
Figure 165063DEST_PATH_IMAGE020
User
Figure 29114DEST_PATH_IMAGE007
User, user
Figure 46749DEST_PATH_IMAGE008
User, user
Figure 338053DEST_PATH_IMAGE009
User, user
Figure 73927DEST_PATH_IMAGE010
Time period when newly generated session record is generated
Figure 538407DEST_PATH_IMAGE020
User
Figure 410548DEST_PATH_IMAGE011
Generating a session drop record;
respectively compare in time periods
Figure 138332DEST_PATH_IMAGE017
Time period
Figure 361503DEST_PATH_IMAGE019
Time period
Figure 301778DEST_PATH_IMAGE019
And time period
Figure 294004DEST_PATH_IMAGE020
Newly 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 session group
Figure 989428DEST_PATH_IMAGE001
Is recorded as
Figure DEST_PATH_IMAGE021
Figure 637578DEST_PATH_IMAGE022
Figure DEST_PATH_IMAGE023
Figure 115964DEST_PATH_IMAGE024
Wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE025
a group of sessions is represented and,
Figure 493856DEST_PATH_IMAGE026
which represents the point in time of the display,
Figure DEST_PATH_IMAGE027
representing the user.
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:
grouping users into conversation groups according to liveness of the conversation history record
Figure 501126DEST_PATH_IMAGE001
Conversation group
Figure 698889DEST_PATH_IMAGE002
Conversation group
Figure 246545DEST_PATH_IMAGE003
Conversation group
Figure 10102DEST_PATH_IMAGE004
Figure 985011DEST_PATH_IMAGE005
Conversation group
Figure 670070DEST_PATH_IMAGE006
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.
CN202211629237.7A 2022-12-19 2022-12-19 Session management method and system, readable storage medium Active CN115633076B (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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