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

Session management method and system, readable storage medium Download PDF

Info

Publication number
CN115633076B
CN115633076B CN202211629237.7A CN202211629237A CN115633076B CN 115633076 B CN115633076 B CN 115633076B CN 202211629237 A CN202211629237 A CN 202211629237A CN 115633076 B CN115633076 B CN 115633076B
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.)
Active
Application number
CN202211629237.7A
Other languages
Chinese (zh)
Other versions
CN115633076A (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 and system and a readable storage medium, which belong to the technical field of session management, and 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; 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. 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 liveness 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 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, 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 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.
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 solution, recording according to the number of newly generated session records and the number of session drop records, and combining the overlapping portions of the newly generated session records specifically includes: assume that a conversation group includes a conversation group
Figure DEST_PATH_IMAGE001
Conversation group
Figure 835354DEST_PATH_IMAGE002
Conversation group
Figure DEST_PATH_IMAGE003
Conversation group
Figure 283653DEST_PATH_IMAGE004
Figure DEST_PATH_IMAGE005
Conversation group
Figure 797811DEST_PATH_IMAGE006
Conversation group
Figure 989758DEST_PATH_IMAGE001
Including the user
Figure DEST_PATH_IMAGE007
User, user
Figure 335288DEST_PATH_IMAGE008
User, user
Figure DEST_PATH_IMAGE009
User, user
Figure 688909DEST_PATH_IMAGE010
User, user
Figure DEST_PATH_IMAGE011
Defining time includes time points
Figure 690363DEST_PATH_IMAGE012
Time point
Figure DEST_PATH_IMAGE013
Time point of
Figure 420422DEST_PATH_IMAGE014
Time point
Figure DEST_PATH_IMAGE015
Figure 620459DEST_PATH_IMAGE005
Time point of
Figure 613823DEST_PATH_IMAGE016
(ii) a In a period of time
Figure DEST_PATH_IMAGE017
User' s
Figure 899311DEST_PATH_IMAGE010
Time period when newly generated session record is generated
Figure 433060DEST_PATH_IMAGE017
User' s
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
User, user
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 DEST_PATH_IMAGE019
User' s
Figure 979131DEST_PATH_IMAGE011
Time period when newly generated session record is generated
Figure 66036DEST_PATH_IMAGE019
User
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' s
Figure 44859DEST_PATH_IMAGE011
Generating a session drop record; respectively compare 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 DEST_PATH_IMAGE021
Figure 403345DEST_PATH_IMAGE022
Figure DEST_PATH_IMAGE023
Figure 321623DEST_PATH_IMAGE024
(ii) a Wherein the content of the first and second substances,
Figure 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 DEST_PATH_IMAGE027
representing the user.
In the technical scheme, the group session is fixed within the defined time, the sessions have complementary relation, only the session record with few states is recorded, and the 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
When a conversation is ongoing, the system is online counted as
Figure 489299DEST_PATH_IMAGE031
The records can be directly derived
Figure 296718DEST_PATH_IMAGE001
Internal removing device
Figure 999095DEST_PATH_IMAGE011
Besides, 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, and so on if the statistics of the online session at the same time 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 scheme, the session management method further comprises the steps of 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 activity 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 complementary with 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 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 recording according to the number of the newly generated session records and the number of the session drop records, and merging an overlapping portion 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 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.
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 new generated session record and a session drop record complementary to the new 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 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.
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, and 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 a 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, 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 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 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 the 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 new 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: 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.
According to the session management method provided by the embodiment, the session history record is acquired first, and the users are divided into a plurality of session groups according to the liveness of the session history record, so that the session acquired by the users is converted from the session acquiring the corresponding mapping relationship from the full session into the mapping session 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, 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 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 method, the session groups are matched for mapping matching, and the mapping efficiency is greatly improved.
As shown in fig. 2, according to the session management method according to an embodiment of the present application, recording is performed according to the number of newly generated session records and the number of dropped session records, and combining overlapping portions of the newly generated session records, which 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 yes, 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, 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 dropped session records, and merges overlapping portions of the newly generated session records, and 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 the 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
Figure 189642DEST_PATH_IMAGE013
Time point
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
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
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
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
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 will be appreciated that within a defined time, the sessions within a group are fixed, there are complementary relationships between sessions, only session records with a minority of states are recorded,optimize data storage
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 remover
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
Figure 611406DEST_PATH_IMAGE016
On-line during a period of time, and so on if statisticsThe simultaneous online sessions at a time need not 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 recording module 160 is configured to record according to the number of newly generated session records and the number of dropped session records, and merge the overlapping portions of the newly generated session records, where recording according to the number of newly generated session records and the number of 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 the time period is larger 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 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 for dividing the users into a plurality of conversation groups according to the liveness of the conversation history records. The monitoring module 130 is used for monitoring whether the 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 determining module 180 is configured to determine whether the newly generated session records overlap, and if yes, merge and record the overlapping portion 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: the memory 300 and the 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 embodiment of the first aspect when executing the program or the instruction, so that the method has the technical effects of any embodiment of the first aspect, and is 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 a session, a session that acquires a corresponding mapping relationship from a full number of sessions is converted into a mapping session that acquires from a single group, each session is not recorded separately in the same group, but a time that all session states last is recorded until any session state in the group changes to generate a new record, sessions in the group are fixed within a defined time, complementary relationships exist between sessions, and only session optimized storage in which states account for a small number 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, the sessions are fixed in groups within a defined time, there is a complementary relationship between sessions, only session records with a few states are recorded, the data storage G1 is optimized to generate G1 (S3 [ T0, T1 ]), G1 (Sx 0, sx1[ T1, T2 ]), G1 (S4 [ T2, T3 ]), G1 (Sx 4[ T3, tm ]), so that during session and online statistics such as G1 (Sx 4[ T3, tm ]) can directly result in that S0, S1, S2, S3 are online simultaneously within a time period from T3 to Tm, except S4 within G1, and so on if statistics of all session records at a certain time and online session do not require querying different packets g1.. Sn.
To sum up, the beneficial effect of this application embodiment is:
1. the efficiency of session simultaneous online statistics is high, and if the traditional scheme needs to count simultaneous online sessions and needs to traverse all session records, the scheme only needs to query the packets to finish the online statistics of the sessions and only needs to perform simple accumulation calculation to quickly output the statistical results.
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 established efficiently, and the original mapping relation of matching users and sessions one by one is converted into the mapping relation, and the session group is matched 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 explicitly defined 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; "coupled" may be direct or indirect through an intermediary. 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 should be understood that the terms "upper", "lower", "front", "back", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present application and simplifying the 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 operate, and thus, should not be construed as limiting the present application.
In the description of the present application, the description of the terms "one embodiment," "some embodiments," "a specific embodiment," etc., mean 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 present 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 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 method for session management, 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 session record of each user of the session 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 part 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 QLYQS_12
Conversation group
Figure QLYQS_2
Conversation group
Figure QLYQS_5
Conversation group
Figure QLYQS_10
Proceedings, talkgroup
Figure QLYQS_13
Said conversation group
Figure QLYQS_15
Including the user
Figure QLYQS_16
User, user
Figure QLYQS_7
User, user
Figure QLYQS_11
User, user
Figure QLYQS_4
User, user
Figure QLYQS_8
The defined time comprises a time point
Figure QLYQS_3
Time point
Figure QLYQS_6
Time point
Figure QLYQS_9
Time point
Figure QLYQS_14
8230and time point
Figure QLYQS_1
In a period of time
Figure QLYQS_33
User' s
Figure QLYQS_38
Time period when newly generated session record is generated
Figure QLYQS_40
User
Figure QLYQS_20
User, user
Figure QLYQS_21
User, user
Figure QLYQS_26
User, user
Figure QLYQS_30
Generating a session drop record for a period of time
Figure QLYQS_19
User
Figure QLYQS_22
User, user
Figure QLYQS_25
User, user
Figure QLYQS_28
Time period when newly generated session record is generated
Figure QLYQS_18
User' s
Figure QLYQS_23
User, user
Figure QLYQS_27
Generating a session drop record for a period of time
Figure QLYQS_31
User' s
Figure QLYQS_35
Time period when newly generated session record is generated
Figure QLYQS_41
User
Figure QLYQS_43
User, user
Figure QLYQS_44
User, user
Figure QLYQS_17
User, user
Figure QLYQS_24
Generating a session drop record for a period of time
Figure QLYQS_29
User
Figure QLYQS_34
User, user
Figure QLYQS_32
User, user
Figure QLYQS_36
User, user
Figure QLYQS_39
Time period when newly generated session record is generated
Figure QLYQS_42
User' s
Figure QLYQS_37
Generating a session drop record;
respectively compare in time periods
Figure QLYQS_45
Time period
Figure QLYQS_46
Time period
Figure QLYQS_47
And time period
Figure QLYQS_48
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 QLYQS_49
Is recorded as
Figure QLYQS_50
Figure QLYQS_51
Figure QLYQS_52
Figure QLYQS_53
Wherein the content of the first and second substances,
Figure QLYQS_54
a group of sessions is represented and,
Figure QLYQS_55
which represents the point in time of the display,
Figure QLYQS_56
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 QLYQS_57
Conversation group
Figure QLYQS_58
Conversation group
Figure QLYQS_59
Conversation group
Figure QLYQS_60
8230j conversation group
Figure QLYQS_61
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 changes;
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, wherein the defined time includes 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 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.
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, characterized in that said program or instructions, when executed by a processor, implement the steps of a 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 CN115633076A (en) 2023-01-20
CN115633076B true 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
CN115633076A (en) 2023-01-20

Similar Documents

Publication Publication Date Title
CN110502494A (en) Log processing method, device, computer equipment and storage medium
CN111263409B (en) Method, system and related equipment for providing metadata information of network function service
EP3905589A1 (en) Slice resource deployment method and apparatus, and slice manager and computer storage medium
CN111400482B (en) Method and device for establishing question-answer pairs
CN110149377A (en) A kind of video service node resource allocation methods, system, device and storage medium
CN112256542A (en) eBPF-based micro-service system performance detection method, device and system
CN110784929A (en) Access resource allocation method, device, equipment and system
CN109818809A (en) Interactive voice response system and its data processing method and phone customer service system
CN115633076B (en) Session management method and system, readable storage medium
CN111694518A (en) Method, device and equipment for automatically migrating data after cluster expansion or contraction
CN115334082A (en) Load balancing method, device, computer equipment, storage medium and product
KR100567320B1 (en) Flow generation method for Internet traffic measurement
CN115328855B (en) Method and device for evaluating file reduction degree, storage medium and equipment
CN101860454A (en) Network performance data processing method and device thereof
CN105659642B (en) Charge processing method concentrates network control node, functional node and system
CN112612816A (en) Service result query method, device, equipment and medium for Ether house alliance chain
CN114565325B (en) Big data analysis method and system of power Internet of things
KR101968575B1 (en) Method for automatic real-time analysis for bottleneck and apparatus for using the same
CN112003900B (en) Method and system for realizing high service availability under high-load scene in distributed system
JP7456502B2 (en) Traffic monitoring device, traffic monitoring method and traffic monitoring program
CN113794282A (en) Data processing method and device based on intelligent gateway and computer equipment
CN111158899A (en) Data acquisition method, data acquisition device, task management center and task management system
CN109491612A (en) A kind of logical partition method and device of solid state hard disk
CN117240925B (en) Flow recording method and device, storage medium and computer equipment
JP2003111274A (en) Transmission threshold calculation method for power system, and computer readable recording medium recorded with transmission threshold calculation program

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